Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- (++) :: [a] -> [a] -> [a]
- seq :: a -> b -> b
- filter :: (a -> Bool) -> [a] -> [a]
- zip :: [a] -> [b] -> [(a, b)]
- print :: Show a => a -> IO ()
- fst :: (a, b) -> a
- snd :: (a, b) -> b
- otherwise :: Bool
- map :: (a -> b) -> [a] -> [b]
- ($) :: (a -> b) -> a -> b
- fromIntegral :: (Integral a, Num b) => a -> b
- realToFrac :: (Real a, Fractional b) => a -> b
- class Bounded a where
- class Enum a where
- succ :: 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 Eq a where
- class Fractional a => Floating a where
- class Num a => Fractional a where
- (/) :: a -> a -> a
- recip :: a -> a
- fromRational :: Rational -> a
- class (Real a, Enum a) => Integral a where
- class Applicative m => Monad (m :: Type -> Type) where
- class Functor (f :: Type -> Type) where
- class Num a where
- class Eq a => Ord a where
- class Read a where
- class (Num a, Ord a) => Real a where
- toRational :: a -> Rational
- 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 (Real a, Fractional a) => RealFrac a where
- class Show a where
- class Foldable (t :: Type -> Type) where
- foldMap :: Monoid m => (a -> m) -> t a -> m
- foldr :: (a -> b -> b) -> b -> t a -> b
- foldl :: (b -> a -> b) -> b -> t a -> b
- foldr1 :: (a -> a -> a) -> t a -> a
- foldl1 :: (a -> a -> a) -> t a -> a
- null :: t a -> Bool
- length :: t a -> Int
- elem :: Eq a => a -> t a -> Bool
- maximum :: Ord a => t a -> a
- minimum :: Ord a => t a -> a
- sum :: Num a => t a -> a
- product :: Num a => t a -> a
- class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where
- data Bool
- data Char
- data Double
- data Float
- data Int
- data Integer
- data Maybe a
- data Ordering
- type Rational = Ratio Integer
- data IO a
- data Word
- data Either a b
- readIO :: Read a => String -> IO a
- readLn :: Read a => IO a
- appendFile :: FilePath -> String -> IO ()
- writeFile :: FilePath -> String -> IO ()
- readFile :: FilePath -> IO String
- interact :: (String -> String) -> IO ()
- getContents :: IO String
- getLine :: IO String
- getChar :: IO Char
- putStrLn :: String -> IO ()
- putStr :: String -> IO ()
- putChar :: Char -> IO ()
- ioError :: IOError -> IO a
- type FilePath = String
- userError :: String -> IOError
- type IOError = IOException
- notElem :: (Foldable t, Eq a) => a -> t a -> Bool
- all :: Foldable t => (a -> Bool) -> t a -> Bool
- any :: Foldable t => (a -> Bool) -> t a -> Bool
- or :: Foldable t => t Bool -> Bool
- and :: Foldable t => t Bool -> Bool
- concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- concat :: Foldable t => t [a] -> [a]
- sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
- mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- unwords :: [String] -> String
- words :: String -> [String]
- unlines :: [String] -> String
- lines :: String -> [String]
- read :: Read a => String -> a
- reads :: Read a => ReadS a
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- lex :: ReadS String
- readParen :: Bool -> ReadS a -> ReadS a
- type ReadS a = String -> [(a, String)]
- lcm :: Integral a => a -> a -> a
- gcd :: Integral a => a -> a -> a
- (^^) :: (Fractional a, Integral b) => a -> b -> a
- odd :: Integral a => a -> Bool
- even :: Integral a => a -> Bool
- showParen :: Bool -> ShowS -> ShowS
- showString :: String -> ShowS
- showChar :: Char -> ShowS
- shows :: Show a => a -> ShowS
- type ShowS = String -> String
- unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- unzip :: [(a, b)] -> ([a], [b])
- zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- (!!) :: [a] -> Int -> a
- reverse :: [a] -> [a]
- break :: (a -> Bool) -> [a] -> ([a], [a])
- span :: (a -> Bool) -> [a] -> ([a], [a])
- splitAt :: Int -> [a] -> ([a], [a])
- drop :: Int -> [a] -> [a]
- take :: Int -> [a] -> [a]
- dropWhile :: (a -> Bool) -> [a] -> [a]
- takeWhile :: (a -> Bool) -> [a] -> [a]
- cycle :: [a] -> [a]
- replicate :: Int -> a -> [a]
- repeat :: a -> [a]
- iterate :: (a -> a) -> a -> [a]
- scanr1 :: (a -> a -> a) -> [a] -> [a]
- scanr :: (a -> b -> b) -> b -> [a] -> [b]
- scanl1 :: (a -> a -> a) -> [a] -> [a]
- scanl :: (b -> a -> b) -> b -> [a] -> [b]
- init :: [a] -> [a]
- last :: [a] -> a
- tail :: [a] -> [a]
- head :: [a] -> a
- maybe :: b -> (a -> b) -> Maybe a -> b
- uncurry :: (a -> b -> c) -> (a, b) -> c
- curry :: ((a, b) -> c) -> a -> b -> c
- subtract :: Num a => a -> a -> a
- asTypeOf :: a -> a -> a
- until :: (a -> Bool) -> (a -> a) -> a -> a
- ($!) :: (a -> b) -> a -> b
- flip :: (a -> b -> c) -> b -> a -> c
- (.) :: (b -> c) -> (a -> b) -> a -> c
- const :: a -> b -> a
- id :: a -> a
- (=<<) :: Monad m => (a -> m b) -> m a -> m b
- type String = [Char]
- undefined :: HasCallStack => a
- errorWithoutStackTrace :: [Char] -> a
- error :: HasCallStack => [Char] -> a
- (&&) :: Bool -> Bool -> Bool
- (||) :: Bool -> Bool -> Bool
- not :: Bool -> Bool
- class Functor f => Applicative (f :: Type -> Type) where
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- class Semigroup a => Monoid a where
- class Semigroup a where
- traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
- impossible :: a
- bug :: String -> a
Documentation
(++) :: [a] -> [a] -> [a] infixr 5 #
Append two lists, i.e.,
[x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn] [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
If the first list is not finite, the result is the first list.
The value of seq a b
is bottom if a
is bottom, and
otherwise equal to b
. In other words, it evaluates the first
argument a
to weak head normal form (WHNF). seq
is usually
introduced to improve performance by avoiding unneeded laziness.
A note on evaluation order: the expression seq a b
does
not guarantee that a
will be evaluated before b
.
The only guarantee given by seq
is that the both a
and b
will be evaluated before seq
returns a value.
In particular, this means that b
may be evaluated before
a
. If you need to guarantee a specific order of evaluation,
you must use the function pseq
from the "parallel" package.
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]
print :: Show a => a -> IO () #
The print
function outputs a value of any printable type to the
standard output device.
Printable types are those that are instances of class Show
; print
converts values to strings for output using the show
operation and
adds a newline.
For example, a program to print the first 20 integers and their powers of 2 could be written as:
main = print ([(n, 2^n) | n <- [0..19]])
map :: (a -> b) -> [a] -> [b] #
map
f xs
is the list obtained by applying f
to each element
of xs
, i.e.,
map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]
($) :: (a -> b) -> a -> b infixr 0 #
Application operator. This operator is redundant, since ordinary
application (f x)
means the same as (f
. However, $
x)$
has
low, right-associative binding precedence, so it sometimes allows
parentheses to be omitted; for example:
f $ g $ h x = f (g (h x))
It is also useful in higher-order situations, such as
,
or map
($
0) xs
.zipWith
($
) fs xs
Note that ($)
is levity-polymorphic in its result type, so that
foo $ True where foo :: Bool -> Int#
is well-typed
fromIntegral :: (Integral a, Num b) => a -> b #
general coercion from integral types
realToFrac :: (Real a, Fractional b) => a -> b #
general coercion to fractional types
The Bounded
class is used to name the upper and lower limits of a
type. Ord
is not a superclass of Bounded
since types that are not
totally ordered may also have upper and lower bounds.
The Bounded
class may be derived for any enumeration type;
minBound
is the first constructor listed in the data
declaration
and maxBound
is the last.
Bounded
may also be derived for single-constructor datatypes whose
constituent types are in Bounded
.
Instances
Class Enum
defines operations on sequentially ordered types.
The enumFrom
... methods are used in Haskell's translation of
arithmetic sequences.
Instances of Enum
may be derived for any enumeration type (types
whose constructors have no fields). The nullary constructors are
assumed to be numbered left-to-right by fromEnum
from 0
through n-1
.
See Chapter 10 of the Haskell Report for more details.
For any type that is an instance of class Bounded
as well as Enum
,
the following should hold:
- The calls
andsucc
maxBound
should result in a runtime error.pred
minBound
fromEnum
andtoEnum
should give a runtime error if the result value is not representable in the result type. For example,
is an error.toEnum
7 ::Bool
enumFrom
andenumFromThen
should be defined with an implicit bound, thus:
enumFrom x = enumFromTo x maxBound enumFromThen x y = enumFromThenTo x y bound where bound | fromEnum y >= fromEnum x = maxBound | otherwise = minBound
the successor of a value. For numeric types, succ
adds 1.
Convert from an Int
.
Convert to an Int
.
It is implementation-dependent what fromEnum
returns when
applied to a value that is too large to fit in an Int
.
Used in Haskell's translation of [n..]
with [n..] = enumFrom n
,
a possible implementation being enumFrom n = n : enumFrom (succ n)
.
For example:
enumFrom 4 :: [Integer] = [4,5,6,7,...]
enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]
enumFromThen :: a -> a -> [a] #
Used in Haskell's translation of [n,n'..]
with [n,n'..] = enumFromThen n n'
, a possible implementation being
enumFromThen n n' = n : n' : worker (f x) (f x n')
,
worker s v = v : worker s (s v)
, x = fromEnum n' - fromEnum n
and
f n y
| n > 0 = f (n - 1) (succ y)
| n < 0 = f (n + 1) (pred y)
| otherwise = y
For example:
enumFromThen 4 6 :: [Integer] = [4,6,8,10...]
enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound :: Int]
enumFromTo :: a -> a -> [a] #
Used in Haskell's translation of [n..m]
with
[n..m] = enumFromTo n m
, a possible implementation being
enumFromTo n m
| n <= m = n : enumFromTo (succ n) m
| otherwise = []
.
For example:
enumFromTo 6 10 :: [Int] = [6,7,8,9,10]
enumFromTo 42 1 :: [Integer] = []
enumFromThenTo :: a -> a -> a -> [a] #
Used in Haskell's translation of [n,n'..m]
with
[n,n'..m] = enumFromThenTo n n' m
, a possible implementation
being enumFromThenTo n n' m = worker (f x) (c x) n m
,
x = fromEnum n' - fromEnum n
, c x = bool (>=) ((x 0)
f n y
| n > 0 = f (n - 1) (succ y)
| n < 0 = f (n + 1) (pred y)
| otherwise = y
and
worker s c v m
| c v m = v : worker s c (s v) m
| otherwise = []
For example:
enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]
enumFromThenTo 6 8 2 :: [Int] = []
Instances
Enum Bool | Since: base-2.1 |
Enum Char | Since: base-2.1 |
Enum Int | Since: base-2.1 |
Enum Int8 | Since: base-2.1 |
Enum Int16 | Since: base-2.1 |
Enum Int32 | Since: base-2.1 |
Enum Int64 | Since: base-2.1 |
Enum Integer | Since: base-2.1 |
Enum Natural | Since: base-4.8.0.0 |
Enum Ordering | Since: base-2.1 |
Enum Word | Since: base-2.1 |
Enum Word8 | Since: base-2.1 |
Enum Word16 | Since: base-2.1 |
Defined in GHC.Word | |
Enum Word32 | Since: base-2.1 |
Defined in GHC.Word | |
Enum Word64 | Since: base-2.1 |
Defined in GHC.Word | |
Enum VecCount | Since: base-4.10.0.0 |
Enum VecElem | Since: base-4.10.0.0 |
Enum () | Since: base-2.1 |
Enum CDev | |
Enum CIno | |
Enum CMode | |
Enum COff | |
Enum CPid | |
Enum CSsize | |
Defined in System.Posix.Types | |
Enum CGid | |
Enum CNlink | |
Defined in System.Posix.Types | |
Enum CUid | |
Enum CCc | |
Enum CSpeed | |
Defined in System.Posix.Types | |
Enum CTcflag | |
Enum CRLim | |
Enum CBlkSize | |
Enum CBlkCnt | |
Enum CClockId | |
Enum CFsBlkCnt | |
Defined in System.Posix.Types succ :: CFsBlkCnt -> CFsBlkCnt # pred :: CFsBlkCnt -> CFsBlkCnt # fromEnum :: CFsBlkCnt -> Int # enumFrom :: CFsBlkCnt -> [CFsBlkCnt] # enumFromThen :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # enumFromTo :: CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # enumFromThenTo :: CFsBlkCnt -> CFsBlkCnt -> CFsBlkCnt -> [CFsBlkCnt] # | |
Enum CFsFilCnt | |
Defined in System.Posix.Types succ :: CFsFilCnt -> CFsFilCnt # pred :: CFsFilCnt -> CFsFilCnt # fromEnum :: CFsFilCnt -> Int # enumFrom :: CFsFilCnt -> [CFsFilCnt] # enumFromThen :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # enumFromTo :: CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # enumFromThenTo :: CFsFilCnt -> CFsFilCnt -> CFsFilCnt -> [CFsFilCnt] # | |
Enum CId | |
Enum CKey | |
Enum Fd | |
Enum SeekMode | Since: base-4.2.0.0 |
Enum Associativity | Since: base-4.9.0.0 |
Defined in GHC.Generics succ :: Associativity -> Associativity # pred :: Associativity -> Associativity # toEnum :: Int -> Associativity # fromEnum :: Associativity -> Int # enumFrom :: Associativity -> [Associativity] # enumFromThen :: Associativity -> Associativity -> [Associativity] # enumFromTo :: Associativity -> Associativity -> [Associativity] # enumFromThenTo :: Associativity -> Associativity -> Associativity -> [Associativity] # | |
Enum SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics succ :: SourceUnpackedness -> SourceUnpackedness # pred :: SourceUnpackedness -> SourceUnpackedness # toEnum :: Int -> SourceUnpackedness # fromEnum :: SourceUnpackedness -> Int # enumFrom :: SourceUnpackedness -> [SourceUnpackedness] # enumFromThen :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # enumFromTo :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # enumFromThenTo :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # | |
Enum SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics succ :: SourceStrictness -> SourceStrictness # pred :: SourceStrictness -> SourceStrictness # toEnum :: Int -> SourceStrictness # fromEnum :: SourceStrictness -> Int # enumFrom :: SourceStrictness -> [SourceStrictness] # enumFromThen :: SourceStrictness -> SourceStrictness -> [SourceStrictness] # enumFromTo :: SourceStrictness -> SourceStrictness -> [SourceStrictness] # enumFromThenTo :: SourceStrictness -> SourceStrictness -> SourceStrictness -> [SourceStrictness] # | |
Enum DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics succ :: DecidedStrictness -> DecidedStrictness # pred :: DecidedStrictness -> DecidedStrictness # toEnum :: Int -> DecidedStrictness # fromEnum :: DecidedStrictness -> Int # enumFrom :: DecidedStrictness -> [DecidedStrictness] # enumFromThen :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # enumFromTo :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # enumFromThenTo :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # | |
Enum CChar | |
Enum CSChar | |
Defined in Foreign.C.Types | |
Enum CUChar | |
Defined in Foreign.C.Types | |
Enum CShort | |
Defined in Foreign.C.Types | |
Enum CUShort | |
Enum CInt | |
Enum CUInt | |
Enum CLong | |
Enum CULong | |
Defined in Foreign.C.Types | |
Enum CLLong | |
Defined in Foreign.C.Types | |
Enum CULLong | |
Enum CBool | |
Enum CFloat | |
Defined in Foreign.C.Types | |
Enum CDouble | |
Enum CPtrdiff | |
Enum CSize | |
Enum CWchar | |
Defined in Foreign.C.Types | |
Enum CSigAtomic | |
Defined in Foreign.C.Types succ :: CSigAtomic -> CSigAtomic # pred :: CSigAtomic -> CSigAtomic # toEnum :: Int -> CSigAtomic # fromEnum :: CSigAtomic -> Int # enumFrom :: CSigAtomic -> [CSigAtomic] # enumFromThen :: CSigAtomic -> CSigAtomic -> [CSigAtomic] # enumFromTo :: CSigAtomic -> CSigAtomic -> [CSigAtomic] # enumFromThenTo :: CSigAtomic -> CSigAtomic -> CSigAtomic -> [CSigAtomic] # | |
Enum CClock | |
Defined in Foreign.C.Types | |
Enum CTime | |
Enum CUSeconds | |
Defined in Foreign.C.Types succ :: CUSeconds -> CUSeconds # pred :: CUSeconds -> CUSeconds # fromEnum :: CUSeconds -> Int # enumFrom :: CUSeconds -> [CUSeconds] # enumFromThen :: CUSeconds -> CUSeconds -> [CUSeconds] # enumFromTo :: CUSeconds -> CUSeconds -> [CUSeconds] # enumFromThenTo :: CUSeconds -> CUSeconds -> CUSeconds -> [CUSeconds] # | |
Enum CSUSeconds | |
Defined in Foreign.C.Types succ :: CSUSeconds -> CSUSeconds # pred :: CSUSeconds -> CSUSeconds # toEnum :: Int -> CSUSeconds # fromEnum :: CSUSeconds -> Int # enumFrom :: CSUSeconds -> [CSUSeconds] # enumFromThen :: CSUSeconds -> CSUSeconds -> [CSUSeconds] # enumFromTo :: CSUSeconds -> CSUSeconds -> [CSUSeconds] # enumFromThenTo :: CSUSeconds -> CSUSeconds -> CSUSeconds -> [CSUSeconds] # | |
Enum CIntPtr | |
Enum CUIntPtr | |
Enum CIntMax | |
Enum CUIntMax | |
Enum WordPtr | |
Enum IntPtr | |
Defined in Foreign.Ptr | |
Enum IOMode | Since: base-4.2.0.0 |
Defined in GHC.IO.IOMode | |
Enum GeneralCategory | Since: base-2.1 |
Defined in GHC.Unicode succ :: GeneralCategory -> GeneralCategory # pred :: GeneralCategory -> GeneralCategory # toEnum :: Int -> GeneralCategory # fromEnum :: GeneralCategory -> Int # enumFrom :: GeneralCategory -> [GeneralCategory] # enumFromThen :: GeneralCategory -> GeneralCategory -> [GeneralCategory] # enumFromTo :: GeneralCategory -> GeneralCategory -> [GeneralCategory] # enumFromThenTo :: GeneralCategory -> GeneralCategory -> GeneralCategory -> [GeneralCategory] # | |
Enum FileType | |
Defined in System.Directory.Internal.Common | |
Enum XdgDirectory | |
Defined in System.Directory.Internal.Common succ :: XdgDirectory -> XdgDirectory # pred :: XdgDirectory -> XdgDirectory # toEnum :: Int -> XdgDirectory # fromEnum :: XdgDirectory -> Int # enumFrom :: XdgDirectory -> [XdgDirectory] # enumFromThen :: XdgDirectory -> XdgDirectory -> [XdgDirectory] # enumFromTo :: XdgDirectory -> XdgDirectory -> [XdgDirectory] # enumFromThenTo :: XdgDirectory -> XdgDirectory -> XdgDirectory -> [XdgDirectory] # | |
Enum XdgDirectoryList | |
Defined in System.Directory.Internal.Common succ :: XdgDirectoryList -> XdgDirectoryList # pred :: XdgDirectoryList -> XdgDirectoryList # toEnum :: Int -> XdgDirectoryList # fromEnum :: XdgDirectoryList -> Int # enumFrom :: XdgDirectoryList -> [XdgDirectoryList] # enumFromThen :: XdgDirectoryList -> XdgDirectoryList -> [XdgDirectoryList] # enumFromTo :: XdgDirectoryList -> XdgDirectoryList -> [XdgDirectoryList] # enumFromThenTo :: XdgDirectoryList -> XdgDirectoryList -> XdgDirectoryList -> [XdgDirectoryList] # | |
Enum Extension | |
Defined in GHC.LanguageExtensions.Type succ :: Extension -> Extension # pred :: Extension -> Extension # fromEnum :: Extension -> Int # enumFrom :: Extension -> [Extension] # enumFromThen :: Extension -> Extension -> [Extension] # enumFromTo :: Extension -> Extension -> [Extension] # enumFromThenTo :: Extension -> Extension -> Extension -> [Extension] # | |
Enum Message | |
Enum DiffTime | |
Defined in Data.Time.Clock.Internal.DiffTime | |
Enum Day | |
Enum Day | |
Defined in System.Time | |
Enum Month | |
Defined in System.Time | |
Enum CompressionStrategy | |
Defined in Codec.Compression.Zlib.Stream succ :: CompressionStrategy -> CompressionStrategy # pred :: CompressionStrategy -> CompressionStrategy # toEnum :: Int -> CompressionStrategy # fromEnum :: CompressionStrategy -> Int # enumFrom :: CompressionStrategy -> [CompressionStrategy] # enumFromThen :: CompressionStrategy -> CompressionStrategy -> [CompressionStrategy] # enumFromTo :: CompressionStrategy -> CompressionStrategy -> [CompressionStrategy] # enumFromThenTo :: CompressionStrategy -> CompressionStrategy -> CompressionStrategy -> [CompressionStrategy] # | |
Enum Method | |
Defined in Codec.Compression.Zlib.Stream | |
Enum Format | |
Defined in Codec.Compression.Zlib.Stream | |
Enum Mode | |
Defined in System.IO.MMap | |
Enum Encoding | |
Defined in Basement.String succ :: Encoding -> Encoding # pred :: Encoding -> Encoding # enumFrom :: Encoding -> [Encoding] # enumFromThen :: Encoding -> Encoding -> [Encoding] # enumFromTo :: Encoding -> Encoding -> [Encoding] # enumFromThenTo :: Encoding -> Encoding -> Encoding -> [Encoding] # | |
Enum UTF32_Invalid | |
Defined in Basement.String.Encoding.UTF32 succ :: UTF32_Invalid -> UTF32_Invalid # pred :: UTF32_Invalid -> UTF32_Invalid # toEnum :: Int -> UTF32_Invalid # fromEnum :: UTF32_Invalid -> Int # enumFrom :: UTF32_Invalid -> [UTF32_Invalid] # enumFromThen :: UTF32_Invalid -> UTF32_Invalid -> [UTF32_Invalid] # enumFromTo :: UTF32_Invalid -> UTF32_Invalid -> [UTF32_Invalid] # enumFromThenTo :: UTF32_Invalid -> UTF32_Invalid -> UTF32_Invalid -> [UTF32_Invalid] # | |
Enum DoPa | |
Defined in Text.Regex.TDFA.Common | |
Enum WhichTest | |
Defined in Text.Regex.TDFA.Common succ :: WhichTest -> WhichTest # pred :: WhichTest -> WhichTest # fromEnum :: WhichTest -> Int # enumFrom :: WhichTest -> [WhichTest] # enumFromThen :: WhichTest -> WhichTest -> [WhichTest] # enumFromTo :: WhichTest -> WhichTest -> [WhichTest] # enumFromThenTo :: WhichTest -> WhichTest -> WhichTest -> [WhichTest] # | |
Enum PortNumber | |
Defined in Network.Socket.Types succ :: PortNumber -> PortNumber # pred :: PortNumber -> PortNumber # fromEnum :: PortNumber -> Int # enumFrom :: PortNumber -> [PortNumber] # enumFromThen :: PortNumber -> PortNumber -> [PortNumber] # enumFromTo :: PortNumber -> PortNumber -> [PortNumber] # enumFromThenTo :: PortNumber -> PortNumber -> PortNumber -> [PortNumber] # | |
Enum X11Color | |
Defined in Data.GraphViz.Attributes.Colors.X11 succ :: X11Color -> X11Color # pred :: X11Color -> X11Color # enumFrom :: X11Color -> [X11Color] # enumFromThen :: X11Color -> X11Color -> [X11Color] # enumFromTo :: X11Color -> X11Color -> [X11Color] # enumFromThenTo :: X11Color -> X11Color -> X11Color -> [X11Color] # | |
Enum DirType | |
Defined in Data.GraphViz.Attributes.Values enumFrom :: DirType -> [DirType] # enumFromThen :: DirType -> DirType -> [DirType] # enumFromTo :: DirType -> DirType -> [DirType] # enumFromThenTo :: DirType -> DirType -> DirType -> [DirType] # | |
Enum Order | |
Defined in Data.GraphViz.Attributes.Values | |
Enum RankType | |
Defined in Data.GraphViz.Attributes.Values succ :: RankType -> RankType # pred :: RankType -> RankType # enumFrom :: RankType -> [RankType] # enumFromThen :: RankType -> RankType -> [RankType] # enumFromTo :: RankType -> RankType -> [RankType] # enumFromThenTo :: RankType -> RankType -> RankType -> [RankType] # | |
Enum Shape | |
Defined in Data.GraphViz.Attributes.Values | |
Enum GraphvizCanvas | |
Defined in Data.GraphViz.Commands succ :: GraphvizCanvas -> GraphvizCanvas # pred :: GraphvizCanvas -> GraphvizCanvas # toEnum :: Int -> GraphvizCanvas # fromEnum :: GraphvizCanvas -> Int # enumFrom :: GraphvizCanvas -> [GraphvizCanvas] # enumFromThen :: GraphvizCanvas -> GraphvizCanvas -> [GraphvizCanvas] # enumFromTo :: GraphvizCanvas -> GraphvizCanvas -> [GraphvizCanvas] # enumFromThenTo :: GraphvizCanvas -> GraphvizCanvas -> GraphvizCanvas -> [GraphvizCanvas] # | |
Enum GraphvizCommand | |
Defined in Data.GraphViz.Commands.Available succ :: GraphvizCommand -> GraphvizCommand # pred :: GraphvizCommand -> GraphvizCommand # toEnum :: Int -> GraphvizCommand # fromEnum :: GraphvizCommand -> Int # enumFrom :: GraphvizCommand -> [GraphvizCommand] # enumFromThen :: GraphvizCommand -> GraphvizCommand -> [GraphvizCommand] # enumFromTo :: GraphvizCommand -> GraphvizCommand -> [GraphvizCommand] # enumFromThenTo :: GraphvizCommand -> GraphvizCommand -> GraphvizCommand -> [GraphvizCommand] # | |
Enum ArrowFill | |
Defined in Data.GraphViz.Attributes.Arrows succ :: ArrowFill -> ArrowFill # pred :: ArrowFill -> ArrowFill # fromEnum :: ArrowFill -> Int # enumFrom :: ArrowFill -> [ArrowFill] # enumFromThen :: ArrowFill -> ArrowFill -> [ArrowFill] # enumFromTo :: ArrowFill -> ArrowFill -> [ArrowFill] # enumFromThenTo :: ArrowFill -> ArrowFill -> ArrowFill -> [ArrowFill] # | |
Enum ArrowShape | |
Defined in Data.GraphViz.Attributes.Arrows succ :: ArrowShape -> ArrowShape # pred :: ArrowShape -> ArrowShape # fromEnum :: ArrowShape -> Int # enumFrom :: ArrowShape -> [ArrowShape] # enumFromThen :: ArrowShape -> ArrowShape -> [ArrowShape] # enumFromTo :: ArrowShape -> ArrowShape -> [ArrowShape] # enumFromThenTo :: ArrowShape -> ArrowShape -> ArrowShape -> [ArrowShape] # | |
Enum ArrowSide | |
Defined in Data.GraphViz.Attributes.Arrows succ :: ArrowSide -> ArrowSide # pred :: ArrowSide -> ArrowSide # fromEnum :: ArrowSide -> Int # enumFrom :: ArrowSide -> [ArrowSide] # enumFromThen :: ArrowSide -> ArrowSide -> [ArrowSide] # enumFromTo :: ArrowSide -> ArrowSide -> [ArrowSide] # enumFromThenTo :: ArrowSide -> ArrowSide -> ArrowSide -> [ArrowSide] # | |
Enum CompassPoint | |
Defined in Data.GraphViz.Attributes.Internal succ :: CompassPoint -> CompassPoint # pred :: CompassPoint -> CompassPoint # toEnum :: Int -> CompassPoint # fromEnum :: CompassPoint -> Int # enumFrom :: CompassPoint -> [CompassPoint] # enumFromThen :: CompassPoint -> CompassPoint -> [CompassPoint] # enumFromTo :: CompassPoint -> CompassPoint -> [CompassPoint] # enumFromThenTo :: CompassPoint -> CompassPoint -> CompassPoint -> [CompassPoint] # | |
Enum ClusterMode | |
Defined in Data.GraphViz.Attributes.Values succ :: ClusterMode -> ClusterMode # pred :: ClusterMode -> ClusterMode # toEnum :: Int -> ClusterMode # fromEnum :: ClusterMode -> Int # enumFrom :: ClusterMode -> [ClusterMode] # enumFromThen :: ClusterMode -> ClusterMode -> [ClusterMode] # enumFromTo :: ClusterMode -> ClusterMode -> [ClusterMode] # enumFromThenTo :: ClusterMode -> ClusterMode -> ClusterMode -> [ClusterMode] # | |
Enum DEConstraints | |
Defined in Data.GraphViz.Attributes.Values succ :: DEConstraints -> DEConstraints # pred :: DEConstraints -> DEConstraints # toEnum :: Int -> DEConstraints # fromEnum :: DEConstraints -> Int # enumFrom :: DEConstraints -> [DEConstraints] # enumFromThen :: DEConstraints -> DEConstraints -> [DEConstraints] # enumFromTo :: DEConstraints -> DEConstraints -> [DEConstraints] # enumFromThenTo :: DEConstraints -> DEConstraints -> DEConstraints -> [DEConstraints] # | |
Enum EdgeType | |
Defined in Data.GraphViz.Attributes.Values succ :: EdgeType -> EdgeType # pred :: EdgeType -> EdgeType # enumFrom :: EdgeType -> [EdgeType] # enumFromThen :: EdgeType -> EdgeType -> [EdgeType] # enumFromTo :: EdgeType -> EdgeType -> [EdgeType] # enumFromThenTo :: EdgeType -> EdgeType -> EdgeType -> [EdgeType] # | |
Enum Justification | |
Defined in Data.GraphViz.Attributes.Values succ :: Justification -> Justification # pred :: Justification -> Justification # toEnum :: Int -> Justification # fromEnum :: Justification -> Int # enumFrom :: Justification -> [Justification] # enumFromThen :: Justification -> Justification -> [Justification] # enumFromTo :: Justification -> Justification -> [Justification] # enumFromThenTo :: Justification -> Justification -> Justification -> [Justification] # | |
Enum LabelScheme | |
Defined in Data.GraphViz.Attributes.Values succ :: LabelScheme -> LabelScheme # pred :: LabelScheme -> LabelScheme # toEnum :: Int -> LabelScheme # fromEnum :: LabelScheme -> Int # enumFrom :: LabelScheme -> [LabelScheme] # enumFromThen :: LabelScheme -> LabelScheme -> [LabelScheme] # enumFromTo :: LabelScheme -> LabelScheme -> [LabelScheme] # enumFromThenTo :: LabelScheme -> LabelScheme -> LabelScheme -> [LabelScheme] # | |
Enum ModeType | |
Defined in Data.GraphViz.Attributes.Values succ :: ModeType -> ModeType # pred :: ModeType -> ModeType # enumFrom :: ModeType -> [ModeType] # enumFromThen :: ModeType -> ModeType -> [ModeType] # enumFromTo :: ModeType -> ModeType -> [ModeType] # enumFromThenTo :: ModeType -> ModeType -> ModeType -> [ModeType] # | |
Enum Model | |
Defined in Data.GraphViz.Attributes.Values | |
Enum NodeSize | |
Defined in Data.GraphViz.Attributes.Values succ :: NodeSize -> NodeSize # pred :: NodeSize -> NodeSize # enumFrom :: NodeSize -> [NodeSize] # enumFromThen :: NodeSize -> NodeSize -> [NodeSize] # enumFromTo :: NodeSize -> NodeSize -> [NodeSize] # enumFromThenTo :: NodeSize -> NodeSize -> NodeSize -> [NodeSize] # | |
Enum OutputMode | |
Defined in Data.GraphViz.Attributes.Values succ :: OutputMode -> OutputMode # pred :: OutputMode -> OutputMode # fromEnum :: OutputMode -> Int # enumFrom :: OutputMode -> [OutputMode] # enumFromThen :: OutputMode -> OutputMode -> [OutputMode] # enumFromTo :: OutputMode -> OutputMode -> [OutputMode] # enumFromThenTo :: OutputMode -> OutputMode -> OutputMode -> [OutputMode] # | |
Enum PageDir | |
Defined in Data.GraphViz.Attributes.Values enumFrom :: PageDir -> [PageDir] # enumFromThen :: PageDir -> PageDir -> [PageDir] # enumFromTo :: PageDir -> PageDir -> [PageDir] # enumFromThenTo :: PageDir -> PageDir -> PageDir -> [PageDir] # | |
Enum QuadType | |
Defined in Data.GraphViz.Attributes.Values succ :: QuadType -> QuadType # pred :: QuadType -> QuadType # enumFrom :: QuadType -> [QuadType] # enumFromThen :: QuadType -> QuadType -> [QuadType] # enumFromTo :: QuadType -> QuadType -> [QuadType] # enumFromThenTo :: QuadType -> QuadType -> QuadType -> [QuadType] # | |
Enum RankDir | |
Defined in Data.GraphViz.Attributes.Values enumFrom :: RankDir -> [RankDir] # enumFromThen :: RankDir -> RankDir -> [RankDir] # enumFromTo :: RankDir -> RankDir -> [RankDir] # enumFromThenTo :: RankDir -> RankDir -> RankDir -> [RankDir] # | |
Enum STStyle | |
Defined in Data.GraphViz.Attributes.Values enumFrom :: STStyle -> [STStyle] # enumFromThen :: STStyle -> STStyle -> [STStyle] # enumFromTo :: STStyle -> STStyle -> [STStyle] # enumFromThenTo :: STStyle -> STStyle -> STStyle -> [STStyle] # | |
Enum SVGFontNames | |
Defined in Data.GraphViz.Attributes.Values succ :: SVGFontNames -> SVGFontNames # pred :: SVGFontNames -> SVGFontNames # toEnum :: Int -> SVGFontNames # fromEnum :: SVGFontNames -> Int # enumFrom :: SVGFontNames -> [SVGFontNames] # enumFromThen :: SVGFontNames -> SVGFontNames -> [SVGFontNames] # enumFromTo :: SVGFontNames -> SVGFontNames -> [SVGFontNames] # enumFromThenTo :: SVGFontNames -> SVGFontNames -> SVGFontNames -> [SVGFontNames] # | |
Enum ScaleType | |
Defined in Data.GraphViz.Attributes.Values succ :: ScaleType -> ScaleType # pred :: ScaleType -> ScaleType # fromEnum :: ScaleType -> Int # enumFrom :: ScaleType -> [ScaleType] # enumFromThen :: ScaleType -> ScaleType -> [ScaleType] # enumFromTo :: ScaleType -> ScaleType -> [ScaleType] # enumFromThenTo :: ScaleType -> ScaleType -> ScaleType -> [ScaleType] # | |
Enum SmoothType | |
Defined in Data.GraphViz.Attributes.Values succ :: SmoothType -> SmoothType # pred :: SmoothType -> SmoothType # fromEnum :: SmoothType -> Int # enumFrom :: SmoothType -> [SmoothType] # enumFromThen :: SmoothType -> SmoothType -> [SmoothType] # enumFromTo :: SmoothType -> SmoothType -> [SmoothType] # enumFromThenTo :: SmoothType -> SmoothType -> SmoothType -> [SmoothType] # | |
Enum VerticalPlacement | |
Defined in Data.GraphViz.Attributes.Values succ :: VerticalPlacement -> VerticalPlacement # pred :: VerticalPlacement -> VerticalPlacement # toEnum :: Int -> VerticalPlacement # fromEnum :: VerticalPlacement -> Int # enumFrom :: VerticalPlacement -> [VerticalPlacement] # enumFromThen :: VerticalPlacement -> VerticalPlacement -> [VerticalPlacement] # enumFromTo :: VerticalPlacement -> VerticalPlacement -> [VerticalPlacement] # enumFromThenTo :: VerticalPlacement -> VerticalPlacement -> VerticalPlacement -> [VerticalPlacement] # | |
Enum Align | |
Defined in Data.GraphViz.Attributes.HTML | |
Enum CellFormat | |
Defined in Data.GraphViz.Attributes.HTML succ :: CellFormat -> CellFormat # pred :: CellFormat -> CellFormat # fromEnum :: CellFormat -> Int # enumFrom :: CellFormat -> [CellFormat] # enumFromThen :: CellFormat -> CellFormat -> [CellFormat] # enumFromTo :: CellFormat -> CellFormat -> [CellFormat] # enumFromThenTo :: CellFormat -> CellFormat -> CellFormat -> [CellFormat] # | |
Enum Format | |
Defined in Data.GraphViz.Attributes.HTML | |
Enum Scale | |
Defined in Data.GraphViz.Attributes.HTML | |
Enum Side | |
Defined in Data.GraphViz.Attributes.HTML | |
Enum Style | |
Defined in Data.GraphViz.Attributes.HTML | |
Enum VAlign | |
Defined in Data.GraphViz.Attributes.HTML | |
Enum BrewerName | |
Defined in Data.GraphViz.Attributes.ColorScheme succ :: BrewerName -> BrewerName # pred :: BrewerName -> BrewerName # fromEnum :: BrewerName -> Int # enumFrom :: BrewerName -> [BrewerName] # enumFromThen :: BrewerName -> BrewerName -> [BrewerName] # enumFromTo :: BrewerName -> BrewerName -> [BrewerName] # enumFromThenTo :: BrewerName -> BrewerName -> BrewerName -> [BrewerName] # | |
Enum Greediness | |
Defined in Text.Regex.Applicative.Types succ :: Greediness -> Greediness # pred :: Greediness -> Greediness # fromEnum :: Greediness -> Int # enumFrom :: Greediness -> [Greediness] # enumFromThen :: Greediness -> Greediness -> [Greediness] # enumFromTo :: Greediness -> Greediness -> [Greediness] # enumFromThenTo :: Greediness -> Greediness -> Greediness -> [Greediness] # | |
Integral a => Enum (Ratio a) | Since: base-2.0.1 |
Enum (Fixed a) | Since: base-2.1 |
Enum a => Enum (Min a) | Since: base-4.9.0.0 |
Enum a => Enum (Max a) | Since: base-4.9.0.0 |
Enum a => Enum (First a) | Since: base-4.9.0.0 |
Enum a => Enum (Last a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
Enum a => Enum (WrappedMonoid a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup succ :: WrappedMonoid a -> WrappedMonoid a # pred :: WrappedMonoid a -> WrappedMonoid a # toEnum :: Int -> WrappedMonoid a # fromEnum :: WrappedMonoid a -> Int # enumFrom :: WrappedMonoid a -> [WrappedMonoid a] # enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # | |
Enum a => Enum (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity succ :: Identity a -> Identity a # pred :: Identity a -> Identity a # fromEnum :: Identity a -> Int # enumFrom :: Identity a -> [Identity a] # enumFromThen :: Identity a -> Identity a -> [Identity a] # enumFromTo :: Identity a -> Identity a -> [Identity a] # enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] # | |
Enum (Offset ty) | |
Defined in Basement.Types.OffsetSize succ :: Offset ty -> Offset ty # pred :: Offset ty -> Offset ty # fromEnum :: Offset ty -> Int # enumFrom :: Offset ty -> [Offset ty] # enumFromThen :: Offset ty -> Offset ty -> [Offset ty] # enumFromTo :: Offset ty -> Offset ty -> [Offset ty] # enumFromThenTo :: Offset ty -> Offset ty -> Offset ty -> [Offset ty] # | |
Enum (CountOf ty) | |
Defined in Basement.Types.OffsetSize succ :: CountOf ty -> CountOf ty # pred :: CountOf ty -> CountOf ty # fromEnum :: CountOf ty -> Int # enumFrom :: CountOf ty -> [CountOf ty] # enumFromThen :: CountOf ty -> CountOf ty -> [CountOf ty] # enumFromTo :: CountOf ty -> CountOf ty -> [CountOf ty] # enumFromThenTo :: CountOf ty -> CountOf ty -> CountOf ty -> [CountOf ty] # | |
Enum (Proxy s) | Since: base-4.7.0.0 |
Enum a => Enum (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const succ :: Const a b -> Const a b # pred :: Const a b -> Const a b # fromEnum :: Const a b -> Int # enumFrom :: Const a b -> [Const a b] # enumFromThen :: Const a b -> Const a b -> [Const a b] # enumFromTo :: Const a b -> Const a b -> [Const a b] # enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] # | |
Enum (f a) => Enum (Ap f a) | Since: base-4.12.0.0 |
Defined in Data.Monoid | |
Enum (f a) => Enum (Alt f a) | Since: base-4.8.0.0 |
a ~ b => Enum (a :~: b) | Since: base-4.7.0.0 |
Defined in Data.Type.Equality | |
a ~~ b => Enum (a :~~: b) | Since: base-4.10.0.0 |
Defined in Data.Type.Equality succ :: (a :~~: b) -> a :~~: b # pred :: (a :~~: b) -> a :~~: b # fromEnum :: (a :~~: b) -> Int # enumFrom :: (a :~~: b) -> [a :~~: b] # enumFromThen :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] # enumFromTo :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] # enumFromThenTo :: (a :~~: b) -> (a :~~: b) -> (a :~~: b) -> [a :~~: b] # |
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
.
The Haskell Report defines no laws for Eq
. However, ==
is customarily
expected to implement an equivalence relationship where two values comparing
equal are indistinguishable by "public" functions, with a "public" function
being one not allowing to see implementation details. For example, for a
type representing non-normalised natural numbers modulo 100, a "public"
function doesn't make the difference between 1 and 201. It is expected to
have the following properties: