| 18 | Specifically, the interface is this: |

| 19 | {{{ |

| 20 | data Integer |

| 21 | |

| 22 | mkInteger :: Bool -- True <=> non-negative |

| 23 | -> [Int] -- Absolute value in 31 bit chunks, least significant first |

| 24 | -- ideally these would be Words rather than Ints, but |

| 25 | -- we don't have Word available at the moment. |

| 26 | -> Integer |

| 27 | |

| 28 | smallInteger :: Int# -> Integer |

| 29 | integerTooInt :: Integer -> Int# |

| 30 | |

| 31 | wordToInteger :: Word# -> Integer |

| 32 | integerToWord :: Integer -> Word# |

| 33 | |

| 34 | -- And similarly for Int64#, Word64# on 64-bit |

| 35 | |

| 36 | floatFromInteger :: Integer -> Float# |

| 37 | decodeFloatInteger :: Float# -> (# Integer, Int# #) |

| 38 | encodeFloatInteger :: Integer -> Int# -> Float# |

| 39 | |

| 40 | -- And similarly Double |

| 41 | |

| 42 | plusInteger :: Integer -> Integer -> Integer |

| 43 | -- And similarly: minusInteger, timesInteger, negateInteger, |

| 44 | -- eqInteger, neqInteger, absInteger, signumInteger, |

| 45 | -- leInteger, gtInteger, ltInteger, geInteger, compareInteger, |

| 46 | -- divModInteger, quotRemInteger, quotInteger, remInteger, |

| 47 | -- andInteger, orInteger, xorInteger, complementInteger, |

| 48 | -- shiftLInteger, shiftRInteger, |

| 49 | -- hashInteger, |

| 50 | }}} |