The Prelude.toEnum method restricted to the type Char.
Modulerelude-1.2.2.2Haskell2010
Relude.Base
SPDX-License-Identifier : MIT Maintainer : Kowainik xrom.xkov@gmail.com Stability : Stable Portability : Portable
Reexports from Data.* and GHC.* modules of
base package.
- 14 types
- 9 classes
- 19 values
- Packagerelude-1.2.2.2
- Exports43
- LanguageHaskell2010
- LicenceMIT
- SourceBase.hs
Base types
2 declarationsThe character type Char represents Unicode codespace and its elements are code points as in definitions D9 and D10 of the Unicode Standard.
Character literals in Haskell are single-quoted: 'Q', 'Я' or 'Ω'.
To represent a single quote itself use '\'', and to represent a backslash
use '\\'. The full grammar can be found in the section 2.6 of the
Haskell 2010 Language Report.
To specify a character by its code point one can use decimal, hexadecimal
or octal notation: '\65', '\x41' and '\o101' are all alternative forms
of 'A'. The largest code point is '\x10ffff'.
There is a special escape syntax for ASCII control characters:
Escape | Alternatives | Meaning |
|---|---|---|
|
| null character |
|
| start of heading |
|
| start of text |
|
| end of text |
|
| end of transmission |
|
| enquiry |
|
| acknowledge |
|
,
| bell (alert) |
|
,
| backspace |
|
,
| horizontal tab |
|
,
| line feed (new line) |
|
,
| vertical tab |
|
,
| form feed |
|
,
| carriage return |
|
| shift out |
|
| shift in |
|
| data link escape |
|
| device control 1 |
|
| device control 2 |
|
| device control 3 |
|
| device control 4 |
|
| negative acknowledge |
|
| synchronous idle |
|
| end of transmission block |
|
| cancel |
|
| end of medium |
|
| substitute |
|
| escape |
|
| file separator |
|
| group separator |
|
| record separator |
|
| unit separator |
|
,
| space |
|
| delete |
Instances34Bounded, Enum, Data, Read, Ix, Storable, …
Bounded CharDefined in ghc-internal-9.1401.0 · GHC.Internal.EnumEnum CharDefined in ghc-internal-9.1401.0 · GHC.Internal.EnumEq CharDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesData CharDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataOrd CharDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesRead CharDefined in ghc-internal-9.1401.0 · GHC.Internal.ReadShow CharDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowIx CharDefined in ghc-internal-9.1401.0 · GHC.Internal.IxStorable CharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.StorableIsChar CharDefined in base-4.22.0.0 · Text.PrintfPrintfArg CharDefined in base-4.22.0.0 · Text.PrintfNFData CharDefined in deepseq-1.5.1.0 · Control.DeepSeqPretty CharDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClassPretty CharDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClassBinary CharDefined in binary-0.8.9.3 · Data.Binary.ClassHashable CharDefined in hashable-1.5.1.0 · Data.Hashable.ClassLift CharDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.LiftTestCoercion SCharDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsTestEquality SCharDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsIArray UArray CharDefined in array-0.5.8.0 · Data.Array.BaseMArray IOUArray Char IODefined in array-0.5.8.0 · Data.Array.IO.InternalsGeneric1 (URec Char)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsFoldable UCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.FoldableTraversable UCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.TraversableMArray (STUArray s) Char (ST s)Defined in array-0.5.8.0 · Data.Array.BaseFunctor (URec Char)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (URec Char p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (URec Char p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (URec Char p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (URec Char p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Genericstype Rep (URec Char p) = D1 ('MetaDataDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UChar"
'PrefixI 'True) (S1 ('MetaSel ('Just"uChar#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UChar))type Rep1 (URec Char) = D1 ('MetaDataDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UChar"
'PrefixI 'True) (S1 ('MetaSel ('Just"uChar#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UChar))data URec CharDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsUsed for marking occurrences of Char#
type Compare a b = CmpChar a bDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.Ord
Base type classes
5 declarationsThe Eq class defines equality (==) and inequality (/=). All the basic datatypes exported by the Prelude are instances of Eq, and Eq may be derived for any datatype whose constituents are also instances of Eq.
The Haskell Report defines no laws for Eq. However, instances are encouraged to follow these properties:
Instances370Eq, …
Eq ByteArrayDefined in base-4.22.0.0 · Data.Array.ByteEq IoManagerFlagDefined in base-4.22.0.0 · GHC.RTS.FlagsEq TimeoutDefined in base-4.22.0.0 · System.TimeoutEq FloatingDecimalDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.D2SEq FloatingDecimalDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.F2SEq ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeEq ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.InternalEq ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.InternalEq IntSetDefined in containers-0.8 · Data.IntSet.InternalEq IntersectionDefined in containers-0.8 · Data.IntSet.InternalEq PrefixDefined in containers-0.8 · Data.IntSet.Internal.IntTreeCommonsEq VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.BaseEq BigNatDefined in ghc-internal-9.1401.0 · GHC.Internal.Bignum.BigNatEq IntegerDefined in ghc-internal-9.1401.0 · GHC.Internal.Bignum.IntegerEq NaturalDefined in ghc-internal-9.1401.0 · GHC.Internal.Bignum.NaturalEq ByteOrderDefined in ghc-internal-9.1401.0 · GHC.Internal.ByteOrderEq ClosureTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.ClosureTypesEq BlockReasonDefined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncEq ThreadIdDefined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncEq ThreadStatusDefined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncEq ConstrDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataEquality of constructors
Eq ConstrRepDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataEq DataRepDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataEq FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataEq AllDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalEq AnyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalEq SomeTypeRepDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Typeable.InternalEq UniqueDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.UniqueEq VersionDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.VersionEq ControlMessageDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.ControlEq EPollFdDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.EPollEq EventTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.EPollEq EventDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.Internal.TypesEq EventLifetimeDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.Internal.TypesEq LifetimeDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.Internal.TypesEq FdKeyDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.ManagerEq StateDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.ManagerEq EventDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.PollEq TimeoutKeyDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.TimeOutEq StateDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.TimerManagerEq UniqueDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.UniqueEq ErrorCallDefined in ghc-internal-9.1401.0 · GHC.Internal.ExceptionEq ArithExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.Exception.TypeEq SpecConstrAnnotationDefined in ghc-internal-9.1401.0 · GHC.Internal.ExtsEq FingerprintDefined in ghc-internal-9.1401.0 · GHC.Internal.Fingerprint.TypeEq ErrnoDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.ErrorEq CBoolDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CClockDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CDoubleDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CFloatDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CIntDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CIntMaxDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CIntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CLLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CPtrdiffDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CSCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CSUSecondsDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CShortDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CSigAtomicDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CSizeDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CTimeDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CUCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CUIntDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CUIntMaxDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CUIntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CULLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CULongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CUSecondsDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CUShortDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq CWcharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesEq IntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.PtrEq WordPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.PtrEq ForeignSrcLangDefined in ghc-internal-9.1401.0 · GHC.Internal.ForeignSrcLangEq AssociativityDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq PrimTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresEq TsoFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresEq WhatNextDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresEq WhyBlockedDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresEq HalfWordDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.InfoTable.TypesEq StgInfoTableDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.InfoTable.TypesEq CostCentreDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesEq CostCentreStackDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesEq IndexTableDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesEq StgTSOProfInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesEq MaskingStateDefined in ghc-internal-9.1401.0 · GHC.Internal.IOEq BufferStateDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.BufferEq IODeviceTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.DeviceEq SeekModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.DeviceEq CodingProgressDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Encoding.TypesEq ArrayExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionEq AsyncExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionEq ExitCodeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionEq IOErrorTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionEq IOExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionEq HandlePosnDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.HandleEq BufferModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesEq HandleDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesEq NewlineDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesEq NewlineModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesEq IOModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.IOModeEq IoSubSystemDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.SubSystemEq InfoProvDefined in ghc-internal-9.1401.0 · GHC.Internal.InfoProv.TypesEq Int16Defined in ghc-internal-9.1401.0 · GHC.Internal.IntEq Int32Defined in ghc-internal-9.1401.0 · GHC.Internal.IntEq Int64Defined in ghc-internal-9.1401.0 · GHC.Internal.IntEq Int8Defined in ghc-internal-9.1401.0 · GHC.Internal.IntEq ExtensionDefined in ghc-internal-9.1401.0 · GHC.Internal.LanguageExtensionsEq IoManagerFlagDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsEq ByteOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsEq WordOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsEq ByteOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsProfEq WordOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsProfEq StackEntryDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.DecodeEq SrcLocDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.TypesEq CBlkCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CBlkSizeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CCcDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CClockIdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CDevDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CFsBlkCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CFsFilCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CGidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CIdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CInoDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CKeyDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CModeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CNfdsDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CNlinkDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq COffDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CPidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CRLimDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CSocklenDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CSpeedDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CSsizeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CTcflagDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CTimerDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq CUidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesEq AnnLookupDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq AnnTargetDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq BangDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq BndrVisDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq BodyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq BytesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq CallconvDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq ClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq ConDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq DecDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq DerivClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq DerivStrategyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq DocLocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq ExpDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq FamilyResultSigDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq FixityDirectionDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq ForeignDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq FunDepDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq GuardDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq InfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq InjectivityAnnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq InlineDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq LitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq LocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq MatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq ModNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq ModuleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq ModuleInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq NameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq NameFlavourDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq NameSpaceDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq NamespaceSpecifierDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq OccNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq OverlapDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq PatDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq PatSynArgsDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq PatSynDirDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq PhasesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq PkgNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq PragmaDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq RangeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq RoleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq RuleBndrDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq RuleMatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq SafetyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq SpecificityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq StmtDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq TyLitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq TySynEqnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq TypeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq TypeFamilyHeadDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq LexemeDefined in ghc-internal-9.1401.0 · GHC.Internal.Text.Read.LexEq NumberDefined in ghc-internal-9.1401.0 · GHC.Internal.Text.Read.LexEq SomeCharDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsEq SomeSymbolDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsEq SomeNatDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeNatsEq BoolDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq CharDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq DoubleDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq FloatDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq IntDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq ModuleDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq TrNameDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq TyConDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq WordDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq GeneralCategoryDefined in ghc-internal-9.1401.0 · GHC.Internal.UnicodeEq Word16Defined in ghc-internal-9.1401.0 · GHC.Internal.WordEq Word32Defined in ghc-internal-9.1401.0 · GHC.Internal.WordEq Word64Defined in ghc-internal-9.1401.0 · GHC.Internal.WordEq Word8Defined in ghc-internal-9.1401.0 · GHC.Internal.WordEq EncodingExceptionDefined in os-string-2.0.8 · System.OsString.Encoding.InternalEq OsCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesByte equality of the internal representation.
Eq OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesByte equality of the internal representation.
Eq PosixCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesEq PosixStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesEq WindowsCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesEq WindowsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesEq ModeDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJEq StyleDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJEq TextDetailsDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJEq PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClassEq DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJEq PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClassEq UndefinedDefined in relude-1.2.2.2 · Relude.DebugEq TSemDefined in stm-2.5.3.1 · Control.Concurrent.STM.TSemEq UnicodeExceptionDefined in text-2.1.3 · Data.Text.Encoding.ErrorEq I8Defined in text-2.1.3 · Data.Text.ForeignEq TextDefined in text-2.1.3 · Data.Text · orphanEq BuilderDefined in text-2.1.3 · Data.Text.Internal.BuilderEq PartialUtf8CodePointDefined in text-2.1.3 · Data.Text.Internal.EncodingEq Utf8StateDefined in text-2.1.3 · Data.Text.Internal.EncodingEq DecoderStateDefined in text-2.1.3 · Data.Text.Internal.Encoding.Utf8Eq SizeDefined in text-2.1.3 · Data.Text.Internal.Fusion.SizeEq TextDefined in text-2.1.3 · Data.Text.Lazy · orphanEq SubHashPathDefined in unordered-containers-0.2.21 · Data.HashMap.Internal.DebugEq ()Defined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq (Chan a)Defined in base-4.22.0.0 · Control.Concurrent.ChanEq (MutableByteArray s)Defined in base-4.22.0.0 · Data.Array.ByteEq (TVar a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncEq (ConstPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.ConstPtrEq (ForeignPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ForeignPtrEq (IORef a)Defined in ghc-internal-9.1401.0 · GHC.Internal.IORefPointer equality.
Eq (MVar a)Defined in ghc-internal-9.1401.0 · GHC.Internal.MVarCompares the underlying pointers.
Eq (FunPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.PtrEq (Ptr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.PtrEq (StablePtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.StableEq (StableName a)Defined in ghc-internal-9.1401.0 · GHC.Internal.StableNameEq (SChar c)Defined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsEq (SSymbol s)Defined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsEq (SNat n)Defined in ghc-internal-9.1401.0 · GHC.Internal.TypeNatsEq (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJEq (TBQueue a)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TBQueueEq (TChan a)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TChanEq (TMVar a)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TMVarEq (TQueue a)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TQueueEq (TVar a)Defined in stm-2.5.3.1 · Control.Sequential.STMEq a => Eq (Complex a)Defined in base-4.22.0.0 · Data.ComplexEq a => Eq (First a)Defined in base-4.22.0.0 · Data.SemigroupEq a => Eq (Last a)Defined in base-4.22.0.0 · Data.SemigroupEq a => Eq (Max a)Defined in base-4.22.0.0 · Data.SemigroupEq a => Eq (Min a)Defined in base-4.22.0.0 · Data.SemigroupEq a => Eq (IntMap a)Defined in containers-0.8 · Data.IntMap.InternalEq a => Eq (Seq a)Defined in containers-0.8 · Data.Sequence.InternalEq a => Eq (ViewL a)Defined in containers-0.8 · Data.Sequence.InternalEq a => Eq (ViewR a)Defined in containers-0.8 · Data.Sequence.InternalEq a => Eq (Intersection a)Defined in containers-0.8 · Data.Set.InternalEq a => Eq (Set a)Defined in containers-0.8 · Data.Set.InternalEq a => Eq (PostOrder a)Defined in containers-0.8 · Data.TreeEq a => Eq (Tree a)Defined in containers-0.8 · Data.TreeEq a => Eq (NonEmpty a)Defined in ghc-internal-9.1401.0 · GHC.Internal.BaseEq a => Eq (And a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.BitsEq a => Eq (Iff a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.BitsEq a => Eq (Ior a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.BitsEq a => Eq (Xor a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.BitsEq a => Eq (Identity a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.IdentityEq a => Eq (First a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidEq a => Eq (Last a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidEq a => Eq (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdEq a => Eq (Dual a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalEq a => Eq (Product a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalEq a => Eq (Sum a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalEq a => Eq (ZipList a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Functor.ZipListEq a => Eq (Maybe a)Defined in ghc-internal-9.1401.0 · GHC.Internal.MaybeEq a => Eq (Ratio a)Defined in ghc-internal-9.1401.0 · GHC.Internal.RealEq a => Eq (Hashed a)Defined in hashable-1.5.1.0 · Data.Hashable.ClassUses precomputed hash to detect inequality faster
Eq a => Eq (AnnotDetails a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJEq a => Eq (Span a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJEq a => Eq (Stream a)Defined in text-2.1.3 · Data.Text.Internal.Fusion.TypesEq a => Eq (HashSet a)Defined in unordered-containers-0.2.21 · Data.HashSet.InternalNote that, in the presence of hash collisions, equal
HashSets may behave differently, i.e. extensionality may be violated:Example2 expressions data D = A | B deriving (Eq, Show)instance Hashable D where hashWithSalt salt _d = salt
Example2 expressions x = fromList [A, B]y = fromList [B, A]
Example3 expressions x == yTruetoList x[A,B]toList y[B,A]
In general, the lack of extensionality can be observed with any function that depends on the key ordering, such as folds and traversals.
Eq a => Eq (a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq a => Eq [a]Defined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq flag => Eq (TyVarBndr flag)Defined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxEq k => Eq (Error k)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal.DebugEq k => Eq (Validity k)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal.DebugEq m => Eq (WrappedMonoid m)Defined in base-4.22.0.0 · Data.SemigroupEq p => Eq (Par1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq vertex => Eq (SCC vertex)Defined in containers-0.8 · Data.GraphEq (IOUArray i e)Defined in array-0.5.8.0 · Data.Array.IO.InternalsEq (Fixed a)Defined in base-4.22.0.0 · Data.FixedEq (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyEq (TypeRep a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Typeable.InternalEq (U1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (V1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (IOArray i e)Defined in ghc-internal-9.1401.0 · GHC.Internal.IOArrayEq (STRef s a)Defined in ghc-internal-9.1401.0 · GHC.Internal.STRefPointer equality.
Eq a => Eq (Arg a b)Defined in base-4.22.0.0 · Data.Semigroup(Eq1 f, Eq a) => Eq (Lift f a)Defined in transformers-0.6.1.2 · Control.Applicative.Lift(Eq1 m, Eq a) => Eq (MaybeT m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Maybe(Eq a, Eq b) => Eq (Either a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Either(Eq a, Eq b) => Eq (a, b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq i, Eq e) => Eq (TArray i e)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TArray(Eq k, Eq a) => Eq (Map k a)Defined in containers-0.8 · Data.Map.Internal(Eq k, Eq v) => Eq (HashMap k v)Defined in unordered-containers-0.2.21 · Data.HashMap.InternalNote that, in the presence of hash collisions, equal
HashMaps may behave differently, i.e. extensionality may be violated:Example2 expressions data D = A | B deriving (Eq, Show)instance Hashable D where hashWithSalt salt _d = salt
Example2 expressions x = fromList [(A,1), (B,2)]y = fromList [(B,2), (A,1)]
Example3 expressions x == yTruetoList x[(A,1),(B,2)]toList y[(B,2),(A,1)]
In general, the lack of extensionality can be observed with any function that depends on the key ordering, such as folds and traversals.
(Eq k, Eq v) => Eq (Leaf k v)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal(Ix i, Eq e) => Eq (Array i e)Defined in ghc-internal-9.1401.0 · GHC.Internal.Arr(Ix ix, Eq e, IArray UArray e) => Eq (UArray ix e)Defined in array-0.5.8.0 · Data.Array.BaseEq (STUArray s i e)Defined in array-0.5.8.0 · Data.Array.BaseEq (STArray s i e)Defined in ghc-internal-9.1401.0 · GHC.Internal.ArrEq (Coercion a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.CoercionEq (OrderingI a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.OrdEq (URec Char p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (URec Double p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (URec Float p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (URec Int p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (URec Word p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (URec (Ptr ()) p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (a :~: b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.EqualityEq (f a) => Eq (Ap f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidEq (f a) => Eq (Alt f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalEq (f p) => Eq (Rec1 f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq a => Eq (Const a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.ConstEq a => Eq (Constant a b)Defined in transformers-0.6.1.2 · Data.Functor.Constant(Eq1 f, Eq a) => Eq (Backwards f a)Defined in transformers-0.6.1.2 · Control.Applicative.Backwards(Eq1 f, Eq a) => Eq (IdentityT f a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Identity(Eq1 f, Eq a) => Eq (Reverse f a)Defined in transformers-0.6.1.2 · Data.Functor.Reverse(Eq a, Eq b, Eq c) => Eq (a, b, c)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Except(Eq w, Eq1 m, Eq a) => Eq (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.Lazy(Eq w, Eq1 m, Eq a) => Eq (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.Strict(Generic1 f, Eq (Rep1 f a)) => Eq (Generically1 f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (a :~~: b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.EqualityEq c => Eq (K1 i c p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Eq (f a), Eq (g a)) => Eq (Product f g a)Defined in base-4.22.0.0 · Data.Functor.Product(Eq (f a), Eq (g a)) => Eq (Sum f g a)Defined in base-4.22.0.0 · Data.Functor.Sum(Eq (f p), Eq (g p)) => Eq ((:*:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Eq (f p), Eq (g p)) => Eq ((:+:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d)Defined in ghc-internal-9.1401.0 · GHC.Internal.ClassesEq (f (g a)) => Eq (Compose f g a)Defined in base-4.22.0.0 · Data.Functor.ComposeEq (f (g p)) => Eq ((:.:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsEq (f p) => Eq (M1 i c f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes
comparing p x y = compare (p x) (p y)Useful combinator for use in conjunction with the xxxBy family
of functions from Data.List, for example:
... sortBy (comparing fst) ...The Ord class is used for totally ordered datatypes.
Instances of Ord can be derived for any user-defined datatype whose constituent types are in Ord. The declared order of the constructors in the data declaration determines the ordering in derived Ord instances. The Ordering datatype allows a single comparison to determine the precise ordering of two objects.
Ord, as defined by the Haskell report, implements a total order and has the following properties:
- Comparability
x <= y || y <= x=
- Transitivity
if
x <= y && y <= z=
, then
x <= z=
- Reflexivity
x <= x=
- Antisymmetry
if
x <= y && y <= x=
, then
x == y=
The following operator interactions are expected to hold:
x >= y=y <= xx < y=x <= y && x /= yx > y=y < xx < y=compare x y == LTx > y=compare x y == GTx == y=compare x y == EQmin x y == if x <= y then x else y= Truemax x y == if x >= y then x else y= True
Note that (7.) and (8.) do not require min and max to return either of
their arguments. The result is merely required to equal one of the
arguments in terms of (==). Users who expect a stronger guarantee are advised
to write their own min and/or max functions.
The nuance of the above distinction is not always fully internalized by
developers, and in the past (tracing back to the Haskell 1.4 Report) the
specification for Ord asserted the stronger property that (min x y, max x
y) = (x, y) or (y, x), or in other words, that min and max will
return one of their arguments, using argument order as the tie-breaker if
the arguments are equal by comparison. A few list and
Foldable functions have behavior that is best understood
with this assumption in mind: all variations of minimumBy and maximumBy
(which can't use min and max in their implementations) are written such
that minimumBy compare and maximumBy compare are respectively
equivalent to minimum and maximum (which do use min and max) only if
min and max adhere to this tie-breaking convention. Otherwise, if there
are multiple least or largest elements in a container, minimum and
maximum may not return the same one that minimumBy compare and
maximumBy compare do (though they should return something that is
equal). (This is relevant for types with non-extensional equality, like
Arg, but also in cases where the precise reference held
matters for memory-management reasons.) Unless there is a reason to deviate,
it is less confusing for implementors of Ord to respect this same
convention (as the default definitions of min and max do).
Minimal complete definition: either compare or <=. Using compare can be more efficient for complex types.
Instances287Ord, …
Ord ByteArrayDefined in base-4.22.0.0 · Data.Array.ByteNon-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions.
Ord ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeOrd ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.InternalOrd ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.InternalLexicographic order.
Ord IntSetDefined in containers-0.8 · Data.IntSet.InternalOrd IntersectionDefined in containers-0.8 · Data.IntSet.InternalOrd VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.BaseOrd BigNatDefined in ghc-internal-9.1401.0 · GHC.Internal.Bignum.BigNatOrd IntegerDefined in ghc-internal-9.1401.0 · GHC.Internal.Bignum.IntegerOrd NaturalDefined in ghc-internal-9.1401.0 · GHC.Internal.Bignum.NaturalOrd ByteOrderDefined in ghc-internal-9.1401.0 · GHC.Internal.ByteOrderOrd ClosureTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.ClosureTypesOrd BlockReasonDefined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncOrd ThreadIdDefined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncOrd ThreadStatusDefined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncOrd AllDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalOrd AnyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalOrd SomeTypeRepDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Typeable.InternalOrd UniqueDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.UniqueOrd VersionDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.VersionOrd TimeoutKeyDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.TimeOutOrd UniqueDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.UniqueOrd ErrorCallDefined in ghc-internal-9.1401.0 · GHC.Internal.ExceptionOrd ArithExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.Exception.TypeOrd FingerprintDefined in ghc-internal-9.1401.0 · GHC.Internal.Fingerprint.TypeOrd CBoolDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CClockDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CDoubleDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CFloatDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CIntDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CIntMaxDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CIntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CLLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CPtrdiffDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CSCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CSUSecondsDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CShortDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CSigAtomicDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CSizeDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CTimeDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CUCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CUIntDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CUIntMaxDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CUIntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CULLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CULongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CUSecondsDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CUShortDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd CWcharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesOrd IntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.PtrOrd WordPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.PtrOrd AssociativityDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd PrimTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresOrd TsoFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresOrd WhatNextDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresOrd WhyBlockedDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresOrd HalfWordDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.InfoTable.TypesOrd CostCentreDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesOrd CostCentreStackDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesOrd IndexTableDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesOrd StgTSOProfInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesOrd SeekModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.DeviceOrd ArrayExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionOrd AsyncExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionOrd ExitCodeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionOrd BufferModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesOrd NewlineDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesOrd NewlineModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesOrd IOModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.IOModeOrd Int16Defined in ghc-internal-9.1401.0 · GHC.Internal.IntOrd Int32Defined in ghc-internal-9.1401.0 · GHC.Internal.IntOrd Int64Defined in ghc-internal-9.1401.0 · GHC.Internal.IntOrd Int8Defined in ghc-internal-9.1401.0 · GHC.Internal.IntOrd ExtensionDefined in ghc-internal-9.1401.0 · GHC.Internal.LanguageExtensionsOrd ByteOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsOrd WordOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsOrd ByteOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsProfOrd WordOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsProfOrd CBlkCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CBlkSizeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CCcDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CClockIdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CDevDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CFsBlkCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CFsFilCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CGidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CIdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CInoDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CKeyDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CModeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CNfdsDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CNlinkDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd COffDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CPidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CRLimDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CSocklenDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CSpeedDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CSsizeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CTcflagDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CTimerDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd CUidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesOrd AnnLookupDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd AnnTargetDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd BangDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd BndrVisDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd BodyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd BytesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd CallconvDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd ClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd ConDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd DecDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd DerivClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd DerivStrategyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd DocLocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd ExpDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd FamilyResultSigDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd FixityDirectionDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd ForeignDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd FunDepDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd GuardDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd InfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd InjectivityAnnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd InlineDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd LitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd LocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd MatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd ModNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd ModuleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd ModuleInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd NameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd NameFlavourDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd NameSpaceDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd NamespaceSpecifierDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd OccNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd OverlapDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd PatDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd PatSynArgsDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd PatSynDirDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd PhasesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd PkgNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd PragmaDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd RangeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd RoleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd RuleBndrDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd RuleMatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd SafetyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd SpecificityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd StmtDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd TyLitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd TySynEqnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd TypeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd TypeFamilyHeadDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd SomeCharDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsOrd SomeSymbolDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsOrd SomeNatDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeNatsOrd BoolDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd CharDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd DoubleDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesIEEE 754 Double-precision type includes not only numbers, but also positive and negative infinities and a special element called
NaN(which can be quiet or signal).IEEE 754-2008, section 5.11 requires that if at least one of arguments of <=, <, >, >= is
NaNthen the result of the comparison is False, andinstanceOrd Double complies with this requirement. This violates the reflexivity: bothNaN<=NaNandNaN>=NaNare False.IEEE 754-2008, section 5.10 defines
totalOrderpredicate. Unfortunately, compare on Doubles violates the IEEE standard and does not define a total order. More specifically, both compareNaNxand comparexNaNalways return GT.Thus, users must be extremely cautious when using
instanceOrd Double. For instance, one should avoid ordered containers with keys represented by Double, because data loss and corruption may happen. An IEEE-compliant compare is available infp-ieeepackage asTotallyOrderednewtype.Moving further, the behaviour of min and max with regards to
NaNis also non-compliant. IEEE 754-2008, section 5.3.1 defines that quietNaNshould be treated as a missing data byminNumandmaxNumfunctions, for example,minNum(NaN, 1) = minNum(1, NaN) = 1. Some languages such as Java deviate from the standard implementingminNum(NaN, 1) = minNum(1, NaN) = NaN. However, min / max inbaseare even worse: minNaN1 is 1, but min 1NaNisNaN.IEEE 754-2008 compliant min / max can be found in
ieee754package underminNum/maxNumnames. Implementations compliant withminimumNumber/maximumNumberfrom a newer IEEE 754-2019, section 9.6 are available fromfp-ieeepackage.Ord FloatDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd IntDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd TyConDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd WordDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd GeneralCategoryDefined in ghc-internal-9.1401.0 · GHC.Internal.UnicodeOrd Word16Defined in ghc-internal-9.1401.0 · GHC.Internal.WordOrd Word32Defined in ghc-internal-9.1401.0 · GHC.Internal.WordOrd Word64Defined in ghc-internal-9.1401.0 · GHC.Internal.WordOrd Word8Defined in ghc-internal-9.1401.0 · GHC.Internal.WordOrd OsCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesByte ordering of the internal representation.
Ord OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesByte ordering of the internal representation.
Ord PosixCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesOrd PosixStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesOrd WindowsCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesOrd WindowsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesOrd PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClassOrd PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClassOrd UndefinedDefined in relude-1.2.2.2 · Relude.DebugOrd I8Defined in text-2.1.3 · Data.Text.ForeignOrd TextDefined in text-2.1.3 · Data.Text · orphanOrd BuilderDefined in text-2.1.3 · Data.Text.Internal.BuilderOrd TextDefined in text-2.1.3 · Data.Text.Lazy · orphanOrd ()Defined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd (ConstPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.ConstPtrOrd (ForeignPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ForeignPtrOrd (FunPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.PtrOrd (Ptr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.PtrOrd (SChar c)Defined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsOrd (SSymbol s)Defined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsOrd (SNat n)Defined in ghc-internal-9.1401.0 · GHC.Internal.TypeNatsOrd a => Ord (First a)Defined in base-4.22.0.0 · Data.SemigroupOrd a => Ord (Last a)Defined in base-4.22.0.0 · Data.SemigroupOrd a => Ord (Max a)Defined in base-4.22.0.0 · Data.SemigroupOrd a => Ord (Min a)Defined in base-4.22.0.0 · Data.SemigroupOrd a => Ord (IntMap a)Defined in containers-0.8 · Data.IntMap.InternalOrd a => Ord (Seq a)Defined in containers-0.8 · Data.Sequence.InternalOrd a => Ord (ViewL a)Defined in containers-0.8 · Data.Sequence.InternalOrd a => Ord (ViewR a)Defined in containers-0.8 · Data.Sequence.InternalOrd a => Ord (Intersection a)Defined in containers-0.8 · Data.Set.InternalOrd a => Ord (Set a)Defined in containers-0.8 · Data.Set.InternalOrd a => Ord (PostOrder a)Defined in containers-0.8 · Data.TreeOrd a => Ord (Tree a)Defined in containers-0.8 · Data.TreeOrd a => Ord (NonEmpty a)Defined in ghc-internal-9.1401.0 · GHC.Internal.BaseOrd a => Ord (Identity a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.IdentityOrd a => Ord (First a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidOrd a => Ord (Last a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidOrd a => Ord (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdOrd a => Ord (Dual a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalOrd a => Ord (Product a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalOrd a => Ord (Sum a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalOrd a => Ord (ZipList a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Functor.ZipListOrd a => Ord (Maybe a)Defined in ghc-internal-9.1401.0 · GHC.Internal.MaybeOrd a => Ord (Hashed a)Defined in hashable-1.5.1.0 · Data.Hashable.ClassOrd a => Ord (Stream a)Defined in text-2.1.3 · Data.Text.Internal.Fusion.TypesOrd a => Ord (HashSet a)Defined in unordered-containers-0.2.21 · Data.HashSet.InternalOrd a => Ord (a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd a => Ord [a]Defined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd flag => Ord (TyVarBndr flag)Defined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxOrd m => Ord (WrappedMonoid m)Defined in base-4.22.0.0 · Data.SemigroupOrd p => Ord (Par1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsIntegral a => Ord (Ratio a)Defined in ghc-internal-9.1401.0 · GHC.Internal.RealOrd (Fixed a)Defined in base-4.22.0.0 · Data.FixedOrd (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyOrd (TypeRep a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Typeable.InternalOrd (U1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (V1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd a => Ord (Arg a b)Defined in base-4.22.0.0 · Data.Semigroup(Ord1 f, Ord a) => Ord (Lift f a)Defined in transformers-0.6.1.2 · Control.Applicative.Lift(Ord1 m, Ord a) => Ord (MaybeT m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Maybe(Ord a, Ord b) => Ord (Either a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Either(Ord a, Ord b) => Ord (a, b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord k, Ord v) => Ord (Map k v)Defined in containers-0.8 · Data.Map.Internal(Ord k, Ord v) => Ord (HashMap k v)Defined in unordered-containers-0.2.21 · Data.HashMap.InternalThe ordering is total and consistent with the Eq instance. However, nothing else about the ordering is specified, and it may change from version to version of either this package or of
hashable.(Ix i, Ord e) => Ord (Array i e)Defined in ghc-internal-9.1401.0 · GHC.Internal.Arr(Ix ix, Ord e, IArray UArray e) => Ord (UArray ix e)Defined in array-0.5.8.0 · Data.Array.BaseOrd (Coercion a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.CoercionOrd (URec Char p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (URec Double p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (URec Float p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (URec Int p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (URec Word p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (URec (Ptr ()) p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (a :~: b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.EqualityOrd (f a) => Ord (Ap f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidOrd (f a) => Ord (Alt f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalOrd (f p) => Ord (Rec1 f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd a => Ord (Const a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.ConstOrd a => Ord (Constant a b)Defined in transformers-0.6.1.2 · Data.Functor.Constant(Ord1 f, Ord a) => Ord (Backwards f a)Defined in transformers-0.6.1.2 · Control.Applicative.Backwards(Ord1 f, Ord a) => Ord (IdentityT f a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Identity(Ord1 f, Ord a) => Ord (Reverse f a)Defined in transformers-0.6.1.2 · Data.Functor.Reverse(Ord a, Ord b, Ord c) => Ord (a, b, c)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Except(Ord w, Ord1 m, Ord a) => Ord (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.Lazy(Ord w, Ord1 m, Ord a) => Ord (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.Strict(Generic1 f, Ord (Rep1 f a)) => Ord (Generically1 f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (a :~~: b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.EqualityOrd c => Ord (K1 i c p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Ord (f a), Ord (g a)) => Ord (Product f g a)Defined in base-4.22.0.0 · Data.Functor.Product(Ord (f a), Ord (g a)) => Ord (Sum f g a)Defined in base-4.22.0.0 · Data.Functor.Sum(Ord (f p), Ord (g p)) => Ord ((:*:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Ord (f p), Ord (g p)) => Ord ((:+:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d)Defined in ghc-internal-9.1401.0 · GHC.Internal.ClassesOrd (f (g a)) => Ord (Compose f g a)Defined in base-4.22.0.0 · Data.Functor.ComposeOrd (f (g p)) => Ord ((:.:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsOrd (f p) => Ord (M1 i c f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)Defined in ghc-internal-9.1401.0 · GHC.Internal.Classes
The Down type allows you to reverse sort order conveniently. A value of type
Down a contains a value of type a (represented as Down a).
If a has an Ord instance associated with it then comparing two
values thus wrapped will give you the opposite of their normal sort order.
This is particularly useful when sorting in generalised list comprehensions,
as in: then sortWith by Down x.
compare True FalseGT
compare (Down True) (Down False)LT
If a has a Bounded instance then the wrapped instance also respects
the reversed ordering by exchanging the values of minBound and
maxBound.
minBound :: Int-9223372036854775808
minBound :: Down IntDown 9223372036854775807
All other instances of Down a behave as they do for a.
Instances37Monad, Functor, MonadFix, Applicative, Foldable, Traversable, …
Monad DownDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdFunctor DownDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdMonadFix DownDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Monad.FixApplicative DownDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdFoldable DownDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.FoldableTraversable DownDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.TraversableMonadZip DownDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Monad.ZipFoldable1 DownDefined in base-4.22.0.0 · Data.Foldable1Eq1 DownDefined in base-4.22.0.0 · Data.Functor.ClassesOrd1 DownDefined in base-4.22.0.0 · Data.Functor.ClassesRead1 DownDefined in base-4.22.0.0 · Data.Functor.ClassesShow1 DownDefined in base-4.22.0.0 · Data.Functor.ClassesNFData1 DownDefined in deepseq-1.5.1.0 · Control.DeepSeqGeneric1 DownDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsBounded a => Bounded (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Ord(Enum a, Bounded a, Eq a) => Enum (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdEq a => Eq (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdFloating a => Floating (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdFractional a => Fractional (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdData a => Data (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataNum a => Num (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdOrd a => Ord (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdRead a => Read (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdReal a => Real (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdRealFloat a => RealFloat (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdRealFrac a => RealFrac (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdShow a => Show (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdIx a => Ix (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdGeneric (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsSemigroup a => Semigroup (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdMonoid a => Monoid (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdBits a => Bits (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdFiniteBits a => FiniteBits (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdStorable a => Storable (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdNFData a => NFData (Down a)Defined in deepseq-1.5.1.0 · Control.DeepSeqtype Rep (Down a) = D1 ('MetaDataDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics"Down"
"GHC.Internal.Data.Ord"
"ghc-internal"
'True) (C1 ('MetaCons"Down"
'PrefixI 'True) (S1 ('MetaSel ('Just"getDown"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))type Rep1 Down = D1 ('MetaDataDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics"Down"
"GHC.Internal.Data.Ord"
"ghc-internal"
'True) (C1 ('MetaCons"Down"
'PrefixI 'True) (S1 ('MetaSel ('Just"getDown"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
Instances17Bounded, Enum, Eq, Data, Ord, Read, …
Bounded OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.EnumEnum OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.EnumEq OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesData OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataOrd OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.ClassesRead OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.ReadShow OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowIx OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.IxGeneric OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsSemigroup OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.BaseMonoid OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.BaseNFData OrderingDefined in deepseq-1.5.1.0 · Control.DeepSeqPretty OrderingDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClassPretty OrderingDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClassBinary OrderingDefined in binary-0.8.9.3 · Data.Binary.ClassHashable OrderingDefined in hashable-1.5.1.0 · Data.Hashable.Classtype Rep Ordering = D1 ('MetaDataDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics"Ordering"
"GHC.Internal.Types"
"ghc-internal"
'False) (C1 ('MetaCons"LT"
'PrefixI 'False) U1 :+: (C1 ('MetaCons"EQ"
'PrefixI 'False) U1 :+: C1 ('MetaCons"GT"
'PrefixI 'False) U1))
System IO
3 declarationsFile and directory names are values of type String, whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.
See GHC.Internal.System.IO.openFile
Instances6Enum, Eq, Ord, Read, Show, Ix
Enum IOModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.IOModeEq IOModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.IOModeOrd IOModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.IOModeRead IOModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.IOModeShow IOModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.IOModeIx IOModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.IOMode
A value of type IO a is a computation which, when performed,
does some I/O before returning a value of type a.
There is really only one way to "perform" an I/O action: bind it to
Main.main in your program. When your program is run, the I/O will
be performed. It isn't possible to perform I/O from an arbitrary
function, unless that function is itself in the IO monad and called
at some point, directly or indirectly, from Main.main.
IO is a monad, so IO actions can be combined using either the do-notation
or the Prelude.>> and Prelude.>>= operations from the Prelude.Monad
class.
Instances39Monad, Functor, MonadFix, MonadFail, Applicative, GHCiSandboxIO, …
Monad IODefined in ghc-internal-9.1401.0 · GHC.Internal.BaseFunctor IODefined in ghc-internal-9.1401.0 · GHC.Internal.BaseMonadFix IODefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Monad.FixMonadFail IODefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Monad.FailApplicative IODefined in ghc-internal-9.1401.0 · GHC.Internal.BaseGHCiSandboxIO IODefined in ghc-internal-9.1401.0 · GHC.Internal.GHCiQuote IODefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxAlternative IODefined in ghc-internal-9.1401.0 · GHC.Internal.BaseMonadPlus IODefined in ghc-internal-9.1401.0 · GHC.Internal.BaseMonadIO IODefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Monad.IO.ClassQuasi IODefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxMonadCatch IODefined in exceptions-0.10.11 · Control.Monad.CatchMonadMask IODefined in exceptions-0.10.11 · Control.Monad.CatchMonadThrow IODefined in exceptions-0.10.11 · Control.Monad.CatchMonadError IOException IODefined in mtl-2.3.1 · Control.Monad.Error.ClassMArray IOUArray Int16 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Int32 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Int64 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Int8 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Bool IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Char IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Double IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Float IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Int IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Word IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Word16 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Word32 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Word64 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray Word8 IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOArray e IODefined in array-0.5.8.0 · Data.Array.BaseMArray TArray e IODefined in stm-2.5.3.1 · Control.Concurrent.STM.TArrayWrites are slow in IO.
Storable e => MArray StorableArray e IODefined in array-0.5.8.0 · Data.Array.Storable.InternalsMArray IOUArray (FunPtr a) IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray (Ptr a) IODefined in array-0.5.8.0 · Data.Array.IO.InternalsMArray IOUArray (StablePtr a) IODefined in array-0.5.8.0 · Data.Array.IO.InternalsSemigroup a => Semigroup (IO a)Defined in ghc-internal-9.1401.0 · GHC.Internal.BaseMonoid a => Monoid (IO a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Basea ~ () => HPrintfType (IO a)Defined in base-4.22.0.0 · Text.Printfa ~ () => PrintfType (IO a)Defined in base-4.22.0.0 · Text.Printf
Types for type-level computation
10 declarationsThe function coerce allows you to safely convert between values of
types that have the same representation with no run-time overhead. In the
simplest case you can use it instead of a newtype constructor, to go from
the newtype's concrete type to the abstract type. But it also works in
more complicated settings, e.g. converting a list of newtypes to a list of
concrete types.
When used in conversions involving a newtype wrapper, make sure the newtype constructor is in scope.
This function is representation-polymorphic, but the
RuntimeRep type argument is marked as Inferred, meaning
that it is not available for visible type application. This means
the typechecker will accept .coerce @Int @Age 42
Examples
newtype TTL = TTL Int deriving (Eq, Ord, Show)newtype Age = Age Int deriving (Eq, Ord, Show)coerce (Age 42) :: TTLTTL 42coerce (+ (1 :: Int)) (Age 42) :: TTLTTL 43coerce (map (+ (1 :: Int))) [Age 42, Age 24] :: [TTL][TTL 43,TTL 25]
Coercible is a two-parameter class that has instances for types a and b if
the compiler can infer that they have the same representation. This class
does not have regular instances; instead they are created on-the-fly during
type-checking. Trying to manually declare an instance of Coercible
is an error.
Nevertheless one can pretend that the following three kinds of instances exist. First, as a trivial base-case:
instance Coercible a aFurthermore, for every type constructor there is
an instance that allows to coerce under the type constructor. For
example, let D be a prototypical type constructor (data or
newtype) with three type arguments, which have roles nominal,
representational resp. phantom. Then there is an instance of
the form
instance Coercible b b' => Coercible (D a b c) (D a b' c')Note that the nominal type arguments are equal, the
representational type arguments can differ, but need to have a
Coercible instance themself, and the phantom type arguments can be
changed arbitrarily.
The third kind of instance exists for every newtype NT = MkNT T and
comes in two variants, namely
instance Coercible a T => Coercible a NTinstance Coercible T b => Coercible NT bThis instance is only usable if the constructor MkNT is in scope.
If, as a library author of a type constructor like Set a, you
want to prevent a user of your module to write
coerce :: Set T -> Set NT,
you need to set the role of Set's type parameter to nominal,
by writing
type role Set nominalFor more details about this feature, please refer to Safe Coercions by Joachim Breitner, Richard A. Eisenberg, Simon Peyton Jones and Stephanie Weirich.
The kind of lifted constraints
The kind of types with lifted values. For example Int :: Type.
Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).
Historically, Proxy :: Proxy a is a safer alternative to the
undefined :: a idiom.
Proxy :: Proxy (Void, Int -> Int)Proxy
Proxy can even hold types of higher kinds,
Proxy :: Proxy EitherProxy
Proxy :: Proxy FunctorProxy
Proxy :: Proxy complicatedStructureProxy
Instances31Generic1, Monad, Functor, Applicative, Foldable, Traversable, …
Generic1 ProxyDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsMonad ProxyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyFunctor ProxyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyApplicative ProxyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyFoldable ProxyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.FoldableTraversable ProxyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.TraversableAlternative ProxyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyMonadPlus ProxyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyMonadZip ProxyDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Monad.ZipEq1 ProxyDefined in base-4.22.0.0 · Data.Functor.ClassesOrd1 ProxyDefined in base-4.22.0.0 · Data.Functor.ClassesRead1 ProxyDefined in base-4.22.0.0 · Data.Functor.ClassesShow1 ProxyDefined in base-4.22.0.0 · Data.Functor.ClassesContravariant ProxyDefined in base-4.22.0.0 · Data.Functor.ContravariantNFData1 ProxyDefined in deepseq-1.5.1.0 · Control.DeepSeqHashable1 ProxyDefined in hashable-1.5.1.0 · Data.Hashable.ClassBounded (Proxy t)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyEnum (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyEq (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyData t => Data (Proxy t)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataOrd (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyRead (Proxy t)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyShow (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyIx (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyGeneric (Proxy t)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsSemigroup (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyMonoid (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyNFData (Proxy a)Defined in deepseq-1.5.1.0 · Control.DeepSeqHashable (Proxy a)Defined in hashable-1.5.1.0 · Data.Hashable.Classtype Rep (Proxy t) = D1 ('MetaDataDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics"Proxy"
"GHC.Internal.Data.Proxy"
"ghc-internal"
'False) (C1 ('MetaCons"Proxy"
'PrefixI 'False) U1)type Rep1 Proxy = D1 ('MetaDataDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics"Proxy"
"GHC.Internal.Data.Proxy"
"ghc-internal"
'False) (C1 ('MetaCons"Proxy"
'PrefixI 'False) U1)
Lifted, homogeneous equality. By lifted, we mean that it
can be bogus (deferred type error). By homogeneous, the two
types a and b must have the same kinds.
The class Typeable allows a concrete representation of a type to be calculated.
Since Void values logically don't exist, this witnesses the logical reasoning tool of "ex falso quodlibet".
let x :: Either Void Int; x = Right 5:{case x of Right r -> r Left l -> absurd l:}5
Uninhabited data type
Instances14Eq, Data, Ord, Read, Show, Ix, …
Eq VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.BaseData VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataOrd VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.BaseRead VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.ReadShow VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowIx VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.IxGeneric VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsSemigroup VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.BaseException VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.Exception.TypeNFData VoidDefined in deepseq-1.5.1.0 · Control.DeepSeqBinary VoidDefined in binary-0.8.9.3 · Data.Binary.ClassHashable VoidDefined in hashable-1.5.1.0 · Data.Hashable.ClassLift VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.Lifttype Rep Void = D1 ('MetaDataDefined in ghc-internal-9.1401.0 · GHC.Internal.Generics"Void"
"GHC.Internal.Base"
"ghc-internal"
'False) V1
Basic type classes
6 declarationsStrict (call-by-value) application operator. It takes a function and an argument, evaluates the argument to weak head normal form (WHNF), then calls the function with that value.
The Prelude.fromEnum method restricted to the type Char.
The value of is bottom if seq a ba is bottom, and
otherwise equal to b. In other words, it evaluates the first
argument a to weak head normal form (WHNF). seq is usually
introduced to improve performance by avoiding unneeded laziness.
A note on evaluation order: the expression does
not guarantee that seq a ba will be evaluated before b.
The only guarantee given by seq is that the both a
and b will be evaluated before seq returns a value.
In particular, this means that b may be evaluated before
a. If you need to guarantee a specific order of evaluation,
you must use the function pseq from the "parallel" package.
Instances224Generic, …
Generic CCFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric ConcFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric DebugFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric DoCostCentresDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric DoHeapProfileDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric DoTraceDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric GCFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric GiveGCStatsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric HpcFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric MiscFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric ParFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric ProfFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric RTSFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric TickyFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric TraceFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsGeneric GCDetailsDefined in base-4.22.0.0 · GHC.StatsGeneric RTSStatsDefined in base-4.22.0.0 · GHC.StatsGeneric ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.InternalGeneric VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric ByteOrderDefined in ghc-internal-9.1401.0 · GHC.Internal.ByteOrderGeneric ClosureTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.ClosureTypesGeneric AllDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalGeneric AnyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalGeneric VersionDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.VersionGeneric FingerprintDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric ForeignSrcLangDefined in ghc-internal-9.1401.0 · GHC.Internal.ForeignSrcLangGeneric AssociativityDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric PrimTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresGeneric TsoFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresGeneric WhatNextDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresGeneric WhyBlockedDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresGeneric StgInfoTableDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.InfoTable.TypesGeneric CostCentreDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesGeneric CostCentreStackDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesGeneric IndexTableDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesGeneric StgTSOProfInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesGeneric ExitCodeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionGeneric ExtensionDefined in ghc-internal-9.1401.0 · GHC.Internal.LanguageExtensionsGeneric CCFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric ConcFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric DebugFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric DoCostCentresDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric DoHeapProfileDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric DoTraceDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric GCFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric GiveGCStatsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric HpcFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric MiscFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric ParFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric ProfFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric RTSFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric TickyFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric TraceFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsGeneric SrcLocDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric GCDetailsDefined in ghc-internal-9.1401.0 · GHC.Internal.StatsGeneric RTSStatsDefined in ghc-internal-9.1401.0 · GHC.Internal.StatsGeneric AnnLookupDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric AnnTargetDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric BangDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric BndrVisDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric BodyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric BytesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric CallconvDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric ClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric ConDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric DecDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric DerivClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric DerivStrategyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric DocLocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric ExpDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric FamilyResultSigDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric FixityDirectionDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric ForeignDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric FunDepDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric GuardDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric InfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric InjectivityAnnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric InlineDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric LitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric LocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric MatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric ModNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric ModuleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric ModuleInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric NameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric NameFlavourDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric NameSpaceDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric NamespaceSpecifierDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric OccNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric OverlapDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric PatDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric PatSynArgsDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric PatSynDirDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric PhasesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric PkgNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric PragmaDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric RangeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric RoleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric RuleBndrDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric RuleMatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric SafetyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric SpecificityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric StmtDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric TyLitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric TySynEqnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric TypeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric TypeFamilyHeadDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric BoolDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric GeneralCategoryDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric OsCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesGeneric OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesGeneric PosixCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesGeneric PosixStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesGeneric WindowsCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesGeneric WindowsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesGeneric ModeDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJGeneric StyleDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJGeneric TextDetailsDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJGeneric DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJGeneric UndefinedDefined in relude-1.2.2.2 · Relude.DebugGeneric ()Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (Complex a)Defined in base-4.22.0.0 · Data.ComplexGeneric (First a)Defined in base-4.22.0.0 · Data.SemigroupGeneric (Last a)Defined in base-4.22.0.0 · Data.SemigroupGeneric (Max a)Defined in base-4.22.0.0 · Data.SemigroupGeneric (Min a)Defined in base-4.22.0.0 · Data.SemigroupGeneric (WrappedMonoid m)Defined in base-4.22.0.0 · Data.SemigroupGeneric (SCC vertex)Defined in containers-0.8 · Data.GraphGeneric (Digit a)Defined in containers-0.8 · Data.Sequence.InternalGeneric (Elem a)Defined in containers-0.8 · Data.Sequence.InternalGeneric (FingerTree a)Defined in containers-0.8 · Data.Sequence.InternalGeneric (Node a)Defined in containers-0.8 · Data.Sequence.InternalGeneric (ViewL a)Defined in containers-0.8 · Data.Sequence.InternalGeneric (ViewR a)Defined in containers-0.8 · Data.Sequence.InternalGeneric (PostOrder a)Defined in containers-0.8 · Data.TreeGeneric (Tree a)Defined in containers-0.8 · Data.TreeGeneric (NonEmpty a)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (Identity a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.IdentityGeneric (First a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidGeneric (Last a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidGeneric (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (Dual a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalGeneric (Endo a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalGeneric (Product a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalGeneric (Sum a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalGeneric (ZipList a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Functor.ZipListGeneric (Par1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (GenClosure b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresGeneric (GenStackField b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresGeneric (GenStackFrame b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresGeneric (GenStgStackClosure b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresGeneric (Maybe a)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (TyVarBndr flag)Defined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxGeneric (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJGeneric (a)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric [a]Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (WrappedMonad m a)Defined in base-4.22.0.0 · Control.ApplicativeGeneric (Arg a b)Defined in base-4.22.0.0 · Data.SemigroupGeneric (Either a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (Proxy t)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (U1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (V1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (Lift f a)Defined in transformers-0.6.1.2 · Control.Applicative.LiftGeneric (MaybeT m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.MaybeGeneric (a, b)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (WrappedArrow a b c)Defined in base-4.22.0.0 · Control.ApplicativeGeneric (Kleisli m a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Control.ArrowGeneric (Const a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.ConstGeneric (Ap f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidGeneric (Alt f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalGeneric (Rec1 f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (URec Char p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (URec Double p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (URec Float p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (URec Int p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (URec Word p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (URec (Ptr ()) p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (Backwards f a)Defined in transformers-0.6.1.2 · Control.Applicative.BackwardsGeneric (AccumT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.AccumGeneric (ExceptT e m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.ExceptGeneric (IdentityT f a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.IdentityGeneric (ReaderT r m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.ReaderGeneric (SelectT r m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.SelectGeneric (StateT s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.State.LazyGeneric (StateT s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.State.StrictGeneric (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.CPSGeneric (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.LazyGeneric (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.StrictGeneric (Constant a b)Defined in transformers-0.6.1.2 · Data.Functor.ConstantGeneric (Reverse f a)Defined in transformers-0.6.1.2 · Data.Functor.ReverseGeneric (a, b, c)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (Product f g a)Defined in base-4.22.0.0 · Data.Functor.ProductGeneric (Sum f g a)Defined in base-4.22.0.0 · Data.Functor.SumGeneric (K1 i c p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (ContT r m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.ContGeneric ((:*:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric ((:+:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (Compose f g a)Defined in base-4.22.0.0 · Data.Functor.ComposeGeneric (M1 i c f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (RWST r w s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.RWS.CPSGeneric (RWST r w s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.RWS.LazyGeneric (RWST r w s m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.RWS.StrictGeneric ((:.:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f, g)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f, g, h)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f, g, h, i)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f, g, h, i, j)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f, g, h, i, j, k)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f, g, h, i, j, k, l)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f, g, h, i, j, k, l, m)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f, g, h, i, j, k, l, m, n)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsGeneric (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics
Conversion of values to readable Strings.
Derived instances of Show have the following properties, which
are compatible with derived instances of Text.Read.Read:
The result of show is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.
If the constructor is defined to be an infix operator, then showsPrec will produce infix applications of the constructor.
the representation will be enclosed in parentheses if the precedence of the top-level constructor in
xis less thand(associativity is ignored). Thus, ifdis0then the result is never surrounded in parentheses; ifdis11it is always surrounded in parentheses, unless it is an atomic expression.If the constructor is defined using record syntax, then show will produce the record-syntax form, with the fields given in the same order as the original declaration.
For example, given the declarations
infixr 5 :^:
data Tree a = Leaf a | Tree a :^: Tree athe derived instance of Show is equivalent to
instance (Show a) => Show (Tree a) where
showsPrec d (Leaf m) = showParen (d > app_prec) $
showString "Leaf " . showsPrec (app_prec+1) m
where app_prec = 10
showsPrec d (u :^: v) = showParen (d > up_prec) $
showsPrec (up_prec+1) u .
showString " :^: " .
showsPrec (up_prec+1) v
where up_prec = 5Note that right-associativity of :^: is ignored. For example,
show (Leaf 1 :^: Leaf 2 :^: Leaf 3)produces the string"Leaf 1 :^: (Leaf 2 :^: Leaf 3)".
Instances436Show, …
Show ByteArrayDefined in base-4.22.0.0 · Data.Array.ByteShow CCFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow ConcFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow DebugFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow DoCostCentresDefined in base-4.22.0.0 · GHC.RTS.FlagsShow DoHeapProfileDefined in base-4.22.0.0 · GHC.RTS.FlagsShow DoTraceDefined in base-4.22.0.0 · GHC.RTS.FlagsShow GCFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow GiveGCStatsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow HpcFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow IoManagerFlagDefined in base-4.22.0.0 · GHC.RTS.FlagsShow MiscFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow ParFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow ProfFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow RTSFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow TickyFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow TraceFlagsDefined in base-4.22.0.0 · GHC.RTS.FlagsShow GCDetailsDefined in base-4.22.0.0 · GHC.StatsShow RTSStatsDefined in base-4.22.0.0 · GHC.StatsShow TimeoutDefined in base-4.22.0.0 · System.TimeoutShow BuilderDefined in bytestring-0.12.2.0 · Data.ByteString.Builder · orphanShow FormatModeDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloatShow FloatingDecimalDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.D2SShow FloatingDecimalDefined in bytestring-0.12.2.0 · Data.ByteString.Builder.RealFloat.F2SShow ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeShow SizeOverflowExceptionDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeShow ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Lazy.InternalShow ShortByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Short.InternalShow IntSetDefined in containers-0.8 · Data.IntSet.InternalShow IntersectionDefined in containers-0.8 · Data.IntSet.InternalShow BitQueueDefined in containers-0.8 · Utils.Containers.Internal.BitQueueShow BitQueueBDefined in containers-0.8 · Utils.Containers.Internal.BitQueueShow ForallVisFlagDefined in ghc-boot-th-9.14.1 · GHC.Boot.TH.PprShow DocDefined in ghc-boot-th-9.14.1 · GHC.Boot.TH.PprLibShow VoidDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow IntegerDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow NaturalDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow ByteOrderDefined in ghc-internal-9.1401.0 · GHC.Internal.ByteOrderShow ClosureTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.ClosureTypesShow BlockReasonDefined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncShow ThreadIdDefined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncShow ThreadStatusDefined in ghc-internal-9.1401.0 · GHC.Internal.Conc.SyncShow NestedAtomicallyDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Exception.BaseShow NoMatchingContinuationPromptDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Exception.BaseShow NoMethodErrorDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Exception.BaseShow NonTerminationDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Exception.BaseShow PatternMatchFailDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Exception.BaseShow RecConErrorDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Exception.BaseShow RecSelErrorDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Exception.BaseShow RecUpdErrorDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Exception.BaseShow TypeErrorDefined in ghc-internal-9.1401.0 · GHC.Internal.Control.Exception.BaseShow ConstrDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataShow ConstrRepDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataShow DataRepDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataShow DataTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataShow FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DataShow DynamicDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.DynamicShow AllDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalShow AnyDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalShow SomeTypeRepDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.Typeable.InternalShow VersionDefined in ghc-internal-9.1401.0 · GHC.Internal.Data.VersionShow ControlMessageDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.ControlShow EPollFdDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.EPollShow EventDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.EPollShow EventTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.EPollShow EventDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.Internal.TypesShow EventLifetimeDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.Internal.TypesShow LifetimeDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.Internal.TypesShow TimeoutDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.Internal.TypesShow FdKeyDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.ManagerShow StateDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.ManagerShow EventDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.PollShow PollFdDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.PollShow StateDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.TimerManagerShow UniqueDefined in ghc-internal-9.1401.0 · GHC.Internal.Event.UniqueShow ErrorCallDefined in ghc-internal-9.1401.0 · GHC.Internal.ExceptionShow ArithExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.Exception.TypeShow SomeExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.Exception.TypeShow WhileHandlingDefined in ghc-internal-9.1401.0 · GHC.Internal.Exception.TypeShow FingerprintDefined in ghc-internal-9.1401.0 · GHC.Internal.Fingerprint.TypeShow CBoolDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CClockDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CDoubleDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CFloatDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CIntDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CIntMaxDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CIntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CLLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CPtrdiffDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CSCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CSUSecondsDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CShortDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CSigAtomicDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CSizeDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CTimeDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CUCharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CUIntDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CUIntMaxDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CUIntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CULLongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CULongDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CUSecondsDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CUShortDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow CWcharDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.TypesShow IntPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.PtrShow WordPtrDefined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.PtrShow ForeignSrcLangDefined in ghc-internal-9.1401.0 · GHC.Internal.ForeignSrcLangShow AssociativityDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow BoxDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresShow PrimTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresShow TsoFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresShow WhatNextDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresShow WhyBlockedDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresShow HalfWordDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.InfoTable.TypesShow StgInfoTableDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.InfoTable.TypesShow CostCentreDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesShow CostCentreStackDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesShow IndexTableDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesShow StgTSOProfInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ProfInfo.TypesShow MaskingStateDefined in ghc-internal-9.1401.0 · GHC.Internal.IOShow SeekModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.DeviceShow CodingFailureModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Encoding.FailureShow CodingProgressDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Encoding.TypesShow TextEncodingDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Encoding.TypesShow AllocationLimitExceededDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow ArrayExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow AssertionFailedDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow AsyncExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow BlockedIndefinitelyOnMVarDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow BlockedIndefinitelyOnSTMDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow CompactionFailedDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow DeadlockDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow ExitCodeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow FixIOExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow IOErrorTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow IOExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow SomeAsyncExceptionDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.ExceptionShow FDDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.FDShow HandlePosnDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.HandleShow FileLockingNotSupportedDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.Lock.CommonShow BufferModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesShow HandleDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesShow HandleTypeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesShow NewlineDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesShow NewlineModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.Handle.TypesShow IOModeDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.IOModeShow IoSubSystemDefined in ghc-internal-9.1401.0 · GHC.Internal.IO.SubSystemShow InfoProvDefined in ghc-internal-9.1401.0 · GHC.Internal.InfoProv.TypesShow Int16Defined in ghc-internal-9.1401.0 · GHC.Internal.IntShow Int32Defined in ghc-internal-9.1401.0 · GHC.Internal.IntShow Int64Defined in ghc-internal-9.1401.0 · GHC.Internal.IntShow Int8Defined in ghc-internal-9.1401.0 · GHC.Internal.IntShow ExtensionDefined in ghc-internal-9.1401.0 · GHC.Internal.LanguageExtensionsShow CCFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow ConcFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow DebugFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow DoCostCentresDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow DoHeapProfileDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow DoTraceDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow GCFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow GiveGCStatsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow HpcFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow IoManagerFlagDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow MiscFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow ParFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow ProfFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow RTSFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow TickyFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow TraceFlagsDefined in ghc-internal-9.1401.0 · GHC.Internal.RTS.FlagsShow FractionalExponentBaseDefined in ghc-internal-9.1401.0 · GHC.Internal.RealShow ByteOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsShow WordOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsShow ByteOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsProfShow WordOffsetDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.ConstantsProfShow PointernessDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.DecodeShow StackEntryDefined in ghc-internal-9.1401.0 · GHC.Internal.Stack.DecodeShow CallStackDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow SrcLocDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow StaticPtrInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.StaticPtrShow GCDetailsDefined in ghc-internal-9.1401.0 · GHC.Internal.StatsShow RTSStatsDefined in ghc-internal-9.1401.0 · GHC.Internal.StatsShow CBlkCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CBlkSizeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CCcDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CClockIdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CDevDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CFsBlkCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CFsFilCntDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CGidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CIdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CInoDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CKeyDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CModeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CNfdsDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CNlinkDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow COffDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CPidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CRLimDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CSocklenDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CSpeedDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CSsizeDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CTcflagDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CTimerDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow CUidDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow FdDefined in ghc-internal-9.1401.0 · GHC.Internal.System.Posix.TypesShow AnnLookupDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow AnnTargetDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow BangDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow BndrVisDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow BodyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow BytesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow CallconvDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow ClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow ConDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow DecDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow DecidedStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow DerivClauseDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow DerivStrategyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow DocLocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow ExpDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow FamilyResultSigDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow FixityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow FixityDirectionDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow ForeignDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow FunDepDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow GuardDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow InfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow InjectivityAnnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow InlineDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow LitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow LocDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow MatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow ModNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow ModuleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow ModuleInfoDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow NameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow NameFlavourDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow NameSpaceDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow NamespaceSpecifierDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow OccNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow OverlapDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow PatDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow PatSynArgsDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow PatSynDirDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow PhasesDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow PkgNameDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow PragmaDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow RangeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow RoleDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow RuleBndrDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow RuleMatchDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow SafetyDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow SourceStrictnessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow SourceUnpackednessDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow SpecificityDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow StmtDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow TyLitDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow TySynEqnDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow TypeDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow TypeFamilyHeadDefined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow LexemeDefined in ghc-internal-9.1401.0 · GHC.Internal.Text.Read.LexShow NumberDefined in ghc-internal-9.1401.0 · GHC.Internal.Text.Read.LexShow SomeCharDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsShow SomeSymbolDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsShow SomeNatDefined in ghc-internal-9.1401.0 · GHC.Internal.TypeNatsShow BoolDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow CharDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow DoubleDefined in ghc-internal-9.1401.0 · GHC.Internal.Float · orphanShow FloatDefined in ghc-internal-9.1401.0 · GHC.Internal.Float · orphanShow IntDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow KindRepDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow LevityDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow ModuleDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow OrderingDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow RuntimeRepDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow TrNameDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow TyConDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow TypeLitSortDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow VecCountDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow VecElemDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow WordDefined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow GeneralCategoryDefined in ghc-internal-9.1401.0 · GHC.Internal.UnicodeShow Word16Defined in ghc-internal-9.1401.0 · GHC.Internal.WordShow Word32Defined in ghc-internal-9.1401.0 · GHC.Internal.WordShow Word64Defined in ghc-internal-9.1401.0 · GHC.Internal.WordShow Word8Defined in ghc-internal-9.1401.0 · GHC.Internal.WordShow EncodingExceptionDefined in os-string-2.0.8 · System.OsString.Encoding.InternalShow OsCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesShow OsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesOn windows, decodes as UCS-2. On unix prints the raw bytes without decoding.
Show PosixCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesShow PosixStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesPrints the raw bytes without decoding.
Show WindowsCharDefined in os-string-2.0.8 · System.OsString.Internal.TypesShow WindowsStringDefined in os-string-2.0.8 · System.OsString.Internal.TypesDecodes as UCS-2.
Show ModeDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJShow StyleDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJShow TextDetailsDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJShow PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClassShow DocDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJShow PrettyLevelDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClassShow UndefinedDefined in relude-1.2.2.2 · Relude.DebugShow BugDefined in relude-1.2.2.2 · Relude.ExceptionShow DecodingDefined in text-2.1.3 · Data.Text.EncodingShow UnicodeExceptionDefined in text-2.1.3 · Data.Text.Encoding.ErrorShow I8Defined in text-2.1.3 · Data.Text.ForeignShow TextDefined in text-2.1.3 · Data.Text.Show · orphanShow BuilderDefined in text-2.1.3 · Data.Text.Internal.BuilderShow PartialUtf8CodePointDefined in text-2.1.3 · Data.Text.Internal.EncodingShow Utf8StateDefined in text-2.1.3 · Data.Text.Internal.EncodingShow DecoderStateDefined in text-2.1.3 · Data.Text.Internal.Encoding.Utf8Show SizeDefined in text-2.1.3 · Data.Text.Internal.Fusion.SizeShow TextDefined in text-2.1.3 · Data.Text.Lazy · orphanShow FPFormatDefined in text-2.1.3 · Data.Text.Lazy.Builder.RealFloatShow IterDefined in text-2.1.3 · Data.Text.UnsafeShow SubHashPathDefined in unordered-containers-0.2.21 · Data.HashMap.Internal.DebugShow ()Defined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow (ConstPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Foreign.C.ConstPtrShow (ForeignPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ForeignPtrShow (FunPtr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.PtrShow (Ptr a)Defined in ghc-internal-9.1401.0 · GHC.Internal.PtrShow (SChar c)Defined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsShow (SSymbol s)Defined in ghc-internal-9.1401.0 · GHC.Internal.TypeLitsShow (SNat n)Defined in ghc-internal-9.1401.0 · GHC.Internal.TypeNatsShow (Doc a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJShow a => Show (Complex a)Defined in base-4.22.0.0 · Data.ComplexShow a => Show (First a)Defined in base-4.22.0.0 · Data.SemigroupShow a => Show (Last a)Defined in base-4.22.0.0 · Data.SemigroupShow a => Show (Max a)Defined in base-4.22.0.0 · Data.SemigroupShow a => Show (Min a)Defined in base-4.22.0.0 · Data.SemigroupShow a => Show (Decoder a)Defined in binary-0.8.9.3 · Data.Binary.Get.InternalShow a => Show (IntMap a)Defined in containers-0.8 · Data.IntMap.InternalShow a => Show (Seq a)Defined in containers-0.8 · Data.Sequence.InternalShow a => Show (ViewL a)Defined in containers-0.8 · Data.Sequence.InternalShow a => Show (ViewR a)Defined in containers-0.8 · Data.Sequence.InternalShow a => Show (Intersection a)Defined in containers-0.8 · Data.Set.InternalShow a => Show (Set a)Defined in containers-0.8 · Data.Set.InternalShow a => Show (PostOrder a)Defined in containers-0.8 · Data.TreeShow a => Show (Tree a)Defined in containers-0.8 · Data.TreeShow a => Show (ExitCase a)Defined in exceptions-0.10.11 · Control.Monad.CatchShow a => Show (NonEmpty a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow a => Show (And a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.BitsShow a => Show (Iff a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.BitsShow a => Show (Ior a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.BitsShow a => Show (Xor a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.BitsShow a => Show (Identity a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.IdentityThis instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed
Show a => Show (First a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidShow a => Show (Last a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidShow a => Show (Down a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.OrdShow a => Show (Dual a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalShow a => Show (Product a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalShow a => Show (Sum a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalShow a => Show (ExceptionWithContext a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Exception.TypeShow a => Show (ZipList a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Functor.ZipListShow a => Show (Maybe a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow a => Show (Ratio a)Defined in ghc-internal-9.1401.0 · GHC.Internal.RealShow a => Show (Hashed a)Defined in hashable-1.5.1.0 · Data.Hashable.ClassShow a => Show (AnnotDetails a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJShow a => Show (Span a)Defined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJShow a => Show (Array a)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal.ArrayShow a => Show (HashSet a)Defined in unordered-containers-0.2.21 · Data.HashSet.InternalShow a => Show (a)Defined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow a => Show [a]Defined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow b => Show (GenClosure b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresShow b => Show (GenStackField b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresShow b => Show (GenStackFrame b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresShow b => Show (GenStgStackClosure b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Heap.ClosuresShow e => Show (NoBacktrace e)Defined in ghc-internal-9.1401.0 · GHC.Internal.Exception.TypeShow flag => Show (TyVarBndr flag)Defined in ghc-internal-9.1401.0 · GHC.Internal.TH.SyntaxShow k => Show (Error k)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal.DebugShow k => Show (Validity k)Defined in unordered-containers-0.2.21 · Data.HashMap.Internal.DebugShow m => Show (WrappedMonoid m)Defined in base-4.22.0.0 · Data.SemigroupShow p => Show (Par1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow vertex => Show (SCC vertex)Defined in containers-0.8 · Data.GraphHasResolution a => Show (Fixed a)Defined in base-4.22.0.0 · Data.FixedShow (Proxy s)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.ProxyShow (TypeRep a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Typeable.InternalShow (U1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (UAddr p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (V1 p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (ST s a)Defined in ghc-internal-9.1401.0 · GHC.Internal.STShow (a -> b)Defined in base-4.22.0.0 · Text.Show.Functions · orphan(Show1 f, Show a) => Show (Lift f a)Defined in transformers-0.6.1.2 · Control.Applicative.Lift(Show1 m, Show a) => Show (MaybeT m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Maybe(Ix a, Show a, Show b) => Show (Array a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Arr(Ix ix, Show ix, Show e, IArray UArray e) => Show (UArray ix e)Defined in array-0.5.8.0 · Data.Array.Base(Show a, Show b) => Show (Arg a b)Defined in base-4.22.0.0 · Data.Semigroup(Show a, Show b) => Show (Either a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Either(Show a, Show b) => Show (a, b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show k, Show a) => Show (Map k a)Defined in containers-0.8 · Data.Map.Internal(Show k, Show v) => Show (HashMap k v)Defined in unordered-containers-0.2.21 · Data.HashMap.InternalShow (Coercion a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.CoercionShow (OrderingI a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.OrdShow (URec Char p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (URec Double p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (URec Float p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (URec Int p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (URec Word p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (a :~: b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.EqualityShow (f a) => Show (Ap f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.MonoidShow (f a) => Show (Alt f a)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Semigroup.InternalShow (f p) => Show (Rec1 f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow a => Show (Const a b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Functor.ConstShow a => Show (Constant a b)Defined in transformers-0.6.1.2 · Data.Functor.Constant(Show1 f, Show a) => Show (Backwards f a)Defined in transformers-0.6.1.2 · Control.Applicative.Backwards(Show1 f, Show a) => Show (IdentityT f a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Identity(Show1 f, Show a) => Show (Reverse f a)Defined in transformers-0.6.1.2 · Data.Functor.Reverse(Show a, Show b, Show c) => Show (a, b, c)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show e, Show1 m, Show a) => Show (ExceptT e m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Except(Show w, Show1 m, Show a) => Show (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.Lazy(Show w, Show1 m, Show a) => Show (WriterT w m a)Defined in transformers-0.6.1.2 · Control.Monad.Trans.Writer.StrictShow (a :~~: b)Defined in ghc-internal-9.1401.0 · GHC.Internal.Data.Type.EqualityShow c => Show (K1 i c p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Show (f a), Show (g a)) => Show (Product f g a)Defined in base-4.22.0.0 · Data.Functor.Product(Show (f a), Show (g a)) => Show (Sum f g a)Defined in base-4.22.0.0 · Data.Functor.Sum(Show (f p), Show (g p)) => Show ((:*:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Show (f p), Show (g p)) => Show ((:+:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Show a, Show b, Show c, Show d) => Show (a, b, c, d)Defined in ghc-internal-9.1401.0 · GHC.Internal.ShowShow (f (g a)) => Show (Compose f g a)Defined in base-4.22.0.0 · Data.Functor.ComposeShow (f (g p)) => Show ((:.:) f g p)Defined in ghc-internal-9.1401.0 · GHC.Internal.GenericsShow (f p) => Show (M1 i c f p)Defined in ghc-internal-9.1401.0 · GHC.Internal.Generics(Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show (a, b, c, d, e, f, g, h)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show (a, b, c, d, e, f, g, h, i)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => Show (a, b, c, d, e, f, g, h, i, j)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => Show (a, b, c, d, e, f, g, h, i, j, k)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => Show (a, b, c, d, e, f, g, h, i, j, k, l)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)Defined in ghc-internal-9.1401.0 · GHC.Internal.Show
GHC-specific functionality
17 declarationsConvert an integer into an unknown type-level natural.
This class gives the integer associated with a type-level natural. There are instances of the class for every concrete literal: 0, 1, 2, etc.
A type synonym for Natural.
Previously, this was an opaque data type, but it was changed to a type synonym.
Instances1HasResolution
KnownNat n => HasResolution nDefined in base-4.22.0.0 · Data.FixedFor example,
Fixed 1000will give you a Fixed with a resolution of 1000.
This type represents unknown type-level natural numbers.
Comparison of type-level naturals, as a function.
Methods
fromLabel :: a
Get a trace of the current execution stack state.
Returns Nothing if stack trace support isn't available on host machine.
Get a string representation of the current execution stack state.
Pretty print a CallStack.
Pretty print a SrcLoc.
Perform some computation without adding new entries to the CallStack.
Returns a [String] representing the current call stack. This
can be useful for debugging.
The implementation uses the call-stack simulation maintained by the
profiler, so it only works if the program was compiled with -prof
and contains suitable SCC annotations (e.g. by using -fprof-auto).
Otherwise, the list returned is likely to be empty or
uninformative.
Extract a list of call-sites from the CallStack.
The list is ordered by most recent call.
CallStacks are a lightweight method of obtaining a partial call-stack at any point in the program.
A function can request its call-site with the HasCallStack constraint. For example, we can define
putStrLnWithCallStack :: HasCallStack => String -> IO ()
as a variant of putStrLn that will get its call-site and print it,
along with the string given as argument. We can access the
call-stack inside putStrLnWithCallStack with callStack.
:{putStrLnWithCallStack :: HasCallStack => String -> IO ()putStrLnWithCallStack msg = do putStrLn msg putStrLn (prettyCallStack callStack):}
Thus, if we call putStrLnWithCallStack we will get a formatted call-stack
alongside our string.
putStrLnWithCallStack "hello"helloCallStack (from HasCallStack): putStrLnWithCallStack, called at <interactive>:... in interactive:Ghci...
GHC solves HasCallStack constraints in three steps:
If there is a CallStack in scope -- i.e. the enclosing function has a HasCallStack constraint -- GHC will append the new call-site to the existing CallStack.
If there is no CallStack in scope -- e.g. in the GHCi session above -- and the enclosing definition does not have an explicit type signature, GHC will infer a HasCallStack constraint for the enclosing definition (subject to the monomorphism restriction).
If there is no CallStack in scope and the enclosing definition has an explicit type signature, GHC will solve the HasCallStack constraint for the singleton CallStack containing just the current call-site.
CallStacks do not interact with the RTS and do not require compilation
with -prof. On the other hand, as they are built up explicitly via the
HasCallStack constraints, they will generally not contain as much
information as the simulated call-stacks maintained by the RTS.
A CallStack is a [(String, SrcLoc)]. The String is the name of
function that was called, the SrcLoc is the call-site. The list is
ordered with the most recently called function at the head.
NOTE: The intrepid user may notice that HasCallStack is just an
alias for an implicit parameter ?callStack :: CallStack. This is an
implementation detail and should not be considered part of the
CallStack API, we may decide to change the implementation in the
future.
Instances4IsList, Show, NFData, Item
Request a CallStack.
NOTE: The implicit parameter ?callStack :: CallStack is an
implementation detail and should not be considered part of the
CallStack API, we may decide to change the implementation in the
future.