modules:prelude:basictypeclasses
Table of Contents
Basic type classes
Eq
- source: class Eq a
- main functions
(==):: a -> a -> Boolinfix 4, true if equal otherwise false(/=):: a -> a -> Boolinfix 4, false if equal otherwise true
- Minimal complete definition: either
==or/=.
Ord
- source: class Eq a => Ord a
- main functions
compare:: a -> a -> Ordering- LT if first parameter is less then second parameter,
- EQ if first parameter is equal second parameter, and
- GT if first parameter is greater then second parameter
(<):: a -> a -> Boolinfix 4, true if first parameter is less than second parameter otherwise false(<=):: a -> a -> Boolinfix 4, true if first parameter is equal or less than second parameter otherwise false(>):: a -> a -> Boolinfix 4, true if first parameter is greater than second parameter otherwise false(>=):: a -> a -> Boolinfix 4, true if first parameter is equal or greater than second parameter otherwise falsemax:: a -> a -> athe greater or equal value of both parametersmin:: a -> a -> athe smaller or equal value of both parameters
- Minimal complete definition: either compare or
<=. Using compare can be more efficient for complex types.
Enum
- main functions
succ:: a -> apred:: a -> atoEnum:: Int -> afromEnum:: a -> IntenumFrom:: a -> [a]enumFromThen:: a -> a -> [a]enumFromTo:: a -> a -> [a]enumFromThenTo:: a -> a -> a -> [a]
Bounded
- source: class Bounded a
Num
- source: class Num a
Real
- source: class (Num a, Ord a) => Real a
Integral
Fractional
- source: class Num a => Fractional a
RealFrac
Semigroup
- source: class Semigroup a
Monoid
- source: class Semigroup a => Monoid a
Functor
- source: class Functor f
Applicative
- source: class Functor f => Applicative f
Monad
- source: class Applicative m => Monad m
MonadFail
- source: class Monad m => MonadFail m
Foldable
- source: class Foldable t
Traversable
Show
- source: class Show a
Read
- source: class Read a
modules/prelude/basictypeclasses.txt · Last modified: by 127.0.0.1
