Haskell Core LibrariesContents
PreludePortabilityportable
Stabilitystable
libraries@haskell.org
Maintainer
Prelude
map :: (a -> b) -> [a] -> [b]
(++) :: [a] -> [a] -> [a]
filter :: (a -> Bool) -> [a] -> [a]
filter, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e., filter p xs = [ x | x <- xs, p x]
concat :: [[a]] -> [a]
head :: [a] -> a
extract the first element of a list, which must be non-empty
last :: [a] -> a
Return the last element in the list. The list must be non-empty.
tail :: [a] -> [a]
Return the list with the head removed. The list must be non-empty.
init :: [a] -> [a]
Return the list with the last element removed.
null :: [a] -> Bool
null returns True if the list is empty, and False otherwise.
length :: [a] -> Int
length returns the length of a finite list as an Int; it is an instance of the more general genericLength, the result type of which may be any kind of number.
(!!) :: [a] -> Int -> a
foldl :: (a -> b -> a) -> a -> [b] -> a
foldl1 :: (a -> a -> a) -> [a] -> a
scanl :: (a -> b -> a) -> a -> [b] -> [a]
scanl1 :: (a -> a -> a) -> [a] -> [a]
foldr :: (a -> b -> b) -> b -> [a] -> b
foldr1 :: (a -> a -> a) -> [a] -> a
scanr :: (a -> b -> b) -> b -> [a] -> [b]
scanr1 :: (a -> a -> a) -> [a] -> [a]
iterate :: (a -> a) -> a -> [a]
repeat :: a -> [a]
replicate :: Int -> a -> [a]
cycle :: [a] -> [a]
take :: Int -> [b] -> [b]
drop :: Int -> [b] -> [b]
splitAt :: Int -> [b] -> ([b], [b])
takeWhile :: (a -> Bool) -> [a] -> [a]
dropWhile :: (a -> Bool) -> [a] -> [a]
span :: (a -> Bool) -> [a] -> ([a], [a])
break :: (a -> Bool) -> [a] -> ([a], [a])
span :: (a -> Bool) -> [a] -> ([a], [a])
break :: (a -> Bool) -> [a] -> ([a], [a])
reverse :: [a] -> [a]
and :: [Bool] -> Bool
or :: [Bool] -> Bool
and :: [Bool] -> Bool
or :: [Bool] -> Bool
any :: (a -> Bool) -> [a] -> Bool
all :: (a -> Bool) -> [a] -> Bool
any :: (a -> Bool) -> [a] -> Bool
all :: (a -> Bool) -> [a] -> Bool
elem :: (Eq a) => a -> [a] -> Bool
notElem :: (Eq a) => a -> [a] -> Bool
elem :: (Eq a) => a -> [a] -> Bool
notElem :: (Eq a) => a -> [a] -> Bool
lookup :: (Eq a) => a -> [(a, b)] -> Maybe b
maximum :: (Ord a) => [a] -> a
minimum :: (Ord a) => [a] -> a
maximum :: (Ord a) => [a] -> a
minimum :: (Ord a) => [a] -> a
concatMap :: (a -> [b]) -> [a] -> [b]
zip :: [a] -> [b] -> [(a, b)]
zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
unzip :: [(a, b)] -> ([a], [b])
unzip3 :: [(a, b, c)] -> ([a], [b], [c])
lines :: String -> [String]
words :: String -> [String]
unlines :: [String] -> String
unwords :: [String] -> String
sum :: (Num a) => [a] -> a
product :: (Num a) => [a] -> a
sum :: (Num a) => [a] -> a
product :: (Num a) => [a] -> a
type ReadS a = String -> [(a, String)]
type ShowS = String -> String
class Read a where
readsPrec :: Int -> ReadS a
readList :: ReadS ([a])
class Show a where
showsPrec :: Int -> a -> ShowS
show :: a -> String
showList :: [a] -> ShowS
reads :: (Read a) => ReadS a
shows :: (Show a) => a -> ShowS
read :: (Read a) => String -> a
lex :: ReadS String
showChar :: Char -> ShowS
showString :: String -> ShowS
readParen :: Bool -> ReadS a -> ReadS a
showParen :: Bool -> ShowS -> ShowS
ioError :: Exception -> IO a
userError :: String -> IOError
catch :: IO a -> (Exception -> IO a) -> IO a
type FilePath = String
data Bool
=False
|True
data Maybe
=Nothing
|Just a
data Either
=Left a
|Right b
data Ordering
=LT
|EQ
|GT
data Char
type String = [Char]
data Int
data Integer
data Float
data Double
data IO
type Rational = Ratio Integer
class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
All basic datatypes except for functions and IO are instances of this class. Instances of Eq can be derived for any user-defined datatype whose constituents are also instances of Eq.
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
class Enum a where
succ :: a -> a
pred :: a -> a
toEnum :: Int -> a
fromEnum :: a -> Int
enumFrom :: a -> [a]
enumFromThen :: a -> a -> [a]
enumFromTo :: a -> a -> [a]
enumFromThenTo :: a -> a -> a -> [a]
class Bounded a where
minBound :: a
maxBound :: a
class (Eq a, Show a) => Num a where
(+) :: a -> a -> a
(-) :: a -> a -> a
(*) :: a -> a -> a
negate :: a -> a
abs :: a -> a
signum :: a -> a
fromInteger :: Integer -> a
class (Num a, Ord a) => Real a where
toRational :: a -> Rational
class (Real a, Enum a) => Integral a where
quot :: a -> a -> a
rem :: a -> a -> a
div :: a -> a -> a
mod :: a -> a -> a
quotRem :: a -> a -> (a, a)
divMod :: a -> a -> (a, a)
toInteger :: a -> Integer
class (Num a) => Fractional a where
(/) :: a -> a -> a
recip :: a -> a
fromRational :: Rational -> a
class (Fractional a) => Floating a where
pi :: a
exp :: a -> a
log :: a -> a
sqrt :: a -> a
(**) :: a -> a -> a
logBase :: a -> a -> a
sin :: a -> a
cos :: a -> a
tan :: a -> a
asin :: a -> a
acos :: a -> a
atan :: a -> a
sinh :: a -> a
cosh :: a -> a
tanh :: a -> a
asinh :: a -> a
acosh :: a -> a
atanh :: a -> a
class (Real a, Fractional a) => RealFrac a where
properFraction :: (Integral b) => a -> (b, a)
truncate :: (Integral b) => a -> b
round :: (Integral b) => a -> b
ceiling :: (Integral b) => a -> b
floor :: (Integral b) => a -> b
class (RealFrac a, Floating a) => RealFloat a where
floatRadix :: a -> Integer
floatDigits :: a -> Int
floatRange :: a -> (Int, Int)
decodeFloat :: a -> (Integer, Int)
encodeFloat :: Integer -> Int -> a
exponent :: a -> Int
significand :: a -> a
scaleFloat :: Int -> a -> a
isNaN :: a -> Bool
isInfinite :: a -> Bool
isDenormalized :: a -> Bool
isNegativeZero :: a -> Bool
isIEEE :: a -> Bool
atan2 :: a -> a -> a
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
class Functor f where
fmap :: (a -> b) -> f a -> f b
maybe :: b -> (a -> b) -> Maybe a -> b
either :: (a -> c) -> (b -> c) -> Either a b -> c
(&&) :: Bool -> Bool -> Bool
(||) :: Bool -> Bool -> Bool
(&&) :: Bool -> Bool -> Bool
(||) :: Bool -> Bool -> Bool
not :: Bool -> Bool
otherwise :: Bool
subtract :: (Num a) => a -> a -> a
even :: (Integral a) => a -> Bool
odd :: (Integral a) => a -> Bool
even :: (Integral a) => a -> Bool
odd :: (Integral a) => a -> Bool
gcd :: (Integral a) => a -> a -> a
lcm :: (Integral a) => a -> a -> a
(^) :: (Num a, Integral b) => a -> b -> a
(^^) :: (Fractional a, Integral b) => a -> b -> a
fromIntegral :: (Integral a, Num b) => a -> b
realToFrac :: (Real a, Fractional b) => a -> b
id :: a -> a
identity function
const :: a -> b -> a
constant function
(.) :: (b -> c) -> (a -> b) -> a -> c
function composition
flip :: (a -> b -> c) -> b -> a -> c
flip f takes its (first) two arguments in the reverse order of f.
($) :: (a -> b) -> a -> b
until :: (a -> Bool) -> (a -> a) -> a -> a
asTypeOf :: a -> a -> a
($!) :: (a -> b) -> a -> b
Produced by Haddock version 0.0