Alias for tagToEnum#. Returns True if its parameter is 1# and False if it is 0#.
Modulebase-4.23.0.0Haskell2010
GHC.Base
Basic data types and classes.
Contents
Synopsis
- value isTrue#
- newtype IO
- type KindBndr
- data KindRep
- data Module
- family MultMul
- data Ordering
- data SPEC
- data TrName
- data TyCon
- data TypeLitSort
- type Void#
- data CONSTRAINT
- data TYPE
- family Any
- data Bool
- data Char
- class Coercible
- type Constraint
- data DictBox
- data Double
- data DoubleBox
- data Float
- data FloatBox
- data Int
- data IntBox
- data Levity
- type LiftedRep
- data List
- data Multiplicity
- data RuntimeRep
- data Symbol
- type Type
- type UnliftedRep
- type UnliftedType
- data VecCount
- data VecElem
- data Word
- data WordBox
- type ZeroBitRep
- type ZeroBitType
- class ~
- class ~~
- value *#
- value *##
- value **##
- value +#
- value +##
- value -#
- value -##
- value /##
- value /=#
- value /=##
- value <#
- value <##
- value <=#
- value <=##
- value ==#
- value ==##
- value >#
- value >##
- value >=#
- value >=##
- value acosDouble#
- value acosFloat#
- value acoshDouble#
- value acoshFloat#
- value addCFinalizerToWeak#
- value addIntC#
- value addWordC#
- value addr2Int#
- value addrToAny#
- value and#
- value and64#
- value andI#
- value andWord16#
- value andWord32#
- value andWord8#
- value annotateStack#
- value anyToAddr#
- value asinDouble#
- value asinFloat#
- value asinhDouble#
- value asinhFloat#
- value atanDouble#
- value atanFloat#
- value atanhDouble#
- value atanhFloat#
- value atomicCasAddrAddr#
- value atomicCasWord16Addr#
- value atomicCasWord32Addr#
- value atomicCasWord64Addr#
- value atomicCasWord8Addr#
- value atomicCasWordAddr#
- value atomicExchangeAddrAddr#
- value atomicExchangeWordAddr#
- value atomicModifyMutVar2#
- value atomicModifyMutVar_#
- value atomicReadIntArray#
- value atomicReadWordAddr#
- value atomicSwapMutVar#
- value atomicWriteIntArray#
- value atomicWriteWordAddr#
- value atomically#
- value bitReverse#
- value bitReverse16#
- value bitReverse32#
- value bitReverse64#
- value bitReverse8#
- value broadcastDoubleX2#
- value broadcastDoubleX4#
- value broadcastDoubleX8#
- value broadcastFloatX16#
- value broadcastFloatX4#
- value broadcastFloatX8#
- value broadcastInt16X16#
- value broadcastInt16X32#
- value broadcastInt16X8#
- value broadcastInt32X16#
- value broadcastInt32X4#
- value broadcastInt32X8#
- value broadcastInt64X2#
- value broadcastInt64X4#
- value broadcastInt64X8#
- value broadcastInt8X16#
- value broadcastInt8X32#
- value broadcastInt8X64#
- value broadcastWord16X16#
- value broadcastWord16X32#
- value broadcastWord16X8#
- value broadcastWord32X16#
- value broadcastWord32X4#
- value broadcastWord32X8#
- value broadcastWord64X2#
- value broadcastWord64X4#
- value broadcastWord64X8#
- value broadcastWord8X16#
- value broadcastWord8X32#
- value broadcastWord8X64#
- value byteArrayContents#
- value byteSwap#
- value byteSwap16#
- value byteSwap32#
- value byteSwap64#
- value casArray#
- value casInt16Array#
- value casInt32Array#
- value casInt64Array#
- value casInt8Array#
- value casIntArray#
- value casMutVar#
- value casSmallArray#
- value castDoubleToWord64#
- value castFloatToWord32#
- value castWord32ToFloat#
- value castWord64ToDouble#
- value catch#
- value catchRetry#
- value catchSTM#
- value chr#
- value clearCCS#
- value cloneArray#
- value cloneMutableArray#
- value cloneSmallArray#
- value cloneSmallMutableArray#
- value closureSize#
- value clz#
- value clz16#
- value clz32#
- value clz64#
- value clz8#
- value coerce
- value compactAdd#
- value compactAddWithSharing#
- value compactAllocateBlock#
- value compactContains#
- value compactContainsAny#
- value compactFixupPointers#
- value compactGetFirstBlock#
- value compactGetNextBlock#
- value compactNew#
- value compactResize#
- value compactSize#
- value compareByteArrays#
- value control0#
- value copyAddrToAddr#
- value copyAddrToAddrNonOverlapping#
- value copyAddrToByteArray#
- value copyArray#
- value copyByteArray#
- value copyByteArrayToAddr#
- value copyMutableArray#
- value copyMutableByteArray#
- value copyMutableByteArrayNonOverlapping#
- value copyMutableByteArrayToAddr#
- value copySmallArray#
- value copySmallMutableArray#
- value cosDouble#
- value cosFloat#
- value coshDouble#
- value coshFloat#
- value ctz#
- value ctz16#
- value ctz32#
- value ctz64#
- value ctz8#
- value deRefStablePtr#
- value deRefWeak#
- value decodeDouble_2Int#
- value decodeDouble_Int64#
- value decodeFloat_Int#
- value delay#
- value divideDoubleX2#
- value divideDoubleX4#
- value divideDoubleX8#
- value divideFloat#
- value divideFloatX16#
- value divideFloatX4#
- value divideFloatX8#
- value double2Float#
- value double2Int#
- value eqAddr#
- value eqChar#
- value eqFloat#
- value eqInt16#
- value eqInt32#
- value eqInt64#
- value eqInt8#
- value eqStablePtr#
- value eqWord#
- value eqWord16#
- value eqWord32#
- value eqWord64#
- value eqWord8#
- value expDouble#
- value expFloat#
- value expm1Double#
- value expm1Float#
- value fabsDouble#
- value fabsFloat#
- value fetchAddIntArray#
- value fetchAddWordAddr#
- value fetchAndIntArray#
- value fetchAndWordAddr#
- value fetchNandIntArray#
- value fetchNandWordAddr#
- value fetchOrIntArray#
- value fetchOrWordAddr#
- value fetchSubIntArray#
- value fetchSubWordAddr#
- value fetchXorIntArray#
- value fetchXorWordAddr#
- value finalizeWeak#
- value float2Double#
- value float2Int#
- value fmaddDouble#
- value fmaddFloat#
- value fmsubDouble#
- value fmsubFloat#
- value fnmaddDouble#
- value fnmaddFloat#
- value fnmsubDouble#
- value fnmsubFloat#
- value fork#
- value forkOn#
- value freezeArray#
- value freezeSmallArray#
- value geAddr#
- value geChar#
- value geFloat#
- value geInt16#
- value geInt32#
- value geInt64#
- value geInt8#
- value geWord#
- value geWord16#
- value geWord32#
- value geWord64#
- value geWord8#
- value getApStackVal#
- value getCCSOf#
- value getCurrentCCS#
- value getMaskingState#
- value getSizeofMutableByteArray#
- value getSizeofSmallMutableArray#
- value getSpark#
- value gtAddr#
- value gtChar#
- value gtFloat#
- value gtInt16#
- value gtInt32#
- value gtInt64#
- value gtInt8#
- value gtWord#
- value gtWord16#
- value gtWord32#
- value gtWord64#
- value gtWord8#
- value indexAddrArray#
- value indexAddrOffAddr#
- value indexArray#
- value indexCharArray#
- value indexCharOffAddr#
- value indexDoubleArray#
- value indexDoubleArrayAsDoubleX2#
- value indexDoubleArrayAsDoubleX4#
- value indexDoubleArrayAsDoubleX8#
- value indexDoubleOffAddr#
- value indexDoubleOffAddrAsDoubleX2#
- value indexDoubleOffAddrAsDoubleX4#
- value indexDoubleOffAddrAsDoubleX8#
- value indexDoubleX2Array#
- value indexDoubleX2OffAddr#
- value indexDoubleX4Array#
- value indexDoubleX4OffAddr#
- value indexDoubleX8Array#
- value indexDoubleX8OffAddr#
- value indexFloatArray#
- value indexFloatArrayAsFloatX16#
- value indexFloatArrayAsFloatX4#
- value indexFloatArrayAsFloatX8#
- value indexFloatOffAddr#
- value indexFloatOffAddrAsFloatX16#
- value indexFloatOffAddrAsFloatX4#
- value indexFloatOffAddrAsFloatX8#
- value indexFloatX16Array#
- value indexFloatX16OffAddr#
- value indexFloatX4Array#
- value indexFloatX4OffAddr#
- value indexFloatX8Array#
- value indexFloatX8OffAddr#
- value indexInt16Array#
- value indexInt16ArrayAsInt16X16#
- value indexInt16ArrayAsInt16X32#
- value indexInt16ArrayAsInt16X8#
- value indexInt16OffAddr#
- value indexInt16OffAddrAsInt16X16#
- value indexInt16OffAddrAsInt16X32#
- value indexInt16OffAddrAsInt16X8#
- value indexInt16X16Array#
- value indexInt16X16OffAddr#
- value indexInt16X32Array#
- value indexInt16X32OffAddr#
- value indexInt16X8Array#
- value indexInt16X8OffAddr#
- value indexInt32Array#
- value indexInt32ArrayAsInt32X16#
- value indexInt32ArrayAsInt32X4#
- value indexInt32ArrayAsInt32X8#
- value indexInt32OffAddr#
- value indexInt32OffAddrAsInt32X16#
- value indexInt32OffAddrAsInt32X4#
- value indexInt32OffAddrAsInt32X8#
- value indexInt32X16Array#
- value indexInt32X16OffAddr#
- value indexInt32X4Array#
- value indexInt32X4OffAddr#
- value indexInt32X8Array#
- value indexInt32X8OffAddr#
- value indexInt64Array#
- value indexInt64ArrayAsInt64X2#
- value indexInt64ArrayAsInt64X4#
- value indexInt64ArrayAsInt64X8#
- value indexInt64OffAddr#
- value indexInt64OffAddrAsInt64X2#
- value indexInt64OffAddrAsInt64X4#
- value indexInt64OffAddrAsInt64X8#
- value indexInt64X2Array#
- value indexInt64X2OffAddr#
- value indexInt64X4Array#
- value indexInt64X4OffAddr#
- value indexInt64X8Array#
- value indexInt64X8OffAddr#
- value indexInt8Array#
- value indexInt8ArrayAsInt8X16#
- value indexInt8ArrayAsInt8X32#
- value indexInt8ArrayAsInt8X64#
- value indexInt8OffAddr#
- value indexInt8OffAddrAsInt8X16#
- value indexInt8OffAddrAsInt8X32#
- value indexInt8OffAddrAsInt8X64#
- value indexInt8X16Array#
- value indexInt8X16OffAddr#
- value indexInt8X32Array#
- value indexInt8X32OffAddr#
- value indexInt8X64Array#
- value indexInt8X64OffAddr#
- value indexIntArray#
- value indexIntOffAddr#
- value indexSmallArray#
- value indexStablePtrArray#
- value indexStablePtrOffAddr#
- value indexWideCharArray#
- value indexWideCharOffAddr#
- value indexWord16Array#
- value indexWord16ArrayAsWord16X16#
- value indexWord16ArrayAsWord16X32#
- value indexWord16ArrayAsWord16X8#
- value indexWord16OffAddr#
- value indexWord16OffAddrAsWord16X16#
- value indexWord16OffAddrAsWord16X32#
- value indexWord16OffAddrAsWord16X8#
- value indexWord16X16Array#
- value indexWord16X16OffAddr#
- value indexWord16X32Array#
- value indexWord16X32OffAddr#
- value indexWord16X8Array#
- value indexWord16X8OffAddr#
- value indexWord32Array#
- value indexWord32ArrayAsWord32X16#
- value indexWord32ArrayAsWord32X4#
- value indexWord32ArrayAsWord32X8#
- value indexWord32OffAddr#
- value indexWord32OffAddrAsWord32X16#
- value indexWord32OffAddrAsWord32X4#
- value indexWord32OffAddrAsWord32X8#
- value indexWord32X16Array#
- value indexWord32X16OffAddr#
- value indexWord32X4Array#
- value indexWord32X4OffAddr#
- value indexWord32X8Array#
- value indexWord32X8OffAddr#
- value indexWord64Array#
- value indexWord64ArrayAsWord64X2#
- value indexWord64ArrayAsWord64X4#
- value indexWord64ArrayAsWord64X8#
- value indexWord64OffAddr#
- value indexWord64OffAddrAsWord64X2#
- value indexWord64OffAddrAsWord64X4#
- value indexWord64OffAddrAsWord64X8#
- value indexWord64X2Array#
- value indexWord64X2OffAddr#
- value indexWord64X4Array#
- value indexWord64X4OffAddr#
- value indexWord64X8Array#
- value indexWord64X8OffAddr#
- value indexWord8Array#
- value indexWord8ArrayAsAddr#
- value indexWord8ArrayAsChar#
- value indexWord8ArrayAsDouble#
- value indexWord8ArrayAsFloat#
- value indexWord8ArrayAsInt#
- value indexWord8ArrayAsInt16#
- value indexWord8ArrayAsInt32#
- value indexWord8ArrayAsInt64#
- value indexWord8ArrayAsStablePtr#
- value indexWord8ArrayAsWideChar#
- value indexWord8ArrayAsWord#
- value indexWord8ArrayAsWord16#
- value indexWord8ArrayAsWord32#
- value indexWord8ArrayAsWord64#
- value indexWord8ArrayAsWord8X16#
- value indexWord8ArrayAsWord8X32#
- value indexWord8ArrayAsWord8X64#
- value indexWord8OffAddr#
- value indexWord8OffAddrAsAddr#
- value indexWord8OffAddrAsChar#
- value indexWord8OffAddrAsDouble#
- value indexWord8OffAddrAsFloat#
- value indexWord8OffAddrAsInt#
- value indexWord8OffAddrAsInt16#
- value indexWord8OffAddrAsInt32#
- value indexWord8OffAddrAsInt64#
- value indexWord8OffAddrAsStablePtr#
- value indexWord8OffAddrAsWideChar#
- value indexWord8OffAddrAsWord#
- value indexWord8OffAddrAsWord16#
- value indexWord8OffAddrAsWord32#
- value indexWord8OffAddrAsWord64#
- value indexWord8OffAddrAsWord8X16#
- value indexWord8OffAddrAsWord8X32#
- value indexWord8OffAddrAsWord8X64#
- value indexWord8X16Array#
- value indexWord8X16OffAddr#
- value indexWord8X32Array#
- value indexWord8X32OffAddr#
- value indexWord8X64Array#
- value indexWord8X64OffAddr#
- value indexWordArray#
- value indexWordOffAddr#
- value insertDoubleX2#
- value insertDoubleX4#
- value insertDoubleX8#
- value insertFloatX16#
- value insertFloatX4#
- value insertFloatX8#
- value insertInt16X16#
- value insertInt16X32#
- value insertInt16X8#
- value insertInt32X16#
- value insertInt32X4#
- value insertInt32X8#
- value insertInt64X2#
- value insertInt64X4#
- value insertInt64X8#
- value insertInt8X16#
- value insertInt8X32#
- value insertInt8X64#
- value insertWord16X16#
- value insertWord16X32#
- value insertWord16X8#
- value insertWord32X16#
- value insertWord32X4#
- value insertWord32X8#
- value insertWord64X2#
- value insertWord64X4#
- value insertWord64X8#
- value insertWord8X16#
- value insertWord8X32#
- value insertWord8X64#
- value int16ToInt#
- value int16ToWord16#
- value int2Addr#
- value int2Double#
- value int2Float#
- value int2Word#
- value int32ToInt#
- value int32ToWord32#
- value int64ToInt#
- value int64ToWord64#
- value int8ToInt#
- value int8ToWord8#
- value intToInt16#
- value intToInt32#
- value intToInt64#
- value intToInt8#
- value isByteArrayPinned#
- value isCurrentThreadBound#
- value isEmptyMVar#
- value isMutableByteArrayPinned#
- value keepAlive#
- value killThread#
- value labelThread#
- value leAddr#
- value leChar#
- value leFloat#
- value leInt16#
- value leInt32#
- value leInt64#
- value leInt8#
- value leWord#
- value leWord16#
- value leWord32#
- value leWord64#
- value leWord8#
- value leftSection
- value listThreads#
- value log1pDouble#
- value log1pFloat#
- value logDouble#
- value logFloat#
- value ltAddr#
- value ltChar#
- value ltFloat#
- value ltInt16#
- value ltInt32#
- value ltInt64#
- value ltInt8#
- value ltWord#
- value ltWord16#
- value ltWord32#
- value ltWord64#
- value ltWord8#
- value makeStableName#
- value makeStablePtr#
- value maskAsyncExceptions#
- value maskUninterruptible#
- value minusAddr#
- value minusDoubleX2#
- value minusDoubleX4#
- value minusDoubleX8#
- value minusFloat#
- value minusFloatX16#
- value minusFloatX4#
- value minusFloatX8#
- value minusInt16X16#
- value minusInt16X32#
- value minusInt16X8#
- value minusInt32X16#
- value minusInt32X4#
- value minusInt32X8#
- value minusInt64X2#
- value minusInt64X4#
- value minusInt64X8#
- value minusInt8X16#
- value minusInt8X32#
- value minusInt8X64#
- value minusWord#
- value minusWord16X16#
- value minusWord16X32#
- value minusWord16X8#
- value minusWord32X16#
- value minusWord32X4#
- value minusWord32X8#
- value minusWord64X2#
- value minusWord64X4#
- value minusWord64X8#
- value minusWord8X16#
- value minusWord8X32#
- value minusWord8X64#
- value mkApUpd0#
- value mkWeak#
- value mkWeakNoFinalizer#
- value mulIntMayOflo#
- value mutableByteArrayContents#
- value myThreadId#
- value narrow16Int#
- value narrow16Word#
- value narrow32Int#
- value narrow32Word#
- value narrow8Int#
- value narrow8Word#
- value neAddr#
- value neChar#
- value neFloat#
- value neInt16#
- value neInt32#
- value neInt64#
- value neInt8#
- value neWord#
- value neWord16#
- value neWord32#
- value neWord64#
- value neWord8#
- value negateDouble#
- value negateDoubleX2#
- value negateDoubleX4#
- value negateDoubleX8#
- value negateFloat#
- value negateFloatX16#
- value negateFloatX4#
- value negateFloatX8#
- value negateInt#
- value negateInt16#
- value negateInt16X16#
- value negateInt16X32#
- value negateInt16X8#
- value negateInt32#
- value negateInt32X16#
- value negateInt32X4#
- value negateInt32X8#
- value negateInt64#
- value negateInt64X2#
- value negateInt64X4#
- value negateInt64X8#
- value negateInt8#
- value negateInt8X16#
- value negateInt8X32#
- value negateInt8X64#
- value newAlignedPinnedByteArray#
- value newArray#
- value newBCO#
- value newByteArray#
- value newConAppObj#
- value newMVar#
- value newMutVar#
- value newPinnedByteArray#
- value newPromptTag#
- value newSmallArray#
- value newTVar#
- value noDuplicate#
- value not#
- value not64#
- value notI#
- value notWord16#
- value notWord32#
- value notWord8#
- value nullAddr#
- value numSparks#
- value or#
- value or64#
- value orI#
- value orWord16#
- value orWord32#
- value orWord8#
- value ord#
- value packDoubleX2#
- value packDoubleX4#
- value packDoubleX8#
- value packFloatX16#
- value packFloatX4#
- value packFloatX8#
- value packInt16X16#
- value packInt16X32#
- value packInt16X8#
- value packInt32X16#
- value packInt32X4#
- value packInt32X8#
- value packInt64X2#
- value packInt64X4#
- value packInt64X8#
- value packInt8X16#
- value packInt8X32#
- value packInt8X64#
- value packWord16X16#
- value packWord16X32#
- value packWord16X8#
- value packWord32X16#
- value packWord32X4#
- value packWord32X8#
- value packWord64X2#
- value packWord64X4#
- value packWord64X8#
- value packWord8X16#
- value packWord8X32#
- value packWord8X64#
- value par#
- value pdep#
- value pdep16#
- value pdep32#
- value pdep64#
- value pdep8#
- value pext#
- value pext16#
- value pext32#
- value pext64#
- value pext8#
- value plusAddr#
- value plusDoubleX2#
- value plusDoubleX4#
- value plusDoubleX8#
- value plusFloat#
- value plusFloatX16#
- value plusFloatX4#
- value plusFloatX8#
- value plusInt16#
- value plusInt16X16#
- value plusInt16X32#
- value plusInt16X8#
- value plusInt32#
- value plusInt32X16#
- value plusInt32X4#
- value plusInt32X8#
- value plusInt64#
- value plusInt64X2#
- value plusInt64X4#
- value plusInt64X8#
- value plusInt8#
- value plusInt8X16#
- value plusInt8X32#
- value plusInt8X64#
- value plusWord#
- value plusWord16#
- value plusWord16X16#
- value plusWord16X32#
- value plusWord16X8#
- value plusWord2#
- value plusWord32#
- value plusWord32X16#
- value plusWord32X4#
- value plusWord32X8#
- value plusWord64#
- value plusWord64X2#
- value plusWord64X4#
- value plusWord64X8#
- value plusWord8#
- value plusWord8X16#
- value plusWord8X32#
- value plusWord8X64#
- value popCnt#
- value popCnt16#
- value popCnt32#
- value popCnt64#
- value popCnt8#
- value powerFloat#
- value prefetchAddr0#
- value prefetchAddr1#
- value prefetchAddr2#
- value prefetchAddr3#
- value prefetchByteArray0#
- value prefetchByteArray1#
- value prefetchByteArray2#
- value prefetchByteArray3#
- value prefetchMutableByteArray0#
- value prefetchMutableByteArray1#
- value prefetchMutableByteArray2#
- value prefetchMutableByteArray3#
- value prefetchValue0#
- value prefetchValue1#
- value prefetchValue2#
- value prefetchValue3#
- value prompt#
- value proxy#
- value putMVar#
- value quotInt#
- value quotInt16#
- value quotInt16X16#
- value quotInt16X32#
- value quotInt16X8#
- value quotInt32#
- value quotInt32X16#
- value quotInt32X4#
- value quotInt32X8#
- value quotInt64#
- value quotInt64X2#
- value quotInt64X4#
- value quotInt64X8#
- value quotInt8#
- value quotInt8X16#
- value quotInt8X32#
- value quotInt8X64#
- value quotRemInt#
- value quotRemInt16#
- value quotRemInt32#
- value quotRemInt8#
- value quotRemWord#
- value quotRemWord16#
- value quotRemWord2#
- value quotRemWord32#
- value quotRemWord8#
- value quotWord#
- value quotWord16#
- value quotWord16X16#
- value quotWord16X32#
- value quotWord16X8#
- value quotWord32#
- value quotWord32X16#
- value quotWord32X4#
- value quotWord32X8#
- value quotWord64#
- value quotWord64X2#
- value quotWord64X4#
- value quotWord64X8#
- value quotWord8#
- value quotWord8X16#
- value quotWord8X32#
- value quotWord8X64#
- value raise#
- value raiseDivZero#
- value raiseIO#
- value raiseOverflow#
- value raiseUnderflow#
- value readAddrArray#
- value readAddrOffAddr#
- value readArray#
- value readCharArray#
- value readCharOffAddr#
- value readDoubleArray#
- value readDoubleArrayAsDoubleX2#
- value readDoubleArrayAsDoubleX4#
- value readDoubleArrayAsDoubleX8#
- value readDoubleOffAddr#
- value readDoubleOffAddrAsDoubleX2#
- value readDoubleOffAddrAsDoubleX4#
- value readDoubleOffAddrAsDoubleX8#
- value readDoubleX2Array#
- value readDoubleX2OffAddr#
- value readDoubleX4Array#
- value readDoubleX4OffAddr#
- value readDoubleX8Array#
- value readDoubleX8OffAddr#
- value readFloatArray#
- value readFloatArrayAsFloatX16#
- value readFloatArrayAsFloatX4#
- value readFloatArrayAsFloatX8#
- value readFloatOffAddr#
- value readFloatOffAddrAsFloatX16#
- value readFloatOffAddrAsFloatX4#
- value readFloatOffAddrAsFloatX8#
- value readFloatX16Array#
- value readFloatX16OffAddr#
- value readFloatX4Array#
- value readFloatX4OffAddr#
- value readFloatX8Array#
- value readFloatX8OffAddr#
- value readInt16Array#
- value readInt16ArrayAsInt16X16#
- value readInt16ArrayAsInt16X32#
- value readInt16ArrayAsInt16X8#
- value readInt16OffAddr#
- value readInt16OffAddrAsInt16X16#
- value readInt16OffAddrAsInt16X32#
- value readInt16OffAddrAsInt16X8#
- value readInt16X16Array#
- value readInt16X16OffAddr#
- value readInt16X32Array#
- value readInt16X32OffAddr#
- value readInt16X8Array#
- value readInt16X8OffAddr#
- value readInt32Array#
- value readInt32ArrayAsInt32X16#
- value readInt32ArrayAsInt32X4#
- value readInt32ArrayAsInt32X8#
- value readInt32OffAddr#
- value readInt32OffAddrAsInt32X16#
- value readInt32OffAddrAsInt32X4#
- value readInt32OffAddrAsInt32X8#
- value readInt32X16Array#
- value readInt32X16OffAddr#
- value readInt32X4Array#
- value readInt32X4OffAddr#
- value readInt32X8Array#
- value readInt32X8OffAddr#
- value readInt64Array#
- value readInt64ArrayAsInt64X2#
- value readInt64ArrayAsInt64X4#
- value readInt64ArrayAsInt64X8#
- value readInt64OffAddr#
- value readInt64OffAddrAsInt64X2#
- value readInt64OffAddrAsInt64X4#
- value readInt64OffAddrAsInt64X8#
- value readInt64X2Array#
- value readInt64X2OffAddr#
- value readInt64X4Array#
- value readInt64X4OffAddr#
- value readInt64X8Array#
- value readInt64X8OffAddr#
- value readInt8Array#
- value readInt8ArrayAsInt8X16#
- value readInt8ArrayAsInt8X32#
- value readInt8ArrayAsInt8X64#
- value readInt8OffAddr#
- value readInt8OffAddrAsInt8X16#
- value readInt8OffAddrAsInt8X32#
- value readInt8OffAddrAsInt8X64#
- value readInt8X16Array#
- value readInt8X16OffAddr#
- value readInt8X32Array#
- value readInt8X32OffAddr#
- value readInt8X64Array#
- value readInt8X64OffAddr#
- value readIntArray#
- value readIntOffAddr#
- value readMVar#
- value readMutVar#
- value readSmallArray#
- value readStablePtrArray#
- value readStablePtrOffAddr#
- value readTVar#
- value readTVarIO#
- value readWideCharArray#
- value readWideCharOffAddr#
- value readWord16Array#
- value readWord16ArrayAsWord16X16#
- value readWord16ArrayAsWord16X32#
- value readWord16ArrayAsWord16X8#
- value readWord16OffAddr#
- value readWord16OffAddrAsWord16X16#
- value readWord16OffAddrAsWord16X32#
- value readWord16OffAddrAsWord16X8#
- value readWord16X16Array#
- value readWord16X16OffAddr#
- value readWord16X32Array#
- value readWord16X32OffAddr#
- value readWord16X8Array#
- value readWord16X8OffAddr#
- value readWord32Array#
- value readWord32ArrayAsWord32X16#
- value readWord32ArrayAsWord32X4#
- value readWord32ArrayAsWord32X8#
- value readWord32OffAddr#
- value readWord32OffAddrAsWord32X16#
- value readWord32OffAddrAsWord32X4#
- value readWord32OffAddrAsWord32X8#
- value readWord32X16Array#
- value readWord32X16OffAddr#
- value readWord32X4Array#
- value readWord32X4OffAddr#
- value readWord32X8Array#
- value readWord32X8OffAddr#
- value readWord64Array#
- value readWord64ArrayAsWord64X2#
- value readWord64ArrayAsWord64X4#
- value readWord64ArrayAsWord64X8#
- value readWord64OffAddr#
- value readWord64OffAddrAsWord64X2#
- value readWord64OffAddrAsWord64X4#
- value readWord64OffAddrAsWord64X8#
- value readWord64X2Array#
- value readWord64X2OffAddr#
- value readWord64X4Array#
- value readWord64X4OffAddr#
- value readWord64X8Array#
- value readWord64X8OffAddr#
- value readWord8Array#
- value readWord8ArrayAsAddr#
- value readWord8ArrayAsChar#
- value readWord8ArrayAsDouble#
- value readWord8ArrayAsFloat#
- value readWord8ArrayAsInt#
- value readWord8ArrayAsInt16#
- value readWord8ArrayAsInt32#
- value readWord8ArrayAsInt64#
- value readWord8ArrayAsStablePtr#
- value readWord8ArrayAsWideChar#
- value readWord8ArrayAsWord#
- value readWord8ArrayAsWord16#
- value readWord8ArrayAsWord32#
- value readWord8ArrayAsWord64#
- value readWord8ArrayAsWord8X16#
- value readWord8ArrayAsWord8X32#
- value readWord8ArrayAsWord8X64#
- value readWord8OffAddr#
- value readWord8OffAddrAsAddr#
- value readWord8OffAddrAsChar#
- value readWord8OffAddrAsDouble#
- value readWord8OffAddrAsFloat#
- value readWord8OffAddrAsInt#
- value readWord8OffAddrAsInt16#
- value readWord8OffAddrAsInt32#
- value readWord8OffAddrAsInt64#
- value readWord8OffAddrAsStablePtr#
- value readWord8OffAddrAsWideChar#
- value readWord8OffAddrAsWord#
- value readWord8OffAddrAsWord16#
- value readWord8OffAddrAsWord32#
- value readWord8OffAddrAsWord64#
- value readWord8OffAddrAsWord8X16#
- value readWord8OffAddrAsWord8X32#
- value readWord8OffAddrAsWord8X64#
- value readWord8X16Array#
- value readWord8X16OffAddr#
- value readWord8X32Array#
- value readWord8X32OffAddr#
- value readWord8X64Array#
- value readWord8X64OffAddr#
- value readWordArray#
- value readWordOffAddr#
- value realWorld#
- value reallyUnsafePtrEquality#
- value remAddr#
- value remInt#
- value remInt16#
- value remInt16X16#
- value remInt16X32#
- value remInt16X8#
- value remInt32#
- value remInt32X16#
- value remInt32X4#
- value remInt32X8#
- value remInt64#
- value remInt64X2#
- value remInt64X4#
- value remInt64X8#
- value remInt8#
- value remInt8X16#
- value remInt8X32#
- value remInt8X64#
- value remWord#
- value remWord16#
- value remWord16X16#
- value remWord16X32#
- value remWord16X8#
- value remWord32#
- value remWord32X16#
- value remWord32X4#
- value remWord32X8#
- value remWord64#
- value remWord64X2#
- value remWord64X4#
- value remWord64X8#
- value remWord8#
- value remWord8X16#
- value remWord8X32#
- value remWord8X64#
- value resizeMutableByteArray#
- value retry#
- value rightSection
- value seq
- value setAddrRange#
- value setByteArray#
- value setOtherThreadAllocationCounter#
- value setThreadAllocationCounter#
- value shrinkMutableByteArray#
- value shrinkSmallMutableArray#
- value sinDouble#
- value sinFloat#
- value sinhDouble#
- value sinhFloat#
- value sizeofArray#
- value sizeofByteArray#
- value sizeofMutableArray#
- value sizeofMutableByteArray#
- value sizeofSmallArray#
- value sizeofSmallMutableArray#
- value spark#
- value sqrtDouble#
- value sqrtFloat#
- value stableNameToInt#
- value subInt16#
- value subInt32#
- value subInt64#
- value subInt8#
- value subIntC#
- value subWord16#
- value subWord32#
- value subWord64#
- value subWord8#
- value subWordC#
- value tagToEnum#
- value takeMVar#
- value tanDouble#
- value tanFloat#
- value tanhDouble#
- value tanhFloat#
- value thawArray#
- value thawSmallArray#
- value threadLabel#
- value threadStatus#
- value timesDoubleX2#
- value timesDoubleX4#
- value timesDoubleX8#
- value timesFloat#
- value timesFloatX16#
- value timesFloatX4#
- value timesFloatX8#
- value timesInt16#
- value timesInt16X16#
- value timesInt16X32#
- value timesInt16X8#
- value timesInt2#
- value timesInt32#
- value timesInt32X16#
- value timesInt32X4#
- value timesInt32X8#
- value timesInt64#
- value timesInt64X2#
- value timesInt64X4#
- value timesInt64X8#
- value timesInt8#
- value timesInt8X16#
- value timesInt8X32#
- value timesInt8X64#
- value timesWord#
- value timesWord16#
- value timesWord16X16#
- value timesWord16X32#
- value timesWord16X8#
- value timesWord2#
- value timesWord32#
- value timesWord32X16#
- value timesWord32X4#
- value timesWord32X8#
- value timesWord64#
- value timesWord64X2#
- value timesWord64X4#
- value timesWord64X8#
- value timesWord8#
- value timesWord8X16#
- value timesWord8X32#
- value timesWord8X64#
- value touch#
- value traceBinaryEvent#
- value traceEvent#
- value traceMarker#
- value tryPutMVar#
- value tryReadMVar#
- value tryTakeMVar#
- value uncheckedIShiftL#
- value uncheckedIShiftL64#
- value uncheckedIShiftRA#
- value uncheckedIShiftRA64#
- value uncheckedIShiftRL#
- value uncheckedIShiftRL64#
- value uncheckedShiftL#
- value uncheckedShiftL64#
- value uncheckedShiftLInt16#
- value uncheckedShiftLInt32#
- value uncheckedShiftLInt8#
- value uncheckedShiftLWord16#
- value uncheckedShiftLWord32#
- value uncheckedShiftLWord8#
- value uncheckedShiftRAInt16#
- value uncheckedShiftRAInt32#
- value uncheckedShiftRAInt8#
- value uncheckedShiftRL#
- value uncheckedShiftRL64#
- value uncheckedShiftRLInt16#
- value uncheckedShiftRLInt32#
- value uncheckedShiftRLInt8#
- value uncheckedShiftRLWord16#
- value uncheckedShiftRLWord32#
- value uncheckedShiftRLWord8#
- value unmaskAsyncExceptions#
- value unpackClosure#
- value unpackDoubleX2#
- value unpackDoubleX4#
- value unpackDoubleX8#
- value unpackFloatX16#
- value unpackFloatX4#
- value unpackFloatX8#
- value unpackInt16X16#
- value unpackInt16X32#
- value unpackInt16X8#
- value unpackInt32X16#
- value unpackInt32X4#
- value unpackInt32X8#
- value unpackInt64X2#
- value unpackInt64X4#
- value unpackInt64X8#
- value unpackInt8X16#
- value unpackInt8X32#
- value unpackInt8X64#
- value unpackWord16X16#
- value unpackWord16X32#
- value unpackWord16X8#
- value unpackWord32X16#
- value unpackWord32X4#
- value unpackWord32X8#
- value unpackWord64X2#
- value unpackWord64X4#
- value unpackWord64X8#
- value unpackWord8X16#
- value unpackWord8X32#
- value unpackWord8X64#
- value unsafeFreezeArray#
- value unsafeFreezeByteArray#
- value unsafeFreezeSmallArray#
- value unsafeThawArray#
- value unsafeThawByteArray#
- value unsafeThawSmallArray#
- value void#
- value waitRead#
- value waitWrite#
- value word16ToInt16#
- value word16ToWord#
- value word2Double#
- value word2Float#
- value word2Int#
- value word32ToInt32#
- value word32ToWord#
- value word64ToInt64#
- value word64ToWord#
- value word8ToInt8#
- value word8ToWord#
- value wordToWord16#
- value wordToWord32#
- value wordToWord64#
- value wordToWord8#
- value writeAddrArray#
- value writeAddrOffAddr#
- value writeArray#
- value writeCharArray#
- value writeCharOffAddr#
- value writeDoubleArray#
- value writeDoubleArrayAsDoubleX2#
- value writeDoubleArrayAsDoubleX4#
- value writeDoubleArrayAsDoubleX8#
- value writeDoubleOffAddr#
- value writeDoubleOffAddrAsDoubleX2#
- value writeDoubleOffAddrAsDoubleX4#
- value writeDoubleOffAddrAsDoubleX8#
- value writeDoubleX2Array#
- value writeDoubleX2OffAddr#
- value writeDoubleX4Array#
- value writeDoubleX4OffAddr#
- value writeDoubleX8Array#
- value writeDoubleX8OffAddr#
- value writeFloatArray#
- value writeFloatArrayAsFloatX16#
- value writeFloatArrayAsFloatX4#
- value writeFloatArrayAsFloatX8#
- value writeFloatOffAddr#
- value writeFloatOffAddrAsFloatX16#
- value writeFloatOffAddrAsFloatX4#
- value writeFloatOffAddrAsFloatX8#
- value writeFloatX16Array#
- value writeFloatX16OffAddr#
- value writeFloatX4Array#
- value writeFloatX4OffAddr#
- value writeFloatX8Array#
- value writeFloatX8OffAddr#
- value writeInt16Array#
- value writeInt16ArrayAsInt16X16#
- value writeInt16ArrayAsInt16X32#
- value writeInt16ArrayAsInt16X8#
- value writeInt16OffAddr#
- value writeInt16OffAddrAsInt16X16#
- value writeInt16OffAddrAsInt16X32#
- value writeInt16OffAddrAsInt16X8#
- value writeInt16X16Array#
- value writeInt16X16OffAddr#
- value writeInt16X32Array#
- value writeInt16X32OffAddr#
- value writeInt16X8Array#
- value writeInt16X8OffAddr#
- value writeInt32Array#
- value writeInt32ArrayAsInt32X16#
- value writeInt32ArrayAsInt32X4#
- value writeInt32ArrayAsInt32X8#
- value writeInt32OffAddr#
- value writeInt32OffAddrAsInt32X16#
- value writeInt32OffAddrAsInt32X4#
- value writeInt32OffAddrAsInt32X8#
- value writeInt32X16Array#
- value writeInt32X16OffAddr#
- value writeInt32X4Array#
- value writeInt32X4OffAddr#
- value writeInt32X8Array#
- value writeInt32X8OffAddr#
- value writeInt64Array#
- value writeInt64ArrayAsInt64X2#
- value writeInt64ArrayAsInt64X4#
- value writeInt64ArrayAsInt64X8#
- value writeInt64OffAddr#
- value writeInt64OffAddrAsInt64X2#
- value writeInt64OffAddrAsInt64X4#
- value writeInt64OffAddrAsInt64X8#
- value writeInt64X2Array#
- value writeInt64X2OffAddr#
- value writeInt64X4Array#
- value writeInt64X4OffAddr#
- value writeInt64X8Array#
- value writeInt64X8OffAddr#
- value writeInt8Array#
- value writeInt8ArrayAsInt8X16#
- value writeInt8ArrayAsInt8X32#
- value writeInt8ArrayAsInt8X64#
- value writeInt8OffAddr#
- value writeInt8OffAddrAsInt8X16#
- value writeInt8OffAddrAsInt8X32#
- value writeInt8OffAddrAsInt8X64#
- value writeInt8X16Array#
- value writeInt8X16OffAddr#
- value writeInt8X32Array#
- value writeInt8X32OffAddr#
- value writeInt8X64Array#
- value writeInt8X64OffAddr#
- value writeIntArray#
- value writeIntOffAddr#
- value writeMutVar#
- value writeSmallArray#
- value writeStablePtrArray#
- value writeStablePtrOffAddr#
- value writeTVar#
- value writeWideCharArray#
- value writeWideCharOffAddr#
- value writeWord16Array#
- value writeWord16ArrayAsWord16X16#
- value writeWord16ArrayAsWord16X32#
- value writeWord16ArrayAsWord16X8#
- value writeWord16OffAddr#
- value writeWord16OffAddrAsWord16X16#
- value writeWord16OffAddrAsWord16X32#
- value writeWord16OffAddrAsWord16X8#
- value writeWord16X16Array#
- value writeWord16X16OffAddr#
- value writeWord16X32Array#
- value writeWord16X32OffAddr#
- value writeWord16X8Array#
- value writeWord16X8OffAddr#
- value writeWord32Array#
- value writeWord32ArrayAsWord32X16#
- value writeWord32ArrayAsWord32X4#
- value writeWord32ArrayAsWord32X8#
- value writeWord32OffAddr#
- value writeWord32OffAddrAsWord32X16#
- value writeWord32OffAddrAsWord32X4#
- value writeWord32OffAddrAsWord32X8#
- value writeWord32X16Array#
- value writeWord32X16OffAddr#
- value writeWord32X4Array#
- value writeWord32X4OffAddr#
- value writeWord32X8Array#
- value writeWord32X8OffAddr#
- value writeWord64Array#
- value writeWord64ArrayAsWord64X2#
- value writeWord64ArrayAsWord64X4#
- value writeWord64ArrayAsWord64X8#
- value writeWord64OffAddr#
- value writeWord64OffAddrAsWord64X2#
- value writeWord64OffAddrAsWord64X4#
- value writeWord64OffAddrAsWord64X8#
- value writeWord64X2Array#
- value writeWord64X2OffAddr#
- value writeWord64X4Array#
- value writeWord64X4OffAddr#
- value writeWord64X8Array#
- value writeWord64X8OffAddr#
- value writeWord8Array#
- value writeWord8ArrayAsAddr#
- value writeWord8ArrayAsChar#
- value writeWord8ArrayAsDouble#
- value writeWord8ArrayAsFloat#
- value writeWord8ArrayAsInt#
- value writeWord8ArrayAsInt16#
- value writeWord8ArrayAsInt32#
- value writeWord8ArrayAsInt64#
- value writeWord8ArrayAsStablePtr#
- value writeWord8ArrayAsWideChar#
- value writeWord8ArrayAsWord#
- value writeWord8ArrayAsWord16#
- value writeWord8ArrayAsWord32#
- value writeWord8ArrayAsWord64#
- value writeWord8ArrayAsWord8X16#
- value writeWord8ArrayAsWord8X32#
- value writeWord8ArrayAsWord8X64#
- value writeWord8OffAddr#
- value writeWord8OffAddrAsAddr#
- value writeWord8OffAddrAsChar#
- value writeWord8OffAddrAsDouble#
- value writeWord8OffAddrAsFloat#
- value writeWord8OffAddrAsInt#
- value writeWord8OffAddrAsInt16#
- value writeWord8OffAddrAsInt32#
- value writeWord8OffAddrAsInt64#
- value writeWord8OffAddrAsStablePtr#
- value writeWord8OffAddrAsWideChar#
- value writeWord8OffAddrAsWord#
- value writeWord8OffAddrAsWord16#
- value writeWord8OffAddrAsWord32#
- value writeWord8OffAddrAsWord64#
- value writeWord8OffAddrAsWord8X16#
- value writeWord8OffAddrAsWord8X32#
- value writeWord8OffAddrAsWord8X64#
- value writeWord8X16Array#
- value writeWord8X16OffAddr#
- value writeWord8X32Array#
- value writeWord8X32OffAddr#
- value writeWord8X64Array#
- value writeWord8X64OffAddr#
- value writeWordArray#
- value writeWordOffAddr#
- value xor#
- value xor64#
- value xorI#
- value xorWord16#
- value xorWord32#
- value xorWord8#
- value yield#
- data Addr#
- data Array#
- data BCO
- data ByteArray#
- data CONSTRAINT
- data Char#
- data Compact#
- data Double#
- data DoubleX2#
- data DoubleX4#
- data DoubleX8#
- data FUN
- data Float#
- data FloatX16#
- data FloatX4#
- data FloatX8#
- data Int#
- data Int16#
- data Int16X16#
- data Int16X32#
- data Int16X8#
- data Int32#
- data Int32X16#
- data Int32X4#
- data Int32X8#
- data Int64#
- data Int64X2#
- data Int64X4#
- data Int64X8#
- data Int8#
- data Int8X16#
- data Int8X32#
- data Int8X64#
- data MVar#
- data MutVar#
- data MutableArray#
- data MutableByteArray#
- data PromptTag#
- data Proxy#
- data RealWorld
- data SmallArray#
- data SmallMutableArray#
- data StableName#
- data StablePtr#
- data StackSnapshot#
- data State#
- data TVar#
- data TYPE
- data ThreadId#
- data Weak#
- data Word#
- data Word16#
- data Word16X16#
- data Word16X32#
- data Word16X8#
- data Word32#
- data Word32X16#
- data Word32X4#
- data Word32X8#
- data Word64#
- data Word64X2#
- data Word64X4#
- data Word64X8#
- data Word8#
- data Word8X16#
- data Word8X32#
- data Word8X64#
- value getThreadAllocationCounter#
- value eqStableName#
- value reallyUnsafePtrEquality
- value sameArray#
- value sameByteArray#
- value sameMVar#
- value sameMutVar#
- value sameMutableArray#
- value sameMutableByteArray#
- value samePromptTag#
- value sameSmallArray#
- value sameSmallMutableArray#
- value sameTVar#
- value unsafePtrEquality#
- value absentErr
- value error
- value errorWithoutStackTrace
- value undefined
- data Maybe
- class IP
- class Eq
- class Ord
- value eqInt
- value neInt
- value eqWord
- value neWord
- value eqChar
- value neChar
- value eqFloat
- value eqDouble
- value gtInt
- value geInt
- value leInt
- value ltInt
- value compareInt
- value compareInt#
- value gtWord
- value geWord
- value leWord
- value ltWord
- value compareWord
- value compareWord#
- value unpackCString#
- value unpackAppendCString#
- value unpackFoldrCString#
- value cstringLength#
- value unpackCStringUtf8#
- value unpackAppendCStringUtf8#
- value unpackFoldrCStringUtf8#
- value unpackNBytes#
- value inline
- value noinline
- value lazy
- value oneShot
- value runRW#
- value seq#
- class DataToTag
- class WithDict
- value &&
- value ||
- value not
- data Void
- value absurd
- value vacuous
- class Semigroup
- class Monoid
- class Functor
- class Applicative
- value <**>
- value liftA
- value liftA3
- value join
- class Monad
- value =<<
- value when
- value sequence
- value mapM
- value liftM
- value liftM2
- value liftM3
- value liftM4
- value liftM5
- value ap
- class Alternative
- class MonadPlus
- data NonEmpty
- value foldr
- value build
- value augment
- value map
- value mapFB
- value ++
- type String
- value unsafeChr
- value ord
- value eqString
- value minInt
- value maxInt
- value otherwise
- value id
- value assert
- value breakpoint
- value breakpointCond
- data Opaque
- value const
- value .
- value flip
- value $
- value $!
- value until
- value asTypeOf
- value returnIO
- value bindIO
- value thenIO
- value failIO
- value unIO
- value getTag
- value quotInt
- value remInt
- value divInt
- value modInt
- value quotRemInt
- value divModInt
- value shift_mask
- value shiftL#
- value shiftRL#
- value iShiftL#
- value iShiftRA#
- value iShiftRL#
- value divInt#
- value divInt8#
- value divInt16#
- value divInt32#
- value modInt#
- value modInt8#
- value modInt16#
- value modInt32#
- value divModInt#
- value divModInt8#
- value divModInt16#
- value divModInt32#
- Packagebase-4.23.0.0
- Exports1628
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceBase.hs
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.
Instances15Monad, Functor, MonadFix, MonadFail, Applicative, GHCiSandboxIO, …
Monad IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadFix IODefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonadFail IODefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FailApplicative IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseGHCiSandboxIO IODefined in ghc-internal-10.0.0 · GHC.Internal.GHCiQuote IODefined in ghc-internal-10.0.0 · GHC.Internal.TH.MonadAlternative IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadPlus IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseQuasi IODefined in ghc-internal-10.0.0 · GHC.Internal.TH.MonadMonadIO IODefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.IO.ClassSemigroup a => Semigroup (IO a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid a => Monoid (IO a)Defined in ghc-internal-10.0.0 · GHC.Internal.Basea ~ () => HPrintfType (IO a)Defined in base-4.23.0.0 · Text.Printfa ~ () => PrintfType (IO a)Defined in base-4.23.0.0 · Text.Printf
A de Bruijn index for a binder within a KindRep.
The representation produced by GHC for conjuring up the kind of a TypeRep.
Instances12Bounded, Enum, Eq, Data, Ord, Read, …
Bounded OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEnum OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEq OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesData OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataOrd OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesRead OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.ReadShow OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.ShowIx OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.IxGeneric OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.Basetype Rep Ordering = D1 ('MetaDataDefined in ghc-internal-10.0.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))
SPEC is used by GHC in the SpecConstr pass in order to inform
the compiler when to be particularly aggressive. In particular, it
tells GHC to specialize regardless of size or the number of
specializations. However, not all loops fall into this category.
Libraries can specify this by using SPEC data type to inform which loops should be aggressively specialized. For example, instead of
loop x where loop arg = ...write
loop SPEC x where loop !_ arg = ...There is no semantic difference between SPEC and SPEC2,
we just need a type with two constructors lest it is optimised away
before SpecConstr.
This type is reexported from GHC.Exts since GHC 9.0 and base-4.15.
For compatibility with earlier releases import it from GHC.Internal.Types
in ghc-internal package.
Instances1Show
Show TypeLitSortDefined in ghc-internal-10.0.0 · GHC.Internal.Show
Deprecated. Void# is now an alias for the unboxed tuple (# #).
Instances335HasResolution, Category, Generic1, Bifoldable1, Eq2, Ord2, …
Generic1 ComplexDefined in base-4.23.0.0 · Data.ComplexGeneric1 FirstDefined in base-4.23.0.0 · Data.SemigroupGeneric1 LastDefined in base-4.23.0.0 · Data.SemigroupGeneric1 MaxDefined in base-4.23.0.0 · Data.SemigroupGeneric1 MinDefined in base-4.23.0.0 · Data.SemigroupGeneric1 WrappedMonoidDefined in base-4.23.0.0 · Data.SemigroupGeneric1 NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 IdentityDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 FirstDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 LastDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 DownDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 DualDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 ProductDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 SumDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 ZipListDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 Par1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 SoloDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 []Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsCategory OpDefined in base-4.23.0.0 · Data.Functor.ContravariantHasResolution E0Defined in base-4.23.0.0 · Data.FixedHasResolution E1Defined in base-4.23.0.0 · Data.FixedHasResolution E12Defined in base-4.23.0.0 · Data.FixedHasResolution E2Defined in base-4.23.0.0 · Data.FixedHasResolution E3Defined in base-4.23.0.0 · Data.FixedHasResolution E6Defined in base-4.23.0.0 · Data.FixedHasResolution E9Defined in base-4.23.0.0 · Data.FixedGeneric1 (WrappedMonad m)Defined in base-4.23.0.0 · Control.ApplicativeGeneric1 (Arg a)Defined in base-4.23.0.0 · Data.SemigroupGeneric1 (Either a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple2 a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonad m => Category (Kleisli m)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowGeneric1 (WrappedArrow a b)Defined in base-4.23.0.0 · Control.ApplicativeGeneric1 (Kleisli m a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowGeneric1 (Tuple3 a b)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsCategory (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.CategoryGeneric1 (Tuple4 a b c)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor f => Generic1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.ComposeFunctor f => Generic1 (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple5 a b c d)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple6 a b c d e)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple7 a b c d e f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple8 a b c d e f g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple9 a b c d e f g h)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple10 a b c d e f g h i)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple11 a b c d e f g h i j)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple12 a b c d e f g h i j k)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple13 a b c d e f g h i j k l)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple14 a b c d e f g h i j k l m)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple15 a b c d e f g h i j k l m n)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonad ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonad U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyFunctor U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor V1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsApplicative ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyApplicative U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableFoldable U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UAddrDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UCharDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UFloatDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UIntDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UWordDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable V1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableTraversable U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UAddrDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UCharDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UFloatDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UIntDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UWordDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable V1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyAlternative U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadPlus ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonadPlus U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadZip ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipMonadZip U1Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipBifoldable ConstDefined in base-4.23.0.0 · Data.BifoldableBifoldable1 ConstDefined in base-4.23.0.0 · Data.Bifoldable1Bifunctor ConstDefined in base-4.23.0.0 · Data.BifunctorBitraversable ConstDefined in base-4.23.0.0 · Data.BitraversableFoldable1 V1Defined in base-4.23.0.0 · Data.Foldable1Eq1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 U1Defined in base-4.23.0.0 · Data.Functor.ClassesEq1 UAddrDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UCharDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UDoubleDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UFloatDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UIntDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UWordDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 V1Defined in base-4.23.0.0 · Data.Functor.ClassesEq2 ConstDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 U1Defined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UAddrDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UCharDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UDoubleDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UFloatDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UIntDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UWordDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 V1Defined in base-4.23.0.0 · Data.Functor.ClassesOrd2 ConstDefined in base-4.23.0.0 · Data.Functor.ClassesRead1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesRead1 U1Defined in base-4.23.0.0 · Data.Functor.ClassesRead1 V1Defined in base-4.23.0.0 · Data.Functor.ClassesRead2 ConstDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 U1Defined in base-4.23.0.0 · Data.Functor.ClassesShow1 UAddrDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UCharDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UDoubleDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UFloatDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UIntDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UWordDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 V1Defined in base-4.23.0.0 · Data.Functor.ClassesShow2 ConstDefined in base-4.23.0.0 · Data.Functor.ClassesContravariant ProxyDefined in base-4.23.0.0 · Data.Functor.ContravariantContravariant U1Defined in base-4.23.0.0 · Data.Functor.ContravariantContravariant V1Defined in base-4.23.0.0 · Data.Functor.ContravariantMonad f => Monad (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonad f => Monad (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonad f => Monad (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsData p => Data (U1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataData p => Data (V1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataData t => Data (Proxy t)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataFunctor (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.ConstFunctor (URec Char)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Double)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Float)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Int)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Word)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec (Ptr ()))Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor f => Functor (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidFunctor f => Functor (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalFunctor f => Functor (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadFix f => MonadFix (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonadFix f => MonadFix (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonadFix f => MonadFix (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonadFail f => MonadFail (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidApplicative f => Applicative (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidApplicative f => Applicative (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalApplicative f => Applicative (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonoid m => Applicative (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.ConstFoldable f => Foldable (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableFoldable f => Foldable (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableFoldable f => Foldable (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableTraversable f => Traversable (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableTraversable f => Traversable (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableTraversable f => Traversable (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative f => Alternative (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidAlternative f => Alternative (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalAlternative f => Alternative (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Generic1 f, Alternative (Rep1 f)) => Alternative (Generically1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadPlus f => MonadPlus (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonadPlus f => MonadPlus (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonadPlus f => MonadPlus (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadZip f => MonadZip (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipMonadZip f => MonadZip (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipBifoldable (K1 i)Defined in base-4.23.0.0 · Data.BifoldableBifunctor (K1 i)Defined in base-4.23.0.0 · Data.BifunctorBitraversable (K1 i)Defined in base-4.23.0.0 · Data.BitraversableFoldable1 f => Foldable1 (Ap f)Defined in base-4.23.0.0 · Data.Foldable1Foldable1 f => Foldable1 (Alt f)Defined in base-4.23.0.0 · Data.Foldable1Foldable1 f => Foldable1 (Rec1 f)Defined in base-4.23.0.0 · Data.Foldable1Eq1 f => Eq1 (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesEq a => Eq1 (Const a)Defined in base-4.23.0.0 · Data.Functor.Classes(Generic1 f, Eq1 (Rep1 f)) => Eq1 (Generically1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesOrd1 f => Ord1 (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesOrd a => Ord1 (Const a)Defined in base-4.23.0.0 · Data.Functor.Classes(Generic1 f, Ord1 (Rep1 f)) => Ord1 (Generically1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesRead1 f => Read1 (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesRead a => Read1 (Const a)Defined in base-4.23.0.0 · Data.Functor.ClassesShow1 f => Show1 (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesShow a => Show1 (Const a)Defined in base-4.23.0.0 · Data.Functor.ClassesContravariant (Const a)Defined in base-4.23.0.0 · Data.Functor.ContravariantContravariant f => Contravariant (Alt f)Defined in base-4.23.0.0 · Data.Functor.ContravariantContravariant f => Contravariant (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Applicative f, Bounded a) => Bounded (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid(Monad f, Monad g) => Monad (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Monad f, Monad g) => Monad (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Data (f a), Data a, Typeable f) => Data (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Data (f a), Data a, Typeable f) => Data (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Data (f p), Typeable f, Data p) => Data (Rec1 f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Coercible a b, Data a, Data b) => Data (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(a ~ b, Data a) => Data (a :~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataFunctor (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Functor f, Functor g) => Functor (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Functor f, Functor g) => Functor (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Functor f, Functor g) => Functor (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Functor f, Functor g) => Functor (f :+: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Applicative f, Num a) => Num (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidNote that even if the underlying Num and Applicative instances are lawful, for most Applicatives, this instance will not be lawful. If you use this instance with the list Applicative, the following customary laws will not hold:
Commutativity:
Example2 expressions Ap [10,20] + Ap [1,2]Ap {getAp = [11,12,21,22]}Ap [1,2] + Ap [10,20]Ap {getAp = [11,21,12,22]}
Additive inverse:
Example2 expressions Ap [] + negate (Ap [])Ap {getAp = []}fromInteger 0 :: Ap [] IntAp {getAp = [0]}
Distributivity:
Example2 expressions Ap [1,2] * (3 + 4)Ap {getAp = [7,14]}(Ap [1,2] * 3) + (Ap [1,2] * 4)Ap {getAp = [7,11,10,14]}
(MonadFix f, MonadFix g) => MonadFix (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(MonadFix f, MonadFix g) => MonadFix (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonoid c => Applicative (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Applicative f, Applicative g) => Applicative (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Applicative f, Applicative g) => Applicative (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Foldable f, Foldable g) => Foldable (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Foldable f, Foldable g) => Foldable (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Foldable f, Foldable g) => Foldable (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Foldable f, Foldable g) => Foldable (f :+: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Traversable f, Traversable g) => Traversable (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Traversable f, Traversable g) => Traversable (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Traversable f, Traversable g) => Traversable (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Traversable f, Traversable g) => Traversable (f :+: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative f => Semigroup (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal(Applicative f, Semigroup a) => Semigroup (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidAlternative f => Monoid (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal(Applicative f, Monoid a) => Monoid (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid(Alternative f, Alternative g) => Alternative (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Alternative f, Alternative g) => Alternative (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(MonadPlus f, MonadPlus g) => MonadPlus (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(MonadZip f, MonadZip g) => MonadZip (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(MonadZip f, MonadZip g) => MonadZip (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.Zip(Foldable1 f, Foldable1 g) => Foldable1 (Product f g)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (Sum f g)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (f :*: g)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (f :+: g)Defined in base-4.23.0.0 · Data.Foldable1Eq c => Eq1 (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Classes(Eq1 f, Eq1 g) => Eq1 (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Eq1 f, Eq1 g) => Eq1 (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Eq1 f, Eq1 g) => Eq1 (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Classes(Eq1 f, Eq1 g) => Eq1 (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ClassesOrd c => Ord1 (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Classes(Ord1 f, Ord1 g) => Ord1 (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Ord1 f, Ord1 g) => Ord1 (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Ord1 f, Ord1 g) => Ord1 (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Classes(Ord1 f, Ord1 g) => Ord1 (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ClassesRead c => Read1 (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Classes(Read1 f, Read1 g) => Read1 (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Read1 f, Read1 g) => Read1 (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Read1 f, Read1 g) => Read1 (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Classes(Read1 f, Read1 g) => Read1 (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ClassesShow c => Show1 (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Classes(Show1 f, Show1 g) => Show1 (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Show1 f, Show1 g) => Show1 (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Show1 f, Show1 g) => Show1 (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Classes(Show1 f, Show1 g) => Show1 (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ClassesContravariant (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Contravariant f, Contravariant g) => Contravariant (Product f g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Contravariant f, Contravariant g) => Contravariant (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Contravariant f, Contravariant g) => Contravariant (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Contravariant f, Contravariant g) => Contravariant (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ContravariantMonad f => Monad (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((:*:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((:+:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Typeable i, Data p, Data c) => Data (K1 i c p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataFunctor f => Functor (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Functor f, Functor g) => Functor (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Functor f, Functor g) => Functor (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadFix f => MonadFix (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixApplicative f => Applicative (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Applicative f, Applicative g) => Applicative (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Applicative f, Applicative g) => Applicative (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable f => Foldable (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Foldable f, Foldable g) => Foldable (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Foldable f, Foldable g) => Foldable (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable f => Traversable (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Traversable f, Traversable g) => Traversable (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Traversable f, Traversable g) => Traversable (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative f => Alternative (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Alternative f, Applicative g) => Alternative (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Alternative f, Applicative g) => Alternative (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadPlus f => MonadPlus (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadZip f => MonadZip (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipFoldable1 f => Foldable1 (M1 i c f)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (Compose f g)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (f :.: g)Defined in base-4.23.0.0 · Data.Foldable1Eq1 f => Eq1 (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Classes(Eq1 f, Eq1 g) => Eq1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Eq1 f, Eq1 g) => Eq1 (f :.: g)Defined in base-4.23.0.0 · Data.Functor.ClassesOrd1 f => Ord1 (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Classes(Ord1 f, Ord1 g) => Ord1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Ord1 f, Ord1 g) => Ord1 (f :.: g)Defined in base-4.23.0.0 · Data.Functor.ClassesRead1 f => Read1 (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Classes(Read1 f, Read1 g) => Read1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Read1 f, Read1 g) => Read1 (f :.: g)Defined in base-4.23.0.0 · Data.Functor.ClassesShow1 f => Show1 (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Classes(Show1 f, Show1 g) => Show1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Show1 f, Show1 g) => Show1 (f :.: g)Defined in base-4.23.0.0 · Data.Functor.ClassesContravariant f => Contravariant (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Functor f, Contravariant g) => Contravariant (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Functor f, Contravariant g) => Contravariant (f :.: g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Data p, Data (f p), Typeable c, Typeable i, Typeable f) => Data (M1 i c f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Typeable f, Typeable g, Data p, Data (f (g p))) => Data ((:.:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Datatype Rep1 Complex = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Complex"Complex"
"Data.Complex"
"base-4.23.0.0-d231"
'False) (C1 ('MetaCons":+"
('InfixI 'NotAssociative6
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1))type Rep1 First = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"First"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"First"
'PrefixI 'True) (S1 ('MetaSel ('Just"getFirst"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Last = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Last"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Last"
'PrefixI 'True) (S1 ('MetaSel ('Just"getLast"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Max = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Max"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Max"
'PrefixI 'True) (S1 ('MetaSel ('Just"getMax"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Min = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Min"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Min"
'PrefixI 'True) (S1 ('MetaSel ('Just"getMin"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 WrappedMonoid = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"WrappedMonoid"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"WrapMonoid"
'PrefixI 'True) (S1 ('MetaSel ('Just"unwrapMonoid"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 NonEmpty = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"NonEmpty"
"GHC.Internal.Base"
"ghc-internal"
'False) (C1 ('MetaCons":|"
('InfixI 'RightAssociative5
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))type Rep1 Identity = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Identity"
"GHC.Internal.Data.Functor.Identity"
"ghc-internal"
'True) (C1 ('MetaCons"Identity"
'PrefixI 'True) (S1 ('MetaSel ('Just"runIdentity"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 First = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"First"
"GHC.Internal.Data.Monoid"
"ghc-internal"
'True) (C1 ('MetaCons"First"
'PrefixI 'True) (S1 ('MetaSel ('Just"getFirst"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))type Rep1 Last = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Last"
"GHC.Internal.Data.Monoid"
"ghc-internal"
'True) (C1 ('MetaCons"Last"
'PrefixI 'True) (S1 ('MetaSel ('Just"getLast"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))type Rep1 Down = D1 ('MetaDataDefined in ghc-internal-10.0.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))type Rep1 Dual = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Dual"
"GHC.Internal.Data.Semigroup.Internal"
"ghc-internal"
'True) (C1 ('MetaCons"Dual"
'PrefixI 'True) (S1 ('MetaSel ('Just"getDual"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Product = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Product"
"GHC.Internal.Data.Semigroup.Internal"
"ghc-internal"
'True) (C1 ('MetaCons"Product"
'PrefixI 'True) (S1 ('MetaSel ('Just"getProduct"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Sum = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Sum"
"GHC.Internal.Data.Semigroup.Internal"
"ghc-internal"
'True) (C1 ('MetaCons"Sum"
'PrefixI 'True) (S1 ('MetaSel ('Just"getSum"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 ZipList = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"ZipList"
"GHC.Internal.Functor.ZipList"
"ghc-internal"
'True) (C1 ('MetaCons"ZipList"
'PrefixI 'True) (S1 ('MetaSel ('Just"getZipList"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))type Rep1 Par1 = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Par1"
"GHC.Internal.Generics"
"ghc-internal"
'True) (C1 ('MetaCons"Par1"
'PrefixI 'True) (S1 ('MetaSel ('Just"unPar1"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Maybe = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Maybe"
"GHC.Internal.Maybe"
"ghc-internal"
'False) (C1 ('MetaCons"Nothing"
'PrefixI 'False) U1 :+: C1 ('MetaCons"Just"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Solo = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Solo"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"MkSolo"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 (WrappedArrow a b) = D1 ('MetaDataDefined in base-4.23.0.0 · Control.Applicative"WrappedArrow"
"Control.Applicative"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"WrapArrow"
'PrefixI 'True) (S1 ('MetaSel ('Just"unwrapArrow"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (a b))))type Rep1 (WrappedMonad m) = D1 ('MetaDataDefined in base-4.23.0.0 · Control.Applicative"WrappedMonad"
"Control.Applicative"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"WrapMonad"
'PrefixI 'True) (S1 ('MetaSel ('Just"unwrapMonad"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m)))type Rep1 (Compose f g) = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Functor.Compose"Compose"
"Data.Functor.Compose"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Compose"
'PrefixI 'True) (S1 ('MetaSel ('Just"getCompose"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))type Rep1 (Arg a) = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Arg"
"Data.Semigroup"
"base-4.23.0.0-d231"
'False) (C1 ('MetaCons"Arg"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 (Kleisli m a) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Arrow"Kleisli"
"GHC.Internal.Control.Arrow"
"ghc-internal"
'True) (C1 ('MetaCons"Kleisli"
'PrefixI 'True) (S1 ('MetaSel ('Just"runKleisli"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (FUN 'Many a :.: Rec1 m)))type Rep1 (Either a) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Either"
"GHC.Internal.Data.Either"
"ghc-internal"
'False) (C1 ('MetaCons"Left"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons"Right"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 (Tuple10 a b c d e f g h i) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple10"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple11 a b c d e f g h i j) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple11"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple12 a b c d e f g h i j k) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple12"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple13 a b c d e f g h i j k l) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple13"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 l) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple14 a b c d e f g h i j k l m) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple14"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 l)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple15 a b c d e f g h i j k l m n) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple15"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g)))) :*: (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 l) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 n) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple2 a) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple2"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,)"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 (Tuple3 a b) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple3"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,)"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))type Rep1 (Tuple4 a b c) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple4"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,)"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))type Rep1 (Tuple5 a b c d) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple5"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,)"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))type Rep1 (Tuple6 a b c d e) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple6"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,)"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))type Rep1 (Tuple7 a b c d e f) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple7"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,)"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))type Rep1 (Tuple8 a b c d e f g) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple8"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))type Rep1 (Tuple9 a b c d e f g h) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple9"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (f :.: g) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics":.:"
"GHC.Internal.Generics"
"ghc-internal"
'True) (C1 ('MetaCons"Comp1"
'PrefixI 'True) (S1 ('MetaSel ('Just"unComp1"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))type Rep1 [] = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"List"
"GHC.Internal.Types"
"ghc-internal"
'False) (C1 ('MetaCons"[]"
'PrefixI 'False) U1 :+: C1 ('MetaCons":"
('InfixI 'RightAssociative5
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))
The type constructor Any :: forall k. k allows creating an arbitrary type
of the given kind.
It can be used to create a placeholder type when you only have a kind in hand.
You can use unsafeCoerce# to unsafely coerce a value from ty :: k to Any @k
and back. As per the documentation of unsafeCoerce#, this is only sound if both
sides have the exact sameruntime representation. Some examples:
unsafeCoerce# True :: (Any :: Type) -- OK
unsafeCoerce# (1# :: Int#) :: (Any :: TYPE IntRep) -- OK
unsafeCoerce# True :: (Any :: Type IntRep) -- INVALID
unsafeCoerce True :: (Any :: UnliftedType) -- INVALID
unsafeCoerce (ba :: ByteArray#) :: (Any :: Type) -- INVALID
To avoid accidentally unsafe-coercing between different representations,
it is recommended to:
- use explicit type annotations or type applications at every use-site
of unsafeCoerce#
- use representation-monomorphic variants such as unsafeCoerce or
unsafeCoerceUnlifted.
In particular, this also implies it is safe to round-trip unsafe-coercion via Any,
as long as the kinds line up e.g. unsafeCoerce (unsafeCoerce (val :: a) :: Any) :: a
is safe in that way.
Instances19Bounded, Enum, Eq, Data, Ord, Read, …
Bounded BoolDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEnum BoolDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEq BoolDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesData BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataOrd BoolDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesRead BoolDefined in ghc-internal-10.0.0 · GHC.Internal.ReadShow BoolDefined in ghc-internal-10.0.0 · GHC.Internal.ShowIx BoolDefined in ghc-internal-10.0.0 · GHC.Internal.IxGeneric BoolDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsBits BoolDefined in ghc-internal-10.0.0 · GHC.Internal.BitsInterpret Bool as 1-bit bit-field
FiniteBits BoolDefined in ghc-internal-10.0.0 · GHC.Internal.BitsStorable BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableSingKind BoolDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsLift BoolDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftSingI 'FalseDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsSingI 'TrueDefined in ghc-internal-10.0.0 · GHC.Internal.Genericstype Rep Bool = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Bool"
"GHC.Internal.Types"
"ghc-internal"
'False) (C1 ('MetaCons"False"
'PrefixI 'False) U1 :+: C1 ('MetaCons"True"
'PrefixI 'False) U1)type DemoteRep Bool = BoolDefined in ghc-internal-10.0.0 · GHC.Internal.Genericsdata SingDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
The 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 |
Instances26Bounded, Enum, Data, Read, Ix, Storable, …
Bounded CharDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEnum CharDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEq CharDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesData CharDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataOrd CharDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesRead CharDefined in ghc-internal-10.0.0 · GHC.Internal.ReadShow CharDefined in ghc-internal-10.0.0 · GHC.Internal.ShowIx CharDefined in ghc-internal-10.0.0 · GHC.Internal.IxStorable CharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorableIsChar CharDefined in base-4.23.0.0 · Text.PrintfPrintfArg CharDefined in base-4.23.0.0 · Text.PrintfLift CharDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftTestCoercion SCharDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsTestEquality SCharDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsGeneric1 (URec Char)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UCharDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UCharDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Char)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec Char p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec Char p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsShow (URec Char p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric (URec Char p)Defined in ghc-internal-10.0.0 · GHC.Internal.Genericstype Rep (URec Char p) = D1 ('MetaDataDefined in ghc-internal-10.0.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-10.0.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 Compare a b = CmpChar a bDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Orddata URec CharDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsUsed for marking occurrences of Char#
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
Data type Dict provides a simple way to wrap up a (lifted)
constraint as a type
Constructors
a => MkDictBox
Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.
Instances26Enum, Floating, Fractional, Data, Num, Read, …
Enum DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanfromEnum just truncates its argument, beware of all sorts of overflows.
List generators have extremely peculiar behavior, mandated by Haskell Report 2010:
Example1 expression [0..1.5][0.0,1.0,2.0]
Eq DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesFloating DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.FloatFractional DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanThis instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.
Example4 expressions 0 == (-0 :: Double)Truerecip 0 == recip (-0 :: Double)Falsemap (/ 0) [-1, 0, 1][-Infinity,NaN,Infinity]map (* 0) $ map (/ 0) [-1, 0, 1][NaN,NaN,NaN]
Data DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataNum DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanThis instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:
Example3 expressions (0.1 + 0.1) + 0.4 == 0.1 + (0.1 + 0.4)False(0.1 + 0.2) * 0.3 == 0.1 * 0.3 + 0.2 * 0.3False(0.1 * 0.1) * 0.3 == 0.1 * (0.1 * 0.3)False
Ord DoubleDefined in ghc-internal-10.0.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.Read DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.ReadReal DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanRealFloat DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.FloatRealFrac DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanBeware that results for non-finite arguments are garbage:
Example2 expressions [ f x | f <- [round, floor, ceiling], x <- [-1/0, 0/0, 1/0] ] :: [Int][0,0,0,0,0,0,0,0,0]map properFraction [-1/0, 0/0, 1/0] :: [(Int, Double)][(0,0.0),(0,0.0),(0,0.0)]
and get even more non-sensical if you ask for Integer instead of Int.
Show DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanStorable DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorablePrintfArg DoubleDefined in base-4.23.0.0 · Text.PrintfLift DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftGeneric1 (URec Double)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Double)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsShow (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.Genericstype Rep (URec Double p) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UDouble"
'PrefixI 'True) (S1 ('MetaSel ('Just"uDouble#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UDouble))type Rep1 (URec Double) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UDouble"
'PrefixI 'True) (S1 ('MetaSel ('Just"uDouble#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UDouble))data URec DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsUsed for marking occurrences of Double#
Constructors
Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.
Instances26Enum, Floating, Fractional, Data, Num, Read, …
Enum FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanfromEnum just truncates its argument, beware of all sorts of overflows.
List generators have extremely peculiar behavior, mandated by Haskell Report 2010:
Example1 expression [0..1.5 :: Float][0.0,1.0,2.0]
Eq FloatDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesFloating FloatDefined in ghc-internal-10.0.0 · GHC.Internal.FloatFractional FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanThis instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero.
Example4 expressions 0 == (-0 :: Float)Truerecip 0 == recip (-0 :: Float)Falsemap (/ 0) [-1, 0, 1 :: Float][-Infinity,NaN,Infinity]map (* 0) $ map (/ 0) [-1, 0, 1 :: Float][NaN,NaN,NaN]
Data FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataNum FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanThis instance implements IEEE 754 standard with all its usual pitfalls about NaN, infinities and negative zero. Neither addition nor multiplication are associative or distributive:
Example3 expressions (0.1 + 0.1 :: Float) + 0.5 == 0.1 + (0.1 + 0.5)False(0.1 + 0.2 :: Float) * 0.9 == 0.1 * 0.9 + 0.2 * 0.9False(0.1 * 0.1 :: Float) * 0.9 == 0.1 * (0.1 * 0.9)False
Ord FloatDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesRead FloatDefined in ghc-internal-10.0.0 · GHC.Internal.ReadReal FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanRealFloat FloatDefined in ghc-internal-10.0.0 · GHC.Internal.FloatRealFrac FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanBeware that results for non-finite arguments are garbage:
Example2 expressions [ f x | f <- [round, floor, ceiling], x <- [-1/0, 0/0, 1/0 :: Float] ] :: [Int][0,0,0,0,0,0,0,0,0]map properFraction [-1/0, 0/0, 1/0] :: [(Int, Float)][(0,0.0),(0,0.0),(0,0.0)]
and get even more non-sensical if you ask for Integer instead of Int.
Show FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Float · orphanStorable FloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorablePrintfArg FloatDefined in base-4.23.0.0 · Text.PrintfLift FloatDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftGeneric1 (URec Float)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UFloatDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UFloatDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Float)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsShow (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.Genericstype Rep (URec Float p) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UFloat"
'PrefixI 'True) (S1 ('MetaSel ('Just"uFloat#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UFloat))type Rep1 (URec Float) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UFloat"
'PrefixI 'True) (S1 ('MetaSel ('Just"uFloat#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UFloat))data URec FloatDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsUsed for marking occurrences of Float#
Constructors
A fixed-precision integer type with at least the range [-2^29 .. 2^29-1].
The exact range for a given implementation can be determined by using
Prelude.minBound and Prelude.maxBound from the Prelude.Bounded class.
Instances27Bounded, Enum, Integral, Data, Num, Read, …
Bounded IntDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEnum IntDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEq IntDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesIntegral IntDefined in ghc-internal-10.0.0 · GHC.Internal.RealData IntDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataNum IntDefined in ghc-internal-10.0.0 · GHC.Internal.NumOrd IntDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesRead IntDefined in ghc-internal-10.0.0 · GHC.Internal.ReadReal IntDefined in ghc-internal-10.0.0 · GHC.Internal.RealShow IntDefined in ghc-internal-10.0.0 · GHC.Internal.ShowIx IntDefined in ghc-internal-10.0.0 · GHC.Internal.IxBits IntDefined in ghc-internal-10.0.0 · GHC.Internal.BitsFiniteBits IntDefined in ghc-internal-10.0.0 · GHC.Internal.BitsStorable IntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorablePrintfArg IntDefined in base-4.23.0.0 · Text.PrintfLift IntDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftGeneric1 (URec Int)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UIntDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UIntDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Int)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec Int p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec Int p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsShow (URec Int p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric (URec Int p)Defined in ghc-internal-10.0.0 · GHC.Internal.Genericstype Rep (URec Int p) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UInt"
'PrefixI 'True) (S1 ('MetaSel ('Just"uInt#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UInt))type Rep1 (URec Int) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UInt"
'PrefixI 'True) (S1 ('MetaSel ('Just"uInt#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UInt))data URec IntDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsUsed for marking occurrences of Int#
Constructors
MkIntBox a
The runtime representation of lifted types.
Instances120Category, Lift, Arrow, ArrowApply, ArrowChoice, ArrowLoop, …
Lift ByteArrayDefined in base-4.23.0.0 · Data.Array.ByteLift VoidDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift NaturalDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift ForeignSrcLangDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift Int16Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift Int32Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift Int64Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift Int8Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift ExtensionDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift AnnLookupDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift AnnTargetDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift BangDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift BodyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift BytesDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift CallconvDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift ClauseDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift ConDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift DecDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift DecidedStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift DerivClauseDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift DerivStrategyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift DocLocDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift ExpDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift FamilyResultSigDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift FixityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift FixityDirectionDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift ForeignDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift FunDepDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift GuardDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift InfoDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift InjectivityAnnDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift InlineDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift LitDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift LocDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift MatchDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift ModNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift ModuleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift NameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift NameFlavourDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift NameIsDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift NameSpaceDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift NamespaceSpecifierDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift OccNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift OverlapDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift PatDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift PatSynArgsDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift PatSynDirDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift PhasesDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift PkgNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift PragmaDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift RangeDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift RoleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift RuleBndrDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift RuleMatchDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift SafetyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift SourceStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift SourceUnpackednessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift StmtDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift TyLitDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift TySynEqnDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift TypeDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift TypeFamilyHeadDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift BoolDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift CharDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift FloatDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift IntDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift WordDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift Word16Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift Word32Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift Word64Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift Word8Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift ()Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftIntegral a => Lift (Ratio a)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift a => Lift (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift a => Lift (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift a => Lift (TyVarBndr a)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift a => Lift [a]Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift (Fixed a)Defined in base-4.23.0.0 · Data.FixedLift (TExp a)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b) => Lift (Either a b)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b) => Lift (a, b)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftCategory (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Category(Lift a, Lift b, Lift c) => Lift (a, b, c)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d) => Lift (a, b, c, d)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e) => Lift (a, b, c, d, e)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift (a, b, c, d, e, f)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift (a, b, c, d, e, f, g)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftLift a => Lift (# a #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b) => Lift (# a, b #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b) => Lift (# a | b #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c) => Lift (# a, b, c #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c) => Lift (# a | b | c #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d) => Lift (# a, b, c, d #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d) => Lift (# a | b | c | d #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e) => Lift (# a, b, c, d, e #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e) => Lift (# a | b | c | d | e #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift (# a, b, c, d, e, f #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift (# a | b | c | d | e | f #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift (# a, b, c, d, e, f, g #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift (# a | b | c | d | e | f | g #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftArrow (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowArrowApply (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowArrowChoice (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowArrowLoop (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonad ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadFix ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixApplicative ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.Basetype Rep1 First = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"First"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"First"
'PrefixI 'True) (S1 ('MetaSel ('Just"getFirst"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Last = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Last"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Last"
'PrefixI 'True) (S1 ('MetaSel ('Just"getLast"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Max = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Max"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Max"
'PrefixI 'True) (S1 ('MetaSel ('Just"getMax"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Min = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Min"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Min"
'PrefixI 'True) (S1 ('MetaSel ('Just"getMin"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 WrappedMonoid = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"WrappedMonoid"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"WrapMonoid"
'PrefixI 'True) (S1 ('MetaSel ('Just"unwrapMonoid"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Par1 = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Par1"
"GHC.Internal.Generics"
"ghc-internal"
'True) (C1 ('MetaCons"Par1"
'PrefixI 'True) (S1 ('MetaSel ('Just"unPar1"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 (Compose f g) = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Functor.Compose"Compose"
"Data.Functor.Compose"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Compose"
'PrefixI 'True) (S1 ('MetaSel ('Just"getCompose"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))type Rep1 (f :.: g) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics":.:"
"GHC.Internal.Generics"
"ghc-internal"
'True) (C1 ('MetaCons"Comp1"
'PrefixI 'True) (S1 ('MetaSel ('Just"unComp1"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))
The builtin linked list type.
In Haskell, lists are one of the most important data types as they are
often used analogous to loops in imperative programming languages.
These lists are singly linked, which makes them unsuited for operations
that require \mathcal{O}(1) access. Instead, they are intended to
be traversed.
You can use List a or [a] in type signatures:
length :: [a] -> Intor
length :: List a -> IntThey are fully equivalent, and List a will be normalised to [a].
Usage
Lists are constructed recursively using the right-associative constructor operator (or cons)
(:) :: a -> [a] -> [a], which prepends an element to a list,
and the empty list [].
(1 : 2 : 3 : []) == (1 : (2 : (3 : []))) == [1, 2, 3]
Lists can also be constructed using list literals
of the form [x_1, x_2, ..., x_n]
which are syntactic sugar and, unless -XOverloadedLists is enabled,
are translated into uses of (:) and []
String literals, like "I 💜 hs", are translated into
Lists of characters, ['I', ' ', '💜', ' ', 'h', 's'].
Implementation
Internally and in memory, all the above are represented like this, with arrows being pointers to locations in memory.
╭───┬───┬──╮ ╭───┬───┬──╮ ╭───┬───┬──╮ ╭────╮
│(:)│ │ ─┼──>│(:)│ │ ─┼──>│(:)│ │ ─┼──>│ [] │
╰───┴─┼─┴──╯ ╰───┴─┼─┴──╯ ╰───┴─┼─┴──╯ ╰────╯
v v v
1 2 3Examples
>>> ['H', 'a', 's', 'k', 'e', 'l', 'l']
"Haskell"
>>> 1 : [4, 1, 5, 9]
[1,4,1,5,9]
>>> [] : [] : []
[[],[]]
Instances31Monad, Functor, MonadFix, MonadFail, Applicative, Foldable, …
Monad []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadFix []Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonadFail []Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FailApplicative []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseFoldable []Defined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableTraversable []Defined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableAlternative []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseCombines lists by concatenation, starting from the empty list.
MonadPlus []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseCombines lists by concatenation, starting from the empty list.
MonadZip []Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipEq1 []Defined in base-4.23.0.0 · Data.Functor.ClassesOrd1 []Defined in base-4.23.0.0 · Data.Functor.ClassesRead1 []Defined in base-4.23.0.0 · Data.Functor.ClassesShow1 []Defined in base-4.23.0.0 · Data.Functor.ClassesGeneric1 []Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsLift a => Lift [a]Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftIsList [a]Defined in ghc-internal-10.0.0 · GHC.Internal.IsListEq a => Eq [a]Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesData a => Data [a]Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataFor historical reasons, the constructor name used for
(:)is"(:)". In a derived instance, it would be":".Ord a => Ord [a]Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesRead a => Read [a]Defined in ghc-internal-10.0.0 · GHC.Internal.ReadShow a => Show [a]Defined in ghc-internal-10.0.0 · GHC.Internal.Showa ~ Char => IsString [a]Defined in ghc-internal-10.0.0 · GHC.Internal.Data.String(a ~ Char)context was introduced in4.9.0.0Generic [a]Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup [a]Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid [a]Defined in ghc-internal-10.0.0 · GHC.Internal.BaseIsChar c => PrintfArg [c]Defined in base-4.23.0.0 · Text.PrintfIsChar c => PrintfType [c]Defined in base-4.23.0.0 · Text.Printftype Rep [a] = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"List"
"GHC.Internal.Types"
"ghc-internal"
'False) (C1 ('MetaCons"[]"
'PrefixI 'False) U1 :+: C1 ('MetaCons":"
('InfixI 'RightAssociative5
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))type Rep1 [] = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"List"
"GHC.Internal.Types"
"ghc-internal"
'False) (C1 ('MetaCons"[]"
'PrefixI 'False) U1 :+: C1 ('MetaCons":"
('InfixI 'RightAssociative5
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))type Item [a] = aDefined in ghc-internal-10.0.0 · GHC.Internal.IsList
GHC maintains a property that the kind of all inhabited types (as distinct from type constructors or type-level data) tells us the runtime representation of values of that type. This datatype encodes the choice of runtime value. Note that TYPE is parameterised by RuntimeRep; this is precisely what we mean by the fact that a type's kind encodes the runtime representation.
For boxed values (that is, values that are represented by a pointer), a further distinction is made, between lifted types (that contain ⊥), and unlifted ones (that don't).
Constructors
VecRep VecCount VecElema SIMD vector type
TupleRep [RuntimeRep]An unboxed tuple of the given reps
SumRep [RuntimeRep]An unboxed sum of the given reps
BoxedRep Levityboxed; represented by a pointer
IntRepsigned, word-sized value
Int8Repsigned, 8-bit value
Int16Repsigned, 16-bit value
Int32Repsigned, 32-bit value
Int64Repsigned, 64-bit value
WordRepunsigned, word-sized value
Word8Repunsigned, 8-bit value
Word16Repunsigned, 16-bit value
Word32Repunsigned, 32-bit value
Word64Repunsigned, 64-bit value
AddrRepA pointer, but not to a Haskell value
FloatRepa 32-bit floating point number
DoubleRepa 64-bit floating point number
Instances14Show, Lift, …
Show RuntimeRepDefined in ghc-internal-10.0.0 · GHC.Internal.ShowLift a => Lift (# a #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b) => Lift (# a, b #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b) => Lift (# a | b #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c) => Lift (# a, b, c #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c) => Lift (# a | b | c #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d) => Lift (# a, b, c, d #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d) => Lift (# a | b | c | d #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e) => Lift (# a, b, c, d, e #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e) => Lift (# a | b | c | d | e #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift (# a, b, c, d, e, f #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f) => Lift (# a | b | c | d | e | f #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift (# a, b, c, d, e, f, g #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift(Lift a, Lift b, Lift c, Lift d, Lift e, Lift f, Lift g) => Lift (# a | b | c | d | e | f | g #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift
(Kind) This is the kind of type-level symbols.
Instances7SingKind, TestCoercion, TestEquality, SingI, Compare, DemoteRep, …
SingKind SymbolDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTestCoercion SSymbolDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsTestEquality SSymbolDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsKnownSymbol a => SingI aDefined in ghc-internal-10.0.0 · GHC.Internal.Genericstype Compare a b = CmpSymbol a bDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Ordtype DemoteRep Symbol = StringDefined in ghc-internal-10.0.0 · GHC.Internal.Genericsdata SingSSym :: KnownSymbol s => R:SingSymbols s
The kind of types with lifted values. For example Int :: Type.
The runtime representation of unlifted types.
The kind of boxed, unlifted values, for example Array# or a user-defined
unlifted data type, using -XUnliftedDataTypes.
Element of a SIMD vector type
Instances27Bounded, Enum, Integral, Data, Num, Read, …
Bounded WordDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEnum WordDefined in ghc-internal-10.0.0 · GHC.Internal.EnumEq WordDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesIntegral WordDefined in ghc-internal-10.0.0 · GHC.Internal.RealData WordDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataNum WordDefined in ghc-internal-10.0.0 · GHC.Internal.NumOrd WordDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesRead WordDefined in ghc-internal-10.0.0 · GHC.Internal.ReadReal WordDefined in ghc-internal-10.0.0 · GHC.Internal.RealShow WordDefined in ghc-internal-10.0.0 · GHC.Internal.ShowIx WordDefined in ghc-internal-10.0.0 · GHC.Internal.IxBits WordDefined in ghc-internal-10.0.0 · GHC.Internal.BitsFiniteBits WordDefined in ghc-internal-10.0.0 · GHC.Internal.BitsStorable WordDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.StorablePrintfArg WordDefined in base-4.23.0.0 · Text.PrintfLift WordDefined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftGeneric1 (URec Word)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UWordDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UWordDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Word)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec Word p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec Word p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsShow (URec Word p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric (URec Word p)Defined in ghc-internal-10.0.0 · GHC.Internal.Genericstype Rep (URec Word p) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UWord"
'PrefixI 'True) (S1 ('MetaSel ('Just"uWord#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UWord))type Rep1 (URec Word) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"URec"
"GHC.Internal.Generics"
"ghc-internal"
'False) (C1 ('MetaCons"UWord"
'PrefixI 'True) (S1 ('MetaSel ('Just"uWord#"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) UWord))data URec WordDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsUsed for marking occurrences of Word#
Constructors
The runtime representation of a zero-width tuple, represented by no bits at all
Instances1Lift
Lift (# #)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.Lift
The kind of the empty unboxed tuple type (# #)
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.
Lifted, heterogeneous equality. By lifted, we mean that it
can be bogus (deferred type error). By heterogeneous, the two
types a and b might have different kinds. Because ~~ can
appear unexpectedly in error messages to users who do not care
about the difference between heterogeneous equality ~~ and
homogeneous equality ~, this is printed as ~ unless
-fprint-equality-relations is set.
In 0.7.0, the fixity was set to infix 4 to match the fixity of :~~:.
Low word of signed integer multiply.
Exponentiation.
attaches a C
function pointer addCFinalizerToWeak# fptr ptr flag eptr wfptr to a weak pointer w as a finalizer. If
flag is zero, fptr will be called with one argument,
ptr. Otherwise, it will be called with two arguments,
eptr and ptr. addCFinalizerToWeak# returns
1 on success, or 0 if w is already dead.
Add signed integers reporting overflow.
First member of result is the sum truncated to an Int#;
second member is zero if the true sum fits in an Int#,
nonzero if overflow occurred (the sum is either too large
or too small to fit in an Int#).
Add unsigned integers reporting overflow.
The first element of the pair is the result. The second element is
the carry flag, which is nonzero on overflow. See also plusWord2#.
Coerce directly from address to int. Users are discouraged from using this operation as it makes little sense on platforms with tagged pointers.
Convert an Addr# to a followable Any type.
Bitwise "and".
Pushes an annotation frame to the stack which can be reported by backtraces.
Retrieve the address of any Haskell value. This is
essentially an unsafeCoerce#, but if implemented as such
the core lint pass complains and fails to compile.
As a primop, it is opaque to core/stg, and only appears
in cmm (where the copy propagation pass will get rid of it).
Note that "a" must be a value, not a thunk! It's too late
for strictness analysis to enforce this, so you're on your
own to guarantee this. Also note that Addr# is not a GC
pointer - up to you to guarantee that it does not become
a dangling pointer immediately after you get it.
Compare and swap on a word-sized memory location.
Use as: s -> atomicCasAddrAddr# location expected desired s
This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).
Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Compare and swap on a 16 bit-sized and aligned memory location.
Use as: s -> atomicCasWordAddr16# location expected desired s
This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).
Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Compare and swap on a 32 bit-sized and aligned memory location.
Use as: s -> atomicCasWordAddr32# location expected desired s
This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).
Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Compare and swap on a 64 bit-sized and aligned memory location.
Use as: s -> atomicCasWordAddr64# location expected desired s
This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).
Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Compare and swap on a 8 bit-sized and aligned memory location.
Use as: s -> atomicCasWordAddr8# location expected desired s
This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).
Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Compare and swap on a word-sized and aligned memory location.
Use as: s -> atomicCasWordAddr# location expected desired s
This version always returns the old value read. This follows the normal protocol for CAS operations (and matches the underlying instruction on most architectures).
Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
The atomic exchange operation. Atomically exchanges the value at the first address with the Addr# given as second argument. Implies a read barrier.
Warning: this can fail with an unchecked exception.
The atomic exchange operation. Atomically exchanges the value at the address with the given value. Returns the old value. Implies a read barrier.
Warning: this can fail with an unchecked exception.
Modify the contents of a MutVar#, returning the previous
contents x :: a and the result of applying the given function to the
previous contents f x :: c.
The data type c (not a newtype!) must be a record whose first field
is of lifted type a :: Type and is not unpacked. For example, product
types c ~ Solo a or c ~ (a, b) work well. If the record type is both
monomorphic and strict in its first field, it's recommended to mark the
latter {-# NOUNPACK #-} explicitly.
Under the hood atomicModifyMutVar2# atomically replaces a pointer to an
old x :: a with a pointer to a selector thunk fst r, where
fst is a selector for the first field of the record and r is a
function application thunk r = f x.
atomicModifyIORef2Native from atomic-modify-general package makes an
effort to reflect restrictions on c faithfully, providing a
well-typed high-level wrapper.
Modify the contents of a MutVar#, returning the previous
contents and the result of applying the given function to the
previous contents.
Given an array and an offset in machine words, read an element. The index is assumed to be in bounds. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an address, read a machine word. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Atomically exchange the value of a MutVar#.
Given an array and an offset in machine words, write an element. The index is assumed to be in bounds. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an address, write a machine word. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Reverse the order of the bits in a word.
Reverse the order of the bits in a 16-bit word.
Reverse the order of the bits in a 32-bit word.
Reverse the order of the bits in a 64-bit word.
Reverse the order of the bits in a 8-bit word.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Broadcast a scalar to all elements of a vector.
Intended for use with pinned arrays; otherwise very unsafe!
Swap bytes in a word.
Swap bytes in the lower 16 bits of a word. The higher bytes are undefined.
Swap bytes in the lower 32 bits of a word. The higher bytes are undefined.
Swap bytes in a 64 bits of a word.
Given an array, an offset, the expected old value, and
the new value, perform an atomic compare and swap (i.e. write the new
value if the current value and the old value are the same pointer).
Returns 0 if the swap succeeds and 1 if it fails. Additionally, returns
the element at the offset after the operation completes. This means that
on a success the new value is returned, and on a failure the actual old
value (not the expected one) is returned. Implies a full memory barrier.
The use of a pointer equality on a boxed value makes this function harder
to use correctly than casIntArray#. All of the difficulties
of using reallyUnsafePtrEquality# correctly apply to
casArray# as well.
Warning: this can fail with an unchecked exception.
Given an array, an offset in 16 bit units, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an array, an offset in 32 bit units, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an array, an offset in 64 bit units, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an array, an offset in bytes, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an array, an offset in machine words, the expected old value, and the new value, perform an atomic compare and swap i.e. write the new value if the current value matches the provided old value. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Compare-and-swap: perform a pointer equality test between
the first value passed to this function and the value
stored inside the MutVar#. If the pointers are equal,
replace the stored value with the second value passed to this
function, otherwise do nothing.
Returns the final value stored inside the MutVar#.
The Int# indicates whether a swap took place,
with 1# meaning that we didn't swap, and 0#
that we did.
Implies a full memory barrier.
Because the comparison is done on the level of pointers,
all of the difficulties of using
reallyUnsafePtrEquality# correctly apply to
casMutVar# as well.
Unsafe, machine-level atomic compare and swap on an element within an array.
See the documentation of casArray#.
Warning: this can fail with an unchecked exception.
Bitcast a Double# into a Word64#
Bitcast a Float# into a Word32#
Bitcast a Word32# into a Float#
Bitcast a Word64# into a Double#
evaluates catch# k handler sk s, invoking handler on any exceptions
thrown.
Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.
Run the supplied IO action with an empty CCS. For example, this is used by the interpreter to run an interpreted computation without the call stack showing that it was invoked from GHC.
Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.
Warning: this can fail with an unchecked exception.
Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.
Warning: this can fail with an unchecked exception.
Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.
Warning: this can fail with an unchecked exception.
Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.
Warning: this can fail with an unchecked exception.
returns the size of the given closure in
machine words. closureSize# closure
Count leading zeros in a word.
Count leading zeros in the lower 16 bits of a word.
Count leading zeros in the lower 32 bits of a word.
Count leading zeros in a 64-bit word.
Count leading zeros in the lower 8 bits of a word.
The 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]
Recursively add a closure and its transitive closure to a
Compact# (a CNF), evaluating any unevaluated components
at the same time. Note: compactAdd# is not thread-safe, so
only one thread may call compactAdd# with a particular
Compact# at any given time. The primop does not
enforce any mutual exclusion; the caller is expected to
arrange this.
Like compactAdd#, but retains sharing and cycles
during compaction.
Attempt to allocate a compact block with the capacity (in
bytes) given by the first argument. The Addr# is a pointer
to previous compact block of the CNF or nullAddr# to create a
new CNF with a single compact block.
The resulting block is not known to the GC until
compactFixupPointers# is called on it, and care must be taken
so that the address does not escape or memory will be leaked.
Returns 1# if the object is contained in the CNF, 0# otherwise.
Returns 1# if the object is in any CNF at all, 0# otherwise.
Given the pointer to the first block of a CNF and the address of the root object in the old address space, fix up the internal pointers inside the CNF to account for a different position in memory than when it was serialized. This method must be called exactly once after importing a serialized CNF. It returns the new CNF and the new adjusted root address.
Returns the address and the utilized size (in bytes) of the first compact block of a CNF.
Given a CNF and the address of one its compact blocks, returns the
next compact block and its utilized size, or nullAddr# if the
argument was the last compact block in the CNF.
Create a new CNF with a single compact block. The argument is the capacity of the compact block (in bytes, not words). The capacity is rounded up to a multiple of the allocator block size and is capped to one mega block.
Set the new allocation size of the CNF. This value (in bytes) determines the capacity of each compact block in the CNF. It does not retroactively affect existing compact blocks in the CNF.
Return the total capacity (in bytes) of all the compact blocks in the CNF.
compares
compareByteArrays# src1 src1_ofs src2 src2_ofs nn bytes starting at offset src1_ofs in the first
ByteArray# src1 to the range of n bytes
(i.e. same length) starting at offset src2_ofs of the second
ByteArray# src2. Both arrays must fully contain the
specified ranges, but this is not checked. Returns an Int#
less than, equal to, or greater than zero if the range is found,
respectively, to be byte-wise lexicographically less than, to
match, or be greater than the second range.
See GHC.Prim#continuations.
Warning: this can fail with an unchecked exception.
copies copyAddrToAddr# src dest lenlen bytes
from src to dest. These two memory ranges are allowed to overlap.
Analogous to the standard C function memmove, but with a different
argument order.
Warning: this can fail with an unchecked exception.
copies copyAddrToAddrNonOverlapping# src dest lenlen bytes
from src to dest. As the name suggests, these two memory ranges
must not overlap, although this pre-condition is not checked.
Analogous to the standard C function memcpy, but with a different
argument order.
Warning: this can fail with an unchecked exception.
Copy a memory range starting at the Addr# to the specified range in the MutableByteArray#. The memory region at Addr# and the ByteArray# must fully contain the specified ranges, but this is not checked. The Addr# must not point into the MutableByteArray# (e.g. if the MutableByteArray# were pinned), but this is not checked either.
Warning: this can fail with an unchecked exception.
Given a source array, an offset into the source array, a destination array, an offset into the destination array, and a number of elements to copy, copy the elements from the source array to the destination array. Both arrays must fully contain the specified ranges, but this is not checked. The two arrays must not be the same array in different states, but this is not checked either.
Warning: this can fail with an unchecked exception.
copies the range
starting at offset copyByteArray# src src_ofs dst dst_ofs lensrc_ofs of length len from the
ByteArray# src to the MutableByteArray# dst
starting at offset dst_ofs. Both arrays must fully contain
the specified ranges, but this is not checked. The two arrays must
not be the same array in different states, but this is not checked
either.
Warning: this can fail with an unchecked exception.
Copy a range of the ByteArray# to the memory range starting at the Addr#. The ByteArray# and the memory region at Addr# must fully contain the specified ranges, but this is not checked. The Addr# must not point into the ByteArray# (e.g. if the ByteArray# were pinned), but this is not checked either.
Warning: this can fail with an unchecked exception.
Given a source array, an offset into the source array, a destination array, an offset into the destination array, and a number of elements to copy, copy the elements from the source array to the destination array. Both arrays must fully contain the specified ranges, but this is not checked. In the case where the source and destination are the same array the source and destination regions may overlap.
Warning: this can fail with an unchecked exception.
copies the
range starting at offset copyMutableByteArray# src src_ofs dst dst_ofs lensrc_ofs of length len from the
MutableByteArray# src to the MutableByteArray# dst
starting at offset dst_ofs. Both arrays must fully contain the
specified ranges, but this is not checked. The regions are
allowed to overlap, although this is only possible when the same
array is provided as both the source and the destination.
Warning: this can fail with an unchecked exception.
copies the range starting at offset copyMutableByteArrayNonOverlapping# src src_ofs dst dst_ofs lensrc_ofs of length len from
the MutableByteArray# src to the MutableByteArray# dst
starting at offset dst_ofs. Both arrays must fully contain the
specified ranges, but this is not checked. The regions are not
allowed to overlap, but this is also not checked.
Warning: this can fail with an unchecked exception.
Copy a range of the MutableByteArray# to the memory range starting at the Addr#. The MutableByteArray# and the memory region at Addr# must fully contain the specified ranges, but this is not checked. The Addr# must not point into the MutableByteArray# (e.g. if the MutableByteArray# were pinned), but this is not checked either.
Warning: this can fail with an unchecked exception.
Given a source array, an offset into the source array, a destination array, an offset into the destination array, and a number of elements to copy, copy the elements from the source array to the destination array. Both arrays must fully contain the specified ranges, but this is not checked. The two arrays must not be the same array in different states, but this is not checked either.
Warning: this can fail with an unchecked exception.
Given a source array, an offset into the source array, a destination array, an offset into the destination array, and a number of elements to copy, copy the elements from the source array to the destination array. The source and destination arrays can refer to the same array. Both arrays must fully contain the specified ranges, but this is not checked. The regions are allowed to overlap, although this is only possible when the same array is provided as both the source and the destination.
Warning: this can fail with an unchecked exception.
Count trailing zeros in a word.
Count trailing zeros in the lower 16 bits of a word.
Count trailing zeros in the lower 32 bits of a word.
Count trailing zeros in a 64-bit word.
Count trailing zeros in the lower 8 bits of a word.
Convert to integer. First component of the result is -1 or 1, indicating the sign of the mantissa. The next two are the high and low 32 bits of the mantissa respectively, and the last is the exponent.
Decode Double# into mantissa and base-2 exponent.
Convert to integers.
First Int# in result is the mantissa; second is the exponent.
Sleep specified number of microseconds.
Divide two vectors element-wise.
Divide two vectors element-wise.
Divide two vectors element-wise.
Divide two vectors element-wise.
Divide two vectors element-wise.
Divide two vectors element-wise.
Truncates a Double# value to the nearest Int#.
Results are undefined if the truncation if truncation yields
a value outside the range of Int#.
Given an array, and offset in machine words, and a value to add, atomically add the value to the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an address, and a value to add, atomically add the value to the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an array, and offset in machine words, and a value to AND, atomically AND the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an address, and a value to AND, atomically AND the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an array, and offset in machine words, and a value to NAND, atomically NAND the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an address, and a value to NAND, atomically NAND the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an array, and offset in machine words, and a value to OR, atomically OR the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an address, and a value to OR, atomically OR the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an array, and offset in machine words, and a value to subtract, atomically subtract the value from the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an address, and a value to subtract, atomically subtract the value from the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an array, and offset in machine words, and a value to XOR, atomically XOR the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Given an address, and a value to XOR, atomically XOR the value into the element. Returns the value of the element before the operation. Implies a full memory barrier.
Warning: this can fail with an unchecked exception.
Finalize a weak pointer. The return value is an unboxed tuple
containing the new state of the world and an "unboxed Maybe",
represented by an Int# and a (possibly invalid) finalization
action. An Int# of 1 indicates that the finalizer is valid. The
return value b from the finalizer should be ignored.
Truncates a Float# value to the nearest Int#.
Results are undefined if the truncation if truncation yields
a value outside the range of Int#.
Fused multiply-add operation x*y+z. See GHC.Prim#fma.
Fused multiply-add operation x*y+z. See GHC.Prim#fma.
Fused multiply-subtract operation x*y-z. See GHC.Prim#fma.
Fused multiply-subtract operation x*y-z. See GHC.Prim#fma.
Fused negate-multiply-add operation -x*y+z. See GHC.Prim#fma.
Fused negate-multiply-add operation -x*y+z. See GHC.Prim#fma.
Fused negate-multiply-subtract operation -x*y-z. See GHC.Prim#fma.
Fused negate-multiply-subtract operation -x*y-z. See GHC.Prim#fma.
Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.
Warning: this can fail with an unchecked exception.
Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.
Warning: this can fail with an unchecked exception.
Returns the current CostCentreStack (value is NULL if
not profiling). Takes a dummy argument which can be used to
avoid the call to getCurrentCCS# being floated out by the
simplifier, which would result in an uninformative stack
(CAF).
Return the number of elements in the array, correctly accounting for
the effect of shrinkMutableByteArray# and resizeMutableByteArray#.
Return the number of elements in the array, correctly accounting for
the effect of shrinkSmallMutableArray# and resizeSmallMutableArray#.
Read a machine address from immutable array; offset in machine words.
Read a machine address from immutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Read from the specified index of an immutable array. The result is packaged into an unboxed unary tuple; the result itself is not yet evaluated. Pattern matching on the tuple forces the indexing of the array to happen but does not evaluate the element itself. Evaluating the thunk prevents additional thunks from building up on the heap. Avoiding these thunks, in turn, reduces references to the argument array, allowing it to be garbage collected more promptly.
Read an 8-bit character from immutable array; offset in bytes.
Read an 8-bit character from immutable address; offset in bytes.
Read a double-precision floating-point value from immutable array; offset in 8-byte words.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a double-precision floating-point value from immutable address; offset in 8-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a single-precision floating-point value from immutable array; offset in 4-byte words.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a single-precision floating-point value from immutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a 16-bit signed integer from immutable array; offset in 2-byte words.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a 16-bit signed integer from immutable address; offset in 2-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a 32-bit signed integer from immutable array; offset in 4-byte words.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a 32-bit signed integer from immutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a 64-bit signed integer from immutable array; offset in 8-byte words.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a 64-bit signed integer from immutable address; offset in 8-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read an 8-bit signed integer from immutable array; offset in bytes.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read an 8-bit signed integer from immutable address; offset in bytes.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a word-sized integer from immutable array; offset in machine words.
Read a word-sized integer from immutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Read from specified index of immutable array. Result is packaged into an unboxed singleton; the result itself is not yet evaluated.
Read a StablePtr# value from immutable array; offset in machine words.
Read a StablePtr# value from immutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Read a 32-bit character from immutable array; offset in 4-byte words.
Read a 32-bit character from immutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Read a 16-bit unsigned integer from immutable array; offset in 2-byte words.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a 16-bit unsigned integer from immutable address; offset in 2-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a 32-bit unsigned integer from immutable array; offset in 4-byte words.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a 32-bit unsigned integer from immutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a 64-bit unsigned integer from immutable array; offset in 8-byte words.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a 64-bit unsigned integer from immutable address; offset in 8-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read an 8-bit unsigned integer from immutable array; offset in bytes.
Read a machine address from immutable array; offset in bytes.
Read an 8-bit character from immutable array; offset in bytes.
Read a double-precision floating-point value from immutable array; offset in bytes.
Read a single-precision floating-point value from immutable array; offset in bytes.
Read a word-sized integer from immutable array; offset in bytes.
Read a 16-bit signed integer from immutable array; offset in bytes.
Read a 32-bit signed integer from immutable array; offset in bytes.
Read a 64-bit signed integer from immutable array; offset in bytes.
Read a StablePtr# value from immutable array; offset in bytes.
Read a 32-bit character from immutable array; offset in bytes.
Read a word-sized unsigned integer from immutable array; offset in bytes.
Read a 16-bit unsigned integer from immutable array; offset in bytes.
Read a 32-bit unsigned integer from immutable array; offset in bytes.
Read a 64-bit unsigned integer from immutable array; offset in bytes.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read a vector from specified index of immutable array of scalars; offset is in scalar elements.
Read an 8-bit unsigned integer from immutable address; offset in bytes.
Read a machine address from immutable address; offset in bytes.
Read an 8-bit character from immutable address; offset in bytes.
Read a double-precision floating-point value from immutable address; offset in bytes.
Read a single-precision floating-point value from immutable address; offset in bytes.
Read a word-sized integer from immutable address; offset in bytes.
Read a 16-bit signed integer from immutable address; offset in bytes.
Read a 32-bit signed integer from immutable address; offset in bytes.
Read a 64-bit signed integer from immutable address; offset in bytes.
Read a StablePtr# value from immutable address; offset in bytes.
Read a 32-bit character from immutable address; offset in bytes.
Read a word-sized unsigned integer from immutable address; offset in bytes.
Read a 16-bit unsigned integer from immutable address; offset in bytes.
Read a 32-bit unsigned integer from immutable address; offset in bytes.
Read a 64-bit unsigned integer from immutable address; offset in bytes.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Reads vector; offset in scalar elements.
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a vector from the specified index of an immutable array. The index is counted in units of SIMD vectors (not scalar elements).
Reads vector; offset in units of SIMD vectors (not scalar elements).
Read a word-sized unsigned integer from immutable array; offset in machine words.
Read a word-sized unsigned integer from immutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Insert a scalar at the given position in a vector. The position must be a compile-time constant.
Coerce directly from int to address. Users are discouraged from using this operation as it makes little sense on platforms with tagged pointers.
Convert an Int# to the corresponding Double# with the same
integral value (up to truncation due to floating-point precision). e.g.
int2Double# 1# == 1.0##
Convert an Int# to the corresponding Float# with the same
integral value (up to truncation due to floating-point precision). e.g.
int2Float# 1# == 1.0#
Determine whether a ByteArray# is guaranteed not to move.
Return 1 if MVar# is empty; 0 otherwise.
Determine whether a MutableByteArray# is guaranteed not to move
during GC.
keeps the value keepAlive# x s kx alive during the execution
of the computation k.
Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.
Set the label of the given thread. The ByteArray# should contain
a UTF-8-encoded string.
Returns an array of the threads started by the program. Note that this threads which have finished execution may or may not be present in this list, depending upon whether they have been collected by the garbage collector.
evaluates maskAsyncExceptions# k sk s such that asynchronous
exceptions are deferred until after evaluation has finished.
Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.
evaluates maskUninterruptible# k sk s such that asynchronous
exceptions are deferred until after evaluation has finished.
Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.
Result is meaningless if two Addr#s are so far apart that their
difference doesn't fit in an Int#.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Subtract two vectors element-wise.
Wrap a BCO in a AP_UPD thunk which will be updated with the value of
the BCO when evaluated.
creates a weak reference to value mkWeak# k v finalizer sk,
with an associated reference to some value v. If k is still
alive then v can be retrieved using deRefWeak#. Note that
the type of k must be represented by a pointer (i.e. of kind
TYPE 'LiftedRep or TYPE 'UnliftedRep@).
Return non-zero if there is any possibility that the upper word of a signed integer multiply might contain useful information. Return zero only if you are completely sure that no overflow can occur. On a 32-bit platform, the recommended implementation is to do a 32 x 32 -> 64 signed multiply, and subtract result[63:32] from (result[31] >>signed 31). If this is zero, meaning that the upper word is merely a sign extension of the lower one, no overflow can occur.
On a 64-bit platform it is not always possible to acquire the top 64 bits of the result. Therefore, a recommended implementation is to take the absolute value of both operands, and return 0 iff bits[63:31] of them are zero, since that means that their magnitudes fit within 31 bits, so the magnitude of the product must fit into 62 bits.
If in doubt, return non-zero, but do make an effort to create the
correct answer for small args, since otherwise the performance of
(*) :: Integer -> Integer -> Integer will be poor.
Intended for use with pinned arrays; otherwise very unsafe!
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Unary negation.
Since the negative Int# range extends one further than the
positive range, negateInt# of the most negative number is an
identity operation. This way, negateInt# is always its own inverse.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Negate element-wise.
Like newPinnedByteArray# but allow specifying an arbitrary
alignment, which must be a power of two.
Warning: this can fail with an unchecked exception.
Create a new mutable array with the specified number of elements, in the specified state thread, with each element containing the specified initial value.
creates a new bytecode object. The
resulting object encodes a function of the given arity with the instructions
encoded in newBCO# instrs lits ptrs arity bitmapinstrs, and a static reference table usage bitmap given by
bitmap.
Create a new mutable byte array of specified size (in bytes), in the specified state thread. The size of the memory underlying the array will be rounded up to the platform's word size.
creates a new constructor
application object on the heap from the info table pointer of the data
constructor and the data arguments given in newConAppObj# datacon_itbl lits ptrs arityptrs and lits. The
resulting object is a heap closure for the constructor application. It is
evaluated and properly tagged. The given arity gives the total size of
pointers and literals in number of words.
Create new MVar#; initially empty.
Create MutVar# with specified initial value in specified state thread.
Like newByteArray# but GC guarantees not to move it.
See GHC.Prim#continuations.
Create a new mutable array with the specified number of elements, in the specified state thread, with each element containing the specified initial value.
Create a new TVar# holding a specified initial value.
Bitwise "not", also known as the binary complement.
The null address.
Returns the number of sparks in the local spark pool.
Bitwise "or".
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Pack the elements of an unboxed tuple into a vector.
Create a new spark evaluating the given argument. The return value should always be 1. Users are encouraged to use spark# instead.
Deposit bits to a word at locations specified by a mask, aka parallel bit deposit.
Software emulation:
pdep :: Word -> Word -> Word
pdep src mask = go 0 src mask
where
go :: Word -> Word -> Word -> Word
go result _ 0 = result
go result src mask = go newResult newSrc newMask
where
maskCtz = countTrailingZeros mask
newResult = if testBit src 0 then setBit result maskCtz else result
newSrc = src `shiftR` 1
newMask = clearBit mask maskCtzDeposit bits to lower 16 bits of a word at locations specified by a mask.
Deposit bits to lower 32 bits of a word at locations specified by a mask.
Deposit bits to a word at locations specified by a mask.
Deposit bits to lower 8 bits of a word at locations specified by a mask.
Extract bits from a word at locations specified by a mask, aka parallel bit extract.
Software emulation:
pext :: Word -> Word -> Word
pext src mask = loop 0 0 0
where
loop i count result
| i >= finiteBitSize (0 :: Word)
= result
| testBit mask i
= loop (i + 1) (count + 1) (if testBit src i then setBit result count else result)
| otherwise
= loop (i + 1) count resultExtract bits from lower 16 bits of a word at locations specified by a mask.
Extract bits from lower 32 bits of a word at locations specified by a mask.
Extract bits from a word at locations specified by a mask.
Extract bits from lower 8 bits of a word at locations specified by a mask.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add unsigned integers, with the high part (carry) in the first
component of the returned pair and the low part in the second
component of the pair. See also addWordC#.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Add two vectors element-wise.
Count the number of set bits in a word.
Count the number of set bits in the lower 16 bits of a word.
Count the number of set bits in the lower 32 bits of a word.
Count the number of set bits in a 64-bit word.
Count the number of set bits in the lower 8 bits of a word.
See GHC.Prim#continuations.
Witness for an unboxed Proxy# value, which has no runtime
representation.
If MVar# is full, block until it becomes empty.
Then store value arg as its new contents.
Rounds towards zero. The behavior is undefined if the second argument is zero.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero.
Takes high word of dividend, then low word of dividend, then divisor. Requires that high word < divisor.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Rounds towards zero element-wise.
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Read a machine address from mutable array; offset in machine words.
Warning: this can fail with an unchecked exception.
Read a machine address from mutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Read from specified index of mutable array. Result is not yet evaluated.
Warning: this can fail with an unchecked exception.
Read an 8-bit character from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read an 8-bit character from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a double-precision floating-point value from mutable array; offset in 8-byte words.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a double-precision floating-point value from mutable address; offset in 8-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a single-precision floating-point value from mutable array; offset in 4-byte words.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a single-precision floating-point value from mutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a 16-bit signed integer from mutable array; offset in 2-byte words.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a 16-bit signed integer from mutable address; offset in 2-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a 32-bit signed integer from mutable array; offset in 4-byte words.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a 32-bit signed integer from mutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a 64-bit signed integer from mutable array; offset in 8-byte words.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a 64-bit signed integer from mutable address; offset in 8-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read an 8-bit signed integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read an 8-bit signed integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a word-sized integer from mutable array; offset in machine words.
Warning: this can fail with an unchecked exception.
Read a word-sized integer from mutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
If MVar# is empty, block until it becomes full.
Then read its contents without modifying the MVar, without possibility
of intervention from other threads.
Read contents of MutVar#. Result is not yet evaluated.
Read from specified index of mutable array. Result is not yet evaluated.
Warning: this can fail with an unchecked exception.
Read a StablePtr# value from mutable array; offset in machine words.
Warning: this can fail with an unchecked exception.
Read a StablePtr# value from mutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Read contents of TVar# inside an STM transaction,
i.e. within a call to atomically#.
Does not force evaluation of the result.
Read contents of TVar# outside an STM transaction.
Does not force evaluation of the result.
Read a 32-bit character from mutable array; offset in 4-byte words.
Warning: this can fail with an unchecked exception.
Read a 32-bit character from mutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Read a 16-bit unsigned integer from mutable array; offset in 2-byte words.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a 16-bit unsigned integer from mutable address; offset in 2-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a 32-bit unsigned integer from mutable array; offset in 4-byte words.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a 32-bit unsigned integer from mutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a 64-bit unsigned integer from mutable array; offset in 8-byte words.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a 64-bit unsigned integer from mutable address; offset in 8-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read an 8-bit unsigned integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a machine address from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read an 8-bit character from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a double-precision floating-point value from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a single-precision floating-point value from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a word-sized integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 16-bit signed integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 32-bit signed integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 64-bit signed integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a StablePtr# value from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 32-bit character from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a word-sized unsigned integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 16-bit unsigned integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 32-bit unsigned integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 64-bit unsigned integer from mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Read an 8-bit unsigned integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a machine address from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read an 8-bit character from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a double-precision floating-point value from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a single-precision floating-point value from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a word-sized integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 16-bit signed integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 32-bit signed integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 64-bit signed integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a StablePtr# value from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 32-bit character from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a word-sized unsigned integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 16-bit unsigned integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 32-bit unsigned integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Read a 64-bit unsigned integer from mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Reads vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a vector from the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Reads vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Read a word-sized unsigned integer from mutable array; offset in machine words.
Warning: this can fail with an unchecked exception.
Read a word-sized unsigned integer from mutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
The token used in the implementation of the IO monad as a state monad.
It does not pass any information at runtime.
See also GHC.Magic.runRW#.
Returns 1# if the given pointers are equal and 0# otherwise.
Return the remainder when the Addr# arg, treated like an Int#,
is divided by the Int# arg.
Satisfies (. The
behavior is undefined if the second argument is zero.quotInt# x y) *# y +# (remInt# x y) == x
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Satisfies (.quot# x y) times# y plus# (rem# x y) == x
Note: Most CPU ISAs do not contain any SIMD integer division instructions. Do not expect high performance.
Resize mutable byte array to new specified size (in bytes), shrinking or growing it.
The returned MutableByteArray# is either the original
MutableByteArray# resized in-place or, if not possible, a newly
allocated (unpinned) MutableByteArray# (with the original content
copied over).
To avoid undefined behaviour, the original MutableByteArray# shall
not be accessed anymore after a resizeMutableByteArray# has been
performed. Moreover, no reference to the old one should be kept in order
to allow garbage collection of the original MutableByteArray# in
case a new MutableByteArray# had to be allocated.
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.
sets all of the bytes in
setAddrRange# dest len c[dest, dest+len) to the value c.
Analogous to the standard C function memset, but with a different
argument order.
Warning: this can fail with an unchecked exception.
sets the byte range setByteArray# ba off len c[off, off+len) of
the MutableByteArray# to the byte c.
Warning: this can fail with an unchecked exception.
Sets the allocation counter for the another thread to the given value. This doesn't take allocations into the current nursery chunk into account. Therefore it is only accurate if the other thread is not currently running.
Sets the allocation counter for the current thread to the given value.
Shrink mutable byte array to new specified size (in bytes), in
the specified state thread. The new size argument must be less than or
equal to the current size as reported by getSizeofMutableByteArray#.
Assuming the non-profiling RTS, this primitive compiles to an O(1) operation in C--, modifying the array in-place. Backends bypassing C-- representation (such as JavaScript) might behave differently.
Warning: this can fail with an unchecked exception.
Shrink mutable array to new specified size, in
the specified state thread. The new size argument must be less than or
equal to the current size as reported by getSizeofSmallMutableArray#.
Assuming the non-profiling RTS, for the copying garbage collector (default) this primitive compiles to an O(1) operation in C--, modifying the array in-place. For the non-moving garbage collector, however, the time is proportional to the number of elements shrinked out. Backends bypassing C-- representation (such as JavaScript) might behave differently.
Warning: this can fail with an unchecked exception.
Return the number of elements in the array.
Return the size of the array in bytes.
Return the number of elements in the array.
Return the size of the array in bytes. Deprecated, it is
unsafe in the presence of shrinkMutableByteArray# and resizeMutableByteArray#
operations on the same mutable byte
array.
Return the number of elements in the array.
Return the number of elements in the array. Deprecated, it is
unsafe in the presence of shrinkSmallMutableArray# and resizeSmallMutableArray#
operations on the same small mutable array.
Subtract signed integers reporting overflow.
First member of result is the difference truncated to an Int#;
second member is zero if the true difference fits in an Int#,
nonzero if overflow occurred (the difference is either too large
or too small to fit in an Int#).
Subtract unsigned integers reporting overflow. The first element of the pair is the result. The second element is the carry flag, which is nonzero on overflow.
If MVar# is empty, block until it becomes full.
Then remove and return its contents, and set it empty.
Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.
Warning: this can fail with an unchecked exception.
Given a source array, an offset into the source array, and a number of elements to copy, create a new array with the elements from the source array. The provided array must fully contain the specified range, but this is not checked.
Warning: this can fail with an unchecked exception.
Get the label of the given thread.
Morally of type ThreadId# -> IO (Maybe ByteArray#), with a 1# tag
denoting Just.
Get the status of the given thread. Result is
(ThreadStatus, Capability, Locked) where
ThreadStatus is one of the status constants defined in
rts/Constants.h, Capability is the number of
the capability which currently owns the thread, and
Locked is a boolean indicating whether the
thread is bound to that capability.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Return a triple (isHighNeeded,high,low) where high and low are respectively the high and low bits of the double-word result. isHighNeeded is a cheap way to test if the high word is a sign-extension of the low word (isHighNeeded = 0#) or not (isHighNeeded = 1#).
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Multiply two vectors element-wise.
Emits an event via the RTS tracing framework. The contents
of the event is the binary object passed as the first argument with
the given length passed as the second argument. The event will be
emitted to the .eventlog file.
Emits an event via the RTS tracing framework. The contents
of the event is the zero-terminated byte string passed as the first
argument. The event will be emitted either to the .eventlog file,
or to stderr, depending on the runtime RTS flags.
Emits a marker event via the RTS tracing framework. The contents
of the event is the zero-terminated byte string passed as the first
argument. The event will be emitted either to the .eventlog file,
or to stderr, depending on the runtime RTS flags.
If MVar# is full, immediately return with integer 0.
Otherwise, store value arg as MVar#'s new contents, and return with integer 1.
If MVar# is empty, immediately return with integer 0 and value undefined.
Otherwise, return with integer 1 and contents of MVar#.
If MVar# is empty, immediately return with integer 0 and value undefined.
Otherwise, return with integer 1 and contents of MVar#, and set MVar# empty.
Shift left. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.
Shift right arithmetic. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.
Shift right logical. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.
Shift left logical. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.
Shift right logical. Result undefined if shift amount is not in the range 0 to word size - 1 inclusive.
evaluates unmaskAsyncUninterruptible# k sk s such that asynchronous
exceptions are unmasked.
Note that the result type here isn't quite as unrestricted as the polymorphic type might suggest; see the section "RuntimeRep polymorphism in continuation-style primops" for details.
copies the closure and pointers in the
payload of the given closure into two new arrays, and returns a pointer to
the first word of the closure's info table, a non-pointer array for the raw
bytes of the closure, and a pointer array for the pointers in the payload. unpackClosure# closure
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Unpack the elements of a vector into an unboxed tuple.
Make a mutable array immutable, without copying.
Make a mutable byte array immutable, without copying.
Make a mutable array immutable, without copying.
Make an immutable array mutable, without copying.
Make an immutable byte array mutable, without copying.
Make an immutable array mutable, without copying.
This is an alias for the unboxed unit tuple constructor.
In earlier versions of GHC, void# was a value
of the primitive type Void#, which is now defined to be (# #).
Block until input is available on specified file descriptor.
Block until output is possible on specified file descriptor.
Convert an Word# to the corresponding Double# with the same
integral value (up to truncation due to floating-point precision). e.g.
word2Double# 1## == 1.0##
Convert an Word# to the corresponding Float# with the same
integral value (up to truncation due to floating-point precision). e.g.
word2Float# 1## == 1.0#
Write a machine address to mutable array; offset in machine words.
Warning: this can fail with an unchecked exception.
Write a machine address to mutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write to specified index of mutable array.
Warning: this can fail with an unchecked exception.
Write an 8-bit character to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write an 8-bit character to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a double-precision floating-point value to mutable array; offset in 8-byte words.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a double-precision floating-point value to mutable address; offset in 8-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a single-precision floating-point value to mutable array; offset in 4-byte words.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a single-precision floating-point value to mutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a 16-bit signed integer to mutable array; offset in 2-byte words.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a 16-bit signed integer to mutable address; offset in 2-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a 32-bit signed integer to mutable array; offset in 4-byte words.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a 32-bit signed integer to mutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a 64-bit signed integer to mutable array; offset in 8-byte words.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a 64-bit signed integer to mutable address; offset in 8-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write an 8-bit signed integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write an 8-bit signed integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a word-sized integer to mutable array; offset in machine words.
Warning: this can fail with an unchecked exception.
Write a word-sized integer to mutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write contents of MutVar#.
Write to specified index of mutable array.
Warning: this can fail with an unchecked exception.
Write a StablePtr# value to mutable array; offset in machine words.
Warning: this can fail with an unchecked exception.
Write a StablePtr# value to mutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write contents of TVar#.
Write a 32-bit character to mutable array; offset in 4-byte words.
Warning: this can fail with an unchecked exception.
Write a 32-bit character to mutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write a 16-bit unsigned integer to mutable array; offset in 2-byte words.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a 16-bit unsigned integer to mutable address; offset in 2-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a 32-bit unsigned integer to mutable array; offset in 4-byte words.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a 32-bit unsigned integer to mutable address; offset in 4-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a 64-bit unsigned integer to mutable array; offset in 8-byte words.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a 64-bit unsigned integer to mutable address; offset in 8-byte words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write an 8-bit unsigned integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a machine address to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write an 8-bit character to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a double-precision floating-point value to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a single-precision floating-point value to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a word-sized integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 16-bit signed integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 32-bit signed integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 64-bit signed integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a StablePtr# value to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 32-bit character to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a word-sized unsigned integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 16-bit unsigned integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 32-bit unsigned integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 64-bit unsigned integer to mutable array; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to specified index of mutable array of scalars; offset is in scalar elements.
Warning: this can fail with an unchecked exception.
Write an 8-bit unsigned integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a machine address to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write an 8-bit character to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a double-precision floating-point value to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a single-precision floating-point value to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a word-sized integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 16-bit signed integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 32-bit signed integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 64-bit signed integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a StablePtr# value to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 32-bit character to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a word-sized unsigned integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 16-bit unsigned integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 32-bit unsigned integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write a 64-bit unsigned integer to mutable address; offset in bytes.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write vector; offset in scalar elements.
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a vector to the specified index of a mutable array. The index is counted in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write vector; offset in units of SIMD vectors (not scalar elements).
Warning: this can fail with an unchecked exception.
Write a word-sized unsigned integer to mutable array; offset in machine words.
Warning: this can fail with an unchecked exception.
Write a word-sized unsigned integer to mutable address; offset in machine words.
On some platforms, the access may fail
for an insufficiently aligned Addr#.
Warning: this can fail with an unchecked exception.
Bitwise "xor".
An arbitrary machine address assumed to point outside the garbage-collected heap.
Primitive bytecode type.
A boxed, unlifted datatype representing a region of raw memory in the garbage-collected heap, which is not scanned for pointers during garbage collection.
It is created by freezing a MutableByteArray# with unsafeFreezeByteArray#.
Freezing is essentially a no-op, as MutableByteArray# and ByteArray# share the same heap structure under the hood.
The immutable and mutable variants are commonly used for scenarios requiring high-performance data structures,
like Text, Primitive Vector, Unboxed Array, and ShortByteString.
Another application of fundamental importance is Integer, which is backed by ByteArray#.
The representation on the heap of a Byte Array is:
+------------+-----------------+-----------------------+
| | | |
| HEADER | SIZE (in bytes) | PAYLOAD |
| | | |
+------------+-----------------+-----------------------+To obtain a pointer to actual payload (e.g., for FFI purposes) use byteArrayContents# or mutableByteArrayContents#.
Alternatively, enabling the UnliftedFFITypes extension
allows to mention ByteArray# and MutableByteArray# in FFI type signatures directly.
The builtin function type, written in infix form as a % m -> b.
Values of this type are functions taking inputs of type a and
producing outputs of type b. The multiplicity of the input is
m.
Note that permits representation polymorphism in both
FUN m a ba and b, so that types like can still be
well-kinded.Int# -> Int#
Instances14Category, Show, Semigroup, Monoid, Arrow, ArrowApply, …
Category (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.CategoryShow (a -> b)Defined in base-4.23.0.0 · Text.Show.Functions · orphanSemigroup b => Semigroup (a -> b)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid b => Monoid (a -> b)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseArrow (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowArrowApply (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowArrowChoice (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowArrowLoop (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.Fix(PrintfArg a, HPrintfType r) => HPrintfType (a -> r)Defined in base-4.23.0.0 · Text.Printf(PrintfArg a, PrintfType r) => PrintfType (a -> r)Defined in base-4.23.0.0 · Text.PrintfMonad ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadFix ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixApplicative ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.Base
A shared mutable variable (not the same as a MutVar#!).
(Note: in a non-concurrent implementation, ( can be
represented by MVar# a)(.) MutVar# (Maybe a))
A MutVar# behaves like a single-element mutable array.
A mutable ByteAray#. It can be created in three ways:
newByteArray#: Create an unpinned array.newPinnedByteArray#: This will create a pinned array,newAlignedPinnedByteArray#: This will create a pinned array, with a custom alignment.
Unpinned arrays can be moved around during garbage collection, so you must not store or pass pointers to these values if there is a chance for the garbage collector to kick in. That said, even unpinned arrays can be passed to unsafe FFI calls, because no garbage collection happens during these unsafe calls (see Guaranteed Call Safety in the GHC Manual). For safe FFI calls, byte arrays must be not only pinned, but also kept alive by means of the keepAlive# function for the duration of a call (that's because garbage collection cannot move a pinned array, but is free to scrap it altogether).
See GHC.Prim#continuations.
The type constructor Proxy# is used to bear witness to some
type variable. It's used when you want to pass around proxy values
for doing things like modelling type applications. A Proxy#
is not only unboxed, it also has a polymorphic kind, and has no
runtime representation, being totally free.
RealWorld is deeply magical. It is primitive, but it is not
unlifted (hence ptrArg). We never manipulate values of type
RealWorld; it's only used in the type system, to parameterise State#.
Haskell representation of a StgStack* that was created (cloned)
with a function in GHC.Stack.CloneStack. Please check the
documentation in that module for more detailed explanations.
State# is the primitive, unlifted type of states. It has
one type parameter, thus , or State# RealWorld,
where s is a type variable. The only purpose of the type parameter
is to keep different state threads separate. It is represented by
nothing at all. State# s
Instances335HasResolution, Category, Generic1, Bifoldable1, Eq2, Ord2, …
Generic1 ComplexDefined in base-4.23.0.0 · Data.ComplexGeneric1 FirstDefined in base-4.23.0.0 · Data.SemigroupGeneric1 LastDefined in base-4.23.0.0 · Data.SemigroupGeneric1 MaxDefined in base-4.23.0.0 · Data.SemigroupGeneric1 MinDefined in base-4.23.0.0 · Data.SemigroupGeneric1 WrappedMonoidDefined in base-4.23.0.0 · Data.SemigroupGeneric1 NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 IdentityDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 FirstDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 LastDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 DownDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 DualDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 ProductDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 SumDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 ZipListDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 Par1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 SoloDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 []Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsCategory OpDefined in base-4.23.0.0 · Data.Functor.ContravariantHasResolution E0Defined in base-4.23.0.0 · Data.FixedHasResolution E1Defined in base-4.23.0.0 · Data.FixedHasResolution E12Defined in base-4.23.0.0 · Data.FixedHasResolution E2Defined in base-4.23.0.0 · Data.FixedHasResolution E3Defined in base-4.23.0.0 · Data.FixedHasResolution E6Defined in base-4.23.0.0 · Data.FixedHasResolution E9Defined in base-4.23.0.0 · Data.FixedGeneric1 (WrappedMonad m)Defined in base-4.23.0.0 · Control.ApplicativeGeneric1 (Arg a)Defined in base-4.23.0.0 · Data.SemigroupGeneric1 (Either a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple2 a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonad m => Category (Kleisli m)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowGeneric1 (WrappedArrow a b)Defined in base-4.23.0.0 · Control.ApplicativeGeneric1 (Kleisli m a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowGeneric1 (Tuple3 a b)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsCategory (->)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.CategoryGeneric1 (Tuple4 a b c)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor f => Generic1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.ComposeFunctor f => Generic1 (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple5 a b c d)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple6 a b c d e)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple7 a b c d e f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple8 a b c d e f g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple9 a b c d e f g h)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple10 a b c d e f g h i)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple11 a b c d e f g h i j)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple12 a b c d e f g h i j k)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple13 a b c d e f g h i j k l)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple14 a b c d e f g h i j k l m)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsGeneric1 (Tuple15 a b c d e f g h i j k l m n)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonad ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonad U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyFunctor U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor V1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsApplicative ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyApplicative U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableFoldable U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UAddrDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UCharDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UFloatDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UIntDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable UWordDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable V1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableTraversable U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UAddrDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UCharDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UFloatDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UIntDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable UWordDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable V1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyAlternative U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadPlus ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonadPlus U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadZip ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipMonadZip U1Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipBifoldable ConstDefined in base-4.23.0.0 · Data.BifoldableBifoldable1 ConstDefined in base-4.23.0.0 · Data.Bifoldable1Bifunctor ConstDefined in base-4.23.0.0 · Data.BifunctorBitraversable ConstDefined in base-4.23.0.0 · Data.BitraversableFoldable1 V1Defined in base-4.23.0.0 · Data.Foldable1Eq1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 U1Defined in base-4.23.0.0 · Data.Functor.ClassesEq1 UAddrDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UCharDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UDoubleDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UFloatDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UIntDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 UWordDefined in base-4.23.0.0 · Data.Functor.ClassesEq1 V1Defined in base-4.23.0.0 · Data.Functor.ClassesEq2 ConstDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 U1Defined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UAddrDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UCharDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UDoubleDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UFloatDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UIntDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 UWordDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 V1Defined in base-4.23.0.0 · Data.Functor.ClassesOrd2 ConstDefined in base-4.23.0.0 · Data.Functor.ClassesRead1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesRead1 U1Defined in base-4.23.0.0 · Data.Functor.ClassesRead1 V1Defined in base-4.23.0.0 · Data.Functor.ClassesRead2 ConstDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 ProxyDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 U1Defined in base-4.23.0.0 · Data.Functor.ClassesShow1 UAddrDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UCharDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UDoubleDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UFloatDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UIntDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 UWordDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 V1Defined in base-4.23.0.0 · Data.Functor.ClassesShow2 ConstDefined in base-4.23.0.0 · Data.Functor.ClassesContravariant ProxyDefined in base-4.23.0.0 · Data.Functor.ContravariantContravariant U1Defined in base-4.23.0.0 · Data.Functor.ContravariantContravariant V1Defined in base-4.23.0.0 · Data.Functor.ContravariantMonad f => Monad (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonad f => Monad (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonad f => Monad (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsData p => Data (U1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataData p => Data (V1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataData t => Data (Proxy t)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataFunctor (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.ConstFunctor (URec Char)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Double)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Float)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Int)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Word)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec (Ptr ()))Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor f => Functor (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidFunctor f => Functor (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalFunctor f => Functor (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadFix f => MonadFix (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonadFix f => MonadFix (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonadFix f => MonadFix (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonadFail f => MonadFail (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidApplicative f => Applicative (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidApplicative f => Applicative (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalApplicative f => Applicative (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonoid m => Applicative (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.ConstFoldable f => Foldable (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableFoldable f => Foldable (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableFoldable f => Foldable (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableTraversable f => Traversable (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableTraversable f => Traversable (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableTraversable f => Traversable (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative f => Alternative (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidAlternative f => Alternative (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalAlternative f => Alternative (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Generic1 f, Alternative (Rep1 f)) => Alternative (Generically1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadPlus f => MonadPlus (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonadPlus f => MonadPlus (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonadPlus f => MonadPlus (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadZip f => MonadZip (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipMonadZip f => MonadZip (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipBifoldable (K1 i)Defined in base-4.23.0.0 · Data.BifoldableBifunctor (K1 i)Defined in base-4.23.0.0 · Data.BifunctorBitraversable (K1 i)Defined in base-4.23.0.0 · Data.BitraversableFoldable1 f => Foldable1 (Ap f)Defined in base-4.23.0.0 · Data.Foldable1Foldable1 f => Foldable1 (Alt f)Defined in base-4.23.0.0 · Data.Foldable1Foldable1 f => Foldable1 (Rec1 f)Defined in base-4.23.0.0 · Data.Foldable1Eq1 f => Eq1 (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesEq a => Eq1 (Const a)Defined in base-4.23.0.0 · Data.Functor.Classes(Generic1 f, Eq1 (Rep1 f)) => Eq1 (Generically1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesOrd1 f => Ord1 (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesOrd a => Ord1 (Const a)Defined in base-4.23.0.0 · Data.Functor.Classes(Generic1 f, Ord1 (Rep1 f)) => Ord1 (Generically1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesRead1 f => Read1 (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesRead a => Read1 (Const a)Defined in base-4.23.0.0 · Data.Functor.ClassesShow1 f => Show1 (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.ClassesShow a => Show1 (Const a)Defined in base-4.23.0.0 · Data.Functor.ClassesContravariant (Const a)Defined in base-4.23.0.0 · Data.Functor.ContravariantContravariant f => Contravariant (Alt f)Defined in base-4.23.0.0 · Data.Functor.ContravariantContravariant f => Contravariant (Rec1 f)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Applicative f, Bounded a) => Bounded (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid(Monad f, Monad g) => Monad (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Monad f, Monad g) => Monad (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Data (f a), Data a, Typeable f) => Data (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Data (f a), Data a, Typeable f) => Data (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Data (f p), Typeable f, Data p) => Data (Rec1 f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Coercible a b, Data a, Data b) => Data (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(a ~ b, Data a) => Data (a :~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataFunctor (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Functor f, Functor g) => Functor (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Functor f, Functor g) => Functor (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Functor f, Functor g) => Functor (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Functor f, Functor g) => Functor (f :+: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Applicative f, Num a) => Num (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidNote that even if the underlying Num and Applicative instances are lawful, for most Applicatives, this instance will not be lawful. If you use this instance with the list Applicative, the following customary laws will not hold:
Commutativity:
Example2 expressions Ap [10,20] + Ap [1,2]Ap {getAp = [11,12,21,22]}Ap [1,2] + Ap [10,20]Ap {getAp = [11,21,12,22]}
Additive inverse:
Example2 expressions Ap [] + negate (Ap [])Ap {getAp = []}fromInteger 0 :: Ap [] IntAp {getAp = [0]}
Distributivity:
Example2 expressions Ap [1,2] * (3 + 4)Ap {getAp = [7,14]}(Ap [1,2] * 3) + (Ap [1,2] * 4)Ap {getAp = [7,11,10,14]}
(MonadFix f, MonadFix g) => MonadFix (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(MonadFix f, MonadFix g) => MonadFix (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonoid c => Applicative (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Applicative f, Applicative g) => Applicative (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Applicative f, Applicative g) => Applicative (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Foldable f, Foldable g) => Foldable (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Foldable f, Foldable g) => Foldable (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Foldable f, Foldable g) => Foldable (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Foldable f, Foldable g) => Foldable (f :+: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Traversable f, Traversable g) => Traversable (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Traversable f, Traversable g) => Traversable (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Traversable f, Traversable g) => Traversable (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Traversable f, Traversable g) => Traversable (f :+: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative f => Semigroup (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal(Applicative f, Semigroup a) => Semigroup (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidAlternative f => Monoid (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal(Applicative f, Monoid a) => Monoid (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid(Alternative f, Alternative g) => Alternative (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Alternative f, Alternative g) => Alternative (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(MonadPlus f, MonadPlus g) => MonadPlus (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(MonadZip f, MonadZip g) => MonadZip (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(MonadZip f, MonadZip g) => MonadZip (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.Zip(Foldable1 f, Foldable1 g) => Foldable1 (Product f g)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (Sum f g)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (f :*: g)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (f :+: g)Defined in base-4.23.0.0 · Data.Foldable1Eq c => Eq1 (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Classes(Eq1 f, Eq1 g) => Eq1 (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Eq1 f, Eq1 g) => Eq1 (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Eq1 f, Eq1 g) => Eq1 (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Classes(Eq1 f, Eq1 g) => Eq1 (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ClassesOrd c => Ord1 (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Classes(Ord1 f, Ord1 g) => Ord1 (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Ord1 f, Ord1 g) => Ord1 (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Ord1 f, Ord1 g) => Ord1 (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Classes(Ord1 f, Ord1 g) => Ord1 (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ClassesRead c => Read1 (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Classes(Read1 f, Read1 g) => Read1 (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Read1 f, Read1 g) => Read1 (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Read1 f, Read1 g) => Read1 (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Classes(Read1 f, Read1 g) => Read1 (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ClassesShow c => Show1 (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Classes(Show1 f, Show1 g) => Show1 (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Show1 f, Show1 g) => Show1 (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Show1 f, Show1 g) => Show1 (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Classes(Show1 f, Show1 g) => Show1 (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ClassesContravariant (K1 i c)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Contravariant f, Contravariant g) => Contravariant (Product f g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Contravariant f, Contravariant g) => Contravariant (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Contravariant f, Contravariant g) => Contravariant (f :*: g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Contravariant f, Contravariant g) => Contravariant (f :+: g)Defined in base-4.23.0.0 · Data.Functor.ContravariantMonad f => Monad (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((:*:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((:+:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Typeable i, Data p, Data c) => Data (K1 i c p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataFunctor f => Functor (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Functor f, Functor g) => Functor (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Functor f, Functor g) => Functor (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadFix f => MonadFix (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixApplicative f => Applicative (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Applicative f, Applicative g) => Applicative (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Applicative f, Applicative g) => Applicative (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFoldable f => Foldable (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Foldable f, Foldable g) => Foldable (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Foldable f, Foldable g) => Foldable (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsTraversable f => Traversable (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Traversable f, Traversable g) => Traversable (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Traversable f, Traversable g) => Traversable (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative f => Alternative (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Alternative f, Applicative g) => Alternative (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Alternative f, Applicative g) => Alternative (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadPlus f => MonadPlus (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadZip f => MonadZip (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipFoldable1 f => Foldable1 (M1 i c f)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (Compose f g)Defined in base-4.23.0.0 · Data.Foldable1(Foldable1 f, Foldable1 g) => Foldable1 (f :.: g)Defined in base-4.23.0.0 · Data.Foldable1Eq1 f => Eq1 (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Classes(Eq1 f, Eq1 g) => Eq1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Eq1 f, Eq1 g) => Eq1 (f :.: g)Defined in base-4.23.0.0 · Data.Functor.ClassesOrd1 f => Ord1 (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Classes(Ord1 f, Ord1 g) => Ord1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Ord1 f, Ord1 g) => Ord1 (f :.: g)Defined in base-4.23.0.0 · Data.Functor.ClassesRead1 f => Read1 (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Classes(Read1 f, Read1 g) => Read1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Read1 f, Read1 g) => Read1 (f :.: g)Defined in base-4.23.0.0 · Data.Functor.ClassesShow1 f => Show1 (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Classes(Show1 f, Show1 g) => Show1 (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Show1 f, Show1 g) => Show1 (f :.: g)Defined in base-4.23.0.0 · Data.Functor.ClassesContravariant f => Contravariant (M1 i c f)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Functor f, Contravariant g) => Contravariant (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Functor f, Contravariant g) => Contravariant (f :.: g)Defined in base-4.23.0.0 · Data.Functor.Contravariant(Data p, Data (f p), Typeable c, Typeable i, Typeable f) => Data (M1 i c f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data(Typeable f, Typeable g, Data p, Data (f (g p))) => Data ((:.:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Datatype Rep1 Complex = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Complex"Complex"
"Data.Complex"
"base-4.23.0.0-d231"
'False) (C1 ('MetaCons":+"
('InfixI 'NotAssociative6
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1))type Rep1 First = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"First"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"First"
'PrefixI 'True) (S1 ('MetaSel ('Just"getFirst"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Last = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Last"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Last"
'PrefixI 'True) (S1 ('MetaSel ('Just"getLast"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Max = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Max"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Max"
'PrefixI 'True) (S1 ('MetaSel ('Just"getMax"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Min = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Min"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Min"
'PrefixI 'True) (S1 ('MetaSel ('Just"getMin"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 WrappedMonoid = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"WrappedMonoid"
"Data.Semigroup"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"WrapMonoid"
'PrefixI 'True) (S1 ('MetaSel ('Just"unwrapMonoid"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 NonEmpty = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"NonEmpty"
"GHC.Internal.Base"
"ghc-internal"
'False) (C1 ('MetaCons":|"
('InfixI 'RightAssociative5
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))type Rep1 Identity = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Identity"
"GHC.Internal.Data.Functor.Identity"
"ghc-internal"
'True) (C1 ('MetaCons"Identity"
'PrefixI 'True) (S1 ('MetaSel ('Just"runIdentity"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 First = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"First"
"GHC.Internal.Data.Monoid"
"ghc-internal"
'True) (C1 ('MetaCons"First"
'PrefixI 'True) (S1 ('MetaSel ('Just"getFirst"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))type Rep1 Last = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Last"
"GHC.Internal.Data.Monoid"
"ghc-internal"
'True) (C1 ('MetaCons"Last"
'PrefixI 'True) (S1 ('MetaSel ('Just"getLast"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))type Rep1 Down = D1 ('MetaDataDefined in ghc-internal-10.0.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))type Rep1 Dual = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Dual"
"GHC.Internal.Data.Semigroup.Internal"
"ghc-internal"
'True) (C1 ('MetaCons"Dual"
'PrefixI 'True) (S1 ('MetaSel ('Just"getDual"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Product = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Product"
"GHC.Internal.Data.Semigroup.Internal"
"ghc-internal"
'True) (C1 ('MetaCons"Product"
'PrefixI 'True) (S1 ('MetaSel ('Just"getProduct"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Sum = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Sum"
"GHC.Internal.Data.Semigroup.Internal"
"ghc-internal"
'True) (C1 ('MetaCons"Sum"
'PrefixI 'True) (S1 ('MetaSel ('Just"getSum"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 ZipList = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"ZipList"
"GHC.Internal.Functor.ZipList"
"ghc-internal"
'True) (C1 ('MetaCons"ZipList"
'PrefixI 'True) (S1 ('MetaSel ('Just"getZipList"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))type Rep1 Par1 = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Par1"
"GHC.Internal.Generics"
"ghc-internal"
'True) (C1 ('MetaCons"Par1"
'PrefixI 'True) (S1 ('MetaSel ('Just"unPar1"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Maybe = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Maybe"
"GHC.Internal.Maybe"
"ghc-internal"
'False) (C1 ('MetaCons"Nothing"
'PrefixI 'False) U1 :+: C1 ('MetaCons"Just"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 Solo = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Solo"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"MkSolo"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 (WrappedArrow a b) = D1 ('MetaDataDefined in base-4.23.0.0 · Control.Applicative"WrappedArrow"
"Control.Applicative"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"WrapArrow"
'PrefixI 'True) (S1 ('MetaSel ('Just"unwrapArrow"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (a b))))type Rep1 (WrappedMonad m) = D1 ('MetaDataDefined in base-4.23.0.0 · Control.Applicative"WrappedMonad"
"Control.Applicative"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"WrapMonad"
'PrefixI 'True) (S1 ('MetaSel ('Just"unwrapMonad"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m)))type Rep1 (Compose f g) = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Functor.Compose"Compose"
"Data.Functor.Compose"
"base-4.23.0.0-d231"
'True) (C1 ('MetaCons"Compose"
'PrefixI 'True) (S1 ('MetaSel ('Just"getCompose"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))type Rep1 (Arg a) = D1 ('MetaDataDefined in base-4.23.0.0 · Data.Semigroup"Arg"
"Data.Semigroup"
"base-4.23.0.0-d231"
'False) (C1 ('MetaCons"Arg"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 (Kleisli m a) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Arrow"Kleisli"
"GHC.Internal.Control.Arrow"
"ghc-internal"
'True) (C1 ('MetaCons"Kleisli"
'PrefixI 'True) (S1 ('MetaSel ('Just"runKleisli"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (FUN 'Many a :.: Rec1 m)))type Rep1 (Either a) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Either"
"GHC.Internal.Data.Either"
"ghc-internal"
'False) (C1 ('MetaCons"Left"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons"Right"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 (Tuple10 a b c d e f g h i) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple10"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple11 a b c d e f g h i j) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple11"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple12 a b c d e f g h i j k) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple12"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple13 a b c d e f g h i j k l) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple13"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 l) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple14 a b c d e f g h i j k l m) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple14"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g)))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 l)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple15 a b c d e f g h i j k l m n) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple15"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g)))) :*: (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 j) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 l) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 n) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (Tuple2 a) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple2"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,)"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type Rep1 (Tuple3 a b) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple3"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,)"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))type Rep1 (Tuple4 a b c) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple4"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,)"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))type Rep1 (Tuple5 a b c d) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple5"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,)"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))type Rep1 (Tuple6 a b c d e) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple6"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,)"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))type Rep1 (Tuple7 a b c d e f) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple7"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,)"
'PrefixI 'False) ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))type Rep1 (Tuple8 a b c d e f g) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple8"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))))type Rep1 (Tuple9 a b c d e f g h) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Tuple9"
"GHC.Internal.Tuple"
"ghc-internal"
'False) (C1 ('MetaCons"(,,,,,,,,)"
'PrefixI 'False) (((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 c) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d))) :*: ((S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 e) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 f)) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 g) :*: (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 h) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)))))type Rep1 (f :.: g) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics":.:"
"GHC.Internal.Generics"
"ghc-internal"
'True) (C1 ('MetaCons"Comp1"
'PrefixI 'True) (S1 ('MetaSel ('Just"unComp1"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))type Rep1 [] = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"List"
"GHC.Internal.Types"
"ghc-internal"
'False) (C1 ('MetaCons"[]"
'PrefixI 'False) U1 :+: C1 ('MetaCons":"
('InfixI 'RightAssociative5
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))
(In a non-concurrent implementation, this can be a singleton
type, whose (unique) value is returned by myThreadId#. The
other operations can be omitted.)
Retrieves the allocation counter for the current thread.
Compare two stable names for equality.
Compare the underlying pointers of two values for equality.
Returns 1 if the pointers are equal and 0 otherwise.
The two values must be of the same type, of kind Type.
See also reallyUnsafePtrEquality#, which doesn't have
such restrictions.
Compare the underlying pointers of two arrays.
Compare the pointers of two byte arrays.
Compare the underlying pointers of two MVar#s.
Compare the underlying pointers of two MutVar#s.
Compare the underlying pointers of two mutable arrays.
Compare the underlying pointers of two mutable byte arrays.
Compare the underlying pointers of two PromptTag#s.
Compare the underlying pointers of two small arrays.
Compare the underlying pointers of two small mutable arrays.
Compare the underlying pointers of two TVar#s.
Compare the underlying pointers of two unlifted values for equality.
This is less dangerous than reallyUnsafePtrEquality, since the arguments are guaranteed to be evaluated. This means there is no risk of accidentally comparing a thunk. It's however still more dangerous than e.g. sameArray#.
Used for compiler-generated error message; encoding saves bytes of string junk.
error stops execution and displays an error message.
A variant of error that does not produce a stack trace.
The Maybe type encapsulates an optional value. A value of type
Maybe a either contains a value of type a (represented as Just a),
or it is empty (represented as Nothing). Using Maybe is a good way to
deal with errors or exceptional cases without resorting to drastic
measures such as error.
The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.
Instances31Monad, Functor, MonadFix, MonadFail, Applicative, Foldable, …
Monad MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadFix MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixMonadFail MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FailApplicative MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseFoldable MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableTraversable MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableAlternative MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadPlus MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadZip MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipEq1 MaybeDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 MaybeDefined in base-4.23.0.0 · Data.Functor.ClassesRead1 MaybeDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 MaybeDefined in base-4.23.0.0 · Data.Functor.ClassesGeneric1 MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsLift a => Lift (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftEq a => Eq (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.MaybeData a => Data (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataOrd a => Ord (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.MaybeRead a => Read (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.ReadShow a => Show (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.ShowGeneric (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup a => Semigroup (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseSemigroup a => Monoid (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseLift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup
Smay be turned into a monoid simply by adjoining an elementenot inSand defininge*e = eande*s = s = s*efor alls ∈ S."Since 4.11.0: constraint on inner
avalue generalised from Monoid to Semigroup.SingKind a => SingKind (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSingI 'NothingDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsSingI a2 => SingI ('Just a2)Defined in ghc-internal-10.0.0 · GHC.Internal.Genericstype Rep (Maybe a) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Maybe"
"GHC.Internal.Maybe"
"ghc-internal"
'False) (C1 ('MetaCons"Nothing"
'PrefixI 'False) U1 :+: C1 ('MetaCons"Just"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))type Rep1 Maybe = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Maybe"
"GHC.Internal.Maybe"
"ghc-internal"
'False) (C1 ('MetaCons"Nothing"
'PrefixI 'False) U1 :+: C1 ('MetaCons"Just"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))type DemoteRep (Maybe a) = Maybe (DemoteRep a)Defined in ghc-internal-10.0.0 · GHC.Internal.Genericsdata SingDefined in ghc-internal-10.0.0 · GHC.Internal.Generics
Equality and ordering
The syntax ?x :: a is desugared into IP "x" a
IP is declared very early, so that libraries can take
advantage of the implicit-call-stack feature
Methods
ip :: a
The 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:
Instances297Eq, …
Eq ByteArrayDefined in base-4.23.0.0 · Data.Array.ByteEq IoManagerFlagDefined in base-4.23.0.0 · GHC.RTS.FlagsEq TimeoutDefined in base-4.23.0.0 · System.TimeoutEq VoidDefined in ghc-internal-10.0.0 · GHC.Internal.BaseEq BigNatDefined in ghc-internal-10.0.0 · GHC.Internal.Bignum.BigNatEq IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Bignum.IntegerEq NaturalDefined in ghc-internal-10.0.0 · GHC.Internal.Bignum.NaturalEq ByteOrderDefined in ghc-internal-10.0.0 · GHC.Internal.ByteOrderEq ClosureTypeDefined in ghc-internal-10.0.0 · GHC.Internal.ClosureTypesEq BlockReasonDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.SyncEq ThreadIdDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.SyncEq ThreadStatusDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.SyncEq ConstrDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataEquality of constructors
Eq ConstrRepDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataEq DataRepDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataEq FixityDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataEq AllDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalEq AnyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalEq SomeTypeRepDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Typeable.InternalEq UniqueDefined in ghc-internal-10.0.0 · GHC.Internal.Data.UniqueEq VersionDefined in ghc-internal-10.0.0 · GHC.Internal.Data.VersionEq ControlMessageDefined in ghc-internal-10.0.0 · GHC.Internal.Event.ControlEq EventDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.TypesEq EventLifetimeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.TypesEq LifetimeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.TypesEq FdKeyDefined in ghc-internal-10.0.0 · GHC.Internal.Event.ManagerEq StateDefined in ghc-internal-10.0.0 · GHC.Internal.Event.ManagerEq EventDefined in ghc-internal-10.0.0 · GHC.Internal.Event.PollEq TimeoutKeyDefined in ghc-internal-10.0.0 · GHC.Internal.Event.TimeOutEq UniqueDefined in ghc-internal-10.0.0 · GHC.Internal.Event.UniqueEq ErrorCallDefined in ghc-internal-10.0.0 · GHC.Internal.ExceptionEq ArithExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.Exception.TypeEq SpecConstrAnnotationDefined in ghc-internal-10.0.0 · GHC.Internal.ExtsEq FingerprintDefined in ghc-internal-10.0.0 · GHC.Internal.Fingerprint.TypeEq ErrnoDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.ErrorEq CBoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CClockDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CLLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CPtrdiffDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CSCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CSUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CSigAtomicDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CSizeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CTimeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CUCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CUIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CUIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CUIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CULLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CULongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CUShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq CWcharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesEq IntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.PtrEq WordPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.PtrEq ForeignSrcLangDefined in ghc-internal-10.0.0 · GHC.Internal.ForeignSrcLangEq AssociativityDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq DecidedStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq FixityDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq SourceStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq SourceUnpackednessDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq PrimTypeDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresEq TsoFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresEq WhatNextDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresEq WhyBlockedDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresEq HalfWordDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.TypesEq StgInfoTableDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.TypesEq CostCentreDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.TypesEq CostCentreStackDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.TypesEq IndexTableDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.TypesEq StgTSOProfInfoDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.TypesEq MaskingStateDefined in ghc-internal-10.0.0 · GHC.Internal.IOEq BufferStateDefined in ghc-internal-10.0.0 · GHC.Internal.IO.BufferEq IODeviceTypeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.DeviceEq SeekModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.DeviceEq CodingProgressDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Encoding.TypesEq ArrayExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.ExceptionEq AsyncExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.ExceptionEq ExitCodeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.ExceptionEq IOErrorTypeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.ExceptionEq IOExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.ExceptionEq HandlePosnDefined in ghc-internal-10.0.0 · GHC.Internal.IO.HandleEq BufferModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.TypesEq HandleDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.TypesEq NewlineDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.TypesEq NewlineModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.TypesEq IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOModeEq IoSubSystemDefined in ghc-internal-10.0.0 · GHC.Internal.IO.SubSystemEq InfoProvDefined in ghc-internal-10.0.0 · GHC.Internal.InfoProv.TypesEq Int16Defined in ghc-internal-10.0.0 · GHC.Internal.IntEq Int32Defined in ghc-internal-10.0.0 · GHC.Internal.IntEq Int64Defined in ghc-internal-10.0.0 · GHC.Internal.IntEq Int8Defined in ghc-internal-10.0.0 · GHC.Internal.IntEq OnBlockedDefined in ghc-internal-10.0.0 · GHC.Internal.JS.Foreign.CallbackEq ExtensionDefined in ghc-internal-10.0.0 · GHC.Internal.LanguageExtensionsEq IoManagerFlagDefined in ghc-internal-10.0.0 · GHC.Internal.RTS.FlagsEq ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsEq WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsEq ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProfEq WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProfEq StackEntryDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.DecodeEq SrcLocDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.TypesEq CBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CBlkSizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CCcDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CClockIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CDevDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CFsBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CFsFilCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CGidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CInoDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CKeyDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CModeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CNfdsDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CNlinkDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq COffDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CPidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CRLimDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CSocklenDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CSpeedDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CSsizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CTcflagDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CTimerDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq CUidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesEq AnnLookupDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq AnnTargetDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq BangDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq BodyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq BytesDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq CallconvDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq ClauseDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq ConDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq DecDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq DecidedStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq DerivClauseDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq DerivStrategyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq DocLocDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq ExpDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq FamilyResultSigDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq FixityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq FixityDirectionDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq ForeignDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq FunDepDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq GuardDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq InfoDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq InjectivityAnnDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq InlineDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq LitDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq LocDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq MatchDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq ModNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq ModuleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq ModuleInfoDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq NameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq NameFlavourDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq NameSpaceDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq NamespaceSpecifierDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq OccNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq OverlapDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq PatDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq PatSynArgsDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq PatSynDirDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq PhasesDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq PkgNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq PragmaDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq RangeDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq RoleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq RuleBndrDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq RuleMatchDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq SafetyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq SourceStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq SourceUnpackednessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq StmtDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq TyLitDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq TySynEqnDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq TypeDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq TypeFamilyHeadDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq LexemeDefined in ghc-internal-10.0.0 · GHC.Internal.Text.Read.LexEq NumberDefined in ghc-internal-10.0.0 · GHC.Internal.Text.Read.LexEq SomeCharDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsEq SomeSymbolDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsEq SomeNatDefined in ghc-internal-10.0.0 · GHC.Internal.TypeNatsEq BoolDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq CharDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq DoubleDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq FloatDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq IntDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq ModuleDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq TrNameDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq TyConDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq WordDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq GeneralCategoryDefined in ghc-internal-10.0.0 · GHC.Internal.UnicodeEq Word16Defined in ghc-internal-10.0.0 · GHC.Internal.WordEq Word32Defined in ghc-internal-10.0.0 · GHC.Internal.WordEq Word64Defined in ghc-internal-10.0.0 · GHC.Internal.WordEq Word8Defined in ghc-internal-10.0.0 · GHC.Internal.WordEq ()Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq (Chan a)Defined in base-4.23.0.0 · Control.Concurrent.ChanEq (MutableByteArray s)Defined in base-4.23.0.0 · Data.Array.ByteEq (ConstPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.ConstPtrEq (ForeignPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.ForeignPtrEq (IORef a)Defined in ghc-internal-10.0.0 · GHC.Internal.IORefPointer equality.
Eq (MVar a)Defined in ghc-internal-10.0.0 · GHC.Internal.MVarCompares the underlying pointers.
Eq (FunPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.PtrEq (Ptr a)Defined in ghc-internal-10.0.0 · GHC.Internal.PtrEq (TVar a)Defined in ghc-internal-10.0.0 · GHC.Internal.STMEq (StablePtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.StableEq (StableName a)Defined in ghc-internal-10.0.0 · GHC.Internal.StableNameEq (SChar c)Defined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsEq (SSymbol s)Defined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsEq (SNat n)Defined in ghc-internal-10.0.0 · GHC.Internal.TypeNatsEq a => Eq (Complex a)Defined in base-4.23.0.0 · Data.ComplexEq a => Eq (First a)Defined in base-4.23.0.0 · Data.SemigroupEq a => Eq (Last a)Defined in base-4.23.0.0 · Data.SemigroupEq a => Eq (Max a)Defined in base-4.23.0.0 · Data.SemigroupEq a => Eq (Min a)Defined in base-4.23.0.0 · Data.SemigroupEq a => Eq (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseEq a => Eq (And a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsEq a => Eq (Iff a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsEq a => Eq (Ior a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsEq a => Eq (Xor a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsEq a => Eq (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.IdentityEq a => Eq (First a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidEq a => Eq (Last a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidEq a => Eq (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.OrdEq a => Eq (Dual a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalEq a => Eq (Product a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalEq a => Eq (Sum a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalEq a => Eq (ZipList a)Defined in ghc-internal-10.0.0 · GHC.Internal.Functor.ZipListEq a => Eq (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.MaybeEq a => Eq (Ratio a)Defined in ghc-internal-10.0.0 · GHC.Internal.RealEq a => Eq (a)Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq a => Eq [a]Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq flag => Eq (TyVarBndr flag)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxEq m => Eq (WrappedMonoid m)Defined in base-4.23.0.0 · Data.SemigroupEq p => Eq (Par1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (Fixed a)Defined in base-4.23.0.0 · Data.FixedEq (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyEq (TypeRep a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Typeable.InternalEq (U1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (V1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (IOArray i e)Defined in ghc-internal-10.0.0 · GHC.Internal.IOArrayEq (STRef s a)Defined in ghc-internal-10.0.0 · GHC.Internal.STRefPointer equality.
Eq a => Eq (Arg a b)Defined in base-4.23.0.0 · Data.Semigroup(Eq a, Eq b) => Eq (Either a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Either(Eq a, Eq b) => Eq (a, b)Defined in ghc-internal-10.0.0 · GHC.Internal.Classes(Ix i, Eq e) => Eq (Array i e)Defined in ghc-internal-10.0.0 · GHC.Internal.ArrEq (STArray s i e)Defined in ghc-internal-10.0.0 · GHC.Internal.ArrEq (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.CoercionEq (OrderingI a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.OrdEq (URec Char p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec Int p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec Word p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (URec (Ptr ()) p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (a :~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.EqualityEq (f a) => Eq (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidEq (f a) => Eq (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalEq (f p) => Eq (Rec1 f p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq a => Eq (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const(Eq a, Eq b, Eq c) => Eq (a, b, c)Defined in ghc-internal-10.0.0 · GHC.Internal.Classes(Generic1 f, Eq (Rep1 f a)) => Eq (Generically1 f a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (a :~~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.EqualityEq c => Eq (K1 i c p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Eq (f a), Eq (g a)) => Eq (Product f g a)Defined in base-4.23.0.0 · Data.Functor.Product(Eq (f a), Eq (g a)) => Eq (Sum f g a)Defined in base-4.23.0.0 · Data.Functor.Sum(Eq (f p), Eq (g p)) => Eq ((:*:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Eq (f p), Eq (g p)) => Eq ((:+:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d)Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesEq (f (g a)) => Eq (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.ComposeEq (f (g p)) => Eq ((:.:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsEq (f p) => Eq (M1 i c f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e)Defined in ghc-internal-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.0 · GHC.Internal.Classes
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.
Instances246Ord, …
Ord ByteArrayDefined in base-4.23.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 VoidDefined in ghc-internal-10.0.0 · GHC.Internal.BaseOrd BigNatDefined in ghc-internal-10.0.0 · GHC.Internal.Bignum.BigNatOrd IntegerDefined in ghc-internal-10.0.0 · GHC.Internal.Bignum.IntegerOrd NaturalDefined in ghc-internal-10.0.0 · GHC.Internal.Bignum.NaturalOrd ByteOrderDefined in ghc-internal-10.0.0 · GHC.Internal.ByteOrderOrd ClosureTypeDefined in ghc-internal-10.0.0 · GHC.Internal.ClosureTypesOrd BlockReasonDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.SyncOrd ThreadIdDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.SyncOrd ThreadStatusDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.SyncOrd AllDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalOrd AnyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalOrd SomeTypeRepDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Typeable.InternalOrd UniqueDefined in ghc-internal-10.0.0 · GHC.Internal.Data.UniqueOrd VersionDefined in ghc-internal-10.0.0 · GHC.Internal.Data.VersionOrd TimeoutKeyDefined in ghc-internal-10.0.0 · GHC.Internal.Event.TimeOutOrd UniqueDefined in ghc-internal-10.0.0 · GHC.Internal.Event.UniqueOrd ErrorCallDefined in ghc-internal-10.0.0 · GHC.Internal.ExceptionOrd ArithExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.Exception.TypeOrd FingerprintDefined in ghc-internal-10.0.0 · GHC.Internal.Fingerprint.TypeOrd CBoolDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CClockDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CDoubleDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CFloatDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CLLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CPtrdiffDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CSCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CSUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CSigAtomicDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CSizeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CTimeDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CUCharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CUIntDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CUIntMaxDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CUIntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CULLongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CULongDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CUSecondsDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CUShortDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd CWcharDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.TypesOrd IntPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.PtrOrd WordPtrDefined in ghc-internal-10.0.0 · GHC.Internal.Foreign.PtrOrd AssociativityDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd DecidedStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd FixityDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd SourceStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd SourceUnpackednessDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd PrimTypeDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresOrd TsoFlagsDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresOrd WhatNextDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresOrd WhyBlockedDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresOrd HalfWordDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.InfoTable.TypesOrd CostCentreDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.TypesOrd CostCentreStackDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.TypesOrd IndexTableDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.TypesOrd StgTSOProfInfoDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ProfInfo.TypesOrd SeekModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.DeviceOrd ArrayExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.ExceptionOrd AsyncExceptionDefined in ghc-internal-10.0.0 · GHC.Internal.IO.ExceptionOrd ExitCodeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.ExceptionOrd BufferModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.TypesOrd NewlineDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.TypesOrd NewlineModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.Handle.TypesOrd IOModeDefined in ghc-internal-10.0.0 · GHC.Internal.IO.IOModeOrd Int16Defined in ghc-internal-10.0.0 · GHC.Internal.IntOrd Int32Defined in ghc-internal-10.0.0 · GHC.Internal.IntOrd Int64Defined in ghc-internal-10.0.0 · GHC.Internal.IntOrd Int8Defined in ghc-internal-10.0.0 · GHC.Internal.IntOrd ExtensionDefined in ghc-internal-10.0.0 · GHC.Internal.LanguageExtensionsOrd ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsOrd WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsOrd ByteOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProfOrd WordOffsetDefined in ghc-internal-10.0.0 · GHC.Internal.Stack.ConstantsProfOrd CBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CBlkSizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CCcDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CClockIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CDevDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CFsBlkCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CFsFilCntDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CGidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CIdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CInoDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CKeyDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CModeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CNfdsDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CNlinkDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd COffDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CPidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CRLimDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CSocklenDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CSpeedDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CSsizeDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CTcflagDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CTimerDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd CUidDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd FdDefined in ghc-internal-10.0.0 · GHC.Internal.System.Posix.TypesOrd AnnLookupDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd AnnTargetDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd BangDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd BodyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd BytesDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd CallconvDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd ClauseDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd ConDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd DecDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd DecidedStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd DerivClauseDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd DerivStrategyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd DocLocDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd ExpDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd FamilyResultSigDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd FixityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd FixityDirectionDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd ForeignDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd FunDepDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd GuardDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd InfoDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd InjectivityAnnDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd InlineDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd LitDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd LocDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd MatchDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd ModNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd ModuleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd ModuleInfoDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd NameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd NameFlavourDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd NameSpaceDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd NamespaceSpecifierDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd OccNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd OverlapDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd PatDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd PatSynArgsDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd PatSynDirDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd PhasesDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd PkgNameDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd PragmaDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd RangeDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd RoleDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd RuleBndrDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd RuleMatchDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd SafetyDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd SourceStrictnessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd SourceUnpackednessDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd StmtDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd TyLitDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd TySynEqnDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd TypeDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd TypeFamilyHeadDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd SomeCharDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsOrd SomeSymbolDefined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsOrd SomeNatDefined in ghc-internal-10.0.0 · GHC.Internal.TypeNatsOrd BoolDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd CharDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd DoubleDefined in ghc-internal-10.0.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-10.0.0 · GHC.Internal.ClassesOrd IntDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd TyConDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd WordDefined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd GeneralCategoryDefined in ghc-internal-10.0.0 · GHC.Internal.UnicodeOrd Word16Defined in ghc-internal-10.0.0 · GHC.Internal.WordOrd Word32Defined in ghc-internal-10.0.0 · GHC.Internal.WordOrd Word64Defined in ghc-internal-10.0.0 · GHC.Internal.WordOrd Word8Defined in ghc-internal-10.0.0 · GHC.Internal.WordOrd ()Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd (ConstPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.ConstPtrOrd (ForeignPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.ForeignPtrOrd (FunPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.PtrOrd (Ptr a)Defined in ghc-internal-10.0.0 · GHC.Internal.PtrOrd (SChar c)Defined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsOrd (SSymbol s)Defined in ghc-internal-10.0.0 · GHC.Internal.TypeLitsOrd (SNat n)Defined in ghc-internal-10.0.0 · GHC.Internal.TypeNatsOrd a => Ord (First a)Defined in base-4.23.0.0 · Data.SemigroupOrd a => Ord (Last a)Defined in base-4.23.0.0 · Data.SemigroupOrd a => Ord (Max a)Defined in base-4.23.0.0 · Data.SemigroupOrd a => Ord (Min a)Defined in base-4.23.0.0 · Data.SemigroupOrd a => Ord (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseOrd a => Ord (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.IdentityOrd a => Ord (First a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidOrd a => Ord (Last a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidOrd a => Ord (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.OrdOrd a => Ord (Dual a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalOrd a => Ord (Product a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalOrd a => Ord (Sum a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalOrd a => Ord (ZipList a)Defined in ghc-internal-10.0.0 · GHC.Internal.Functor.ZipListOrd a => Ord (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.MaybeOrd a => Ord (a)Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd a => Ord [a]Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd flag => Ord (TyVarBndr flag)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxOrd m => Ord (WrappedMonoid m)Defined in base-4.23.0.0 · Data.SemigroupOrd p => Ord (Par1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsIntegral a => Ord (Ratio a)Defined in ghc-internal-10.0.0 · GHC.Internal.RealOrd (Fixed a)Defined in base-4.23.0.0 · Data.FixedOrd (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyOrd (TypeRep a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Typeable.InternalOrd (U1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (V1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd a => Ord (Arg a b)Defined in base-4.23.0.0 · Data.Semigroup(Ord a, Ord b) => Ord (Either a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Either(Ord a, Ord b) => Ord (a, b)Defined in ghc-internal-10.0.0 · GHC.Internal.Classes(Ix i, Ord e) => Ord (Array i e)Defined in ghc-internal-10.0.0 · GHC.Internal.ArrOrd (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.CoercionOrd (URec Char p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec Double p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec Float p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec Int p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec Word p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (URec (Ptr ()) p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (a :~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.EqualityOrd (f a) => Ord (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidOrd (f a) => Ord (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalOrd (f p) => Ord (Rec1 f p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd a => Ord (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const(Ord a, Ord b, Ord c) => Ord (a, b, c)Defined in ghc-internal-10.0.0 · GHC.Internal.Classes(Generic1 f, Ord (Rep1 f a)) => Ord (Generically1 f a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (a :~~: b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.EqualityOrd c => Ord (K1 i c p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Ord (f a), Ord (g a)) => Ord (Product f g a)Defined in base-4.23.0.0 · Data.Functor.Product(Ord (f a), Ord (g a)) => Ord (Sum f g a)Defined in base-4.23.0.0 · Data.Functor.Sum(Ord (f p), Ord (g p)) => Ord ((:*:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Ord (f p), Ord (g p)) => Ord ((:+:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d)Defined in ghc-internal-10.0.0 · GHC.Internal.ClassesOrd (f (g a)) => Ord (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.ComposeOrd (f (g p)) => Ord ((:.:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsOrd (f p) => Ord (M1 i c f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e)Defined in ghc-internal-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.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-10.0.0 · GHC.Internal.Classes
Monomorphic equality operators
C Strings
Compute the length of a NUL-terminated string. This address
must refer to immutable memory. GHC includes a built-in rule for
constant folding when the argument is a statically-known literal.
That is, a core-to-core pass reduces the expression
cstringLength# "hello"# to the constant 5#.
Magic combinators
The call inline f arranges that f is inlined, regardless of
its size. More precisely, the call inline f rewrites to the
right-hand side of f's definition. This allows the programmer to
control inlining from a particular call site rather than the
definition site of the function (c.f. INLINE pragmas).
This inlining occurs regardless of the argument to the call or the
size of f's definition; it is unconditional. The main caveat is
that f's definition must be visible to the compiler; it is
therefore recommended to mark the function with an INLINABLE
pragma at its definition so that GHC guarantees to record its
unfolding regardless of size.
If no inlining takes place, the inline function expands to the identity function in Phase zero, so its use imposes no overhead.
The call noinline f arranges that f will not be inlined.
It is removed during CorePrep so that its use imposes no overhead
(besides the fact that it blocks inlining.)
The lazy function restrains strictness analysis a little. The
call lazy e means the same as e, but lazy has a magical
property so far as strictness analysis is concerned: it is lazy in
its first argument, even though its semantics is strict. After
strictness analysis has run, calls to lazy are inlined to be the
identity function.
This behaviour is occasionally useful when controlling evaluation
order. Notably, lazy is used in the library definition of
Control.Parallel.par:
par :: a -> b -> b
par x y = case (par# x) of _ -> lazy yIf lazy were not lazy, Control.Parallel.par would look strict in
y which would defeat the whole purpose of Control.Parallel.par.
The oneShot function can be used to give a hint to the compiler that its argument will be called at most once, which may (or may not) enable certain optimizations. It can be useful to improve the performance of code in continuation passing style.
If oneShot is used wrongly, then it may be that computations whose result that would otherwise be shared are re-evaluated every time they are used. Otherwise, the use of oneShot is safe.
oneShot is representation-polymorphic: the type variables may refer to lifted or unlifted types.
Apply a function to a State# RealWorld token. When manually applying
a function to realWorld#, it is necessary to use NOINLINE to prevent
semantically undesirable floating. runRW# is inlined, but only very late
in compilation after all floating is complete.
The primitive used to implement GHC.IO.evaluate.
Prefer to use GHC.IO.evaluate whenever possible!
dataToTag# evaluates its argument and returns the index
(starting at zero) of the constructor used to produce that
argument. Any algebraic data type with all of its constructors
in scope may be used with dataToTag#.
dataToTag# (Left ())0#dataToTag# (Right undefined)1#
Methods
dataToTag# :: a -> Int#
The constraint WithDict cls meth can be solved when evidence for
the constraint cls can be provided in the form of a dictionary of
type meth. This requires cls to be a class constraint whose single
method has type meth.
For more (important) details on how this works, see
Note [withDict] in GHC.Tc.Instance.Class in GHC.
Methods
withDict :: meth -> (cls => r) -> r
Functions over Bool
Boolean "and", lazy in the second argument
Boolean "or", lazy in the second argument
Boolean "not"
Uninhabited data type
Instances11Eq, Data, Ord, Read, Show, Ix, …
Eq VoidDefined in ghc-internal-10.0.0 · GHC.Internal.BaseData VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataOrd VoidDefined in ghc-internal-10.0.0 · GHC.Internal.BaseRead VoidDefined in ghc-internal-10.0.0 · GHC.Internal.ReadShow VoidDefined in ghc-internal-10.0.0 · GHC.Internal.ShowIx VoidDefined in ghc-internal-10.0.0 · GHC.Internal.IxGeneric VoidDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup VoidDefined in ghc-internal-10.0.0 · GHC.Internal.BaseException VoidDefined in ghc-internal-10.0.0 · GHC.Internal.Exception.TypeLift VoidDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Lifttype Rep Void = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"Void"
"GHC.Internal.Base"
"ghc-internal"
'False) V1
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
Semigroup/Monoid
The class of semigroups (types with an associative binary operation).
Instances should satisfy the following:
You can alternatively define sconcat instead of (<>), in which case the laws are:
Methods
(<>) :: a -> a -> ainfixr 6An associative operation.
Examples
Example1 expression [1,2,3] <> [4,5,6][1,2,3,4,5,6]
Example1 expression Just [1, 2, 3] <> Just [4, 5, 6]Just [1,2,3,4,5,6]
Example1 expression putStr "Hello, " <> putStrLn "World!"Hello, World!
sconcat :: NonEmpty a -> aReduce a non-empty list with <>
The default definition should be sufficient, but this can be overridden for efficiency.
Examples
For the following examples, we will assume that we have:
Example1 expression import Data.List.NonEmpty (NonEmpty (..))Example1 expression sconcat $ "Hello" :| [" ", "Haskell", "!"]"Hello Haskell!"
Example1 expression sconcat $ Just [1, 2, 3] :| [Nothing, Just [4, 5, 6]]Just [1,2,3,4,5,6]
Example1 expression sconcat $ Left 1 :| [Right 2, Left 3, Right 4]Right 2
stimes :: Integral b => b -> a -> aRepeat a value
ntimes.The default definition will raise an exception for a multiplier that is
<= 0. This may be overridden with an implementation that is total. For monoids it is preferred to usestimesMonoid.By making this a member of the class, idempotent semigroups and monoids can upgrade this to execute in
\mathcal{O}(1)by pickingstimes = stimesIdempotentorstimes = stimesIdempotentMonoidrespectively.Examples
Example1 expression stimes 4 [1][1,1,1,1]
Example1 expression stimes 5 (putStr "hi!")hi!hi!hi!hi!hi!
Example1 expression stimes 3 (Right ":)")Right ":)"
Instances66Semigroup, …
Semigroup ByteArrayDefined in base-4.23.0.0 · Data.Array.ByteSemigroup VoidDefined in ghc-internal-10.0.0 · GHC.Internal.BaseSemigroup AllDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalSemigroup AnyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalSemigroup EventDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.TypesSemigroup EventLifetimeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.TypesSemigroup LifetimeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.TypesSemigroup ExceptionContextDefined in ghc-internal-10.0.0 · GHC.Internal.Exception.ContextSemigroup OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.BaseSemigroup ()Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid m => Semigroup (WrappedMonoid m)Defined in base-4.23.0.0 · Data.SemigroupSemigroup (FromMaybe b)Defined in base-4.23.0.0 · Data.Foldable1Semigroup (NonEmptyDList a)Defined in base-4.23.0.0 · Data.Foldable1Semigroup (Comparison a)Defined in base-4.23.0.0 · Data.Functor.ContravariantSemigroup (Equivalence a)Defined in base-4.23.0.0 · Data.Functor.ContravariantSemigroup (Predicate a)Defined in base-4.23.0.0 · Data.Functor.ContravariantSemigroup (First a)Defined in base-4.23.0.0 · Data.SemigroupSemigroup (Last a)Defined in base-4.23.0.0 · Data.SemigroupSemigroup (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.NonEmpty · orphanSemigroup (First a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidSemigroup (Last a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidSemigroup (Endo a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalSemigroup [a]Defined in ghc-internal-10.0.0 · GHC.Internal.BaseSemigroup a => Semigroup (JoinWith a)Defined in base-4.23.0.0 · Data.Foldable1Semigroup a => Semigroup (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.IdentitySemigroup a => Semigroup (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.OrdSemigroup a => Semigroup (Dual a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalSemigroup a => Semigroup (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseSemigroup a => Semigroup (STM a)Defined in ghc-internal-10.0.0 · GHC.Internal.STMSemigroup a => Semigroup (Q a)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.MonadSemigroup a => Semigroup (IO a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseSemigroup a => Semigroup (a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseSemigroup p => Semigroup (Par1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsBits a => Semigroup (And a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsBits a => Semigroup (Ior a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsBits a => Semigroup (Xor a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsFiniteBits a => Semigroup (Iff a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsThis constraint is arguably too strong. However, as some types (such as
Natural) have undefined complement, this is the only safe choice.Ord a => Semigroup (Max a)Defined in base-4.23.0.0 · Data.SemigroupOrd a => Semigroup (Min a)Defined in base-4.23.0.0 · Data.SemigroupOrd a => Semigroup (Max a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsOrd a => Semigroup (Min a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsNum a => Semigroup (Product a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalNum a => Semigroup (Sum a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal(Generic a, Semigroup (Rep a ())) => Semigroup (Generically a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup (Either a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.EitherSemigroup (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxySemigroup (U1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup (V1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup a => Semigroup (Op a b)Defined in base-4.23.0.0 · Data.Functor.ContravariantSemigroup a => Semigroup (ST s a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ST.Lazy.ImpSemigroup a => Semigroup (ST s a)Defined in ghc-internal-10.0.0 · GHC.Internal.STSemigroup b => Semigroup (a -> b)Defined in ghc-internal-10.0.0 · GHC.Internal.Base(Semigroup a, Semigroup b) => Semigroup (a, b)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseAlternative f => Semigroup (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalSemigroup (f p) => Semigroup (Rec1 f p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup a => Semigroup (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const(Applicative f, Semigroup a) => Semigroup (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid(Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseSemigroup c => Semigroup (K1 i c p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Semigroup (f a), Semigroup (g a)) => Semigroup (Product f g a)Defined in base-4.23.0.0 · Data.Functor.Product(Semigroup (f p), Semigroup (g p)) => Semigroup ((:*:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseSemigroup (f (g a)) => Semigroup (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.ComposeSemigroup (f (g p)) => Semigroup ((:.:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup (f p) => Semigroup (M1 i c f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e)Defined in ghc-internal-10.0.0 · GHC.Internal.Base
The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:
- Right identity
- Left identity
- Associativity
(
law)
- Concatenation
You can alternatively define mconcat instead of mempty, in which case the laws are:
- Unit
- Multiplication
- Subclass
The method names refer to the monoid of lists under concatenation, but there are many other instances.
Some types can be viewed as a monoid in more than one way,
e.g. both addition and multiplication on numbers.
In such cases we often define newtypes and make those instances
of Monoid, e.g. Data.Semigroup.Sum and Data.Semigroup.Product.
NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.
Methods
mempty :: aIdentity of mappend
Examples
Example1 expression "Hello world" <> mempty"Hello world"
Example1 expression mempty <> [1, 2, 3][1,2,3]
mappend :: a -> a -> aAn associative operation
NOTE: This method is redundant and has the default implementation
mappend = (<>)since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.mconcat :: [a] -> aFold a list using the monoid.
For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.
Example1 expression mconcat ["Hello", " ", "Haskell", "!"]"Hello Haskell!"
Instances57Monoid, …
Monoid ByteArrayDefined in base-4.23.0.0 · Data.Array.ByteMonoid AllDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonoid AnyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonoid EventDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.TypesMonoid EventLifetimeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.TypesMonoid LifetimeDefined in ghc-internal-10.0.0 · GHC.Internal.Event.Internal.Typesmappendtakes the longer of two lifetimes.Monoid ExceptionContextDefined in ghc-internal-10.0.0 · GHC.Internal.Exception.ContextMonoid OrderingDefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid ()Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid (Comparison a)Defined in base-4.23.0.0 · Data.Functor.ContravariantMonoid (Equivalence a)Defined in base-4.23.0.0 · Data.Functor.ContravariantMonoid (Predicate a)Defined in base-4.23.0.0 · Data.Functor.ContravariantMonoid (First a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonoid (Last a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonoid (Endo a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonoid [a]Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid a => Monoid (Identity a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.IdentityMonoid a => Monoid (Down a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.OrdMonoid a => Monoid (Dual a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonoid a => Monoid (STM a)Defined in ghc-internal-10.0.0 · GHC.Internal.STMMonoid a => Monoid (Q a)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.MonadMonoid a => Monoid (IO a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid a => Monoid (a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid m => Monoid (WrappedMonoid m)Defined in base-4.23.0.0 · Data.SemigroupMonoid p => Monoid (Par1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup a => Monoid (Maybe a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseLift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup
Smay be turned into a monoid simply by adjoining an elementenot inSand defininge*e = eande*s = s = s*efor alls ∈ S."Since 4.11.0: constraint on inner
avalue generalised from Monoid to Semigroup.Bits a => Monoid (Ior a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsBits a => Monoid (Xor a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsFiniteBits a => Monoid (And a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsThis constraint is arguably too strong. However, as some types (such as
Natural) have undefined complement, this is the only safe choice.FiniteBits a => Monoid (Iff a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.BitsThis constraint is arguably too strong. However, as some types (such as
Natural) have undefined complement, this is the only safe choice.Ord a => Monoid (Max a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsOrd a => Monoid (Min a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsNum a => Monoid (Product a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalNum a => Monoid (Sum a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.Internal(Ord a, Bounded a) => Monoid (Max a)Defined in base-4.23.0.0 · Data.Semigroup(Ord a, Bounded a) => Monoid (Min a)Defined in base-4.23.0.0 · Data.Semigroup(Generic a, Monoid (Rep a ())) => Monoid (Generically a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonoid (Proxy s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonoid (U1 p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonoid a => Monoid (Op a b)Defined in base-4.23.0.0 · Data.Functor.Contravariantmempty @(Op a b)without newtypes ismempty @(b->a)=_ -> mempty.mempty :: Op a b mempty = Op _ -> memptyMonoid a => Monoid (ST s a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ST.Lazy.ImpMonoid a => Monoid (ST s a)Defined in ghc-internal-10.0.0 · GHC.Internal.STMonoid b => Monoid (a -> b)Defined in ghc-internal-10.0.0 · GHC.Internal.Base(Monoid a, Monoid b) => Monoid (a, b)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseAlternative f => Monoid (Alt f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonoid (f p) => Monoid (Rec1 f p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonoid a => Monoid (Const a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Const(Applicative f, Monoid a) => Monoid (Ap f a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Monoid(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid c => Monoid (K1 i c p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Monoid (f a), Monoid (g a)) => Monoid (Product f g a)Defined in base-4.23.0.0 · Data.Functor.Product(Monoid (f p), Monoid (g p)) => Monoid ((:*:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid (f (g a)) => Monoid (Compose f g a)Defined in base-4.23.0.0 · Data.Functor.ComposeMonoid (f (g p)) => Monoid ((:.:) f g p)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonoid (f p) => Monoid (M1 i c f p)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)Defined in ghc-internal-10.0.0 · GHC.Internal.Base
Functors
A type f is a Functor if it provides a function fmap which, given any types a and b
lets you apply any function from (a -> b) to turn an f a into an f b, preserving the
structure of f. Furthermore f needs to adhere to the following:
Note, that the second law follows from the free theorem of the type fmap and the first law, so you need only check that the former condition holds. See these articles by School of Haskell or David Luposchainsky for an explanation.
Methods
fmap :: (a -> b) -> f a -> f bfmap is used to apply a function of type
(a -> b)to a value of typef a, where f is a functor, to produce a value of typef b. Note that for any type constructor with more than one parameter (e.g.,Either), only the last type parameter can be modified with fmap (e.g.,binEither a b).Some type constructors with two parameters or more have a
Bifunctorinstance that allows both the last and the penultimate parameters to be mapped over.Examples
Convert from a
Maybe Intto aMaybe Stringusing show:Example2 expressions fmap show NothingNothingfmap show (Just 3)Just "3"
Convert from an
Either Int Intto anEither Int Stringusing show:Example2 expressions fmap show (Left 17)Left 17fmap show (Right 17)Right "17"
Double each element of a list:
Example1 expression fmap (*2) [1,2,3][2,4,6]
Apply even to the second element of a pair:
Example1 expression fmap even (2,2)(2,True)
It may seem surprising that the function is only applied to the last element of the tuple compared to the list example above which applies it to every element in the list. To understand, remember that tuples are type constructors with multiple type parameters: a tuple of 3 elements
(a,b,c)can also be written(,,) a b cand itsFunctorinstance is defined forFunctor ((,,) a b)(i.e., only the third parameter is free to be mapped over withfmap).It explains why
fmapcan be used with tuples containing values of different types as in the following example:Example1 expression fmap even ("hello", 1.0, 4)("hello",1.0,True)
(<$) :: a -> f b -> f ainfixl 4Replace all locations in the input with the same value. The default definition is
fmap . const, but this may be overridden with a more efficient version.Examples
Perform a computation with Maybe and replace the result with a constant value if it is Just:
Example2 expressions 'a' <$ Just 2Just 'a''a' <$ NothingNothing
Instances75Functor, …
Functor ComplexDefined in base-4.23.0.0 · Data.ComplexFunctor FirstDefined in base-4.23.0.0 · Data.SemigroupFunctor LastDefined in base-4.23.0.0 · Data.SemigroupFunctor MaxDefined in base-4.23.0.0 · Data.SemigroupFunctor MinDefined in base-4.23.0.0 · Data.SemigroupFunctor ArgDescrDefined in base-4.23.0.0 · System.Console.GetOptFunctor ArgOrderDefined in base-4.23.0.0 · System.Console.GetOptFunctor OptDescrDefined in base-4.23.0.0 · System.Console.GetOptFunctor NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.NonEmpty · orphanFunctor HandlerDefined in ghc-internal-10.0.0 · GHC.Internal.Control.ExceptionFunctor IdentityDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.IdentityFunctor FirstDefined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidFunctor LastDefined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidFunctor DownDefined in ghc-internal-10.0.0 · GHC.Internal.Data.OrdFunctor DualDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalFunctor ProductDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalFunctor SumDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalFunctor ZipListDefined in ghc-internal-10.0.0 · GHC.Internal.Functor.ZipListFunctor NoIODefined in ghc-internal-10.0.0 · GHC.Internal.GHCiFunctor Par1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor GenClosureDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresFunctor GenStackFieldDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresFunctor GenStackFrameDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresFunctor GenStgStackClosureDefined in ghc-internal-10.0.0 · GHC.Internal.Heap.ClosuresFunctor MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor STMDefined in ghc-internal-10.0.0 · GHC.Internal.STMFunctor QDefined in ghc-internal-10.0.0 · GHC.Internal.TH.MonadFunctor TyVarBndrDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxFunctor PDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPFunctor ReadPDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPFunctor ReadPrecDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPrecFunctor SoloDefined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyFunctor U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor V1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (Arg a)Defined in base-4.23.0.0 · Data.SemigroupFunctor (Array i)Defined in ghc-internal-10.0.0 · GHC.Internal.ArrFunctor (ST s)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ST.Lazy.ImpFunctor (Either a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.EitherFunctor (StateL s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsFunctor (StateR s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsFunctor (ST s)Defined in ghc-internal-10.0.0 · GHC.Internal.STFunctor (Tuple2 a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonad m => Functor (WrappedMonad m)Defined in base-4.23.0.0 · Control.ApplicativeArrow a => Functor (ArrowMonad a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowFunctor (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.ConstFunctor (URec Char)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Double)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Float)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Int)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec Word)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (URec (Ptr ()))Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (Tuple3 a b)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor f => Functor (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidFunctor f => Functor (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalFunctor f => Functor (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor m => Functor (Kleisli m a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowMonad m => Functor (StateT s m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsArrow a => Functor (WrappedArrow a b)Defined in base-4.23.0.0 · Control.Applicative(Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (Tuple4 a b c)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.Base(Functor f, Functor g) => Functor (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Functor f, Functor g) => Functor (Sum f g)Defined in base-4.23.0.0 · Data.Functor.Sum(Functor f, Functor g) => Functor (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Functor f, Functor g) => Functor (f :+: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (Tuple5 a b c d)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor f => Functor (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Functor f, Functor g) => Functor (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Functor f, Functor g) => Functor (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsFunctor (Tuple6 a b c d e)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseFunctor (Tuple7 a b c d e f)Defined in ghc-internal-10.0.0 · GHC.Internal.Base
A functor with application, providing operations to
A minimal complete definition must include implementations of pure and one of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:
(<*>) = liftA2 idliftA2 f x y = f Prelude.<$> x <*> yFurther, any definition must satisfy the following:
- Identity
pure id <*> v = v- Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)- Homomorphism
pure f <*> pure x = pure (f x)- Interchange
u <*> pure y = pure ($ y) <*> u
The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:
As a consequence of these laws, the Functor instance for f will satisfy
It may be useful to note that supposing
forall x y. p (q x y) = f x . g yit follows from the above that
liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g vIf f is also a Monad, it should satisfy
(which implies that pure and <*> satisfy the applicative functor laws).
Methods
pure :: a -> f aLift a value into the Structure.
Examples
Example1 expression pure 1 :: Maybe IntJust 1
Example1 expression pure 'z' :: [Char]"z"
Example1 expression pure (pure ":D") :: Maybe [String]Just [":D"]
(<*>) :: f (a -> b) -> f a -> f binfixl 4Sequential application.
A few functors support an implementation of <*> that is more efficient than the default one.
Example
Used in combination with
,(Data.Functor.<$>)can be used to build a record.(<*>)Example1 expression data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}Example3 expressions produceFoo :: Applicative f => f FooproduceBar :: Applicative f => f BarproduceBaz :: Applicative f => f Baz
Example2 expressions mkState :: Applicative f => f MyStatemkState = MyState <$> produceFoo <*> produceBar <*> produceBaz
liftA2 :: (a -> b -> c) -> f a -> f b -> f cLift a binary function to actions.
Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>.
This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap.
Example
Example1 expression liftA2 (,) (Just 3) (Just 5)Just (3,5)
Example1 expression liftA2 (+) [1, 2, 3] [4, 5, 6][5,6,7,6,7,8,7,8,9]
(*>) :: f a -> f b -> f binfixl 4Sequence actions, discarding the value of the first argument.
Examples
If used in conjunction with the Applicative instance for Maybe, you can chain Maybe computations, with a possible "early return" in case of Nothing.
Example1 expression Just 2 *> Just 3Just 3
Example1 expression Nothing *> Just 3Nothing
Of course a more interesting use case would be to have effectful computations instead of just returning pure values.
Example4 expressions import Data.Charimport GHC.Internal.Text.ParserCombinators.ReadPlet p = string "my name is " *> munch1 isAlpha <* eofreadP_to_S p "my name is Simon"[("Simon","")]
(<*) :: f a -> f b -> f ainfixl 4Sequence actions, discarding the value of the second argument.
Instances52Applicative, …
Applicative ComplexDefined in base-4.23.0.0 · Data.ComplexApplicative FirstDefined in base-4.23.0.0 · Data.SemigroupApplicative LastDefined in base-4.23.0.0 · Data.SemigroupApplicative MaxDefined in base-4.23.0.0 · Data.SemigroupApplicative MinDefined in base-4.23.0.0 · Data.SemigroupApplicative NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.NonEmpty · orphanApplicative IdentityDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.IdentityApplicative FirstDefined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidApplicative LastDefined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidApplicative DownDefined in ghc-internal-10.0.0 · GHC.Internal.Data.OrdApplicative DualDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalApplicative ProductDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalApplicative SumDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalApplicative ZipListDefined in ghc-internal-10.0.0 · GHC.Internal.Functor.ZipListf <$> ZipList xs1 <*> ... <*> ZipList xsN = ZipList (zipWithN f xs1 ... xsN)where
zipWithNrefers to thezipWithfunction of the appropriate arity (zipWith,zipWith3,zipWith4, ...). For example:(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..] = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..]) = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}Applicative NoIODefined in ghc-internal-10.0.0 · GHC.Internal.GHCiApplicative Par1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsApplicative MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseApplicative STMDefined in ghc-internal-10.0.0 · GHC.Internal.STMApplicative QDefined in ghc-internal-10.0.0 · GHC.Internal.TH.MonadApplicative PDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPApplicative ReadPDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPApplicative ReadPrecDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPrecApplicative SoloDefined in ghc-internal-10.0.0 · GHC.Internal.BaseApplicative IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseApplicative []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseApplicative ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyApplicative U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsApplicative (ST s)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ST.Lazy.ImpApplicative (Either e)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.EitherApplicative (StateL s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsApplicative (StateR s)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsApplicative (ST s)Defined in ghc-internal-10.0.0 · GHC.Internal.STMonad m => Applicative (WrappedMonad m)Defined in base-4.23.0.0 · Control.ApplicativeMonoid a => Applicative (Tuple2 a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseArrow a => Applicative (ArrowMonad a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowApplicative f => Applicative (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidApplicative f => Applicative (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalApplicative f => Applicative (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsApplicative m => Applicative (Kleisli m a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowMonad m => Applicative (StateT s m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.UtilsMonoid m => Applicative (Const m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.ConstArrow a => Applicative (WrappedArrow a b)Defined in base-4.23.0.0 · Control.Applicative(Monoid a, Monoid b) => Applicative (Tuple3 a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Base(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsApplicative ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonoid c => Applicative (K1 i c)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Applicative f, Applicative g) => Applicative (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Applicative f, Applicative g) => Applicative (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Monoid a, Monoid b, Monoid c) => Applicative (Tuple4 a b c)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseApplicative f => Applicative (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Applicative f, Applicative g) => Applicative (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Applicative f, Applicative g) => Applicative (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
A variant of <*> with the types of the arguments reversed. It differs from
flip in that the effects are resolved in the order the arguments are
presented.(<*>)
Examples
(<**>) (print 1) (id <$ print 2)12
flip (<*>) (print 1) (id <$ print 2)21
ZipList [4, 5, 6] <**> ZipList [(+1), (*2), (/3)]ZipList {getZipList = [5.0,10.0,2.0]}
Lift a function to actions.
Equivalent to Functor's fmap but implemented using only Applicative's methods:
liftA f a = pure f <*> a
As such this function may be used to implement a Functor instance from an Applicative one.
This function can be used to define `fmap = liftA`, if Applicative is already defined for a data type.
Examples
Using the Applicative instance for Lists:
liftA (+1) [1, 2][2,3]
Or the Applicative instance for Maybe
liftA (+1) (Just 3)Just 4
Lift a ternary function to actions.
The join function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.
'join bss' can be understood as the do expression
do bs <- bss
bs
Examples
join [[1, 2, 3], [4, 5, 6], [7, 8, 9]][1,2,3,4,5,6,7,8,9]
join (Just (Just 3))Just 3
A common use of join is to run an IO computation returned from
an GHC.Conc.STM transaction, since GHC.Conc.STM transactions
can't perform IO directly. Recall that
GHC.Internal.Conc.atomically :: STM a -> IO a
is used to run GHC.Conc.STM transactions atomically. So, by
specializing the types of GHC.Internal.Conc.atomically and join to
GHC.Internal.Conc.atomically :: STM (IO b) -> IO (IO b)
join :: IO (IO b) -> IO b
we can compose them as
join . GHC.Internal.Conc.atomically :: STM (IO b) -> IO b
to run an GHC.Conc.STM transaction and the IO action it
returns.
The Monad class defines the basic operations over a monad,
a concept from a branch of mathematics known as category theory.
From the perspective of a Haskell programmer, however, it is best to
think of a monad as an abstract datatype of actions.
Haskell's do expressions provide a convenient syntax for writing
monadic expressions.
Instances of Monad should satisfy the following:
- Left identity
- Right identity
- Associativity
Furthermore, the Monad and Applicative operations should relate as follows:
The above laws imply:
and that pure and (<*>) satisfy the applicative functor laws.
The instances of Monad for List, Maybe and System.IO.IO
defined in the Prelude satisfy these laws.
Methods
(>>=) :: m a -> (a -> m b) -> m binfixl 1Sequentially compose two actions, passing any value produced by the first as an argument to the second.
'
as >>= bs' can be understood as thedoexpressiondo a <- as bs aAn alternative name for this function is 'bind', because it is used to introduce bindings in monadic contexts, but some people may refer to it as 'flatMap', which results from it being equivalent to
\x f -> join (fmap f x) :: Monad m => m a -> (a -> m b) -> m bwhich can be seen as mapping a value with
Monad m => m a -> m (m b)and then 'flattening'm (m b)tom busing join.(>>) :: m a -> m b -> m binfixl 1Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.
'
as >> bs' can be understood as thedoexpressiondo as bsor in terms of
as(>>=)as >>= const bsreturn :: a -> m aInject a value into the monadic type. This function should not be different from its default implementation as pure. The justification for the existence of this function is merely historic.
Instances43Monad, …
Monad ComplexDefined in base-4.23.0.0 · Data.ComplexMonad FirstDefined in base-4.23.0.0 · Data.SemigroupMonad LastDefined in base-4.23.0.0 · Data.SemigroupMonad MaxDefined in base-4.23.0.0 · Data.SemigroupMonad MinDefined in base-4.23.0.0 · Data.SemigroupMonad NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.NonEmpty · orphanMonad IdentityDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.IdentityMonad FirstDefined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonad LastDefined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonad DownDefined in ghc-internal-10.0.0 · GHC.Internal.Data.OrdMonad DualDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonad ProductDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonad SumDefined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonad NoIODefined in ghc-internal-10.0.0 · GHC.Internal.GHCiMonad Par1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonad MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonad STMDefined in ghc-internal-10.0.0 · GHC.Internal.STMMonad QDefined in ghc-internal-10.0.0 · GHC.Internal.TH.MonadMonad PDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPMonad ReadPDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPMonad ReadPrecDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPrecMonad SoloDefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonad IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonad []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonad ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonad U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonad (ST s)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ST.Lazy.ImpMonad (Either e)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.EitherMonad (ST s)Defined in ghc-internal-10.0.0 · GHC.Internal.STMonad m => Monad (WrappedMonad m)Defined in base-4.23.0.0 · Control.ApplicativeMonoid a => Monad (Tuple2 a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseArrowApply a => Monad (ArrowMonad a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowMonad f => Monad (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonad f => Monad (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonad f => Monad (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonad m => Monad (Kleisli m a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowMonad m => Monad (StateT s m)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Functor.Utils(Monoid a, Monoid b) => Monad (Tuple3 a b)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonad ((->) r)Defined in ghc-internal-10.0.0 · GHC.Internal.Base(Monad f, Monad g) => Monad (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Monad f, Monad g) => Monad (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Monoid a, Monoid b, Monoid c) => Monad (Tuple4 a b c)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseMonad f => Monad (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
Same as >>=, but with the arguments interchanged.
as >>= f == f =<< asConditional execution of Applicative expressions. For example,
Examples
when debug (putStrLn "Debugging")will output the string Debugging if the Boolean value debug
is True, and otherwise do nothing.
putStr "pi:" >> when False (print 3.14159)pi:
Evaluate each action in the sequence from left to right, and collect the results.
Promote a function to a monad, scanning the monadic arguments from left to right.
This function can be used to define `liftA2 = liftM2`, if Monad is already defined for a data type.
Examples
liftM2 (+) [0,1] [0,2][0,2,1,3]
liftM2 (+) (Just 1) NothingNothing
liftM2 (+) (+ 3) (* 2) 518
Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).
Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).
Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).
In many situations, the liftM operations can be replaced by uses of ap, which promotes function application.
return f `ap` x1 `ap` ... `ap` xnis equivalent to
liftM<n> f x1 x2 ... xnThis function can be used to define `(*) = ap`, if Monad is already defined for a data type.
Examples
pure (\x y z -> x + y * z) `ap` Just 1 `ap` Just 5 `ap` Just 10Just 51
A monoid on applicative functors.
If defined, some and many should be the least solutions of the equations:
Examples
Nothing <|> Just 42Just 42
[1, 2] <|> [3, 4][1,2,3,4]
empty <|> print (2^15)32768
Methods
empty :: f aThe identity of <|>
empty <|> a == a a <|> empty == a(<|>) :: f a -> f a -> f ainfixl 3An associative binary operation
some :: f a -> f [a]One or more.
Examples
Example1 expression some (putStr "la")lalalalalalalalala... * goes on forever *
Example1 expression some Nothingnothing
Example1 expression take 5 <$> some (Just 1)* hangs forever *
Note that this function can be used with Parsers based on Applicatives. In that case
some parserwill attempt to parseparserone or more times until it fails.many :: f a -> f [a]Zero or more.
Examples
Example1 expression many (putStr "la")lalalalalalalalala... * goes on forever *
Example1 expression many NothingJust []
Example1 expression take 5 <$> many (Just 1)* hangs forever *
Note that this function can be used with Parsers based on Applicatives. In that case
many parserwill attempt to parseparserzero or more times until it fails.
Instances23Alternative, …
Alternative ZipListDefined in ghc-internal-10.0.0 · GHC.Internal.Functor.ZipListAlternative MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseAlternative STMDefined in ghc-internal-10.0.0 · GHC.Internal.STMAlternative PDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPAlternative ReadPDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPAlternative ReadPrecDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPrecAlternative IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseAlternative []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseCombines lists by concatenation, starting from the empty list.
Alternative ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyAlternative U1Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadPlus m => Alternative (WrappedMonad m)Defined in base-4.23.0.0 · Control.ApplicativeArrowPlus a => Alternative (ArrowMonad a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowAlternative f => Alternative (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidAlternative f => Alternative (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalAlternative f => Alternative (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative m => Alternative (Kleisli m a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Arrow(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b)Defined in base-4.23.0.0 · Control.Applicative(Generic1 f, Alternative (Rep1 f)) => Alternative (Generically1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Alternative f, Alternative g) => Alternative (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(Alternative f, Alternative g) => Alternative (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsAlternative f => Alternative (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(Alternative f, Applicative g) => Alternative (Compose f g)Defined in base-4.23.0.0 · Data.Functor.Compose(Alternative f, Applicative g) => Alternative (f :.: g)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
Monads that also support choice and failure.
Instances17MonadPlus, …
MonadPlus MaybeDefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadPlus STMDefined in ghc-internal-10.0.0 · GHC.Internal.STMMonadPlus PDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPMonadPlus ReadPDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPMonadPlus ReadPrecDefined in ghc-internal-10.0.0 · GHC.Internal.Text.ParserCombinators.ReadPrecMonadPlus IODefined in ghc-internal-10.0.0 · GHC.Internal.BaseMonadPlus []Defined in ghc-internal-10.0.0 · GHC.Internal.BaseCombines lists by concatenation, starting from the empty list.
MonadPlus ProxyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.ProxyMonadPlus U1Defined in ghc-internal-10.0.0 · GHC.Internal.Generics(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.ArrowMonadPlus f => MonadPlus (Ap f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.MonoidMonadPlus f => MonadPlus (Alt f)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Semigroup.InternalMonadPlus f => MonadPlus (Rec1 f)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadPlus m => MonadPlus (Kleisli m a)Defined in ghc-internal-10.0.0 · GHC.Internal.Control.Arrow(MonadPlus f, MonadPlus g) => MonadPlus (Product f g)Defined in base-4.23.0.0 · Data.Functor.Product(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsMonadPlus f => MonadPlus (M1 i c f)Defined in ghc-internal-10.0.0 · GHC.Internal.Generics
Non-empty (and non-strict) list type.
Constructors
a :| [a]infixr 5
Instances25Monad, Functor, MonadFix, Applicative, Foldable, Traversable, …
Monad NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.NonEmpty · orphanFunctor NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.NonEmpty · orphanMonadFix NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.FixApplicative NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.NonEmpty · orphanFoldable NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.FoldableTraversable NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Data.TraversableMonadZip NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Monad.ZipFoldable1 NonEmptyDefined in base-4.23.0.0 · Data.Foldable1Eq1 NonEmptyDefined in base-4.23.0.0 · Data.Functor.ClassesOrd1 NonEmptyDefined in base-4.23.0.0 · Data.Functor.ClassesRead1 NonEmptyDefined in base-4.23.0.0 · Data.Functor.ClassesShow1 NonEmptyDefined in base-4.23.0.0 · Data.Functor.ClassesGeneric1 NonEmptyDefined in ghc-internal-10.0.0 · GHC.Internal.GenericsLift a => Lift (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.TH.LiftIsList (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.IsListEq a => Eq (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseData a => Data (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.DataOrd a => Ord (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.BaseRead a => Read (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.ReadShow a => Show (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.ShowGeneric (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.GenericsSemigroup (NonEmpty a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.NonEmpty · orphantype Rep (NonEmpty a) = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"NonEmpty"
"GHC.Internal.Base"
"ghc-internal"
'False) (C1 ('MetaCons":|"
('InfixI 'RightAssociative5
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))type Rep1 NonEmpty = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.Generics"NonEmpty"
"GHC.Internal.Base"
"ghc-internal"
'False) (C1 ('MetaCons":|"
('InfixI 'RightAssociative5
) 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))type Item (NonEmpty a) = aDefined in ghc-internal-10.0.0 · GHC.Internal.IsList
foldr, applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left:
foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)\mathcal{O}(n). map f xs is the list obtained by applying f to
each element of xs, i.e.,
map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
map f [x1, x2, ...] == [f x1, f x2, ...]this means that map id == id
Examples
map (+1) [1, 2, 3][2,3,4]
map id [1, 2, 3][1,2,3]
map (\n -> 3 * n + 1) [1, 2, 3][4,7,10]
(++) appends two lists, i.e.,
[x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
[x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]If the first list is not finite, the result is the first list.
Performance considerations
This function takes linear time in the number of elements of the
first list. Thus it is better to associate repeated
applications of (++) to the right (which is the default behaviour):
xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs.
For the same reason GHC.Internal.Data.List.concat = GHC.Internal.Data.List.foldr (++) []
has linear performance, while GHC.Internal.Data.List.foldl (++) [] is prone
to quadratic slowdown
Examples
[1, 2, 3] ++ [4, 5, 6][1,2,3,4,5,6]
[] ++ [1, 2, 3][1,2,3]
[3, 2, 1] ++ [][3,2,1]
String is an alias for a list of characters.
String constants in Haskell are values of type String.
That means if you write a string literal like "hello world",
it will have the type [Char], which is the same as String.
Note: You can ask the compiler to automatically infer different types
with the -XOverloadedStrings language extension, for example
"hello world" :: Text. See IsString for more information.
Because String is just a list of characters, you can use normal list functions
to do basic string manipulation. See Data.List for operations on lists.
Performance considerations
[Char] is a relatively memory-inefficient type.
It is a linked list of boxed word-size characters, internally it looks something like:
╭─────┬───┬──╮ ╭─────┬───┬──╮ ╭─────┬───┬──╮ ╭────╮
│ (:) │ │ ─┼─>│ (:) │ │ ─┼─>│ (:) │ │ ─┼─>│ [] │
╰─────┴─┼─┴──╯ ╰─────┴─┼─┴──╯ ╰─────┴─┼─┴──╯ ╰────╯
v v v
'a' 'b' 'c'The String "abc" will use 5*3+1 = 16 (in general 5n+1)
words of space in memory.
Furthermore, operations like (++) (string concatenation) are O(n)
(in the left argument).
For historical reasons, the base library uses String in a lot of places
for the conceptual simplicity, but library code dealing with user-data
should use the text
package for Unicode text, or the the
bytestring package
for binary data.
The Prelude.fromEnum method restricted to the type Char.
This String equality predicate is used when desugaring pattern-matches against strings.
Miscellanea
Identity function.
id x = xThis function might seem useless at first glance, but it can be very useful in a higher order context.
Examples
length $ filter id [True, True, False, True]3
Just (Just 3) >>= idJust 3
foldr id 0 [(^3), (*5), (+2)]1000
If the first argument evaluates to True, then the result is the second argument. Otherwise an AssertionFailed exception is raised, containing a String with the source file and line number of the call to assert.
Assertions can normally be turned on or off with a compiler flag
(for GHC, assertions are normally on unless optimisation is turned on
with -O or the -fignore-asserts option is given). When assertions
are turned off, the first argument to assert is ignored, and the second
argument is returned as the result.
Constructors
forall a. O a
const x y always evaluates to x, ignoring its second argument.
const x = \_ -> xThis function might seem useless at first glance, but it can be very useful in a higher order context.
Examples
const 42 "hello"42
map (const 42) [0..3][42,42,42,42]
Right to left function composition.
(f . g) x = f (g x)f . id = f = id . fExamples
map ((*2) . length) [[], [0, 1, 2], [0]][0,6,2]
foldr (.) id [(+1), (*3), (^3)] 225
let (...) = (.).(.) in ((*2)...(+)) 5 1030
flip f takes its (first) two arguments in the reverse order of f.
flip f x y = f y xflip . flip = idExamples
flip (++) "hello" "world""worldhello"
let (.>) = flip (.) in (+1) .> show $ 5"6"
is the function application operator.($)
Applying to a function ($)f and an argument x gives the same result as applying f to x directly. The definition is akin to this:
($) :: (a -> b) -> a -> b
($) f x = f x
This is id specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->)
is the same as (a -> b) -> a -> b.
On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell.
The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:
expr = min 5 1 + 5
expr = ((min 5) 1) + 5
($) has precedence 0 (the lowest) and associates to the right, so these are equivalent:
expr = min 5 $ 1 + 5
expr = (min 5) (1 + 5)
Examples
A common use cases of ($) is to avoid parentheses in complex expressions.
For example, instead of using nested parentheses in the following Haskell function:
-- | Sum numbers in a string: strSum "100 5 -7" == 98
strSum :: String -> Int
strSum s = sum (mapMaybe readMaybe (words s))
we can deploy the function application operator:
-- | Sum numbers in a string: strSum "100 5 -7" == 98
strSum :: String -> Int
strSum s = sum $ mapMaybe readMaybe $ words s
($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions:
applyFive :: [Int]
applyFive = map ($ 5) [(+1), (2^)]
>>> [6, 32]
Technical Remark (Representation Polymorphism)
($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:
fastMod :: Int -> Int -> Int
fastMod (I# x) (I# m) = I# $ remInt# x m
Strict (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.
until p f yields the result of applying f until p holds.
IO
Low-level integer utilities
Returns the tag of a constructor application; this function was once used by the deriving code for Eq, Ord and Enum.
This function is used to implement branchless shifts. If the number of bits to shift is greater than or equal to the type size in bits, then the shift must return 0. Instead of doing a test, we use a mask obtained via this function which is branchless too.
shift_mask m b | b < m = 0xFF..FF | otherwise = 0
Shift the argument left by the specified number of bits (which must be non-negative).
Shift the argument right by the specified number of bits
(which must be non-negative).
The RL means "right, logical" (as opposed to RA for arithmetic)
(although an arithmetic right shift wouldn't make sense for Word#)
Shift the argument left by the specified number of bits (which must be non-negative).
Shift the argument right (signed) by the specified number of bits
(which must be non-negative).
The RA means "right, arithmetic" (as opposed to RL for logical)
Shift the argument right (unsigned) by the specified number of bits
(which must be non-negative).
The RL means "right, logical" (as opposed to RA for arithmetic)