PreludeBuiltin

The plain source file for module PreludeBuiltin is not available.
module PreludeBuiltin where

foreign import primIntToChar   :: Int -> Char
foreign import primCharToInt   :: Char -> Int
foreign import primInteger2Int :: Integer -> Int

foreign import primIntEq       :: Int -> Int -> Bool
foreign import primIntLte      :: Int -> Int -> Bool

foreign import primIntAdd      :: Int -> Int -> Int
foreign import primIntSub      :: Int -> Int -> Int
foreign import primIntMul      :: Int -> Int -> Int
foreign import primIntQuot     :: Int -> Int -> Int
foreign import primIntRem      :: Int -> Int -> Int
foreign import primIntSignum   :: Int -> Int

foreign import primError       :: String -> a

foreign import primSeq         :: a -> b -> b

primIntQuotRem x y = (x `primIntQuot` y,x `primIntRem` y)

primCharEq c c' = primCharToInt c `primIntEq` primCharToInt c'
primCharLte c c' = primCharToInt c `primIntLte` primCharToInt c'

compareInt x y = if primIntLte x y
		 then if primIntEq x y
		      then EQ
		      else LT
		 else GT

Index

(HTML for this module was generated on May 15, 2003. About the conversion tool.)