2 % (c) The University of Glasgow, 2000-2006
4 \section{Fast integers and booleans}
8 FastInt, _ILIT, iBox, iUnbox,
9 (+#), (-#), (*#), quotFastInt, negateFastInt,
10 (==#), (<#), (<=#), (>=#), (>#),
13 #if defined(__GLASGOW_HASKELL__)
17 ( Int(..), Int#, (+#), (-#), (*#),
18 quotInt#, negateInt#, (==#), (<#), (<=#), (>=#), (>#)
25 quotFastInt = quotInt#
26 negateFastInt = negateInt#
28 #else /* ! __GLASGOW_HASKELL__ */
38 negateFastInt = negate
45 --These are among the type-signatures necessary for !ghc to compile
46 -- but break ghc (can't give a signature for an import...)
47 --Note that the comparisons actually do return Bools not FastBools.
48 (+#) :: FastInt -> FastInt -> FastInt
49 (-#) :: FastInt -> FastInt -> FastInt
50 (*#) :: FastInt -> FastInt -> FastInt
51 (==#) :: FastInt -> FastInt -> Bool
52 (<#) :: FastInt -> FastInt -> Bool
53 (<=#) :: FastInt -> FastInt -> Bool
54 (>=#) :: FastInt -> FastInt -> Bool
55 (>#) :: FastInt -> FastInt -> Bool
57 #endif /* ! __GLASGOW_HASKELL__ */
59 -- type-signatures will improve the non-ghc-specific versions
60 -- and keep things accurate (and ABLE to compile!)
61 _ILIT :: Int -> FastInt
62 iBox :: FastInt -> Int
63 iUnbox :: Int -> FastInt
65 quotFastInt :: FastInt -> FastInt -> FastInt
66 negateFastInt :: FastInt -> FastInt