GHC.Base

Standard classes 'Eq', 'Ord'

class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
class (Eq a) => Ord a where
compare :: a -> a -> Ordering
(<) :: a -> a -> Bool
(<=) :: a -> a -> Bool
(>) :: a -> a -> Bool
(>=) :: a -> a -> Bool
max :: a -> a -> a
min :: a -> a -> a

Monadic classes 'Functor', 'Monad'

class Functor f where
fmap :: (a -> b) -> f a -> f b
class Monad m where
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
return :: a -> m a
fail :: String -> m a

The list type

foldr/build/augment

foldr :: (a -> b -> b) -> b -> [a] -> b
build :: forall a . (forall b . (a -> b -> b) -> b -> b) -> [a]
augment :: forall a . (forall b . (a -> b -> b) -> b -> b) -> [a] -> [a]

map

map :: (a -> b) -> [a] -> [b]
mapFB :: (elt -> lst -> lst) -> (a -> elt) -> a -> lst -> lst

append

(++) :: [a] -> [a] -> [a]

The 'Bool' type

data Bool
=False
|True

Boolean functions

(&&) :: Bool -> Bool -> Bool
(||) :: Bool -> Bool -> Bool
not :: Bool -> Bool
otherwise :: Bool

The 'Ordering' type

data Ordering
=LT
|EQ
|GT

The 'Char' and 'String' types

type String = [Char]
data Char = C# Char#
chr :: Int -> Char
unsafeChr :: Int -> Char
ord :: Char -> Int
eqString :: String -> String -> Bool

The 'Int' type

data Int = I# Int#
zeroInt :: Int
oneInt :: Int
twoInt :: Int
maxInt :: Int
minInt :: Int
compareInt :: Int -> Int -> Ordering
compareInt# :: Int# -> Int# -> Ordering

The function type

id :: a -> a
const :: a -> b -> a
(.) :: (b -> c) -> (a -> b) -> a -> c
flip :: (a -> b -> c) -> b -> a -> c
($) :: (a -> b) -> a -> b
until :: (a -> Bool) -> (a -> a) -> a -> a
asTypeOf :: a -> a -> a

Generics

data Unit = Unit

Numeric primops

divInt# :: Int# -> Int# -> Int#
modInt# :: Int# -> Int# -> Int#
plusInt :: Int -> Int -> Int
minusInt :: Int -> Int -> Int
timesInt :: Int -> Int -> Int
quotInt :: Int -> Int -> Int
remInt :: Int -> Int -> Int
divInt :: Int -> Int -> Int
modInt :: Int -> Int -> Int
gcdInt :: Int -> Int -> Int
negateInt :: Int -> Int
gtInt :: Int -> Int -> Bool
geInt :: Int -> Int -> Bool
eqInt :: Int -> Int -> Bool
neInt :: Int -> Int -> Bool
ltInt :: Int -> Int -> Bool
leInt :: Int -> Int -> Bool
shiftL# :: Word# -> Int# -> Word#
shiftRL# :: Word# -> Int# -> Word#
iShiftL# :: Int# -> Int# -> Int#
iShiftRA# :: Int# -> Int# -> Int#
iShiftRL# :: Int# -> Int# -> Int#

Unpacking C strings

unpackCString# :: Addr# -> [Char]
unpackCStringList# :: Addr# -> [Char]
unpackAppendCString# :: Addr# -> [Char] -> [Char]
unpackFoldrCString# :: Addr# -> (Char -> a -> a) -> a -> a
unpackCStringUtf8# :: Addr# -> [Char]
unpackNBytes# :: Addr# -> Int# -> [Char]