|
GHC.Base | Portability | non-portable (GHC extensions) | Stability | internal | Maintainer | cvs-ghc@haskell.org |
|
|
|
|
|
Description |
Basic data types and classes.
|
|
Synopsis |
|
|
|
Documentation |
|
data Bool |
The Bool type is an enumeration. It is defined with False
first so that the corresponding Enum instance will give fromEnum
False the value zero, and fromEnum True the value 1. | Constructors | | Instances | |
|
|
data Char |
The character type Char is an enumeration whose values represent
Unicode characters. A character literal in Haskell has type Char. To convert a Char to or from an Int, use toEnum and
fromEnum from the Enum class respectively (equivalently
ord and chr also do the trick).
| Constructors | | Instances | |
|
|
class Eq a where |
The Eq class defines equality (==) and inequality (/=).
All the basic datatypes exported by the Prelude are instances of Eq,
and Eq may be derived for any datatype whose constituents are also
instances of Eq. Minimal complete definition: either == or /=.
| | Methods | (==) :: a -> a -> Bool | | (/=) :: a -> a -> Bool |
| | Instances | |
|
|
class Functor f where |
| Methods | fmap :: (a -> b) -> f a -> f b |
| | Instances | |
|
|
data Int |
A fixed-precision integer type with at least the range [-2^29
.. 2^29-1]. The exact range for a given implementation can be
determined by using minBound and maxBound from the Bounded
class. | Constructors | | Instances | |
|
|
class Monad m where |
| Methods | fail :: String -> m a | | return :: a -> m a | | (>>) :: m a -> m b -> m b | | (>>=) :: m a -> (a -> m b) -> m b |
| | Instances | |
|
|
class (Eq a) => Ord a where |
| Methods | max :: a -> a -> a | | min :: a -> a -> a | | (<) :: a -> a -> Bool | | (<=) :: a -> a -> Bool | | (>) :: a -> a -> Bool | | (>=) :: a -> a -> Bool | | compare :: a -> a -> Ordering |
| | Instances | |
|
|
data Ordering |
Represents an ordering relationship between two values: less
than, equal to, or greater than. An Ordering is returned by
compare. | Constructors | | Instances | |
|
|
type String = [Char] |
A String is a list of characters. String constants in Haskell are values
of type String.
|
|
data Unit |
|
|
data () |
The unit datatype () has one non-undefined member, the nullary
constructor (). | Constructors | |
|
|
data [] a |
|
|
data Char |
The character type Char is an enumeration whose values represent
Unicode characters. A character literal in Haskell has type Char. To convert a Char to or from an Int, use toEnum and
fromEnum from the Enum class respectively (equivalently
ord and chr also do the trick).
| Constructors | |
|
|
data Ordering |
Represents an ordering relationship between two values: less
than, equal to, or greater than. An Ordering is returned by
compare. | Constructors | |
|
|
data Bool |
The Bool type is an enumeration. It is defined with False
first so that the corresponding Enum instance will give fromEnum
False the value zero, and fromEnum True the value 1. | Constructors | |
|
|
data Ordering |
Represents an ordering relationship between two values: less
than, equal to, or greater than. An Ordering is returned by
compare. | Constructors | |
|
|
data Int |
A fixed-precision integer type with at least the range [-2^29
.. 2^29-1]. The exact range for a given implementation can be
determined by using minBound and maxBound from the Bounded
class. | Constructors | |
|
|
data Ordering |
Represents an ordering relationship between two values: less
than, equal to, or greater than. An Ordering is returned by
compare. | Constructors | |
|
|
data Bool |
The Bool type is an enumeration. It is defined with False
first so that the corresponding Enum instance will give fromEnum
False the value zero, and fromEnum True the value 1. | Constructors | |
|
|
data Unit |
|
|
asTypeOf :: a -> a -> a |
|
augment :: forall a . (forall b . (a -> b -> b) -> b -> b) -> [a] -> [a] |
|
build :: forall a . (forall b . (a -> b -> b) -> b -> b) -> [a] |
|
chr :: Int -> Char |
|
class (Eq a) => Ord a where |
| Methods | max :: a -> a -> a | | min :: a -> a -> a | | (<) :: a -> a -> Bool | | (<=) :: a -> a -> Bool | | (>) :: a -> a -> Bool | | (>=) :: a -> a -> Bool | | compare :: a -> a -> Ordering |
|
|
|
compareInt :: Int -> Int -> Ordering |
|
compareInt# :: Int# -> Int# -> Ordering |
|
const :: a -> b -> a |
|
divInt :: Int -> Int -> Int |
|
divInt# :: Int# -> Int# -> Int# |
|
eqInt :: Int -> Int -> Bool |
|
eqString :: String -> String -> Bool |
|
class Monad m where |
| Methods | fail :: String -> m a | | return :: a -> m a | | (>>) :: m a -> m b -> m b | | (>>=) :: m a -> (a -> m b) -> m b |
|
|
|
flip :: (a -> b -> c) -> b -> a -> c |
|
class Functor f where |
| Methods | fmap :: (a -> b) -> f a -> f b |
|
|
|
foldr :: (a -> b -> b) -> b -> [a] -> b |
|
gcdInt :: Int -> Int -> Int |
|
geInt :: Int -> Int -> Bool |
|
gtInt :: Int -> Int -> Bool |
|
iShiftL# :: Int# -> Int# -> Int# |
|
iShiftRA# :: Int# -> Int# -> Int# |
|
iShiftRL# :: Int# -> Int# -> Int# |
|
id :: a -> a |
|
lazy :: a -> a |
|
leInt :: Int -> Int -> Bool |
|
ltInt :: Int -> Int -> Bool |
|
map :: (a -> b) -> [a] -> [b] |
|
mapFB :: (elt -> lst -> lst) -> (a -> elt) -> a -> lst -> lst |
|
class (Eq a) => Ord a where |
| Methods | max :: a -> a -> a | | min :: a -> a -> a | | (<) :: a -> a -> Bool | | (<=) :: a -> a -> Bool | | (>) :: a -> a -> Bool | | (>=) :: a -> a -> Bool | | compare :: a -> a -> Ordering |
|
|
|
maxInt :: Int |
|
class (Eq a) => Ord a where |
| Methods | max :: a -> a -> a | | min :: a -> a -> a | | (<) :: a -> a -> Bool | | (<=) :: a -> a -> Bool | | (>) :: a -> a -> Bool | | (>=) :: a -> a -> Bool | | compare :: a -> a -> Ordering |
|
|
|
minInt :: Int |
|
minusInt :: Int -> Int -> Int |
|
modInt :: Int -> Int -> Int |
|
modInt# :: Int# -> Int# -> Int# |
|
neInt :: Int -> Int -> Bool |
|
negateInt :: Int -> Int |
|
not :: Bool -> Bool |
Boolean "not" |
|
oneInt :: Int |
|
ord :: Char -> Int |
|
otherwise :: Bool |
otherwise is defined as the value True; it helps to make
guards more readable. eg. f x | x \< 0 = ...
| otherwise = ... |
|
plusInt :: Int -> Int -> Int |
|
quotInt :: Int -> Int -> Int |
|
remInt :: Int -> Int -> Int |
|
class Monad m where |
| Methods | fail :: String -> m a | | return :: a -> m a | | (>>) :: m a -> m b -> m b | | (>>=) :: m a -> (a -> m b) -> m b |
|
|
|
shiftL# :: Word# -> Int# -> Word# |
|
shiftRL# :: Word# -> Int# -> Word# |
|
timesInt :: Int -> Int -> Int |
|
twoInt :: Int |
|
unpackAppendCString# :: Addr# -> [Char] -> [Char] |
|
unpackCString# :: Addr# -> [Char] |
|
unpackCStringUtf8# :: Addr# -> [Char] |
|
unpackFoldrCString# :: Addr# -> (Char -> a -> a) -> a -> a |
|
unpackNBytes# :: Addr# -> Int# -> [Char] |
|
unsafeChr :: Int -> Char |
|
until :: (a -> Bool) -> (a -> a) -> a -> a |
|
zeroInt :: Int |
|
($) :: (a -> b) -> a -> b |
|
(&&) :: Bool -> Bool -> Bool |
Boolean "and" |
|
(++) :: [a] -> [a] -> [a] |
|
(.) :: (b -> c) -> (a -> b) -> a -> c |
|
class Eq a where |
The Eq class defines equality (==) and inequality (/=).
All the basic datatypes exported by the Prelude are instances of Eq,
and Eq may be derived for any datatype whose constituents are also
instances of Eq. Minimal complete definition: either == or /=.
| | Methods | (==) :: a -> a -> Bool | | (/=) :: a -> a -> Bool |
|
|
|
data [] a |
|
|
class (Eq a) => Ord a where |
| Methods | max :: a -> a -> a | | min :: a -> a -> a | | (<) :: a -> a -> Bool | | (<=) :: a -> a -> Bool | | (>) :: a -> a -> Bool | | (>=) :: a -> a -> Bool | | compare :: a -> a -> Ordering |
|
|
|
class (Eq a) => Ord a where |
| Methods | max :: a -> a -> a | | min :: a -> a -> a | | (<) :: a -> a -> Bool | | (<=) :: a -> a -> Bool | | (>) :: a -> a -> Bool | | (>=) :: a -> a -> Bool | | compare :: a -> a -> Ordering |
|
|
|
class Eq a where |
The Eq class defines equality (==) and inequality (/=).
All the basic datatypes exported by the Prelude are instances of Eq,
and Eq may be derived for any datatype whose constituents are also
instances of Eq. Minimal complete definition: either == or /=.
| | Methods | (==) :: a -> a -> Bool | | (/=) :: a -> a -> Bool |
|
|
|
class (Eq a) => Ord a where |
| Methods | max :: a -> a -> a | | min :: a -> a -> a | | (<) :: a -> a -> Bool | | (<=) :: a -> a -> Bool | | (>) :: a -> a -> Bool | | (>=) :: a -> a -> Bool | | compare :: a -> a -> Ordering |
|
|
|
class (Eq a) => Ord a where |
| Methods | max :: a -> a -> a | | min :: a -> a -> a | | (<) :: a -> a -> Bool | | (<=) :: a -> a -> Bool | | (>) :: a -> a -> Bool | | (>=) :: a -> a -> Bool | | compare :: a -> a -> Ordering |
|
|
|
class Monad m where |
| Methods | fail :: String -> m a | | return :: a -> m a | | (>>) :: m a -> m b -> m b | | (>>=) :: m a -> (a -> m b) -> m b |
|
|
|
class Monad m where |
| Methods | fail :: String -> m a | | return :: a -> m a | | (>>) :: m a -> m b -> m b | | (>>=) :: m a -> (a -> m b) -> m b |
|
|
|
(||) :: Bool -> Bool -> Bool |
Boolean "or" |
|
data () |
The unit datatype () has one non-undefined member, the nullary
constructor (). | Constructors | |
|
|
data [] a |
|
|
module GHC.Err |
|
Produced by Haddock version 0.3 |