wiki:ReplacingGMPNotes/RequiredIntegerFunctions

Version 1 (modified by p_tanski, 8 years ago) (diff)

--

Functions that operate on Integer values

Module/Class Haskell Function Notes
GHC.Num (+)
GHC.Num (-)
GHC.Num (*)
GHC.Num div
GHC.Num negate
GHC.Num abs
GHC.Num signum
GHC.Num subtract
GHC.Num even
GHC.Num odd
GHC.Num gcd
GHC.Num lcm
GHC.Num (^) need exceptions for overflow
GHC.Num (^^) need exceptions for overflow
GHC.Num zeroInteger (see other primitives below)
GHC.Num(Eq) <
GHC.Num(Eq) <=
GHC.Num(Eq) >
GHC.Num(Eq) >=
GHC.Num(Eq) ==
GHC.Num(Eq) !=
Data.Bits (.&.)
Data.Bits (.|.)
Data.Bits xor
Data.Bits complement
Data.Bits shift
Data.Bits rotate
Data.Bits bit
Data.Bits setBit
Data.Bits clearBit
Data.Bits complementBit
Data.Bits testBit
Data.Bits bitSize
Data.Bits isSigned
Data.Bits shiftL Haskell function
Data.Bits shiftR Haskell function
Data.Bits rotateL rotates operate as shifts for Integer
Data.Bits rotateR rotates operate as shifts for Integer
GHC.Prim integer2Int from rts/PrimOps.cmm
GHC.Prim integer2Word from rts/PrimOps.cmm
GHC.Prim int2Integer from rts/PrimOps.cmm
GHC.Prim word2Integer from rts/PrimOps.cmm
GHC.Prim int64ToInteger from rts/PrimOps.cmm
GHC.Prim word64ToInteger from rts/PrimOps.cmm
GHC.Prim decodeDouble from rts/PrimOps.cmm
GHC.Prim decodeFloat from rts/PrimOps.cmm
GHC.Prim plusInteger# from rts/PrimOps.cmm
GHC.Prim minusInteger# from rts/PrimOps.cmm
GHC.Prim timesInteger# from rts/PrimOps.cmm
GHC.Prim gcdInteger# from rts/PrimOps.cmm
GHC.Prim gcdIntegerInt# from rts/PrimOps.cmm
GHC.Prim divExactInteger# from rts/PrimOps.cmm
GHC.Prim quotInteger# from rts/PrimOps.cmm
GHC.Prim remInteger# from rts/PrimOps.cmm
GHC.Prim cmpInteger# from rts/PrimOps.cmm
GHC.Prim cmpIntegerInt# from rts/PrimOps.cmm
GHC.Prim quotRemInteger# from rts/PrimOps.cmm
GHC.Prim divModInteger# from rts/PrimOps.cmm
GHC.Prim andInteger# from rts/PrimOps.cmm
GHC.Prim orInteger# from rts/PrimOps.cmm
GHC.Prim xorInteger# from rts/PrimOps.cmm
GHC.Prim complementInteger# from rts/PrimOps.cmm
StringBuffer parseInteger Haskell function
GHC.Float floatRadix rts/StgPrimFloat.c
GHC.Float encodeFloat rts/StgPrimFloat.c --> linked in directly?
GHC.Float __decodeFloat rts/StgPrimFloat.c --> rts/Rts.h --> PrimOps.cmm
GHC.Float __decodeDouble rts/StgPrimFloat.c --> rts/Rts.h --> PrimOps.cmm