cardano-prelude-0.1.0.0: A Prelude replacement for the Cardano project
Safe Haskell None
Language Haskell2010

Cardano.Prelude

Synopsis

Documentation

forceElemsToWHNF :: Foldable t => t a -> t a Source #

Force all of the elements of a Foldable to weak head normal form.

In order to ensure that all of the elements of a Foldable are strict, we can simply foldMap over it and seq each value with () . However, () 's mappend implementation is actually completely lazy: _ <> _ = () So, in order to work around this, we instead utilize this newly defined StrictUnit whose mappend implementation is specifically strict.

parseJSString :: forall a m e. ( Typeable a, ReportSchemaErrors m, Buildable e) => ( Text -> Either e a) -> JSValue -> m a Source #

Attempt to parse a value of type a from the body of a JSString using parser

class HeapWords a where Source #

Size in the heap of values, in words (to get the size in bytes multiply by 4 on a 32-bit machine or 8 on a 64-bit machine)

Instances

Instances details
HeapWords Bool Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Char Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Float Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Int Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Integer Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Natural Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Word Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Word8 Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Word32 Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Word64 Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords ByteString Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords UTCTime Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Text Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords ShortByteString Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords IntSet Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords BigNat Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords LByteString Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords Day Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords a => HeapWords [a] Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords a => HeapWords ( Maybe a) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords a => HeapWords ( IntMap a) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords a => HeapWords ( Seq a) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords a => HeapWords ( Set a) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords e => HeapWords ( Vector e) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

HeapWords (a -> b) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Methods

heapWords :: (a -> b) -> Int Source #

( HeapWords a, HeapWords b) => HeapWords ( Either a b) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

( HeapWords a, HeapWords b) => HeapWords (a, b) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Methods

heapWords :: (a, b) -> Int Source #

( HeapWords a, HeapWords b) => HeapWords ( Map a b) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

( HeapWords a, HeapWords b, HeapWords c) => HeapWords (a, b, c) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Methods

heapWords :: (a, b, c) -> Int Source #

( HeapWords a, HeapWords b, HeapWords c, HeapWords d) => HeapWords (a, b, c, d) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Methods

heapWords :: (a, b, c, d) -> Int Source #

heapSizeMb :: Int -> Int Source #

These functions assume a 64-bit architecture

heapSizeKb :: Int -> Int Source #

These functions assume a 64-bit architecture

heapWords10 :: ( HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) => a -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> Int Source #

heapWords11 :: ( HeapWords a10, HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) => a -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> Int Source #

heapWords12 :: ( HeapWords a11, HeapWords a10, HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) => a -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> a11 -> Int Source #

heapWords13 :: ( HeapWords a12, HeapWords a11, HeapWords a10, HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) => a -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> a11 -> a12 -> Int Source #

heapWordsUnpacked :: HeapWords a => a -> Int Source #

Calculate the number of heap words used by a field unpacked within another constructor.

This function simply subtracts 2 from the heapWords result of its parameter, since in the case of an unpacked field we _do not_ have to use:

  • a word for the pointer to the inner structure.
  • a word for the constructor that is being unpacked.

data ClosureTreeOptions Source #

Options which detail how a Closure Tree should be constructed.

Constructors

ClosureTreeOptions

Fields

buildClosureTree :: ClosureTreeOptions -> a -> IO ( Maybe ( Tree Closure )) Source #

Given a Haskell expression, build a Tree which reflects its heap object representation.

buildAndRenderClosureTree :: ClosureTreeOptions -> a -> IO Text Source #

Given a Haskell expression, build a Tree which reflects its heap object representation and render it as Text .

data PerformGC Source #

Should we perform a GC call before counting the size?

Constructors

FirstPerformGC

Yes, first perform GC before counting

This should be used for most accurate results. Without calling GC first, the computed size might be larger than expected due to leftover indirections (black holes, selector thunks, etc.)

DontPerformGC

No, do not perform GC before counting

If pinpoint accuracy is not requried, then GC can be skipped, making the call much less expensive.

computeHeapSize :: a -> IO ( Either CountFailure Word64 ) Source #

Compute the size of the given closure

This is a wrapper around computeHeapSize' which sets some defaults for the capacity of worklist and the visited set: it uses a worklist capacity of 10k (which, assuming balanced data structures, should be more than enough), an initial visited set capacity of 250k, and a maximum visited set capacity of 16M. This means that this will use between 2 MB and 128 MB of heaps space.

It also does NOT perform GC before counting, for improved performance. Client code can call performMajorGC manually or use computeHeapSize' .

Should these limits not be sufficient, or conversely, the memory requirements be too large, use computeHeapSize' directly.

computeHeapSize' Source #

Arguments

:: PerformGC

Should we call GC before counting?

-> Word

Capacity of the worklist

-> Word

Initial capacity of the visited set

-> Word

Maximum capacity of the visited set

-> a
-> IO ( Either CountFailure Word64 )

Compute the size of the given closure

The size of the worklist should be set to the maximum expected depth of the closure; the size of the visited set should be set to the maximum /number of nodes/ in the closure.

computeHeapSizeWorkList can be used to estimate the size of the worklist required.

computeHeapSizeWorkList :: a -> Word64 Source #

Upper bound on the required work list size to compute closure size

NOTE: This ignores sharing, and so provides an upper bound only.

The size of a closure with no nested pointers can be computed without any stack space.

When we have a closure with (N + 1) nested pointers

p0 p1 .. pN

We will

  • Push pN, .., p1, p0 onto the stack
  • Pop off p0 and count its children
  • Pop off p1 and count its children
  • ..

until we have processed all children. This means that the stack space required will be the maximum of

[ N + 1 -- For the initial list
, requiredWorkList p0 + (N + 1) - 1
, requiredWorkList p1 + (N + 1) - 2
, ..
, requiredWorkList pN + (N + 1) - (N + 1)
]

For example, for a list, we would get that

requiredWorkList []     == 0
requiredWorkList (x:xs) == max [ 2
                               , requiredWorkList x + 1
                               , requiredWorkList xs
                               ]

which, for a list of Int (which requires only a stack of size 1), equals 2 (unless the list is empty).

Similarly, for binary trees, we get

requiredWorkList Leaf           == 0
requiredWorkList (Branch l x r) == max [ 3
                                       , requiredWorkList l + 2
                                       , requiredWorkList x + 1
                                       , requiredWorkList r
                                       ]

which, for a tree of Int , is bound by (height * 2) + 1 .

isNormalForm :: a -> IO Bool Source #

The function isNormalForm checks whether its argument is fully evaluated and deeply evaluated.

NOTE: The normal form check can be quite brittle, especially with -O0 . For example, writing something like

let !(Value x) = ... in ....

might translate to

let !.. = ... in ... (case ... of Value x -> x)

which would trivially be False . In general, isNormalForm should probably only be used with -O1 , but even then the answer may still depend on internal decisions made by ghc during compilation.

base16Builder :: ByteString -> Builder Source #

A Builder for a ByteString that performs base 16 encoding

base16F :: Format r ( ByteString -> r) Source #

A Format for a ByteString that performs base 16 encoding

pairF :: ( Buildable a, Buildable b) => Format r ((a, b) -> r) Source #

A Format for a pair of Buildable values (a, b)

pairBuilder :: ( Buildable a, Buildable b) => (a, b) -> Builder Source #

A Builder for a pair of Buildable values (a, b)

listJson :: ( Foldable t, Buildable a) => Format r (t a -> r) Source #

A Format for Foldable containers that outputs a JSON-style list

listJsonIndent :: ( Foldable t, Buildable a) => Word -> Format r (t a -> r) Source #

A Format similar to listJson that prints each value on a new line with indent spaces of indentation

mapJson :: ( IsList t, Item t ~ (k, v), Buildable k, Buildable v) => Format r (t -> r) Source #

A Format for Exts.IsList containers of Buildable key-value pairs that outputs a JSON-style colon-separated map

toAesonError :: Buildable e => Either e a -> Parser a Source #

Convert an Either -encoded error to an aeson parser error

aesonError :: Buildable e => e -> Parser a Source #

Convert a Buildable error into an aeson parser error

toCborError :: Buildable e => Either e a -> Decoder s a Source #

Convert an Either -encoded failure to a cborg decoder failure

cborError :: Buildable e => e -> Decoder s a Source #

Convert a Buildable error into a cborg decoder error

wrapError :: MonadError e' m => Either e a -> (e -> e') -> m a infix 1 Source #

A helper for lifting an Either to a MonadError

By using this function infix we can move the error handling to the end of an expression, hopefully improving readability.

orThrowError :: MonadError e m => Bool -> e -> m () infix 1 Source #

A helper for lifting unless to MonadError

By using this function infix we can move error handling to the end of a Bool expression, hopefully improving readability.

(++) :: [a] -> [a] -> [a] infixr 5 Source #

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.

seq :: forall (r :: RuntimeRep ) a (b :: TYPE r). a -> b -> b infixr 0 Source #

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] Source #

\(\mathcal{O}(n)\) . 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]
>>> filter odd [1, 2, 3]
[1,3]

zip :: [a] -> [b] -> [(a, b)] Source #

\(\mathcal{O}(\min(m,n))\) . zip takes two lists and returns a list of corresponding pairs.

zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]

If one input list is short, excess elements of the longer list are discarded:

zip [1] ['a', 'b'] = [(1, 'a')]
zip [1, 2] ['a'] = [(1, 'a')]

zip is right-lazy:

zip [] _|_ = []
zip _|_ [] = _|_

zip is capable of list fusion, but it is restricted to its first list argument and its resulting list.

fst :: (a, b) -> a Source #

Extract the first component of a pair.

snd :: (a, b) -> b Source #

Extract the second component of a pair.

otherwise :: Bool Source #

otherwise is defined as the value True . It helps to make guards more readable. eg.

 f x | x < 0     = ...
     | otherwise = ...

($) :: forall (r :: RuntimeRep ) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 Source #

Application operator. This operator is redundant, since ordinary application (f x) means the same as (f $ x) . However, $ 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 map ( $ 0) xs , or 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 Source #

general coercion from integral types

realToFrac :: ( Real a, Fractional b) => a -> b Source #

general coercion to fractional types

guard :: Alternative f => Bool -> f () Source #

Conditional failure of Alternative computations. Defined by

guard True  = pure ()
guard False = empty

Examples

Expand

Common uses of guard include conditionally signaling an error in an error monad and conditionally rejecting the current choice in an Alternative -based parser.

As an example of signaling an error in the error monad Maybe , consider a safe division function safeDiv x y that returns Nothing when the denominator y is zero and Just (x `div` y) otherwise. For example:

>>> safeDiv 4 0
Nothing
>>> safeDiv 4 2
Just 2

A definition of safeDiv using guards, but not guard :

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y | y /= 0    = Just (x `div` y)
            | otherwise = Nothing

A definition of safeDiv using guard and Monad do -notation:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y = do
  guard (y /= 0)
  return (x `div` y)

join :: Monad m => m (m a) -> m a Source #

The join function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.

' join bss ' can be understood as the do expression

do bs <- bss
   bs

Examples

Expand

A common use of join is to run an IO computation returned from an STM transaction, since STM transactions can't perform IO directly. Recall that

atomically :: STM a -> IO a

is used to run STM transactions atomically. So, by specializing the types of atomically and join to

atomically :: STM (IO b) -> IO (IO b)
join       :: IO (IO b)  -> IO b

we can compose them as

join . atomically :: STM (IO b) -> IO b

to run an STM transaction and the IO action it returns.

class Bounded a where Source #

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

Instances details
Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded CDev
Instance details

Defined in System.Posix.Types

Bounded CIno
Instance details

Defined in System.Posix.Types

Bounded CMode
Instance details

Defined in System.Posix.Types

Bounded COff
Instance details

Defined in System.Posix.Types

Bounded CPid
Instance details

Defined in System.Posix.Types

Bounded CSsize
Instance details

Defined in System.Posix.Types

Bounded CGid
Instance details

Defined in System.Posix.Types

Bounded CNlink
Instance details

Defined in System.Posix.Types

Bounded CUid
Instance details

Defined in System.Posix.Types

Bounded CTcflag
Instance details

Defined in System.Posix.Types

Bounded CRLim
Instance details

Defined in System.Posix.Types

Bounded CBlkSize
Instance details

Defined in System.Posix.Types

Bounded CBlkCnt
Instance details

Defined in System.Posix.Types

Bounded CClockId
Instance details

Defined in System.Posix.Types

Bounded CFsBlkCnt
Instance details

Defined in System.Posix.Types

Bounded CFsFilCnt
Instance details

Defined in System.Posix.Types

Bounded CId
Instance details

Defined in System.Posix.Types

Bounded CKey
Instance details

Defined in System.Posix.Types

Bounded CSocklen
Instance details

Defined in System.Posix.Types

Bounded CNfds
Instance details

Defined in System.Posix.Types

Bounded Fd
Instance details

Defined in System.Posix.Types

Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded CChar
Instance details

Defined in Foreign.C.Types

Bounded CSChar
Instance details

Defined in Foreign.C.Types

Bounded CUChar
Instance details

Defined in Foreign.C.Types

Bounded CShort
Instance details

Defined in Foreign.C.Types

Bounded CUShort
Instance details

Defined in Foreign.C.Types

Bounded CInt
Instance details

Defined in Foreign.C.Types

Bounded CUInt
Instance details

Defined in Foreign.C.Types

Bounded CLong
Instance details

Defined in Foreign.C.Types

Bounded CULong
Instance details

Defined in Foreign.C.Types

Bounded CLLong
Instance details

Defined in Foreign.C.Types

Bounded CULLong
Instance details

Defined in Foreign.C.Types

Bounded CBool
Instance details

Defined in Foreign.C.Types

Bounded CPtrdiff
Instance details

Defined in Foreign.C.Types

Bounded CSize
Instance details

Defined in Foreign.C.Types

Bounded CWchar
Instance details

Defined in Foreign.C.Types

Bounded CSigAtomic
Instance details

Defined in Foreign.C.Types

Bounded CIntPtr
Instance details

Defined in Foreign.C.Types

Bounded CUIntPtr
Instance details

Defined in Foreign.C.Types

Bounded CIntMax
Instance details

Defined in Foreign.C.Types

Bounded CUIntMax
Instance details

Defined in Foreign.C.Types

Bounded WordPtr
Instance details

Defined in Foreign.Ptr

Bounded IntPtr
Instance details

Defined in Foreign.Ptr

Bounded GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Bounded Int54
Instance details

Defined in Text.JSON.Canonical.Types

Bounded TokenType
Instance details

Defined in Codec.CBOR.Decoding

Bounded Extension
Instance details

Defined in GHC.LanguageExtensions.Type

Bounded a => Bounded ( Solo a)
Instance details

Defined in Data.Tuple.Solo

Bounded a => Bounded ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded m => Bounded ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Bounded a => Bounded ( Shown a)
Instance details

Defined in Data.Text.Format.Types

( Bounded a, Bounded b) => Bounded (a, b)

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

( Bounded a, Bounded b) => Bounded ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

( Bounded a, Bounded b, Bounded c) => Bounded (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c) Source #

maxBound :: (a, b, c) Source #

Bounded a => Bounded ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

( Applicative f, Bounded a) => Bounded ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Coercible a b => Bounded ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

a ~ b => Bounded (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Bounded b => Bounded ( Tagged s b)
Instance details

Defined in Data.Tagged

( Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d) Source #

maxBound :: (a, b, c, d) Source #

a ~~ b => Bounded (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e) Source #

maxBound :: (a, b, c, d, e) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f) Source #

maxBound :: (a, b, c, d, e, f) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g) Source #

maxBound :: (a, b, c, d, e, f, g) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h) => Bounded (a, b, c, d, e, f, g, h)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h) Source #

maxBound :: (a, b, c, d, e, f, g, h) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i) => Bounded (a, b, c, d, e, f, g, h, i)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i) Source #

maxBound :: (a, b, c, d, e, f, g, h, i) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j) => Bounded (a, b, c, d, e, f, g, h, i, j)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j) Source #

maxBound :: (a, b, c, d, e, f, g, h, i, j) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k) => Bounded (a, b, c, d, e, f, g, h, i, j, k)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k) Source #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l) Source #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

( Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n, Bounded o) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

maxBound :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

class Enum a where Source #

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:

   enumFrom     x   = enumFromTo     x maxBound
   enumFromThen x y = enumFromThenTo x y bound
     where
       bound | fromEnum y >= fromEnum x = maxBound
             | otherwise                = minBound

Minimal complete definition

toEnum , fromEnum

Methods

succ :: a -> a Source #

the successor of a value. For numeric types, succ adds 1.

pred :: a -> a Source #

the predecessor of a value. For numeric types, pred subtracts 1.

toEnum :: Int -> a Source #

Convert from an Int .

fromEnum :: a -> Int Source #

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 .

enumFrom :: a -> [a] Source #

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] Source #

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] Source #

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] Source #

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

Instances details
Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum CDev
Instance details

Defined in System.Posix.Types

Enum CIno
Instance details

Defined in System.Posix.Types

Enum CMode
Instance details

Defined in System.Posix.Types

Enum COff
Instance details

Defined in System.Posix.Types

Enum CPid
Instance details

Defined in System.Posix.Types

Enum CSsize
Instance details

Defined in System.Posix.Types

Enum CGid
Instance details

Defined in System.Posix.Types

Enum CNlink
Instance details

Defined in System.Posix.Types

Enum CUid
Instance details

Defined in System.Posix.Types

Enum CCc
Instance details

Defined in System.Posix.Types

Enum CSpeed
Instance details

Defined in System.Posix.Types

Enum CTcflag
Instance details

Defined in System.Posix.Types

Enum CRLim
Instance details

Defined in System.Posix.Types

Enum CBlkSize
Instance details

Defined in System.Posix.Types

Enum CBlkCnt
Instance details

Defined in System.Posix.Types

Enum CClockId
Instance details

Defined in System.Posix.Types

Enum CFsBlkCnt
Instance details

Defined in System.Posix.Types

Enum CFsFilCnt
Instance details

Defined in System.Posix.Types

Enum CId
Instance details

Defined in System.Posix.Types

Enum CKey
Instance details

Defined in System.Posix.Types

Enum CSocklen
Instance details

Defined in System.Posix.Types

Enum CNfds
Instance details

Defined in System.Posix.Types

Enum Fd
Instance details

Defined in System.Posix.Types

Enum Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum CChar
Instance details

Defined in Foreign.C.Types

Enum CSChar
Instance details

Defined in Foreign.C.Types

Enum CUChar
Instance details

Defined in Foreign.C.Types

Enum CShort
Instance details

Defined in Foreign.C.Types

Enum CUShort
Instance details

Defined in Foreign.C.Types

Enum CInt
Instance details

Defined in Foreign.C.Types

Enum CUInt
Instance details

Defined in Foreign.C.Types

Enum CLong
Instance details

Defined in Foreign.C.Types

Enum CULong
Instance details

Defined in Foreign.C.Types

Enum CLLong
Instance details

Defined in Foreign.C.Types

Enum CULLong
Instance details

Defined in Foreign.C.Types

Enum CBool
Instance details

Defined in Foreign.C.Types

Enum CFloat
Instance details

Defined in Foreign.C.Types

Enum CDouble
Instance details

Defined in Foreign.C.Types

Enum CPtrdiff
Instance details

Defined in Foreign.C.Types

Enum CSize
Instance details

Defined in Foreign.C.Types

Enum CWchar
Instance details

Defined in Foreign.C.Types

Enum CSigAtomic
Instance details

Defined in Foreign.C.Types

Enum CClock
Instance details

Defined in Foreign.C.Types

Enum CTime
Instance details

Defined in Foreign.C.Types

Enum CUSeconds
Instance details

Defined in Foreign.C.Types

Enum CSUSeconds
Instance details

Defined in Foreign.C.Types

Enum CIntPtr
Instance details

Defined in Foreign.C.Types

Enum CUIntPtr
Instance details

Defined in Foreign.C.Types

Enum CIntMax
Instance details

Defined in Foreign.C.Types

Enum CUIntMax
Instance details

Defined in Foreign.C.Types

Enum WordPtr
Instance details

Defined in Foreign.Ptr

Enum IntPtr
Instance details

Defined in Foreign.Ptr

Enum IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Enum GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Enum Int54
Instance details

Defined in Text.JSON.Canonical.Types

Enum TokenType
Instance details

Defined in Codec.CBOR.Decoding

Enum DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Enum NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Enum Extension
Instance details

Defined in GHC.LanguageExtensions.Type

Enum ClosureType
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Enum Day
Instance details

Defined in Data.Time.Calendar.Days

Integral a => Enum ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Enum a => Enum ( Solo a)
Instance details

Defined in Data.Tuple.Solo

Enum a => Enum ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Enum a => Enum ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Enum a => Enum ( Hex a)
Instance details

Defined in Data.Text.Format.Types

Enum a => Enum ( Shown a)
Instance details

Defined in Data.Text.Format.Types

Enum ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Enum ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Enum a => Enum ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Enum (f a) => Enum ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Enum (f a) => Enum ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Coercible a b => Enum ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

a ~ b => Enum (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Enum a => Enum ( Tagged s a)
Instance details

Defined in Data.Tagged

a ~~ b => Enum (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

class Eq a where Source #

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:

Reflexivity
x == x = True
Symmetry
x == y = y == x
Transitivity
if x == y && y == z = True , then x == z = True
Substitutivity
if x == y = True and f is a "public" function whose return type is an instance of Eq , then f x == f y = True
Negation
x /= y = not (x == y)

Minimal complete definition: either == or /= .

Minimal complete definition

(==) | (/=)

Methods

(==) :: a -> a -> Bool infix 4 Source #

(/=) :: a -> a -> Bool infix 4 Source #

Instances

Instances details
Eq Bool
Instance details

Defined in GHC.Classes

Eq Char
Instance details

Defined in GHC.Classes

Eq Double

Note that due to the presence of NaN , Double 's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Double)
False

Also note that Double 's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Double)
True
>>> recip 0 == recip (-0 :: Double)
False
Instance details

Defined in GHC.Classes

Eq Float

Note that due to the presence of NaN , Float 's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Float)
False

Also note that Float 's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Float)
True
>>> recip 0 == recip (-0 :: Float)
False
Instance details

Defined in GHC.Classes

Eq Int
Instance details

Defined in GHC.Classes

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Integer
Instance details

Defined in GHC.Integer.Type

Eq Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Eq Ordering
Instance details

Defined in GHC.Classes

Eq Word
Instance details

Defined in GHC.Classes

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Eq SomeTypeRep
Instance details

Defined in Data.Typeable.Internal

Eq Exp
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Match
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Clause
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Pat
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Type
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Dec
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Name
Instance details

Defined in Language.Haskell.TH.Syntax

Eq FunDep
Instance details

Defined in Language.Haskell.TH.Syntax

Eq InjectivityAnn
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Overlap
Instance details

Defined in Language.Haskell.TH.Syntax

Eq ()
Instance details

Defined in GHC.Classes

Methods

(==) :: () -> () -> Bool Source #

(/=) :: () -> () -> Bool Source #

Eq TyCon
Instance details

Defined in GHC.Classes

Eq Module
Instance details

Defined in GHC.Classes

Eq TrName
Instance details

Defined in GHC.Classes

Eq ByteString
Instance details

Defined in Data.ByteString.Internal

Eq ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Eq Builder
Instance details

Defined in Data.Text.Internal.Builder

Eq Scientific

Scientific numbers can be safely compared for equality. No magnitude 10^e is calculated so there's no risk of a blowup in space or time when comparing scientific numbers coming from untrusted sources.

Instance details

Defined in Data.Scientific

Eq UTCTime
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Eq JSONPathElement
Instance details

Defined in Data.Aeson.Types.Internal

Eq Value
Instance details

Defined in Data.Aeson.Types.Internal

Eq DotNetTime
Instance details

Defined in Data.Aeson.Types.Internal

Eq SumEncoding
Instance details

Defined in Data.Aeson.Types.Internal

Eq Key
Instance details

Defined in Data.Aeson.Key

Eq Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Eq AsyncCancelled
Instance details

Defined in Control.Concurrent.Async

Eq Pos
Instance details

Defined in Data.Attoparsec.Internal.Types

Eq More
Instance details

Defined in Data.Attoparsec.Internal.Types

Eq Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Eq SpecConstrAnnotation

Since: base-4.3.0.0

Instance details

Defined in GHC.Exts

Eq Version

Since: base-2.1

Instance details

Defined in Data.Version

Eq BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Eq ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Eq CDev
Instance details

Defined in System.Posix.Types

Eq CIno
Instance details

Defined in System.Posix.Types

Eq CMode
Instance details

Defined in System.Posix.Types

Eq COff
Instance details

Defined in System.Posix.Types

Eq CPid
Instance details

Defined in System.Posix.Types

Eq CSsize
Instance details

Defined in System.Posix.Types

Eq CGid
Instance details

Defined in System.Posix.Types

Eq CNlink
Instance details

Defined in System.Posix.Types

Eq CUid
Instance details

Defined in System.Posix.Types

Eq CCc
Instance details

Defined in System.Posix.Types

Eq CSpeed
Instance details

Defined in System.Posix.Types

Eq CTcflag
Instance details

Defined in System.Posix.Types

Eq CRLim
Instance details

Defined in System.Posix.Types

Eq CBlkSize
Instance details

Defined in System.Posix.Types

Eq CBlkCnt
Instance details

Defined in System.Posix.Types

Eq CClockId
Instance details

Defined in System.Posix.Types

Eq CFsBlkCnt
Instance details

Defined in System.Posix.Types

Eq CFsFilCnt
Instance details

Defined in System.Posix.Types

Eq CId
Instance details

Defined in System.Posix.Types

Eq CKey
Instance details

Defined in System.Posix.Types

Eq CSocklen
Instance details

Defined in System.Posix.Types

Eq CNfds
Instance details

Defined in System.Posix.Types

Eq Fd
Instance details

Defined in System.Posix.Types

Eq AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq ExitCode
Instance details

Defined in GHC.IO.Exception

Eq IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq Newline

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq NewlineMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Eq IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq ErrorCall

Since: base-4.7.0.0

Instance details

Defined in GHC.Exception

Eq ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Eq Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Eq SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Eq SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Eq CChar
Instance details

Defined in Foreign.C.Types

Eq CSChar
Instance details

Defined in Foreign.C.Types

Eq CUChar
Instance details

Defined in Foreign.C.Types

Eq CShort
Instance details

Defined in Foreign.C.Types

Eq CUShort
Instance details

Defined in Foreign.C.Types

Eq CInt
Instance details

Defined in Foreign.C.Types

Eq CUInt
Instance details

Defined in Foreign.C.Types

Eq CLong
Instance details

Defined in Foreign.C.Types

Eq CULong
Instance details

Defined in Foreign.C.Types

Eq CLLong
Instance details

Defined in Foreign.C.Types

Eq CULLong
Instance details

Defined in Foreign.C.Types

Eq CBool
Instance details

Defined in Foreign.C.Types

Eq CFloat
Instance details

Defined in Foreign.C.Types

Eq CDouble
Instance details

Defined in Foreign.C.Types

Eq CPtrdiff
Instance details

Defined in Foreign.C.Types

Eq CSize
Instance details

Defined in Foreign.C.Types

Eq CWchar
Instance details

Defined in Foreign.C.Types

Eq CSigAtomic
Instance details

Defined in Foreign.C.Types

Eq CClock
Instance details

Defined in Foreign.C.Types

Eq CTime
Instance details

Defined in Foreign.C.Types

Eq CUSeconds
Instance details

Defined in Foreign.C.Types

Eq CSUSeconds
Instance details

Defined in Foreign.C.Types

Eq CIntPtr
Instance details

Defined in Foreign.C.Types

Eq CUIntPtr
Instance details

Defined in Foreign.C.Types

Eq CIntMax
Instance details

Defined in Foreign.C.Types

Eq CUIntMax
Instance details

Defined in Foreign.C.Types

Eq WordPtr
Instance details

Defined in Foreign.Ptr

Eq IntPtr
Instance details

Defined in Foreign.Ptr

Eq IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Eq GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Eq SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Stack.Types

Eq ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Eq JSValue
Instance details

Defined in Text.JSON.Canonical.Types

Eq JSString
Instance details

Defined in Text.JSON.Canonical.Types

Eq Int54
Instance details

Defined in Text.JSON.Canonical.Types

Eq ByteArray

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.ByteArray

Eq TokenType
Instance details

Defined in Codec.CBOR.Decoding

Eq ByteArray
Instance details

Defined in Codec.CBOR.ByteArray

Eq SlicedByteArray
Instance details

Defined in Codec.CBOR.ByteArray.Sliced

Eq IntSet
Instance details

Defined in Data.IntSet.Internal

Eq DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Eq NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Eq Extension
Instance details

Defined in GHC.LanguageExtensions.Type

Eq ForeignSrcLang
Instance details

Defined in GHC.ForeignSrcLang.Type

Eq PrimType
Instance details

Defined in GHC.Exts.Heap.Closures

Eq ClosureType
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Eq BigNat
Instance details

Defined in GHC.Integer.Type

Eq Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Eq TextDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Style
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Mode
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq UnicodeException
Instance details

Defined in Data.Text.Encoding.Error

Eq StdGen
Instance details

Defined in System.Random.Internal

Eq ModName
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PkgName
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Module
Instance details

Defined in Language.Haskell.TH.Syntax

Eq OccName
Instance details

Defined in Language.Haskell.TH.Syntax

Eq NameFlavour
Instance details

Defined in Language.Haskell.TH.Syntax

Eq NameSpace
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Loc
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Info
Instance details

Defined in Language.Haskell.TH.Syntax

Eq ModuleInfo
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Fixity
Instance details

Defined in Language.Haskell.TH.Syntax

Eq FixityDirection
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Lit
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Bytes
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Body
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Guard
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Stmt
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Range
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DerivClause
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DerivStrategy
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TypeFamilyHead
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TySynEqn
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Foreign
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Callconv
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Safety
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Pragma
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Inline
Instance details

Defined in Language.Haskell.TH.Syntax

Eq RuleMatch
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Phases
Instance details

Defined in Language.Haskell.TH.Syntax

Eq RuleBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Eq AnnTarget
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceUnpackedness
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DecidedStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Con
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Bang
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PatSynDir
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PatSynArgs
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TyVarBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Eq FamilyResultSig
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TyLit
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Role
Instance details

Defined in Language.Haskell.TH.Syntax

Eq AnnLookup
Instance details

Defined in Language.Haskell.TH.Syntax

Eq ShortText
Instance details

Defined in Data.Text.Short.Internal

Eq LocalTime
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Eq TimeOfDay
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Eq TimeZone
Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

Eq UniversalTime
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Eq Day
Instance details

Defined in Data.Time.Calendar.Days

Eq UnpackedUUID
Instance details

Defined in Data.UUID.Types.Internal

Methods

(==) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

(/=) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

Eq UUID
Instance details

Defined in Data.UUID.Types.Internal

Eq CodePoint
Instance details

Defined in Data.Text.Encoding

Methods

(==) :: CodePoint -> CodePoint -> Bool Source #

(/=) :: CodePoint -> CodePoint -> Bool Source #

Eq DecoderState
Instance details

Defined in Data.Text.Encoding

Methods

(==) :: DecoderState -> DecoderState -> Bool Source #

(/=) :: DecoderState -> DecoderState -> Bool Source #

Eq B
Instance details

Defined in Data.Text.Short.Internal

Eq CountFailure Source #
Instance details

Defined in Cardano.Prelude.GHC.Heap.Size

Eq SchemaError Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

Eq a => Eq [a]
Instance details

Defined in GHC.Classes

Methods

(==) :: [a] -> [a] -> Bool Source #

(/=) :: [a] -> [a] -> Bool Source #

Eq a => Eq ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Eq a => Eq ( Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Real

Eq ( StablePtr a)

Since: base-2.1

Instance details

Defined in GHC.Stable

Eq ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Eq ( FunPtr a)
Instance details

Defined in GHC.Ptr

Eq p => Eq ( Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Eq a => Eq ( Solo a)
Instance details

Defined in Data.Tuple.Solo

Eq a => Eq ( IResult a)
Instance details

Defined in Data.Aeson.Types.Internal

Eq a => Eq ( Result a)
Instance details

Defined in Data.Aeson.Types.Internal

Eq v => Eq ( KeyMap v)
Instance details

Defined in Data.Aeson.KeyMap

Eq ( Async a)
Instance details

Defined in Control.Concurrent.Async

Eq a => Eq ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Eq a => Eq ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq m => Eq ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq ( Chan a)

Since: base-4.4.0.0

Instance details

Defined in Control.Concurrent.Chan

Eq a => Eq ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Eq a => Eq ( Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Eq ( TVar a)

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Eq a => Eq ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Eq a => Eq ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Eq a => Eq ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq ( Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Eq ( MVar a)

Since: base-4.1.0.0

Instance details

Defined in GHC.MVar

Eq a => Eq ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Eq a => Eq ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Eq a => Eq ( Tree a)
Instance details

Defined in Data.Tree

Eq a => Eq ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Eq a => Eq ( ViewL a)
Instance details

Defined in Data.Sequence.Internal

Eq a => Eq ( ViewR a)
Instance details

Defined in Data.Sequence.Internal

Eq a => Eq ( Set a)
Instance details

Defined in Data.Set.Internal

Eq1 f => Eq ( Fix f)
Instance details

Defined in Data.Fix

( Functor f, Eq1 f) => Eq ( Mu f)
Instance details

Defined in Data.Fix

( Functor f, Eq1 f) => Eq ( Nu f)
Instance details

Defined in Data.Fix

Eq a => Eq ( DNonEmpty a)
Instance details

Defined in Data.DList.DNonEmpty.Internal

Eq a => Eq ( DList a)
Instance details

Defined in Data.DList.Internal

Eq a => Eq ( Hex a)
Instance details

Defined in Data.Text.Format.Types

Eq a => Eq ( Shown a)
Instance details

Defined in Data.Text.Format.Types

Eq a => Eq ( Hashed a)

Uses precomputed hash to detect inequality faster

Instance details

Defined in Data.Hashable.Class

Eq ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq a => Eq ( AnnotDetails a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq a => Eq ( Span a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

( Eq a, Prim a) => Eq ( PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Eq ( MutableByteArray s)
Instance details

Defined in Data.Primitive.ByteArray

Eq a => Eq ( SmallArray a)
Instance details

Defined in Data.Primitive.SmallArray

Eq a => Eq ( Array a)
Instance details

Defined in Data.Primitive.Array

Eq g => Eq ( AtomicGen g)
Instance details

Defined in System.Random.Stateful

Eq g => Eq ( IOGen g)
Instance details

Defined in System.Random.Stateful

Eq g => Eq ( STGen g)
Instance details

Defined in System.Random.Stateful

Eq g => Eq ( TGen g)
Instance details

Defined in System.Random.Stateful

Eq g => Eq ( StateGen g)
Instance details

Defined in System.Random.Internal

Eq a => Eq ( Maybe a)
Instance details

Defined in Data.Strict.Maybe

Eq a => Eq ( HashSet a)

Note that, in the presence of hash collisions, equal HashSet s may behave differently, i.e. substitutivity may be violated:

>>> data D = A | B deriving (Eq, Show)
>>> instance Hashable D where hashWithSalt salt _d = salt
>>> x = fromList [A, B]
>>> y = fromList [B, A]
>>> x == y
True
>>> toList x
[A,B]
>>> toList y
[B,A]

In general, the lack of substitutivity can be observed with any function that depends on the key ordering, such as folds and traversals.

Instance details

Defined in Data.HashSet.Internal

( Storable a, Eq a) => Eq ( Vector a)
Instance details

Defined in Data.Vector.Storable

( Prim a, Eq a) => Eq ( Vector a)
Instance details

Defined in Data.Vector.Primitive

Eq a => Eq ( Vector a)
Instance details

Defined in Data.Vector

( Eq a, Eq b) => Eq ( Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Eq ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( TypeRep a)

Since: base-2.1

Instance details

Defined in Data.Typeable.Internal

( Eq a, Eq b) => Eq (a, b)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b) -> (a, b) -> Bool Source #

(/=) :: (a, b) -> (a, b) -> Bool Source #

( Eq k, Eq a) => Eq ( Map k a)
Instance details

Defined in Data.Map.Internal

( Eq k, Eq v) => Eq ( HashMap k v)

Note that, in the presence of hash collisions, equal HashMap s may behave differently, i.e. substitutivity may be violated:

>>> data D = A | B deriving (Eq, Show)
>>> instance Hashable D where hashWithSalt salt _d = salt
>>> x = fromList [(A,1), (B,2)]
>>> y = fromList [(B,2), (A,1)]
>>> x == y
True
>>> toList x
[(A,1),(B,2)]
>>> toList y
[(B,2),(A,1)]

In general, the lack of substitutivity can be observed with any function that depends on the key ordering, such as folds and traversals.

Instance details

Defined in Data.HashMap.Internal

( Ix ix, Eq e, IArray UArray e) => Eq ( UArray ix e)
Instance details

Defined in Data.Array.Base

( Ix i, Eq e) => Eq ( Array i e)

Since: base-2.1

Instance details

Defined in GHC.Arr

Eq ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Eq a => Eq ( Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

( Eq1 m, Eq a) => Eq ( ListT m a)
Instance details

Defined in Control.Monad.Trans.List

Eq ( MutablePrimArray s a)
Instance details

Defined in Data.Primitive.PrimArray

Eq ( SmallMutableArray s a)
Instance details

Defined in Data.Primitive.SmallArray

Eq ( MutableArray s a)
Instance details

Defined in Data.Primitive.Array

( Eq a, Eq b) => Eq ( These a b)
Instance details

Defined in Data.These

( Eq a, Eq b) => Eq ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

( Eq a, Eq b) => Eq ( These a b)
Instance details

Defined in Data.Strict.These

( Eq a, Eq b) => Eq ( Either a b)
Instance details

Defined in Data.Strict.Either

( Eq1 m, Eq a) => Eq ( MaybeT m a)
Instance details

Defined in Control.Monad.Trans.Maybe

( Eq k, Eq v) => Eq ( Leaf k v)
Instance details

Defined in Data.HashMap.Internal

Eq (f p) => Eq ( Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Eq ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Float p)
Instance details

Defined in GHC.Generics

Eq ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

( Eq a, Eq b, Eq c) => Eq (a, b, c)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c) -> (a, b, c) -> Bool Source #

(/=) :: (a, b, c) -> (a, b, c) -> Bool Source #

Eq ( STUArray s i e)
Instance details

Defined in Data.Array.Base

Eq ( STArray s i e)

Since: base-2.1

Instance details

Defined in GHC.Arr

Eq a => Eq ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Eq (f a) => Eq ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Eq (f a) => Eq ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Eq ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Eq (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

( Eq1 f, Eq a) => Eq ( IdentityT f a)
Instance details

Defined in Control.Monad.Trans.Identity

( Eq e, Eq1 m, Eq a) => Eq ( ErrorT e m a)
Instance details

Defined in Control.Monad.Trans.Error

( Eq e, Eq1 m, Eq a) => Eq ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

( Eq w, Eq1 m, Eq a) => Eq ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Eq w, Eq1 m, Eq a) => Eq ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Eq b => Eq ( Tagged s b)
Instance details

Defined in Data.Tagged

( Eq1 f, Eq1 g, Eq a) => Eq ( These1 f g a)
Instance details

Defined in Data.Functor.These

Eq c => Eq ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Eq (f p), Eq (g p)) => Eq ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

(/=) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

( Eq (f p), Eq (g p)) => Eq ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

(/=) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

( Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #

(/=) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #

( Eq1 f, Eq1 g, Eq a) => Eq ( Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Eq1 f, Eq1 g, Eq a) => Eq ( Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Eq (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Eq (f p) => Eq ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: M1 i c f p -> M1 i c f p -> Bool Source #

(/=) :: M1 i c f p -> M1 i c f p -> Bool Source #

Eq (f (g p)) => Eq ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

(/=) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

( Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #

(/=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #

( Eq1 f, Eq1 g, Eq a) => Eq ( Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Eq (p b a) => Eq ( Flip p a b)
Instance details

Defined in Data.Bifunctor.Flip

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #

(/=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #

( Eq (p a b), Eq (q a b)) => Eq ( Sum p q a b)
Instance details

Defined in Data.Bifunctor.Sum

Methods

(==) :: Sum p q a b -> Sum p q a b -> Bool Source #

(/=) :: Sum p q a b -> Sum p q a b -> Bool Source #

( Eq (f a b), Eq (g a b)) => Eq ( Product f g a b)
Instance details

Defined in Data.Bifunctor.Product

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #

(/=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #

Eq (f (p a b)) => Eq ( Tannen f p a b)
Instance details

Defined in Data.Bifunctor.Tannen

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #

(/=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #

(/=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #

Eq (p (f a) (g b)) => Eq ( Biff p f g a b)
Instance details

Defined in Data.Bifunctor.Biff

Methods

(==) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

(/=) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #

(/=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source #

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source #

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source #

( Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source #

(/=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source #

class Fractional a => Floating a where Source #

Trigonometric and hyperbolic functions and related functions.

The Haskell Report defines no laws for Floating . However, ( + ) , ( * ) and exp are customarily expected to define an exponential field and have the following properties:

  • exp (a + b) = exp a * exp b
  • exp (fromInteger 0) = fromInteger 1

Methods

pi :: a Source #

exp :: a -> a Source #

log :: a -> a Source #

sqrt :: a -> a Source #

(**) :: a -> a -> a infixr 8 Source #

logBase :: a -> a -> a Source #

sin :: a -> a Source #

cos :: a -> a Source #

tan :: a -> a Source #

asin :: a -> a Source #

acos :: a -> a Source #

atan :: a -> a Source #

sinh :: a -> a Source #

cosh :: a -> a Source #

tanh :: a -> a Source #

asinh :: a -> a Source #

acosh :: a -> a Source #

atanh :: a -> a Source #

log1p :: a -> a Source #

log1p x computes log (1 + x) , but provides more precise results for small (absolute) values of x if possible.

Since: base-4.9.0.0

expm1 :: a -> a Source #

expm1 x computes exp x - 1 , but provides more precise results for small (absolute) values of x if possible.

Since: base-4.9.0.0

log1pexp :: a -> a Source #

log1pexp x computes log (1 + exp x) , but provides more precise results if possible.

Examples:

Since: base-4.9.0.0

log1mexp :: a -> a Source #

log1mexp x computes log (1 - exp x) , but provides more precise results if possible.

Examples:

Since: base-4.9.0.0

Instances

Instances details
Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

Floating CFloat
Instance details

Defined in Foreign.C.Types

Floating CDouble
Instance details

Defined in Foreign.C.Types

RealFloat a => Floating ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Floating a => Floating ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Floating a => Floating ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Floating a => Floating ( Shown a)
Instance details

Defined in Data.Text.Format.Types

Floating a => Floating ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Floating a => Floating ( Tagged s a)
Instance details

Defined in Data.Tagged

class Num a => Fractional a where Source #

Fractional numbers, supporting real division.

The Haskell Report defines no laws for Fractional . However, ( + ) and ( * ) are customarily expected to define a division ring and have the following properties:

recip gives the multiplicative inverse
x * recip x = recip x * x = fromInteger 1

Note that it isn't customarily expected that a type instance of Fractional implement a field. However, all instances in base do.

Minimal complete definition

fromRational , ( recip | (/) )

Methods

(/) :: a -> a -> a infixl 7 Source #

Fractional division.

recip :: a -> a Source #

Reciprocal fraction.

fromRational :: Rational -> a Source #

Conversion from a Rational (that is Ratio Integer ). A floating literal stands for an application of fromRational to a value of type Rational , so such literals have type ( Fractional a) => a .

Instances

Instances details
Fractional Scientific

WARNING: recip and / will throw an error when their outputs are repeating decimals .

These methods also compute Integer magnitudes ( 10^e ). If these methods are applied to arguments which have huge exponents this could fill up all space and crash your program! So don't apply these methods to scientific numbers coming from untrusted sources.

fromRational will throw an error when the input Rational is a repeating decimal. Consider using fromRationalRepetend for these rationals which will detect the repetition and indicate where it starts.

Instance details

Defined in Data.Scientific

Fractional CFloat
Instance details

Defined in Foreign.C.Types

Fractional CDouble
Instance details

Defined in Foreign.C.Types

Fractional DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Fractional NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Integral a => Fractional ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

RealFloat a => Fractional ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Fractional a => Fractional ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Fractional a => Fractional ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Fractional a => Fractional ( Shown a)
Instance details

Defined in Data.Text.Format.Types

HasResolution a => Fractional ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Fractional a => Fractional ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Fractional a => Fractional ( Tagged s a)
Instance details

Defined in Data.Tagged

class ( Real a, Enum a) => Integral a where Source #

Integral numbers, supporting integer division.

The Haskell Report defines no laws for Integral . However, Integral instances are customarily expected to define a Euclidean domain and have the following properties for the div / mod and quot / rem pairs, given suitable Euclidean functions f and g :

  • x = y * quot x y + rem x y with rem x y = fromInteger 0 or g (rem x y) < g y
  • x = y * div x y + mod x y with mod x y = fromInteger 0 or f (mod x y) < f y

An example of a suitable Euclidean function, for Integer 's instance, is abs .

Minimal complete definition

quotRem , toInteger

Methods

quot :: a -> a -> a infixl 7 Source #

integer division truncated toward zero

rem :: a -> a -> a infixl 7 Source #

integer remainder, satisfying

(x `quot` y)*y + (x `rem` y) == x

div :: a -> a -> a infixl 7 Source #

integer division truncated toward negative infinity

mod :: a -> a -> a infixl 7 Source #

integer modulus, satisfying

(x `div` y)*y + (x `mod` y) == x

quotRem :: a -> a -> (a, a) Source #

simultaneous quot and rem

divMod :: a -> a -> (a, a) Source #

simultaneous div and mod

toInteger :: a -> Integer Source #

conversion to Integer

Instances

Instances details
Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Integral CDev
Instance details

Defined in System.Posix.Types

Integral CIno
Instance details

Defined in System.Posix.Types

Integral CMode
Instance details

Defined in System.Posix.Types

Integral COff
Instance details

Defined in System.Posix.Types

Integral CPid
Instance details

Defined in System.Posix.Types

Integral CSsize
Instance details

Defined in System.Posix.Types

Integral CGid
Instance details

Defined in System.Posix.Types

Integral CNlink
Instance details

Defined in System.Posix.Types

Integral CUid
Instance details

Defined in System.Posix.Types

Integral CTcflag
Instance details

Defined in System.Posix.Types

Integral CRLim
Instance details

Defined in System.Posix.Types

Integral CBlkSize
Instance details

Defined in System.Posix.Types

Integral CBlkCnt
Instance details

Defined in System.Posix.Types

Integral CClockId
Instance details

Defined in System.Posix.Types

Integral CFsBlkCnt
Instance details

Defined in System.Posix.Types

Integral CFsFilCnt
Instance details

Defined in System.Posix.Types

Integral CId
Instance details

Defined in System.Posix.Types

Integral CKey
Instance details

Defined in System.Posix.Types

Integral CSocklen
Instance details

Defined in System.Posix.Types

Integral CNfds
Instance details

Defined in System.Posix.Types

Integral Fd
Instance details

Defined in System.Posix.Types

Integral CChar
Instance details

Defined in Foreign.C.Types

Integral CSChar
Instance details

Defined in Foreign.C.Types

Integral CUChar
Instance details

Defined in Foreign.C.Types

Integral CShort
Instance details

Defined in Foreign.C.Types

Integral CUShort
Instance details

Defined in Foreign.C.Types

Integral CInt
Instance details

Defined in Foreign.C.Types

Integral CUInt
Instance details

Defined in Foreign.C.Types

Integral CLong
Instance details

Defined in Foreign.C.Types

Integral CULong
Instance details

Defined in Foreign.C.Types

Integral CLLong
Instance details

Defined in Foreign.C.Types

Integral CULLong
Instance details

Defined in Foreign.C.Types

Integral CBool
Instance details

Defined in Foreign.C.Types

Integral CPtrdiff
Instance details

Defined in Foreign.C.Types

Integral CSize
Instance details

Defined in Foreign.C.Types

Integral CWchar
Instance details

Defined in Foreign.C.Types

Integral CSigAtomic
Instance details

Defined in Foreign.C.Types

Integral CIntPtr
Instance details

Defined in Foreign.C.Types

Integral CUIntPtr
Instance details

Defined in Foreign.C.Types

Integral CIntMax
Instance details

Defined in Foreign.C.Types

Integral CUIntMax
Instance details

Defined in Foreign.C.Types

Integral WordPtr
Instance details

Defined in Foreign.Ptr

Integral IntPtr
Instance details

Defined in Foreign.Ptr

Integral Int54
Instance details

Defined in Text.JSON.Canonical.Types

Integral a => Integral ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Integral a => Integral ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Integral a => Integral ( Hex a)
Instance details

Defined in Data.Text.Format.Types

Integral a => Integral ( Shown a)
Instance details

Defined in Data.Text.Format.Types

Integral a => Integral ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Integral a => Integral ( Tagged s a)
Instance details

Defined in Data.Tagged

class Applicative m => Monad (m :: Type -> Type ) where Source #

The Monad class defines the basic operations over a monad , a concept from a branch of mathematics known as category theory . From the perspective of a Haskell programmer, however, it is best to think of a monad as an abstract datatype of actions. Haskell's do expressions provide a convenient syntax for writing monadic expressions.

Instances of Monad should satisfy the following:

Left identity
return a >>= k = k a
Right identity
m >>= return = m
Associativity
m >>= (\x -> k x >>= h) = (m >>= k) >>= h

Furthermore, the Monad and Applicative operations should relate as follows:

The above laws imply:

and that pure and ( <*> ) satisfy the applicative functor laws.

The instances of Monad for lists, Maybe and IO defined in the Prelude satisfy these laws.

Minimal complete definition

(>>=)

Methods

(>>=) :: m a -> (a -> m b) -> m b infixl 1 Source #

Sequentially compose two actions, passing any value produced by the first as an argument to the second.

' as >>= bs ' can be understood as the do expression

do a <- as
   bs a

(>>) :: m a -> m b -> m b infixl 1 Source #

Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.

' as >> bs ' can be understood as the do expression

do as
   bs

return :: a -> m a Source #

Inject a value into the monadic type.

Instances

Instances details
Monad []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: [a] -> (a -> [b]) -> [b] Source #

(>>) :: [a] -> [b] -> [b] Source #

return :: a -> [a] Source #

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Monad Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Monad Q
Instance details

Defined in Language.Haskell.TH.Syntax

Monad Solo
Instance details

Defined in Data.Tuple.Solo

Monad IResult
Instance details

Defined in Data.Aeson.Types.Internal

Monad Result
Instance details

Defined in Data.Aeson.Types.Internal

Monad Parser
Instance details

Defined in Data.Aeson.Types.Internal

Monad Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Monad Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Monad STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Monad ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Monad Tree
Instance details

Defined in Data.Tree

Monad Seq
Instance details

Defined in Data.Sequence.Internal

Monad DNonEmpty
Instance details

Defined in Data.DList.DNonEmpty.Internal

Monad DList
Instance details

Defined in Data.DList.Internal

Monad SmallArray
Instance details

Defined in Data.Primitive.SmallArray

Monad Array
Instance details

Defined in Data.Primitive.Array

Monad Vector
Instance details

Defined in Data.Vector

Monad P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

(>>=) :: P a -> (a -> P b) -> P b Source #

(>>) :: P a -> P b -> P b Source #

return :: a -> P a Source #

Monad ( Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Monad ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Monoid a => Monad ( (,) a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: (a, a0) -> (a0 -> (a, b)) -> (a, b) Source #

(>>) :: (a, a0) -> (a, b) -> (a, b) Source #

return :: a0 -> (a, a0) Source #

Monad ( ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Monad ( Parser i)
Instance details

Defined in Data.Attoparsec.Internal.Types

Monad m => Monad ( WrappedMonad m)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

ArrowApply a => Monad ( ArrowMonad a)

Since: base-2.1

Instance details

Defined in Control.Arrow

Monad ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Monad ( Decoder s)

Since: cborg-0.2.0.0

Instance details

Defined in Codec.CBOR.Decoding

Monad m => Monad ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

Semigroup a => Monad ( These a)
Instance details

Defined in Data.These

Semigroup a => Monad ( These a)
Instance details

Defined in Data.Strict.These

Monad m => Monad ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

Monad f => Monad ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

( Monoid a, Monoid b) => Monad ( (,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: (a, b, a0) -> (a0 -> (a, b, b0)) -> (a, b, b0) Source #

(>>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) Source #

return :: a0 -> (a, b, a0) Source #

Monad m => Monad ( Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Monad f => Monad ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Monad f => Monad ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Monad m => Monad ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

( Applicative f, Monad f) => Monad ( WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

( Monad m, Error e) => Monad ( ErrorT e m)
Instance details

Defined in Control.Monad.Trans.Error

Monad m => Monad ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Monad m => Monad ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Monad m => Monad ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

Monad m => Monad ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Strict

( Monoid w, Monad m) => Monad ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Monoid w, Monad m) => Monad ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Monad ( Tagged s)
Instance details

Defined in Data.Tagged

Monad ((->) r :: Type -> Type )

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: (r -> a) -> (a -> r -> b) -> r -> b Source #

(>>) :: (r -> a) -> (r -> b) -> r -> b Source #

return :: a -> r -> a Source #

( Monad f, Monad g) => Monad (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: (f :*: g) a -> (a -> (f :*: g) b) -> (f :*: g) b Source #

(>>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b Source #

return :: a -> (f :*: g) a Source #

( Monoid a, Monoid b, Monoid c) => Monad ( (,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: (a, b, c, a0) -> (a0 -> (a, b, c, b0)) -> (a, b, c, b0) Source #

(>>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) Source #

return :: a0 -> (a, b, c, a0) Source #

( Monad f, Monad g) => Monad ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Monad f, Applicative f) => Monad ( WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

( Applicative f, Monad f) => Monad ( WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Monad f => Monad ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: M1 i c f a -> (a -> M1 i c f b) -> M1 i c f b Source #

(>>) :: M1 i c f a -> M1 i c f b -> M1 i c f b Source #

return :: a -> M1 i c f a Source #

( Monad f, Applicative f) => Monad ( WhenMatched f k x y)

Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

( Monoid w, Monad m) => Monad ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b Source #

(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

return :: a -> RWST r w s m a Source #

( Monoid w, Monad m) => Monad ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b Source #

(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

return :: a -> RWST r w s m a Source #

class Functor (f :: Type -> Type ) where Source #

A type f is a Functor if it provides a function fmap which, given any types a and b lets you apply any function from (a -> b) to turn an f a into an f b , preserving the structure of f . Furthermore f needs to adhere to the following:

Identity
fmap id == id
Composition
fmap (f . g) == fmap f . fmap g

Note, that the second law follows from the free theorem of the type fmap and the first law, so you need only check that the former condition holds.

Minimal complete definition

fmap

Methods

fmap :: (a -> b) -> f a -> f b Source #

Using ApplicativeDo : ' fmap f as ' can be understood as the do expression

do a <- as
   pure (f a)

with an inferred Functor constraint.

(<$) :: a -> f b -> f a infixl 4 Source #

Replace all locations in the input with the same value. The default definition is fmap . const , but this may be overridden with a more efficient version.

Using ApplicativeDo : ' a <$ bs ' can be understood as the do expression

do bs
   pure a

with an inferred Functor constraint.

Instances

Instances details
Functor []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> [a] -> [b] Source #

(<$) :: a -> [b] -> [a] Source #

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> IO a -> IO b Source #

(<$) :: a -> IO b -> IO a Source #

Functor Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor Q
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fmap :: (a -> b) -> Q a -> Q b Source #

(<$) :: a -> Q b -> Q a Source #

Functor Solo
Instance details

Defined in Data.Tuple.Solo

Functor IResult
Instance details

Defined in Data.Aeson.Types.Internal

Functor Result
Instance details

Defined in Data.Aeson.Types.Internal

Functor Parser
Instance details

Defined in Data.Aeson.Types.Internal

Functor KeyMap
Instance details

Defined in Data.Aeson.KeyMap

Functor Async
Instance details

Defined in Control.Concurrent.Async

Functor Concurrently
Instance details

Defined in Control.Concurrent.Async

Functor Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Functor Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Min a -> Min b Source #

(<$) :: a -> Min b -> Min a Source #

Functor Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Max a -> Max b Source #

(<$) :: a -> Max b -> Max a Source #

Functor First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Functor Handler

Since: base-4.6.0.0

Instance details

Defined in Control.Exception

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

fmap :: (a -> b) -> STM a -> STM b Source #

(<$) :: a -> STM b -> STM a Source #

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Sum a -> Sum b Source #

(<$) :: a -> Sum b -> Sum a Source #

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Functor ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Functor IntMap
Instance details

Defined in Data.IntMap.Internal

Functor Tree
Instance details

Defined in Data.Tree

Functor Seq
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b Source #

(<$) :: a -> Seq b -> Seq a Source #

Functor FingerTree
Instance details

Defined in Data.Sequence.Internal

Functor Digit
Instance details

Defined in Data.Sequence.Internal

Functor Node
Instance details

Defined in Data.Sequence.Internal

Functor Elem
Instance details

Defined in Data.Sequence.Internal

Functor ViewL
Instance details

Defined in Data.Sequence.Internal

Functor ViewR
Instance details

Defined in Data.Sequence.Internal

Functor DNonEmpty
Instance details

Defined in Data.DList.DNonEmpty.Internal

Functor DList
Instance details

Defined in Data.DList.Internal

Functor GenClosure
Instance details

Defined in GHC.Exts.Heap.Closures

Functor Doc
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> Doc a -> Doc b Source #

(<$) :: a -> Doc b -> Doc a Source #

Functor AnnotDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Functor Span
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Functor SmallArray
Instance details

Defined in Data.Primitive.SmallArray

Functor Array
Instance details

Defined in Data.Primitive.Array

Functor Maybe
Instance details

Defined in Data.Strict.Maybe

Functor Vector
Instance details

Defined in Data.Vector

Functor P

Since: base-4.8.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> P a -> P b Source #

(<$) :: a -> P b -> P a Source #

Functor ( Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b Source #

(<$) :: a0 -> Either a b -> Either a a0 Source #

Functor ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> V1 a -> V1 b Source #

(<$) :: a -> V1 b -> V1 a Source #

Functor ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> U1 a -> U1 b Source #

(<$) :: a -> U1 b -> U1 a Source #

Functor ( (,) a)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b) -> (a, a0) -> (a, b) Source #

(<$) :: a0 -> (a, b) -> (a, a0) Source #

Functor ( Map k)
Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> Map k a -> Map k b Source #

(<$) :: a -> Map k b -> Map k a Source #

Functor ( HashMap k)
Instance details

Defined in Data.HashMap.Internal

Functor ( ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

fmap :: (a -> b) -> ST s a -> ST s b Source #

(<$) :: a -> ST s b -> ST s a Source #

Functor ( Array i)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

fmap :: (a -> b) -> Array i a -> Array i b Source #

(<$) :: a -> Array i b -> Array i a Source #

Functor ( IResult i)
Instance details

Defined in Data.Attoparsec.Internal.Types

Functor ( Parser i)
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

fmap :: (a -> b) -> Parser i a -> Parser i b Source #

(<$) :: a -> Parser i b -> Parser i a Source #

Functor ( Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a0 -> b) -> Arg a a0 -> Arg a b Source #

(<$) :: a0 -> Arg a b -> Arg a a0 Source #

Monad m => Functor ( WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Arrow a => Functor ( ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Functor ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Functor ( Decoder s)

Since: cborg-0.2.0.0

Instance details

Defined in Codec.CBOR.Decoding

Functor ( Format r)

Not particularly useful, but could be.

Instance details

Defined in Formatting.Internal

Methods

fmap :: (a -> b) -> Format r a -> Format r b Source #

(<$) :: a -> Format r b -> Format r a Source #

Functor m => Functor ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

Methods

fmap :: (a -> b) -> ListT m a -> ListT m b Source #

(<$) :: a -> ListT m b -> ListT m a Source #

Functor ( These a)
Instance details

Defined in Data.These

Methods

fmap :: (a0 -> b) -> These a a0 -> These a b Source #

(<$) :: a0 -> These a b -> These a a0 Source #

Functor ( Pair e)
Instance details

Defined in Data.Strict.Tuple

Methods

fmap :: (a -> b) -> Pair e a -> Pair e b Source #

(<$) :: a -> Pair e b -> Pair e a Source #

Functor ( These a)
Instance details

Defined in Data.Strict.These

Methods

fmap :: (a0 -> b) -> These a a0 -> These a b Source #

(<$) :: a0 -> These a b -> These a a0 Source #

Functor ( Either a)
Instance details

Defined in Data.Strict.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b Source #

(<$) :: a0 -> Either a b -> Either a a0 Source #

Functor m => Functor ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fmap :: (a -> b) -> MaybeT m a -> MaybeT m b Source #

(<$) :: a -> MaybeT m b -> MaybeT m a Source #

Functor f => Functor ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Rec1 f a -> Rec1 f b Source #

(<$) :: a -> Rec1 f b -> Rec1 f a Source #

Functor ( URec Char :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Double :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Float :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Int :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Word :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec ( Ptr ()) :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec ( Ptr ()) a -> URec ( Ptr ()) b Source #

(<$) :: a -> URec ( Ptr ()) b -> URec ( Ptr ()) a Source #

Functor ( (,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, a0) -> (a, b, b0) Source #

(<$) :: a0 -> (a, b, b0) -> (a, b, a0) Source #

Arrow a => Functor ( WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Functor m => Functor ( Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b Source #

(<$) :: a0 -> Kleisli m a b -> Kleisli m a a0 Source #

Functor ( Const m :: Type -> Type )

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

fmap :: (a -> b) -> Const m a -> Const m b Source #

(<$) :: a -> Const m b -> Const m a Source #

Functor f => Functor ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Ap f a -> Ap f b Source #

(<$) :: a -> Ap f b -> Ap f a Source #

Functor f => Functor ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Alt f a -> Alt f b Source #

(<$) :: a -> Alt f b -> Alt f a Source #

Functor m => Functor ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

( Applicative f, Monad f) => Functor ( WhenMissing f x)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Functor m => Functor ( ErrorT e m)
Instance details

Defined in Control.Monad.Trans.Error

Methods

fmap :: (a -> b) -> ErrorT e m a -> ErrorT e m b Source #

(<$) :: a -> ErrorT e m b -> ErrorT e m a Source #

Functor m => Functor ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Methods

fmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b Source #

(<$) :: a -> ExceptT e m b -> ExceptT e m a Source #

Functor m => Functor ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b Source #

(<$) :: a -> ReaderT r m b -> ReaderT r m a Source #

Functor m => Functor ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

fmap :: (a -> b) -> StateT s m a -> StateT s m b Source #

(<$) :: a -> StateT s m b -> StateT s m a Source #

Functor m => Functor ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

fmap :: (a -> b) -> StateT s m a -> StateT s m b Source #

(<$) :: a -> StateT s m b -> StateT s m a Source #

Functor m => Functor ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b Source #

(<$) :: a -> WriterT w m b -> WriterT w m a Source #

Functor m => Functor ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b Source #

(<$) :: a -> WriterT w m b -> WriterT w m a Source #

Functor ( Tagged s)
Instance details

Defined in Data.Tagged

Methods

fmap :: (a -> b) -> Tagged s a -> Tagged s b Source #

(<$) :: a -> Tagged s b -> Tagged s a Source #

( Functor f, Functor g) => Functor ( These1 f g)
Instance details

Defined in Data.Functor.These

Methods

fmap :: (a -> b) -> These1 f g a -> These1 f g b Source #

(<$) :: a -> These1 f g b -> These1 f g a Source #

Functor ((->) r :: Type -> Type )

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> (r -> a) -> r -> b Source #

(<$) :: a -> (r -> b) -> r -> a Source #

Functor ( K1 i c :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> K1 i c a -> K1 i c b Source #

(<$) :: a -> K1 i c b -> K1 i c a Source #

( Functor f, Functor g) => Functor (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :+: g) a -> (f :+: g) b Source #

(<$) :: a -> (f :+: g) b -> (f :+: g) a Source #

( Functor f, Functor g) => Functor (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :*: g) a -> (f :*: g) b Source #

(<$) :: a -> (f :*: g) b -> (f :*: g) a Source #

Functor ( (,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) Source #

(<$) :: a0 -> (a, b, c, b0) -> (a, b, c, a0) Source #

( Functor f, Functor g) => Functor ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

fmap :: (a -> b) -> Product f g a -> Product f g b Source #

(<$) :: a -> Product f g b -> Product f g a Source #

( Functor f, Functor g) => Functor ( Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

fmap :: (a -> b) -> Sum f g a -> Sum f g b Source #

(<$) :: a -> Sum f g b -> Sum f g a Source #

Functor f => Functor ( WhenMatched f x y)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b Source #

(<$) :: a -> WhenMatched f x y b -> WhenMatched f x y a Source #

( Applicative f, Monad f) => Functor ( WhenMissing f k x)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b Source #

(<$) :: a -> WhenMissing f k x b -> WhenMissing f k x a Source #

Functor f => Functor ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> M1 i c f a -> M1 i c f b Source #

(<$) :: a -> M1 i c f b -> M1 i c f a Source #

( Functor f, Functor g) => Functor (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :.: g) a -> (f :.: g) b Source #

(<$) :: a -> (f :.: g) b -> (f :.: g) a Source #

( Functor f, Functor g) => Functor ( Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fmap :: (a -> b) -> Compose f g a -> Compose f g b Source #

(<$) :: a -> Compose f g b -> Compose f g a Source #

Bifunctor p => Functor ( Flip p a)
Instance details

Defined in Data.Bifunctor.Flip

Methods

fmap :: (a0 -> b) -> Flip p a a0 -> Flip p a b Source #

(<$) :: a0 -> Flip p a b -> Flip p a a0 Source #

Functor f => Functor ( WhenMatched f k x y)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b Source #

(<$) :: a -> WhenMatched f k x y b -> WhenMatched f k x y a Source #

Functor m => Functor ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

fmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

(<$) :: a -> RWST r w s m b -> RWST r w s m a Source #

Functor m => Functor ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

fmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

(<$) :: a -> RWST r w s m b -> RWST r w s m a Source #

( Functor (f a), Functor (g a)) => Functor ( Sum f g a)
Instance details

Defined in Data.Bifunctor.Sum

Methods

fmap :: (a0 -> b) -> Sum f g a a0 -> Sum f g a b Source #

(<$) :: a0 -> Sum f g a b -> Sum f g a a0 Source #

( Functor (f a), Functor (g a)) => Functor ( Product f g a)
Instance details

Defined in Data.Bifunctor.Product

Methods

fmap :: (a0 -> b) -> Product f g a a0 -> Product f g a b Source #

(<$) :: a0 -> Product f g a b -> Product f g a a0 Source #

( Functor f, Bifunctor p) => Functor ( Tannen f p a)
Instance details

Defined in Data.Bifunctor.Tannen

Methods

fmap :: (a0 -> b) -> Tannen f p a a0 -> Tannen f p a b Source #

(<$) :: a0 -> Tannen f p a b -> Tannen f p a a0 Source #

( Bifunctor p, Functor g) => Functor ( Biff p f g a)
Instance details

Defined in Data.Bifunctor.Biff

Methods

fmap :: (a0 -> b) -> Biff p f g a a0 -> Biff p f g a b Source #

(<$) :: a0 -> Biff p f g a b -> Biff p f g a a0 Source #

class Num a where Source #

Basic numeric class.

The Haskell Report defines no laws for Num . However, ( + ) and ( * ) are customarily expected to define a ring and have the following properties:

Associativity of ( + )
(x + y) + z = x + (y + z)
Commutativity of ( + )
x + y = y + x
fromInteger 0 is the additive identity
x + fromInteger 0 = x
negate gives the additive inverse
x + negate x = fromInteger 0
Associativity of ( * )
(x * y) * z = x * (y * z)
fromInteger 1 is the multiplicative identity
x * fromInteger 1 = x and fromInteger 1 * x = x
Distributivity of ( * ) with respect to ( + )
a * (b + c) = (a * b) + (a * c) and (b + c) * a = (b * a) + (c * a)

Note that it isn't customarily expected that a type instance of both Num and Ord implement an ordered ring. Indeed, in base only Integer and Rational do.

Minimal complete definition

(+) , (*) , abs , signum , fromInteger , ( negate | (-) )

Methods

(+) :: a -> a -> a infixl 6 Source #

(-) :: a -> a -> a infixl 6 Source #

(*) :: a -> a -> a infixl 7 Source #

negate :: a -> a Source #

Unary negation.

abs :: a -> a Source #

Absolute value.

signum :: a -> a Source #

Sign of a number. The functions abs and signum should satisfy the law:

abs x * signum x == x

For real numbers, the signum is either -1 (negative), 0 (zero) or 1 (positive).

fromInteger :: Integer -> a Source #

Conversion from an Integer . An integer literal represents the application of the function fromInteger to the appropriate value of type Integer , so such literals have type ( Num a) => a .

Instances

Instances details
Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Num Natural

Note that Natural 's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num Scientific

WARNING: + and - compute the Integer magnitude: 10^e where e is the difference between the base10Exponent s of the arguments. If these methods are applied to arguments which have huge exponents this could fill up all space and crash your program! So don't apply these methods to scientific numbers coming from untrusted sources. The other methods can be used safely.

Instance details

Defined in Data.Scientific

Num Pos
Instance details

Defined in Data.Attoparsec.Internal.Types

Num CDev
Instance details

Defined in System.Posix.Types

Num CIno
Instance details

Defined in System.Posix.Types

Num CMode
Instance details

Defined in System.Posix.Types

Num COff
Instance details

Defined in System.Posix.Types

Num CPid
Instance details

Defined in System.Posix.Types

Num CSsize
Instance details

Defined in System.Posix.Types

Num CGid
Instance details

Defined in System.Posix.Types

Num CNlink
Instance details

Defined in System.Posix.Types

Num CUid
Instance details

Defined in System.Posix.Types

Num CCc
Instance details

Defined in System.Posix.Types

Num CSpeed
Instance details

Defined in System.Posix.Types

Num CTcflag
Instance details

Defined in System.Posix.Types

Num CRLim
Instance details

Defined in System.Posix.Types

Num CBlkSize
Instance details

Defined in System.Posix.Types

Num CBlkCnt
Instance details

Defined in System.Posix.Types

Num CClockId
Instance details

Defined in System.Posix.Types

Num CFsBlkCnt
Instance details

Defined in System.Posix.Types

Num CFsFilCnt
Instance details

Defined in System.Posix.Types

Num CId
Instance details

Defined in System.Posix.Types

Num CKey
Instance details

Defined in System.Posix.Types

Num CSocklen
Instance details

Defined in System.Posix.Types

Num CNfds
Instance details

Defined in System.Posix.Types

Num Fd
Instance details

Defined in System.Posix.Types

Num CChar
Instance details

Defined in Foreign.C.Types

Num CSChar
Instance details

Defined in Foreign.C.Types

Num CUChar
Instance details

Defined in Foreign.C.Types

Num CShort
Instance details

Defined in Foreign.C.Types

Num CUShort
Instance details

Defined in Foreign.C.Types

Num CInt
Instance details

Defined in Foreign.C.Types

Num CUInt
Instance details

Defined in Foreign.C.Types

Num CLong
Instance details

Defined in Foreign.C.Types

Num CULong
Instance details

Defined in Foreign.C.Types

Num CLLong
Instance details

Defined in Foreign.C.Types

Num CULLong
Instance details

Defined in Foreign.C.Types

Num CBool
Instance details

Defined in Foreign.C.Types

Num CFloat
Instance details

Defined in Foreign.C.Types

Num CDouble
Instance details

Defined in Foreign.C.Types

Num CPtrdiff
Instance details

Defined in Foreign.C.Types

Num CSize
Instance details

Defined in Foreign.C.Types

Num CWchar
Instance details

Defined in Foreign.C.Types

Num CSigAtomic
Instance details

Defined in Foreign.C.Types

Num CClock
Instance details

Defined in Foreign.C.Types

Num CTime
Instance details

Defined in Foreign.C.Types

Num CUSeconds
Instance details

Defined in Foreign.C.Types

Num CSUSeconds
Instance details

Defined in Foreign.C.Types

Num CIntPtr
Instance details

Defined in Foreign.C.Types

Num CUIntPtr
Instance details

Defined in Foreign.C.Types

Num CIntMax
Instance details

Defined in Foreign.C.Types

Num CUIntMax
Instance details

Defined in Foreign.C.Types

Num WordPtr
Instance details

Defined in Foreign.Ptr

Num IntPtr
Instance details

Defined in Foreign.Ptr

Num Int54
Instance details

Defined in Text.JSON.Canonical.Types

Num DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Num NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Num CodePoint
Instance details

Defined in Data.Text.Encoding

Methods

(+) :: CodePoint -> CodePoint -> CodePoint Source #

(-) :: CodePoint -> CodePoint -> CodePoint Source #

(*) :: CodePoint -> CodePoint -> CodePoint Source #

negate :: CodePoint -> CodePoint Source #

abs :: CodePoint -> CodePoint Source #

signum :: CodePoint -> CodePoint Source #

fromInteger :: Integer -> CodePoint Source #

Num DecoderState
Instance details

Defined in Data.Text.Encoding

Methods

(+) :: DecoderState -> DecoderState -> DecoderState Source #

(-) :: DecoderState -> DecoderState -> DecoderState Source #

(*) :: DecoderState -> DecoderState -> DecoderState Source #

negate :: DecoderState -> DecoderState Source #

abs :: DecoderState -> DecoderState Source #

signum :: DecoderState -> DecoderState Source #

fromInteger :: Integer -> DecoderState Source #

Num B
Instance details

Defined in Data.Text.Short.Internal

Integral a => Num ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

RealFloat a => Num ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Num a => Num ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Num a => Num ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Num a => Num ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num ( Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Num ( Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Num ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Num a => Num ( Hex a)
Instance details

Defined in Data.Text.Format.Types

Num a => Num ( Shown a)
Instance details

Defined in Data.Text.Format.Types

HasResolution a => Num ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Num a => Num ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

( Applicative f, Num a) => Num ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Num (f a) => Num ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Num ( Tagged s a)
Instance details

Defined in Data.Tagged

class Eq a => Ord a where Source #

The Ord class is used for totally ordered datatypes.

Instances of Ord can be derived for any user-defined datatype whose constituent types are in Ord . The declared order of the constructors in the data declaration determines the ordering in derived Ord instances. The Ordering datatype allows a single comparison to determine the precise ordering of two objects.

The Haskell Report defines no laws for Ord . However, <= is customarily expected to implement a non-strict partial order and have the following properties:

Transitivity
if x <= y && y <= z = True , then x <= z = True
Reflexivity
x <= x = True
Antisymmetry
if x <= y && y <= x = True , then x == y = True

Note that the following operator interactions are expected to hold:

  1. x >= y = y <= x
  2. x < y = x <= y && x /= y
  3. x > y = y < x
  4. x < y = compare x y == LT
  5. x > y = compare x y == GT
  6. x == y = compare x y == EQ
  7. min x y == if x <= y then x else y = True
  8. max x y == if x >= y then x else y = True

Note that (7.) and (8.) do not require min and max to return either of their arguments. The result is merely required to equal one of the arguments in terms of (==) .

Minimal complete definition: either compare or <= . Using compare can be more efficient for complex types.

Minimal complete definition

compare | (<=)

Methods

compare :: a -> a -> Ordering Source #

(<) :: a -> a -> Bool infix 4 Source #

(<=) :: a -> a -> Bool infix 4 Source #

(>) :: a -> a -> Bool infix 4 Source #

(>=) :: a -> a -> Bool infix 4 Source #

max :: a -> a -> a Source #

min :: a -> a -> a Source #

Instances

Instances details
Ord Bool
Instance details

Defined in GHC.Classes

Ord Char
Instance details

Defined in GHC.Classes

Ord Double

Note that due to the presence of NaN , Double 's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Double)
False

Also note that, due to the same, Ord 's operator interactions are not respected by Double 's instance:

>>> (0/0 :: Double) > 1
False
>>> compare (0/0 :: Double) 1
GT
Instance details

Defined in GHC.Classes

Ord Float

Note that due to the presence of NaN , Float 's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Float)
False

Also note that, due to the same, Ord 's operator interactions are not respected by Float 's instance:

>>> (0/0 :: Float) > 1
False
>>> compare (0/0 :: Float) 1
GT
Instance details

Defined in GHC.Classes

Ord Int
Instance details

Defined in GHC.Classes

Ord Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Integer
Instance details

Defined in GHC.Integer.Type

Ord Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Ord Ordering
Instance details

Defined in GHC.Classes

Ord Word
Instance details

Defined in GHC.Classes

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ord SomeTypeRep
Instance details

Defined in Data.Typeable.Internal

Ord Exp
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Match
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Clause
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pat
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Type
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Dec
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Name
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FunDep
Instance details

Defined in Language.Haskell.TH.Syntax

Ord InjectivityAnn
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Overlap
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ()
Instance details

Defined in GHC.Classes

Ord TyCon
Instance details

Defined in GHC.Classes

Ord ByteString
Instance details

Defined in Data.ByteString.Internal

Ord ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Ord Builder
Instance details

Defined in Data.Text.Internal.Builder

Ord Scientific

Scientific numbers can be safely compared for ordering. No magnitude 10^e is calculated so there's no risk of a blowup in space or time when comparing scientific numbers coming from untrusted sources.

Instance details

Defined in Data.Scientific

Ord UTCTime
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Ord JSONPathElement
Instance details

Defined in Data.Aeson.Types.Internal

Ord Value

The ordering is total, consistent with Eq instance. However, nothing else about the ordering is specified, and it may change from environment to environment and version to version of either this package or its dependencies ( hashable and 'unordered-containers').

Since: aeson-1.5.2.0

Instance details

Defined in Data.Aeson.Types.Internal

Ord DotNetTime
Instance details

Defined in Data.Aeson.Types.Internal

Ord Key
Instance details

Defined in Data.Aeson.Key

Ord ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Ord Pos
Instance details

Defined in Data.Attoparsec.Internal.Types

Ord Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Ord Version

Since: base-2.1

Instance details

Defined in Data.Version

Ord BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Ord ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Ord CDev
Instance details

Defined in System.Posix.Types

Ord CIno
Instance details

Defined in System.Posix.Types

Ord CMode
Instance details

Defined in System.Posix.Types

Ord COff
Instance details

Defined in System.Posix.Types

Ord CPid
Instance details

Defined in System.Posix.Types

Ord CSsize
Instance details

Defined in System.Posix.Types

Ord CGid
Instance details

Defined in System.Posix.Types

Ord CNlink
Instance details

Defined in System.Posix.Types

Ord CUid
Instance details

Defined in System.Posix.Types

Ord CCc
Instance details

Defined in System.Posix.Types

Ord CSpeed
Instance details

Defined in System.Posix.Types

Ord CTcflag
Instance details

Defined in System.Posix.Types

Ord CRLim
Instance details

Defined in System.Posix.Types

Ord CBlkSize
Instance details

Defined in System.Posix.Types

Ord CBlkCnt
Instance details

Defined in System.Posix.Types

Ord CClockId
Instance details

Defined in System.Posix.Types

Ord CFsBlkCnt
Instance details

Defined in System.Posix.Types

Ord CFsFilCnt
Instance details

Defined in System.Posix.Types

Ord CId
Instance details

Defined in System.Posix.Types

Ord CKey
Instance details

Defined in System.Posix.Types

Ord CSocklen
Instance details

Defined in System.Posix.Types

Ord CNfds
Instance details

Defined in System.Posix.Types

Ord Fd
Instance details

Defined in System.Posix.Types

Ord AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord ExitCode
Instance details

Defined in GHC.IO.Exception

Ord BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord ErrorCall

Since: base-4.7.0.0

Instance details

Defined in GHC.Exception

Ord ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Ord SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Ord CChar
Instance details

Defined in Foreign.C.Types

Ord CSChar
Instance details

Defined in Foreign.C.Types

Ord CUChar
Instance details

Defined in Foreign.C.Types

Ord CShort
Instance details

Defined in Foreign.C.Types

Ord CUShort
Instance details

Defined in Foreign.C.Types

Ord CInt
Instance details

Defined in Foreign.C.Types

Ord CUInt
Instance details

Defined in Foreign.C.Types

Ord CLong
Instance details

Defined in Foreign.C.Types

Ord CULong
Instance details

Defined in Foreign.C.Types

Ord CLLong
Instance details

Defined in Foreign.C.Types

Ord CULLong
Instance details

Defined in Foreign.C.Types

Ord CBool
Instance details

Defined in Foreign.C.Types

Ord CFloat
Instance details

Defined in Foreign.C.Types

Ord CDouble
Instance details

Defined in Foreign.C.Types

Ord CPtrdiff
Instance details

Defined in Foreign.C.Types

Ord CSize
Instance details

Defined in Foreign.C.Types

Ord CWchar
Instance details

Defined in Foreign.C.Types

Ord CSigAtomic
Instance details

Defined in Foreign.C.Types

Ord CClock
Instance details

Defined in Foreign.C.Types

Ord CTime
Instance details

Defined in Foreign.C.Types

Ord CUSeconds
Instance details

Defined in Foreign.C.Types

Ord CSUSeconds
Instance details

Defined in Foreign.C.Types

Ord CIntPtr
Instance details

Defined in Foreign.C.Types

Ord CUIntPtr
Instance details

Defined in Foreign.C.Types

Ord CIntMax
Instance details

Defined in Foreign.C.Types

Ord CUIntMax
Instance details

Defined in Foreign.C.Types

Ord WordPtr
Instance details

Defined in Foreign.Ptr

Ord IntPtr
Instance details

Defined in Foreign.Ptr

Ord IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ord GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Ord ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Ord JSValue
Instance details

Defined in Text.JSON.Canonical.Types

Ord JSString
Instance details

Defined in Text.JSON.Canonical.Types

Ord Int54
Instance details

Defined in Text.JSON.Canonical.Types

Ord ByteArray

Non-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions.

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.ByteArray

Ord TokenType
Instance details

Defined in Codec.CBOR.Decoding

Ord ByteArray
Instance details

Defined in Codec.CBOR.ByteArray

Ord SlicedByteArray
Instance details

Defined in Codec.CBOR.ByteArray.Sliced

Ord IntSet
Instance details

Defined in Data.IntSet.Internal

Ord DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Ord NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Ord ClosureType
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Ord BigNat
Instance details

Defined in GHC.Integer.Type

Ord ModName
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PkgName
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Module
Instance details

Defined in Language.Haskell.TH.Syntax

Ord OccName
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameFlavour
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameSpace
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Loc
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Info
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ModuleInfo
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Fixity
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FixityDirection
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Lit
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Bytes
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Body
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Guard
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Stmt
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Range
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DerivClause
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DerivStrategy
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TypeFamilyHead
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TySynEqn
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Foreign
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Callconv
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Safety
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pragma
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Inline
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleMatch
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Phases
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Ord AnnTarget
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceUnpackedness
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DecidedStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Con
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Bang
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PatSynDir
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PatSynArgs
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TyVarBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FamilyResultSig
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TyLit
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Role
Instance details

Defined in Language.Haskell.TH.Syntax

Ord AnnLookup
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ShortText
Instance details

Defined in Data.Text.Short.Internal

Ord LocalTime
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Ord TimeOfDay
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Ord TimeZone
Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

Ord UniversalTime
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Ord Day
Instance details

Defined in Data.Time.Calendar.Days

Ord UnpackedUUID
Instance details

Defined in Data.UUID.Types.Internal

Methods

compare :: UnpackedUUID -> UnpackedUUID -> Ordering Source #

(<) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

(<=) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

(>) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

(>=) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

max :: UnpackedUUID -> UnpackedUUID -> UnpackedUUID Source #

min :: UnpackedUUID -> UnpackedUUID -> UnpackedUUID Source #

Ord UUID
Instance details

Defined in Data.UUID.Types.Internal

Ord B
Instance details

Defined in Data.Text.Short.Internal

Ord a => Ord [a]
Instance details

Defined in GHC.Classes

Methods

compare :: [a] -> [a] -> Ordering Source #

(<) :: [a] -> [a] -> Bool Source #

(<=) :: [a] -> [a] -> Bool Source #

(>) :: [a] -> [a] -> Bool Source #

(>=) :: [a] -> [a] -> Bool Source #

max :: [a] -> [a] -> [a] Source #

min :: [a] -> [a] -> [a] Source #

Ord a => Ord ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Integral a => Ord ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Ord ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Ord ( FunPtr a)
Instance details

Defined in GHC.Ptr

Ord p => Ord ( Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Ord a => Ord ( Solo a)
Instance details

Defined in Data.Tuple.Solo

Ord v => Ord ( KeyMap v)
Instance details

Defined in Data.Aeson.KeyMap

Ord ( Async a)
Instance details

Defined in Control.Concurrent.Async

Ord a => Ord ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord m => Ord ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Ord a => Ord ( Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Ord a => Ord ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Ord a => Ord ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Ord a => Ord ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord a => Ord ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord a => Ord ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord a => Ord ( Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Ord a => Ord ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Ord a => Ord ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Ord a => Ord ( Tree a)

Since: containers-0.6.5

Instance details

Defined in Data.Tree

Ord a => Ord ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Ord a => Ord ( ViewL a)
Instance details

Defined in Data.Sequence.Internal

Ord a => Ord ( ViewR a)
Instance details

Defined in Data.Sequence.Internal

Ord a => Ord ( Set a)
Instance details

Defined in Data.Set.Internal

Ord1 f => Ord ( Fix f)
Instance details

Defined in Data.Fix

( Functor f, Ord1 f) => Ord ( Mu f)
Instance details

Defined in Data.Fix

( Functor f, Ord1 f) => Ord ( Nu f)
Instance details

Defined in Data.Fix

Ord a => Ord ( DNonEmpty a)
Instance details

Defined in Data.DList.DNonEmpty.Internal

Ord a => Ord ( DList a)
Instance details

Defined in Data.DList.Internal

Ord a => Ord ( Hex a)
Instance details

Defined in Data.Text.Format.Types

Ord a => Ord ( Shown a)
Instance details

Defined in Data.Text.Format.Types

Ord a => Ord ( Hashed a)
Instance details

Defined in Data.Hashable.Class

( Ord a, Prim a) => Ord ( PrimArray a)

Lexicographic ordering. Subject to change between major versions.

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Ord a => Ord ( SmallArray a)

Lexicographic ordering. Subject to change between major versions.

Instance details

Defined in Data.Primitive.SmallArray

Ord a => Ord ( Array a)

Lexicographic ordering. Subject to change between major versions.

Instance details

Defined in Data.Primitive.Array

Ord g => Ord ( AtomicGen g)
Instance details

Defined in System.Random.Stateful

Ord g => Ord ( IOGen g)
Instance details

Defined in System.Random.Stateful

Ord g => Ord ( STGen g)
Instance details

Defined in System.Random.Stateful

Ord g => Ord ( TGen g)
Instance details

Defined in System.Random.Stateful

Ord g => Ord ( StateGen g)
Instance details

Defined in System.Random.Internal

Ord a => Ord ( Maybe a)
Instance details

Defined in Data.Strict.Maybe

Ord a => Ord ( HashSet a)
Instance details

Defined in Data.HashSet.Internal

( Storable a, Ord a) => Ord ( Vector a)
Instance details

Defined in Data.Vector.Storable

( Prim a, Ord a) => Ord ( Vector a)
Instance details

Defined in Data.Vector.Primitive

Ord a => Ord ( Vector a)
Instance details

Defined in Data.Vector

( Ord a, Ord b) => Ord ( Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Ord ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Ord ( TypeRep a)

Since: base-4.4.0.0

Instance details

Defined in Data.Typeable.Internal

( Ord a, Ord b) => Ord (a, b)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b) -> (a, b) -> Ordering Source #

(<) :: (a, b) -> (a, b) -> Bool Source #

(<=) :: (a, b) -> (a, b) -> Bool Source #

(>) :: (a, b) -> (a, b) -> Bool Source #

(>=) :: (a, b) -> (a, b) -> Bool Source #

max :: (a, b) -> (a, b) -> (a, b) Source #

min :: (a, b) -> (a, b) -> (a, b) Source #

( Ord k, Ord v) => Ord ( Map k v)
Instance details

Defined in Data.Map.Internal

( Ord k, Ord v) => Ord ( HashMap k v)

The ordering is total and consistent with the Eq instance. However, nothing else about the ordering is specified, and it may change from version to version of either this package or of hashable.

Instance details

Defined in Data.HashMap.Internal

( Ix ix, Ord e, IArray UArray e) => Ord ( UArray ix e)
Instance details

Defined in Data.Array.Base

( Ix i, Ord e) => Ord ( Array i e)

Since: base-2.1

Instance details

Defined in GHC.Arr

Ord ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Ord a => Ord ( Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

( Ord1 m, Ord a) => Ord ( ListT m a)
Instance details

Defined in Control.Monad.Trans.List

( Ord a, Ord b) => Ord ( These a b)
Instance details

Defined in Data.These

( Ord a, Ord b) => Ord ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

( Ord a, Ord b) => Ord ( These a b)
Instance details

Defined in Data.Strict.These

( Ord a, Ord b) => Ord ( Either a b)
Instance details

Defined in Data.Strict.Either

( Ord1 m, Ord a) => Ord ( MaybeT m a)
Instance details

Defined in Control.Monad.Trans.Maybe

Ord (f p) => Ord ( Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Ord ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Float p)
Instance details

Defined in GHC.Generics

Ord ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

( Ord a, Ord b, Ord c) => Ord (a, b, c)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c) -> (a, b, c) -> Ordering Source #

(<) :: (a, b, c) -> (a, b, c) -> Bool Source #

(<=) :: (a, b, c) -> (a, b, c) -> Bool Source #

(>) :: (a, b, c) -> (a, b, c) -> Bool Source #

(>=) :: (a, b, c) -> (a, b, c) -> Bool Source #

max :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

min :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

Ord a => Ord ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Ord (f a) => Ord ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Ord (f a) => Ord ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Ord ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Ord (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

( Ord1 f, Ord a) => Ord ( IdentityT f a)
Instance details

Defined in Control.Monad.Trans.Identity

( Ord e, Ord1 m, Ord a) => Ord ( ErrorT e m a)
Instance details

Defined in Control.Monad.Trans.Error

( Ord e, Ord1 m, Ord a) => Ord ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

( Ord w, Ord1 m, Ord a) => Ord ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Ord w, Ord1 m, Ord a) => Ord ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Ord b => Ord ( Tagged s b)
Instance details

Defined in Data.Tagged

( Ord1 f, Ord1 g, Ord a) => Ord ( These1 f g a)
Instance details

Defined in Data.Functor.These

Ord c => Ord ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Ord (f p), Ord (g p)) => Ord ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :+: g) p -> (f :+: g) p -> Ordering Source #

(<) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

(<=) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

(>) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

(>=) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

max :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p Source #

min :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p Source #

( Ord (f p), Ord (g p)) => Ord ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :*: g) p -> (f :*: g) p -> Ordering Source #

(<) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

(<=) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

(>) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

(>=) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

max :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

min :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

( Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d) -> (a, b, c, d) -> Ordering Source #

(<) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #

(<=) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #

(>) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #

(>=) :: (a, b, c, d) -> (a, b, c, d) -> Bool Source #

max :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

min :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

( Ord1 f, Ord1 g, Ord a) => Ord ( Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Ord1 f, Ord1 g, Ord a) => Ord ( Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Ord (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Ord (f p) => Ord ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: M1 i c f p -> M1 i c f p -> Ordering Source #

(<) :: M1 i c f p -> M1 i c f p -> Bool Source #

(<=) :: M1 i c f p -> M1 i c f p -> Bool Source #

(>) :: M1 i c f p -> M1 i c f p -> Bool Source #

(>=) :: M1 i c f p -> M1 i c f p -> Bool Source #

max :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

min :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

Ord (f (g p)) => Ord ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :.: g) p -> (f :.: g) p -> Ordering Source #

(<) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

(<=) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

(>) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

(>=) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

max :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

min :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

( Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e) -> (a, b, c, d, e) -> Ordering Source #

(<) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #

(<=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #

(>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #

(>=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool Source #

max :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

min :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

( Ord1 f, Ord1 g, Ord a) => Ord ( Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Ord (p b a) => Ord ( Flip p a b)
Instance details

Defined in Data.Bifunctor.Flip

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Ordering Source #

(<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #

(<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #

(>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #

(>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool Source #

max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

( Ord (p a b), Ord (q a b)) => Ord ( Sum p q a b)
Instance details

Defined in Data.Bifunctor.Sum

Methods

compare :: Sum p q a b -> Sum p q a b -> Ordering Source #

(<) :: Sum p q a b -> Sum p q a b -> Bool Source #

(<=) :: Sum p q a b -> Sum p q a b -> Bool Source #

(>) :: Sum p q a b -> Sum p q a b -> Bool Source #

(>=) :: Sum p q a b -> Sum p q a b -> Bool Source #

max :: Sum p q a b -> Sum p q a b -> Sum p q a b Source #

min :: Sum p q a b -> Sum p q a b -> Sum p q a b Source #

( Ord (f a b), Ord (g a b)) => Ord ( Product f g a b)
Instance details

Defined in Data.Bifunctor.Product

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Ordering Source #

(<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #

(<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #

(>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #

(>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool Source #

max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

Ord (f (p a b)) => Ord ( Tannen f p a b)
Instance details

Defined in Data.Bifunctor.Tannen

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Ordering Source #

(<) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #

(<=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #

(>) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #

(>=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool Source #

max :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #

min :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) Source #

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Ordering Source #

(<) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #

(<=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #

(>) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #

(>=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool Source #

max :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source #

min :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) Source #

Ord (p (f a) (g b)) => Ord ( Biff p f g a b)
Instance details

Defined in Data.Bifunctor.Biff

Methods

compare :: Biff p f g a b -> Biff p f g a b -> Ordering Source #

(<) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

(<=) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

(>) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

(>=) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

max :: Biff p f g a b -> Biff p f g a b -> Biff p f g a b Source #

min :: Biff p f g a b -> Biff p f g a b -> Biff p f g a b Source #

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Ordering Source #

(<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #

(<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #

(>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #

(>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool Source #

max :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source #

min :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) Source #

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Ordering Source #

(<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #

(>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool Source #

max :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) Source #

min :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) Source #

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Ordering Source #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool Source #

max :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) Source #

min :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) Source #

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Ordering Source #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool Source #

max :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

min :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Ordering Source #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool Source #

max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

( Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Ordering Source #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool Source #

max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

class Read a Source #

Parsing of String s, producing values.

Derived instances of Read make the following assumptions, which derived instances of Show obey:

  • If the constructor is defined to be an infix operator, then the derived Read instance will parse only infix applications of the constructor (not the prefix form).
  • Associativity is not used to reduce the occurrence of parentheses, although precedence may be.
  • If the constructor is defined using record syntax, the derived Read will parse only the record-syntax form, and furthermore, the fields must be given in the same order as the original declaration.
  • The derived Read instance allows arbitrary Haskell whitespace between tokens of the input string. Extra parentheses are also allowed.

For example, given the declarations

infixr 5 :^:
data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of Read in Haskell 2010 is equivalent to

instance (Read a) => Read (Tree a) where

        readsPrec d r =  readParen (d > app_prec)
                         (\r -> [(Leaf m,t) |
                                 ("Leaf",s) <- lex r,
                                 (m,t) <- readsPrec (app_prec+1) s]) r

                      ++ readParen (d > up_prec)
                         (\r -> [(u:^:v,w) |
                                 (u,s) <- readsPrec (up_prec+1) r,
                                 (":^:",t) <- lex s,
                                 (v,w) <- readsPrec (up_prec+1) t]) r

          where app_prec = 10
                up_prec = 5

Note that right-associativity of :^: is unused.

The derived instance in GHC is equivalent to

instance (Read a) => Read (Tree a) where

        readPrec = parens $ (prec app_prec $ do
                                 Ident "Leaf" <- lexP
                                 m <- step readPrec
                                 return (Leaf m))

                     +++ (prec up_prec $ do
                                 u <- step readPrec
                                 Symbol ":^:" <- lexP
                                 v <- step readPrec
                                 return (u :^: v))

          where app_prec = 10
                up_prec = 5

        readListPrec = readListPrecDefault

Why do both readsPrec and readPrec exist, and why does GHC opt to implement readPrec in derived Read instances instead of readsPrec ? The reason is that readsPrec is based on the ReadS type, and although ReadS is mentioned in the Haskell 2010 Report, it is not a very efficient parser data structure.

readPrec , on the other hand, is based on a much more efficient ReadPrec datatype (a.k.a "new-style parsers"), but its definition relies on the use of the RankNTypes language extension. Therefore, readPrec (and its cousin, readListPrec ) are marked as GHC-only. Nevertheless, it is recommended to use readPrec instead of readsPrec whenever possible for the efficiency improvements it brings.

As mentioned above, derived Read instances in GHC will implement readPrec instead of readsPrec . The default implementations of readsPrec (and its cousin, readList ) will simply use readPrec under the hood. If you are writing a Read instance by hand, it is recommended to write it like so:

instance Read T where
  readPrec     = ...
  readListPrec = readListPrecDefault

Minimal complete definition

readsPrec | readPrec

Instances

Instances details
Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Read Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word16

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Read ()

Since: base-2.1

Instance details

Defined in GHC.Read

Read ByteString
Instance details

Defined in Data.ByteString.Internal

Read ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Read Scientific

Supports the skipping of parentheses and whitespaces. Example:

> read " ( ((  -1.0e+3 ) ))" :: Scientific
-1000.0

(Note: This Read instance makes internal use of scientificP to parse the floating-point number.)

Instance details

Defined in Data.Scientific

Read Value
Instance details

Defined in Data.Aeson.Types.Internal

Read DotNetTime
Instance details

Defined in Data.Aeson.Types.Internal

Read Key
Instance details

Defined in Data.Aeson.Key

Read Void

Reading a Void value is always a parse error, considering Void as a data type with no constructors.

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Read Version

Since: base-2.1

Instance details

Defined in Data.Version

Read CDev
Instance details

Defined in System.Posix.Types

Read CIno
Instance details

Defined in System.Posix.Types

Read CMode
Instance details

Defined in System.Posix.Types

Read COff
Instance details

Defined in System.Posix.Types

Read CPid
Instance details

Defined in System.Posix.Types

Read CSsize
Instance details

Defined in System.Posix.Types

Read CGid
Instance details

Defined in System.Posix.Types

Read CNlink
Instance details

Defined in System.Posix.Types

Read CUid
Instance details

Defined in System.Posix.Types

Read CCc
Instance details

Defined in System.Posix.Types

Read CSpeed
Instance details

Defined in System.Posix.Types

Read CTcflag
Instance details

Defined in System.Posix.Types

Read CRLim
Instance details

Defined in System.Posix.Types

Read CBlkSize
Instance details

Defined in System.Posix.Types

Read CBlkCnt
Instance details

Defined in System.Posix.Types

Read CClockId
Instance details

Defined in System.Posix.Types

Read CFsBlkCnt
Instance details

Defined in System.Posix.Types

Read CFsFilCnt
Instance details

Defined in System.Posix.Types

Read CId
Instance details

Defined in System.Posix.Types

Read CKey
Instance details

Defined in System.Posix.Types

Read CSocklen
Instance details

Defined in System.Posix.Types

Read CNfds
Instance details

Defined in System.Posix.Types

Read Fd
Instance details

Defined in System.Posix.Types

Read ExitCode
Instance details

Defined in GHC.IO.Exception

Read BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Read SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Read CChar
Instance details

Defined in Foreign.C.Types

Read CSChar
Instance details

Defined in Foreign.C.Types

Read CUChar
Instance details

Defined in Foreign.C.Types

Read CShort
Instance details

Defined in Foreign.C.Types

Read CUShort
Instance details

Defined in Foreign.C.Types

Read CInt
Instance details

Defined in Foreign.C.Types

Read CUInt
Instance details

Defined in Foreign.C.Types

Read CLong
Instance details

Defined in Foreign.C.Types

Read CULong
Instance details

Defined in Foreign.C.Types

Read CLLong
Instance details

Defined in Foreign.C.Types

Read CULLong
Instance details

Defined in Foreign.C.Types

Read CBool
Instance details

Defined in Foreign.C.Types

Read CFloat
Instance details

Defined in Foreign.C.Types

Read CDouble
Instance details

Defined in Foreign.C.Types

Read CPtrdiff
Instance details

Defined in Foreign.C.Types

Read CSize
Instance details

Defined in Foreign.C.Types

Read CWchar
Instance details

Defined in Foreign.C.Types

Read CSigAtomic
Instance details

Defined in Foreign.C.Types

Read CClock
Instance details

Defined in Foreign.C.Types

Read CTime
Instance details

Defined in Foreign.C.Types

Read CUSeconds
Instance details

Defined in Foreign.C.Types

Read CSUSeconds
Instance details

Defined in Foreign.C.Types

Read CIntPtr
Instance details

Defined in Foreign.C.Types

Read CUIntPtr
Instance details

Defined in Foreign.C.Types

Read CIntMax
Instance details

Defined in Foreign.C.Types

Read CUIntMax
Instance details

Defined in Foreign.C.Types

Read WordPtr
Instance details

Defined in Foreign.Ptr

Read IntPtr
Instance details

Defined in Foreign.Ptr

Read IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Read Lexeme

Since: base-2.1

Instance details

Defined in GHC.Read

Read GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Read

Read ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Read JSValue
Instance details

Defined in Text.JSON.Canonical.Types

Read JSString
Instance details

Defined in Text.JSON.Canonical.Types

Read Int54
Instance details

Defined in Text.JSON.Canonical.Types

Read IntSet
Instance details

Defined in Data.IntSet.Internal

Read ShortText
Instance details

Defined in Data.Text.Short.Internal

Read UnpackedUUID
Instance details

Defined in Data.UUID.Types.Internal

Read UUID
Instance details

Defined in Data.UUID.Types.Internal

Read a => Read [a]

Since: base-2.1

Instance details

Defined in GHC.Read

Read a => Read ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

( Integral a, Read a) => Read ( Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Read

Read p => Read ( Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Read a => Read ( Solo a)
Instance details

Defined in Data.Tuple.Solo

Read v => Read ( KeyMap v)
Instance details

Defined in Data.Aeson.KeyMap

Read a => Read ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Read a => Read ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read m => Read ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Read a => Read ( Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Read a => Read ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read ( Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Read a => Read ( NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Read e => Read ( IntMap e)
Instance details

Defined in Data.IntMap.Internal

Read a => Read ( Tree a)
Instance details

Defined in Data.Tree

Read a => Read ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Read a => Read ( ViewL a)
Instance details

Defined in Data.Sequence.Internal

Read a => Read ( ViewR a)
Instance details

Defined in Data.Sequence.Internal

( Read a, Ord a) => Read ( Set a)
Instance details

Defined in Data.Set.Internal

Read1 f => Read ( Fix f)
Instance details

Defined in Data.Fix

( Functor f, Read1 f) => Read ( Mu f)
Instance details

Defined in Data.Fix

( Functor f, Read1 f) => Read ( Nu f)
Instance details

Defined in Data.Fix

Read a => Read ( DNonEmpty a)
Instance details

Defined in Data.DList.DNonEmpty.Internal

Read a => Read ( DList a)
Instance details

Defined in Data.DList.Internal

Read a => Read ( Hex a)
Instance details

Defined in Data.Text.Format.Types

Read a => Read ( Shown a)
Instance details

Defined in Data.Text.Format.Types

Read a => Read ( SmallArray a)
Instance details

Defined in Data.Primitive.SmallArray

Read a => Read ( Array a)
Instance details

Defined in Data.Primitive.Array

Read a => Read ( Maybe a)
Instance details

Defined in Data.Strict.Maybe

( Eq a, Hashable a, Read a) => Read ( HashSet a)
Instance details

Defined in Data.HashSet.Internal

( Read a, Storable a) => Read ( Vector a)
Instance details

Defined in Data.Vector.Storable

( Read a, Prim a) => Read ( Vector a)
Instance details

Defined in Data.Vector.Primitive

Read a => Read ( Vector a)
Instance details

Defined in Data.Vector

( Read a, Read b) => Read ( Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

Read ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read ( U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

( Read a, Read b) => Read (a, b)

Since: base-2.1

Instance details

Defined in GHC.Read

( Ord k, Read k, Read e) => Read ( Map k e)
Instance details

Defined in Data.Map.Internal

( Eq k, Hashable k, Read k, Read e) => Read ( HashMap k e)
Instance details

Defined in Data.HashMap.Internal

( Ix ix, Read ix, Read e, IArray UArray e) => Read ( UArray ix e)
Instance details

Defined in Data.Array.Base

( Ix a, Read a, Read b) => Read ( Array a b)

Since: base-2.1

Instance details

Defined in GHC.Read

HasResolution a => Read ( Fixed a)

Since: base-4.3.0.0

Instance details

Defined in Data.Fixed

( Read a, Read b) => Read ( Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

( Read1 m, Read a) => Read ( ListT m a)
Instance details

Defined in Control.Monad.Trans.List

( Read a, Read b) => Read ( These a b)
Instance details

Defined in Data.These

( Read a, Read b) => Read ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

( Read a, Read b) => Read ( These a b)
Instance details

Defined in Data.Strict.These

( Read a, Read b) => Read ( Either a b)
Instance details

Defined in Data.Strict.Either

( Read1 m, Read a) => Read ( MaybeT m a)
Instance details

Defined in Control.Monad.Trans.Maybe

Read (f p) => Read ( Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Read a, Read b, Read c) => Read (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Read

Read a => Read ( Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Read (f a) => Read ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Read (f a) => Read ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Coercible a b => Read ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

a ~ b => Read (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

( Read1 f, Read a) => Read ( IdentityT f a)
Instance details

Defined in Control.Monad.Trans.Identity

( Read e, Read1 m, Read a) => Read ( ErrorT e m a)
Instance details

Defined in Control.Monad.Trans.Error

( Read e, Read1 m, Read a) => Read ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

( Read w, Read1 m, Read a) => Read ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Read w, Read1 m, Read a) => Read ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Read b => Read ( Tagged s b)
Instance details

Defined in Data.Tagged

( Read1 f, Read1 g, Read a) => Read ( These1 f g a)
Instance details

Defined in Data.Functor.These

Read c => Read ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Read (f p), Read (g p)) => Read ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Read (f p), Read (g p)) => Read ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Read a, Read b, Read c, Read d) => Read (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Read

( Read1 f, Read1 g, Read a) => Read ( Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Read1 f, Read1 g, Read a) => Read ( Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

a ~~ b => Read (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Read (f p) => Read ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Read (f (g p)) => Read ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Read a, Read b, Read c, Read d, Read e) => Read (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Read

( Read1 f, Read1 g, Read a) => Read ( Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Read (p b a) => Read ( Flip p a b)
Instance details

Defined in Data.Bifunctor.Flip

( Read a, Read b, Read c, Read d, Read e, Read f) => Read (a, b, c, d, e, f)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f) Source #

readList :: ReadS [(a, b, c, d, e, f)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f)] Source #

( Read (p a b), Read (q a b)) => Read ( Sum p q a b)
Instance details

Defined in Data.Bifunctor.Sum

( Read (f a b), Read (g a b)) => Read ( Product f g a b)
Instance details

Defined in Data.Bifunctor.Product

( Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read (a, b, c, d, e, f, g)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g) Source #

readList :: ReadS [(a, b, c, d, e, f, g)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f, g) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g)] Source #

Read (f (p a b)) => Read ( Tannen f p a b)
Instance details

Defined in Data.Bifunctor.Tannen

( Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h) => Read (a, b, c, d, e, f, g, h)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h) Source #

readList :: ReadS [(a, b, c, d, e, f, g, h)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h)] Source #

( Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i) => Read (a, b, c, d, e, f, g, h, i)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i) Source #

readList :: ReadS [(a, b, c, d, e, f, g, h, i)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i)] Source #

Read (p (f a) (g b)) => Read ( Biff p f g a b)
Instance details

Defined in Data.Bifunctor.Biff

( Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j) => Read (a, b, c, d, e, f, g, h, i, j)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j) Source #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j)] Source #

( Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k) => Read (a, b, c, d, e, f, g, h, i, j, k)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k) Source #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k)] Source #

( Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l) => Read (a, b, c, d, e, f, g, h, i, j, k, l)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l) Source #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l)] Source #

( Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m)] Source #

( Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] Source #

( Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n, Read o) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] Source #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] Source #

class ( Num a, Ord a) => Real a where Source #

Methods

toRational :: a -> Rational Source #

the rational equivalent of its real argument with full precision

Instances

Instances details
Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Real Scientific

WARNING: toRational needs to compute the Integer magnitude: 10^e . If applied to a huge exponent this could fill up all space and crash your program!

Avoid applying toRational (or realToFrac ) to scientific numbers coming from an untrusted source and use toRealFloat instead. The latter guards against excessive space usage.

Instance details

Defined in Data.Scientific

Real CDev
Instance details

Defined in System.Posix.Types

Real CIno
Instance details

Defined in System.Posix.Types

Real CMode
Instance details

Defined in System.Posix.Types

Real COff
Instance details

Defined in System.Posix.Types

Real CPid
Instance details

Defined in System.Posix.Types

Real CSsize
Instance details

Defined in System.Posix.Types

Real CGid
Instance details

Defined in System.Posix.Types

Real CNlink
Instance details

Defined in System.Posix.Types

Real CUid
Instance details

Defined in System.Posix.Types

Real CCc
Instance details

Defined in System.Posix.Types

Real CSpeed
Instance details

Defined in System.Posix.Types

Real CTcflag
Instance details

Defined in System.Posix.Types

Real CRLim
Instance details

Defined in System.Posix.Types

Real CBlkSize
Instance details

Defined in System.Posix.Types

Real CBlkCnt
Instance details

Defined in System.Posix.Types

Real CClockId
Instance details

Defined in System.Posix.Types

Real CFsBlkCnt
Instance details

Defined in System.Posix.Types

Real CFsFilCnt
Instance details

Defined in System.Posix.Types

Real CId
Instance details

Defined in System.Posix.Types

Real CKey
Instance details

Defined in System.Posix.Types

Real CSocklen
Instance details

Defined in System.Posix.Types

Real CNfds
Instance details

Defined in System.Posix.Types

Real Fd
Instance details

Defined in System.Posix.Types

Real CChar
Instance details

Defined in Foreign.C.Types

Real CSChar
Instance details

Defined in Foreign.C.Types

Real CUChar
Instance details

Defined in Foreign.C.Types

Real CShort
Instance details

Defined in Foreign.C.Types

Real CUShort
Instance details

Defined in Foreign.C.Types

Real CInt
Instance details

Defined in Foreign.C.Types

Real CUInt
Instance details

Defined in Foreign.C.Types

Real CLong
Instance details

Defined in Foreign.C.Types

Real CULong
Instance details

Defined in Foreign.C.Types

Real CLLong
Instance details

Defined in Foreign.C.Types

Real CULLong
Instance details

Defined in Foreign.C.Types

Real CBool
Instance details

Defined in Foreign.C.Types

Real CFloat
Instance details

Defined in Foreign.C.Types

Real CDouble
Instance details

Defined in Foreign.C.Types

Real CPtrdiff
Instance details

Defined in Foreign.C.Types

Real CSize
Instance details

Defined in Foreign.C.Types

Real CWchar
Instance details

Defined in Foreign.C.Types

Real CSigAtomic
Instance details

Defined in Foreign.C.Types

Real CClock
Instance details

Defined in Foreign.C.Types

Real CTime
Instance details

Defined in Foreign.C.Types

Real CUSeconds
Instance details

Defined in Foreign.C.Types

Real CSUSeconds
Instance details

Defined in Foreign.C.Types

Real CIntPtr
Instance details

Defined in Foreign.C.Types

Real CUIntPtr
Instance details

Defined in Foreign.C.Types

Real CIntMax
Instance details

Defined in Foreign.C.Types

Real CUIntMax
Instance details

Defined in Foreign.C.Types

Real WordPtr
Instance details

Defined in Foreign.Ptr

Real IntPtr
Instance details

Defined in Foreign.Ptr

Real Int54
Instance details

Defined in Text.JSON.Canonical.Types

Real DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Real NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Integral a => Real ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real a => Real ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Real a => Real ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Real a => Real ( Hex a)
Instance details

Defined in Data.Text.Format.Types

Real a => Real ( Shown a)
Instance details

Defined in Data.Text.Format.Types

HasResolution a => Real ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Real a => Real ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Real a => Real ( Tagged s a)
Instance details

Defined in Data.Tagged

class ( RealFrac a, Floating a) => RealFloat a where Source #

Efficient, machine-independent access to the components of a floating-point number.

Methods

floatRadix :: a -> Integer Source #

a constant function, returning the radix of the representation (often 2 )

floatDigits :: a -> Int Source #

a constant function, returning the number of digits of floatRadix in the significand

floatRange :: a -> ( Int , Int ) Source #

a constant function, returning the lowest and highest values the exponent may assume

decodeFloat :: a -> ( Integer , Int ) Source #

The function decodeFloat applied to a real floating-point number returns the significand expressed as an Integer and an appropriately scaled exponent (an Int ). If decodeFloat x yields (m,n) , then x is equal in value to m*b^^n , where b is the floating-point radix, and furthermore, either m and n are both zero or else b^(d-1) <= abs m < b^d , where d is the value of floatDigits x . In particular, decodeFloat 0 = (0,0) . If the type contains a negative zero, also decodeFloat (-0.0) = (0,0) . The result of decodeFloat x is unspecified if either of isNaN x or isInfinite x is True .

encodeFloat :: Integer -> Int -> a Source #

encodeFloat performs the inverse of decodeFloat in the sense that for finite x with the exception of -0.0 , uncurry encodeFloat ( decodeFloat x) = x . encodeFloat m n is one of the two closest representable floating-point numbers to m*b^^n (or ±Infinity if overflow occurs); usually the closer, but if m contains too many bits, the result may be rounded in the wrong direction.

exponent :: a -> Int Source #

exponent corresponds to the second component of decodeFloat . exponent 0 = 0 and for finite nonzero x , exponent x = snd ( decodeFloat x) + floatDigits x . If x is a finite floating-point number, it is equal in value to significand x * b ^^ exponent x , where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

significand :: a -> a Source #

The first component of decodeFloat , scaled to lie in the open interval ( -1 , 1 ), either 0.0 or of absolute value >= 1/b , where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

scaleFloat :: Int -> a -> a Source #

multiplies a floating-point number by an integer power of the radix

isNaN :: a -> Bool Source #

True if the argument is an IEEE "not-a-number" (NaN) value

isInfinite :: a -> Bool Source #

True if the argument is an IEEE infinity or negative infinity

isDenormalized :: a -> Bool Source #

True if the argument is too small to be represented in normalized format

isNegativeZero :: a -> Bool Source #

True if the argument is an IEEE negative zero

isIEEE :: a -> Bool Source #

True if the argument is an IEEE floating point number

atan2 :: a -> a -> a Source #

a version of arctangent taking two real floating-point arguments. For real floating x and y , atan2 y x computes the angle (from the positive x-axis) of the vector from the origin to the point (x,y) . atan2 y x returns a value in the range [ -pi , pi ]. It follows the Common Lisp semantics for the origin when signed zeroes are supported. atan2 y 1 , with y in a type that is RealFloat , should return the same value as atan y . A default definition of atan2 is provided, but implementors can provide a more accurate implementation.

Instances

Instances details
RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat CFloat
Instance details

Defined in Foreign.C.Types

RealFloat CDouble
Instance details

Defined in Foreign.C.Types

RealFloat a => RealFloat ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => RealFloat ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

RealFloat a => RealFloat ( Shown a)
Instance details

Defined in Data.Text.Format.Types

RealFloat a => RealFloat ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

RealFloat a => RealFloat ( Tagged s a)
Instance details

Defined in Data.Tagged

class ( Real a, Fractional a) => RealFrac a where Source #

Extracting components of fractions.

Minimal complete definition

properFraction

Methods

properFraction :: Integral b => a -> (b, a) Source #

The function properFraction takes a real fractional number x and returns a pair (n,f) such that x = n+f , and:

  • n is an integral number with the same sign as x ; and
  • f is a fraction with the same type and sign as x , and with absolute value less than 1 .

The default definitions of the ceiling , floor , truncate and round functions are in terms of properFraction .

truncate :: Integral b => a -> b Source #

truncate x returns the integer nearest x between zero and x

round :: Integral b => a -> b Source #

round x returns the nearest integer to x ; the even integer if x is equidistant between two integers

ceiling :: Integral b => a -> b Source #

ceiling x returns the least integer not less than x

floor :: Integral b => a -> b Source #

floor x returns the greatest integer not greater than x

Instances

Instances details
RealFrac Scientific

WARNING: the methods of the RealFrac instance need to compute the magnitude 10^e . If applied to a huge exponent this could take a long time. Even worse, when the destination type is unbounded (i.e. Integer ) it could fill up all space and crash your program!

Instance details

Defined in Data.Scientific

RealFrac CFloat
Instance details

Defined in Foreign.C.Types

RealFrac CDouble
Instance details

Defined in Foreign.C.Types

RealFrac DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

RealFrac NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Integral a => RealFrac ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

RealFrac a => RealFrac ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFrac a => RealFrac ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

RealFrac a => RealFrac ( Shown a)
Instance details

Defined in Data.Text.Format.Types

HasResolution a => RealFrac ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

RealFrac a => RealFrac ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

RealFrac a => RealFrac ( Tagged s a)
Instance details

Defined in Data.Tagged

class Show a Source #

Conversion of values to readable String s.

Derived instances of Show have the following properties, which are compatible with derived instances of Read :

  • The result of show is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.
  • If the constructor is defined to be an infix operator, then showsPrec will produce infix applications of the constructor.
  • the representation will be enclosed in parentheses if the precedence of the top-level constructor in x is less than d (associativity is ignored). Thus, if d is 0 then the result is never surrounded in parentheses; if d is 11 it is always surrounded in parentheses, unless it is an atomic expression.
  • If the constructor is defined using record syntax, then show will produce the record-syntax form, with the fields given in the same order as the original declaration.

For example, given the declarations

infixr 5 :^:
data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of Show is equivalent to

instance (Show a) => Show (Tree a) where

       showsPrec d (Leaf m) = showParen (d > app_prec) $
            showString "Leaf " . showsPrec (app_prec+1) m
         where app_prec = 10

       showsPrec d (u :^: v) = showParen (d > up_prec) $
            showsPrec (up_prec+1) u .
            showString " :^: "      .
            showsPrec (up_prec+1) v
         where up_prec = 5

Note that right-associativity of :^: is ignored. For example,

  • show (Leaf 1 :^: Leaf 2 :^: Leaf 3) produces the string "Leaf 1 :^: (Leaf 2 :^: Leaf 3)" .

Minimal complete definition

showsPrec | show

Instances

Instances details
Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Show Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show RuntimeRep

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecCount

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecElem

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show CallStack

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SomeTypeRep

Since: base-4.10.0.0

Instance details

Defined in Data.Typeable.Internal

Show Exp
Instance details

Defined in Language.Haskell.TH.Syntax

Show Match
Instance details

Defined in Language.Haskell.TH.Syntax

Show Clause
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pat
Instance details

Defined in Language.Haskell.TH.Syntax

Show Type
Instance details

Defined in Language.Haskell.TH.Syntax

Show Dec
Instance details

Defined in Language.Haskell.TH.Syntax

Show Name
Instance details

Defined in Language.Haskell.TH.Syntax

Show FunDep
Instance details

Defined in Language.Haskell.TH.Syntax

Show InjectivityAnn
Instance details

Defined in Language.Haskell.TH.Syntax

Show Overlap
Instance details

Defined in Language.Haskell.TH.Syntax

Show ()

Since: base-2.1

Instance details

Defined in GHC.Show

Show TyCon

Since: base-2.1

Instance details

Defined in GHC.Show

Show Module

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show TrName

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show KindRep
Instance details

Defined in GHC.Show

Show TypeLitSort

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show ByteString
Instance details

Defined in Data.ByteString.Internal

Show ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Show Builder
Instance details

Defined in Data.Text.Internal.Builder

Show Scientific

See formatScientific if you need more control over the rendering.

Instance details

Defined in Data.Scientific

Show JSONPathElement
Instance details

Defined in Data.Aeson.Types.Internal

Show Value

Since version 1.5.6.0 version object values are printed in lexicographic key order

>>> toJSON $ H.fromList [("a", True), ("z", False)]
Object (fromList [("a",Bool True),("z",Bool False)])
>>> toJSON $ H.fromList [("z", False), ("a", True)]
Object (fromList [("a",Bool True),("z",Bool False)])
Instance details

Defined in Data.Aeson.Types.Internal

Show DotNetTime
Instance details

Defined in Data.Aeson.Types.Internal

Show Options
Instance details

Defined in Data.Aeson.Types.Internal

Show SumEncoding
Instance details

Defined in Data.Aeson.Types.Internal

Show Key
Instance details

Defined in Data.Aeson.Key

Show Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Show AsyncCancelled
Instance details

Defined in Control.Concurrent.Async

Show ExceptionInLinkedThread
Instance details

Defined in Control.Concurrent.Async

Show Pos
Instance details

Defined in Data.Attoparsec.Internal.Types

Show More
Instance details

Defined in Data.Attoparsec.Internal.Types

Show Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Show StaticPtrInfo

Since: base-4.8.0.0

Instance details

Defined in GHC.StaticPtr

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

Show PatternMatchFail

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Show NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show NestedAtomically

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Show ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Show CDev
Instance details

Defined in System.Posix.Types

Show CIno
Instance details

Defined in System.Posix.Types

Show CMode
Instance details

Defined in System.Posix.Types

Show COff
Instance details

Defined in System.Posix.Types

Show CPid
Instance details

Defined in System.Posix.Types

Show CSsize
Instance details

Defined in System.Posix.Types

Show CGid
Instance details

Defined in System.Posix.Types

Show CNlink
Instance details

Defined in System.Posix.Types

Show CUid
Instance details

Defined in System.Posix.Types

Show CCc
Instance details

Defined in System.Posix.Types

Show CSpeed
Instance details

Defined in System.Posix.Types

Show CTcflag
Instance details

Defined in System.Posix.Types

Show CRLim
Instance details

Defined in System.Posix.Types

Show CBlkSize
Instance details

Defined in System.Posix.Types

Show CBlkCnt
Instance details

Defined in System.Posix.Types

Show CClockId
Instance details

Defined in System.Posix.Types

Show CFsBlkCnt
Instance details

Defined in System.Posix.Types

Show CFsFilCnt
Instance details

Defined in System.Posix.Types

Show CId
Instance details

Defined in System.Posix.Types

Show CKey
Instance details

Defined in System.Posix.Types

Show CSocklen
Instance details

Defined in System.Posix.Types

Show CNfds
Instance details

Defined in System.Posix.Types

Show Fd
Instance details

Defined in System.Posix.Types

Show BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show AllocationLimitExceeded

Since: base-4.7.1.0

Instance details

Defined in GHC.IO.Exception

Show CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Show AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Show AsyncException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Show ExitCode
Instance details

Defined in GHC.IO.Exception

Show IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show HandleType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Show IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Show ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show SomeSymbol

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeLits

Show SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Show CChar
Instance details

Defined in Foreign.C.Types

Show CSChar
Instance details

Defined in Foreign.C.Types

Show CUChar
Instance details

Defined in Foreign.C.Types

Show CShort
Instance details

Defined in Foreign.C.Types

Show CUShort
Instance details

Defined in Foreign.C.Types

Show CInt
Instance details

Defined in Foreign.C.Types

Show CUInt
Instance details

Defined in Foreign.C.Types

Show CLong
Instance details

Defined in Foreign.C.Types

Show CULong
Instance details

Defined in Foreign.C.Types

Show CLLong
Instance details

Defined in Foreign.C.Types

Show CULLong
Instance details

Defined in Foreign.C.Types

Show CBool
Instance details

Defined in Foreign.C.Types

Show CFloat
Instance details

Defined in Foreign.C.Types

Show CDouble
Instance details

Defined in Foreign.C.Types

Show CPtrdiff
Instance details

Defined in Foreign.C.Types

Show CSize
Instance details

Defined in Foreign.C.Types

Show CWchar
Instance details

Defined in Foreign.C.Types

Show CSigAtomic
Instance details

Defined in Foreign.C.Types

Show CClock
Instance details

Defined in Foreign.C.Types

Show CTime
Instance details

Defined in Foreign.C.Types

Show CUSeconds
Instance details

Defined in Foreign.C.Types

Show CSUSeconds
Instance details

Defined in Foreign.C.Types

Show CIntPtr
Instance details

Defined in Foreign.C.Types

Show CUIntPtr
Instance details

Defined in Foreign.C.Types

Show CIntMax
Instance details

Defined in Foreign.C.Types

Show CUIntMax
Instance details

Defined in Foreign.C.Types

Show WordPtr
Instance details

Defined in Foreign.Ptr

Show IntPtr
Instance details

Defined in Foreign.Ptr

Show IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Show GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Show SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Show ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Show JSValue
Instance details

Defined in Text.JSON.Canonical.Types

Show JSString
Instance details

Defined in Text.JSON.Canonical.Types

Show Int54
Instance details

Defined in Text.JSON.Canonical.Types

Show ByteArray

Behavior changed in 0.7.2.0. Before 0.7.2.0, this instance rendered 8-bit words less than 16 as a single hexadecimal digit (e.g. 13 was 0xD ). Starting with 0.7.2.0, all 8-bit words are represented as two digits (e.g. 13 is 0x0D ).

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.ByteArray

Show TokenType
Instance details

Defined in Codec.CBOR.Decoding

Show ByteArray
Instance details

Defined in Codec.CBOR.ByteArray

Show SlicedByteArray
Instance details

Defined in Codec.CBOR.ByteArray.Sliced

Show IntSet
Instance details

Defined in Data.IntSet.Internal

Show DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Show NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Show Extension
Instance details

Defined in GHC.LanguageExtensions.Type

Show ForeignSrcLang
Instance details

Defined in GHC.ForeignSrcLang.Type

Show Box
Instance details

Defined in GHC.Exts.Heap.Closures

Show PrimType
Instance details

Defined in GHC.Exts.Heap.Closures

Show StgInfoTable
Instance details

Defined in GHC.Exts.Heap.InfoTable.Types

Show ClosureType
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Show Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Show TextDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Style
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Mode
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show FatalError
Instance details

Defined in Protolude.Panic

Show UnicodeException
Instance details

Defined in Data.Text.Encoding.Error

Show StdGen
Instance details

Defined in System.Random.Internal

Show ModName
Instance details

Defined in Language.Haskell.TH.Syntax

Show PkgName
Instance details

Defined in Language.Haskell.TH.Syntax

Show Module
Instance details

Defined in Language.Haskell.TH.Syntax

Show OccName
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameFlavour
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameSpace
Instance details

Defined in Language.Haskell.TH.Syntax

Show Loc
Instance details

Defined in Language.Haskell.TH.Syntax

Show Info
Instance details

Defined in Language.Haskell.TH.Syntax

Show ModuleInfo
Instance details

Defined in Language.Haskell.TH.Syntax

Show Fixity
Instance details

Defined in Language.Haskell.TH.Syntax

Show FixityDirection
Instance details

Defined in Language.Haskell.TH.Syntax

Show Lit
Instance details

Defined in Language.Haskell.TH.Syntax

Show Bytes
Instance details

Defined in Language.Haskell.TH.Syntax

Show Body
Instance details

Defined in Language.Haskell.TH.Syntax

Show Guard
Instance details

Defined in Language.Haskell.TH.Syntax

Show Stmt
Instance details

Defined in Language.Haskell.TH.Syntax

Show Range
Instance details

Defined in Language.Haskell.TH.Syntax

Show DerivClause
Instance details

Defined in Language.Haskell.TH.Syntax

Show DerivStrategy
Instance details

Defined in Language.Haskell.TH.Syntax

Show TypeFamilyHead
Instance details

Defined in Language.Haskell.TH.Syntax

Show TySynEqn
Instance details

Defined in Language.Haskell.TH.Syntax

Show Foreign
Instance details

Defined in Language.Haskell.TH.Syntax

Show Callconv
Instance details

Defined in Language.Haskell.TH.Syntax

Show Safety
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pragma
Instance details

Defined in Language.Haskell.TH.Syntax

Show Inline
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleMatch
Instance details

Defined in Language.Haskell.TH.Syntax

Show Phases
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Show AnnTarget
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceUnpackedness
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Show DecidedStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Show Con
Instance details

Defined in Language.Haskell.TH.Syntax

Show Bang
Instance details

Defined in Language.Haskell.TH.Syntax

Show PatSynDir
Instance details

Defined in Language.Haskell.TH.Syntax

Show PatSynArgs
Instance details

Defined in Language.Haskell.TH.Syntax

Show TyVarBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Show FamilyResultSig
Instance details

Defined in Language.Haskell.TH.Syntax

Show TyLit
Instance details

Defined in Language.Haskell.TH.Syntax

Show Role
Instance details

Defined in Language.Haskell.TH.Syntax

Show AnnLookup
Instance details

Defined in Language.Haskell.TH.Syntax

Show Decoding
Instance details

Defined in Data.Text.Encoding

Show ShortText
Instance details

Defined in Data.Text.Short.Internal

Show ZonedTime
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Show LocalTime
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Show TimeOfDay
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Show TimeZone

This only shows the time zone name, or offset if the name is empty.

Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

Show UnpackedUUID
Instance details

Defined in Data.UUID.Types.Internal

Methods

showsPrec :: Int -> UnpackedUUID -> ShowS Source #

show :: UnpackedUUID -> String Source #

showList :: [UnpackedUUID] -> ShowS Source #

Show UUID

Pretty prints a UUID (without quotation marks). See also toString .

>>> show nil
"00000000-0000-0000-0000-000000000000"
Instance details

Defined in Data.UUID.Types.Internal

Show CodePoint
Instance details

Defined in Data.Text.Encoding

Show DecoderState
Instance details

Defined in Data.Text.Encoding

Methods

showsPrec :: Int -> DecoderState -> ShowS Source #

show :: DecoderState -> String Source #

showList :: [DecoderState] -> ShowS Source #

Show CountFailure Source #
Instance details

Defined in Cardano.Prelude.GHC.Heap.Size

Show ClosureTreeOptions Source #
Instance details

Defined in Cardano.Prelude.GHC.Heap.Tree

Show TraverseCyclicClosures Source #
Instance details

Defined in Cardano.Prelude.GHC.Heap.Tree

Show TreeDepth Source #
Instance details

Defined in Cardano.Prelude.GHC.Heap.Tree

Show SchemaError Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

Show a => Show [a]

Since: base-2.1

Instance details

Defined in GHC.Show

Show a => Show ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Show a => Show ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Show ( FunPtr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Show p => Show ( Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Show a => Show ( Solo a)
Instance details

Defined in Data.Tuple.Solo

Show a => Show ( IResult a)
Instance details

Defined in Data.Aeson.Types.Internal

Show a => Show ( Result a)
Instance details

Defined in Data.Aeson.Types.Internal

Show v => Show ( KeyMap v)
Instance details

Defined in Data.Aeson.KeyMap

Show a => Show ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Show a => Show ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show m => Show ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Show a => Show ( Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Show a => Show ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show ( Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Show a => Show ( NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show a => Show ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Show a => Show ( Tree a)
Instance details

Defined in Data.Tree

Show a => Show ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Show a => Show ( ViewL a)
Instance details

Defined in Data.Sequence.Internal

Show a => Show ( ViewR a)
Instance details

Defined in Data.Sequence.Internal

Show a => Show ( Set a)
Instance details

Defined in Data.Set.Internal

Show1 f => Show ( Fix f)
Instance details

Defined in Data.Fix

( Functor f, Show1 f) => Show ( Mu f)
Instance details

Defined in Data.Fix

( Functor f, Show1 f) => Show ( Nu f)
Instance details

Defined in Data.Fix

Show a => Show ( DNonEmpty a)
Instance details

Defined in Data.DList.DNonEmpty.Internal

Show a => Show ( DList a)
Instance details

Defined in Data.DList.Internal

Show a => Show ( Hex a)
Instance details

Defined in Data.Text.Format.Types

Show a => Show ( Shown a)
Instance details

Defined in Data.Text.Format.Types

Show b => Show ( GenClosure b)
Instance details

Defined in GHC.Exts.Heap.Closures

Show a => Show ( Hashed a)
Instance details

Defined in Data.Hashable.Class

Show ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show a => Show ( AnnotDetails a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show a => Show ( Span a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

( Show a, Prim a) => Show ( PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Show a => Show ( SmallArray a)
Instance details

Defined in Data.Primitive.SmallArray

Show a => Show ( Array a)
Instance details

Defined in Data.Primitive.Array

Show g => Show ( AtomicGen g)
Instance details

Defined in System.Random.Stateful

Show g => Show ( IOGen g)
Instance details

Defined in System.Random.Stateful

Show g => Show ( STGen g)
Instance details

Defined in System.Random.Stateful

Show g => Show ( TGen g)
Instance details

Defined in System.Random.Stateful

Show g => Show ( StateGen g)
Instance details

Defined in System.Random.Internal

Show a => Show ( Maybe a)
Instance details

Defined in Data.Strict.Maybe

Show a => Show ( HashSet a)
Instance details

Defined in Data.HashSet.Internal

( Show a, Storable a) => Show ( Vector a)
Instance details

Defined in Data.Vector.Storable

( Show a, Prim a) => Show ( Vector a)
Instance details

Defined in Data.Vector.Primitive

Show a => Show ( Vector a)
Instance details

Defined in Data.Vector

( Show a, Show b) => Show ( Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

Show ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( TypeRep a)
Instance details

Defined in Data.Typeable.Internal

( Show a, Show b) => Show (a, b)

Since: base-2.1

Instance details

Defined in GHC.Show

( Show k, Show a) => Show ( Map k a)
Instance details

Defined in Data.Map.Internal

( Show k, Show v) => Show ( HashMap k v)
Instance details

Defined in Data.HashMap.Internal

Show ( ST s a)

Since: base-2.1

Instance details

Defined in GHC.ST

( Ix ix, Show ix, Show e, IArray UArray e) => Show ( UArray ix e)
Instance details

Defined in Data.Array.Base

( Ix a, Show a, Show b) => Show ( Array a b)

Since: base-2.1

Instance details

Defined in GHC.Arr

( Show i, Show r) => Show ( IResult i r)
Instance details

Defined in Data.Attoparsec.Internal.Types

HasResolution a => Show ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

( Show a, Show b) => Show ( Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

( Show1 m, Show a) => Show ( ListT m a)
Instance details

Defined in Control.Monad.Trans.List

( Show a, Show b) => Show ( These a b)
Instance details

Defined in Data.These

( Show a, Show b) => Show ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

( Show a, Show b) => Show ( These a b)
Instance details

Defined in Data.Strict.These

( Show a, Show b) => Show ( Either a b)
Instance details

Defined in Data.Strict.Either

( Show1 m, Show a) => Show ( MaybeT m a)
Instance details

Defined in Control.Monad.Trans.Maybe

Show (f p) => Show ( Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Show ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Float p)
Instance details

Defined in GHC.Generics

Show ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

( Show a, Show b, Show c) => Show (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Show

Show a => Show ( Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Show (f a) => Show ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Show (f a) => Show ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Show ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Show (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

( Show1 f, Show a) => Show ( IdentityT f a)
Instance details

Defined in Control.Monad.Trans.Identity

( Show e, Show1 m, Show a) => Show ( ErrorT e m a)
Instance details

Defined in Control.Monad.Trans.Error

( Show e, Show1 m, Show a) => Show ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

( Show w, Show1 m, Show a) => Show ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Show w, Show1 m, Show a) => Show ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Show b => Show ( Tagged s b)
Instance details

Defined in Data.Tagged

( Show1 f, Show1 g, Show a) => Show ( These1 f g a)
Instance details

Defined in Data.Functor.These

Show c => Show ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Show (f p), Show (g p)) => Show ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Show (f p), Show (g p)) => Show ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Show a, Show b, Show c, Show d) => Show (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d) -> ShowS Source #

show :: (a, b, c, d) -> String Source #

showList :: [(a, b, c, d)] -> ShowS Source #

( Show1 f, Show1 g, Show a) => Show ( Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Show1 f, Show1 g, Show a) => Show ( Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Show (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Show (f p) => Show ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Show (f (g p)) => Show ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e) -> ShowS Source #

show :: (a, b, c, d, e) -> String Source #

showList :: [(a, b, c, d, e)] -> ShowS Source #

( Show1 f, Show1 g, Show a) => Show ( Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Show (p b a) => Show ( Flip p a b)
Instance details

Defined in Data.Bifunctor.Flip

( Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS Source #

show :: (a, b, c, d, e, f) -> String Source #

showList :: [(a, b, c, d, e, f)] -> ShowS Source #

( Show (p a b), Show (q a b)) => Show ( Sum p q a b)
Instance details

Defined in Data.Bifunctor.Sum

( Show (f a b), Show (g a b)) => Show ( Product f g a b)
Instance details

Defined in Data.Bifunctor.Product

( Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS Source #

show :: (a, b, c, d, e, f, g) -> String Source #

showList :: [(a, b, c, d, e, f, g)] -> ShowS Source #

Show (f (p a b)) => Show ( Tannen f p a b)
Instance details

Defined in Data.Bifunctor.Tannen

( Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show (a, b, c, d, e, f, g, h)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h) -> ShowS Source #

show :: (a, b, c, d, e, f, g, h) -> String Source #

showList :: [(a, b, c, d, e, f, g, h)] -> ShowS Source #

( Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show (a, b, c, d, e, f, g, h, i)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i) -> ShowS Source #

show :: (a, b, c, d, e, f, g, h, i) -> String Source #

showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS Source #

Show (p (f a) (g b)) => Show ( Biff p f g a b)
Instance details

Defined in Data.Bifunctor.Biff

( Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => Show (a, b, c, d, e, f, g, h, i, j)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j) -> ShowS Source #

show :: (a, b, c, d, e, f, g, h, i, j) -> String Source #

showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS Source #

( Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => Show (a, b, c, d, e, f, g, h, i, j, k)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k) -> ShowS Source #

show :: (a, b, c, d, e, f, g, h, i, j, k) -> String Source #

showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS Source #

( Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => Show (a, b, c, d, e, f, g, h, i, j, k, l)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l) -> ShowS Source #

show :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String Source #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> ShowS Source #

( Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> ShowS Source #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String Source #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> ShowS Source #

( Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> ShowS Source #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String Source #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> ShowS Source #

( Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> ShowS Source #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String Source #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> ShowS Source #

class Typeable (a :: k) Source #

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#

class Monad m => MonadFail (m :: Type -> Type ) Source #

When a value is bound in do -notation, the pattern on the left hand side of <- might not match. In this case, this class provides a function to recover.

A Monad without a MonadFail instance may only be used in conjunction with pattern that always match, such as newtypes, tuples, data types with only a single data constructor, and irrefutable patterns ( ~pat ).

Instances of MonadFail should satisfy the following law: fail s should be a left zero for >>= ,

fail s >>= f  =  fail s

If your Monad is also MonadPlus , a popular definition is

fail _ = mzero

Since: base-4.9.0.0

Minimal complete definition

fail

Instances

Instances details
MonadFail []

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

MonadFail Q
Instance details

Defined in Language.Haskell.TH.Syntax

MonadFail IResult
Instance details

Defined in Data.Aeson.Types.Internal

MonadFail Result
Instance details

Defined in Data.Aeson.Types.Internal

MonadFail Parser
Instance details

Defined in Data.Aeson.Types.Internal

MonadFail ReadP

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

MonadFail DList
Instance details

Defined in Data.DList.Internal

MonadFail SmallArray
Instance details

Defined in Data.Primitive.SmallArray

MonadFail Array
Instance details

Defined in Data.Primitive.Array

MonadFail Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector

MonadFail P

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

MonadFail ( ST s)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

MonadFail ( Parser i)
Instance details

Defined in Data.Attoparsec.Internal.Types

MonadFail ( Decoder s)

Since: cborg-0.2.0.0

Instance details

Defined in Codec.CBOR.Decoding

Monad m => MonadFail ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

Monad m => MonadFail ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

MonadFail f => MonadFail ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

MonadFail m => MonadFail ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

( Monad m, Error e) => MonadFail ( ErrorT e m)
Instance details

Defined in Control.Monad.Trans.Error

MonadFail m => MonadFail ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

MonadFail m => MonadFail ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

MonadFail m => MonadFail ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

MonadFail m => MonadFail ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Strict

( Monoid w, MonadFail m) => MonadFail ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Monoid w, MonadFail m) => MonadFail ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

( Monoid w, MonadFail m) => MonadFail ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

( Monoid w, MonadFail m) => MonadFail ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Strict

class IsString a Source #

Class for string-like datastructures; used by the overloaded string extension (-XOverloadedStrings in GHC).

Minimal complete definition

fromString

Instances

Instances details
IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Lazy.Internal

IsString Builder
Instance details

Defined in Data.Text.Internal.Builder

IsString Value
Instance details

Defined in Data.Aeson.Types.Internal

IsString Key
Instance details

Defined in Data.Aeson.Key

IsString ShortByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Short.Internal

IsString JSString
Instance details

Defined in Text.JSON.Canonical.Types

IsString ByteArray
Instance details

Defined in Codec.CBOR.ByteArray

IsString SlicedByteArray
Instance details

Defined in Codec.CBOR.ByteArray.Sliced

IsString Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

IsString ShortText

Note : Surrogate pairs ( [U+D800 .. U+DFFF] ) in string literals are replaced by U+FFFD.

This matches the behaviour of IsString instance for Text .

Instance details

Defined in Data.Text.Short.Internal

a ~ Char => IsString [a]

(a ~ Char) context was introduced in 4.9.0.0

Since: base-2.1

Instance details

Defined in Data.String

IsString a => IsString ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

a ~ Char => IsString ( Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

a ~ Char => IsString ( DNonEmpty a)
Instance details

Defined in Data.DList.DNonEmpty.Internal

a ~ Char => IsString ( DList a)
Instance details

Defined in Data.DList.Internal

( IsString a, Hashable a) => IsString ( Hashed a)
Instance details

Defined in Data.Hashable.Class

IsString ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

a ~ r => IsString ( Format r a)

Useful instance for writing format string. With this you can write Foo instead of now "Foo!" .

Instance details

Defined in Formatting.Internal

IsString a => IsString ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

IsString a => IsString ( Tagged s a)
Instance details

Defined in Data.Tagged

class Functor f => Applicative (f :: Type -> Type ) where Source #

A functor with application, providing operations to

  • embed pure expressions ( pure ), and
  • sequence computations and combine their results ( <*> and liftA2 ).

A minimal complete definition must include implementations of pure and of either <*> or liftA2 . If it defines both, then they must behave the same as their default definitions:

(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y

Further, any definition must satisfy the following:

Identity
pure id <*> v = v
Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
Homomorphism
pure f <*> pure x = pure (f x)
Interchange
u <*> pure y = pure ($ y) <*> u

The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:

As a consequence of these laws, the Functor instance for f will satisfy

It may be useful to note that supposing

forall x y. p (q x y) = f x . g y

it follows from the above that

liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v

If f is also a Monad , it should satisfy

(which implies that pure and <*> satisfy the applicative functor laws).

Minimal complete definition

pure , ( (<*>) | liftA2 )

Methods

pure :: a -> f a Source #

Lift a value.

(<*>) :: f (a -> b) -> f a -> f b infixl 4 Source #

Sequential application.

A few functors support an implementation of <*> that is more efficient than the default one.

Using ApplicativeDo : ' fs <*> as ' can be understood as the do expression

do f <- fs
   a <- as
   pure (f a)

liftA2 :: (a -> b -> c) -> f a -> f b -> f c Source #

Lift a binary function to actions.

Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*> .

This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap .

Using ApplicativeDo : ' liftA2 f as bs ' can be understood as the do expression

do a <- as
   b <- bs
   pure (f a b)

(*>) :: f a -> f b -> f b infixl 4 Source #

Sequence actions, discarding the value of the first argument.

' as *> bs ' can be understood as the do expression

do as
   bs

This is a tad complicated for our ApplicativeDo extension which will give it a Monad constraint. For an Applicative constraint we write it of the form

do _ <- as
   b <- bs
   pure b

(<*) :: f a -> f b -> f a infixl 4 Source #

Sequence actions, discarding the value of the second argument.

Using ApplicativeDo : ' as <* bs ' can be understood as the do expression

do a <- as
   bs
   pure a

Instances

Instances details
Applicative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> [a] Source #

(<*>) :: [a -> b] -> [a] -> [b] Source #

liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] Source #

(*>) :: [a] -> [b] -> [b] Source #

(<*) :: [a] -> [b] -> [a] Source #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Applicative Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Applicative Q
Instance details

Defined in Language.Haskell.TH.Syntax

Applicative Solo
Instance details

Defined in Data.Tuple.Solo

Applicative IResult
Instance details

Defined in Data.Aeson.Types.Internal

Applicative Result
Instance details

Defined in Data.Aeson.Types.Internal

Applicative Parser
Instance details

Defined in Data.Aeson.Types.Internal

Applicative Concurrently
Instance details

Defined in Control.Concurrent.Async

Applicative Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Applicative Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative ZipList
f <$> ZipList xs1 <*> ... <*> ZipList xsN
    = ZipList (zipWithN f xs1 ... xsN)

where zipWithN refers to the zipWith function of the appropriate arity ( zipWith , zipWith3 , zipWith4 , ...). For example:

(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
    = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
    = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}

Since: base-2.1

Instance details

Defined in Control.Applicative

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Applicative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Applicative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Applicative Tree
Instance details

Defined in Data.Tree

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Applicative DNonEmpty
Instance details

Defined in Data.DList.DNonEmpty.Internal

Applicative DList
Instance details

Defined in Data.DList.Internal

Applicative SmallArray
Instance details

Defined in Data.Primitive.SmallArray

Applicative Array
Instance details

Defined in Data.Primitive.Array

Applicative Vector
Instance details

Defined in Data.Vector

Applicative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> P a Source #

(<*>) :: P (a -> b) -> P a -> P b Source #

liftA2 :: (a -> b -> c) -> P a -> P b -> P c Source #

(*>) :: P a -> P b -> P b Source #

(<*) :: P a -> P b -> P a Source #

Applicative ( Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Applicative ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Monoid a => Applicative ( (,) a)

For tuples, the Monoid constraint on a determines how the first values merge. For example, String s concatenate:

("hello ", (+15)) <*> ("world!", 2002)
("hello world!",2017)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, a0) Source #

(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) Source #

liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) Source #

(*>) :: (a, a0) -> (a, b) -> (a, b) Source #

(<*) :: (a, a0) -> (a, b) -> (a, a0) Source #

Applicative ( ST s)

Since: base-4.4.0.0

Instance details

Defined in GHC.ST

Methods

pure :: a -> ST s a Source #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b Source #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c Source #

(*>) :: ST s a -> ST s b -> ST s b Source #

(<*) :: ST s a -> ST s b -> ST s a Source #

Applicative ( Parser i)
Instance details

Defined in Data.Attoparsec.Internal.Types

Monad m => Applicative ( WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Arrow a => Applicative ( ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Applicative ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Applicative ( Decoder s)

Since: cborg-0.2.0.0

Instance details

Defined in Codec.CBOR.Decoding

Applicative m => Applicative ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

Semigroup a => Applicative ( These a)
Instance details

Defined in Data.These

Semigroup a => Applicative ( These a)
Instance details

Defined in Data.Strict.These

( Functor m, Monad m) => Applicative ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

Applicative f => Applicative ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

( Monoid a, Monoid b) => Applicative ( (,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, b, a0) Source #

(<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) Source #

liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) Source #

(*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) Source #

(<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) Source #

Arrow a => Applicative ( WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Applicative m => Applicative ( Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Monoid m => Applicative ( Const m :: Type -> Type )

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Applicative f => Applicative ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a Source #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b Source #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c Source #

(*>) :: Ap f a -> Ap f b -> Ap f b Source #

(<*) :: Ap f a -> Ap f b -> Ap f a Source #

Applicative f => Applicative ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative m => Applicative ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

( Applicative f, Monad f) => Applicative ( WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

( Functor m, Monad m) => Applicative ( ErrorT e m)
Instance details

Defined in Control.Monad.Trans.Error

( Functor m, Monad m) => Applicative ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Applicative m => Applicative ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

( Functor m, Monad m) => Applicative ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

( Functor m, Monad m) => Applicative ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Strict

( Monoid w, Applicative m) => Applicative ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Monoid w, Applicative m) => Applicative ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Applicative ( Tagged s)
Instance details

Defined in Data.Tagged

Applicative ((->) r :: Type -> Type )

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> r -> a Source #

(<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b Source #

liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c Source #

(*>) :: (r -> a) -> (r -> b) -> r -> b Source #

(<*) :: (r -> a) -> (r -> b) -> r -> a Source #

Monoid c => Applicative ( K1 i c :: Type -> Type )

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> K1 i c a Source #

(<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b Source #

liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 Source #

(*>) :: K1 i c a -> K1 i c b -> K1 i c b Source #

(<*) :: K1 i c a -> K1 i c b -> K1 i c a Source #

( Applicative f, Applicative g) => Applicative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :*: g) a Source #

(<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b Source #

liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c Source #

(*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b Source #

(<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a Source #

( Monoid a, Monoid b, Monoid c) => Applicative ( (,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, b, c, a0) Source #

(<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) Source #

liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) Source #

(*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) Source #

(<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) Source #

( Applicative f, Applicative g) => Applicative ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Monad f, Applicative f) => Applicative ( WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

( Applicative f, Monad f) => Applicative ( WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Applicative f => Applicative ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> M1 i c f a Source #

(<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b Source #

liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 Source #

(*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b Source #

(<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a Source #

( Applicative f, Applicative g) => Applicative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :.: g) a Source #

(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b Source #

liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c Source #

(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b Source #

(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a Source #

( Applicative f, Applicative g) => Applicative ( Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

( Monad f, Applicative f) => Applicative ( WhenMatched f k x y)

Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMatched f k x y a Source #

(<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b Source #

liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c Source #

(*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b Source #

(<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a Source #

( Monoid w, Functor m, Monad m) => Applicative ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

pure :: a -> RWST r w s m a Source #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c Source #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a Source #

( Monoid w, Functor m, Monad m) => Applicative ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

pure :: a -> RWST r w s m a Source #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c Source #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a Source #

class Foldable (t :: Type -> Type ) where Source #

Data structures that can be folded.

For example, given a data type

data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

instance Foldable Tree where
   foldMap f Empty = mempty
   foldMap f (Leaf x) = f x
   foldMap f (Node l k r) = foldMap f l `mappend` f k `mappend` foldMap f r

This is suitable even for abstract types, as the monoid is assumed to satisfy the monoid laws. Alternatively, one could define foldr :

instance Foldable Tree where
   foldr f z Empty = z
   foldr f z (Leaf x) = f x z
   foldr f z (Node l k r) = foldr f (f k (foldr f z r)) l

Foldable instances are expected to satisfy the following laws:

foldr f z t = appEndo (foldMap (Endo . f) t ) z
foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z
fold = foldMap id
length = getSum . foldMap (Sum . const  1)

sum , product , maximum , and minimum should all be essentially equivalent to foldMap forms, such as

sum = getSum . foldMap Sum

but may be less defined.

If the type is also a Functor instance, it should satisfy

foldMap f = fold . fmap f

which implies that

foldMap f . fmap g = foldMap (f . g)

Minimal complete definition

foldMap | foldr

Methods

fold :: Monoid m => t m -> m Source #

Combine the elements of a structure using a monoid.

foldMap :: Monoid m => (a -> m) -> t a -> m Source #

Map each element of the structure to a monoid, and combine the results.

foldr :: (a -> b -> b) -> b -> t a -> b Source #

Right-associative fold of a structure.

In the case of lists, foldr , when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left:

foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)

Note that, since the head of the resulting expression is produced by an application of the operator to the first element of the list, foldr can produce a terminating expression from an infinite list.

For a general Foldable structure this should be semantically identical to,

foldr f z = foldr f z . toList

foldr' :: (a -> b -> b) -> b -> t a -> b Source #

Right-associative fold of a structure, but with strict application of the operator.

Since: base-4.6.0.0

foldl :: (b -> a -> b) -> b -> t a -> b Source #

Left-associative fold of a structure.

In the case of lists, foldl , when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn

Note that to produce the outermost application of the operator the entire input list must be traversed. This means that foldl' will diverge if given an infinite list.

Also note that if you want an efficient left-fold, you probably want to use foldl' instead of foldl . The reason for this is that latter does not force the "inner" results (e.g. z `f` x1 in the above example) before applying them to the operator (e.g. to (`f` x2) ). This results in a thunk chain \(\mathcal{O}(n)\) elements long, which then must be evaluated from the outside-in.

For a general Foldable structure this should be semantically identical to,

foldl f z = foldl f z . toList

foldl' :: (b -> a -> b) -> b -> t a -> b Source #

Left-associative fold of a structure but with strict application of the operator.

This ensures that each step of the fold is forced to weak head normal form before being applied, avoiding the collection of thunks that would otherwise occur. This is often what you want to strictly reduce a finite list to a single, monolithic result (e.g. length ).

For a general Foldable structure this should be semantically identical to,

foldl' f z = foldl' f z . toList

Since: base-4.6.0.0

toList :: t a -> [a] Source #

List of elements of a structure, from left to right.

Since: base-4.8.0.0

null :: t a -> Bool Source #

Test whether the structure is empty. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

Since: base-4.8.0.0

elem :: Eq a => a -> t a -> Bool infix 4 Source #

Does the element occur in the structure?

Since: base-4.8.0.0

maximum :: Ord a => t a -> a Source #

The largest element of a non-empty structure.

Since: base-4.8.0.0

minimum :: Ord a => t a -> a Source #

The least element of a non-empty structure.

Since: base-4.8.0.0

Instances

Instances details
Foldable []

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => [m] -> m Source #

foldMap :: Monoid m => (a -> m) -> [a] -> m Source #

foldMap' :: Monoid m => (a -> m) -> [a] -> m Source #

foldr :: (a -> b -> b) -> b -> [a] -> b Source #

foldr' :: (a -> b -> b) -> b -> [a] -> b Source #

foldl :: (b -> a -> b) -> b -> [a] -> b Source #

foldl' :: (b -> a -> b) -> b -> [a] -> b Source #

foldr1 :: (a -> a -> a) -> [a] -> a Source #

foldl1 :: (a -> a -> a) -> [a] -> a Source #

toList :: [a] -> [a] Source #

null :: [a] -> Bool Source #

length :: [a] -> Int Source #

elem :: Eq a => a -> [a] -> Bool Source #

maximum :: Ord a => [a] -> a Source #

minimum :: Ord a => [a] -> a Source #

sum :: Num a => [a] -> a Source #

product :: Num a => [a] -> a Source #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Foldable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable Solo
Instance details

Defined in Data.Tuple.Solo

Foldable IResult
Instance details

Defined in Data.Aeson.Types.Internal

Foldable Result
Instance details

Defined in Data.Aeson.Types.Internal

Foldable KeyMap
Instance details

Defined in Data.Aeson.KeyMap

Foldable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Foldable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Foldable Tree
Instance details

Defined in Data.Tree

Foldable Seq
Instance details

Defined in Data.Sequence.Internal

Foldable FingerTree
Instance details

Defined in Data.Sequence.Internal

Foldable Digit
Instance details

Defined in Data.Sequence.Internal

Foldable Node
Instance details

Defined in Data.Sequence.Internal

Foldable Elem
Instance details

Defined in Data.Sequence.Internal

Foldable ViewL
Instance details

Defined in Data.Sequence.Internal

Foldable ViewR
Instance details

Defined in Data.Sequence.Internal

Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Foldable DNonEmpty
Instance details

Defined in Data.DList.DNonEmpty.Internal

Foldable DList
Instance details

Defined in Data.DList.Internal

Foldable GenClosure
Instance details

Defined in GHC.Exts.Heap.Closures

Foldable Hashed
Instance details

Defined in Data.Hashable.Class

Foldable SmallArray
Instance details

Defined in Data.Primitive.SmallArray

Foldable Array
Instance details

Defined in Data.Primitive.Array

Foldable Maybe
Instance details

Defined in Data.Strict.Maybe

Foldable HashSet
Instance details

Defined in Data.HashSet.Internal

Foldable Vector
Instance details

Defined in Data.Vector

Foldable ( Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

toList :: Either a a0 -> [a0] Source #

null :: Either a a0 -> Bool Source #

length :: Either a a0 -> Int Source #

elem :: Eq a0 => a0 -> Either a a0 -> Bool Source #

maximum :: Ord a0 => Either a a0 -> a0 Source #

minimum :: Ord a0 => Either a a0 -> a0 Source #

sum :: Num a0 => Either a a0 -> a0 Source #

product :: Num a0 => Either a a0 -> a0 Source #

Foldable ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( (,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (a, m) -> m Source #

foldMap :: Monoid m => (a0 -> m) -> (a, a0) -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> (a, a0) -> m Source #

foldr :: (a0 -> b -> b) -> b -> (a, a0) -> b Source #

foldr' :: (a0 -> b -> b) -> b -> (a, a0) -> b Source #

foldl :: (b -> a0 -> b) -> b -> (a, a0) -> b Source #

foldl' :: (b -> a0 -> b) -> b -> (a, a0) -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

toList :: (a, a0) -> [a0] Source #

null :: (a, a0) -> Bool Source #

length :: (a, a0) -> Int Source #

elem :: Eq a0 => a0 -> (a, a0) -> Bool Source #

maximum :: Ord a0 => (a, a0) -> a0 Source #

minimum :: Ord a0 => (a, a0) -> a0 Source #

sum :: Num a0 => (a, a0) -> a0 Source #

product :: Num a0 => (a, a0) -> a0 Source #

Foldable ( Map k)

Folds in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m Source #

foldMap :: Monoid m => (a -> m) -> Map k a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m Source #

foldr :: (a -> b -> b) -> b -> Map k a -> b Source #

foldr' :: (a -> b -> b) -> b -> Map k a -> b Source #

foldl :: (b -> a -> b) -> b -> Map k a -> b Source #

foldl' :: (b -> a -> b) -> b -> Map k a -> b Source #

foldr1 :: (a -> a -> a) -> Map k a -> a Source #

foldl1 :: (a -> a -> a) -> Map k a -> a Source #

toList :: Map k a -> [a] Source #

null :: Map k a -> Bool Source #

length :: Map k a -> Int Source #

elem :: Eq a => a -> Map k a -> Bool Source #

maximum :: Ord a => Map k a -> a Source #

minimum :: Ord a => Map k a -> a Source #

sum :: Num a => Map k a -> a Source #

product :: Num a => Map k a -> a Source #

Foldable ( HashMap k)
Instance details

Defined in Data.HashMap.Internal

Foldable ( Array i)

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable ( Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Arg a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Arg a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Arg a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Arg a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 Source #

toList :: Arg a a0 -> [a0] Source #

null :: Arg a a0 -> Bool Source #

length :: Arg a a0 -> Int Source #

elem :: Eq a0 => a0 -> Arg a a0 -> Bool Source #

maximum :: Ord a0 => Arg a a0 -> a0 Source #

minimum :: Ord a0 => Arg a a0 -> a0 Source #

sum :: Num a0 => Arg a a0 -> a0 Source #

product :: Num a0 => Arg a a0 -> a0 Source #

Foldable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Foldable f => Foldable ( ListT f)
Instance details

Defined in Control.Monad.Trans.List

Foldable ( These a)
Instance details

Defined in Data.These

Methods

fold :: Monoid m => These a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> These a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> These a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> These a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> These a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> These a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> These a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 Source #

toList :: These a a0 -> [a0] Source #

null :: These a a0 -> Bool Source #

length :: These a a0 -> Int Source #

elem :: Eq a0 => a0 -> These a a0 -> Bool Source #

maximum :: Ord a0 => These a a0 -> a0 Source #

minimum :: Ord a0 => These a a0 -> a0 Source #

sum :: Num a0 => These a a0 -> a0 Source #

product :: Num a0 => These a a0 -> a0 Source #

Foldable ( Pair e)
Instance details

Defined in Data.Strict.Tuple

Foldable ( These a)
Instance details

Defined in Data.Strict.These

Methods

fold :: Monoid m => These a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> These a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> These a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> These a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> These a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> These a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> These a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 Source #

toList :: These a a0 -> [a0] Source #

null :: These a a0 -> Bool Source #

length :: These a a0 -> Int Source #

elem :: Eq a0 => a0 -> These a a0 -> Bool Source #

maximum :: Ord a0 => These a a0 -> a0 Source #

minimum :: Ord a0 => These a a0 -> a0 Source #

sum :: Num a0 => These a a0 -> a0 Source #

product :: Num a0 => These a a0 -> a0 Source #

Foldable ( Either e)
Instance details

Defined in Data.Strict.Either

Foldable f => Foldable ( MaybeT f)
Instance details

Defined in Control.Monad.Trans.Maybe

Foldable f => Foldable ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( Const m :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Functor.Const

Foldable f => Foldable ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Ap f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldr :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldl :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldr1 :: (a -> a -> a) -> Ap f a -> a Source #

foldl1 :: (a -> a -> a) -> Ap f a -> a Source #

toList :: Ap f a -> [a] Source #

null :: Ap f a -> Bool Source #

length :: Ap f a -> Int Source #

elem :: Eq a => a -> Ap f a -> Bool Source #

maximum :: Ord a => Ap f a -> a Source #

minimum :: Ord a => Ap f a -> a Source #

sum :: Num a => Ap f a -> a Source #

product :: Num a => Ap f a -> a Source #

Foldable f => Foldable ( Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Alt f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Alt f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Alt f a -> m Source #

foldr :: (a -> b -> b) -> b -> Alt f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Alt f a -> b Source #

foldl :: (b -> a -> b) -> b -> Alt f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Alt f a -> b Source #

foldr1 :: (a -> a -> a) -> Alt f a -> a Source #

foldl1 :: (a -> a -> a) -> Alt f a -> a Source #

toList :: Alt f a -> [a] Source #

null :: Alt f a -> Bool Source #

length :: Alt f a -> Int Source #

elem :: Eq a => a -> Alt f a -> Bool Source #

maximum :: Ord a => Alt f a -> a Source #

minimum :: Ord a => Alt f a -> a Source #

sum :: Num a => Alt f a -> a Source #

product :: Num a => Alt f a -> a Source #

Foldable f => Foldable ( IdentityT f)
Instance details

Defined in Control.Monad.Trans.Identity

Foldable f => Foldable ( ErrorT e f)
Instance details

Defined in Control.Monad.Trans.Error

Methods

fold :: Monoid m => ErrorT e f m -> m Source #

foldMap :: Monoid m => (a -> m) -> ErrorT e f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ErrorT e f a -> m Source #

foldr :: (a -> b -> b) -> b -> ErrorT e f a -> b Source #

foldr' :: (a -> b -> b) -> b -> ErrorT e f a -> b Source #

foldl :: (b -> a -> b) -> b -> ErrorT e f a -> b Source #

foldl' :: (b -> a -> b) -> b -> ErrorT e f a -> b Source #

foldr1 :: (a -> a -> a) -> ErrorT e f a -> a Source #

foldl1 :: (a -> a -> a) -> ErrorT e f a -> a Source #

toList :: ErrorT e f a -> [a] Source #

null :: ErrorT e f a -> Bool Source #

length :: ErrorT e f a -> Int Source #

elem :: Eq a => a -> ErrorT e f a -> Bool Source #

maximum :: Ord a => ErrorT e f a -> a Source #

minimum :: Ord a => ErrorT e f a -> a Source #

sum :: Num a => ErrorT e f a -> a Source #

product :: Num a => ErrorT e f a -> a Source #

Foldable f => Foldable ( ExceptT e f)
Instance details

Defined in Control.Monad.Trans.Except

Foldable f => Foldable ( WriterT w f)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Foldable f => Foldable ( WriterT w f)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Foldable ( Tagged s)
Instance details

Defined in Data.Tagged

( Foldable f, Foldable g) => Foldable ( These1 f g)
Instance details

Defined in Data.Functor.These

Methods

fold :: Monoid m => These1 f g m -> m Source #

foldMap :: Monoid m => (a -> m) -> These1 f g a -> m Source #

foldMap' :: Monoid m => (a -> m) -> These1 f g a -> m Source #

foldr :: (a -> b -> b) -> b -> These1 f g a -> b Source #

foldr' :: (a -> b -> b) -> b -> These1 f g a -> b Source #

foldl :: (b -> a -> b) -> b -> These1 f g a -> b Source #

foldl' :: (b -> a -> b) -> b -> These1 f g a -> b Source #

foldr1 :: (a -> a -> a) -> These1 f g a -> a Source #

foldl1 :: (a -> a -> a) -> These1 f g a -> a Source #

toList :: These1 f g a -> [a] Source #

null :: These1 f g a -> Bool Source #

length :: These1 f g a -> Int Source #

elem :: Eq a => a -> These1 f g a -> Bool Source #

maximum :: Ord a => These1 f g a -> a Source #

minimum :: Ord a => These1 f g a -> a Source #

sum :: Num a => These1 f g a -> a Source #

product :: Num a => These1 f g a -> a Source #

Foldable ( K1 i c :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => K1 i c m -> m Source #

foldMap :: Monoid m => (a -> m) -> K1 i c a -> m Source #

foldMap' :: Monoid m => (a -> m) -> K1 i c a -> m Source #

foldr :: (a -> b -> b) -> b -> K1 i c a -> b Source #

foldr' :: (a -> b -> b) -> b -> K1 i c a -> b Source #

foldl :: (b -> a -> b) -> b -> K1 i c a -> b Source #

foldl' :: (b -> a -> b) -> b -> K1 i c a -> b Source #

foldr1 :: (a -> a -> a) -> K1 i c a -> a Source #

foldl1 :: (a -> a -> a) -> K1 i c a -> a Source #

toList :: K1 i c a -> [a] Source #

null :: K1 i c a -> Bool Source #

length :: K1 i c a -> Int Source #

elem :: Eq a => a -> K1 i c a -> Bool Source #

maximum :: Ord a => K1 i c a -> a Source #

minimum :: Ord a => K1 i c a -> a Source #

sum :: Num a => K1 i c a -> a Source #

product :: Num a => K1 i c a -> a Source #

( Foldable f, Foldable g) => Foldable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :+: g) m -> m Source #

foldMap :: Monoid m => (a -> m) -> (f :+: g) a -> m Source #

foldMap' :: Monoid m => (a -> m) -> (f :+: g) a -> m Source #

foldr :: (a -> b -> b) -> b -> (f :+: g) a -> b Source #

foldr' :: (a -> b -> b) -> b -> (f :+: g) a -> b Source #

foldl :: (b -> a -> b) -> b -> (f :+: g) a -> b Source #

foldl' :: (b -> a -> b) -> b -> (f :+: g) a -> b Source #

foldr1 :: (a -> a -> a) -> (f :+: g) a -> a Source #

foldl1 :: (a -> a -> a) -> (f :+: g) a -> a Source #

toList :: (f :+: g) a -> [a] Source #

null :: (f :+: g) a -> Bool Source #

length :: (f :+: g) a -> Int Source #

elem :: Eq a => a -> (f :+: g) a -> Bool Source #

maximum :: Ord a => (f :+: g) a -> a Source #

minimum :: Ord a => (f :+: g) a -> a Source #

sum :: Num a => (f :+: g) a -> a Source #

product :: Num a => (f :+: g) a -> a Source #

( Foldable f, Foldable g) => Foldable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :*: g) m -> m Source #

foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m Source #

foldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m Source #

foldr :: (a -> b -> b) -> b -> (f :*: g) a -> b Source #

foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b Source #

foldl :: (b -> a -> b) -> b -> (f :*: g) a -> b Source #

foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b Source #

foldr1 :: (a -> a -> a) -> (f :*: g) a -> a Source #

foldl1 :: (a -> a -> a) -> (f :*: g) a -> a Source #

toList :: (f :*: g) a -> [a] Source #

null :: (f :*: g) a -> Bool Source #

length :: (f :*: g) a -> Int Source #

elem :: Eq a => a -> (f :*: g) a -> Bool Source #

maximum :: Ord a => (f :*: g) a -> a Source #

minimum :: Ord a => (f :*: g) a -> a Source #

sum :: Num a => (f :*: g) a -> a Source #

product :: Num a => (f :*: g) a -> a Source #

( Foldable f, Foldable g) => Foldable ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Foldable f, Foldable g) => Foldable ( Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

fold :: Monoid m => Sum f g m -> m Source #

foldMap :: Monoid m => (a -> m) -> Sum f g a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Sum f g a -> m Source #

foldr :: (a -> b -> b) -> b -> Sum f g a -> b Source #

foldr' :: (a -> b -> b) -> b -> Sum f g a -> b Source #

foldl :: (b -> a -> b) -> b -> Sum f g a -> b Source #

foldl' :: (b -> a -> b) -> b -> Sum f g a -> b Source #

foldr1 :: (a -> a -> a) -> Sum f g a -> a Source #

foldl1 :: (a -> a -> a) -> Sum f g a -> a Source #

toList :: Sum f g a -> [a] Source #

null :: Sum f g a -> Bool Source #

length :: Sum f g a -> Int Source #

elem :: Eq a => a -> Sum f g a -> Bool Source #

maximum :: Ord a => Sum f g a -> a Source #

minimum :: Ord a => Sum f g a -> a Source #

sum :: Num a => Sum f g a -> a Source #

product :: Num a => Sum f g a -> a Source #

Foldable f => Foldable ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => M1 i c f m -> m Source #

foldMap :: Monoid m => (a -> m) -> M1 i c f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> M1 i c f a -> m Source #

foldr :: (a -> b -> b) -> b -> M1 i c f a -> b Source #

foldr' :: (a -> b -> b) -> b -> M1 i c f a -> b Source #

foldl :: (b -> a -> b) -> b -> M1 i c f a -> b Source #

foldl' :: (b -> a -> b) -> b -> M1 i c f a -> b Source #

foldr1 :: (a -> a -> a) -> M1 i c f a -> a Source #

foldl1 :: (a -> a -> a) -> M1 i c f a -> a Source #

toList :: M1 i c f a -> [a] Source #

null :: M1 i c f a -> Bool Source #

length :: M1 i c f a -> Int Source #

elem :: Eq a => a -> M1 i c f a -> Bool Source #

maximum :: Ord a => M1 i c f a -> a Source #

minimum :: Ord a => M1 i c f a -> a Source #

sum :: Num a => M1 i c f a -> a Source #

product :: Num a => M1 i c f a -> a Source #

( Foldable f, Foldable g) => Foldable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :.: g) m -> m Source #

foldMap :: Monoid m => (a -> m) -> (f :.: g) a -> m Source #

foldMap' :: Monoid m => (a -> m) -> (f :.: g) a -> m Source #

foldr :: (a -> b -> b) -> b -> (f :.: g) a -> b Source #

foldr' :: (a -> b -> b) -> b -> (f :.: g) a -> b Source #

foldl :: (b -> a -> b) -> b -> (f :.: g) a -> b Source #

foldl' :: (b -> a -> b) -> b -> (f :.: g) a -> b Source #

foldr1 :: (a -> a -> a) -> (f :.: g) a -> a Source #

foldl1 :: (a -> a -> a) -> (f :.: g) a -> a Source #

toList :: (f :.: g) a -> [a] Source #

null :: (f :.: g) a -> Bool Source #

length :: (f :.: g) a -> Int Source #

elem :: Eq a => a -> (f :.: g) a -> Bool Source #

maximum :: Ord a => (f :.: g) a -> a Source #

minimum :: Ord a => (f :.: g) a -> a Source #

sum :: Num a => (f :.: g) a -> a Source #

product :: Num a => (f :.: g) a -> a Source #

( Foldable f, Foldable g) => Foldable ( Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Bifoldable p => Foldable ( Flip p a)
Instance details

Defined in Data.Bifunctor.Flip

Methods

fold :: Monoid m => Flip p a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Flip p a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Flip p a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Flip p a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Flip p a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Flip p a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Flip p a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 Source #

toList :: Flip p a a0 -> [a0] Source #

null :: Flip p a a0 -> Bool Source #

length :: Flip p a a0 -> Int Source #

elem :: Eq a0 => a0 -> Flip p a a0 -> Bool Source #

maximum :: Ord a0 => Flip p a a0 -> a0 Source #

minimum :: Ord a0 => Flip p a a0 -> a0 Source #

sum :: Num a0 => Flip p a a0 -> a0 Source #

product :: Num a0 => Flip p a a0 -> a0 Source #

( Foldable (f a), Foldable (g a)) => Foldable ( Sum f g a)
Instance details

Defined in Data.Bifunctor.Sum

Methods

fold :: Monoid m => Sum f g a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 Source #

toList :: Sum f g a a0 -> [a0] Source #

null :: Sum f g a a0 -> Bool Source #

length :: Sum f g a a0 -> Int Source #

elem :: Eq a0 => a0 -> Sum f g a a0 -> Bool Source #

maximum :: Ord a0 => Sum f g a a0 -> a0 Source #

minimum :: Ord a0 => Sum f g a a0 -> a0 Source #

sum :: Num a0 => Sum f g a a0 -> a0 Source #

product :: Num a0 => Sum f g a a0 -> a0 Source #

( Foldable (f a), Foldable (g a)) => Foldable ( Product f g a)
Instance details

Defined in Data.Bifunctor.Product

Methods

fold :: Monoid m => Product f g a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Product f g a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Product f g a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Product f g a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Product f g a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Product f g a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Product f g a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 Source #

toList :: Product f g a a0 -> [a0] Source #

null :: Product f g a a0 -> Bool Source #

length :: Product f g a a0 -> Int Source #

elem :: Eq a0 => a0 -> Product f g a a0 -> Bool Source #

maximum :: Ord a0 => Product f g a a0 -> a0 Source #

minimum :: Ord a0 => Product f g a a0 -> a0 Source #

sum :: Num a0 => Product f g a a0 -> a0 Source #

product :: Num a0 => Product f g a a0 -> a0 Source #

( Foldable f, Bifoldable p) => Foldable ( Tannen f p a)
Instance details

Defined in Data.Bifunctor.Tannen

Methods

fold :: Monoid m => Tannen f p a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 Source #

toList :: Tannen f p a a0 -> [a0] Source #

null :: Tannen f p a a0 -> Bool Source #

length :: Tannen f p a a0 -> Int Source #

elem :: Eq a0 => a0 -> Tannen f p a a0 -> Bool Source #

maximum :: Ord a0 => Tannen f p a a0 -> a0 Source #

minimum :: Ord a0 => Tannen f p a a0 -> a0 Source #

sum :: Num a0 => Tannen f p a a0 -> a0 Source #

product :: Num a0 => Tannen f p a a0 -> a0 Source #

( Bifoldable p, Foldable g) => Foldable ( Biff p f g a)
Instance details

Defined in Data.Bifunctor.Biff

Methods

fold :: Monoid m => Biff p f g a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 Source #

toList :: Biff p f g a a0 -> [a0] Source #

null :: Biff p f g a a0 -> Bool Source #

length :: Biff p f g a a0 -> Int Source #

elem :: Eq a0 => a0 -> Biff p f g a a0 -> Bool Source #

maximum :: Ord a0 => Biff p f g a a0 -> a0 Source #

minimum :: Ord a0 => Biff p f g a a0 -> a0 Source #

sum :: Num a0 => Biff p f g a a0 -> a0 Source #

product :: Num a0 => Biff p f g a a0 -> a0 Source #

class ( Functor t, Foldable t) => Traversable (t :: Type -> Type ) where Source #

Functors representing data structures that can be traversed from left to right.

A definition of traverse must satisfy the following laws:

Naturality
t . traverse f = traverse (t . f) for every applicative transformation t
Identity
traverse Identity = Identity
Composition
traverse ( Compose . fmap g . f) = Compose . fmap ( traverse g) . traverse f

A definition of sequenceA must satisfy the following laws:

Naturality
t . sequenceA = sequenceA . fmap t for every applicative transformation t
Identity
sequenceA . fmap Identity = Identity
Composition
sequenceA . fmap Compose = Compose . fmap sequenceA . sequenceA

where an applicative transformation is a function

t :: (Applicative f, Applicative g) => f a -> g a

preserving the Applicative operations, i.e.

t (pure x) = pure x
t (f <*> x) = t f <*> t x

and the identity functor Identity and composition functors Compose are from Data.Functor.Identity and Data.Functor.Compose .

A result of the naturality law is a purity law for traverse

traverse pure = pure

(The naturality law is implied by parametricity and thus so is the purity law [1, p15].)

Instances are similar to Functor , e.g. given a data type

data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

instance Traversable Tree where
   traverse f Empty = pure Empty
   traverse f (Leaf x) = Leaf <$> f x
   traverse f (Node l k r) = Node <$> traverse f l <*> f k <*> traverse f r

This is suitable even for abstract types, as the laws for <*> imply a form of associativity.

The superclass instances should satisfy the following:

References: [1] The Essence of the Iterator Pattern, Jeremy Gibbons and Bruno C. d. S. Oliveira

Minimal complete definition

traverse | sequenceA

Methods

traverse :: Applicative f => (a -> f b) -> t a -> f (t b) Source #

Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_ .

sequenceA :: Applicative f => t (f a) -> f (t a) Source #

Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_ .

mapM :: Monad m => (a -> m b) -> t a -> m (t b) Source #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_ .

sequence :: Monad m => t (m a) -> m (t a) Source #

Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_ .

Instances

Instances details
Traversable []

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> [a] -> f [b] Source #

sequenceA :: Applicative f => [f a] -> f [a] Source #

mapM :: Monad m => (a -> m b) -> [a] -> m [b] Source #

sequence :: Monad m => [m a] -> m [a] Source #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Traversable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable Solo
Instance details

Defined in Data.Tuple.Solo

Traversable IResult
Instance details

Defined in Data.Aeson.Types.Internal

Traversable Result
Instance details

Defined in Data.Aeson.Types.Internal

Traversable KeyMap
Instance details

Defined in Data.Aeson.KeyMap

Traversable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Traversable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Traversable Tree
Instance details

Defined in Data.Tree

Traversable Seq
Instance details

Defined in Data.Sequence.Internal

Traversable FingerTree
Instance details

Defined in Data.Sequence.Internal

Traversable Digit
Instance details

Defined in Data.Sequence.Internal

Traversable Node
Instance details

Defined in Data.Sequence.Internal

Traversable Elem
Instance details

Defined in Data.Sequence.Internal

Traversable ViewL
Instance details

Defined in Data.Sequence.Internal

Traversable ViewR
Instance details

Defined in Data.Sequence.Internal

Traversable DList
Instance details

Defined in Data.DList.Internal

Traversable GenClosure
Instance details

Defined in GHC.Exts.Heap.Closures

Traversable SmallArray
Instance details

Defined in Data.Primitive.SmallArray

Traversable Array
Instance details

Defined in Data.Primitive.Array

Traversable Maybe
Instance details

Defined in Data.Strict.Maybe

Traversable Vector
Instance details

Defined in Data.Vector

Traversable ( Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f ( Either a b) Source #

sequenceA :: Applicative f => Either a (f a0) -> f ( Either a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m ( Either a b) Source #

sequence :: Monad m => Either a (m a0) -> m ( Either a a0) Source #

Traversable ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( (,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> (a, a0) -> f (a, b) Source #

sequenceA :: Applicative f => (a, f a0) -> f (a, a0) Source #

mapM :: Monad m => (a0 -> m b) -> (a, a0) -> m (a, b) Source #

sequence :: Monad m => (a, m a0) -> m (a, a0) Source #

Traversable ( Map k)

Traverses in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Map k a -> f ( Map k b) Source #

sequenceA :: Applicative f => Map k (f a) -> f ( Map k a) Source #

mapM :: Monad m => (a -> m b) -> Map k a -> m ( Map k b) Source #

sequence :: Monad m => Map k (m a) -> m ( Map k a) Source #

Traversable ( HashMap k)
Instance details

Defined in Data.HashMap.Internal

Ix i => Traversable ( Array i)

Since: base-2.1

Instance details

Defined in Data.Traversable

Traversable ( Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a0 -> f b) -> Arg a a0 -> f ( Arg a b) Source #

sequenceA :: Applicative f => Arg a (f a0) -> f ( Arg a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Arg a a0 -> m ( Arg a b) Source #

sequence :: Monad m => Arg a (m a0) -> m ( Arg a a0) Source #

Traversable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Traversable f => Traversable ( ListT f)
Instance details

Defined in Control.Monad.Trans.List

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ListT f a -> f0 ( ListT f b) Source #

sequenceA :: Applicative f0 => ListT f (f0 a) -> f0 ( ListT f a) Source #

mapM :: Monad m => (a -> m b) -> ListT f a -> m ( ListT f b) Source #

sequence :: Monad m => ListT f (m a) -> m ( ListT f a) Source #

Traversable ( These a)
Instance details

Defined in Data.These

Methods

traverse :: Applicative f => (a0 -> f b) -> These a a0 -> f ( These a b) Source #

sequenceA :: Applicative f => These a (f a0) -> f ( These a a0) Source #

mapM :: Monad m => (a0 -> m b) -> These a a0 -> m ( These a b) Source #

sequence :: Monad m => These a (m a0) -> m ( These a a0) Source #

Traversable ( Pair e)
Instance details

Defined in Data.Strict.Tuple

Methods

traverse :: Applicative f => (a -> f b) -> Pair e a -> f ( Pair e b) Source #

sequenceA :: Applicative f => Pair e (f a) -> f ( Pair e a) Source #

mapM :: Monad m => (a -> m b) -> Pair e a -> m ( Pair e b) Source #

sequence :: Monad m => Pair e (m a) -> m ( Pair e a) Source #

Traversable ( These a)
Instance details

Defined in Data.Strict.These

Methods

traverse :: Applicative f => (a0 -> f b) -> These a a0 -> f ( These a b) Source #

sequenceA :: Applicative f => These a (f a0) -> f ( These a a0) Source #

mapM :: Monad m => (a0 -> m b) -> These a a0 -> m ( These a b) Source #

sequence :: Monad m => These a (m a0) -> m ( These a a0) Source #

Traversable ( Either e)
Instance details

Defined in Data.Strict.Either

Traversable f => Traversable ( MaybeT f)
Instance details

Defined in Control.Monad.Trans.Maybe

Traversable f => Traversable ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Rec1 f a -> f0 ( Rec1 f b) Source #

sequenceA :: Applicative f0 => Rec1 f (f0 a) -> f0 ( Rec1 f a) Source #

mapM :: Monad m => (a -> m b) -> Rec1 f a -> m ( Rec1 f b) Source #

sequence :: Monad m => Rec1 f (m a) -> m ( Rec1 f a) Source #

Traversable ( Const m :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Const m a -> f ( Const m b) Source #

sequenceA :: Applicative f => Const m (f a) -> f ( Const m a) Source #

mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 ( Const m b) Source #

sequence :: Monad m0 => Const m (m0 a) -> m0 ( Const m a) Source #

Traversable f => Traversable ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Ap f a -> f0 ( Ap f b) Source #

sequenceA :: Applicative f0 => Ap f (f0 a) -> f0 ( Ap f a) Source #

mapM :: Monad m => (a -> m b) -> Ap f a -> m ( Ap f b) Source #

sequence :: Monad m => Ap f (m a) -> m ( Ap f a) Source #

Traversable f => Traversable ( Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Alt f a -> f0 ( Alt f b) Source #

sequenceA :: Applicative f0 => Alt f (f0 a) -> f0 ( Alt f a) Source #

mapM :: Monad m => (a -> m b) -> Alt f a -> m ( Alt f b) Source #

sequence :: Monad m => Alt f (m a) -> m ( Alt f a) Source #

Traversable f => Traversable ( IdentityT f)
Instance details

Defined in Control.Monad.Trans.Identity

Traversable f => Traversable ( ErrorT e f)
Instance details

Defined in Control.Monad.Trans.Error

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ErrorT e f a -> f0 ( ErrorT e f b) Source #

sequenceA :: Applicative f0 => ErrorT e f (f0 a) -> f0 ( ErrorT e f a) Source #

mapM :: Monad m => (a -> m b) -> ErrorT e f a -> m ( ErrorT e f b) Source #

sequence :: Monad m => ErrorT e f (m a) -> m ( ErrorT e f a) Source #

Traversable f => Traversable ( ExceptT e f)
Instance details

Defined in Control.Monad.Trans.Except

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ExceptT e f a -> f0 ( ExceptT e f b) Source #

sequenceA :: Applicative f0 => ExceptT e f (f0 a) -> f0 ( ExceptT e f a) Source #

mapM :: Monad m => (a -> m b) -> ExceptT e f a -> m ( ExceptT e f b) Source #

sequence :: Monad m => ExceptT e f (m a) -> m ( ExceptT e f a) Source #

Traversable f => Traversable ( WriterT w f)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

traverse :: Applicative f0 => (a -> f0 b) -> WriterT w f a -> f0 ( WriterT w f b) Source #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 ( WriterT w f a) Source #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m ( WriterT w f b) Source #

sequence :: Monad m => WriterT w f (m a) -> m ( WriterT w f a) Source #

Traversable f => Traversable ( WriterT w f)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

traverse :: Applicative f0 => (a -> f0 b) -> WriterT w f a -> f0 ( WriterT w f b) Source #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 ( WriterT w f a) Source #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m ( WriterT w f b) Source #

sequence :: Monad m => WriterT w f (m a) -> m ( WriterT w f a) Source #

Traversable ( Tagged s)
Instance details

Defined in Data.Tagged

( Traversable f, Traversable g) => Traversable ( These1 f g)
Instance details

Defined in Data.Functor.These

Methods

traverse :: Applicative f0 => (a -> f0 b) -> These1 f g a -> f0 ( These1 f g b) Source #

sequenceA :: Applicative f0 => These1 f g (f0 a) -> f0 ( These1 f g a) Source #

mapM :: Monad m => (a -> m b) -> These1 f g a -> m ( These1 f g b) Source #

sequence :: Monad m => These1 f g (m a) -> m ( These1 f g a) Source #

Traversable ( K1 i c :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> K1 i c a -> f ( K1 i c b) Source #

sequenceA :: Applicative f => K1 i c (f a) -> f ( K1 i c a) Source #

mapM :: Monad m => (a -> m b) -> K1 i c a -> m ( K1 i c b) Source #

sequence :: Monad m => K1 i c (m a) -> m ( K1 i c a) Source #

( Traversable f, Traversable g) => Traversable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) Source #

sequenceA :: Applicative f0 => (f :+: g) (f0 a) -> f0 ((f :+: g) a) Source #

mapM :: Monad m => (a -> m b) -> (f :+: g) a -> m ((f :+: g) b) Source #

sequence :: Monad m => (f :+: g) (m a) -> m ((f :+: g) a) Source #

( Traversable f, Traversable g) => Traversable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) Source #

sequenceA :: Applicative f0 => (f :*: g) (f0 a) -> f0 ((f :*: g) a) Source #

mapM :: Monad m => (a -> m b) -> (f :*: g) a -> m ((f :*: g) b) Source #

sequence :: Monad m => (f :*: g) (m a) -> m ((f :*: g) a) Source #

( Traversable f, Traversable g) => Traversable ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Product f g a -> f0 ( Product f g b) Source #

sequenceA :: Applicative f0 => Product f g (f0 a) -> f0 ( Product f g a) Source #

mapM :: Monad m => (a -> m b) -> Product f g a -> m ( Product f g b) Source #

sequence :: Monad m => Product f g (m a) -> m ( Product f g a) Source #

( Traversable f, Traversable g) => Traversable ( Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Sum f g a -> f0 ( Sum f g b) Source #

sequenceA :: Applicative f0 => Sum f g (f0 a) -> f0 ( Sum f g a) Source #

mapM :: Monad m => (a -> m b) -> Sum f g a -> m ( Sum f g b) Source #

sequence :: Monad m => Sum f g (m a) -> m ( Sum f g a) Source #

Traversable f => Traversable ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> M1 i c f a -> f0 ( M1 i c f b) Source #

sequenceA :: Applicative f0 => M1 i c f (f0 a) -> f0 ( M1 i c f a) Source #

mapM :: Monad m => (a -> m b) -> M1 i c f a -> m ( M1 i c f b) Source #

sequence :: Monad m => M1 i c f (m a) -> m ( M1 i c f a) Source #

( Traversable f, Traversable g) => Traversable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :.: g) a -> f0 ((f :.: g) b) Source #

sequenceA :: Applicative f0 => (f :.: g) (f0 a) -> f0 ((f :.: g) a) Source #

mapM :: Monad m => (a -> m b) -> (f :.: g) a -> m ((f :.: g) b) Source #

sequence :: Monad m => (f :.: g) (m a) -> m ((f :.: g) a) Source #

( Traversable f, Traversable g) => Traversable ( Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Compose f g a -> f0 ( Compose f g b) Source #

sequenceA :: Applicative f0 => Compose f g (f0 a) -> f0 ( Compose f g a) Source #

mapM :: Monad m => (a -> m b) -> Compose f g a -> m ( Compose f g b) Source #

sequence :: Monad m => Compose f g (m a) -> m ( Compose f g a) Source #

Bitraversable p => Traversable ( Flip p a)
Instance details

Defined in Data.Bifunctor.Flip

Methods

traverse :: Applicative f => (a0 -> f b) -> Flip p a a0 -> f ( Flip p a b) Source #

sequenceA :: Applicative f => Flip p a (f a0) -> f ( Flip p a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Flip p a a0 -> m ( Flip p a b) Source #

sequence :: Monad m => Flip p a (m a0) -> m ( Flip p a a0) Source #

( Traversable (f a), Traversable (g a)) => Traversable ( Sum f g a)
Instance details

Defined in Data.Bifunctor.Sum

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Sum f g a a0 -> f0 ( Sum f g a b) Source #

sequenceA :: Applicative f0 => Sum f g a (f0 a0) -> f0 ( Sum f g a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Sum f g a a0 -> m ( Sum f g a b) Source #

sequence :: Monad m => Sum f g a (m a0) -> m ( Sum f g a a0) Source #

( Traversable (f a), Traversable (g a)) => Traversable ( Product f g a)
Instance details

Defined in Data.Bifunctor.Product

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Product f g a a0 -> f0 ( Product f g a b) Source #

sequenceA :: Applicative f0 => Product f g a (f0 a0) -> f0 ( Product f g a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Product f g a a0 -> m ( Product f g a b) Source #

sequence :: Monad m => Product f g a (m a0) -> m ( Product f g a a0) Source #

( Traversable f, Bitraversable p) => Traversable ( Tannen f p a)
Instance details

Defined in Data.Bifunctor.Tannen

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Tannen f p a a0 -> f0 ( Tannen f p a b) Source #

sequenceA :: Applicative f0 => Tannen f p a (f0 a0) -> f0 ( Tannen f p a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Tannen f p a a0 -> m ( Tannen f p a b) Source #

sequence :: Monad m => Tannen f p a (m a0) -> m ( Tannen f p a a0) Source #

( Bitraversable p, Traversable g) => Traversable ( Biff p f g a)
Instance details

Defined in Data.Bifunctor.Biff

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Biff p f g a a0 -> f0 ( Biff p f g a b) Source #

sequenceA :: Applicative f0 => Biff p f g a (f0 a0) -> f0 ( Biff p f g a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Biff p f g a a0 -> m ( Biff p f g a b) Source #

sequence :: Monad m => Biff p f g a (m a0) -> m ( Biff p f g a a0) Source #

class Generic a where Source #

Representable types of kind * . This class is derivable in GHC with the DeriveGeneric flag on.

A Generic instance must satisfy the following laws:

from . toid
to . fromid

Associated Types

type Rep a :: Type -> Type Source #

Generic representation type

Methods

from :: a -> Rep a x Source #

Convert from the datatype to its representation

to :: Rep a x -> a Source #

Convert from the representation to the datatype

Instances

Instances details
Generic Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type Source #

Generic Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Generic Exp
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Exp :: Type -> Type Source #

Generic Match
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Clause
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Pat
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pat :: Type -> Type Source #

Generic Type
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Type :: Type -> Type Source #

Generic Dec
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Dec :: Type -> Type Source #

Generic Name
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Name :: Type -> Type Source #

Generic FunDep
Instance details

Defined in Language.Haskell.TH.Syntax

Generic InjectivityAnn
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Overlap
Instance details

Defined in Language.Haskell.TH.Syntax

Generic ()

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep () :: Type -> Type Source #

Methods

from :: () -> Rep () x Source #

to :: Rep () x -> () Source #

Generic Value
Instance details

Defined in Data.Aeson.Types.Internal

Generic Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Associated Types

type Rep Void :: Type -> Type Source #

Generic Version

Since: base-4.9.0.0

Instance details

Defined in Data.Version

Generic ExitCode
Instance details

Defined in GHC.IO.Exception

Generic All

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type Source #

Generic Any

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type Source #

Generic Fixity

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Generic Associativity

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Generic SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic Extension
Instance details

Defined in GHC.LanguageExtensions.Type

Generic ForeignSrcLang
Instance details

Defined in GHC.ForeignSrcLang.Type

Generic PrimType
Instance details

Defined in GHC.Exts.Heap.Closures

Generic StgInfoTable
Instance details

Defined in GHC.Exts.Heap.InfoTable.Types

Generic ClosureType
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Generic Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Associated Types

type Rep Doc :: Type -> Type Source #

Generic TextDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Generic Style
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Generic Mode
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Mode :: Type -> Type Source #

Generic ModName
Instance details

Defined in Language.Haskell.TH.Syntax

Generic PkgName
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Module
Instance details

Defined in Language.Haskell.TH.Syntax

Generic OccName
Instance details

Defined in Language.Haskell.TH.Syntax

Generic NameFlavour
Instance details

Defined in Language.Haskell.TH.Syntax

Generic NameSpace
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Loc
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Loc :: Type -> Type Source #

Generic Info
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Info :: Type -> Type Source #

Generic ModuleInfo
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Fixity
Instance details

Defined in Language.Haskell.TH.Syntax

Generic FixityDirection
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Lit
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Lit :: Type -> Type Source #

Generic Bytes
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Body
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Body :: Type -> Type Source #

Generic Guard
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Stmt
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Stmt :: Type -> Type Source #

Generic Range
Instance details

Defined in Language.Haskell.TH.Syntax

Generic DerivClause
Instance details

Defined in Language.Haskell.TH.Syntax

Generic DerivStrategy
Instance details

Defined in Language.Haskell.TH.Syntax

Generic TypeFamilyHead
Instance details

Defined in Language.Haskell.TH.Syntax

Generic TySynEqn
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Foreign
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Callconv
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Safety
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Pragma
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Inline
Instance details

Defined in Language.Haskell.TH.Syntax

Generic RuleMatch
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Phases
Instance details

Defined in Language.Haskell.TH.Syntax

Generic RuleBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Generic AnnTarget
Instance details

Defined in Language.Haskell.TH.Syntax

Generic SourceUnpackedness
Instance details

Defined in Language.Haskell.TH.Syntax

Generic SourceStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Generic DecidedStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Con
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Con :: Type -> Type Source #

Generic Bang
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bang :: Type -> Type Source #

Generic PatSynDir
Instance details

Defined in Language.Haskell.TH.Syntax

Generic PatSynArgs
Instance details

Defined in Language.Haskell.TH.Syntax

Generic TyVarBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Generic FamilyResultSig
Instance details

Defined in Language.Haskell.TH.Syntax

Generic TyLit
Instance details

Defined in Language.Haskell.TH.Syntax

Generic Role
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Role :: Type -> Type Source #

Generic AnnLookup
Instance details

Defined in Language.Haskell.TH.Syntax

Generic [a]

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep [a] :: Type -> Type Source #

Methods

from :: [a] -> Rep [a] x Source #

to :: Rep [a] x -> [a] Source #

Generic ( Maybe a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Maybe a) :: Type -> Type Source #

Generic ( Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Par1 p) :: Type -> Type Source #

Generic ( Solo a)
Instance details

Defined in Data.Tuple.Solo

Associated Types

type Rep ( Solo a) :: Type -> Type Source #

Generic ( Complex a)

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Associated Types

type Rep ( Complex a) :: Type -> Type Source #

Generic ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep ( Min a) :: Type -> Type Source #

Generic ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep ( Max a) :: Type -> Type Source #

Generic ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep ( First a) :: Type -> Type Source #

Generic ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep ( Last a) :: Type -> Type Source #

Generic ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Generic ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep ( Option a) :: Type -> Type Source #

Generic ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep ( ZipList a) :: Type -> Type Source #

Generic ( Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep ( Identity a) :: Type -> Type Source #

Generic ( First a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep ( First a) :: Type -> Type Source #

Generic ( Last a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep ( Last a) :: Type -> Type Source #

Generic ( Dual a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Dual a) :: Type -> Type Source #

Generic ( Endo a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Endo a) :: Type -> Type Source #

Generic ( Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Sum a) :: Type -> Type Source #

Generic ( Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Product a) :: Type -> Type Source #

Generic ( Down a)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Down a) :: Type -> Type Source #

Generic ( NonEmpty a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( NonEmpty a) :: Type -> Type Source #

Generic ( Tree a)

Since: containers-0.5.8

Instance details

Defined in Data.Tree

Associated Types

type Rep ( Tree a) :: Type -> Type Source #

Generic ( FingerTree a)

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep ( FingerTree a) :: Type -> Type Source #

Generic ( Digit a)

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep ( Digit a) :: Type -> Type Source #

Generic ( Node a)

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep ( Node a) :: Type -> Type Source #

Generic ( Elem a)

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep ( Elem a) :: Type -> Type Source #

Generic ( ViewL a)

Since: containers-0.5.8

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep ( ViewL a) :: Type -> Type Source #

Generic ( ViewR a)

Since: containers-0.5.8

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep ( ViewR a) :: Type -> Type Source #

Generic ( Fix f)
Instance details

Defined in Data.Fix

Associated Types

type Rep ( Fix f) :: Type -> Type Source #

Generic ( GenClosure b)
Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep ( GenClosure b) :: Type -> Type Source #

Generic ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep ( Doc a) :: Type -> Type Source #

Generic ( Maybe a)
Instance details

Defined in Data.Strict.Maybe

Associated Types

type Rep ( Maybe a) :: Type -> Type Source #

Generic ( Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Either a b) :: Type -> Type Source #

Generic ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( V1 p) :: Type -> Type Source #

Generic ( U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( U1 p) :: Type -> Type Source #

Generic (a, b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b) :: Type -> Type Source #

Methods

from :: (a, b) -> Rep (a, b) x Source #

to :: Rep (a, b) x -> (a, b) Source #

Generic ( Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep ( Arg a b) :: Type -> Type Source #

Generic ( WrappedMonad m a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep ( WrappedMonad m a) :: Type -> Type Source #

Generic ( Proxy t)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Proxy t) :: Type -> Type Source #

Generic ( These a b)
Instance details

Defined in Data.These

Associated Types

type Rep ( These a b) :: Type -> Type Source #

Generic ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

Associated Types

type Rep ( Pair a b) :: Type -> Type Source #

Generic ( These a b)
Instance details

Defined in Data.Strict.These

Associated Types

type Rep ( These a b) :: Type -> Type Source #

Generic ( Either a b)
Instance details

Defined in Data.Strict.Either

Associated Types

type Rep ( Either a b) :: Type -> Type Source #

Generic ( Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Rec1 f p) :: Type -> Type Source #

Generic ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec ( Ptr ()) p) :: Type -> Type Source #

Generic ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Char p) :: Type -> Type Source #

Generic ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Float p)
Instance details

Defined in GHC.Generics

Generic ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Int p) :: Type -> Type Source #

Generic ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Word p) :: Type -> Type Source #

Generic (a, b, c)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c) :: Type -> Type Source #

Methods

from :: (a, b, c) -> Rep (a, b, c) x Source #

to :: Rep (a, b, c) x -> (a, b, c) Source #

Generic ( WrappedArrow a b c)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep ( WrappedArrow a b c) :: Type -> Type Source #

Generic ( Kleisli m a b)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Associated Types

type Rep ( Kleisli m a b) :: Type -> Type Source #

Generic ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Associated Types

type Rep ( Const a b) :: Type -> Type Source #

Generic ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep ( Ap f a) :: Type -> Type Source #

Generic ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Alt f a) :: Type -> Type Source #

Generic ( Tagged s b)
Instance details

Defined in Data.Tagged

Associated Types

type Rep ( Tagged s b) :: Type -> Type Source #

Generic ( These1 f g a)
Instance details

Defined in Data.Functor.These

Associated Types

type Rep ( These1 f g a) :: Type -> Type Source #

Generic ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( K1 i c p) :: Type -> Type Source #

Methods

from :: K1 i c p -> Rep ( K1 i c p) x Source #

to :: Rep ( K1 i c p) x -> K1 i c p Source #

Generic ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type Source #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x Source #

to :: Rep ((f :+: g) p) x -> (f :+: g) p Source #

Generic ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type Source #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x Source #

to :: Rep ((f :*: g) p) x -> (f :*: g) p Source #

Generic (a, b, c, d)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d) :: Type -> Type Source #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x Source #

to :: Rep (a, b, c, d) x -> (a, b, c, d) Source #

Generic ( Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Associated Types

type Rep ( Product f g a) :: Type -> Type Source #

Generic ( Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Associated Types

type Rep ( Sum f g a) :: Type -> Type Source #

Methods

from :: Sum f g a -> Rep ( Sum f g a) x Source #

to :: Rep ( Sum f g a) x -> Sum f g a Source #

Generic ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( M1 i c f p) :: Type -> Type Source #

Methods

from :: M1 i c f p -> Rep ( M1 i c f p) x Source #

to :: Rep ( M1 i c f p) x -> M1 i c f p Source #

Generic ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type Source #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x Source #

to :: Rep ((f :.: g) p) x -> (f :.: g) p Source #

Generic (a, b, c, d, e)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x Source #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) Source #

Generic ( Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep ( Compose f g a) :: Type -> Type Source #

Generic ( Flip p a b)
Instance details

Defined in Data.Bifunctor.Flip

Associated Types

type Rep ( Flip p a b) :: Type -> Type Source #

Generic (a, b, c, d, e, f)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x Source #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) Source #

Generic ( Sum p q a b)
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep ( Sum p q a b) :: Type -> Type Source #

Methods

from :: Sum p q a b -> Rep ( Sum p q a b) x Source #

to :: Rep ( Sum p q a b) x -> Sum p q a b Source #

Generic ( Product f g a b)
Instance details

Defined in Data.Bifunctor.Product

Associated Types

type Rep ( Product f g a b) :: Type -> Type Source #

Generic (a, b, c, d, e, f, g)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x Source #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) Source #

Generic ( Tannen f p a b)
Instance details

Defined in Data.Bifunctor.Tannen

Associated Types

type Rep ( Tannen f p a b) :: Type -> Type Source #

Methods

from :: Tannen f p a b -> Rep ( Tannen f p a b) x Source #

to :: Rep ( Tannen f p a b) x -> Tannen f p a b Source #

Generic ( Biff p f g a b)
Instance details

Defined in Data.Bifunctor.Biff

Associated Types

type Rep ( Biff p f g a b) :: Type -> Type Source #

Methods

from :: Biff p f g a b -> Rep ( Biff p f g a b) x Source #

to :: Rep ( Biff p f g a b) x -> Biff p f g a b Source #

class Generic1 (f :: k -> Type ) Source #

Representable types of kind * -> * (or kind k -> * , when PolyKinds is enabled). This class is derivable in GHC with the DeriveGeneric flag on.

A Generic1 instance must satisfy the following laws:

from1 . to1id
to1 . from1id

Minimal complete definition

from1 , to1

Instances

Instances details
Generic1 ( V1 :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 V1 :: k -> Type Source #

Methods

from1 :: forall (a :: k0). V1 a -> Rep1 V1 a Source #

to1 :: forall (a :: k0). Rep1 V1 a -> V1 a Source #

Generic1 ( U1 :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 U1 :: k -> Type Source #

Methods

from1 :: forall (a :: k0). U1 a -> Rep1 U1 a Source #

to1 :: forall (a :: k0). Rep1 U1 a -> U1 a Source #

Generic1 ( Proxy :: k -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a Source #

to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a Source #

Generic1 ( Const a :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Associated Types

type Rep1 ( Const a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k0). Const a a0 -> Rep1 ( Const a) a0 Source #

to1 :: forall (a0 :: k0). Rep1 ( Const a) a0 -> Const a a0 Source #

Generic1 ( Ap f :: k -> Type )

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep1 ( Ap f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Ap f a -> Rep1 ( Ap f) a Source #

to1 :: forall (a :: k0). Rep1 ( Ap f) a -> Ap f a Source #

Generic1 ( Alt f :: k -> Type )

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 ( Alt f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Alt f a -> Rep1 ( Alt f) a Source #

to1 :: forall (a :: k0). Rep1 ( Alt f) a -> Alt f a Source #

Generic1 ( URec ( Ptr ()) :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec ( Ptr ())) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec ( Ptr ()) a -> Rep1 ( URec ( Ptr ())) a Source #

to1 :: forall (a :: k0). Rep1 ( URec ( Ptr ())) a -> URec ( Ptr ()) a Source #

Generic1 ( URec Char :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Char ) :: k -> Type Source #

Generic1 ( URec Double :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Double ) :: k -> Type Source #

Generic1 ( URec Float :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Float ) :: k -> Type Source #

Generic1 ( URec Int :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Int ) :: k -> Type Source #

Generic1 ( URec Word :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Word ) :: k -> Type Source #

Generic1 ( Rec1 f :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( Rec1 f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Rec1 f a -> Rep1 ( Rec1 f) a Source #

to1 :: forall (a :: k0). Rep1 ( Rec1 f) a -> Rec1 f a Source #

Generic1 ( Sum f g :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Associated Types

type Rep1 ( Sum f g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Sum f g a -> Rep1 ( Sum f g) a Source #

to1 :: forall (a :: k0). Rep1 ( Sum f g) a -> Sum f g a Source #

Generic1 ( Product f g :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Associated Types

type Rep1 ( Product f g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Product f g a -> Rep1 ( Product f g) a Source #

to1 :: forall (a :: k0). Rep1 ( Product f g) a -> Product f g a Source #

Generic1 ( K1 i c :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( K1 i c) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). K1 i c a -> Rep1 ( K1 i c) a Source #

to1 :: forall (a :: k0). Rep1 ( K1 i c) a -> K1 i c a Source #

Generic1 (f :+: g :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :+: g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). (f :+: g) a -> Rep1 (f :+: g) a Source #

to1 :: forall (a :: k0). Rep1 (f :+: g) a -> (f :+: g) a Source #

Generic1 (f :*: g :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :*: g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). (f :*: g) a -> Rep1 (f :*: g) a Source #

to1 :: forall (a :: k0). Rep1 (f :*: g) a -> (f :*: g) a Source #

Functor f => Generic1 ( Compose f g :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep1 ( Compose f g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Compose f g a -> Rep1 ( Compose f g) a Source #

to1 :: forall (a :: k0). Rep1 ( Compose f g) a -> Compose f g a Source #

Generic1 ( M1 i c f :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( M1 i c f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). M1 i c f a -> Rep1 ( M1 i c f) a Source #

to1 :: forall (a :: k0). Rep1 ( M1 i c f) a -> M1 i c f a Source #

Functor f => Generic1 (f :.: g :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :.: g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). (f :.: g) a -> Rep1 (f :.: g) a Source #

to1 :: forall (a :: k0). Rep1 (f :.: g) a -> (f :.: g) a Source #

Generic1 ( Sum p q a :: k1 -> Type )
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep1 ( Sum p q a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Sum p q a a0 -> Rep1 ( Sum p q a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Sum p q a) a0 -> Sum p q a a0 Source #

Generic1 ( Product f g a :: k1 -> Type )
Instance details

Defined in Data.Bifunctor.Product

Associated Types

type Rep1 ( Product f g a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Product f g a a0 -> Rep1 ( Product f g a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Product f g a) a0 -> Product f g a a0 Source #

Functor f => Generic1 ( Tannen f p a :: k2 -> Type )
Instance details

Defined in Data.Bifunctor.Tannen

Associated Types

type Rep1 ( Tannen f p a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Tannen f p a a0 -> Rep1 ( Tannen f p a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Tannen f p a) a0 -> Tannen f p a a0 Source #

Functor (p (f a)) => Generic1 ( Biff p f g a :: k3 -> Type )
Instance details

Defined in Data.Bifunctor.Biff

Associated Types

type Rep1 ( Biff p f g a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Biff p f g a a0 -> Rep1 ( Biff p f g a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Biff p f g a) a0 -> Biff p f g a a0 Source #

Generic1 []

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 [] :: k -> Type Source #

Methods

from1 :: forall (a :: k). [a] -> Rep1 [] a Source #

to1 :: forall (a :: k). Rep1 [] a -> [a] Source #

Generic1 Maybe

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Maybe :: k -> Type Source #

Methods

from1 :: forall (a :: k). Maybe a -> Rep1 Maybe a Source #

to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a Source #

Generic1 Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Par1 :: k -> Type Source #

Methods

from1 :: forall (a :: k). Par1 a -> Rep1 Par1 a Source #

to1 :: forall (a :: k). Rep1 Par1 a -> Par1 a Source #

Generic1 Solo
Instance details

Defined in Data.Tuple.Solo

Associated Types

type Rep1 Solo :: k -> Type Source #

Methods

from1 :: forall (a :: k). Solo a -> Rep1 Solo a Source #

to1 :: forall (a :: k). Rep1 Solo a -> Solo a Source #

Generic1 Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Associated Types

type Rep1 Complex :: k -> Type Source #

Generic1 Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Min :: k -> Type Source #

Methods

from1 :: forall (a :: k). Min a -> Rep1 Min a Source #

to1 :: forall (a :: k). Rep1 Min a -> Min a Source #

Generic1 Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Max :: k -> Type Source #

Methods

from1 :: forall (a :: k). Max a -> Rep1 Max a Source #

to1 :: forall (a :: k). Rep1 Max a -> Max a Source #

Generic1 First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 First :: k -> Type Source #

Methods

from1 :: forall (a :: k). First a -> Rep1 First a Source #

to1 :: forall (a :: k). Rep1 First a -> First a Source #

Generic1 Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Last :: k -> Type Source #

Methods

from1 :: forall (a :: k). Last a -> Rep1 Last a Source #

to1 :: forall (a :: k). Rep1 Last a -> Last a Source #

Generic1 WrappedMonoid

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 WrappedMonoid :: k -> Type Source #

Generic1 Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Option :: k -> Type Source #

Generic1 ZipList

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep1 ZipList :: k -> Type Source #

Generic1 Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep1 Identity :: k -> Type Source #

Generic1 First

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep1 First :: k -> Type Source #

Methods

from1 :: forall (a :: k). First a -> Rep1 First a Source #

to1 :: forall (a :: k). Rep1 First a -> First a Source #

Generic1 Last

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep1 Last :: k -> Type Source #

Methods

from1 :: forall (a :: k). Last a -> Rep1 Last a Source #

to1 :: forall (a :: k). Rep1 Last a -> Last a Source #

Generic1 Dual

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Dual :: k -> Type Source #

Methods

from1 :: forall (a :: k). Dual a -> Rep1 Dual a Source #

to1 :: forall (a :: k). Rep1 Dual a -> Dual a Source #

Generic1 Sum

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Sum :: k -> Type Source #

Methods

from1 :: forall (a :: k). Sum a -> Rep1 Sum a Source #

to1 :: forall (a :: k). Rep1 Sum a -> Sum a Source #

Generic1 Product

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Product :: k -> Type Source #

Generic1 Down

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Down :: k -> Type Source #

Methods

from1 :: forall (a :: k). Down a -> Rep1 Down a Source #

to1 :: forall (a :: k). Rep1 Down a -> Down a Source #

Generic1 NonEmpty

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 NonEmpty :: k -> Type Source #

Generic1 Tree

Since: containers-0.5.8

Instance details

Defined in Data.Tree

Associated Types

type Rep1 Tree :: k -> Type Source #

Methods

from1 :: forall (a :: k). Tree a -> Rep1 Tree a Source #

to1 :: forall (a :: k). Rep1 Tree a -> Tree a Source #

Generic1 FingerTree

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 FingerTree :: k -> Type Source #

Generic1 Digit

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 Digit :: k -> Type Source #

Methods

from1 :: forall (a :: k). Digit a -> Rep1 Digit a Source #

to1 :: forall (a :: k). Rep1 Digit a -> Digit a Source #

Generic1 Node

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 Node :: k -> Type Source #

Methods

from1 :: forall (a :: k). Node a -> Rep1 Node a Source #

to1 :: forall (a :: k). Rep1 Node a -> Node a Source #

Generic1 Elem

Since: containers-0.6.1

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 Elem :: k -> Type Source #

Methods

from1 :: forall (a :: k). Elem a -> Rep1 Elem a Source #

to1 :: forall (a :: k). Rep1 Elem a -> Elem a Source #

Generic1 ViewL

Since: containers-0.5.8

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 ViewL :: k -> Type Source #

Methods

from1 :: forall (a :: k). ViewL a -> Rep1 ViewL a Source #

to1 :: forall (a :: k). Rep1 ViewL a -> ViewL a Source #

Generic1 ViewR

Since: containers-0.5.8

Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep1 ViewR :: k -> Type Source #

Methods

from1 :: forall (a :: k). ViewR a -> Rep1 ViewR a Source #

to1 :: forall (a :: k). Rep1 ViewR a -> ViewR a Source #

Generic1 Maybe
Instance details

Defined in Data.Strict.Maybe

Associated Types

type Rep1 Maybe :: k -> Type Source #

Methods

from1 :: forall (a :: k). Maybe a -> Rep1 Maybe a Source #

to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a Source #

Generic1 ( Either a :: Type -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( Either a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Either a a0 -> Rep1 ( Either a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Either a) a0 -> Either a a0 Source #

Generic1 ( (,) a :: Type -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( (,) a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, a0) -> Rep1 ( (,) a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( (,) a) a0 -> (a, a0) Source #

Generic1 ( Arg a :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 ( Arg a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Arg a a0 -> Rep1 ( Arg a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Arg a) a0 -> Arg a a0 Source #

Generic1 ( WrappedMonad m :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep1 ( WrappedMonad m) :: k -> Type Source #

Generic1 ( These a :: Type -> Type )
Instance details

Defined in Data.These

Associated Types

type Rep1 ( These a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). These a a0 -> Rep1 ( These a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( These a) a0 -> These a a0 Source #

Generic1 ( Pair a :: Type -> Type )
Instance details

Defined in Data.Strict.Tuple

Associated Types

type Rep1 ( Pair a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Pair a a0 -> Rep1 ( Pair a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Pair a) a0 -> Pair a a0 Source #

Generic1 ( These a :: Type -> Type )
Instance details

Defined in Data.Strict.These

Associated Types

type Rep1 ( These a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). These a a0 -> Rep1 ( These a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( These a) a0 -> These a a0 Source #

Generic1 ( Either a :: Type -> Type )
Instance details

Defined in Data.Strict.Either

Associated Types

type Rep1 ( Either a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Either a a0 -> Rep1 ( Either a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Either a) a0 -> Either a a0 Source #

Generic1 ( (,,) a b :: Type -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( (,,) a b) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, a0) -> Rep1 ( (,,) a b) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( (,,) a b) a0 -> (a, b, a0) Source #

Generic1 ( WrappedArrow a b :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep1 ( WrappedArrow a b) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). WrappedArrow a b a0 -> Rep1 ( WrappedArrow a b) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( WrappedArrow a b) a0 -> WrappedArrow a b a0 Source #

Generic1 ( Kleisli m a :: Type -> Type )

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Associated Types

type Rep1 ( Kleisli m a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Kleisli m a a0 -> Rep1 ( Kleisli m a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Kleisli m a) a0 -> Kleisli m a a0 Source #

Generic1 ( Tagged s :: Type -> Type )
Instance details

Defined in Data.Tagged

Associated Types

type Rep1 ( Tagged s) :: k -> Type Source #

Methods

from1 :: forall (a :: k). Tagged s a -> Rep1 ( Tagged s) a Source #

to1 :: forall (a :: k). Rep1 ( Tagged s) a -> Tagged s a Source #

Generic1 ( These1 f g :: Type -> Type )
Instance details

Defined in Data.Functor.These

Associated Types

type Rep1 ( These1 f g) :: k -> Type Source #

Methods

from1 :: forall (a :: k). These1 f g a -> Rep1 ( These1 f g) a Source #

to1 :: forall (a :: k). Rep1 ( These1 f g) a -> These1 f g a Source #

Generic1 ( (,,,) a b c :: Type -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( (,,,) a b c) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, a0) -> Rep1 ( (,,,) a b c) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( (,,,) a b c) a0 -> (a, b, c, a0) Source #

Generic1 ( (,,,,) a b c d :: Type -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( (,,,,) a b c d) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, a0) -> Rep1 ( (,,,,) a b c d) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( (,,,,) a b c d) a0 -> (a, b, c, d, a0) Source #

Generic1 ( (,,,,,) a b c d e :: Type -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( (,,,,,) a b c d e) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, e, a0) -> Rep1 ( (,,,,,) a b c d e) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( (,,,,,) a b c d e) a0 -> (a, b, c, d, e, a0) Source #

Generic1 ( (,,,,,,) a b c d e f :: Type -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( (,,,,,,) a b c d e f) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). (a, b, c, d, e, f, a0) -> Rep1 ( (,,,,,,) a b c d e f) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( (,,,,,,) a b c d e f) a0 -> (a, b, c, d, e, f, a0) Source #

class Datatype (d :: k) where Source #

Class for datatypes that represent datatypes

Minimal complete definition

datatypeName , moduleName , packageName

Methods

datatypeName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t d f a -> [ Char ] Source #

The name of the datatype (unqualified)

moduleName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t d f a -> [ Char ] Source #

The fully-qualified name of the module where the type is declared

packageName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t d f a -> [ Char ] Source #

The package name of the module where the type is declared

Since: base-4.9.0.0

isNewtype :: forall k1 t (f :: k1 -> Type ) (a :: k1). t d f a -> Bool Source #

Marks if the datatype is actually a newtype

Since: base-4.7.0.0

Instances

Instances details
( KnownSymbol n, KnownSymbol m, KnownSymbol p, SingI nt) => Datatype (' MetaData n m p nt :: Meta )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

datatypeName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaData n m p nt) f a -> [ Char ] Source #

moduleName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaData n m p nt) f a -> [ Char ] Source #

packageName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaData n m p nt) f a -> [ Char ] Source #

isNewtype :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaData n m p nt) f a -> Bool Source #

class Constructor (c :: k) where Source #

Class for datatypes that represent data constructors

Minimal complete definition

conName

Methods

conName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t c f a -> [ Char ] Source #

The name of the constructor

conFixity :: forall k1 t (f :: k1 -> Type ) (a :: k1). t c f a -> Fixity Source #

The fixity of the constructor

conIsRecord :: forall k1 t (f :: k1 -> Type ) (a :: k1). t c f a -> Bool Source #

Marks if this constructor is a record

Instances

Instances details
( KnownSymbol n, SingI f, SingI r) => Constructor (' MetaCons n f r :: Meta )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

conName :: forall k1 t (f0 :: k1 -> Type ) (a :: k1). t (' MetaCons n f r) f0 a -> [ Char ] Source #

conFixity :: forall k1 t (f0 :: k1 -> Type ) (a :: k1). t (' MetaCons n f r) f0 a -> Fixity Source #

conIsRecord :: forall k1 t (f0 :: k1 -> Type ) (a :: k1). t (' MetaCons n f r) f0 a -> Bool Source #

class Selector (s :: k) where Source #

Class for datatypes that represent records

Methods

selName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t s f a -> [ Char ] Source #

The name of the selector

selSourceUnpackedness :: forall k1 t (f :: k1 -> Type ) (a :: k1). t s f a -> SourceUnpackedness Source #

The selector's unpackedness annotation (if any)

Since: base-4.9.0.0

selSourceStrictness :: forall k1 t (f :: k1 -> Type ) (a :: k1). t s f a -> SourceStrictness Source #

The selector's strictness annotation (if any)

Since: base-4.9.0.0

selDecidedStrictness :: forall k1 t (f :: k1 -> Type ) (a :: k1). t s f a -> DecidedStrictness Source #

The strictness that the compiler inferred for the selector

Since: base-4.9.0.0

Instances

Instances details
(SingI mn, SingI su, SingI ss, SingI ds) => Selector (' MetaSel mn su ss ds :: Meta )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

selName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaSel mn su ss ds) f a -> [ Char ] Source #

selSourceUnpackedness :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaSel mn su ss ds) f a -> SourceUnpackedness Source #

selSourceStrictness :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaSel mn su ss ds) f a -> SourceStrictness Source #

selDecidedStrictness :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaSel mn su ss ds) f a -> DecidedStrictness Source #

class KnownNat (n :: Nat ) Source #

This class gives the integer associated with a type-level natural. There are instances of the class for every concrete literal: 0, 1, 2, etc.

Since: base-4.7.0.0

Minimal complete definition

natSing

class KnownSymbol (n :: Symbol ) Source #

This class gives the string associated with a type-level symbol. There are instances of the class for every concrete literal: "hello", etc.

Since: base-4.7.0.0

Minimal complete definition

symbolSing

class Semigroup a where Source #

The class of semigroups (types with an associative binary operation).

Instances should satisfy the following:

Associativity
x <> (y <> z) = (x <> y) <> z

Since: base-4.9.0.0

Minimal complete definition

(<>)

Methods

(<>) :: a -> a -> a infixr 6 Source #

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

sconcat :: NonEmpty a -> a Source #

Reduce a non-empty list with <>

The default definition should be sufficient, but this can be overridden for efficiency.

>>> import Data.List.NonEmpty
>>> sconcat $ "Hello" :| [" ", "Haskell", "!"]
"Hello Haskell!"

stimes :: Integral b => b -> a -> a Source #

Repeat a value n times.

Given that this works on a Semigroup it is allowed to fail if you request 0 or fewer repetitions, and the default definition will do so.

By making this a member of the class, idempotent semigroups and monoids can upgrade this to execute in \(\mathcal{O}(1)\) by picking stimes = stimesIdempotent or stimes = stimesIdempotentMonoid respectively.

>>> stimes 4 [1]
[1,1,1,1]

Instances

Instances details
Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup ()

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup ByteString
Instance details

Defined in Data.ByteString.Internal

Semigroup ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup Builder
Instance details

Defined in Data.Text.Internal.Builder

Semigroup Key
Instance details

Defined in Data.Aeson.Key

Semigroup More
Instance details

Defined in Data.Attoparsec.Internal.Types

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in Data.Void

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup JSString
Instance details

Defined in Text.JSON.Canonical.Types

Semigroup ByteArray
Instance details

Defined in Data.Primitive.ByteArray

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Semigroup Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Semigroup ShortText
Instance details

Defined in Data.Text.Short.Internal

Semigroup [a]

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: [a] -> [a] -> [a] Source #

sconcat :: NonEmpty [a] -> [a] Source #

stimes :: Integral b => b -> [a] -> [a] Source #

Semigroup a => Semigroup ( Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup a => Semigroup ( IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Semigroup p => Semigroup ( Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Semigroup a => Semigroup ( Solo a)
Instance details

Defined in Data.Tuple.Solo

Semigroup ( IResult a)
Instance details

Defined in Data.Aeson.Types.Internal

Semigroup ( Result a)
Instance details

Defined in Data.Aeson.Types.Internal

Semigroup ( Parser a)
Instance details

Defined in Data.Aeson.Types.Internal

Semigroup ( KeyMap v)
Instance details

Defined in Data.Aeson.KeyMap

Semigroup a => Semigroup ( Concurrently a)

Only defined by async for base >= 4.9

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async

Ord a => Semigroup ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Semigroup ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid m => Semigroup ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Semigroup ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Semigroup ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Semigroup ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Semigroup ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Semigroup a => Semigroup ( Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup ( Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Semigroup ( Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Semigroup ( Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup a => Semigroup ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Semigroup ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup ( IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Semigroup ( Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Ord a => Semigroup ( Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Semigroup ( DNonEmpty a)
Instance details

Defined in Data.DList.DNonEmpty.Internal

Semigroup ( DList a)
Instance details

Defined in Data.DList.Internal

Semigroup ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Semigroup ( PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Semigroup ( SmallArray a)

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.SmallArray

Semigroup ( Array a)

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.Array

Semigroup a => Semigroup ( Maybe a)
Instance details

Defined in Data.Strict.Maybe

( Hashable a, Eq a) => Semigroup ( HashSet a)

<> = union

\(O(n+m)\)

To obtain good performance, the smaller set must be presented as the first argument.

Examples

Expand
>>> fromList [1,2] <> fromList [2,3]
fromList [1,2,3]
Instance details

Defined in Data.HashSet.Internal

Storable a => Semigroup ( Vector a)
Instance details

Defined in Data.Vector.Storable

Prim a => Semigroup ( Vector a)
Instance details

Defined in Data.Vector.Primitive

Semigroup ( Vector a)
Instance details

Defined in Data.Vector

Semigroup (MergeSet a)
Instance details

Defined in Data.Set.Internal

Methods

(<>) :: MergeSet a -> MergeSet a -> MergeSet a Source #

sconcat :: NonEmpty (MergeSet a) -> MergeSet a Source #

stimes :: Integral b => b -> MergeSet a -> MergeSet a Source #

Semigroup b => Semigroup (a -> b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a -> b) -> (a -> b) -> a -> b Source #

sconcat :: NonEmpty (a -> b) -> a -> b Source #

stimes :: Integral b0 => b0 -> (a -> b) -> a -> b Source #

Semigroup ( Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Semigroup ( V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Semigroup ( U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Semigroup a, Semigroup b) => Semigroup (a, b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b) -> (a, b) -> (a, b) Source #

sconcat :: NonEmpty (a, b) -> (a, b) Source #

stimes :: Integral b0 => b0 -> (a, b) -> (a, b) Source #

Ord k => Semigroup ( Map k v)
Instance details

Defined in Data.Map.Internal

( Eq k, Hashable k) => Semigroup ( HashMap k v)

<> = union

If a key occurs in both maps, the mapping from the first will be the mapping in the result.

Examples

Expand
>>> fromList [(1,'a'),(2,'b')] <> fromList [(2,'c'),(3,'d')]
fromList [(1,'a'),(2,'b'),(3,'d')]
Instance details

Defined in Data.HashMap.Internal

Semigroup a => Semigroup ( ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Semigroup ( Parser i a)
Instance details

Defined in Data.Attoparsec.Internal.Types

Semigroup ( Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Semigroup ( Format r (a -> r))
Instance details

Defined in Formatting.Internal

Methods

(<>) :: Format r (a -> r) -> Format r (a -> r) -> Format r (a -> r) Source #

sconcat :: NonEmpty ( Format r (a -> r)) -> Format r (a -> r) Source #

stimes :: Integral b => b -> Format r (a -> r) -> Format r (a -> r) Source #

( Semigroup a, Semigroup b) => Semigroup ( These a b)
Instance details

Defined in Data.These

( Semigroup a, Semigroup b) => Semigroup ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

( Semigroup a, Semigroup b) => Semigroup ( These a b)
Instance details

Defined in Data.Strict.These

Semigroup ( Either a b)
Instance details

Defined in Data.Strict.Either

Semigroup (f p) => Semigroup ( Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

sconcat :: NonEmpty (a, b, c) -> (a, b, c) Source #

stimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) Source #

Semigroup a => Semigroup ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

( Applicative f, Semigroup a) => Semigroup ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Alternative f => Semigroup ( Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup a => Semigroup ( Tagged s a)
Instance details

Defined in Data.Tagged

Semigroup c => Semigroup ( K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p Source #

stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p Source #

( Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) Source #

stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) Source #

Semigroup (f p) => Semigroup ( M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

sconcat :: NonEmpty ( M1 i c f p) -> M1 i c f p Source #

stimes :: Integral b => b -> M1 i c f p -> M1 i c f p Source #

Semigroup (f (g p)) => Semigroup ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p Source #

stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p Source #

( Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) Source #

stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

class Semigroup a => Monoid a where Source #

The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:

Right identity
x <> mempty = x
Left identity
mempty <> x = x
Associativity
x <> (y <> z) = (x <> y) <> z ( Semigroup law)
Concatenation
mconcat = foldr ( <> ) mempty

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtype s and make those instances of Monoid , e.g. Sum and Product .

NOTE : Semigroup is a superclass of Monoid since base-4.11.0.0 .

Minimal complete definition

mempty

Methods

mempty :: a Source #

Identity of mappend

>>> "Hello world" <> mempty
"Hello world"

mappend :: a -> a -> a Source #

An associative operation

NOTE : This method is redundant and has the default implementation mappend = ( <> ) since base-4.11.0.0 . Should it be implemented manually, since mappend is a synonym for ( <> ), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid .

mconcat :: [a] -> a Source #

Fold a list using the monoid.

For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.

>>> mconcat ["Hello", " ", "Haskell", "!"]
"Hello Haskell!"

Instances

Instances details
Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid ByteString
Instance details

Defined in Data.ByteString.Internal

Monoid ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid Builder
Instance details

Defined in Data.Text.Internal.Builder

Monoid Key
Instance details

Defined in Data.Aeson.Key

Monoid More
Instance details

Defined in Data.Attoparsec.Internal.Types

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Monoid JSString
Instance details

Defined in Text.JSON.Canonical.Types

Monoid ByteArray
Instance details

Defined in Data.Primitive.ByteArray

Monoid IntSet
Instance details

Defined in Data.IntSet.Internal

Monoid Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Monoid ShortText
Instance details

Defined in Data.Text.Short.Internal

Monoid [a]

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: [a] Source #

mappend :: [a] -> [a] -> [a] Source #

mconcat :: [[a]] -> [a] Source #

Semigroup a => Monoid ( Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid : "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S ."

Since 4.11.0 : constraint on inner a value generalised from Monoid to Semigroup .

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid a => Monoid ( IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Monoid p => Monoid ( Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Monoid a => Monoid ( Solo a)
Instance details

Defined in Data.Tuple.Solo

Monoid ( IResult a)
Instance details

Defined in Data.Aeson.Types.Internal

Monoid ( Result a)
Instance details

Defined in Data.Aeson.Types.Internal

Monoid ( Parser a)
Instance details

Defined in Data.Aeson.Types.Internal

Monoid ( KeyMap v)
Instance details

Defined in Data.Aeson.KeyMap

( Semigroup a, Monoid a) => Monoid ( Concurrently a)

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async

( Ord a, Bounded a) => Monoid ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

( Ord a, Bounded a) => Monoid ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid m => Monoid ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Monoid ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid a => Monoid ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Monoid ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Monoid ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Monoid a => Monoid ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid ( Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Num a => Monoid ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Num a => Monoid ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid a => Monoid ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Monoid ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Monoid ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Ord a => Monoid ( Set a)
Instance details

Defined in Data.Set.Internal

Monoid ( DList a)
Instance details

Defined in Data.DList.Internal

Monoid ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Monoid ( PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Monoid ( SmallArray a)
Instance details

Defined in Data.Primitive.SmallArray

Monoid ( Array a)
Instance details

Defined in Data.Primitive.Array

Semigroup a => Monoid ( Maybe a)
Instance details

Defined in Data.Strict.Maybe

( Hashable a, Eq a) => Monoid ( HashSet a)

mempty = empty

mappend = union

\(O(n+m)\)

To obtain good performance, the smaller set must be presented as the first argument.

Examples

Expand
>>> mappend (fromList [1,2]) (fromList [2,3])
fromList [1,2,3]
Instance details

Defined in Data.HashSet.Internal

Storable a => Monoid ( Vector a)
Instance details

Defined in Data.Vector.Storable

Prim a => Monoid ( Vector a)
Instance details

Defined in Data.Vector.Primitive

Monoid ( Vector a)
Instance details

Defined in Data.Vector

Monoid (MergeSet a)
Instance details

Defined in Data.Set.Internal

Methods

mempty :: MergeSet a Source #

mappend :: MergeSet a -> MergeSet a -> MergeSet a Source #

mconcat :: [MergeSet a] -> MergeSet a Source #

Monoid b => Monoid (a -> b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: a -> b Source #

mappend :: (a -> b) -> (a -> b) -> a -> b Source #

mconcat :: [a -> b] -> a -> b Source #

Monoid ( U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Monoid a, Monoid b) => Monoid (a, b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b) Source #

mappend :: (a, b) -> (a, b) -> (a, b) Source #

mconcat :: [(a, b)] -> (a, b) Source #

Ord k => Monoid ( Map k v)
Instance details

Defined in Data.Map.Internal

( Eq k, Hashable k) => Monoid ( HashMap k v)

mempty = empty

mappend = union

If a key occurs in both maps, the mapping from the first will be the mapping in the result.

Examples

Expand
>>> mappend (fromList [(1,'a'),(2,'b')]) (fromList [(2,'c'),(3,'d')])
fromList [(1,'a'),(2,'b'),(3,'d')]
Instance details

Defined in Data.HashMap.Internal

Monoid a => Monoid ( ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Monoid ( Parser i a)
Instance details

Defined in Data.Attoparsec.Internal.Types

Monoid ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Monoid ( Format r (a -> r))

Useful instance for applying two formatters to the same input argument. For example: format (year <> "/" % month) now will yield "2015/01" .

Instance details

Defined in Formatting.Internal

Methods

mempty :: Format r (a -> r) Source #

mappend :: Format r (a -> r) -> Format r (a -> r) -> Format r (a -> r) Source #

mconcat :: [ Format r (a -> r)] -> Format r (a -> r) Source #

( Monoid a, Monoid b) => Monoid ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

Monoid (f p) => Monoid ( Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c) Source #

mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

mconcat :: [(a, b, c)] -> (a, b, c) Source #

Monoid a => Monoid ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

( Applicative f, Monoid a) => Monoid ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Alternative f => Monoid ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

( Semigroup a, Monoid a) => Monoid ( Tagged s a)
Instance details

Defined in Data.Tagged

Monoid c => Monoid ( K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :*: g) p Source #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

mconcat :: [(f :*: g) p] -> (f :*: g) p Source #

( Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d) Source #

mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

mconcat :: [(a, b, c, d)] -> (a, b, c, d) Source #

Monoid (f p) => Monoid ( M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: M1 i c f p Source #

mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

mconcat :: [ M1 i c f p] -> M1 i c f p Source #

Monoid (f (g p)) => Monoid ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :.: g) p Source #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

mconcat :: [(f :.: g) p] -> (f :.: g) p Source #

( Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d, e) Source #

mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) Source #

class HasField (x :: k) r a | x r -> a where Source #

Constraint representing the fact that the field x belongs to the record type r and has field type a . This will be solved automatically, but manual instances may be provided as well.

Methods

getField :: r -> a Source #

Selector function to extract the field from the record.

data Bool Source #

Constructors

False
True

Instances

Instances details
Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Bool
Instance details

Defined in GHC.Classes

Ord Bool
Instance details

Defined in GHC.Classes

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Bool

Since: base-2.1

Instance details

Defined in GHC.Ix

Generic Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type Source #

Hashable Bool
Instance details

Defined in Data.Hashable.Class

Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Bool

Interpret Bool as 1-bit bit-field

Since: base-4.7.0.0

Instance details

Defined in Data.Bits

FiniteBits Bool

Since: base-4.7.0.0

Instance details

Defined in Data.Bits

NFData Bool
Instance details

Defined in Control.DeepSeq

Buildable Bool
Instance details

Defined in Formatting.Buildable

Uniform Bool
Instance details

Defined in System.Random.Internal

UniformRange Bool
Instance details

Defined in System.Random.Internal

Unbox Bool
Instance details

Defined in Data.Vector.Unboxed.Base

SingKind Bool

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep Bool

Methods

fromSing :: forall (a :: Bool ). Sing a -> DemoteRep Bool

HeapWords Bool Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Bool
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Bool
Instance details

Defined in Data.Array.Base

Vector Vector Bool
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Bool
Instance details

Defined in Data.Vector.Unboxed.Base

SingI ' False

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ' False

SingI ' True

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ' True

MArray ( STUArray s) Bool ( ST s)
Instance details

Defined in Data.Array.Base

type Rep Bool
Instance details

Defined in GHC.Generics

newtype Vector Bool
Instance details

Defined in Data.Vector.Unboxed.Base

type DemoteRep Bool
Instance details

Defined in GHC.Generics

type DemoteRep Bool = Bool
data Sing (a :: Bool )
Instance details

Defined in GHC.Generics

data Sing (a :: Bool ) where
newtype MVector s Bool
Instance details

Defined in Data.Vector.Unboxed.Base

data Char Source #

The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) code points (i.e. characters, see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character set (the first 128 characters). A character literal in Haskell has type Char .

To convert a Char to or from the corresponding Int value defined by Unicode, use toEnum and fromEnum from the Enum class respectively (or equivalently ord and chr ).

Instances

Instances details
Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Char
Instance details

Defined in GHC.Classes

Ord Char
Instance details

Defined in GHC.Classes

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Char

Since: base-2.1

Instance details

Defined in GHC.Ix

Hashable Char
Instance details

Defined in Data.Hashable.Class

Storable Char

Since: base-2.1

Instance details

Defined in Foreign.Storable

NFData Char
Instance details

Defined in Control.DeepSeq

Buildable Char
Instance details

Defined in Formatting.Buildable

Prim Char
Instance details

Defined in Data.Primitive.Types

Uniform Char
Instance details

Defined in System.Random.Internal

UniformRange Char
Instance details

Defined in System.Random.Internal

ErrorList Char
Instance details

Defined in Control.Monad.Trans.Error

Unbox Char
Instance details

Defined in Data.Vector.Unboxed.Base

HeapWords Char Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Char
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Char
Instance details

Defined in Data.Array.Base

Monad m => ToJSON m String
Instance details

Defined in Text.JSON.Canonical.Class

ReportSchemaErrors m => FromJSON m String
Instance details

Defined in Text.JSON.Canonical.Class

Monad m => ToObjectKey m String
Instance details

Defined in Text.JSON.Canonical.Class

Monad m => FromObjectKey m String
Instance details

Defined in Text.JSON.Canonical.Class

ConvertText String String
Instance details

Defined in Protolude.ConvertText

ConvertText String Text
Instance details

Defined in Protolude.ConvertText

ConvertText String Text
Instance details

Defined in Protolude.ConvertText

ConvertText Text String
Instance details

Defined in Protolude.ConvertText

ConvertText Text String
Instance details

Defined in Protolude.ConvertText

Vector Vector Char
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Char
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 ( URec Char :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Char ) :: k -> Type Source #

Foldable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Buildable [ Char ]
Instance details

Defined in Formatting.Buildable

Print [ Char ]
Instance details

Defined in Protolude.Show

MArray ( STUArray s) Char ( ST s)
Instance details

Defined in Data.Array.Base

Functor ( URec Char :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Char p) :: Type -> Type Source #

newtype Vector Char
Instance details

Defined in Data.Vector.Unboxed.Base

data URec Char (p :: k)

Used for marking occurrences of Char#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

newtype MVector s Char
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 ( URec Char :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Char p)
Instance details

Defined in GHC.Generics

data Double Source #

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

Constructors

D# Double#

Instances

Instances details
Eq Double

Note that due to the presence of NaN , Double 's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Double)
False

Also note that Double 's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Double)
True
>>> recip 0 == recip (-0 :: Double)
False
Instance details

Defined in GHC.Classes

Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

Ord Double

Note that due to the presence of NaN , Double 's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Double)
False

Also note that, due to the same, Ord 's operator interactions are not respected by Double 's instance:

>>> (0/0 :: Double) > 1
False
>>> compare (0/0 :: Double) 1
GT
Instance details

Defined in GHC.Classes

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

Hashable Double

Note : prior to hashable-1.3.0.0 , hash 0.0 /= hash (-0.0)

The hash of NaN is not well defined.

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Storable Double

Since: base-2.1

Instance details

Defined in Foreign.Storable

NFData Double
Instance details

Defined in Control.DeepSeq

Buildable Double
Instance details

Defined in Formatting.Buildable

Prim Double
Instance details

Defined in Data.Primitive.Types

UniformRange Double

See Floating point number caveats .

Instance details

Defined in System.Random.Internal

Unbox Double
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Double
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Double
Instance details

Defined in Data.Array.Base

Vector Vector Double
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Double
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 ( URec Double :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Double ) :: k -> Type Source #

Foldable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

MArray ( STUArray s) Double ( ST s)
Instance details

Defined in Data.Array.Base

Functor ( URec Double :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

newtype Vector Double
Instance details

Defined in Data.Vector.Unboxed.Base

data URec Double (p :: k)

Used for marking occurrences of Double#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

newtype MVector s Double
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 ( URec Double :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Double p)
Instance details

Defined in GHC.Generics

data Float Source #

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

Constructors

F# Float#

Instances

Instances details
Eq Float

Note that due to the presence of NaN , Float 's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Float)
False

Also note that Float 's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Float)
True
>>> recip 0 == recip (-0 :: Float)
False
Instance details

Defined in GHC.Classes

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

Ord Float

Note that due to the presence of NaN , Float 's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Float)
False

Also note that, due to the same, Ord 's operator interactions are not respected by Float 's instance:

>>> (0/0 :: Float) > 1
False
>>> compare (0/0 :: Float) 1
GT
Instance details

Defined in GHC.Classes

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

Hashable Float

Note : prior to hashable-1.3.0.0 , hash 0.0 /= hash (-0.0)

The hash of NaN is not well defined.

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Storable Float

Since: base-2.1

Instance details

Defined in Foreign.Storable

NFData Float
Instance details

Defined in Control.DeepSeq

Buildable Float
Instance details

Defined in Formatting.Buildable

Prim Float
Instance details

Defined in Data.Primitive.Types

UniformRange Float

See Floating point number caveats .

Instance details

Defined in System.Random.Internal

Unbox Float
Instance details

Defined in Data.Vector.Unboxed.Base

HeapWords Float Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Float
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Float
Instance details

Defined in Data.Array.Base

Vector Vector Float
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Float
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 ( URec Float :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Float ) :: k -> Type Source #

Foldable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

MArray ( STUArray s) Float ( ST s)
Instance details

Defined in Data.Array.Base

Functor ( URec Float :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Float p)
Instance details

Defined in GHC.Generics

Ord ( URec Float p)
Instance details

Defined in GHC.Generics

Show ( URec Float p)
Instance details

Defined in GHC.Generics

Generic ( URec Float p)
Instance details

Defined in GHC.Generics

newtype Vector Float
Instance details

Defined in Data.Vector.Unboxed.Base

data URec Float (p :: k)

Used for marking occurrences of Float#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

newtype MVector s Float
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 ( URec Float :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Float p)
Instance details

Defined in GHC.Generics

data Int Source #

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.

Instances

Instances details
Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Int
Instance details

Defined in GHC.Classes

Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Ord Int
Instance details

Defined in GHC.Classes

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Int

Since: base-2.1

Instance details

Defined in GHC.Ix

Hashable Int
Instance details

Defined in Data.Hashable.Class

Storable Int

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Int

Since: base-2.1

Instance details

Defined in Data.Bits

FiniteBits Int

Since: base-4.6.0.0

Instance details

Defined in Data.Bits

NFData Int
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () Source #

Buildable Int
Instance details

Defined in Formatting.Buildable

Prim Int
Instance details

Defined in Data.Primitive.Types

Uniform Int
Instance details

Defined in System.Random.Internal

UniformRange Int
Instance details

Defined in System.Random.Internal

ByteSource Int
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Int g -> Int -> g

Unbox Int
Instance details

Defined in Data.Vector.Unboxed.Base

HeapWords Int Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Int
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Int
Instance details

Defined in Data.Array.Base

Vector Vector Int
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 ( URec Int :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Int ) :: k -> Type Source #

Foldable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

MArray ( STUArray s) Int ( ST s)
Instance details

Defined in Data.Array.Base

Functor ( URec Int :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Int p) :: Type -> Type Source #

newtype Vector Int
Instance details

Defined in Data.Vector.Unboxed.Base

data URec Int (p :: k)

Used for marking occurrences of Int#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type ByteSink Int g
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Int g = Takes4Bytes g
newtype MVector s Int
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 ( URec Int :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Int p)
Instance details

Defined in GHC.Generics

data Int8 Source #

8-bit signed integer type

Instances

Instances details
Bounded Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int8
Instance details

Defined in Data.Hashable.Class

Storable Int8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Int8

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int8

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

NFData Int8
Instance details

Defined in Control.DeepSeq

Buildable Int8
Instance details

Defined in Formatting.Buildable

Prim Int8
Instance details

Defined in Data.Primitive.Types

Uniform Int8
Instance details

Defined in System.Random.Internal

UniformRange Int8
Instance details

Defined in System.Random.Internal

Unbox Int8
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int8
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Int8
Instance details

Defined in Data.Array.Base

Vector Vector Int8
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int8
Instance details

Defined in Data.Vector.Unboxed.Base

MArray ( STUArray s) Int8 ( ST s)
Instance details

Defined in Data.Array.Base

newtype Vector Int8
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int8
Instance details

Defined in Data.Vector.Unboxed.Base

data Int16 Source #

16-bit signed integer type

Instances

Instances details
Bounded Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int16
Instance details

Defined in Data.Hashable.Class

Storable Int16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Int16

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int16

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

NFData Int16
Instance details

Defined in Control.DeepSeq

Buildable Int16
Instance details

Defined in Formatting.Buildable

Prim Int16
Instance details

Defined in Data.Primitive.Types

Uniform Int16
Instance details

Defined in System.Random.Internal

UniformRange Int16
Instance details

Defined in System.Random.Internal

Unbox Int16
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int16
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Int16
Instance details

Defined in Data.Array.Base

Vector Vector Int16
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int16
Instance details

Defined in Data.Vector.Unboxed.Base

MArray ( STUArray s) Int16 ( ST s)
Instance details

Defined in Data.Array.Base

newtype Vector Int16
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int16
Instance details

Defined in Data.Vector.Unboxed.Base

data Int32 Source #

32-bit signed integer type

Instances

Instances details
Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int32
Instance details

Defined in Data.Hashable.Class

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Int32

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int32

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

NFData Int32
Instance details

Defined in Control.DeepSeq

Buildable Int32
Instance details

Defined in Formatting.Buildable

Prim Int32
Instance details

Defined in Data.Primitive.Types

Uniform Int32
Instance details

Defined in System.Random.Internal

UniformRange Int32
Instance details

Defined in System.Random.Internal

Unbox Int32
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int32
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Int32
Instance details

Defined in Data.Array.Base

Monad m => ToJSON m Int32 Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

ReportSchemaErrors m => FromJSON m Int32 Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

Vector Vector Int32
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int32
Instance details

Defined in Data.Vector.Unboxed.Base

MArray ( STUArray s) Int32 ( ST s)
Instance details

Defined in Data.Array.Base

newtype Vector Int32
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int32
Instance details

Defined in Data.Vector.Unboxed.Base

data Int64 Source #

64-bit signed integer type

Instances

Instances details
Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int64
Instance details

Defined in Data.Hashable.Class

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Int64

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int64

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

NFData Int64
Instance details

Defined in Control.DeepSeq

Buildable Int64
Instance details

Defined in Formatting.Buildable

Prim Int64
Instance details

Defined in Data.Primitive.Types

Uniform Int64
Instance details

Defined in System.Random.Internal

UniformRange Int64
Instance details

Defined in System.Random.Internal

Unbox Int64
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int64
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Int64
Instance details

Defined in Data.Array.Base

Vector Vector Int64
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int64
Instance details

Defined in Data.Vector.Unboxed.Base

MArray ( STUArray s) Int64 ( ST s)
Instance details

Defined in Data.Array.Base

newtype Vector Int64
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int64
Instance details

Defined in Data.Vector.Unboxed.Base

data Integer Source #

Arbitrary precision integers. In contrast with fixed-size integral types such as Int , the Integer type represents the entire infinite range of integers.

For more information about this type's representation, see the comments in its implementation.

Instances

Instances details
Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Integer
Instance details

Defined in GHC.Integer.Type

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Ord Integer
Instance details

Defined in GHC.Integer.Type

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Integer

Since: base-2.1

Instance details

Defined in GHC.Ix

Hashable Integer
Instance details

Defined in Data.Hashable.Class

Bits Integer

Since: base-2.1

Instance details

Defined in Data.Bits

NFData Integer
Instance details

Defined in Control.DeepSeq

Buildable Integer
Instance details

Defined in Formatting.Buildable

UniformRange Integer
Instance details

Defined in System.Random.Internal

HeapWords Integer Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Integer
Instance details

Defined in Language.Haskell.TH.Syntax

Monad m => ToJSON m Integer Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

ReportSchemaErrors m => FromJSON m Integer Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

data Natural Source #

Type representing arbitrary-precision non-negative integers.

>>> 2^100 :: Natural
1267650600228229401496703205376

Operations whose result would be negative throw ( Underflow :: ArithException ) ,

>>> -1 :: Natural
*** Exception: arithmetic underflow

Since: base-4.8.0.0

Instances

Instances details
Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Eq Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Num Natural

Note that Natural 's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Ord Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Ix Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Ix

Hashable Natural
Instance details

Defined in Data.Hashable.Class

Bits Natural

Since: base-4.8.0

Instance details

Defined in Data.Bits

NFData Natural

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

UniformRange Natural
Instance details

Defined in System.Random.Internal

HeapWords Natural Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Natural
Instance details

Defined in Language.Haskell.TH.Syntax

Monad m => ToJSON m Natural Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

MonadError SchemaError m => FromJSON m Natural Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

data Maybe a Source #

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a ), or it is empty (represented as Nothing ). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error .

The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing . A richer error monad can be built using the Either type.

Constructors

Nothing
Just a

Instances

Instances details
Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

NFData1 Maybe

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Maybe a -> () Source #

Hashable1 Maybe
Instance details

Defined in Data.Hashable.Class

MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

Lift a => Lift ( Maybe a :: Type )
Instance details

Defined in Language.Haskell.TH.Syntax

Eq a => Eq ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Ord a => Ord ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Read a => Read ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

Show a => Show ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Generic ( Maybe a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Maybe a) :: Type -> Type Source #

Semigroup a => Semigroup ( Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup a => Monoid ( Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid : "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S ."

Since 4.11.0 : constraint on inner a value generalised from Monoid to Semigroup .

Since: base-2.1

Instance details

Defined in GHC.Base

Hashable a => Hashable ( Maybe a)
Instance details

Defined in Data.Hashable.Class

NFData a => NFData ( Maybe a)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () Source #

Buildable a => Buildable ( Maybe a)
Instance details

Defined in Formatting.Buildable

SingKind a => SingKind ( Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep ( Maybe a)

Methods

fromSing :: forall (a0 :: Maybe a). Sing a0 -> DemoteRep ( Maybe a)

HeapWords a => HeapWords ( Maybe a) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Generic1 Maybe

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Maybe :: k -> Type Source #

Methods

from1 :: forall (a :: k). Maybe a -> Rep1 Maybe a Source #

to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a Source #

SingI (' Nothing :: Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ' Nothing

SingI a2 => SingI (' Just a2 :: Maybe a1)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing (' Just a2)

type Rep ( Maybe a)
Instance details

Defined in GHC.Generics

type DemoteRep ( Maybe a)
Instance details

Defined in GHC.Generics

type DemoteRep ( Maybe a) = Maybe (DemoteRep a)
data Sing (b :: Maybe a)
Instance details

Defined in GHC.Generics

data Sing (b :: Maybe a) where
type Rep1 Maybe
Instance details

Defined in GHC.Generics

data Ordering Source #

Constructors

LT
EQ
GT

Instances

Instances details
Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Ordering
Instance details

Defined in GHC.Classes

Ord Ordering
Instance details

Defined in GHC.Classes

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Ordering

Since: base-2.1

Instance details

Defined in GHC.Ix

Generic Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Hashable Ordering
Instance details

Defined in Data.Hashable.Class

NFData Ordering
Instance details

Defined in Control.DeepSeq

type Rep Ordering
Instance details

Defined in GHC.Generics

data Ratio a Source #

Rational numbers, with numerator and denominator of some Integral type.

Note that Ratio 's instances inherit the deficiencies from the type parameter's. For example, Ratio Natural 's Num instance has similar problems to Natural 's.

Instances

Instances details
NFData1 Ratio

Available on base >=4.9

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Ratio a -> () Source #

Integral a => Lift ( Ratio a :: Type )
Instance details

Defined in Language.Haskell.TH.Syntax

Integral a => Enum ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Eq a => Eq ( Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Real

Integral a => Fractional ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral a => Num ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral a => Ord ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

( Integral a, Read a) => Read ( Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Read

Integral a => Real ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral a => RealFrac ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show a => Show ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Hashable a => Hashable ( Ratio a)
Instance details

Defined in Data.Hashable.Class

( Storable a, Integral a) => Storable ( Ratio a)

Since: base-4.8.0.0

Instance details

Defined in Foreign.Storable

NFData a => NFData ( Ratio a)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ratio a -> () Source #

( Integral a, Buildable a) => Buildable ( Ratio a)
Instance details

Defined in Formatting.Buildable

type Rational = Ratio Integer Source #

Arbitrary-precision rational numbers, represented as a ratio of two Integer values. A rational number may be constructed using the % operator.

data StablePtr a Source #

A stable pointer is a reference to a Haskell expression that is guaranteed not to be affected by garbage collection, i.e., it will neither be deallocated nor will the value of the stable pointer itself change during garbage collection (ordinary references may be relocated during garbage collection). Consequently, stable pointers can be passed to foreign code, which can treat it as an opaque reference to a Haskell value.

A value of type StablePtr a is a stable pointer to a Haskell expression of type a .

Instances

Instances details
IArray UArray ( StablePtr a)
Instance details

Defined in Data.Array.Base

Eq ( StablePtr a)

Since: base-2.1

Instance details

Defined in GHC.Stable

Storable ( StablePtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Prim ( StablePtr a)
Instance details

Defined in Data.Primitive.Types

MArray ( STUArray s) ( StablePtr a) ( ST s)
Instance details

Defined in Data.Array.Base

data IO a Source #

A value of type IO a is a computation which, when performed, does some I/O before returning a value of type a .

There is really only one way to "perform" an I/O action: bind it to Main.main in your program. When your program is run, the I/O will be performed. It isn't possible to perform I/O from an arbitrary function, unless that function is itself in the IO monad and called at some point, directly or indirectly, from Main.main .

IO is a monad, so IO actions can be combined using either the do-notation or the >> and >>= operations from the Monad class.

Instances

Instances details
Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> IO a -> IO b Source #

(<$) :: a -> IO b -> IO a Source #

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Alternative IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

MonadPlus IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

PrimMonad IO
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState IO Source #

PrimBase IO
Instance details

Defined in Control.Monad.Primitive

Quasi IO
Instance details

Defined in Language.Haskell.TH.Syntax

MonadError IOException IO
Instance details

Defined in Control.Monad.Error.Class

MArray IOArray e IO
Instance details

Defined in Data.Array.Base

Semigroup a => Semigroup ( IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Monoid a => Monoid ( IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

type PrimState IO
Instance details

Defined in Control.Monad.Primitive

data Word Source #

A Word is an unsigned integral type, with the same size as Int .

Instances

Instances details
Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Word
Instance details

Defined in GHC.Classes

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Ord Word
Instance details

Defined in GHC.Classes

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Word

Since: base-4.6.0.0

Instance details

Defined in GHC.Ix

Hashable Word
Instance details

Defined in Data.Hashable.Class

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word

Since: base-2.1

Instance details

Defined in Data.Bits

FiniteBits Word

Since: base-4.6.0.0

Instance details

Defined in Data.Bits

NFData Word
Instance details

Defined in Control.DeepSeq

Buildable Word
Instance details

Defined in Formatting.Buildable

Prim Word
Instance details

Defined in Data.Primitive.Types

Uniform Word
Instance details

Defined in System.Random.Internal

UniformRange Word
Instance details

Defined in System.Random.Internal

Unbox Word
Instance details

Defined in Data.Vector.Unboxed.Base

HeapWords Word Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Word
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Word
Instance details

Defined in Data.Array.Base

Vector Vector Word
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 ( URec Word :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Word ) :: k -> Type Source #

Foldable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

MArray ( STUArray s) Word ( ST s)
Instance details

Defined in Data.Array.Base

Functor ( URec Word :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Word p) :: Type -> Type Source #

newtype Vector Word
Instance details

Defined in Data.Vector.Unboxed.Base

data URec Word (p :: k)

Used for marking occurrences of Word#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

newtype MVector s Word
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 ( URec Word :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Word p)
Instance details

Defined in GHC.Generics

data Word8 Source #

8-bit unsigned integer type

Instances

Instances details
Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word8
Instance details

Defined in Data.Hashable.Class

Storable Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word8

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word8

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

NFData Word8
Instance details

Defined in Control.DeepSeq

Buildable Word8
Instance details

Defined in Formatting.Buildable

Prim Word8
Instance details

Defined in Data.Primitive.Types

Uniform Word8
Instance details

Defined in System.Random.Internal

UniformRange Word8
Instance details

Defined in System.Random.Internal

ByteSource Word8
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word8 g -> Word8 -> g

Unbox Word8
Instance details

Defined in Data.Vector.Unboxed.Base

HeapWords Word8 Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Word8
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Word8
Instance details

Defined in Data.Array.Base

Vector Vector Word8
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word8
Instance details

Defined in Data.Vector.Unboxed.Base

MArray ( STUArray s) Word8 ( ST s)
Instance details

Defined in Data.Array.Base

newtype Vector Word8
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word8 g
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word8 g = Takes1Byte g
newtype MVector s Word8
Instance details

Defined in Data.Vector.Unboxed.Base

data Word16 Source #

16-bit unsigned integer type

Instances

Instances details
Bounded Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word16

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word16
Instance details

Defined in Data.Hashable.Class

Storable Word16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word16

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word16

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

NFData Word16
Instance details

Defined in Control.DeepSeq

Buildable Word16
Instance details

Defined in Formatting.Buildable

Prim Word16
Instance details

Defined in Data.Primitive.Types

Uniform Word16
Instance details

Defined in System.Random.Internal

UniformRange Word16
Instance details

Defined in System.Random.Internal

ByteSource Word16
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word16 g -> Word16 -> g

Unbox Word16
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word16
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Word16
Instance details

Defined in Data.Array.Base

Monad m => ToJSON m Word16 Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

ReportSchemaErrors m => FromJSON m Word16 Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

Vector Vector Word16
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word16
Instance details

Defined in Data.Vector.Unboxed.Base

MArray ( STUArray s) Word16 ( ST s)
Instance details

Defined in Data.Array.Base

newtype Vector Word16
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word16 g
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word16 g = Takes2Bytes g
newtype MVector s Word16
Instance details

Defined in Data.Vector.Unboxed.Base

data Word32 Source #

32-bit unsigned integer type

Instances

Instances details
Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word32
Instance details

Defined in Data.Hashable.Class

Storable Word32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word32

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word32

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

NFData Word32
Instance details

Defined in Control.DeepSeq

Buildable Word32
Instance details

Defined in Formatting.Buildable

Prim Word32
Instance details

Defined in Data.Primitive.Types

Uniform Word32
Instance details

Defined in System.Random.Internal

UniformRange Word32
Instance details

Defined in System.Random.Internal

ByteSource Word32
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word32 g -> Word32 -> g

Unbox Word32
Instance details

Defined in Data.Vector.Unboxed.Base

HeapWords Word32 Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Word32
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Word32
Instance details

Defined in Data.Array.Base

Monad m => ToJSON m Word32 Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

ReportSchemaErrors m => FromJSON m Word32 Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

Vector Vector Word32
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word32
Instance details

Defined in Data.Vector.Unboxed.Base

MArray ( STUArray s) Word32 ( ST s)
Instance details

Defined in Data.Array.Base

newtype Vector Word32
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word32 g
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word32 g = Takes4Bytes g
newtype MVector s Word32
Instance details

Defined in Data.Vector.Unboxed.Base

data Word64 Source #

64-bit unsigned integer type

Instances

Instances details
Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word64
Instance details

Defined in Data.Hashable.Class

Storable Word64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word64

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word64

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

NFData Word64
Instance details

Defined in Control.DeepSeq

Buildable Word64
Instance details

Defined in Formatting.Buildable

Prim Word64
Instance details

Defined in Data.Primitive.Types

Uniform Word64
Instance details

Defined in System.Random.Internal

UniformRange Word64
Instance details

Defined in System.Random.Internal

ByteSource Word64
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word64 g -> Word64 -> g

Unbox Word64
Instance details

Defined in Data.Vector.Unboxed.Base

HeapWords Word64 Source #
Instance details

Defined in Cardano.Prelude.HeapWords

Lift Word64
Instance details

Defined in Language.Haskell.TH.Syntax

IArray UArray Word64
Instance details

Defined in Data.Array.Base

Monad m => ToJSON m Word64 Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

ReportSchemaErrors m => FromJSON m Word64 Source #
Instance details

Defined in Cardano.Prelude.Json.Canonical

Vector Vector Word64
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word64
Instance details

Defined in Data.Vector.Unboxed.Base

MArray ( STUArray s) Word64 ( ST s)
Instance details

Defined in Data.Array.Base

newtype Vector Word64
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word64 g
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word64 g = Takes8Bytes g
newtype MVector s Word64
Instance details

Defined in Data.Vector.Unboxed.Base

data Ptr a Source #

A value of type Ptr a represents a pointer to an object, or an array of objects, which may be marshalled to or from Haskell values of type a .

The type a will often be an instance of class Storable which provides the marshalling operations. However this is not essential, and you can provide your own operations to access the pointer. For example you might write small foreign functions to get or set the fields of a C struct .

Instances

Instances details
NFData1 Ptr

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Ptr a -> () Source #

IArray UArray ( Ptr a)
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i ( Ptr a) -> (i, i) Source #

numElements :: Ix i => UArray i ( Ptr a) -> Int

unsafeArray :: Ix i => (i, i) -> [( Int , Ptr a)] -> UArray i ( Ptr a)

unsafeAt :: Ix i => UArray i ( Ptr a) -> Int -> Ptr a

unsafeReplace :: Ix i => UArray i ( Ptr a) -> [( Int , Ptr a)] -> UArray i ( Ptr a)

unsafeAccum :: Ix i => ( Ptr a -> e' -> Ptr a) -> UArray i ( Ptr a) -> [( Int , e')] -> UArray i ( Ptr a)

unsafeAccumArray :: Ix i => ( Ptr a -> e' -> Ptr a) -> Ptr a -> (i, i) -> [( Int , e')] -> UArray i ( Ptr a)

Generic1 ( URec ( Ptr ()) :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec ( Ptr ())) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec ( Ptr ()) a -> Rep1 ( URec ( Ptr ())) a Source #

to1 :: forall (a :: k0). Rep1 ( URec ( Ptr ())) a -> URec ( Ptr ()) a Source #

Eq ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Ord ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Show ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Foldable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Hashable ( Ptr a)
Instance details

Defined in Data.Hashable.Class

Storable ( Ptr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

NFData ( Ptr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ptr a -> () Source #

Buildable ( Ptr a)
Instance details

Defined in Formatting.Buildable

Prim ( Ptr a)
Instance details

Defined in Data.Primitive.Types

MArray ( STUArray s) ( Ptr a) ( ST s)
Instance details

Defined in Data.Array.Base

Functor ( URec ( Ptr ()) :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec ( Ptr ()) a -> URec ( Ptr ()) b Source #

(<$) :: a -> URec ( Ptr ()) b -> URec ( Ptr ()) a Source #

Eq ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec ( Ptr ()) p) :: Type -> Type Source #

data URec ( Ptr ()) (p :: k)

Used for marking occurrences of Addr#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec ( Ptr ()) (p :: k) = UAddr { }
type Rep1 ( URec ( Ptr ()) :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec ( Ptr ()) p)
Instance details

Defined in GHC.Generics

data FunPtr a Source #

A value of type FunPtr a is a pointer to a function callable from foreign code. The type a will normally be a foreign type , a function type with zero or more arguments where

A value of type FunPtr a may be a pointer to a foreign function, either returned by another foreign function or imported with a a static address import like

foreign import ccall "stdlib.h &free"
  p_free :: FunPtr (Ptr a -> IO ())

or a pointer to a Haskell function created using a wrapper stub declared to produce a FunPtr of the correct type. For example:

type Compare = Int -> Int -> Bool
foreign import ccall "wrapper"
  mkCompare :: Compare -> IO (FunPtr Compare)

Calls to wrapper stubs like mkCompare allocate storage, which should be released with freeHaskellFunPtr when no longer required.

To convert FunPtr values to corresponding Haskell functions, one can define a dynamic stub for the specific foreign type, e.g.

type IntFunction = CInt -> IO ()
foreign import ccall "dynamic"
  mkFun :: FunPtr IntFunction -> IntFunction

Instances

Instances details
NFData1 FunPtr

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> FunPtr a -> () Source #

IArray UArray ( FunPtr a)
Instance details

Defined in Data.Array.Base

Eq ( FunPtr a)
Instance details

Defined in GHC.Ptr

Ord ( FunPtr a)
Instance details

Defined in GHC.Ptr

Show ( FunPtr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Hashable ( FunPtr a)
Instance details

Defined in Data.Hashable.Class

Storable ( FunPtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

NFData ( FunPtr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: FunPtr a -> () Source #

Prim ( FunPtr a)
Instance details

Defined in Data.Primitive.Types

MArray ( STUArray s) ( FunPtr a) ( ST s)
Instance details

Defined in Data.Array.Base

data Either a b Source #

The Either type represents values with two possibilities: a value of type Either a b is either Left a or Right b .

The Either type is sometimes used to represent a value which is either correct or an error; by convention, the Left constructor is used to hold an error value and the Right constructor is used to hold a correct value (mnemonic: "right" also means "correct").

Examples

Expand

The type Either String Int is the type of values which can be either a String or an Int . The Left constructor can be used only on String s, and the Right constructor can be used only on Int s:

>>> let s = Left "foo" :: Either String Int
>>> s
Left "foo"
>>> let n = Right 3 :: Either String Int
>>> n
Right 3
>>> :type s
s :: Either String Int
>>> :type n
n :: Either String Int

The fmap from our Functor instance will ignore Left values, but will apply the supplied function to values contained in a Right :

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> fmap (*2) s
Left "foo"
>>> fmap (*2) n
Right 6

The Monad instance for Either allows us to chain together multiple actions which may fail, and fail overall if any of the individual steps failed. First we'll write a function that can either parse an Int from a Char , or fail.

>>> import Data.Char ( digitToInt, isDigit )
>>> :{
    let parseEither :: Char -> Either String Int
        parseEither c
          | isDigit c = Right (digitToInt c)
          | otherwise = Left "parse error"
>>> :}

The following should work, since both '1' and '2' can be parsed as Int s.

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither '1'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Right 3

But the following should fail overall, since the first operation where we attempt to parse 'm' as an Int will fail:

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither 'm'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Left "parse error"

Constructors

Left a
Right b

Instances

Instances details
Bifunctor Either

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

first :: (a -> b) -> Either a c -> Either b c Source #

second :: (b -> c) -> Either a b -> Either a c Source #

Bifoldable Either

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => Either m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Either a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Either a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Either a b -> c Source #

NFData2 Either

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Either a b -> () Source #

Hashable2 Either
Instance details

Defined in Data.Hashable.Class

MonadError e ( Either e)
Instance details

Defined in Control.Monad.Error.Class

( Lift a, Lift b) => Lift ( Either a b :: Type )
Instance details

Defined in Language.Haskell.TH.Syntax

Monad ( Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Functor ( Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b Source #

(<$) :: a0 -> Either a b -> Either a a0 Source #

Applicative ( Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Foldable ( Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

toList :: Either a a0 -> [a0] Source #

null :: Either a a0 -> Bool Source #

length :: Either a a0 -> Int Source #

elem :: Eq a0 => a0 -> Either a a0 -> Bool Source #

maximum :: Ord a0 => Either a a0 -> a0 Source #

minimum :: Ord a0 => Either a a0 -> a0 Source #

sum :: Num a0 => Either a a0 -> a0 Source #

product :: Num a0 => Either a a0 -> a0 Source #

Traversable ( Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f ( Either a b) Source #

sequenceA :: Applicative f => Either a (f a0) -> f ( Either a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m ( Either a b) Source #

sequence :: Monad m => Either a (m a0) -> m ( Either a a0) Source #

NFData a => NFData1 ( Either a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Either a a0 -> () Source #

Hashable a => Hashable1 ( Either a)
Instance details

Defined in Data.Hashable.Class

Generic1 ( Either a :: Type -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( Either a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Either a a0 -> Rep1 ( Either a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Either a) a0 -> Either a a0 Source #

( Eq a, Eq b) => Eq ( Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

( Ord a, Ord b) => Ord ( Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

( Read a, Read b) => Read ( Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

( Show a, Show b) => Show ( Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

Generic ( Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Either a b) :: Type -> Type Source #

Semigroup ( Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

( Hashable a, Hashable b) => Hashable ( Either a b)
Instance details

Defined in Data.Hashable.Class

( NFData a, NFData b) => NFData ( Either a b)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Either a b -> () Source #

( HeapWords a, HeapWords b) => HeapWords ( Either a b) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

type Rep1 ( Either a :: Type -> Type )
Instance details

Defined in GHC.Generics

type Rep ( Either a b)
Instance details

Defined in GHC.Generics

type Type = Type Source #

The kind of types with lifted values. For example Int :: Type .

data Constraint Source #

The kind of constraints, like Show a

data V1 (p :: k) Source #

Void: used for datatypes without constructors

Instances

Instances details
Generic1 ( V1 :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 V1 :: k -> Type Source #

Methods

from1 :: forall (a :: k0). V1 a -> Rep1 V1 a Source #

to1 :: forall (a :: k0). Rep1 V1 a -> V1 a Source #

GNFData arity ( V1 :: Type -> Type )
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs arity a -> V1 a -> ()

Functor ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> V1 a -> V1 b Source #

(<$) :: a -> V1 b -> V1 a Source #

Foldable ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Eq ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( V1 p) :: Type -> Type Source #

Semigroup ( V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

type Rep1 ( V1 :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( V1 :: k -> Type ) = D1 (' MetaData "V1" "GHC.Generics" "base" ' False ) ( V1 :: k -> Type )
type Rep ( V1 p)
Instance details

Defined in GHC.Generics

type Rep ( V1 p) = D1 (' MetaData "V1" "GHC.Generics" "base" ' False ) ( V1 :: Type -> Type )

data U1 (p :: k) Source #

Unit: used for constructors without arguments

Constructors

U1

Instances

Instances details
Generic1 ( U1 :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 U1 :: k -> Type Source #

Methods

from1 :: forall (a :: k0). U1 a -> Rep1 U1 a Source #

to1 :: forall (a :: k0). Rep1 U1 a -> U1 a Source #

GNFData arity ( U1 :: Type -> Type )
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs arity a -> U1 a -> ()

Monad ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> U1 a -> U1 b Source #

(<$) :: a -> U1 b -> U1 a Source #

Applicative ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Foldable ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Alternative ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

MonadPlus ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

GUniform ( U1 :: Type -> Type )
Instance details

Defined in System.Random.Internal

Methods

guniformM :: forall g (m :: Type -> Type ) r a. StatefulGen g m => g -> ContT r m ( U1 a)

Eq ( U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Read ( U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( U1 p) :: Type -> Type Source #

Semigroup ( U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Monoid ( U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

type Rep1 ( U1 :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( U1 :: k -> Type ) = D1 (' MetaData "U1" "GHC.Generics" "base" ' False ) ( C1 (' MetaCons "U1" ' PrefixI ' False ) ( U1 :: k -> Type ))
type Rep ( U1 p)
Instance details

Defined in GHC.Generics

type Rep ( U1 p) = D1 (' MetaData "U1" "GHC.Generics" "base" ' False ) ( C1 (' MetaCons "U1" ' PrefixI ' False ) ( U1 :: Type -> Type ))

newtype K1 i c (p :: k) Source #

Constants, additional parameters and recursion of kind *

Constructors

K1

Fields

Instances

Instances details
Generic1 ( K1 i c :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( K1 i c) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). K1 i c a -> Rep1 ( K1 i c) a Source #

to1 :: forall (a :: k0). Rep1 ( K1 i c) a -> K1 i c a Source #

NFData a => GNFData arity ( K1 i a :: Type -> Type )
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs arity a0 -> K1 i a a0 -> ()

Bifunctor ( K1 i :: Type -> Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> K1 i a c -> K1 i b d Source #

first :: (a -> b) -> K1 i a c -> K1 i b c Source #

second :: (b -> c) -> K1 i a b -> K1 i a c Source #

Bifoldable ( K1 i :: Type -> Type -> Type )

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => K1 i m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> K1 i a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> K1 i a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> K1 i a b -> c Source #

Functor ( K1 i c :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> K1 i c a -> K1 i c b Source #

(<$) :: a -> K1 i c b -> K1 i c a Source #

Monoid c => Applicative ( K1 i c :: Type -> Type )

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> K1 i c a Source #

(<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b Source #

liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 Source #

(*>) :: K1 i c a -> K1 i c b -> K1 i c b Source #

(<*) :: K1 i c a -> K1 i c b -> K1 i c a Source #

Foldable ( K1 i c :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => K1 i c m -> m Source #

foldMap :: Monoid m => (a -> m) -> K1 i c a -> m Source #

foldMap' :: Monoid m => (a -> m) -> K1 i c a -> m Source #

foldr :: (a -> b -> b) -> b -> K1 i c a -> b Source #

foldr' :: (a -> b -> b) -> b -> K1 i c a -> b Source #

foldl :: (b -> a -> b) -> b -> K1 i c a -> b Source #

foldl' :: (b -> a -> b) -> b -> K1 i c a -> b Source #

foldr1 :: (a -> a -> a) -> K1 i c a -> a Source #

foldl1 :: (a -> a -> a) -> K1 i c a -> a Source #

toList :: K1 i c a -> [a] Source #

null :: K1 i c a -> Bool Source #

length :: K1 i c a -> Int Source #

elem :: Eq a => a -> K1 i c a -> Bool Source #

maximum :: Ord a => K1 i c a -> a Source #

minimum :: Ord a => K1 i c a -> a Source #

sum :: Num a => K1 i c a -> a Source #

product :: Num a => K1 i c a -> a Source #

Traversable ( K1 i c :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> K1 i c a -> f ( K1 i c b) Source #

sequenceA :: Applicative f => K1 i c (f a) -> f ( K1 i c a) Source #

mapM :: Monad m => (a -> m b) -> K1 i c a -> m ( K1 i c b) Source #

sequence :: Monad m => K1 i c (m a) -> m ( K1 i c a) Source #

Uniform a => GUniform ( K1 i a :: Type -> Type )
Instance details

Defined in System.Random.Internal

Methods

guniformM :: forall g (m :: Type -> Type ) r a0. StatefulGen g m => g -> ContT r m ( K1 i a a0)

Eq c => Eq ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Ord c => Ord ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Read c => Read ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Show c => Show ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Generic ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( K1 i c p) :: Type -> Type Source #

Methods

from :: K1 i c p -> Rep ( K1 i c p) x Source #

to :: Rep ( K1 i c p) x -> K1 i c p Source #

Semigroup c => Semigroup ( K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Monoid c => Monoid ( K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

type Rep1 ( K1 i c :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( K1 i c p)
Instance details

Defined in GHC.Generics

newtype M1 i (c :: Meta ) (f :: k -> Type ) (p :: k) Source #

Meta-information (constructor names, etc.)

Constructors

M1

Fields

Instances

Instances details
GHashable arity a => GSum arity ( C1 c a)
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

hashSum :: HashArgs arity a0 -> Int -> Int -> C1 c a a0 -> Int

Generic1 ( M1 i c f :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( M1 i c f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). M1 i c f a -> Rep1 ( M1 i c f) a Source #

to1 :: forall (a :: k0). Rep1 ( M1 i c f) a -> M1 i c f a Source #

GNFData arity a => GNFData arity ( M1 i c a)
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs arity a0 -> M1 i c a a0 -> ()

SumSize ( C1 c a)
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

sumSize :: Tagged ( C1 c a)

GBinaryGet a => GSumGet ( C1 c a)
Instance details

Defined in Data.Binary.Generic

Methods

getSum :: ( Ord word, Num word, Bits word) => word -> word -> Get ( C1 c a a0)

SumSize ( C1 c a)
Instance details

Defined in Data.Binary.Generic

Methods

sumSize :: Tagged ( C1 c a) Word64

GBinaryPut a => GSumPut ( C1 c a)
Instance details

Defined in Data.Binary.Generic

Methods

putSum :: ( Num w, Bits w, Binary w) => w -> w -> C1 c a a0 -> Put

Monad f => Monad ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: M1 i c f a -> (a -> M1 i c f b) -> M1 i c f b Source #

(>>) :: M1 i c f a -> M1 i c f b -> M1 i c f b Source #

return :: a -> M1 i c f a Source #

Functor f => Functor ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> M1 i c f a -> M1 i c f b Source #

(<$) :: a -> M1 i c f b -> M1 i c f a Source #

Applicative f => Applicative ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> M1 i c f a Source #

(<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b Source #

liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 Source #

(*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b Source #

(<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a Source #

Foldable f => Foldable ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => M1 i c f m -> m Source #

foldMap :: Monoid m => (a -> m) -> M1 i c f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> M1 i c f a -> m Source #

foldr :: (a -> b -> b) -> b -> M1 i c f a -> b Source #

foldr' :: (a -> b -> b) -> b -> M1 i c f a -> b Source #

foldl :: (b -> a -> b) -> b -> M1 i c f a -> b Source #

foldl' :: (b -> a -> b) -> b -> M1 i c f a -> b Source #

foldr1 :: (a -> a -> a) -> M1 i c f a -> a Source #

foldl1 :: (a -> a -> a) -> M1 i c f a -> a Source #

toList :: M1 i c f a -> [a] Source #

null :: M1 i c f a -> Bool Source #

length :: M1 i c f a -> Int Source #

elem :: Eq a => a -> M1 i c f a -> Bool Source #

maximum :: Ord a => M1 i c f a -> a Source #

minimum :: Ord a => M1 i c f a -> a Source #

sum :: Num a => M1 i c f a -> a Source #

product :: Num a => M1 i c f a -> a Source #

Traversable f => Traversable ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> M1 i c f a -> f0 ( M1 i c f b) Source #

sequenceA :: Applicative f0 => M1 i c f (f0 a) -> f0 ( M1 i c f a) Source #

mapM :: Monad m => (a -> m b) -> M1 i c f a -> m ( M1 i c f b) Source #

sequence :: Monad m => M1 i c f (m a) -> m ( M1 i c f a) Source #

Alternative f => Alternative ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: M1 i c f a Source #

(<|>) :: M1 i c f a -> M1 i c f a -> M1 i c f a Source #

some :: M1 i c f a -> M1 i c f [a] Source #

many :: M1 i c f a -> M1 i c f [a] Source #

MonadPlus f => MonadPlus ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: M1 i c f a Source #

mplus :: M1 i c f a -> M1 i c f a -> M1 i c f a Source #

GUniform f => GUniform ( M1 i c f)
Instance details

Defined in System.Random.Internal

Methods

guniformM :: forall g (m :: Type -> Type ) r a. StatefulGen g m => g -> ContT r m ( M1 i c f a)

Eq (f p) => Eq ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: M1 i c f p -> M1 i c f p -> Bool Source #

(/=) :: M1 i c f p -> M1 i c f p -> Bool Source #

Ord (f p) => Ord ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: M1 i c f p -> M1 i c f p -> Ordering Source #

(<) :: M1 i c f p -> M1 i c f p -> Bool Source #

(<=) :: M1 i c f p -> M1 i c f p -> Bool Source #

(>) :: M1 i c f p -> M1 i c f p -> Bool Source #

(>=) :: M1 i c f p -> M1 i c f p -> Bool Source #

max :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

min :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

Read (f p) => Read ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Show (f p) => Show ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Generic ( M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( M1 i c f p) :: Type -> Type Source #

Methods

from :: M1 i c f p -> Rep ( M1 i c f p) x Source #

to :: Rep ( M1 i c f p) x -> M1 i c f p Source #

Semigroup (f p) => Semigroup ( M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

sconcat :: NonEmpty ( M1 i c f p) -> M1 i c f p Source #

stimes :: Integral b => b -> M1 i c f p -> M1 i c f p Source #

Monoid (f p) => Monoid ( M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: M1 i c f p Source #

mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

mconcat :: [ M1 i c f p] -> M1 i c f p Source #

type Rep1 ( M1 i c f :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( M1 i c f p)
Instance details

Defined in GHC.Generics

data ((f :: k -> Type ) :+: (g :: k -> Type )) (p :: k) infixr 5 Source #

Sums: encode choice between constructors

Constructors

L1 (f p)
R1 (g p)

Instances

Instances details
Generic1 (f :+: g :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :+: g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). (f :+: g) a -> Rep1 (f :+: g) a Source #

to1 :: forall (a :: k0). Rep1 (f :+: g) a -> (f :+: g) a Source #

(GSum arity a, GSum arity b) => GSum arity (a :+: b)
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

hashSum :: HashArgs arity a0 -> Int -> Int -> (a :+: b) a0 -> Int

(GNFData arity a, GNFData arity b) => GNFData arity (a :+: b)
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs arity a0 -> (a :+: b) a0 -> ()

( Functor f, Functor g) => Functor (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :+: g) a -> (f :+: g) b Source #

(<$) :: a -> (f :+: g) b -> (f :+: g) a Source #

( Foldable f, Foldable g) => Foldable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :+: g) m -> m Source #

foldMap :: Monoid m => (a -> m) -> (f :+: g) a -> m Source #

foldMap' :: Monoid m => (a -> m) -> (f :+: g) a -> m Source #

foldr :: (a -> b -> b) -> b -> (f :+: g) a -> b Source #

foldr' :: (a -> b -> b) -> b -> (f :+: g) a -> b Source #

foldl :: (b -> a -> b) -> b -> (f :+: g) a -> b Source #

foldl' :: (b -> a -> b) -> b -> (f :+: g) a -> b Source #

foldr1 :: (a -> a -> a) -> (f :+: g) a -> a Source #

foldl1 :: (a -> a -> a) -> (f :+: g) a -> a Source #

toList :: (f :+: g) a -> [a] Source #

null :: (f :+: g) a -> Bool Source #

length :: (f :+: g) a -> Int Source #

elem :: Eq a => a -> (f :+: g) a -> Bool Source #

maximum :: Ord a => (f :+: g) a -> a Source #

minimum :: Ord a => (f :+: g) a -> a Source #

sum :: Num a => (f :+: g) a -> a Source #

product :: Num a => (f :+: g) a -> a Source #

( Traversable f, Traversable g) => Traversable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) Source #

sequenceA :: Applicative f0 => (f :+: g) (f0 a) -> f0 ((f :+: g) a) Source #

mapM :: Monad m => (a -> m b) -> (f :+: g) a -> m ((f :+: g) b) Source #

sequence :: Monad m => (f :+: g) (m a) -> m ((f :+: g) a) Source #

(GFinite f, GFinite g) => GUniform (f :+: g)
Instance details

Defined in System.Random.Internal

Methods

guniformM :: forall g0 (m :: Type -> Type ) r a. StatefulGen g0 m => g0 -> ContT r m ((f :+: g) a)

(SumSize a, SumSize b) => SumSize (a :+: b)
Instance details

Defined in Data.Hashable.Generic.Instances

Methods

sumSize :: Tagged (a :+: b)

(GSumGet a, GSumGet b) => GSumGet (a :+: b)
Instance details

Defined in Data.Binary.Generic

Methods

getSum :: ( Ord word, Num word, Bits word) => word -> word -> Get ((a :+: b) a0)

(SumSize a, SumSize b) => SumSize (a :+: b)
Instance details

Defined in Data.Binary.Generic

Methods

sumSize :: Tagged (a :+: b) Word64

(GSumPut a, GSumPut b) => GSumPut (a :+: b)
Instance details

Defined in Data.Binary.Generic

Methods

putSum :: ( Num w, Bits w, Binary w) => w -> w -> (a :+: b) a0 -> Put

( Eq (f p), Eq (g p)) => Eq ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

(/=) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

( Ord (f p), Ord (g p)) => Ord ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :+: g) p -> (f :+: g) p -> Ordering Source #

(<) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

(<=) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

(>) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

(>=) :: (f :+: g) p -> (f :+: g) p -> Bool Source #

max :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p Source #

min :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p Source #

( Read (f p), Read (g p)) => Read ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Show (f p), Show (g p)) => Show ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Generic ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type Source #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x Source #

to :: Rep ((f :+: g) p) x -> (f :+: g) p Source #

type Rep1 (f :+: g :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ((f :+: g) p)
Instance details

Defined in GHC.Generics

data ((f :: k -> Type ) :*: (g :: k -> Type )) (p :: k) infixr 6 Source #

Products: encode multiple arguments to constructors

Constructors

(f p) :*: (g p) infixr 6

Instances

Instances details
Generic1 (f :*: g :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :*: g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). (f :*: g) a -> Rep1 (f :*: g) a Source #

to1 :: forall (a :: k0). Rep1 (f :*: g) a -> (f :*: g) a Source #

(GNFData arity a, GNFData arity b) => GNFData arity (a :*: b)
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs arity a0 -> (a :*: b) a0 -> ()

( Monad f, Monad g) => Monad (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: (f :*: g) a -> (a -> (f :*: g) b) -> (f :*: g) b Source #

(>>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b Source #

return :: a -> (f :*: g) a Source #

( Functor f, Functor g) => Functor (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :*: g) a -> (f :*: g) b Source #

(<$) :: a -> (f :*: g) b -> (f :*: g) a Source #

( Applicative f, Applicative g) => Applicative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :*: g) a Source #

(<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b Source #

liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c Source #

(*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b Source #

(<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a Source #

( Foldable f, Foldable g) => Foldable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :*: g) m -> m Source #

foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m Source #

foldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m Source #

foldr :: (a -> b -> b) -> b -> (f :*: g) a -> b Source #

foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b Source #

foldl :: (b -> a -> b) -> b -> (f :*: g) a -> b Source #

foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b Source #

foldr1 :: (a -> a -> a) -> (f :*: g) a -> a Source #

foldl1 :: (a -> a -> a) -> (f :*: g) a -> a Source #

toList :: (f :*: g) a -> [a] Source #

null :: (f :*: g) a -> Bool Source #

length :: (f :*: g) a -> Int Source #

elem :: Eq a => a -> (f :*: g) a -> Bool Source #

maximum :: Ord a => (f :*: g) a -> a Source #

minimum :: Ord a => (f :*: g) a -> a Source #

sum :: Num a => (f :*: g) a -> a Source #

product :: Num a => (f :*: g) a -> a Source #

( Traversable f, Traversable g) => Traversable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) Source #

sequenceA :: Applicative f0 => (f :*: g) (f0 a) -> f0 ((f :*: g) a) Source #

mapM :: Monad m => (a -> m b) -> (f :*: g) a -> m ((f :*: g) b) Source #

sequence :: Monad m => (f :*: g) (m a) -> m ((f :*: g) a) Source #

( Alternative f, Alternative g) => Alternative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :*: g) a Source #

(<|>) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a Source #

some :: (f :*: g) a -> (f :*: g) [a] Source #

many :: (f :*: g) a -> (f :*: g) [a] Source #

( MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: (f :*: g) a Source #

mplus :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a Source #

(GUniform f, GUniform g) => GUniform (f :*: g)
Instance details

Defined in System.Random.Internal

Methods

guniformM :: forall g0 (m :: Type -> Type ) r a. StatefulGen g0 m => g0 -> ContT r m ((f :*: g) a)

( Eq (f p), Eq (g p)) => Eq ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

(/=) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

( Ord (f p), Ord (g p)) => Ord ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :*: g) p -> (f :*: g) p -> Ordering Source #

(<) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

(<=) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

(>) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

(>=) :: (f :*: g) p -> (f :*: g) p -> Bool Source #

max :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

min :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

( Read (f p), Read (g p)) => Read ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

( Show (f p), Show (g p)) => Show ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Generic ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type Source #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x Source #

to :: Rep ((f :*: g) p) x -> (f :*: g) p Source #

( Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p Source #

stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p Source #

( Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :*: g) p Source #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

mconcat :: [(f :*: g) p] -> (f :*: g) p Source #

type Rep1 (f :*: g :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ((f :*: g) p)
Instance details

Defined in GHC.Generics

newtype ((f :: k2 -> Type ) :.: (g :: k1 -> k2)) (p :: k1) infixr 7 Source #

Composition of functors

Constructors

Comp1

Fields

Instances

Instances details
Functor f => Generic1 (f :.: g :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (f :.: g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). (f :.: g) a -> Rep1 (f :.: g) a Source #

to1 :: forall (a :: k0). Rep1 (f :.: g) a -> (f :.: g) a Source #

( NFData1 f, GNFData One g) => GNFData One (f :.: g)
Instance details

Defined in Control.DeepSeq

Methods

grnf :: RnfArgs One a -> (f :.: g) a -> ()

( Functor f, Functor g) => Functor (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :.: g) a -> (f :.: g) b Source #

(<$) :: a -> (f :.: g) b -> (f :.: g) a Source #

( Applicative f, Applicative g) => Applicative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :.: g) a Source #

(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b Source #

liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c Source #

(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b Source #

(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a Source #

( Foldable f, Foldable g) => Foldable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :.: g) m -> m Source #

foldMap :: Monoid m => (a -> m) -> (f :.: g) a -> m Source #

foldMap' :: Monoid m => (a -> m) -> (f :.: g) a -> m Source #

foldr :: (a -> b -> b) -> b -> (f :.: g) a -> b Source #

foldr' :: (a -> b -> b) -> b -> (f :.: g) a -> b Source #

foldl :: (b -> a -> b) -> b -> (f :.: g) a -> b Source #

foldl' :: (b -> a -> b) -> b -> (f :.: g) a -> b Source #

foldr1 :: (a -> a -> a) -> (f :.: g) a -> a Source #

foldl1 :: (a -> a -> a) -> (f :.: g) a -> a Source #

toList :: (f :.: g) a -> [a] Source #

null :: (f :.: g) a -> Bool Source #

length :: (f :.: g) a -> Int Source #

elem :: Eq a => a -> (f :.: g) a -> Bool Source #

maximum :: Ord a => (f :.: g) a -> a Source #

minimum :: Ord a => (f :.: g) a -> a Source #

sum :: Num a => (f :.: g) a -> a Source #

product :: Num a => (f :.: g) a -> a Source #

( Traversable f, Traversable g) => Traversable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :.: g) a -> f0 ((f :.: g) b) Source #

sequenceA :: Applicative f0 => (f :.: g) (f0 a) -> f0 ((f :.: g) a) Source #

mapM :: Monad m => (a -> m b) -> (f :.: g) a -> m ((f :.: g) b) Source #

sequence :: Monad m => (f :.: g) (m a) -> m ((f :.: g) a) Source #

( Alternative f, Applicative g) => Alternative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :.: g) a Source #

(<|>) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a Source #

some :: (f :.: g) a -> (f :.: g) [a] Source #

many :: (f :.: g) a -> (f :.: g) [a] Source #

Eq (f (g p)) => Eq ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

(/=) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

Ord (f (g p)) => Ord ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :.: g) p -> (f :.: g) p -> Ordering Source #

(<) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

(<=) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

(>) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

(>=) :: (f :.: g) p -> (f :.: g) p -> Bool Source #

max :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

min :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

Read (f (g p)) => Read ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Show (f (g p)) => Show ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Generic ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type Source #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x Source #

to :: Rep ((f :.: g) p) x -> (f :.: g) p Source #

Semigroup (f (g p)) => Semigroup ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p Source #

stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p Source #

Monoid (f (g p)) => Monoid ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :.: g) p Source #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

mconcat :: [(f :.: g) p] -> (f :.: g) p Source #

type Rep1 (f :.: g :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ((f :.: g) p)
Instance details

Defined in GHC.Generics

type Rep ((f :.: g) p) = D1 (' MetaData ":.:" "GHC.Generics" "base" ' True ) ( C1 (' MetaCons "Comp1" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unComp1") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (f (g p)))))

type Rec0 = K1 R :: Type -> k -> Type Source #

Type synonym for encoding recursion (of kind Type )

type D1 = M1 D :: Meta -> (k -> Type ) -> k -> Type Source #

Type synonym for encoding meta-information for datatypes

type C1 = M1 C :: Meta -> (k -> Type ) -> k -> Type Source #

Type synonym for encoding meta-information for constructors

type S1 = M1 S :: Meta -> (k -> Type ) -> k -> Type Source #

Type synonym for encoding meta-information for record selectors

type family Rep a :: Type -> Type Source #

Generic representation type

Instances

Instances details
type Rep Bool
Instance details

Defined in GHC.Generics

type Rep Ordering
Instance details

Defined in GHC.Generics

type Rep Exp
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Exp = D1 (' MetaData "Exp" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) (((( C1 (' MetaCons "VarE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name )) :+: ( C1 (' MetaCons "ConE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name )) :+: C1 (' MetaCons "LitE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Lit )))) :+: (( C1 (' MetaCons "AppE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp )) :+: C1 (' MetaCons "AppTypeE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))) :+: ( C1 (' MetaCons "InfixE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Exp )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Exp )))) :+: C1 (' MetaCons "UInfixE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp )))))) :+: (( C1 (' MetaCons "ParensE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp )) :+: ( C1 (' MetaCons "LamE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Pat ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp )) :+: C1 (' MetaCons "LamCaseE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Match ])))) :+: (( C1 (' MetaCons "TupE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Maybe Exp ])) :+: C1 (' MetaCons "UnboxedTupE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Maybe Exp ]))) :+: ( C1 (' MetaCons "UnboxedSumE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 SumAlt ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 SumArity ))) :+: C1 (' MetaCons "CondE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ))))))) :+: ((( C1 (' MetaCons "MultiIfE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [( Guard , Exp )])) :+: ( C1 (' MetaCons "LetE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Dec ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp )) :+: C1 (' MetaCons "CaseE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Match ])))) :+: (( C1 (' MetaCons "DoE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Stmt ])) :+: C1 (' MetaCons "MDoE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Stmt ]))) :+: ( C1 (' MetaCons "CompE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Stmt ])) :+: C1 (' MetaCons "ArithSeqE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Range ))))) :+: ((( C1 (' MetaCons "ListE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Exp ])) :+: C1 (' MetaCons "SigE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))) :+: ( C1 (' MetaCons "RecConE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ FieldExp ])) :+: C1 (' MetaCons "RecUpdE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ FieldExp ])))) :+: (( C1 (' MetaCons "StaticE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp )) :+: C1 (' MetaCons "UnboundVarE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ))) :+: ( C1 (' MetaCons "LabelE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 String )) :+: C1 (' MetaCons "ImplicitParamVarE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 String )))))))
type Rep Match
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Clause
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Pat
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Pat = D1 (' MetaData "Pat" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) (((( C1 (' MetaCons "LitP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Lit )) :+: C1 (' MetaCons "VarP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ))) :+: ( C1 (' MetaCons "TupP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Pat ])) :+: C1 (' MetaCons "UnboxedTupP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Pat ])))) :+: (( C1 (' MetaCons "UnboxedSumP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 SumAlt ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 SumArity ))) :+: C1 (' MetaCons "ConP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Pat ]))) :+: ( C1 (' MetaCons "InfixP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat ))) :+: C1 (' MetaCons "UInfixP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat )))))) :+: ((( C1 (' MetaCons "ParensP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat )) :+: C1 (' MetaCons "TildeP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat ))) :+: ( C1 (' MetaCons "BangP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat )) :+: C1 (' MetaCons "AsP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat )))) :+: (( C1 (' MetaCons "WildP" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "RecP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ FieldPat ]))) :+: ( C1 (' MetaCons "ListP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Pat ])) :+: ( C1 (' MetaCons "SigP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type )) :+: C1 (' MetaCons "ViewP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat )))))))
type Rep Type
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Type = D1 (' MetaData "Type" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) (((( C1 (' MetaCons "ForallT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ TyVarBndr ]) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Cxt ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))) :+: ( C1 (' MetaCons "ForallVisT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ TyVarBndr ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type )) :+: C1 (' MetaCons "AppT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type )))) :+: ( C1 (' MetaCons "AppKindT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Kind )) :+: ( C1 (' MetaCons "SigT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Kind )) :+: C1 (' MetaCons "VarT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ))))) :+: (( C1 (' MetaCons "ConT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name )) :+: ( C1 (' MetaCons "PromotedT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name )) :+: C1 (' MetaCons "InfixT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))))) :+: ( C1 (' MetaCons "UInfixT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))) :+: ( C1 (' MetaCons "ParensT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type )) :+: C1 (' MetaCons "TupleT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Int )))))) :+: ((( C1 (' MetaCons "UnboxedTupleT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Int )) :+: ( C1 (' MetaCons "UnboxedSumT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 SumArity )) :+: C1 (' MetaCons "ArrowT" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: ( C1 (' MetaCons "EqualityT" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "ListT" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "PromotedTupleT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Int ))))) :+: (( C1 (' MetaCons "PromotedNilT" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "PromotedConsT" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "StarT" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "ConstraintT" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "LitT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 TyLit ))) :+: ( C1 (' MetaCons "WildCardT" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "ImplicitParamT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 String ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type )))))))
type Rep Dec
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Dec = D1 (' MetaData "Dec" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) (((( C1 (' MetaCons "FunD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Clause ])) :+: ( C1 (' MetaCons "ValD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Body ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Dec ]))) :+: C1 (' MetaCons "DataD" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Cxt ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ TyVarBndr ]))) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Kind )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Con ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ DerivClause ])))))) :+: ( C1 (' MetaCons "NewtypeD" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Cxt ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ TyVarBndr ]))) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Kind )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Con ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ DerivClause ])))) :+: ( C1 (' MetaCons "TySynD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ TyVarBndr ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))) :+: C1 (' MetaCons "ClassD" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Cxt ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ TyVarBndr ]) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ FunDep ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Dec ]))))))) :+: (( C1 (' MetaCons "InstanceD" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Overlap )) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Cxt )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Dec ]))) :+: ( C1 (' MetaCons "SigD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type )) :+: C1 (' MetaCons "KiSigD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Kind )))) :+: ( C1 (' MetaCons "ForeignD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Foreign )) :+: ( C1 (' MetaCons "InfixD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Fixity ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name )) :+: C1 (' MetaCons "PragmaD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pragma )))))) :+: ((( C1 (' MetaCons "DataFamilyD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ TyVarBndr ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Kind )))) :+: ( C1 (' MetaCons "DataInstD" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Cxt ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe [ TyVarBndr ])) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Kind )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Con ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ DerivClause ])))) :+: C1 (' MetaCons "NewtypeInstD" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Cxt ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe [ TyVarBndr ])) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Kind )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Con ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ DerivClause ])))))) :+: ( C1 (' MetaCons "TySynInstD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 TySynEqn )) :+: ( C1 (' MetaCons "OpenTypeFamilyD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 TypeFamilyHead )) :+: C1 (' MetaCons "ClosedTypeFamilyD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 TypeFamilyHead ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ TySynEqn ]))))) :+: (( C1 (' MetaCons "RoleAnnotD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Role ])) :+: ( C1 (' MetaCons "StandaloneDerivD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe DerivStrategy )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Cxt ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))) :+: C1 (' MetaCons "DefaultSigD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type )))) :+: ( C1 (' MetaCons "PatSynD" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PatSynArgs )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PatSynDir ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Pat ))) :+: ( C1 (' MetaCons "PatSynSigD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PatSynType )) :+: C1 (' MetaCons "ImplicitParamBindD" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 String ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp )))))))
type Rep Name
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep FunDep
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep InjectivityAnn
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Overlap
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Overlap = D1 (' MetaData "Overlap" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) (( C1 (' MetaCons "Overlappable" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "Overlapping" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "Overlaps" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "Incoherent" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep ()
Instance details

Defined in GHC.Generics

type Rep () = D1 (' MetaData "()" "GHC.Tuple" "ghc-prim" ' False ) ( C1 (' MetaCons "()" ' PrefixI ' False ) ( U1 :: Type -> Type ))
type Rep Value
Instance details

Defined in Data.Aeson.Types.Internal

type Rep Void
Instance details

Defined in Data.Void

type Rep Void = D1 (' MetaData "Void" "Data.Void" "base" ' False ) ( V1 :: Type -> Type )
type Rep Version
Instance details

Defined in Data.Version

type Rep ExitCode
Instance details

Defined in GHC.IO.Exception

type Rep All
Instance details

Defined in Data.Semigroup.Internal

type Rep Any
Instance details

Defined in Data.Semigroup.Internal

type Rep Fixity
Instance details

Defined in GHC.Generics

type Rep Associativity
Instance details

Defined in GHC.Generics

type Rep Associativity = D1 (' MetaData "Associativity" "GHC.Generics" "base" ' False ) ( C1 (' MetaCons "LeftAssociative" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "RightAssociative" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "NotAssociative" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep SourceUnpackedness
Instance details

Defined in GHC.Generics

type Rep SourceUnpackedness = D1 (' MetaData "SourceUnpackedness" "GHC.Generics" "base" ' False ) ( C1 (' MetaCons "NoSourceUnpackedness" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "SourceNoUnpack" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "SourceUnpack" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep SourceStrictness
Instance details

Defined in GHC.Generics

type Rep SourceStrictness = D1 (' MetaData "SourceStrictness" "GHC.Generics" "base" ' False ) ( C1 (' MetaCons "NoSourceStrictness" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "SourceLazy" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "SourceStrict" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep DecidedStrictness
Instance details

Defined in GHC.Generics

type Rep DecidedStrictness = D1 (' MetaData "DecidedStrictness" "GHC.Generics" "base" ' False ) ( C1 (' MetaCons "DecidedLazy" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "DecidedStrict" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "DecidedUnpack" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep Extension
Instance details

Defined in GHC.LanguageExtensions.Type

type Rep Extension = D1 (' MetaData "Extension" "GHC.LanguageExtensions.Type" "ghc-boot-th-8.10.7" ' False ) (((((( C1 (' MetaCons "Cpp" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "OverlappingInstances" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "UndecidableInstances" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "IncoherentInstances" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "UndecidableSuperClasses" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "MonomorphismRestriction" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "MonoPatBinds" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: (( C1 (' MetaCons "MonoLocalBinds" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "RelaxedPolyRec" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "ExtendedDefaultRules" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "ForeignFunctionInterface" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "UnliftedFFITypes" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "InterruptibleFFI" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "CApiFFI" ' PrefixI ' False ) ( U1 :: Type -> Type ))))) :+: ((( C1 (' MetaCons "GHCForeignImportPrim" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "JavaScriptFFI" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "ParallelArrays" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "Arrows" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "TemplateHaskell" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "TemplateHaskellQuotes" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "QuasiQuotes" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "ImplicitParams" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "ImplicitPrelude" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "ScopedTypeVariables" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "AllowAmbiguousTypes" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "UnboxedTuples" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "UnboxedSums" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "UnliftedNewtypes" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "BangPatterns" ' PrefixI ' False ) ( U1 :: Type -> Type )))))) :+: (((( C1 (' MetaCons "TypeFamilies" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "TypeFamilyDependencies" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "TypeInType" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "OverloadedStrings" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "OverloadedLists" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "NumDecimals" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "DisambiguateRecordFields" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "RecordWildCards" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "RecordPuns" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "ViewPatterns" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "GADTs" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "GADTSyntax" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "NPlusKPatterns" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "DoAndIfThenElse" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "BlockArguments" ' PrefixI ' False ) ( U1 :: Type -> Type ))))) :+: ((( C1 (' MetaCons "RebindableSyntax" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "ConstraintKinds" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "PolyKinds" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "DataKinds" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "InstanceSigs" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "ApplicativeDo" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "StandaloneDeriving" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "DeriveDataTypeable" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "AutoDeriveTypeable" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "DeriveFunctor" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "DeriveTraversable" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "DeriveFoldable" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "DeriveGeneric" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "DefaultSignatures" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "DeriveAnyClass" ' PrefixI ' False ) ( U1 :: Type -> Type ))))))) :+: ((((( C1 (' MetaCons "DeriveLift" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "DerivingStrategies" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "DerivingVia" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "TypeSynonymInstances" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "FlexibleContexts" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "FlexibleInstances" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "ConstrainedClassMethods" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "MultiParamTypeClasses" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "NullaryTypeClasses" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "FunctionalDependencies" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "UnicodeSyntax" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "ExistentialQuantification" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "MagicHash" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "EmptyDataDecls" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "KindSignatures" ' PrefixI ' False ) ( U1 :: Type -> Type ))))) :+: ((( C1 (' MetaCons "RoleAnnotations" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "ParallelListComp" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "TransformListComp" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "MonadComprehensions" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "GeneralizedNewtypeDeriving" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "RecursiveDo" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "PostfixOperators" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "TupleSections" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "PatternGuards" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "LiberalTypeSynonyms" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "RankNTypes" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "ImpredicativeTypes" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "TypeOperators" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "ExplicitNamespaces" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "PackageImports" ' PrefixI ' False ) ( U1 :: Type -> Type )))))) :+: (((( C1 (' MetaCons "ExplicitForAll" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "AlternativeLayoutRule" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "AlternativeLayoutRuleTransitional" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "DatatypeContexts" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "NondecreasingIndentation" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "RelaxedLayout" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "TraditionalRecordSyntax" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "LambdaCase" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "MultiWayIf" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "BinaryLiterals" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "NegativeLiterals" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "HexFloatLiterals" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "DuplicateRecordFields" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "OverloadedLabels" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "EmptyCase" ' PrefixI ' False ) ( U1 :: Type -> Type ))))) :+: ((( C1 (' MetaCons "PatternSynonyms" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "PartialTypeSignatures" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "NamedWildCards" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "StaticPointers" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "TypeApplications" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "Strict" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "StrictData" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "MonadFailDesugaring" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "EmptyDataDeriving" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "NumericUnderscores" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "QuantifiedConstraints" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "StarIsType" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "ImportQualifiedPost" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "CUSKs" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "StandaloneKindSignatures" ' PrefixI ' False ) ( U1 :: Type -> Type ))))))))
type Rep ForeignSrcLang
Instance details

Defined in GHC.ForeignSrcLang.Type

type Rep PrimType
Instance details

Defined in GHC.Exts.Heap.Closures

type Rep StgInfoTable
Instance details

Defined in GHC.Exts.Heap.InfoTable.Types

type Rep ClosureType
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

type Rep ClosureType = D1 (' MetaData "ClosureType" "GHC.Exts.Heap.ClosureTypes" "ghc-heap-8.10.7-IUP7BK823zx9GcxXynNXv1" ' False ) (((((( C1 (' MetaCons "INVALID_OBJECT" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "CONSTR" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "CONSTR_1_0" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "CONSTR_0_1" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "CONSTR_2_0" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "CONSTR_1_1" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "CONSTR_0_2" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "CONSTR_NOCAF" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "FUN" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "FUN_1_0" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "FUN_0_1" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "FUN_2_0" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "FUN_1_1" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "FUN_0_2" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "FUN_STATIC" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "THUNK" ' PrefixI ' False ) ( U1 :: Type -> Type ))))) :+: (((( C1 (' MetaCons "THUNK_1_0" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "THUNK_0_1" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "THUNK_2_0" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "THUNK_1_1" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "THUNK_0_2" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "THUNK_STATIC" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "THUNK_SELECTOR" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "BCO" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "AP" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "PAP" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "AP_STACK" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "IND" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "IND_STATIC" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "RET_BCO" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "RET_SMALL" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "RET_BIG" ' PrefixI ' False ) ( U1 :: Type -> Type )))))) :+: ((((( C1 (' MetaCons "RET_FUN" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "UPDATE_FRAME" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "CATCH_FRAME" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "UNDERFLOW_FRAME" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "STOP_FRAME" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "BLOCKING_QUEUE" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "BLACKHOLE" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "MVAR_CLEAN" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "MVAR_DIRTY" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "TVAR" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "ARR_WORDS" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "MUT_ARR_PTRS_CLEAN" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "MUT_ARR_PTRS_DIRTY" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "MUT_ARR_PTRS_FROZEN_DIRTY" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "MUT_ARR_PTRS_FROZEN_CLEAN" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "MUT_VAR_CLEAN" ' PrefixI ' False ) ( U1 :: Type -> Type ))))) :+: (((( C1 (' MetaCons "MUT_VAR_DIRTY" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "WEAK" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "PRIM" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "MUT_PRIM" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "TSO" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "STACK" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "TREC_CHUNK" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "ATOMICALLY_FRAME" ' PrefixI ' False ) ( U1 :: Type -> Type )))) :+: ((( C1 (' MetaCons "CATCH_RETRY_FRAME" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "CATCH_STM_FRAME" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "WHITEHOLE" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "SMALL_MUT_ARR_PTRS_CLEAN" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "SMALL_MUT_ARR_PTRS_DIRTY" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "SMALL_MUT_ARR_PTRS_FROZEN_DIRTY" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "SMALL_MUT_ARR_PTRS_FROZEN_CLEAN" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "COMPACT_NFDATA" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "N_CLOSURE_TYPES" ' PrefixI ' False ) ( U1 :: Type -> Type ))))))))
type Rep Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

type Rep TextDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

type Rep Style
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

type Rep Mode
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

type Rep Mode = D1 (' MetaData "Mode" "Text.PrettyPrint.Annotated.HughesPJ" "pretty-1.1.3.6" ' False ) (( C1 (' MetaCons "PageMode" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "ZigZagMode" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "LeftMode" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "OneLineMode" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep ModName
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep PkgName
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Module
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep OccName
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep NameFlavour
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep NameSpace
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep NameSpace = D1 (' MetaData "NameSpace" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ( C1 (' MetaCons "VarName" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "DataName" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "TcClsName" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep Loc
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Info
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Info = D1 (' MetaData "Info" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ((( C1 (' MetaCons "ClassI" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Dec ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ InstanceDec ])) :+: C1 (' MetaCons "ClassOpI" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ParentName )))) :+: ( C1 (' MetaCons "TyConI" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Dec )) :+: C1 (' MetaCons "FamilyI" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Dec ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ InstanceDec ])))) :+: (( C1 (' MetaCons "PrimTyConI" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Arity ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Unlifted ))) :+: C1 (' MetaCons "DataConI" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ParentName )))) :+: ( C1 (' MetaCons "PatSynI" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PatSynType )) :+: ( C1 (' MetaCons "VarI" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Dec )))) :+: C1 (' MetaCons "TyVarI" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))))))
type Rep ModuleInfo
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Fixity
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep FixityDirection
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep FixityDirection = D1 (' MetaData "FixityDirection" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ( C1 (' MetaCons "InfixL" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "InfixR" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "InfixN" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep Lit
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Lit = D1 (' MetaData "Lit" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ((( C1 (' MetaCons "CharL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Char )) :+: C1 (' MetaCons "StringL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 String ))) :+: ( C1 (' MetaCons "IntegerL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Integer )) :+: ( C1 (' MetaCons "RationalL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Rational )) :+: C1 (' MetaCons "IntPrimL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Integer ))))) :+: (( C1 (' MetaCons "WordPrimL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Integer )) :+: ( C1 (' MetaCons "FloatPrimL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Rational )) :+: C1 (' MetaCons "DoublePrimL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Rational )))) :+: ( C1 (' MetaCons "StringPrimL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Word8 ])) :+: ( C1 (' MetaCons "BytesPrimL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Bytes )) :+: C1 (' MetaCons "CharPrimL" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Char ))))))
type Rep Bytes
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Body
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Guard
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Stmt
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Range
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep DerivClause
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep DerivStrategy
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep TypeFamilyHead
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep TySynEqn
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Foreign
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Callconv
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Safety
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Safety = D1 (' MetaData "Safety" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ( C1 (' MetaCons "Unsafe" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "Safe" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "Interruptible" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep Pragma
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Pragma = D1 (' MetaData "Pragma" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) (( C1 (' MetaCons "InlineP" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Inline )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 RuleMatch ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Phases ))) :+: ( C1 (' MetaCons "SpecialiseP" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Inline )) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Phases ))) :+: C1 (' MetaCons "SpecialiseInstP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type )))) :+: (( C1 (' MetaCons "RuleP" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 String ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe [ TyVarBndr ])) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ RuleBndr ]))) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Phases )))) :+: C1 (' MetaCons "AnnP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 AnnTarget ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Exp ))) :+: ( C1 (' MetaCons "LineP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Int ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 String )) :+: C1 (' MetaCons "CompleteP" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Name ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Maybe Name ))))))
type Rep Inline
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Inline = D1 (' MetaData "Inline" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ( C1 (' MetaCons "NoInline" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "Inline" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "Inlinable" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep RuleMatch
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep RuleMatch = D1 (' MetaData "RuleMatch" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ( C1 (' MetaCons "ConLike" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "FunLike" ' PrefixI ' False ) ( U1 :: Type -> Type ))
type Rep Phases
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep RuleBndr
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep AnnTarget
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep SourceUnpackedness
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep SourceUnpackedness = D1 (' MetaData "SourceUnpackedness" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ( C1 (' MetaCons "NoSourceUnpackedness" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "SourceNoUnpack" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "SourceUnpack" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep SourceStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep SourceStrictness = D1 (' MetaData "SourceStrictness" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ( C1 (' MetaCons "NoSourceStrictness" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "SourceLazy" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "SourceStrict" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep DecidedStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep DecidedStrictness = D1 (' MetaData "DecidedStrictness" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) ( C1 (' MetaCons "DecidedLazy" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "DecidedStrict" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "DecidedUnpack" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep Con
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Con = D1 (' MetaData "Con" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) (( C1 (' MetaCons "NormalC" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ BangType ])) :+: ( C1 (' MetaCons "RecC" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ VarBangType ])) :+: C1 (' MetaCons "InfixC" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BangType ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Name ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BangType ))))) :+: ( C1 (' MetaCons "ForallC" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ TyVarBndr ]) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Cxt ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Con ))) :+: ( C1 (' MetaCons "GadtC" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Name ]) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ BangType ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))) :+: C1 (' MetaCons "RecGadtC" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Name ]) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ VarBangType ]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Type ))))))
type Rep Bang
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep PatSynDir
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep PatSynArgs
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep TyVarBndr
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep FamilyResultSig
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep TyLit
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Role
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Role = D1 (' MetaData "Role" "Language.Haskell.TH.Syntax" "template-haskell" ' False ) (( C1 (' MetaCons "NominalR" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "RepresentationalR" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "PhantomR" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "InferR" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type Rep AnnLookup
Instance details

Defined in Language.Haskell.TH.Syntax

type Rep [a]
Instance details

Defined in GHC.Generics

type Rep ( Maybe a)
Instance details

Defined in GHC.Generics

type Rep ( Par1 p)
Instance details

Defined in GHC.Generics

type Rep ( Solo a)
Instance details

Defined in Data.Tuple.Solo

type Rep ( Solo a) = D1 (' MetaData "Solo" "Data.Tuple.Solo" "OneTuple-0.3.1-2dHxJgLo5x9Lj2QijnVAuZ" ' False ) ( C1 (' MetaCons "Solo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getSolo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
type Rep ( Complex a)
Instance details

Defined in Data.Complex

type Rep ( Min a)
Instance details

Defined in Data.Semigroup

type Rep ( Max a)
Instance details

Defined in Data.Semigroup

type Rep ( First a)
Instance details

Defined in Data.Semigroup

type Rep ( Last a)
Instance details

Defined in Data.Semigroup

type Rep ( WrappedMonoid m)
Instance details

Defined in Data.Semigroup

type Rep ( WrappedMonoid m) = D1 (' MetaData "WrappedMonoid" "Data.Semigroup" "base" ' True ) ( C1 (' MetaCons "WrapMonoid" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unwrapMonoid") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 m)))
type Rep ( Option a)
Instance details

Defined in Data.Semigroup

type Rep ( ZipList a)
Instance details

Defined in Control.Applicative

type Rep ( ZipList a) = D1 (' MetaData "ZipList" "Control.Applicative" "base" ' True ) ( C1 (' MetaCons "ZipList" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getZipList") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [a])))
type Rep ( Identity a)
Instance details

Defined in Data.Functor.Identity

type Rep ( Identity a) = D1 (' MetaData "Identity" "Data.Functor.Identity" "base" ' True ) ( C1 (' MetaCons "Identity" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "runIdentity") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
type Rep ( First a)
Instance details

Defined in Data.Monoid

type Rep ( Last a)
Instance details

Defined in Data.Monoid

type Rep ( Dual a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Dual a) = D1 (' MetaData "Dual" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Dual" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getDual") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
type Rep ( Endo a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Endo a) = D1 (' MetaData "Endo" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Endo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "appEndo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (a -> a))))
type Rep ( Sum a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Sum a) = D1 (' MetaData "Sum" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Sum" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getSum") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
type Rep ( Product a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Product a) = D1 (' MetaData "Product" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Product" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getProduct") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
type Rep ( Down a)
Instance details

Defined in GHC.Generics

type Rep ( NonEmpty a)
Instance details

Defined in GHC.Generics

type Rep ( Tree a)
Instance details

Defined in Data.Tree

type Rep ( FingerTree a)
Instance details

Defined in Data.Sequence.Internal

type Rep ( Digit a)
Instance details

Defined in Data.Sequence.Internal

type Rep ( Node a)
Instance details

Defined in Data.Sequence.Internal

type Rep ( Elem a)
Instance details

Defined in Data.Sequence.Internal

type Rep ( Elem a) = D1 (' MetaData "Elem" "Data.Sequence.Internal" "containers-0.6.5.1-EiES0HFUZ8PBGNrpVjoYRF" ' True ) ( C1 (' MetaCons "Elem" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getElem") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
type Rep ( ViewL a)
Instance details

Defined in Data.Sequence.Internal

type Rep ( ViewR a)
Instance details

Defined in Data.Sequence.Internal

type Rep ( Fix f)
Instance details

Defined in Data.Fix

type Rep ( Fix f) = D1 (' MetaData "Fix" "Data.Fix" "data-fix-0.3.2-LpD4EKXxVVUJR8w9NGWPdd" ' True ) ( C1 (' MetaCons "Fix" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unFix") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (f ( Fix f)))))
type Rep ( GenClosure b)
Instance details

Defined in GHC.Exts.Heap.Closures

type Rep ( GenClosure b) = D1 (' MetaData "GenClosure" "GHC.Exts.Heap.Closures" "ghc-heap-8.10.7-IUP7BK823zx9GcxXynNXv1" ' False ) (((( C1 (' MetaCons "ConstrClosure" ' PrefixI ' True ) (( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: ( S1 (' MetaSel (' Just "ptrArgs") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [b]) :*: S1 (' MetaSel (' Just "dataArgs") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [ Word ]))) :*: ( S1 (' MetaSel (' Just "pkg") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 String ) :*: ( S1 (' MetaSel (' Just "modl") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 String ) :*: S1 (' MetaSel (' Just "name") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 String )))) :+: ( C1 (' MetaCons "FunClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: ( S1 (' MetaSel (' Just "ptrArgs") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [b]) :*: S1 (' MetaSel (' Just "dataArgs") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [ Word ]))) :+: C1 (' MetaCons "ThunkClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: ( S1 (' MetaSel (' Just "ptrArgs") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [b]) :*: S1 (' MetaSel (' Just "dataArgs") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [ Word ]))))) :+: ( C1 (' MetaCons "SelectorClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: S1 (' MetaSel (' Just "selectee") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b)) :+: ( C1 (' MetaCons "PAPClosure" ' PrefixI ' True ) (( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: S1 (' MetaSel (' Just "arity") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 HalfWord )) :*: ( S1 (' MetaSel (' Just "n_args") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 HalfWord ) :*: ( S1 (' MetaSel (' Just "fun") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: S1 (' MetaSel (' Just "payload") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [b])))) :+: C1 (' MetaCons "APClosure" ' PrefixI ' True ) (( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: S1 (' MetaSel (' Just "arity") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 HalfWord )) :*: ( S1 (' MetaSel (' Just "n_args") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 HalfWord ) :*: ( S1 (' MetaSel (' Just "fun") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: S1 (' MetaSel (' Just "payload") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [b]))))))) :+: (( C1 (' MetaCons "APStackClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: ( S1 (' MetaSel (' Just "fun") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: S1 (' MetaSel (' Just "payload") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [b]))) :+: ( C1 (' MetaCons "IndClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: S1 (' MetaSel (' Just "indirectee") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b)) :+: C1 (' MetaCons "BCOClosure" ' PrefixI ' True ) (( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: ( S1 (' MetaSel (' Just "instrs") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: S1 (' MetaSel (' Just "literals") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b))) :*: (( S1 (' MetaSel (' Just "bcoptrs") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: S1 (' MetaSel (' Just "arity") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 HalfWord )) :*: ( S1 (' MetaSel (' Just "size") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 HalfWord ) :*: S1 (' MetaSel (' Just "bitmap") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [ Word ])))))) :+: (( C1 (' MetaCons "BlackholeClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: S1 (' MetaSel (' Just "indirectee") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b)) :+: C1 (' MetaCons "ArrWordsClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: ( S1 (' MetaSel (' Just "bytes") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Word ) :*: S1 (' MetaSel (' Just "arrWords") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [ Word ])))) :+: ( C1 (' MetaCons "MutArrClosure" ' PrefixI ' True ) (( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: S1 (' MetaSel (' Just "mccPtrs") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Word )) :*: ( S1 (' MetaSel (' Just "mccSize") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Word ) :*: S1 (' MetaSel (' Just "mccPayload") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [b]))) :+: C1 (' MetaCons "SmallMutArrClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: ( S1 (' MetaSel (' Just "mccPtrs") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Word ) :*: S1 (' MetaSel (' Just "mccPayload") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [b]))))))) :+: ((( C1 (' MetaCons "MVarClosure" ' PrefixI ' True ) (( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: S1 (' MetaSel (' Just "queueHead") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b)) :*: ( S1 (' MetaSel (' Just "queueTail") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: S1 (' MetaSel (' Just "value") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b))) :+: ( C1 (' MetaCons "MutVarClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: S1 (' MetaSel (' Just "var") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b)) :+: C1 (' MetaCons "BlockingQueueClosure" ' PrefixI ' True ) (( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: S1 (' MetaSel (' Just "link") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b)) :*: ( S1 (' MetaSel (' Just "blackHole") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: ( S1 (' MetaSel (' Just "owner") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: S1 (' MetaSel (' Just "queue") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b)))))) :+: ( C1 (' MetaCons "WeakClosure" ' PrefixI ' True ) (( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: ( S1 (' MetaSel (' Just "cfinalizers") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: S1 (' MetaSel (' Just "key") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b))) :*: ( S1 (' MetaSel (' Just "value") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: ( S1 (' MetaSel (' Just "finalizer") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b) :*: S1 (' MetaSel (' Just "link") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 b)))) :+: ( C1 (' MetaCons "IntClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "ptipe") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PrimType ) :*: S1 (' MetaSel (' Just "intVal") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Int )) :+: C1 (' MetaCons "WordClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "ptipe") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PrimType ) :*: S1 (' MetaSel (' Just "wordVal") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Word ))))) :+: (( C1 (' MetaCons "Int64Closure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "ptipe") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PrimType ) :*: S1 (' MetaSel (' Just "int64Val") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Int64 )) :+: ( C1 (' MetaCons "Word64Closure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "ptipe") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PrimType ) :*: S1 (' MetaSel (' Just "word64Val") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Word64 )) :+: C1 (' MetaCons "AddrClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "ptipe") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PrimType ) :*: S1 (' MetaSel (' Just "addrVal") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Int )))) :+: (( C1 (' MetaCons "FloatClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "ptipe") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PrimType ) :*: S1 (' MetaSel (' Just "floatVal") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Float )) :+: C1 (' MetaCons "DoubleClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "ptipe") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PrimType ) :*: S1 (' MetaSel (' Just "doubleVal") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Double ))) :+: ( C1 (' MetaCons "OtherClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable ) :*: ( S1 (' MetaSel (' Just "hvalues") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [b]) :*: S1 (' MetaSel (' Just "rawWords") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 [ Word ]))) :+: C1 (' MetaCons "UnsupportedClosure" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "info") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 StgInfoTable )))))))
type Rep ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

type Rep ( Doc a) = D1 (' MetaData "Doc" "Text.PrettyPrint.Annotated.HughesPJ" "pretty-1.1.3.6" ' False ) ((( C1 (' MetaCons "Empty" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "NilAbove" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Doc a)))) :+: ( C1 (' MetaCons "TextBeside" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( AnnotDetails a)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Doc a))) :+: C1 (' MetaCons "Nest" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' SourceUnpack ' SourceStrict ' DecidedUnpack ) ( Rec0 Int ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Doc a))))) :+: (( C1 (' MetaCons "Union" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Doc a)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Doc a))) :+: C1 (' MetaCons "NoDoc" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "Beside" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Doc a)) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Bool ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Doc a)))) :+: C1 (' MetaCons "Above" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Doc a)) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Bool ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Doc a)))))))
type Rep ( Maybe a)
Instance details

Defined in Data.Strict.Maybe

type Rep ( Either a b)
Instance details

Defined in GHC.Generics

type Rep ( V1 p)
Instance details

Defined in GHC.Generics

type Rep ( V1 p) = D1 (' MetaData "V1" "GHC.Generics" "base" ' False ) ( V1 :: Type -> Type )
type Rep ( U1 p)
Instance details

Defined in GHC.Generics

type Rep ( U1 p) = D1 (' MetaData "U1" "GHC.Generics" "base" ' False ) ( C1 (' MetaCons "U1" ' PrefixI ' False ) ( U1 :: Type -> Type ))
type Rep (a, b)
Instance details

Defined in GHC.Generics

type Rep ( Arg a b)
Instance details

Defined in Data.Semigroup

type Rep ( WrappedMonad m a)
Instance details

Defined in Control.Applicative

type Rep ( WrappedMonad m a) = D1 (' MetaData "WrappedMonad" "Control.Applicative" "base" ' True ) ( C1 (' MetaCons "WrapMonad" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unwrapMonad") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (m a))))
type Rep ( Proxy t)
Instance details

Defined in GHC.Generics

type Rep ( Proxy t) = D1 (' MetaData "Proxy" "Data.Proxy" "base" ' False ) ( C1 (' MetaCons "Proxy" ' PrefixI ' False ) ( U1 :: Type -> Type ))
type Rep ( These a b)
Instance details

Defined in Data.These

type Rep ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

type Rep ( These a b)
Instance details

Defined in Data.Strict.These

type Rep ( Either a b)
Instance details

Defined in Data.Strict.Either

type Rep ( Rec1 f p)
Instance details

Defined in GHC.Generics

type Rep ( URec Word p)
Instance details

Defined in GHC.Generics

type Rep ( URec Int p)
Instance details

Defined in GHC.Generics

type Rep ( URec Float p)
Instance details

Defined in GHC.Generics

type Rep ( URec Double p)
Instance details

Defined in GHC.Generics

type Rep ( URec Char p)
Instance details

Defined in GHC.Generics

type Rep ( URec ( Ptr ()) p)
Instance details

Defined in GHC.Generics

type Rep (a, b, c)
Instance details

Defined in GHC.Generics

type Rep ( WrappedArrow a b c)
Instance details

Defined in Control.Applicative

type Rep ( WrappedArrow a b c) = D1 (' MetaData "WrappedArrow" "Control.Applicative" "base" ' True ) ( C1 (' MetaCons "WrapArrow" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unwrapArrow") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (a b c))))
type Rep ( Kleisli m a b)
Instance details

Defined in Control.Arrow

type Rep ( Kleisli m a b) = D1 (' MetaData "Kleisli" "Control.Arrow" "base" ' True ) ( C1 (' MetaCons "Kleisli" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "runKleisli") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (a -> m b))))
type Rep ( Const a b)
Instance details

Defined in Data.Functor.Const

type Rep ( Const a b) = D1 (' MetaData "Const" "Data.Functor.Const" "base" ' True ) ( C1 (' MetaCons "Const" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getConst") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
type Rep ( Ap f a)
Instance details

Defined in Data.Monoid

type Rep ( Alt f a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Alt f a) = D1 (' MetaData "Alt" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Alt" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getAlt") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (f a))))
type Rep ( Tagged s b)
Instance details

Defined in Data.Tagged

type Rep ( Tagged s b) = D1 (' MetaData "Tagged" "Data.Tagged" "tagged-0.8.7-Hh8SrsJ8Ofo2TZerdJ0cCc" ' True ) ( C1 (' MetaCons "Tagged" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unTagged") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 b)))
type Rep ( These1 f g a)
Instance details

Defined in Data.Functor.These

type Rep ( K1 i c p)
Instance details

Defined in GHC.Generics

type Rep ((f :+: g) p)
Instance details

Defined in GHC.Generics

type Rep ((f :*: g) p)
Instance details

Defined in GHC.Generics

type Rep (a, b, c, d)
Instance details

Defined in GHC.Generics

type Rep ( Product f g a)
Instance details

Defined in Data.Functor.Product

type Rep ( Sum f g a)
Instance details

Defined in Data.Functor.Sum

type Rep ( M1 i c f p)
Instance details

Defined in GHC.Generics

type Rep ((f :.: g) p)
Instance details

Defined in GHC.Generics

type Rep ((f :.: g) p) = D1 (' MetaData ":.:" "GHC.Generics" "base" ' True ) ( C1 (' MetaCons "Comp1" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unComp1") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (f (g p)))))
type Rep (a, b, c, d, e)
Instance details

Defined in GHC.Generics

type Rep ( Compose f g a)
Instance details

Defined in Data.Functor.Compose

type Rep ( Compose f g a) = D1 (' MetaData "Compose" "Data.Functor.Compose" "base" ' True ) ( C1 (' MetaCons "Compose" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getCompose") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (f (g a)))))
type Rep ( Flip p a b)
Instance details

Defined in Data.Bifunctor.Flip

type Rep ( Flip p a b) = D1 (' MetaData "Flip" "Data.Bifunctor.Flip" "bifunctors-5.5.14-4o2vxpA6iYN8K0rfLgtyzm" ' True ) ( C1 (' MetaCons "Flip" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "runFlip") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (p b a))))
type Rep (a, b, c, d, e, f)
Instance details

Defined in GHC.Generics

type Rep ( Sum p q a b)
Instance details

Defined in Data.Bifunctor.Sum

type Rep ( Product f g a b)
Instance details

Defined in Data.Bifunctor.Product

type Rep (a, b, c, d, e, f, g)
Instance details

Defined in GHC.Generics

type Rep ( Tannen f p a b)
Instance details

Defined in Data.Bifunctor.Tannen

type Rep ( Tannen f p a b) = D1 (' MetaData "Tannen" "Data.Bifunctor.Tannen" "bifunctors-5.5.14-4o2vxpA6iYN8K0rfLgtyzm" ' True ) ( C1 (' MetaCons "Tannen" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "runTannen") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (f (p a b)))))
type Rep ( Biff p f g a b)
Instance details

Defined in Data.Bifunctor.Biff

type Rep ( Biff p f g a b) = D1 (' MetaData "Biff" "Data.Bifunctor.Biff" "bifunctors-5.5.14-4o2vxpA6iYN8K0rfLgtyzm" ' True ) ( C1 (' MetaCons "Biff" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "runBiff") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (p (f a) (g b)))))

data family URec a (p :: k) Source #

Constants of unlifted kinds

Since: base-4.9.0.0

Instances

Instances details
Generic1 ( URec ( Ptr ()) :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec ( Ptr ())) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec ( Ptr ()) a -> Rep1 ( URec ( Ptr ())) a Source #

to1 :: forall (a :: k0). Rep1 ( URec ( Ptr ())) a -> URec ( Ptr ()) a Source #

Generic1 ( URec Char :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Char ) :: k -> Type Source #

Generic1 ( URec Double :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Double ) :: k -> Type Source #

Generic1 ( URec Float :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Float ) :: k -> Type Source #

Generic1 ( URec Int :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Int ) :: k -> Type Source #

Generic1 ( URec Word :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Word ) :: k -> Type Source #

Foldable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Functor ( URec Char :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Double :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Float :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Int :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Word :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec ( Ptr ()) :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec ( Ptr ()) a -> URec ( Ptr ()) b Source #

(<$) :: a -> URec ( Ptr ()) b -> URec ( Ptr ()) a Source #

Eq ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Float p)
Instance details

Defined in GHC.Generics

Eq ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Float p)
Instance details

Defined in GHC.Generics

Ord ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Float p)
Instance details

Defined in GHC.Generics

Show ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec ( Ptr ()) p) :: Type -> Type Source #

Generic ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Char p) :: Type -> Type Source #

Generic ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Float p)
Instance details

Defined in GHC.Generics

Generic ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Int p) :: Type -> Type Source #

Generic ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Word p) :: Type -> Type Source #

data URec Word (p :: k)

Used for marking occurrences of Word#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Int (p :: k)

Used for marking occurrences of Int#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Float (p :: k)

Used for marking occurrences of Float#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Double (p :: k)

Used for marking occurrences of Double#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Char (p :: k)

Used for marking occurrences of Char#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec ( Ptr ()) (p :: k)

Used for marking occurrences of Addr#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec ( Ptr ()) (p :: k) = UAddr { }
type Rep1 ( URec Word :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( URec Int :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( URec Float :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( URec Double :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( URec Char :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( URec ( Ptr ()) :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Word p)
Instance details

Defined in GHC.Generics

type Rep ( URec Int p)
Instance details

Defined in GHC.Generics

type Rep ( URec Float p)
Instance details

Defined in GHC.Generics

type Rep ( URec Double p)
Instance details

Defined in GHC.Generics

type Rep ( URec Char p)
Instance details

Defined in GHC.Generics

type Rep ( URec ( Ptr ()) p)
Instance details

Defined in GHC.Generics

data Nat Source #

(Kind) This is the kind of type-level natural numbers.

Instances

Instances details
KnownNat n => HasResolution (n :: Nat )

For example, Fixed 1000 will give you a Fixed with a resolution of 1000.

Instance details

Defined in Data.Fixed

data Symbol Source #

(Kind) This is the kind of type-level symbols. Declared here because class IP needs it

Instances

Instances details
SingKind Symbol

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep Symbol

Methods

fromSing :: forall (a :: Symbol ). Sing a -> DemoteRep Symbol

KnownSymbol a => SingI (a :: Symbol )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing a

type DemoteRep Symbol
Instance details

Defined in GHC.Generics

type DemoteRep Symbol = String
data Sing (s :: Symbol )
Instance details

Defined in GHC.Generics

data Sing (s :: Symbol ) where

type family CmpNat (a :: Nat ) (b :: Nat ) :: Ordering where ... Source #

Comparison of type-level naturals, as a function.

Since: base-4.7.0.0

class a ~R# b => Coercible (a :: k) (b :: k) Source #

Coercible is a two-parameter class that has instances for types a and b if the compiler can infer that they have the same representation. This class does not have regular instances; instead they are created on-the-fly during type-checking. Trying to manually declare an instance of Coercible is an error.

Nevertheless one can pretend that the following three kinds of instances exist. First, as a trivial base-case:

instance Coercible a a

Furthermore, for every type constructor there is an instance that allows to coerce under the type constructor. For example, let D be a prototypical type constructor ( data or newtype ) with three type arguments, which have roles nominal , representational resp. phantom . Then there is an instance of the form

instance Coercible b b' => Coercible (D a b c) (D a b' c')

Note that the nominal type arguments are equal, the representational type arguments can differ, but need to have a Coercible instance themself, and the phantom type arguments can be changed arbitrarily.

The third kind of instance exists for every newtype NT = MkNT T and comes in two variants, namely

instance Coercible a T => Coercible a NT
instance Coercible T b => Coercible NT b

This instance is only usable if the constructor MkNT is in scope.

If, as a library author of a type constructor like Set a , you want to prevent a user of your module to write coerce :: Set T -> Set NT , you need to set the role of Set 's type parameter to nominal , by writing

type role Set nominal

For more details about this feature, please refer to Safe Coercions by Joachim Breitner, Richard A. Eisenberg, Simon Peyton Jones and Stephanie Weirich.

Since: ghc-prim-4.7.0.0

data StaticPtr a Source #

A reference to a value of type a .

Instances

Instances details
IsStatic StaticPtr

Since: base-4.9.0.0

Instance details

Defined in GHC.StaticPtr

data CallStack Source #

CallStack s are a lightweight method of obtaining a partial call-stack at any point in the program.

A function can request its call-site with the HasCallStack constraint. For example, we can define

putStrLnWithCallStack :: HasCallStack => String -> IO ()

as a variant of putStrLn that will get its call-site and print it, along with the string given as argument. We can access the call-stack inside putStrLnWithCallStack with callStack .

putStrLnWithCallStack :: HasCallStack => String -> IO ()
putStrLnWithCallStack msg = do
  putStrLn msg
  putStrLn (prettyCallStack callStack)

Thus, if we call putStrLnWithCallStack we will get a formatted call-stack alongside our string.

>>> putStrLnWithCallStack "hello"
hello
CallStack (from HasCallStack):
  putStrLnWithCallStack, called at <interactive>:2:1 in interactive:Ghci1

GHC solves HasCallStack constraints in three steps:

  1. If there is a CallStack in scope -- i.e. the enclosing function has a HasCallStack constraint -- GHC will append the new call-site to the existing CallStack .
  2. If there is no CallStack in scope -- e.g. in the GHCi session above -- and the enclosing definition does not have an explicit type signature, GHC will infer a HasCallStack constraint for the enclosing definition (subject to the monomorphism restriction).
  3. If there is no CallStack in scope and the enclosing definition has an explicit type signature, GHC will solve the HasCallStack constraint for the singleton CallStack containing just the current call-site.

CallStack s do not interact with the RTS and do not require compilation with -prof . On the other hand, as they are built up explicitly via the HasCallStack constraints, they will generally not contain as much information as the simulated call-stacks maintained by the RTS.

A CallStack is a [(String, SrcLoc)] . The String is the name of function that was called, the SrcLoc is the call-site. The list is ordered with the most recently called function at the head.

NOTE: The intrepid user may notice that HasCallStack is just an alias for an implicit parameter ?callStack :: CallStack . This is an implementation detail and should not be considered part of the CallStack API, we may decide to change the implementation in the future.

Since: base-4.8.1.0

Instances

Instances details
IsList CallStack

Be aware that 'fromList . toList = id' only for unfrozen CallStack s, since toList removes frozenness information.

Since: base-4.9.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item CallStack Source #

Show CallStack

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

NFData CallStack

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

type Item CallStack
Instance details

Defined in GHC.Exts

data ByteString Source #

A space-efficient representation of a Word8 vector, supporting many efficient operations.

A ByteString contains 8-bit bytes, or by using the operations from Data.ByteString.Char8 it can be interpreted as containing 8-bit characters.

Instances

Instances details
IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Internal

Eq ByteString
Instance details

Defined in Data.ByteString.Internal

Data ByteString
Instance details

Defined in Data.ByteString.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> ByteString -> c ByteString Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ByteString Source #

toConstr :: ByteString -> Constr Source #

dataTypeOf :: ByteString -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ByteString ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ByteString ) Source #

gmapT :: ( forall b. Data b => b -> b) -> ByteString -> ByteString Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> ByteString -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> ByteString -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> ByteString -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> ByteString -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> ByteString -> m ByteString Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> ByteString -> m ByteString Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> ByteString -> m ByteString Source #

Ord ByteString
Instance details

Defined in Data.ByteString.Internal

Read ByteString
Instance details

Defined in Data.ByteString.Internal

Show ByteString
Instance details

Defined in Data.ByteString.Internal

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal

Semigroup ByteString
Instance details

Defined in Data.ByteString.Internal

Monoid ByteString
Instance details

Defined in Data.ByteString.Internal

Hashable ByteString
Instance details

Defined in Data.Hashable.Class

Chunk ByteString
Instance details

Defined in Data.Attoparsec.Internal.Types

NFData ByteString
Instance details

Defined in Data.ByteString.Internal

Print ByteString
Instance details

Defined in Protolude.Show

HeapWords ByteString Source #
Instance details

Defined in Cardano.Prelude.HeapWords

type State ByteString
Instance details

Defined in Data.Attoparsec.Internal.Types

type State ByteString = Buffer
type ChunkElem ByteString
Instance details

Defined in Data.Attoparsec.Internal.Types

type Item ByteString
Instance details

Defined in Data.ByteString.Internal

(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 Source #

An infix synonym for fmap .

The name of this operator is an allusion to $ . Note the similarities between their types:

 ($)  ::              (a -> b) ->   a ->   b
(<$>) :: Functor f => (a -> b) -> f a -> f b

Whereas $ is function application, <$> is function application lifted over a Functor .

Examples

Expand

Convert from a Maybe Int to a Maybe String using show :

>>> show <$> Nothing
Nothing
>>> show <$> Just 3
Just "3"

Convert from an Either Int Int to an Either Int String using show :

>>> show <$> Left 17
Left 17
>>> show <$> Right 17
Right "17"

Double each element of a list:

>>> (*2) <$> [1,2,3]
[2,4,6]

Apply even to the second element of a pair:

>>> even <$> (2,2)
(2,True)

const :: a -> b -> a Source #

const x is a unary function which evaluates to x for all inputs.

>>> const 42 "hello"
42
>>> map (const 42) [0..3]
[42,42,42,42]

toLower :: Char -> Char Source #

Convert a letter to the corresponding lower-case letter, if any. Any other character is returned unchanged.

data Text Source #

A space efficient, packed, unboxed Unicode text type.

Instances

Instances details
Hashable Text
Instance details

Defined in Data.Hashable.Class

Chunk Text
Instance details

Defined in Data.Attoparsec.Internal.Types

Associated Types

type ChunkElem Text Source #

Buildable Text
Instance details

Defined in Formatting.Buildable

Print Text
Instance details

Defined in Protolude.Show

HeapWords Text Source #
Instance details

Defined in Cardano.Prelude.HeapWords

ConvertText String Text
Instance details

Defined in Protolude.ConvertText

ConvertText Text String
Instance details

Defined in Protolude.ConvertText

ConvertText Text Text
Instance details

Defined in Protolude.ConvertText

ConvertText Text Text
Instance details

Defined in Protolude.ConvertText

ConvertText Text Text
Instance details

Defined in Protolude.ConvertText

type State Text
Instance details

Defined in Data.Attoparsec.Internal.Types

type State Text = Buffer
type ChunkElem Text
Instance details

Defined in Data.Attoparsec.Internal.Types

type Item Text
Instance details

Defined in Data.Text

data Map k a Source #

A Map from keys k to values a .

The Semigroup operation for Map is union , which prefers values from the left operand. If m1 maps a key k to a value a1 , and m2 maps the same key to a different value a2 , then their union m1 <> m2 maps k to a1 .

Instances

Instances details
Bifoldable Map

Since: containers-0.6.3.1

Instance details

Defined in Data.Map.Internal

Methods

bifold :: Monoid m => Map m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Map a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Map a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Map a b -> c Source #

Eq2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftEq2 :: (a -> b -> Bool ) -> (c -> d -> Bool ) -> Map a c -> Map b d -> Bool Source #

Ord2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftCompare2 :: (a -> b -> Ordering ) -> (c -> d -> Ordering ) -> Map a c -> Map b d -> Ordering Source #

Show2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftShowsPrec2 :: ( Int -> a -> ShowS ) -> ([a] -> ShowS ) -> ( Int -> b -> ShowS ) -> ([b] -> ShowS ) -> Int -> Map a b -> ShowS Source #

liftShowList2 :: ( Int -> a -> ShowS ) -> ([a] -> ShowS ) -> ( Int -> b -> ShowS ) -> ([b] -> ShowS ) -> [ Map a b] -> ShowS Source #

Hashable2 Map

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

( Monad m, ToObjectKey m k, ToJSON m a) => ToJSON m ( Map k a)
Instance details

Defined in Text.JSON.Canonical.Class

( ReportSchemaErrors m, Ord k, FromObjectKey m k, FromJSON m a) => FromJSON m ( Map k a)
Instance details

Defined in Text.JSON.Canonical.Class

Functor ( Map k)
Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> Map k a -> Map k b Source #

(<$) :: a -> Map k b -> Map k a Source #

Foldable ( Map k)

Folds in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m Source #

foldMap :: Monoid m => (a -> m) -> Map k a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m Source #

foldr :: (a -> b -> b) -> b -> Map k a -> b Source #

foldr' :: (a -> b -> b) -> b -> Map k a -> b Source #

foldl :: (b -> a -> b) -> b -> Map k a -> b Source #

foldl' :: (b -> a -> b) -> b -> Map k a -> b Source #

foldr1 :: (a -> a -> a) -> Map k a -> a Source #

foldl1 :: (a -> a -> a) -> Map k a -> a Source #

toList :: Map k a -> [a] Source #

null :: Map k a -> Bool Source #

length :: Map k a -> Int Source #

elem :: Eq a => a -> Map k a -> Bool Source #

maximum :: Ord a => Map k a -> a Source #

minimum :: Ord a => Map k a -> a Source #

sum :: Num a => Map k a -> a Source #

product :: Num a => Map k a -> a Source #

Traversable ( Map k)

Traverses in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Map k a -> f ( Map k b) Source #

sequenceA :: Applicative f => Map k (f a) -> f ( Map k a) Source #

mapM :: Monad m => (a -> m b) -> Map k a -> m ( Map k b) Source #

sequence :: Monad m => Map k (m a) -> m ( Map k a) Source #

Eq k => Eq1 ( Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftEq :: (a -> b -> Bool ) -> Map k a -> Map k b -> Bool Source #

Ord k => Ord1 ( Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

( Ord k, Read k) => Read1 ( Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Show k => Show1 ( Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Hashable k => Hashable1 ( Map k)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Ord k => IsList ( Map k v)

Since: containers-0.5.6.2

Instance details

Defined in Data.Map.Internal

Associated Types

type Item ( Map k v) Source #

( Eq k, Eq a) => Eq ( Map k a)
Instance details

Defined in Data.Map.Internal

( Data k, Data a, Ord k) => Data ( Map k a)
Instance details

Defined in Data.Map.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Map k a -> c ( Map k a) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Map k a) Source #

toConstr :: Map k a -> Constr Source #

dataTypeOf :: Map k a -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Map k a)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Map k a)) Source #

gmapT :: ( forall b. Data b => b -> b) -> Map k a -> Map k a Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Map k a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Map k a -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Map k a -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Map k a -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Map k a -> m ( Map k a) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Map k a -> m ( Map k a) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Map k a -> m ( Map k a) Source #

( Ord k, Ord v) => Ord ( Map k v)
Instance details

Defined in Data.Map.Internal

( Ord k, Read k, Read e) => Read ( Map k e)
Instance details

Defined in Data.Map.Internal

( Show k, Show a) => Show ( Map k a)
Instance details

Defined in Data.Map.Internal

Ord k => Semigroup ( Map k v)
Instance details

Defined in Data.Map.Internal

Ord k => Monoid ( Map k v)
Instance details

Defined in Data.Map.Internal

( Hashable k, Hashable v) => Hashable ( Map k v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

( NFData k, NFData a) => NFData ( Map k a)
Instance details

Defined in Data.Map.Internal

Methods

rnf :: Map k a -> () Source #

( HeapWords a, HeapWords b) => HeapWords ( Map a b) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

type Item ( Map k v)
Instance details

Defined in Data.Map.Internal

type Item ( Map k v) = (k, v)

data Handle Source #

Haskell defines operations to read and write characters from and to files, represented by values of type Handle . Each value of this type is a handle : a record used by the Haskell run-time system to manage I/O with file system objects. A handle has at least the following properties:

  • whether it manages input or output or both;
  • whether it is open , closed or semi-closed ;
  • whether the object is seekable;
  • whether buffering is disabled, or enabled on a line or block basis;
  • a buffer (whose length may be zero).

Most handles will also have a current I/O position indicating where the next input or output operation will occur. A handle is readable if it manages only input or both input and output; likewise, it is writable if it manages only output or both input and output. A handle is open when first allocated. Once it is closed it can no longer be used for either input or output, though an implementation cannot re-use its storage while references remain to it. Handles are in the Show and Eq classes. The string produced by showing a handle is system dependent; it should include enough information to identify the handle for debugging. A handle is equal according to == only to itself; no attempt is made to compare the internal state of different handles for equality.

data ST s a Source #

The strict ST monad. The ST monad allows for destructive updates, but is escapable (unlike IO). A computation of type ST s a returns a value of type a , and execute in "thread" s . The s parameter is either

It serves to keep the internal states of different invocations of runST separate from each other and from invocations of stToIO .

The >>= and >> operations are strict in the state (though not in values stored in the state). For example,

runST (writeSTRef _|_ v >>= f) = _|_

Instances

Instances details
Monad ( ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Functor ( ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

fmap :: (a -> b) -> ST s a -> ST s b Source #

(<$) :: a -> ST s b -> ST s a Source #

MonadFail ( ST s)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Applicative ( ST s)

Since: base-4.4.0.0

Instance details

Defined in GHC.ST

Methods

pure :: a -> ST s a Source #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b Source #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c Source #

(*>) :: ST s a -> ST s b -> ST s b Source #

(<*) :: ST s a -> ST s b -> ST s a Source #

PrimMonad ( ST s)
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState ( ST s) Source #

PrimBase ( ST s)
Instance details

Defined in Control.Monad.Primitive

MArray ( STUArray s) Word ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Word8 ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Word64 ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Word32 ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Word16 ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Int ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Int8 ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Int64 ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Int32 ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Int16 ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Float ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Double ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Char ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) Bool ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STArray s) e ( ST s)
Instance details

Defined in Data.Array.Base

RandomGen g => FrozenGen ( STGen g) ( ST s)
Instance details

Defined in System.Random.Stateful

Associated Types

type MutableGen ( STGen g) ( ST s) = (g :: Type ) Source #

MArray ( STUArray s) ( StablePtr a) ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) ( Ptr a) ( ST s)
Instance details

Defined in Data.Array.Base

MArray ( STUArray s) ( FunPtr a) ( ST s)
Instance details

Defined in Data.Array.Base

Show ( ST s a)

Since: base-2.1

Instance details

Defined in GHC.ST

Semigroup a => Semigroup ( ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Monoid a => Monoid ( ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

RandomGen r => RandomGenM ( STGenM r s) r ( ST s)
Instance details

Defined in System.Random.Stateful

Methods

applyRandomGenM :: (r -> (a, r)) -> STGenM r s -> ST s a Source #

RandomGen g => StatefulGen ( STGenM g s) ( ST s)
Instance details

Defined in System.Random.Stateful

type PrimState ( ST s)
Instance details

Defined in Control.Monad.Primitive

type PrimState ( ST s) = s
type MutableGen ( STGen g) ( ST s)
Instance details

Defined in System.Random.Stateful

class Bifunctor (p :: Type -> Type -> Type ) where Source #

A bifunctor is a type constructor that takes two type arguments and is a functor in both arguments. That is, unlike with Functor , a type constructor such as Either does not need to be partially applied for a Bifunctor instance, and the methods in this class permit mapping functions over the Left value or the Right value, or both at the same time.

Formally, the class Bifunctor represents a bifunctor from Hask -> Hask .

Intuitively it is a bifunctor where both the first and second arguments are covariant.

You can define a Bifunctor by either defining bimap or by defining both first and second .

If you supply bimap , you should ensure that:

bimap id idid

If you supply first and second , ensure:

first idid
second idid

If you supply both, you should also ensure:

bimap f g ≡ first f . second g

These ensure by parametricity:

bimap  (f . g) (h . i) ≡ bimap f h . bimap g i
first  (f . g) ≡ first  f . first  g
second (f . g) ≡ second f . second g

Since: base-4.8.0.0

Minimal complete definition

bimap | first , second

Methods

bimap :: (a -> b) -> (c -> d) -> p a c -> p b d Source #

Map over both arguments at the same time.

bimap f g ≡ first f . second g

Examples

Expand
>>> bimap toUpper (+1) ('j', 3)
('J',4)
>>> bimap toUpper (+1) (Left 'j')
Left 'J'
>>> bimap toUpper (+1) (Right 3)
Right 4

first :: (a -> b) -> p a c -> p b c Source #

Map covariantly over the first argument.

first f ≡ bimap f id

Examples

Expand
>>> first toUpper ('j', 3)
('J',3)
>>> first toUpper (Left 'j')
Left 'J'

second :: (b -> c) -> p a b -> p a c Source #

Map covariantly over the second argument.

secondbimap id

Examples

Expand
>>> second (+1) ('j', 3)
('j',4)
>>> second (+1) (Right 3)
Right 4

Instances

Instances details
Bifunctor Either

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

first :: (a -> b) -> Either a c -> Either b c Source #

second :: (b -> c) -> Either a b -> Either a c Source #

Bifunctor (,)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) Source #

first :: (a -> b) -> (a, c) -> (b, c) Source #

second :: (b -> c) -> (a, b) -> (a, c) Source #

Bifunctor Arg

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

bimap :: (a -> b) -> (c -> d) -> Arg a c -> Arg b d Source #

first :: (a -> b) -> Arg a c -> Arg b c Source #

second :: (b -> c) -> Arg a b -> Arg a c Source #

Bifunctor These
Instance details

Defined in Data.These

Methods

bimap :: (a -> b) -> (c -> d) -> These a c -> These b d Source #

first :: (a -> b) -> These a c -> These b c Source #

second :: (b -> c) -> These a b -> These a c Source #

Bifunctor Pair
Instance details

Defined in Data.Strict.Tuple

Methods

bimap :: (a -> b) -> (c -> d) -> Pair a c -> Pair b d Source #

first :: (a -> b) -> Pair a c -> Pair b c Source #

second :: (b -> c) -> Pair a b -> Pair a c Source #

Bifunctor These
Instance details

Defined in Data.Strict.These

Methods

bimap :: (a -> b) -> (c -> d) -> These a c -> These b d Source #

first :: (a -> b) -> These a c -> These b c Source #

second :: (b -> c) -> These a b -> These a c Source #

Bifunctor Either
Instance details

Defined in Data.Strict.Either

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

first :: (a -> b) -> Either a c -> Either b c Source #

second :: (b -> c) -> Either a b -> Either a c Source #

Bifunctor ( (,,) x1)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, a, c) -> (x1, b, d) Source #

first :: (a -> b) -> (x1, a, c) -> (x1, b, c) Source #

second :: (b -> c) -> (x1, a, b) -> (x1, a, c) Source #

Bifunctor ( Const :: Type -> Type -> Type )

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d Source #

first :: (a -> b) -> Const a c -> Const b c Source #

second :: (b -> c) -> Const a b -> Const a c Source #

Bifunctor ( Tagged :: Type -> Type -> Type )
Instance details

Defined in Data.Tagged

Methods

bimap :: (a -> b) -> (c -> d) -> Tagged a c -> Tagged b d Source #

first :: (a -> b) -> Tagged a c -> Tagged b c Source #

second :: (b -> c) -> Tagged a b -> Tagged a c Source #

Bifunctor ( K1 i :: Type -> Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> K1 i a c -> K1 i b d Source #

first :: (a -> b) -> K1 i a c -> K1 i b c Source #

second :: (b -> c) -> K1 i a b -> K1 i a c Source #

Bifunctor ( (,,,) x1 x2)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, a, c) -> (x1, x2, b, d) Source #

first :: (a -> b) -> (x1, x2, a, c) -> (x1, x2, b, c) Source #

second :: (b -> c) -> (x1, x2, a, b) -> (x1, x2, a, c) Source #

Bifunctor ( (,,,,) x1 x2 x3)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, d) Source #

first :: (a -> b) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, c) Source #

second :: (b -> c) -> (x1, x2, x3, a, b) -> (x1, x2, x3, a, c) Source #

Bifunctor p => Bifunctor ( Flip p)
Instance details

Defined in Data.Bifunctor.Flip

Methods

bimap :: (a -> b) -> (c -> d) -> Flip p a c -> Flip p b d Source #

first :: (a -> b) -> Flip p a c -> Flip p b c Source #

second :: (b -> c) -> Flip p a b -> Flip p a c Source #

Bifunctor ( (,,,,,) x1 x2 x3 x4)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, d) Source #

first :: (a -> b) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, c) Source #

second :: (b -> c) -> (x1, x2, x3, x4, a, b) -> (x1, x2, x3, x4, a, c) Source #

( Bifunctor p, Bifunctor q) => Bifunctor ( Sum p q)
Instance details

Defined in Data.Bifunctor.Sum

Methods

bimap :: (a -> b) -> (c -> d) -> Sum p q a c -> Sum p q b d Source #

first :: (a -> b) -> Sum p q a c -> Sum p q b c Source #

second :: (b -> c) -> Sum p q a b -> Sum p q a c Source #

( Bifunctor f, Bifunctor g) => Bifunctor ( Product f g)
Instance details

Defined in Data.Bifunctor.Product

Methods

bimap :: (a -> b) -> (c -> d) -> Product f g a c -> Product f g b d Source #

first :: (a -> b) -> Product f g a c -> Product f g b c Source #

second :: (b -> c) -> Product f g a b -> Product f g a c Source #

Bifunctor ( (,,,,,,) x1 x2 x3 x4 x5)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, d) Source #

first :: (a -> b) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, c) Source #

second :: (b -> c) -> (x1, x2, x3, x4, x5, a, b) -> (x1, x2, x3, x4, x5, a, c) Source #

( Functor f, Bifunctor p) => Bifunctor ( Tannen f p)
Instance details

Defined in Data.Bifunctor.Tannen

Methods

bimap :: (a -> b) -> (c -> d) -> Tannen f p a c -> Tannen f p b d Source #

first :: (a -> b) -> Tannen f p a c -> Tannen f p b c Source #

second :: (b -> c) -> Tannen f p a b -> Tannen f p a c Source #

( Bifunctor p, Functor f, Functor g) => Bifunctor ( Biff p f g)
Instance details

Defined in Data.Bifunctor.Biff

Methods

bimap :: (a -> b) -> (c -> d) -> Biff p f g a c -> Biff p f g b d Source #

first :: (a -> b) -> Biff p f g a c -> Biff p f g b c Source #

second :: (b -> c) -> Biff p f g a b -> Biff p f g a c Source #

forM_ :: ( Foldable t, Monad m) => t a -> (a -> m b) -> m () Source #

forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM .

As of base 4.8.0.0, forM_ is just for_ , specialized to Monad .

mapM_ :: ( Foldable t, Monad m) => (a -> m b) -> t a -> m () Source #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM .

As of base 4.8.0.0, mapM_ is just traverse_ , specialized to Monad .

forkOnWithUnmask :: Int -> (( forall a. IO a -> IO a) -> IO ()) -> IO ThreadId Source #

Like forkIOWithUnmask , but the child thread is pinned to the given CPU, as with forkOn .

Since: base-4.4.0.0

forkIOWithUnmask :: (( forall a. IO a -> IO a) -> IO ()) -> IO ThreadId Source #

Like forkIO , but the child thread is passed a function that can be used to unmask asynchronous exceptions. This function is typically used in the following way

 ... mask_ $ forkIOWithUnmask $ \unmask ->
                catch (unmask ...) handler

so that the exception handler in the child thread is established with asynchronous exceptions masked, meanwhile the main body of the child thread is executed in the unmasked state.

Note that the unmask function passed to the child thread should only be used in that thread; the behaviour is undefined if it is invoked in a different thread.

Since: base-4.4.0.0

forkOn :: Int -> IO () -> IO ThreadId Source #

Like forkIO , but lets you specify on which capability the thread should run. Unlike a forkIO thread, a thread created by forkOn will stay on the same capability for its entire lifetime ( forkIO threads can migrate between capabilities according to the scheduling policy). forkOn is useful for overriding the scheduling policy when you know in advance how best to distribute the threads.

The Int argument specifies a capability number (see getNumCapabilities ). Typically capabilities correspond to physical processors, but the exact behaviour is implementation-dependent. The value passed to forkOn is interpreted modulo the total number of capabilities as returned by getNumCapabilities .

GHC note: the number of capabilities is specified by the +RTS -N option when the program is started. Capabilities can be fixed to actual processor cores with +RTS -qa if the underlying operating system supports that, although in practice this is usually unnecessary (and may actually degrade performance in some cases - experimentation is recommended).

Since: base-4.4.0.0

forkOS :: IO () -> IO ThreadId Source #

Like forkIO , this sparks off a new thread to run the IO computation passed as the first argument, and returns the ThreadId of the newly created thread.

However, forkOS creates a bound thread, which is necessary if you need to call foreign (non-Haskell) libraries that make use of thread-local state, such as OpenGL (see Control.Concurrent ).

Using forkOS instead of forkIO makes no difference at all to the scheduling behaviour of the Haskell runtime system. It is a common misconception that you need to use forkOS instead of forkIO to avoid blocking all the Haskell threads when making a foreign call; this isn't the case. To allow foreign calls to be made without blocking all the Haskell threads (with GHC), it is only necessary to use the -threaded option when linking your program, and to make sure the foreign import is not marked unsafe .

forkIO :: IO () -> IO ThreadId Source #

Creates a new thread to run the IO computation passed as the first argument, and returns the ThreadId of the newly created thread.

The new thread will be a lightweight, unbound thread. Foreign calls made by this thread are not guaranteed to be made by any particular OS thread; if you need foreign calls to be made by a particular OS thread, then use forkOS instead.

The new thread inherits the masked state of the parent (see mask ).

The newly created thread has an exception handler that discards the exceptions BlockedIndefinitelyOnMVar , BlockedIndefinitelyOnSTM , and ThreadKilled , and passes all other exceptions to the uncaught exception handler.

data ThreadId Source #

A ThreadId is an abstract type representing a handle to a thread. ThreadId is an instance of Eq , Ord and Show , where the Ord instance implements an arbitrary total ordering over ThreadId s. The Show instance lets you convert an arbitrary-valued ThreadId to string form; showing a ThreadId value is occasionally useful when debugging or diagnosing the behaviour of a concurrent program.

Note : in GHC, if you have a ThreadId , you essentially have a pointer to the thread itself. This means the thread itself can't be garbage collected until you drop the ThreadId . This misfeature will hopefully be corrected at a later date.

concurrently :: IO a -> IO b -> IO (a, b) Source #

Run two IO actions concurrently, and return both results. If either action throws an exception at any time, then the other action is cancel led, and the exception is re-thrown by concurrently .

concurrently left right =
  withAsync left $ \a ->
  withAsync right $ \b ->
  waitBoth a b

race_ :: IO a -> IO b -> IO () Source #

Like race , but the result is ignored.

race :: IO a -> IO b -> IO ( Either a b) Source #

Run two IO actions concurrently, and return the first to finish. The loser of the race is cancel led.

race left right =
  withAsync left $ \a ->
  withAsync right $ \b ->
  waitEither a b

link2 :: Async a -> Async b -> IO () Source #

Link two Async s together, such that if either raises an exception, the same exception is re-thrown in the other Async , wrapped in ExceptionInLinkedThread .

link2 ignores AsyncCancelled exceptions, so that it's possible to cancel either thread without cancelling the other. If you want different behaviour, use link2Only .

link :: Async a -> IO () Source #

Link the given Async to the current thread, such that if the Async raises an exception, that exception will be re-thrown in the current thread, wrapped in ExceptionInLinkedThread .

link ignores AsyncCancelled exceptions thrown in the other thread, so that it's safe to cancel a thread you're linked to. If you want different behaviour, use linkOnly .

waitBoth :: Async a -> Async b -> IO (a, b) Source #

Waits for both Async s to finish, but if either of them throws an exception before they have both finished, then the exception is re-thrown by waitBoth .

waitEitherCancel :: Async a -> Async b -> IO ( Either a b) Source #

Like waitEither , but also cancel s both Async s before returning.

waitEither_ :: Async a -> Async b -> IO () Source #

Like waitEither , but the result is ignored.

waitEither :: Async a -> Async b -> IO ( Either a b) Source #

Wait for the first of two Async s to finish. If the Async that finished first raised an exception, then the exception is re-thrown by waitEither .

waitAnyCancel :: [ Async a] -> IO ( Async a, a) Source #

Like waitAny , but also cancels the other asynchronous operations as soon as one has completed.

waitAny :: [ Async a] -> IO ( Async a, a) Source #

Wait for any of the supplied Async s to complete. If the first to complete throws an exception, then that exception is re-thrown by waitAny .

If multiple Async s complete or have completed, then the value returned corresponds to the first completed Async in the list.

waitAnyCatchCancel :: [ Async a] -> IO ( Async a, Either SomeException a) Source #

Like waitAnyCatch , but also cancels the other asynchronous operations as soon as one has completed.

waitAnyCatch :: [ Async a] -> IO ( Async a, Either SomeException a) Source #

Wait for any of the supplied asynchronous operations to complete. The value returned is a pair of the Async that completed, and the result that would be returned by wait on that Async .

If multiple Async s complete or have completed, then the value returned corresponds to the first completed Async in the list.

cancelWith :: Exception e => Async a -> e -> IO () Source #

Cancel an asynchronous action by throwing the supplied exception to it.

cancelWith a x = throwTo (asyncThreadId a) x

The notes about the synchronous nature of cancel also apply to cancelWith .

cancel :: Async a -> IO () Source #

Cancel an asynchronous action by throwing the AsyncCancelled exception to it, and waiting for the Async thread to quit. Has no effect if the Async has already completed.

cancel a = throwTo (asyncThreadId a) AsyncCancelled <* waitCatch a

Note that cancel will not terminate until the thread the Async refers to has terminated. This means that cancel will block for as long said thread blocks when receiving an asynchronous exception.

For example, it could block if:

  • It's executing a foreign call, and thus cannot receive the asynchronous exception;
  • It's executing some cleanup handler after having received the exception, and the handler is blocking.

poll :: Async a -> IO ( Maybe ( Either SomeException a)) Source #

Check whether an Async has completed yet. If it has not completed yet, then the result is Nothing , otherwise the result is Just e where e is Left x if the Async raised an exception x , or Right a if it returned a value a .

poll = atomically . pollSTM

waitCatch :: Async a -> IO ( Either SomeException a) Source #

Wait for an asynchronous action to complete, and return either Left e if the action raised an exception e , or Right a if it returned a value a .

waitCatch = atomically . waitCatchSTM

wait :: Async a -> IO a Source #

Wait for an asynchronous action to complete, and return its value. If the asynchronous action threw an exception, then the exception is re-thrown by wait .

wait = atomically . waitSTM

withAsync :: IO a -> ( Async a -> IO b) -> IO b Source #

Spawn an asynchronous action in a separate thread, and pass its Async handle to the supplied function. When the function returns or throws an exception, uninterruptibleCancel is called on the Async .

withAsync action inner = mask $ \restore -> do
  a <- async (restore action)
  restore (inner a) `finally` uninterruptibleCancel a

This is a useful variant of async that ensures an Async is never left running unintentionally.

Note: a reference to the child thread is kept alive until the call to withAsync returns, so nesting many withAsync calls requires linear memory.

async :: IO a -> IO ( Async a) Source #

Spawn an asynchronous action in a separate thread.

Like for forkIO , the action may be left running unintentinally (see module-level documentation for details).

Use withAsync style functions wherever you can instead!

data Async a Source #

An asynchronous action spawned by async or withAsync . Asynchronous actions are executed in a separate thread, and operations are provided for waiting for asynchronous actions to complete and obtaining their results (see e.g. wait ).

newtype Concurrently a Source #

A value of type Concurrently a is an IO operation that can be composed with other Concurrently values, using the Applicative and Alternative instances.

Calling runConcurrently on a value of type Concurrently a will execute the IO operations it contains concurrently, before delivering the result of type a .

For example

(page1, page2, page3)
    <- runConcurrently $ (,,)
    <$> Concurrently (getURL "url1")
    <*> Concurrently (getURL "url2")
    <*> Concurrently (getURL "url3")

Instances

Instances details
Functor Concurrently
Instance details

Defined in Control.Concurrent.Async

Applicative Concurrently
Instance details

Defined in Control.Concurrent.Async

Alternative Concurrently
Instance details

Defined in Control.Concurrent.Async

Semigroup a => Semigroup ( Concurrently a)

Only defined by async for base >= 4.9

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async

( Semigroup a, Monoid a) => Monoid ( Concurrently a)

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async

isSpace :: Char -> Bool Source #

Returns True for any Unicode space character, and the control characters \t , \n , \r , \f , \v .

isAlpha :: Char -> Bool Source #

Selects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to isLetter .

isDigit :: Char -> Bool Source #

Selects ASCII digits, i.e. '0' .. '9' .

class Applicative f => Alternative (f :: Type -> Type ) where Source #

A monoid on applicative functors.

If defined, some and many should be the least solutions of the equations:

Minimal complete definition

empty , (<|>)

Methods

empty :: f a Source #

The identity of <|>

(<|>) :: f a -> f a -> f a infixl 3 Source #

An associative binary operation

some :: f a -> f [a] Source #

One or more.

many :: f a -> f [a] Source #

Zero or more.

Instances

Instances details
Alternative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: [a] Source #

(<|>) :: [a] -> [a] -> [a] Source #

some :: [a] -> [[a]] Source #

many :: [a] -> [[a]] Source #

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Alternative IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Alternative IResult
Instance details

Defined in Data.Aeson.Types.Internal

Alternative Result
Instance details

Defined in Data.Aeson.Types.Internal

Alternative Parser
Instance details

Defined in Data.Aeson.Types.Internal

Alternative Concurrently
Instance details

Defined in Control.Concurrent.Async

Alternative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Alternative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Alternative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Alternative DList
Instance details

Defined in Data.DList.Internal

Alternative SmallArray
Instance details

Defined in Data.Primitive.SmallArray

Alternative Array
Instance details

Defined in Data.Primitive.Array

Alternative Vector
Instance details

Defined in Data.Vector

Alternative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: P a Source #

(<|>) :: P a -> P a -> P a Source #

some :: P a -> P [a] Source #

many :: P a -> P [a] Source #

Alternative ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Alternative ( Parser i)
Instance details

Defined in Data.Attoparsec.Internal.Types

MonadPlus m => Alternative ( WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

ArrowPlus a => Alternative ( ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Alternative ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Applicative m => Alternative ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

( Functor m, Monad m) => Alternative ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

Alternative f => Alternative ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

( ArrowZero a, ArrowPlus a) => Alternative ( WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Alternative m => Alternative ( Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Alternative f => Alternative ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Alternative f => Alternative ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Alternative m => Alternative ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

( Functor m, Monad m, Error e) => Alternative ( ErrorT e m)
Instance details

Defined in Control.Monad.Trans.Error

( Functor m, Monad m, Monoid e) => Alternative ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Alternative m => Alternative ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

( Functor m, MonadPlus m) => Alternative ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

( Functor m, MonadPlus m) => Alternative ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Strict

( Monoid w, Alternative m) => Alternative ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Monoid w, Alternative m) => Alternative ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

( Alternative f, Alternative g) => Alternative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :*: g) a Source #

(<|>) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a Source #

some :: (f :*: g) a -> (f :*: g) [a] Source #

many :: (f :*: g) a -> (f :*: g) [a] Source #

( Alternative f, Alternative g) => Alternative ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Alternative f => Alternative ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: M1 i c f a Source #

(<|>) :: M1 i c f a -> M1 i c f a -> M1 i c f a Source #

some :: M1 i c f a -> M1 i c f [a] Source #

many :: M1 i c f a -> M1 i c f [a] Source #

( Alternative f, Applicative g) => Alternative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :.: g) a Source #

(<|>) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a Source #

some :: (f :.: g) a -> (f :.: g) [a] Source #

many :: (f :.: g) a -> (f :.: g) [a] Source #

( Alternative f, Applicative g) => Alternative ( Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

( Monoid w, Functor m, MonadPlus m) => Alternative ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

empty :: RWST r w s m a Source #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

some :: RWST r w s m a -> RWST r w s m [a] Source #

many :: RWST r w s m a -> RWST r w s m [a] Source #

( Monoid w, Functor m, MonadPlus m) => Alternative ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

empty :: RWST r w s m a Source #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

some :: RWST r w s m a -> RWST r w s m [a] Source #

many :: RWST r w s m a -> RWST r w s m [a] Source #

class ( Alternative m, Monad m) => MonadPlus (m :: Type -> Type ) where Source #

Monads that also support choice and failure.

Minimal complete definition

Nothing

Methods

mzero :: m a Source #

The identity of mplus . It should also satisfy the equations

mzero >>= f  =  mzero
v >> mzero   =  mzero

The default definition is

mzero = empty

mplus :: m a -> m a -> m a Source #

An associative operation. The default definition is

mplus = (<|>)

Instances

Instances details
MonadPlus []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: [a] Source #

mplus :: [a] -> [a] -> [a] Source #

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

MonadPlus IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

MonadPlus IResult
Instance details

Defined in Data.Aeson.Types.Internal

MonadPlus Result
Instance details

Defined in Data.Aeson.Types.Internal

MonadPlus Parser
Instance details

Defined in Data.Aeson.Types.Internal

MonadPlus Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

MonadPlus STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

MonadPlus ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

MonadPlus Seq
Instance details

Defined in Data.Sequence.Internal

MonadPlus DList
Instance details

Defined in Data.DList.Internal

MonadPlus SmallArray
Instance details

Defined in Data.Primitive.SmallArray

MonadPlus Array
Instance details

Defined in Data.Primitive.Array

MonadPlus Vector
Instance details

Defined in Data.Vector

MonadPlus P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: P a Source #

mplus :: P a -> P a -> P a Source #

MonadPlus ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

MonadPlus ( Parser i)
Instance details

Defined in Data.Attoparsec.Internal.Types

( ArrowApply a, ArrowPlus a) => MonadPlus ( ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

MonadPlus ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Monad m => MonadPlus ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

Monad m => MonadPlus ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

MonadPlus f => MonadPlus ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

MonadPlus m => MonadPlus ( Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

MonadPlus f => MonadPlus ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

MonadPlus f => MonadPlus ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

MonadPlus m => MonadPlus ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

( Monad m, Error e) => MonadPlus ( ErrorT e m)
Instance details

Defined in Control.Monad.Trans.Error

( Monad m, Monoid e) => MonadPlus ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

MonadPlus m => MonadPlus ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

MonadPlus m => MonadPlus ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

MonadPlus m => MonadPlus ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Strict

( Monoid w, MonadPlus m) => MonadPlus ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Monoid w, MonadPlus m) => MonadPlus ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

( MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: (f :*: g) a Source #

mplus :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a Source #

( MonadPlus f, MonadPlus g) => MonadPlus ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

MonadPlus f => MonadPlus ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: M1 i c f a Source #

mplus :: M1 i c f a -> M1 i c f a -> M1 i c f a Source #

( Monoid w, MonadPlus m) => MonadPlus ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

mzero :: RWST r w s m a Source #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

( Monoid w, MonadPlus m) => MonadPlus ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

mzero :: RWST r w s m a Source #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

phase :: RealFloat a => Complex a -> a Source #

The phase of a complex number, in the range (- pi , pi ] . If the magnitude is zero, then so is the phase.

magnitude :: RealFloat a => Complex a -> a Source #

The nonnegative magnitude of a complex number.

polar :: RealFloat a => Complex a -> (a, a) Source #

The function polar takes a complex number and returns a (magnitude, phase) pair in canonical form: the magnitude is nonnegative, and the phase in the range (- pi , pi ] ; if the magnitude is zero, then so is the phase.

cis :: Floating a => a -> Complex a Source #

cis t is a complex value with magnitude 1 and phase t (modulo 2* pi ).

mkPolar :: Floating a => a -> a -> Complex a Source #

Form a complex number from polar components of magnitude and phase.

conjugate :: Num a => Complex a -> Complex a Source #

The conjugate of a complex number.

imagPart :: Complex a -> a Source #

Extracts the imaginary part of a complex number.

realPart :: Complex a -> a Source #

Extracts the real part of a complex number.

data Complex a Source #

Complex numbers are an algebraic type.

For a complex number z , abs z is a number with the magnitude of z , but oriented in the positive real direction, whereas signum z has the phase of z , but unit magnitude.

The Foldable and Traversable instances traverse the real part first.

Note that Complex 's instances inherit the deficiencies from the type parameter's. For example, Complex Float 's Ord instance has similar problems to Float 's.

Constructors

!a :+ !a infix 6

forms a complex number from its real and imaginary rectangular components.

Instances

Instances details
Monad Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Functor Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Applicative Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Foldable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Traversable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Hashable1 Complex
Instance details

Defined in Data.Hashable.Class

Unbox a => Vector Vector ( Complex a)
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector ( Complex a)
Instance details

Defined in Data.Vector.Unboxed.Base

Eq a => Eq ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

RealFloat a => Floating ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

RealFloat a => Fractional ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Data a => Data ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Complex a -> c ( Complex a) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Complex a) Source #

toConstr :: Complex a -> Constr Source #

dataTypeOf :: Complex a -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Complex a)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Complex a)) Source #

gmapT :: ( forall b. Data b => b -> b) -> Complex a -> Complex a Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Complex a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Complex a -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Complex a -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Complex a -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Complex a -> m ( Complex a) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Complex a -> m ( Complex a) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Complex a -> m ( Complex a) Source #

RealFloat a => Num ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Read a => Read ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Show a => Show ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Generic ( Complex a)

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Associated Types

type Rep ( Complex a) :: Type -> Type Source #

Hashable a => Hashable ( Complex a)
Instance details

Defined in Data.Hashable.Class

Storable a => Storable ( Complex a)

Since: base-4.8.0.0

Instance details

Defined in Data.Complex

NFData a => NFData ( Complex a)
Instance details

Defined in Control.DeepSeq

Unbox a => Unbox ( Complex a)
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Associated Types

type Rep1 Complex :: k -> Type Source #

newtype MVector s ( Complex a)
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s ( Complex a) = MV_Complex ( MVector s (a, a))
type Rep ( Complex a)
Instance details

Defined in Data.Complex

newtype Vector ( Complex a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Complex
Instance details

Defined in Data.Complex

vacuous :: Functor f => f Void -> f a Source #

If Void is uninhabited then any Functor that holds only values of type Void is holding no values.

Using ApplicativeDo : ' vacuous theVoid ' can be understood as the do expression

do void <- theVoid
   pure (absurd void)

with an inferred Functor constraint.

Since: base-4.8.0.0

absurd :: Void -> a Source #

Since Void values logically don't exist, this witnesses the logical reasoning tool of "ex falso quodlibet".

>>> let x :: Either Void Int; x = Right 5
>>> :{
case x of
    Right r -> r
    Left l  -> absurd l
:}
5

Since: base-4.8.0.0

data Void Source #

Uninhabited data type

Since: base-4.8.0.0

Instances

Instances details
Eq Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Data Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Void -> c Void Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c Void Source #

toConstr :: Void -> Constr Source #

dataTypeOf :: Void -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c Void ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c Void ) Source #

gmapT :: ( forall b. Data b => b -> b) -> Void -> Void Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Void -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Void -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Void -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Void -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Void -> m Void Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Void -> m Void Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Void -> m Void Source #

Ord Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Read Void

Reading a Void value is always a parse error, considering Void as a data type with no constructors.

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Show Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Ix Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Generic Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Associated Types

type Rep Void :: Type -> Type Source #

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in Data.Void

Hashable Void
Instance details

Defined in Data.Hashable.Class

Exception Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

NFData Void

Defined as rnf = absurd .

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Buildable Void
Instance details

Defined in Formatting.Buildable

Lift Void

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

type Rep Void
Instance details

Defined in Data.Void

type Rep Void = D1 (' MetaData "Void" "Data.Void" "base" ' False ) ( V1 :: Type -> Type )

option :: b -> (a -> b) -> Option a -> b Source #

Fold an Option case-wise, just like maybe .

mtimesDefault :: ( Integral b, Monoid a) => b -> a -> a Source #

Repeat a value n times.

mtimesDefault n a = a <> a <> ... <> a  -- using <> (n-1) times

Implemented using stimes and mempty .

This is a suitable definition for an mtimes member of Monoid .

diff :: Semigroup m => m -> Endo m Source #

This lets you use a difference list of a Semigroup as a Monoid .

cycle1 :: Semigroup m => m -> m Source #

A generalization of cycle to an arbitrary Semigroup . May fail to terminate for some values in some semigroups.

data WrappedMonoid m Source #

Provide a Semigroup for an arbitrary Monoid.

NOTE : This is not needed anymore since Semigroup became a superclass of Monoid in base-4.11 and this newtype be deprecated at some point in the future.

Instances

Instances details
NFData1 WrappedMonoid

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> WrappedMonoid a -> () Source #

Hashable1 WrappedMonoid

Since: hashable-1.3.1.0

Instance details

Defined in Data.Hashable.Class

Unbox a => Vector Vector ( WrappedMonoid a)
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector ( WrappedMonoid a)
Instance details

Defined in Data.Vector.Unboxed.Base

Bounded m => Bounded ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq m => Eq ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Data m => Data ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> WrappedMonoid m -> c ( WrappedMonoid m) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( WrappedMonoid m) Source #

toConstr :: WrappedMonoid m -> Constr Source #

dataTypeOf :: WrappedMonoid m -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( WrappedMonoid m)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( WrappedMonoid m)) Source #

gmapT :: ( forall b. Data b => b -> b) -> WrappedMonoid m -> WrappedMonoid m Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> WrappedMonoid m -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> WrappedMonoid m -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> WrappedMonoid m -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> WrappedMonoid m -> u Source #

gmapM :: Monad m0 => ( forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 ( WrappedMonoid m) Source #

gmapMp :: MonadPlus m0 => ( forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 ( WrappedMonoid m) Source #

gmapMo :: MonadPlus m0 => ( forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 ( WrappedMonoid m) Source #

Ord m => Ord ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read m => Read ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show m => Show ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Generic ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid m => Semigroup ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid m => Monoid ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Hashable a => Hashable ( WrappedMonoid a)
Instance details

Defined in Data.Hashable.Class

NFData m => NFData ( WrappedMonoid m)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Unbox a => Unbox ( WrappedMonoid a)
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 WrappedMonoid

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 WrappedMonoid :: k -> Type Source #

newtype MVector s ( WrappedMonoid a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep ( WrappedMonoid m)
Instance details

Defined in Data.Semigroup

type Rep ( WrappedMonoid m) = D1 (' MetaData "WrappedMonoid" "Data.Semigroup" "base" ' True ) ( C1 (' MetaCons "WrapMonoid" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unwrapMonoid") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 m)))
newtype Vector ( WrappedMonoid a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 WrappedMonoid
Instance details

Defined in Data.Semigroup

newtype Option a Source #

Option is effectively Maybe with a better instance of Monoid , built off of an underlying Semigroup instead of an underlying Monoid .

Ideally, this type would not exist at all and we would just fix the Monoid instance of Maybe .

In GHC 8.4 and higher, the Monoid instance for Maybe has been corrected to lift a Semigroup instance instead of a Monoid instance. Consequently, this type is no longer useful. It will be marked deprecated in GHC 8.8 and removed in GHC 8.10.

Constructors

Option

Instances

Instances details
Monad Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

MonadFix Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Alternative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

MonadPlus Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

NFData1 Option

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Option a -> () Source #

Hashable1 Option

Since: hashable-1.3.1.0

Instance details

Defined in Data.Hashable.Class

Eq a => Eq ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Data a => Data ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Option a -> c ( Option a) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Option a) Source #

toConstr :: Option a -> Constr Source #

dataTypeOf :: Option a -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Option a)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Option a)) Source #

gmapT :: ( forall b. Data b => b -> b) -> Option a -> Option a Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Option a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Option a -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Option a -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Option a -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Option a -> m ( Option a) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Option a -> m ( Option a) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Option a -> m ( Option a) Source #

Ord a => Ord ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Generic ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep ( Option a) :: Type -> Type Source #

Semigroup a => Semigroup ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Monoid ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Hashable a => Hashable ( Option a)
Instance details

Defined in Data.Hashable.Class

NFData a => NFData ( Option a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Option a -> () Source #

Generic1 Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Option :: k -> Type Source #

type Rep ( Option a)
Instance details

Defined in Data.Semigroup

type Rep1 Option
Instance details

Defined in Data.Semigroup

threadWaitWriteSTM :: Fd -> IO ( STM (), IO ()) Source #

Returns an STM action that can be used to wait until data can be written to a file descriptor. The second returned value is an IO action that can be used to deregister interest in the file descriptor.

Since: base-4.7.0.0

threadWaitReadSTM :: Fd -> IO ( STM (), IO ()) Source #

Returns an STM action that can be used to wait for data to read from a file descriptor. The second returned value is an IO action that can be used to deregister interest in the file descriptor.

Since: base-4.7.0.0

threadWaitWrite :: Fd -> IO () Source #

Block the current thread until data can be written to the given file descriptor (GHC only).

This will throw an IOError if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with threadWaitWrite , use closeFdWith .

threadWaitRead :: Fd -> IO () Source #

Block the current thread until data is available to read on the given file descriptor (GHC only).

This will throw an IOError if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with threadWaitRead , use closeFdWith .

runInUnboundThread :: IO a -> IO a Source #

Run the IO computation passed as the first argument. If the calling thread is bound , an unbound thread is created temporarily using forkIO . runInBoundThread doesn't finish until the IO computation finishes.

Use this function only in the rare case that you have actually observed a performance loss due to the use of bound threads. A program that doesn't need its main thread to be bound and makes heavy use of concurrency (e.g. a web server), might want to wrap its main action in runInUnboundThread .

Note that exceptions which are thrown to the current thread are thrown in turn to the thread that is executing the given computation. This ensures there's always a way of killing the forked thread.

runInBoundThread :: IO a -> IO a Source #

Run the IO computation passed as the first argument. If the calling thread is not bound , a bound thread is created temporarily. runInBoundThread doesn't finish until the IO computation finishes.

You can wrap a series of foreign function calls that rely on thread-local state with runInBoundThread so that you can use them without knowing whether the current thread is bound .

isCurrentThreadBound :: IO Bool Source #

Returns True if the calling thread is bound , that is, if it is safe to use foreign libraries that rely on thread-local state from the calling thread.

forkOSWithUnmask :: (( forall a. IO a -> IO a) -> IO ()) -> IO ThreadId Source #

Like forkIOWithUnmask , but the child thread is a bound thread, as with forkOS .

forkFinally :: IO a -> ( Either SomeException a -> IO ()) -> IO ThreadId Source #

Fork a thread and call the supplied function when the thread is about to terminate, with an exception or a returned value. The function is called with asynchronous exceptions masked.

forkFinally action and_then =
  mask $ \restore ->
    forkIO $ try (restore action) >>= and_then

This function is useful for informing the parent when a child terminates, for example.

Since: base-4.6.0.0

rtsSupportsBoundThreads :: Bool Source #

True if bound threads are supported. If rtsSupportsBoundThreads is False , isCurrentThreadBound will always return False and both forkOS and runInBoundThread will fail.

writeList2Chan :: Chan a -> [a] -> IO () Source #

Write an entire list of items to a Chan .

getChanContents :: Chan a -> IO [a] Source #

Return a lazy list representing the contents of the supplied Chan , much like hGetContents .

dupChan :: Chan a -> IO ( Chan a) Source #

Duplicate a Chan : the duplicate channel begins empty, but data written to either channel from then on will be available from both. Hence this creates a kind of broadcast channel, where data written by anyone is seen by everyone else.

(Note that a duplicated channel is not equal to its original. So: fmap (c /=) $ dupChan c returns True for all c .)

readChan :: Chan a -> IO a Source #

Read the next value from the Chan . Blocks when the channel is empty. Since the read end of a channel is an MVar , this operation inherits fairness guarantees of MVar s (e.g. threads blocked in this operation are woken up in FIFO order).

Throws BlockedIndefinitelyOnMVar when the channel is empty and no other thread holds a reference to the channel.

writeChan :: Chan a -> a -> IO () Source #

Write a value to a Chan .

newChan :: IO ( Chan a) Source #

Build and returns a new instance of Chan .

data Chan a Source #

Chan is an abstract type representing an unbounded FIFO channel.

Instances

Instances details
Eq ( Chan a)

Since: base-4.4.0.0

Instance details

Defined in Control.Concurrent.Chan

signalQSem :: QSem -> IO () Source #

Signal that a unit of the QSem is available

waitQSem :: QSem -> IO () Source #

Wait for a unit to become available

newQSem :: Int -> IO QSem Source #

Build a new QSem with a supplied initial quantity. The initial quantity must be at least 0.

data QSem Source #

QSem is a quantity semaphore in which the resource is acquired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked waitQSem calls.

The pattern

  bracket_ waitQSem signalQSem (...)

is safe; it never loses a unit of the resource.

signalQSemN :: QSemN -> Int -> IO () Source #

Signal that a given quantity is now available from the QSemN .

waitQSemN :: QSemN -> Int -> IO () Source #

Wait for the specified quantity to become available

newQSemN :: Int -> IO QSemN Source #

Build a new QSemN with a supplied initial quantity. The initial quantity must be at least 0.

data QSemN Source #

QSemN is a quantity semaphore in which the resource is acquired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked waitQSemN calls.

The pattern

  bracket_ (waitQSemN n) (signalQSemN n) (...)

is safe; it never loses any of the resource.

nonEmpty :: [a] -> Maybe ( NonEmpty a) Source #

nonEmpty efficiently turns a normal list into a NonEmpty stream, producing Nothing if the input is empty.

showStackTrace :: IO ( Maybe String ) Source #

Get a string representation of the current execution stack state.

getStackTrace :: IO ( Maybe [ Location ]) Source #

Get a trace of the current execution stack state.

Returns Nothing if stack trace support isn't available on host machine.

data SrcLoc Source #

A location in the original program source.

data Location Source #

Location information about an address from a backtrace.

class Monad m => MonadIO (m :: Type -> Type ) where Source #

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a Source #

Lift a computation from the IO monad.

Instances

Instances details
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

MonadIO Q
Instance details

Defined in Language.Haskell.TH.Syntax

MonadIO m => MonadIO ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

MonadIO m => MonadIO ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

MonadIO m => MonadIO ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

( Error e, MonadIO m) => MonadIO ( ErrorT e m)
Instance details

Defined in Control.Monad.Trans.Error

MonadIO m => MonadIO ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

MonadIO m => MonadIO ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

MonadIO m => MonadIO ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

MonadIO m => MonadIO ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Strict

( Monoid w, MonadIO m) => MonadIO ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Monoid w, MonadIO m) => MonadIO ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

( Monoid w, MonadIO m) => MonadIO ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

liftIO :: IO a -> RWST r w s m a Source #

( Monoid w, MonadIO m) => MonadIO ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

liftIO :: IO a -> RWST r w s m a Source #

getArgs :: IO [ String ] Source #

Computation getArgs returns a list of the program's command line arguments (not including the program name).

exitSuccess :: IO a Source #

The computation exitSuccess is equivalent to exitWith ExitSuccess , It terminates the program successfully.

exitFailure :: IO a Source #

The computation exitFailure is equivalent to exitWith ( ExitFailure exitfail ) , where exitfail is implementation-dependent.

exitWith :: ExitCode -> IO a Source #

Computation exitWith code throws ExitCode code . Normally this terminates the program, returning code to the program's caller.

On program termination, the standard Handle s stdout and stderr are flushed automatically; any other buffered Handle s need to be flushed manually, otherwise the buffered data will be discarded.

A program that fails in any other way is treated as if it had called exitFailure . A program that terminates successfully without calling exitWith explicitly is treated as if it had called exitWith ExitSuccess .

As an ExitCode is not an IOError , exitWith bypasses the error handling in the IO monad and cannot be intercepted by catch from the Prelude . However it is a SomeException , and can be caught using the functions of Control.Exception . This means that cleanup computations added with bracket (from Control.Exception ) are also executed properly on exitWith .

Note: in GHC, exitWith should be called from the main program thread in order to exit the process. When called from another thread, exitWith will throw an ExitException as normal, but the exception will not cause the process itself to exit.

mfilter :: MonadPlus m => (a -> Bool ) -> m a -> m a Source #

Direct MonadPlus equivalent of filter .

Examples

Expand

The filter function is just mfilter specialized to the list monad:

filter = ( mfilter :: (a -> Bool) -> [a] -> [a] )

An example using mfilter with the Maybe monad:

>>> mfilter odd (Just 1)
Just 1
>>> mfilter odd (Just 2)
Nothing

(<$!>) :: Monad m => (a -> b) -> m a -> m b infixl 4 Source #

Strict version of <$> .

Since: base-4.8.0.0

unless :: Applicative f => Bool -> f () -> f () Source #

The reverse of when .

replicateM_ :: Applicative m => Int -> m a -> m () Source #

Like replicateM , but discards the result.

replicateM :: Applicative m => Int -> m a -> m [a] Source #

replicateM n act performs the action n times, gathering the results.

Using ApplicativeDo : ' replicateM 5 as ' can be understood as the do expression

do a1 <- as
   a2 <- as
   a3 <- as
   a4 <- as
   a5 <- as
   pure [a1,a2,a3,a4,a5]

Note the Applicative constraint.

foldM_ :: ( Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m () Source #

Like foldM , but discards the result.

foldM :: ( Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b Source #

The foldM function is analogous to foldl , except that its result is encapsulated in a monad. Note that foldM works from left-to-right over the list arguments. This could be an issue where ( >> ) and the `folded function' are not commutative.

foldM f a1 [x1, x2, ..., xm]

==

do
  a2 <- f a1 x1
  a3 <- f a2 x2
  ...
  f am xm

If right-to-left evaluation is required, the input list should be reversed.

Note: foldM is the same as foldlM

zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () Source #

zipWithM_ is the extension of zipWithM which ignores the final result.

zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] Source #

The zipWithM function generalizes zipWith to arbitrary applicative functors.

mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) Source #

The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state monad.

forever :: Applicative f => f a -> f b Source #

Repeat an action indefinitely.

Using ApplicativeDo : ' forever as ' can be understood as the pseudo- do expression

do as
   as
   ..

with as repeating.

Examples

Expand

A common use of forever is to process input from network sockets, Handle s, and channels (e.g. MVar and Chan ).

For example, here is how we might implement an echo server , using forever both to listen for client connections on a network socket and to echo client input on client connection handles:

echoServer :: Socket -> IO ()
echoServer socket = forever $ do
  client <- accept socket
  forkFinally (echo client) (\_ -> hClose client)
  where
    echo :: Handle -> IO ()
    echo client = forever $
      hGetLine client >>= hPutStrLn client

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 Source #

Right-to-left composition of Kleisli arrows. ( >=> ) , with the arguments flipped.

Note how this operator resembles function composition ( . ) :

(.)   ::            (b ->   c) -> (a ->   b) -> a ->   c
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 Source #

Left-to-right composition of Kleisli arrows.

' (bs >=> cs) a ' can be understood as the do expression

do b <- bs a
   cs b

filterM :: Applicative m => (a -> m Bool ) -> [a] -> m [a] Source #

This generalizes the list-based filter function.

foldMapDefault :: ( Traversable t, Monoid m) => (a -> m) -> t a -> m Source #

This function may be used as a value for foldMap in a Foldable instance.

foldMapDefault f ≡ getConst . traverse (Const . f)

fmapDefault :: Traversable t => (a -> b) -> t a -> t b Source #

This function may be used as a value for fmap in a Functor instance, provided that traverse is defined. (Using fmapDefault with a Traversable instance defined only by sequenceA will result in infinite recursion.)

fmapDefault f ≡ runIdentity . traverse (Identity . f)

mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) Source #

The mapAccumR function behaves like a combination of fmap and foldr ; it applies a function to each element of a structure, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new structure.

mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) Source #

The mapAccumL function behaves like a combination of fmap and foldl ; it applies a function to each element of a structure, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new structure.

forM :: ( Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) Source #

forM is mapM with its arguments flipped. For a version that ignores the results see forM_ .

for :: ( Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b) Source #

for is traverse with its arguments flipped. For a version that ignores the results see for_ .

optional :: Alternative f => f a -> f ( Maybe a) Source #

One or none.

newtype ZipList a Source #

Lists, but with an Applicative functor based on zipping.

Constructors

ZipList

Fields

Instances

Instances details
Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Applicative ZipList
f <$> ZipList xs1 <*> ... <*> ZipList xsN
    = ZipList (zipWithN f xs1 ... xsN)

where zipWithN refers to the zipWith function of the appropriate arity ( zipWith , zipWith3 , zipWith4 , ...). For example:

(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
    = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
    = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}

Since: base-2.1

Instance details

Defined in Control.Applicative

Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

NFData1 ZipList

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> ZipList a -> () Source #

IsList ( ZipList a)

Since: base-4.15.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item ( ZipList a) Source #

Eq a => Eq ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Ord a => Ord ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Read a => Read ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Show a => Show ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Generic ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep ( ZipList a) :: Type -> Type Source #

NFData a => NFData ( ZipList a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Generic1 ZipList

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Associated Types

type Rep1 ZipList :: k -> Type Source #

type Rep ( ZipList a)
Instance details

Defined in Control.Applicative

type Rep ( ZipList a) = D1 (' MetaData "ZipList" "Control.Applicative" "base" ' True ) ( C1 (' MetaCons "ZipList" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getZipList") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [a])))
type Item ( ZipList a)
Instance details

Defined in GHC.Exts

type Item ( ZipList a) = a
type Rep1 ZipList
Instance details

Defined in Control.Applicative

type Rep1 ZipList = D1 (' MetaData "ZipList" "Control.Applicative" "base" ' True ) ( C1 (' MetaCons "ZipList" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getZipList") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec1 [])))

newtype Identity a Source #

Identity functor and monad. (a non-strict monad)

Since: base-4.8.0.0

Constructors

Identity

Fields

Instances

Instances details
Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

MonadFix Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

NFData1 Identity

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Identity a -> () Source #

Hashable1 Identity
Instance details

Defined in Data.Hashable.Class

Unbox a => Vector Vector ( Identity a)
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector ( Identity a)
Instance details

Defined in Data.Vector.Unboxed.Base

Bounded a => Bounded ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Enum a => Enum ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Eq a => Eq ( Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Floating a => Floating ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Fractional a => Fractional ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Integral a => Integral ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Ord a => Ord ( Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Read a => Read ( Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Real a => Real ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => RealFloat ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFrac a => RealFrac ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Show a => Show ( Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Ix a => Ix ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

IsString a => IsString ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Generic ( Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep ( Identity a) :: Type -> Type Source #

Semigroup a => Semigroup ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Monoid a => Monoid ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Hashable a => Hashable ( Identity a)
Instance details

Defined in Data.Hashable.Class

Storable a => Storable ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bits a => Bits ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

FiniteBits a => FiniteBits ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

NFData a => NFData ( Identity a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Prim a => Prim ( Identity a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox ( Identity a)
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep1 Identity :: k -> Type Source #

newtype MVector s ( Identity a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep ( Identity a)
Instance details

Defined in Data.Functor.Identity

type Rep ( Identity a) = D1 (' MetaData "Identity" "Data.Functor.Identity" "base" ' True ) ( C1 (' MetaCons "Identity" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "runIdentity") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
newtype Vector ( Identity a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Identity
Instance details

Defined in Data.Functor.Identity

type Rep1 Identity = D1 (' MetaData "Identity" "Data.Functor.Identity" "base" ' True ) ( C1 (' MetaCons "Identity" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "runIdentity") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) Par1 ))

withFile :: FilePath -> IOMode -> ( Handle -> IO r) -> IO r Source #

withFile name mode act opens a file using openFile and passes the resulting handle to the computation act . The handle will be closed on exit from withFile , whether by normal termination or by raising an exception. If closing the handle raises an exception, then this exception will be raised by withFile rather than any exception raised by act .

openFile :: FilePath -> IOMode -> IO Handle Source #

Computation openFile file mode allocates and returns a new, open handle to manage the file file . It manages input if mode is ReadMode , output if mode is WriteMode or AppendMode , and both input and output if mode is ReadWriteMode .

If the file does not exist and it is opened for output, it should be created as a new file. If mode is WriteMode and the file already exists, then it should be truncated to zero length. Some operating systems delete empty files, so there is no guarantee that the file will exist following an openFile with mode WriteMode unless it is subsequently written to successfully. The handle is positioned at the end of the file if mode is AppendMode , and otherwise at the beginning (in which case its internal position is 0). The initial buffer mode is implementation-dependent.

This operation may fail with:

Note: if you will be working with files containing binary data, you'll want to be using openBinaryFile .

stderr :: Handle Source #

A handle managing output to the Haskell program's standard error channel.

stdin :: Handle Source #

A handle managing input from the Haskell program's standard input channel.

threadDelay :: Int -> IO () Source #

Suspends the current thread for a given number of microseconds (GHC only).

There is no guarantee that the thread will be rescheduled promptly when the delay has expired, but the thread will never continue to run earlier than specified.

mkWeakMVar :: MVar a -> IO () -> IO ( Weak ( MVar a)) Source #

Make a Weak pointer to an MVar , using the second argument as a finalizer to run when MVar is garbage-collected

Since: base-4.6.0.0

modifyMVarMasked :: MVar a -> (a -> IO (a, b)) -> IO b Source #

Like modifyMVar , but the IO action in the second argument is executed with asynchronous exceptions masked.

Since: base-4.6.0.0

modifyMVarMasked_ :: MVar a -> (a -> IO a) -> IO () Source #

Like modifyMVar_ , but the IO action in the second argument is executed with asynchronous exceptions masked.

Since: base-4.6.0.0

modifyMVar :: MVar a -> (a -> IO (a, b)) -> IO b Source #

A slight variation on modifyMVar_ that allows a value to be returned ( b ) in addition to the modified value of the MVar .

modifyMVar_ :: MVar a -> (a -> IO a) -> IO () Source #

An exception-safe wrapper for modifying the contents of an MVar . Like withMVar , modifyMVar will replace the original contents of the MVar if an exception is raised during the operation. This function is only atomic if there are no other producers for this MVar .

withMVarMasked :: MVar a -> (a -> IO b) -> IO b Source #

Like withMVar , but the IO action in the second argument is executed with asynchronous exceptions masked.

Since: base-4.7.0.0

withMVar :: MVar a -> (a -> IO b) -> IO b Source #

withMVar is an exception-safe wrapper for operating on the contents of an MVar . This operation is exception-safe: it will replace the original contents of the MVar if an exception is raised (see Control.Exception ). However, it is only atomic if there are no other producers for this MVar .

swapMVar :: MVar a -> a -> IO a Source #

Take a value from an MVar , put a new value into the MVar and return the value taken. This function is atomic only if there are no other producers for this MVar .

withFrozenCallStack :: HasCallStack => ( HasCallStack => a) -> a Source #

Perform some computation without adding new entries to the CallStack .

Since: base-4.9.0.0

callStack :: HasCallStack => CallStack Source #

Return the current CallStack .

Does *not* include the call-site of callStack .

Since: base-4.9.0.0

allowInterrupt :: IO () Source #

When invoked inside mask , this function allows a masked asynchronous exception to be raised, if one exists. It is equivalent to performing an interruptible operation (see #interruptible), but does not involve any actual blocking.

When called outside mask , or inside uninterruptibleMask , this function has no effect.

Since: base-4.4.0.0

catches :: IO a -> [ Handler a] -> IO a Source #

Sometimes you want to catch two different sorts of exception. You could do something like

f = expr `catch` \ (ex :: ArithException) -> handleArith ex
         `catch` \ (ex :: IOException)    -> handleIO    ex

However, there are a couple of problems with this approach. The first is that having two exception handlers is inefficient. However, the more serious issue is that the second exception handler will catch exceptions in the first, e.g. in the example above, if handleArith throws an IOException then the second exception handler will catch it.

Instead, we provide a function catches , which would be used thus:

f = expr `catches` [Handler (\ (ex :: ArithException) -> handleArith ex),
                    Handler (\ (ex :: IOException)    -> handleIO    ex)]

data Handler a Source #

You need this when using catches .

Constructors

Exception e => Handler (e -> IO a)

Instances

Instances details
Functor Handler

Since: base-4.6.0.0

Instance details

Defined in Control.Exception

fixST :: (a -> ST s a) -> ST s a Source #

Allow the result of an ST computation to be used (lazily) inside the computation.

Note that if f is strict, fixST f = _|_ .

bracketOnError Source #

Arguments

:: IO a

computation to run first ("acquire resource")

-> (a -> IO b)

computation to run last ("release resource")

-> (a -> IO c)

computation to run in-between

-> IO c

Like bracket , but only performs the final action if there was an exception raised by the in-between computation.

bracket_ :: IO a -> IO b -> IO c -> IO c Source #

A variant of bracket where the return value from the first computation is not required.

finally Source #

Arguments

:: IO a

computation to run first

-> IO b

computation to run afterward (even if an exception was raised)

-> IO a

A specialised variant of bracket with just a computation to run afterward.

bracket Source #

Arguments

:: IO a

computation to run first ("acquire resource")

-> (a -> IO b)

computation to run last ("release resource")

-> (a -> IO c)

computation to run in-between

-> IO c

When you want to acquire a resource, do some work with it, and then release the resource, it is a good idea to use bracket , because bracket will install the necessary exception handler to release the resource in the event that an exception is raised during the computation. If an exception is raised, then bracket will re-raise the exception (after performing the release).

A common example is opening a file:

bracket
  (openFile "filename" ReadMode)
  (hClose)
  (\fileHandle -> do { ... })

The arguments to bracket are in this order so that we can partially apply it, e.g.:

withFile name mode = bracket (openFile name mode) hClose

onException :: IO a -> IO b -> IO a Source #

Like finally , but only performs the final action if there was an exception raised by the computation.

tryJust :: Exception e => (e -> Maybe b) -> IO a -> IO ( Either b a) Source #

A variant of try that takes an exception predicate to select which exceptions are caught (c.f. catchJust ). If the exception does not match the predicate, it is re-thrown.

try :: Exception e => IO a -> IO ( Either e a) Source #

Similar to catch , but returns an Either result which is ( Right a) if no exception of type e was raised, or ( Left ex) if an exception of type e was raised and its value is ex . If any other type of exception is raised than it will be propogated up to the next enclosing exception handler.

 try a = catch (Right `liftM` a) (return . Left)

mapException :: ( Exception e1, Exception e2) => (e1 -> e2) -> a -> a Source #

This function maps one exception into another as proposed in the paper "A semantics for imprecise exceptions".

handleJust :: Exception e => (e -> Maybe b) -> (b -> IO a) -> IO a -> IO a Source #

A version of catchJust with the arguments swapped around (see handle ).

handle :: Exception e => (e -> IO a) -> IO a -> IO a Source #

A version of catch with the arguments swapped around; useful in situations where the code for the handler is shorter. For example:

  do handle (\NonTermination -> exitWith (ExitFailure 1)) $
     ...

catchJust Source #

Arguments

:: Exception e
=> (e -> Maybe b)

Predicate to select exceptions

-> IO a

Computation to run

-> (b -> IO a)

Handler

-> IO a

The function catchJust is like catch , but it takes an extra argument which is an exception predicate , a function which selects which type of exceptions we're interested in.

catchJust (\e -> if isDoesNotExistErrorType (ioeGetErrorType e) then Just () else Nothing)
          (readFile f)
          (\_ -> do hPutStrLn stderr ("No such file: " ++ show f)
                    return "")

Any other exceptions which are not matched by the predicate are re-raised, and may be caught by an enclosing catch , catchJust , etc.

newtype RecSelError Source #

A record selector was applied to a constructor without the appropriate field. This can only happen with a datatype with multiple constructors, where some fields are in one constructor but not another. The String gives information about the source location of the record selector.

newtype RecUpdError Source #

A record update was performed on a constructor without the appropriate field. This can only happen with a datatype with multiple constructors, where some fields are in one constructor but not another. The String gives information about the source location of the record update.

newtype NoMethodError Source #

A class method without a definition (neither a default definition, nor a definition in the appropriate instance) was called. The String gives information about which method it was.

newtype TypeError Source #

An expression that didn't typecheck during compile time was called. This is only possible with -fdefer-type-errors. The String gives details about the failed type check.

Since: base-4.9.0.0

data NonTermination Source #

Thrown when the runtime system detects that the computation is guaranteed not to terminate. Note that there is no guarantee that the runtime system will notice whether any given computation is guaranteed to terminate or not.

Constructors

NonTermination

catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a Source #

Exception handling within STM actions.

catchSTM m f catches any exception thrown by m using throwSTM , using the function f to handle the exception. If an exception is thrown, any changes made by m are rolled back, but changes prior to m persist.

throwSTM :: Exception e => e -> STM a Source #

A variant of throw that can only be used within the STM monad.

Throwing an exception in STM aborts the transaction and propagates the exception. If the exception is caught via catchSTM , only the changes enclosed by the catch are rolled back; changes made outside of catchSTM persist.

If the exception is not caught inside of the STM , it is re-thrown by atomically , and the entire STM is rolled back.

Although throwSTM has a type that is an instance of the type of throw , the two functions are subtly different:

throw e    `seq` x  ===> throw e
throwSTM e `seq` x  ===> x

The first example will cause the exception e to be raised, whereas the second one won't. In fact, throwSTM will only cause an exception to be raised when it is used within the STM monad. The throwSTM variant should be used in preference to throw to raise an exception within the STM monad because it guarantees ordering with respect to other STM operations, whereas throw does not.

orElse :: STM a -> STM a -> STM a Source #

Compose two alternative STM actions (GHC only).

If the first action completes without retrying then it forms the result of the orElse . Otherwise, if the first action retries, then the second action is tried in its place. If both actions retry then the orElse as a whole retries.

retry :: STM a Source #

Retry execution of the current memory transaction because it has seen values in TVar s which mean that it should not continue (e.g. the TVar s represent a shared buffer that is now empty). The implementation may block the thread until one of the TVar s that it has read from has been updated. (GHC only)

atomically :: STM a -> IO a Source #

Perform a series of STM actions atomically.

Using atomically inside an unsafePerformIO or unsafeInterleaveIO subverts some of guarantees that STM provides. It makes it possible to run a transaction inside of another transaction, depending on when the thunk is evaluated. If a nested transaction is attempted, an exception is thrown by the runtime. It is possible to safely use atomically inside unsafePerformIO or unsafeInterleaveIO , but the typechecker does not rule out programs that may attempt nested transactions, meaning that the programmer must take special care to prevent these.

However, there are functions for creating transactional variables that can always be safely called in unsafePerformIO . See: newTVarIO , newTChanIO , newBroadcastTChanIO , newTQueueIO , newTBQueueIO , and newTMVarIO .

Using unsafePerformIO inside of atomically is also dangerous but for different reasons. See unsafeIOToSTM for more on this.

mkWeakThreadId :: ThreadId -> IO ( Weak ThreadId ) Source #

Make a weak pointer to a ThreadId . It can be important to do this if you want to hold a reference to a ThreadId while still allowing the thread to receive the BlockedIndefinitely family of exceptions (e.g. BlockedIndefinitelyOnMVar ). Holding a normal ThreadId reference will prevent the delivery of BlockedIndefinitely exceptions because the reference could be used as the target of throwTo at any time, which would unblock the thread.

Holding a Weak ThreadId , on the other hand, will not prevent the thread from receiving BlockedIndefinitely exceptions. It is still possible to throw an exception to a Weak ThreadId , but the caller must use deRefWeak first to determine whether the thread still exists.

Since: base-4.6.0.0

threadCapability :: ThreadId -> IO ( Int , Bool ) Source #

Returns the number of the capability on which the thread is currently running, and a boolean indicating whether the thread is locked to that capability or not. A thread is locked to a capability if it was created with forkOn .

Since: base-4.4.0.0

yield :: IO () Source #

The yield action allows (forces, in a co-operative multitasking implementation) a context-switch to any other currently runnable threads (if any), and is occasionally useful when implementing concurrency abstractions.

myThreadId :: IO ThreadId Source #

Returns the ThreadId of the calling thread (GHC only).

killThread :: ThreadId -> IO () Source #

killThread raises the ThreadKilled exception in the given thread (GHC only).

killThread tid = throwTo tid ThreadKilled

setNumCapabilities :: Int -> IO () Source #

Set the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. The number passed to forkOn is interpreted modulo this value. The initial value is given by the +RTS -N runtime flag.

This is also the number of threads that will participate in parallel garbage collection. It is strongly recommended that the number of capabilities is not set larger than the number of physical processor cores, and it may often be beneficial to leave one or more cores free to avoid contention with other processes in the machine.

Since: base-4.5.0.0

getNumCapabilities :: IO Int Source #

Returns the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. To change this value, use setNumCapabilities .

Since: base-4.4.0.0

data STM a Source #

A monad supporting atomic memory transactions.

Instances

Instances details
Monad STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

fmap :: (a -> b) -> STM a -> STM b Source #

(<$) :: a -> STM b -> STM a Source #

Applicative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Alternative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

MonadPlus STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

RandomGen g => StatefulGen ( TGenM g) STM

Since: random-1.2.1

Instance details

Defined in System.Random.Stateful

RandomGen g => FrozenGen ( TGen g) STM

Since: random-1.2.1

Instance details

Defined in System.Random.Stateful

Associated Types

type MutableGen ( TGen g) STM = (g :: Type ) Source #

RandomGen r => RandomGenM ( TGenM r) r STM
Instance details

Defined in System.Random.Stateful

Methods

applyRandomGenM :: (r -> (a, r)) -> TGenM r -> STM a Source #

type MutableGen ( TGen g) STM
Instance details

Defined in System.Random.Stateful

data Deadlock Source #

There are no runnable threads, so the program is deadlocked. The Deadlock exception is raised in the main thread only.

Constructors

Deadlock

newtype CompactionFailed Source #

Compaction found an object that cannot be compacted. Functions cannot be compacted, nor can mutable objects or pinned objects. See compact .

Since: base-4.10.0.0

data AsyncException Source #

Asynchronous exceptions.

Constructors

StackOverflow

The current thread's stack exceeded its limit. Since an exception has been raised, the thread's stack will certainly be below its limit again, but the programmer should take remedial action immediately.

HeapOverflow

The program's heap is reaching its limit, and the program should take action to reduce the amount of live data it has. Notes:

  • It is undefined which thread receives this exception. GHC currently throws this to the same thread that receives UserInterrupt , but this may change in the future.
  • The GHC RTS currently can only recover from heap overflow if it detects that an explicit memory limit (set via RTS flags). has been exceeded. Currently, failure to allocate memory from the operating system results in immediate termination of the program.
ThreadKilled

This exception is raised by another thread calling killThread , or by the system if it needs to terminate the thread for some reason.

UserInterrupt

This exception is raised by default in the main thread of the program when the user requests to terminate the program via the usual mechanism(s) (e.g. Control-C in the console).

data ArrayException Source #

Exceptions generated by array operations

Constructors

IndexOutOfBounds String

An attempt was made to index an array outside its declared bounds.

UndefinedElement String

An attempt was made to evaluate an element of an array that had not been initialized.

data ExitCode Source #

Defines the exit codes that a program can return.

Constructors

ExitSuccess

indicates successful termination;

ExitFailure Int

indicates program failure with an exit code. The exact interpretation of the code is operating-system dependent. In particular, some values may be prohibited (e.g. 0 on a POSIX-compliant system).

Instances

Instances details
Eq ExitCode
Instance details

Defined in GHC.IO.Exception

Ord ExitCode
Instance details

Defined in GHC.IO.Exception

Read ExitCode
Instance details

Defined in GHC.IO.Exception

Show ExitCode
Instance details

Defined in GHC.IO.Exception

Generic ExitCode
Instance details

Defined in GHC.IO.Exception

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

NFData ExitCode

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

type Rep ExitCode
Instance details

Defined in GHC.IO.Exception

stdout :: Handle Source #

A handle managing output to the Haskell program's standard output channel.

evaluate :: a -> IO a Source #

Evaluate the argument to weak head normal form.

evaluate is typically used to uncover any exceptions that a lazy value may contain, and possibly handle them.

evaluate only evaluates to weak head normal form . If deeper evaluation is needed, the force function from Control.DeepSeq may be handy:

evaluate $ force x

There is a subtle difference between evaluate x and return $! x , analogous to the difference between throwIO and throw . If the lazy value x throws an exception, return $! x will fail to return an IO action and will throw an exception instead. evaluate x , on the other hand, always produces an IO action; that action will throw an exception upon execution iff x throws an exception upon evaluation .

The practical implication of this difference is that due to the imprecise exceptions semantics,

(return $! error "foo") >> error "bar"

may throw either "foo" or "bar" , depending on the optimizations performed by the compiler. On the other hand,

evaluate (error "foo") >> error "bar"

is guaranteed to throw "foo" .

The rule of thumb is to use evaluate to force or handle exceptions in lazy values. If, on the other hand, you are forcing a lazy value for efficiency reasons only and do not care about exceptions, you may use return $! x .

uninterruptibleMask :: (( forall a. IO a -> IO a) -> IO b) -> IO b Source #

Like mask , but the masked computation is not interruptible (see Control.Exception ). THIS SHOULD BE USED WITH GREAT CARE, because if a thread executing in uninterruptibleMask blocks for any reason, then the thread (and possibly the program, if this is the main thread) will be unresponsive and unkillable. This function should only be necessary if you need to mask exceptions around an interruptible operation, and you can guarantee that the interruptible operation will only block for a short period of time.

uninterruptibleMask_ :: IO a -> IO a Source #

Like uninterruptibleMask , but does not pass a restore action to the argument.

mask :: (( forall a. IO a -> IO a) -> IO b) -> IO b Source #

Executes an IO computation with asynchronous exceptions masked . That is, any thread which attempts to raise an exception in the current thread with throwTo will be blocked until asynchronous exceptions are unmasked again.

The argument passed to mask is a function that takes as its argument another function, which can be used to restore the prevailing masking state within the context of the masked computation. For example, a common way to use mask is to protect the acquisition of a resource:

mask $ \restore -> do
    x <- acquire
    restore (do_something_with x) `onException` release
    release

This code guarantees that acquire is paired with release , by masking asynchronous exceptions for the critical parts. (Rather than write this code yourself, it would be better to use bracket which abstracts the general pattern).

Note that the restore action passed to the argument to mask does not necessarily unmask asynchronous exceptions, it just restores the masking state to that of the enclosing context. Thus if asynchronous exceptions are already masked, mask cannot be used to unmask exceptions again. This is so that if you call a library function with exceptions masked, you can be sure that the library call will not be able to unmask exceptions again. If you are writing library code and need to use asynchronous exceptions, the only way is to create a new thread; see forkIOWithUnmask .

Asynchronous exceptions may still be received while in the masked state if the masked thread blocks in certain ways; see Control.Exception .

Threads created by forkIO inherit the MaskingState from the parent; that is, to start a thread in the MaskedInterruptible state, use mask_ $ forkIO ... . This is particularly useful if you need to establish an exception handler in the forked thread before any asynchronous exceptions are received. To create a new thread in an unmasked state use forkIOWithUnmask .

mask_ :: IO a -> IO a Source #

Like mask , but does not pass a restore action to the argument.

interruptible :: IO a -> IO a Source #

Allow asynchronous exceptions to be raised even inside mask , making the operation interruptible (see the discussion of "Interruptible operations" in Exception ).

When called outside mask , or inside uninterruptibleMask , this function has no effect.

Since: base-4.9.0.0

catch Source #

Arguments

:: Exception e
=> IO a

The computation to run

-> (e -> IO a)

Handler to invoke if an exception is raised

-> IO a

This is the simplest of the exception-catching functions. It takes a single argument, runs it, and if an exception is raised the "handler" is executed, with the value of the exception passed as an argument. Otherwise, the result is returned as normal. For example:

  catch (readFile f)
        (\e -> do let err = show (e :: IOException)
                  hPutStr stderr ("Warning: Couldn't open " ++ f ++ ": " ++ err)
                  return "")

Note that we have to give a type signature to e , or the program will not typecheck as the type is ambiguous. While it is possible to catch exceptions of any type, see the section "Catching all exceptions" (in Control.Exception ) for an explanation of the problems with doing so.

For catching exceptions in pure (non- IO ) expressions, see the function evaluate .

Note that due to Haskell's unspecified evaluation order, an expression may throw one of several possible exceptions: consider the expression (error "urk") + (1 `div` 0) . Does the expression throw ErrorCall "urk" , or DivideByZero ?

The answer is "it might throw either"; the choice is non-deterministic. If you are catching any type of exception then you might catch either. If you are calling catch with type IO Int -> (ArithException -> IO Int) -> IO Int then the handler may get run with DivideByZero as an argument, or an ErrorCall "urk" exception may be propogated further up. If you call it again, you might get a the opposite behaviour. This is ok, because catch is an IO computation.

type FilePath = String Source #

File and directory names are values of type String , whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.

data MaskingState Source #

Describes the behaviour of a thread when an asynchronous exception is received.

Constructors

Unmasked

asynchronous exceptions are unmasked (the normal state)

MaskedInterruptible

the state during mask : asynchronous exceptions are masked, but blocking operations may still be interrupted

MaskedUninterruptible

the state during uninterruptibleMask : asynchronous exceptions are masked, and blocking operations may not be interrupted

prettySrcLoc :: SrcLoc -> String Source #

Pretty print a SrcLoc .

Since: base-4.9.0.0

class ( Typeable e, Show e) => Exception e where Source #

Any type that you wish to throw or catch as an exception must be an instance of the Exception class. The simplest case is a new exception type directly below the root:

data MyException = ThisException | ThatException
    deriving Show

instance Exception MyException

The default method definitions in the Exception class do what we need in this case. You can now throw and catch ThisException and ThatException as exceptions:

*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
Caught ThisException

In more complicated examples, you may wish to define a whole hierarchy of exceptions:

---------------------------------------------------------------------
-- Make the root exception type for all the exceptions in a compiler

data SomeCompilerException = forall e . Exception e => SomeCompilerException e

instance Show SomeCompilerException where
    show (SomeCompilerException e) = show e

instance Exception SomeCompilerException

compilerExceptionToException :: Exception e => e -> SomeException
compilerExceptionToException = toException . SomeCompilerException

compilerExceptionFromException :: Exception e => SomeException -> Maybe e
compilerExceptionFromException x = do
    SomeCompilerException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make a subhierarchy for exceptions in the frontend of the compiler

data SomeFrontendException = forall e . Exception e => SomeFrontendException e

instance Show SomeFrontendException where
    show (SomeFrontendException e) = show e

instance Exception SomeFrontendException where
    toException = compilerExceptionToException
    fromException = compilerExceptionFromException

frontendExceptionToException :: Exception e => e -> SomeException
frontendExceptionToException = toException . SomeFrontendException

frontendExceptionFromException :: Exception e => SomeException -> Maybe e
frontendExceptionFromException x = do
    SomeFrontendException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make an exception type for a particular frontend compiler exception

data MismatchedParentheses = MismatchedParentheses
    deriving Show

instance Exception MismatchedParentheses where
    toException   = frontendExceptionToException
    fromException = frontendExceptionFromException

We can now catch a MismatchedParentheses exception as MismatchedParentheses , SomeFrontendException or SomeCompilerException , but not other types, e.g. IOException :

*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
*** Exception: MismatchedParentheses

Minimal complete definition

Nothing

Methods

toException :: e -> SomeException Source #

fromException :: SomeException -> Maybe e Source #

displayException :: e -> String Source #

Render this exception value in a human-friendly manner.

Default implementation: show .

Since: base-4.8.0.0

Instances

Instances details
Exception AsyncCancelled
Instance details

Defined in Control.Concurrent.Async

Exception ExceptionInLinkedThread
Instance details

Defined in Control.Concurrent.Async

Exception Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Exception PatternMatchFail

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Exception NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NestedAtomically

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AllocationLimitExceeded

Since: base-4.8.0.0

Instance details

Defined in GHC.IO.Exception

Exception CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Exception AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception AsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Exception ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Exception FatalError
Instance details

Defined in Protolude.Panic

Exception UnicodeException
Instance details

Defined in Data.Text.Encoding.Error

gcast :: forall k (a :: k) (b :: k) c. ( Typeable a, Typeable b) => c a -> Maybe (c b) Source #

A flexible variation parameterised in a type constructor

eqT :: forall k (a :: k) (b :: k). ( Typeable a, Typeable b) => Maybe (a :~: b) Source #

Extract a witness of equality of two types

Since: base-4.7.0.0

cast :: ( Typeable a, Typeable b) => a -> Maybe b Source #

The type-safe cast operation

typeRep :: forall k proxy (a :: k). Typeable a => proxy a -> TypeRep Source #

Takes a value of type a and returns a concrete representation of that type.

Since: base-4.7.0.0

typeOf :: Typeable a => a -> TypeRep Source #

Observe a type representation for the type of a value.

type TypeRep = SomeTypeRep Source #

A quantified type representation.

newtype Const a (b :: k) Source #

The Const functor.

Constructors

Const

Fields

Instances

Instances details
Generic1 ( Const a :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Associated Types

type Rep1 ( Const a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k0). Const a a0 -> Rep1 ( Const a) a0 Source #

to1 :: forall (a0 :: k0). Rep1 ( Const a) a0 -> Const a a0 Source #

Unbox a => Vector Vector ( Const a b)
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector ( Const a b)
Instance details

Defined in Data.Vector.Unboxed.Base

Bifunctor ( Const :: Type -> Type -> Type )

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d Source #

first :: (a -> b) -> Const a c -> Const b c Source #

second :: (b -> c) -> Const a b -> Const a c Source #

Bifoldable ( Const :: Type -> Type -> Type )

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => Const m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Const a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Const a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Const a b -> c Source #

NFData2 ( Const :: Type -> Type -> Type )

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Const a b -> () Source #

Hashable2 ( Const :: Type -> Type -> Type )
Instance details

Defined in Data.Hashable.Class

Functor ( Const m :: Type -> Type )

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

fmap :: (a -> b) -> Const m a -> Const m b Source #

(<$) :: a -> Const m b -> Const m a Source #

Monoid m => Applicative ( Const m :: Type -> Type )

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Foldable ( Const m :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Functor.Const

Traversable ( Const m :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Const m a -> f ( Const m b) Source #

sequenceA :: Applicative f => Const m (f a) -> f ( Const m a) Source #

mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 ( Const m b) Source #

sequence :: Monad m0 => Const m (m0 a) -> m0 ( Const m a) Source #

NFData a => NFData1 ( Const a :: Type -> Type )

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Const a a0 -> () Source #

Hashable a => Hashable1 ( Const a :: Type -> Type )
Instance details

Defined in Data.Hashable.Class

Bounded a => Bounded ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Enum a => Enum ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Eq a => Eq ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Floating a => Floating ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Fractional a => Fractional ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Integral a => Integral ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Num a => Num ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Ord a => Ord ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Read a => Read ( Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Real a => Real ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

RealFloat a => RealFloat ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

RealFrac a => RealFrac ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Show a => Show ( Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Ix a => Ix ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

IsString a => IsString ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Generic ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Associated Types

type Rep ( Const a b) :: Type -> Type Source #

Semigroup a => Semigroup ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Monoid a => Monoid ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Hashable a => Hashable ( Const a b)
Instance details

Defined in Data.Hashable.Class

Storable a => Storable ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Bits a => Bits ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

FiniteBits a => FiniteBits ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

NFData a => NFData ( Const a b)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Const a b -> () Source #

Prim a => Prim ( Const a b)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox ( Const a b)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 ( Const a :: k -> Type )
Instance details

Defined in Data.Functor.Const

type Rep1 ( Const a :: k -> Type ) = D1 (' MetaData "Const" "Data.Functor.Const" "base" ' True ) ( C1 (' MetaCons "Const" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getConst") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
newtype MVector s ( Const a b)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep ( Const a b)
Instance details

Defined in Data.Functor.Const

type Rep ( Const a b) = D1 (' MetaData "Const" "Data.Functor.Const" "base" ' True ) ( C1 (' MetaCons "Const" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getConst") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
newtype Vector ( Const a b)
Instance details

Defined in Data.Vector.Unboxed.Base

find :: Foldable t => (a -> Bool ) -> t a -> Maybe a Source #

The find function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Nothing if there is no such element.

notElem :: ( Foldable t, Eq a) => a -> t a -> Bool infix 4 Source #

notElem is the negation of elem .

minimumBy :: Foldable t => (a -> a -> Ordering ) -> t a -> a Source #

The least element of a non-empty structure with respect to the given comparison function.

maximumBy :: Foldable t => (a -> a -> Ordering ) -> t a -> a Source #

The largest element of a non-empty structure with respect to the given comparison function.

all :: Foldable t => (a -> Bool ) -> t a -> Bool Source #

Determines whether all elements of the structure satisfy the predicate.

any :: Foldable t => (a -> Bool ) -> t a -> Bool Source #

Determines whether any element of the structure satisfies the predicate.

or :: Foldable t => t Bool -> Bool Source #

or returns the disjunction of a container of Bools. For the result to be False , the container must be finite; True , however, results from a True value finitely far from the left end.

and :: Foldable t => t Bool -> Bool Source #

and returns the conjunction of a container of Bools. For the result to be True , the container must be finite; False , however, results from a False value finitely far from the left end.

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] Source #

Map a function over all the elements of a container and concatenate the resulting lists.

concat :: Foldable t => t [a] -> [a] Source #

The concatenation of all the elements of a container of lists.

msum :: ( Foldable t, MonadPlus m) => t (m a) -> m a Source #

The sum of a collection of actions, generalizing concat . As of base 4.8.0.0, msum is just asum , specialized to MonadPlus .

asum :: ( Foldable t, Alternative f) => t (f a) -> f a Source #

The sum of a collection of actions, generalizing concat .

>>> asum [Just "Hello", Nothing, Just "World"]
Just "Hello"

sequence_ :: ( Foldable t, Monad m) => t (m a) -> m () Source #

Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence .

As of base 4.8.0.0, sequence_ is just sequenceA_ , specialized to Monad .

sequenceA_ :: ( Foldable t, Applicative f) => t (f a) -> f () Source #

Evaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequenceA .

for_ :: ( Foldable t, Applicative f) => t a -> (a -> f b) -> f () Source #

for_ is traverse_ with its arguments flipped. For a version that doesn't ignore the results see for .

>>> for_ [1..4] print
1
2
3
4

traverse_ :: ( Foldable t, Applicative f) => (a -> f b) -> t a -> f () Source #

Map each element of a structure to an action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see traverse .

foldlM :: ( Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b Source #

Monadic fold over the elements of a structure, associating to the left, i.e. from left to right.

foldrM :: ( Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b Source #

Monadic fold over the elements of a structure, associating to the right, i.e. from right to left.

newtype First a Source #

Maybe monoid returning the leftmost non-Nothing value.

First a is isomorphic to Alt Maybe a , but precedes it historically.

>>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world"))
Just "hello"

Use of this type is discouraged. Note the following equivalence:

Data.Monoid.First x === Maybe (Data.Semigroup.First x)

In addition to being equivalent in the structural sense, the two also have Monoid instances that behave the same. This type will be marked deprecated in GHC 8.8, and removed in GHC 8.10. Users are advised to use the variant from Data.Semigroup and wrap it in Maybe .

Constructors

First

Instances

Instances details
Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

NFData1 First

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> First a -> () Source #

Eq a => Eq ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Ord a => Ord ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Generic ( First a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep ( First a) :: Type -> Type Source #

Semigroup ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Monoid ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

NFData a => NFData ( First a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () Source #

Generic1 First

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep1 First :: k -> Type Source #

Methods

from1 :: forall (a :: k). First a -> Rep1 First a Source #

to1 :: forall (a :: k). Rep1 First a -> First a Source #

type Rep ( First a)
Instance details

Defined in Data.Monoid

type Rep1 First
Instance details

Defined in Data.Monoid

newtype Last a Source #

Maybe monoid returning the rightmost non-Nothing value.

Last a is isomorphic to Dual ( First a) , and thus to Dual ( Alt Maybe a)

>>> getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world"))
Just "world"

Use of this type is discouraged. Note the following equivalence:

Data.Monoid.Last x === Maybe (Data.Semigroup.Last x)

In addition to being equivalent in the structural sense, the two also have Monoid instances that behave the same. This type will be marked deprecated in GHC 8.8, and removed in GHC 8.10. Users are advised to use the variant from Data.Semigroup and wrap it in Maybe .

Constructors

Last

Fields

Instances

Instances details
Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Foldable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Traversable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

NFData1 Last

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Last a -> () Source #

Eq a => Eq ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Ord a => Ord ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Generic ( Last a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep ( Last a) :: Type -> Type Source #

Semigroup ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Monoid ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

NFData a => NFData ( Last a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () Source #

Generic1 Last

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep1 Last :: k -> Type Source #

Methods

from1 :: forall (a :: k). Last a -> Rep1 Last a Source #

to1 :: forall (a :: k). Rep1 Last a -> Last a Source #

type Rep ( Last a)
Instance details

Defined in Data.Monoid

type Rep1 Last
Instance details

Defined in Data.Monoid

newtype Ap (f :: k -> Type ) (a :: k) Source #

This data type witnesses the lifting of a Monoid into an Applicative pointwise.

Since: base-4.12.0.0

Constructors

Ap

Fields

Instances

Instances details
Generic1 ( Ap f :: k -> Type )

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep1 ( Ap f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Ap f a -> Rep1 ( Ap f) a Source #

to1 :: forall (a :: k0). Rep1 ( Ap f) a -> Ap f a Source #

Monad f => Monad ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Functor f => Functor ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Ap f a -> Ap f b Source #

(<$) :: a -> Ap f b -> Ap f a Source #

MonadFail f => MonadFail ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Applicative f => Applicative ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a Source #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b Source #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c Source #

(*>) :: Ap f a -> Ap f b -> Ap f b Source #

(<*) :: Ap f a -> Ap f b -> Ap f a Source #

Foldable f => Foldable ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Ap f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldr :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldl :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldr1 :: (a -> a -> a) -> Ap f a -> a Source #

foldl1 :: (a -> a -> a) -> Ap f a -> a Source #

toList :: Ap f a -> [a] Source #

null :: Ap f a -> Bool Source #

length :: Ap f a -> Int Source #

elem :: Eq a => a -> Ap f a -> Bool Source #

maximum :: Ord a => Ap f a -> a Source #

minimum :: Ord a => Ap f a -> a Source #

sum :: Num a => Ap f a -> a Source #

product :: Num a => Ap f a -> a Source #

Traversable f => Traversable ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Ap f a -> f0 ( Ap f b) Source #

sequenceA :: Applicative f0 => Ap f (f0 a) -> f0 ( Ap f a) Source #

mapM :: Monad m => (a -> m b) -> Ap f a -> m ( Ap f b) Source #

sequence :: Monad m => Ap f (m a) -> m ( Ap f a) Source #

Alternative f => Alternative ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

MonadPlus f => MonadPlus ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

( Applicative f, Bounded a) => Bounded ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Enum (f a) => Enum ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Eq (f a) => Eq ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

( Applicative f, Num a) => Num ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Ord (f a) => Ord ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Read (f a) => Read ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Show (f a) => Show ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Generic ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Associated Types

type Rep ( Ap f a) :: Type -> Type Source #

( Applicative f, Semigroup a) => Semigroup ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

( Applicative f, Monoid a) => Monoid ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

type Rep1 ( Ap f :: k -> Type )
Instance details

Defined in Data.Monoid

type Rep ( Ap f a)
Instance details

Defined in Data.Monoid

stimesMonoid :: ( Integral b, Monoid a) => b -> a -> a Source #

This is a valid definition of stimes for a Monoid .

Unlike the default definition of stimes , it is defined for 0 and so it should be preferred where possible.

stimesIdempotent :: Integral b => b -> a -> a Source #

This is a valid definition of stimes for an idempotent Semigroup .

When x <> x = x , this definition should be preferred, because it works in \(\mathcal{O}(1)\) rather than \(\mathcal{O}(\log n)\) .

newtype Dual a Source #

The dual of a Monoid , obtained by swapping the arguments of mappend .

>>> getDual (mappend (Dual "Hello") (Dual "World"))
"WorldHello"

Constructors

Dual

Fields

Instances

Instances details
Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

NFData1 Dual

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Dual a -> () Source #

Unbox a => Vector Vector ( Dual a)
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector ( Dual a)
Instance details

Defined in Data.Vector.Unboxed.Base

Bounded a => Bounded ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord a => Ord ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic ( Dual a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Dual a) :: Type -> Type Source #

Semigroup a => Semigroup ( Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Monoid a => Monoid ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData a => NFData ( Dual a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Dual a -> () Source #

Prim a => Prim ( Dual a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox ( Dual a)
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 Dual

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Dual :: k -> Type Source #

Methods

from1 :: forall (a :: k). Dual a -> Rep1 Dual a Source #

to1 :: forall (a :: k). Rep1 Dual a -> Dual a Source #

newtype MVector s ( Dual a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep ( Dual a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Dual a) = D1 (' MetaData "Dual" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Dual" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getDual") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
newtype Vector ( Dual a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Dual
Instance details

Defined in Data.Semigroup.Internal

newtype Endo a Source #

The monoid of endomorphisms under composition.

>>> let computation = Endo ("Hello, " ++) <> Endo (++ "!")
>>> appEndo computation "Haskell"
"Hello, Haskell!"

Constructors

Endo

Fields

Instances

Instances details
Generic ( Endo a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Endo a) :: Type -> Type Source #

Semigroup ( Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Monoid ( Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

type Rep ( Endo a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Endo a) = D1 (' MetaData "Endo" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Endo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "appEndo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (a -> a))))

newtype All Source #

Boolean monoid under conjunction ( && ).

>>> getAll (All True <> mempty <> All False)
False
>>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8]))
False

Constructors

All

Instances

Instances details
Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic All

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type Source #

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () Source #

Unbox All
Instance details

Defined in Data.Vector.Unboxed.Base

Vector Vector All
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector All
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep All
Instance details

Defined in Data.Semigroup.Internal

newtype Vector All
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s All
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Any Source #

Boolean monoid under disjunction ( || ).

>>> getAny (Any True <> mempty <> Any False)
True
>>> getAny (mconcat (map (\x -> Any (even x)) [2,4,6,7,8]))
True

Constructors

Any

Instances

Instances details
Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic Any

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type Source #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () Source #

Unbox Any
Instance details

Defined in Data.Vector.Unboxed.Base

Vector Vector Any
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Any
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep Any
Instance details

Defined in Data.Semigroup.Internal

newtype Vector Any
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Any
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Sum a Source #

Monoid under addition.

>>> getSum (Sum 1 <> Sum 2 <> mempty)
3

Constructors

Sum

Fields

Instances

Instances details
Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Sum a -> Sum b Source #

(<$) :: a -> Sum b -> Sum a Source #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

NFData1 Sum

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Sum a -> () Source #

Unbox a => Vector Vector ( Sum a)
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector ( Sum a)
Instance details

Defined in Data.Vector.Unboxed.Base

Bounded a => Bounded ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Num a => Num ( Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Ord a => Ord ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic ( Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Sum a) :: Type -> Type Source #

Num a => Semigroup ( Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Monoid ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData a => NFData ( Sum a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum a -> () Source #

Prim a => Prim ( Sum a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox ( Sum a)
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 Sum

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Sum :: k -> Type Source #

Methods

from1 :: forall (a :: k). Sum a -> Rep1 Sum a Source #

to1 :: forall (a :: k). Rep1 Sum a -> Sum a Source #

newtype MVector s ( Sum a)
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s ( Sum a) = MV_Sum ( MVector s a)
type Rep ( Sum a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Sum a) = D1 (' MetaData "Sum" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Sum" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getSum") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
newtype Vector ( Sum a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Sum
Instance details

Defined in Data.Semigroup.Internal

newtype Product a Source #

Monoid under multiplication.

>>> getProduct (Product 3 <> Product 4 <> mempty)
12

Constructors

Product

Fields

Instances

Instances details
Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

NFData1 Product

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Product a -> () Source #

Unbox a => Vector Vector ( Product a)
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector ( Product a)
Instance details

Defined in Data.Vector.Unboxed.Base

Bounded a => Bounded ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Num a => Num ( Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Ord a => Ord ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic ( Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Product a) :: Type -> Type Source #

Num a => Semigroup ( Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Monoid ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData a => NFData ( Product a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Prim a => Prim ( Product a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox ( Product a)
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 Product

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Product :: k -> Type Source #

newtype MVector s ( Product a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep ( Product a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Product a) = D1 (' MetaData "Product" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Product" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getProduct") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))
newtype Vector ( Product a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Product
Instance details

Defined in Data.Semigroup.Internal

type Rep1 Product = D1 (' MetaData "Product" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Product" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getProduct") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) Par1 ))

newtype Alt (f :: k -> Type ) (a :: k) Source #

Monoid under <|> .

>>> getAlt (Alt (Just 12) <> Alt (Just 24))
Just 12
>>> getAlt $ Alt Nothing <> Alt (Just 24)
Just 24

Since: base-4.8.0.0

Constructors

Alt

Fields

Instances

Instances details
Generic1 ( Alt f :: k -> Type )

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 ( Alt f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Alt f a -> Rep1 ( Alt f) a Source #

to1 :: forall (a :: k0). Rep1 ( Alt f) a -> Alt f a Source #

Unbox (f a) => Vector Vector ( Alt f a)
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox (f a) => MVector MVector ( Alt f a)
Instance details

Defined in Data.Vector.Unboxed.Base

Monad f => Monad ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor f => Functor ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Alt f a -> Alt f b Source #

(<$) :: a -> Alt f b -> Alt f a Source #

Applicative f => Applicative ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Foldable f => Foldable ( Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Alt f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Alt f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Alt f a -> m Source #

foldr :: (a -> b -> b) -> b -> Alt f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Alt f a -> b Source #

foldl :: (b -> a -> b) -> b -> Alt f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Alt f a -> b Source #

foldr1 :: (a -> a -> a) -> Alt f a -> a Source #

foldl1 :: (a -> a -> a) -> Alt f a -> a Source #

toList :: Alt f a -> [a] Source #

null :: Alt f a -> Bool Source #

length :: Alt f a -> Int Source #

elem :: Eq a => a -> Alt f a -> Bool Source #

maximum :: Ord a => Alt f a -> a Source #

minimum :: Ord a => Alt f a -> a Source #

sum :: Num a => Alt f a -> a Source #

product :: Num a => Alt f a -> a Source #

Traversable f => Traversable ( Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Alt f a -> f0 ( Alt f b) Source #

sequenceA :: Applicative f0 => Alt f (f0 a) -> f0 ( Alt f a) Source #

mapM :: Monad m => (a -> m b) -> Alt f a -> m ( Alt f b) Source #

sequence :: Monad m => Alt f (m a) -> m ( Alt f a) Source #

Alternative f => Alternative ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

MonadPlus f => MonadPlus ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Enum (f a) => Enum ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Eq (f a) => Eq ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Num (f a) => Num ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Ord (f a) => Ord ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Read (f a) => Read ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Show (f a) => Show ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Generic ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep ( Alt f a) :: Type -> Type Source #

Alternative f => Semigroup ( Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Alternative f => Monoid ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Unbox (f a) => Unbox ( Alt f a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 ( Alt f :: k -> Type )
Instance details

Defined in Data.Semigroup.Internal

type Rep1 ( Alt f :: k -> Type ) = D1 (' MetaData "Alt" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Alt" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getAlt") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec1 f)))
newtype MVector s ( Alt f a)
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s ( Alt f a) = MV_Alt ( MVector s (f a))
type Rep ( Alt f a)
Instance details

Defined in Data.Semigroup.Internal

type Rep ( Alt f a) = D1 (' MetaData "Alt" "Data.Semigroup.Internal" "base" ' True ) ( C1 (' MetaCons "Alt" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getAlt") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 (f a))))
newtype Vector ( Alt f a)
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector ( Alt f a) = V_Alt ( Vector (f a))

data Fixity Source #

Datatype to represent the fixity of a constructor. An infix | declaration directly corresponds to an application of Infix .

Instances

Instances details
Eq Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Generic Fixity

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

type Rep Fixity
Instance details

Defined in GHC.Generics

data FixityI Source #

This variant of Fixity appears at the type level.

Since: base-4.9.0.0

Instances

Instances details
SingKind FixityI

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep FixityI

Methods

fromSing :: forall (a :: FixityI ). Sing a -> DemoteRep FixityI

SingI ' PrefixI

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ' PrefixI

(SingI a, KnownNat n) => SingI (' InfixI a n :: FixityI )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing (' InfixI a n)

type DemoteRep FixityI
Instance details

Defined in GHC.Generics

type DemoteRep FixityI = Fixity
data Sing (a :: FixityI )
Instance details

Defined in GHC.Generics

data Sing (a :: FixityI ) where

data Associativity Source #

Datatype to represent the associativity of a constructor

Instances

Instances details
Bounded Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ix Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic Associativity

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

SingKind Associativity

Since: base-4.0.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep Associativity

Methods

fromSing :: forall (a :: Associativity ). Sing a -> DemoteRep Associativity

SingI ' LeftAssociative

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ' LeftAssociative

SingI ' RightAssociative

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ' RightAssociative

SingI ' NotAssociative

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ' NotAssociative

type Rep Associativity
Instance details

Defined in GHC.Generics

type Rep Associativity = D1 (' MetaData "Associativity" "GHC.Generics" "base" ' False ) ( C1 (' MetaCons "LeftAssociative" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "RightAssociative" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "NotAssociative" ' PrefixI ' False ) ( U1 :: Type -> Type )))
type DemoteRep Associativity
Instance details

Defined in GHC.Generics

data Sing (a :: Associativity )
Instance details

Defined in GHC.Generics

data Meta Source #

Datatype to represent metadata associated with a datatype ( MetaData ), constructor ( MetaCons ), or field selector ( MetaSel ).

  • In MetaData n m p nt , n is the datatype's name, m is the module in which the datatype is defined, p is the package in which the datatype is defined, and nt is 'True if the datatype is a newtype .
  • In MetaCons n f s , n is the constructor's name, f is its fixity, and s is 'True if the constructor contains record selectors.
  • In MetaSel mn su ss ds , if the field uses record syntax, then mn is Just the record name. Otherwise, mn is Nothing . su and ss are the field's unpackedness and strictness annotations, and ds is the strictness that GHC infers for the field.

Since: base-4.9.0.0

Instances

Instances details
( KnownSymbol n, SingI f, SingI r) => Constructor (' MetaCons n f r :: Meta )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

conName :: forall k1 t (f0 :: k1 -> Type ) (a :: k1). t (' MetaCons n f r) f0 a -> [ Char ] Source #

conFixity :: forall k1 t (f0 :: k1 -> Type ) (a :: k1). t (' MetaCons n f r) f0 a -> Fixity Source #

conIsRecord :: forall k1 t (f0 :: k1 -> Type ) (a :: k1). t (' MetaCons n f r) f0 a -> Bool Source #

( KnownSymbol n, KnownSymbol m, KnownSymbol p, SingI nt) => Datatype (' MetaData n m p nt :: Meta )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

datatypeName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaData n m p nt) f a -> [ Char ] Source #

moduleName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaData n m p nt) f a -> [ Char ] Source #

packageName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaData n m p nt) f a -> [ Char ] Source #

isNewtype :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaData n m p nt) f a -> Bool Source #

(SingI mn, SingI su, SingI ss, SingI ds) => Selector (' MetaSel mn su ss ds :: Meta )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

selName :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaSel mn su ss ds) f a -> [ Char ] Source #

selSourceUnpackedness :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaSel mn su ss ds) f a -> SourceUnpackedness Source #

selSourceStrictness :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaSel mn su ss ds) f a -> SourceStrictness Source #

selDecidedStrictness :: forall k1 t (f :: k1 -> Type ) (a :: k1). t (' MetaSel mn su ss ds) f a -> DecidedStrictness Source #

someSymbolVal :: String -> SomeSymbol Source #

Convert a string into an unknown type-level symbol.

Since: base-4.7.0.0

someNatVal :: Integer -> Maybe SomeNat Source #

Convert an integer into an unknown type-level natural.

Since: base-4.7.0.0

symbolVal :: forall (n :: Symbol ) proxy. KnownSymbol n => proxy n -> String Source #

Since: base-4.7.0.0

natVal :: forall (n :: Nat ) proxy. KnownNat n => proxy n -> Integer Source #

Since: base-4.7.0.0

unfoldr :: (b -> Maybe (a, b)) -> b -> [a] Source #

The unfoldr function is a `dual' to foldr : while foldr reduces a list to a summary value, unfoldr builds a list from a seed value. The function takes the element and returns Nothing if it is done producing the list or returns Just (a,b) , in which case, a is a prepended to the list and b is used as the next element in a recursive call. For example,

iterate f == unfoldr (\x -> Just (x, f x))

In some cases, unfoldr can undo a foldr operation:

unfoldr f' (foldr f z xs) == xs

if the following holds:

f' (f x y) = Just (x,y)
f' z       = Nothing

A simple use of unfoldr:

>>> unfoldr (\b -> if b == 0 then Nothing else Just (b, b-1)) 10
[10,9,8,7,6,5,4,3,2,1]

sortBy :: (a -> a -> Ordering ) -> [a] -> [a] Source #

The sortBy function is the non-overloaded version of sort .

>>> sortBy (\(a,_) (b,_) -> compare a b) [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]

sort :: Ord a => [a] -> [a] Source #

The sort function implements a stable sorting algorithm. It is a special case of sortBy , which allows the programmer to supply their own comparison function.

Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.

>>> sort [1,6,4,3,2,5]
[1,2,3,4,5,6]

permutations :: [a] -> [[a]] Source #

The permutations function returns the list of all permutations of the argument.

>>> permutations "abc"
["abc","bac","cba","bca","cab","acb"]

subsequences :: [a] -> [[a]] Source #

The subsequences function returns the list of all subsequences of the argument.

>>> subsequences "abc"
["","a","b","ab","c","ac","bc","abc"]

tails :: [a] -> [[a]] Source #

\(\mathcal{O}(n)\) . The tails function returns all final segments of the argument, longest first. For example,

>>> tails "abc"
["abc","bc","c",""]

Note that tails has the following strictness property: tails _|_ = _|_ : _|_

inits :: [a] -> [[a]] Source #

The inits function returns all initial segments of the argument, shortest first. For example,

>>> inits "abc"
["","a","ab","abc"]

Note that inits has the following strictness property: inits (xs ++ _|_) = inits xs ++ _|_

In particular, inits _|_ = [] : _|_

groupBy :: (a -> a -> Bool ) -> [a] -> [[a]] Source #

The groupBy function is the non-overloaded version of group .

group :: Eq a => [a] -> [[a]] Source #

The group function takes a list and returns a list of lists such that the concatenation of the result is equal to the argument. Moreover, each sublist in the result contains only equal elements. For example,

>>> group "Mississippi"
["M","i","ss","i","ss","i","pp","i"]

It is a special case of groupBy , which allows the programmer to supply their own equality test.

genericReplicate :: Integral i => i -> a -> [a] Source #

The genericReplicate function is an overloaded version of replicate , which accepts any Integral value as the number of repetitions to make.

genericSplitAt :: Integral i => i -> [a] -> ([a], [a]) Source #

The genericSplitAt function is an overloaded version of splitAt , which accepts any Integral value as the position at which to split.

genericDrop :: Integral i => i -> [a] -> [a] Source #

The genericDrop function is an overloaded version of drop , which accepts any Integral value as the number of elements to drop.

genericTake :: Integral i => i -> [a] -> [a] Source #

The genericTake function is an overloaded version of take , which accepts any Integral value as the number of elements to take.

genericLength :: Num i => [a] -> i Source #

\(\mathcal{O}(n)\) . The genericLength function is an overloaded version of length . In particular, instead of returning an Int , it returns any type which is an instance of Num . It is, however, less efficient than length .

>>> genericLength [1, 2, 3] :: Int
3
>>> genericLength [1, 2, 3] :: Float
3.0

transpose :: [[a]] -> [[a]] Source #

The transpose function transposes the rows and columns of its argument. For example,

>>> transpose [[1,2,3],[4,5,6]]
[[1,4],[2,5],[3,6]]

If some of the rows are shorter than the following rows, their elements are skipped:

>>> transpose [[10,11],[20],[],[30,31,32]]
[[10,20,30],[11,31],[32]]

intercalate :: [a] -> [[a]] -> [a] Source #

intercalate xs xss is equivalent to ( concat ( intersperse xs xss)) . It inserts the list xs in between the lists in xss and concatenates the result.

>>> intercalate ", " ["Lorem", "ipsum", "dolor"]
"Lorem, ipsum, dolor"

intersperse :: a -> [a] -> [a] Source #

\(\mathcal{O}(n)\) . The intersperse function takes an element and a list and `intersperses' that element between the elements of the list. For example,

>>> intersperse ',' "abcde"
"a,b,c,d,e"

isPrefixOf :: Eq a => [a] -> [a] -> Bool Source #

\(\mathcal{O}(\min(m,n))\) . The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.

>>> "Hello" `isPrefixOf` "Hello World!"
True
>>> "Hello" `isPrefixOf` "Wello Horld!"
False

isLetter :: Char -> Bool Source #

Selects alphabetic Unicode characters (lower-case, upper-case and title-case letters, plus letters of caseless scripts and modifiers letters). This function is equivalent to isAlpha .

This function returns True if its argument has one of the following GeneralCategory s, or False otherwise:

These classes are defined in the Unicode Character Database , part of the Unicode standard. The same document defines what is and is not a "Letter".

Examples

Expand

Basic usage:

>>> isLetter 'a'
True
>>> isLetter 'A'
True
>>> isLetter 'λ'
True
>>> isLetter '0'
False
>>> isLetter '%'
False
>>> isLetter '♥'
False
>>> isLetter '\31'
False

Ensure that isLetter and isAlpha are equivalent.

>>> let chars = [(chr 0)..]
>>> let letters = map isLetter chars
>>> let alphas = map isAlpha chars
>>> letters == alphas
True

digitToInt :: Char -> Int Source #

Convert a single digit Char to the corresponding Int . This function fails unless its argument satisfies isHexDigit , but recognises both upper- and lower-case hexadecimal digits (that is, '0' .. '9' , 'a' .. 'f' , 'A' .. 'F' ).

Examples

Expand

Characters '0' through '9' are converted properly to 0..9 :

>>> map digitToInt ['0'..'9']
[0,1,2,3,4,5,6,7,8,9]

Both upper- and lower-case 'A' through 'F' are converted as well, to 10..15 .

>>> map digitToInt ['a'..'f']
[10,11,12,13,14,15]
>>> map digitToInt ['A'..'F']
[10,11,12,13,14,15]

Anything else throws an exception:

>>> digitToInt 'G'
*** Exception: Char.digitToInt: not a digit 'G'
>>> digitToInt '♥'
*** Exception: Char.digitToInt: not a digit '\9829'

readMaybe :: Read a => String -> Maybe a Source #

Parse a string using the Read instance. Succeeds if there is exactly one valid result.

>>> readMaybe "123" :: Maybe Int
Just 123
>>> readMaybe "hello" :: Maybe Int
Nothing

Since: base-4.6.0.0

readEither :: Read a => String -> Either String a Source #

Parse a string using the Read instance. Succeeds if there is exactly one valid result. A Left value indicates a parse error.

>>> readEither "123" :: Either String Int
Right 123
>>> readEither "hello" :: Either String Int
Left "Prelude.read: no parse"

Since: base-4.6.0.0

reads :: Read a => ReadS a Source #

equivalent to readsPrec with a precedence of 0.

fromRight :: b -> Either a b -> b Source #

Return the contents of a Right -value or a default value otherwise.

Examples

Expand

Basic usage:

>>> fromRight 1 (Right 3)
3
>>> fromRight 1 (Left "foo")
1

Since: base-4.10.0.0

fromLeft :: a -> Either a b -> a Source #

Return the contents of a Left -value or a default value otherwise.

Examples

Expand

Basic usage:

>>> fromLeft 1 (Left 3)
3
>>> fromLeft 1 (Right "foo")
1

Since: base-4.10.0.0

isRight :: Either a b -> Bool Source #

Return True if the given value is a Right -value, False otherwise.

Examples

Expand

Basic usage:

>>> isRight (Left "foo")
False
>>> isRight (Right 3)
True

Assuming a Left value signifies some sort of error, we can use isRight to write a very simple reporting function that only outputs "SUCCESS" when a computation has succeeded.

This example shows how isRight might be used to avoid pattern matching when one does not care about the value contained in the constructor:

>>> import Control.Monad ( when )
>>> let report e = when (isRight e) $ putStrLn "SUCCESS"
>>> report (Left "parse error")
>>> report (Right 1)
SUCCESS

Since: base-4.7.0.0

isLeft :: Either a b -> Bool Source #

Return True if the given value is a Left -value, False otherwise.

Examples

Expand

Basic usage:

>>> isLeft (Left "foo")
True
>>> isLeft (Right 3)
False

Assuming a Left value signifies some sort of error, we can use isLeft to write a very simple error-reporting function that does absolutely nothing in the case of success, and outputs "ERROR" if any error occurred.

This example shows how isLeft might be used to avoid pattern matching when one does not care about the value contained in the constructor:

>>> import Control.Monad ( when )
>>> let report e = when (isLeft e) $ putStrLn "ERROR"
>>> report (Right 1)
>>> report (Left "parse error")
ERROR

Since: base-4.7.0.0

partitionEithers :: [ Either a b] -> ([a], [b]) Source #

Partitions a list of Either into two lists. All the Left elements are extracted, in order, to the first component of the output. Similarly the Right elements are extracted to the second component of the output.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> partitionEithers list
(["foo","bar","baz"],[3,7])

The pair returned by partitionEithers x should be the same pair as ( lefts x, rights x) :

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> partitionEithers list == (lefts list, rights list)
True

rights :: [ Either a b] -> [b] Source #

Extracts from a list of Either all the Right elements. All the Right elements are extracted in order.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> rights list
[3,7]

lefts :: [ Either a b] -> [a] Source #

Extracts from a list of Either all the Left elements. All the Left elements are extracted in order.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> lefts list
["foo","bar","baz"]

either :: (a -> c) -> (b -> c) -> Either a b -> c Source #

Case analysis for the Either type. If the value is Left a , apply the first function to a ; if it is Right b , apply the second function to b .

Examples

Expand

We create two values of type Either String Int , one using the Left constructor and another using the Right constructor. Then we apply "either" the length function (if we have a String ) or the "times-two" function (if we have an Int ):

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> either length (*2) s
3
>>> either length (*2) n
6

comparing :: Ord a => (b -> a) -> b -> b -> Ordering Source #

comparing p x y = compare (p x) (p y)

Useful combinator for use in conjunction with the xxxBy family of functions from Data.List , for example:

  ... sortBy (comparing fst) ...

newtype Down a Source #

The Down type allows you to reverse sort order conveniently. A value of type Down a contains a value of type a (represented as Down a ). If a has an Ord instance associated with it then comparing two values thus wrapped will give you the opposite of their normal sort order. This is particularly useful when sorting in generalised list comprehensions, as in: then sortWith by Down x

Since: base-4.6.0.0

Constructors

Down a

Instances

Instances details
Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

NFData1 Down

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Down a -> () Source #

Unbox a => Vector Vector ( Down a)
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector ( Down a)
Instance details

Defined in Data.Vector.Unboxed.Base

Bounded a => Bounded ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Enum a => Enum ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Eq a => Eq ( Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Floating a => Floating ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Fractional a => Fractional ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Integral a => Integral ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Num a => Num ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Ord a => Ord ( Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Read a => Read ( Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Real a => Real ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

RealFloat a => RealFloat ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

RealFrac a => RealFrac ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Show a => Show ( Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Ix a => Ix ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Generic ( Down a)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Down a) :: Type -> Type Source #

Semigroup a => Semigroup ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Monoid a => Monoid ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Storable a => Storable ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Bits a => Bits ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

FiniteBits a => FiniteBits ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

NFData a => NFData ( Down a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Down a -> () Source #

Prim a => Prim ( Down a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox ( Down a)
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 Down

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Down :: k -> Type Source #

Methods

from1 :: forall (a :: k). Down a -> Rep1 Down a Source #

to1 :: forall (a :: k). Rep1 Down a -> Down a Source #

newtype MVector s ( Down a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep ( Down a)
Instance details

Defined in GHC.Generics

newtype Vector ( Down a)
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Down
Instance details

Defined in GHC.Generics

data Proxy (t :: k) Source #

Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).

Historically, Proxy :: Proxy a is a safer alternative to the undefined :: a idiom.

>>> Proxy :: Proxy (Void, Int -> Int)
Proxy

Proxy can even hold types of higher kinds,

>>> Proxy :: Proxy Either
Proxy
>>> Proxy :: Proxy Functor
Proxy
>>> Proxy :: Proxy complicatedStructure
Proxy

Constructors

Proxy

Instances

Instances details
Generic1 ( Proxy :: k -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a Source #

to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a Source #

Monad ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Functor ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Applicative ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Foldable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Traversable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Alternative ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

MonadPlus ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

NFData1 ( Proxy :: Type -> Type )

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Proxy a -> () Source #

Hashable1 ( Proxy :: Type -> Type )
Instance details

Defined in Data.Hashable.Class

Bounded ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Enum ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Eq ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Ord ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Read ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Show ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Ix ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Generic ( Proxy t)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Proxy t) :: Type -> Type Source #

Semigroup ( Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Monoid ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Hashable ( Proxy a)
Instance details

Defined in Data.Hashable.Class

NFData ( Proxy a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Proxy a -> () Source #

type Rep1 ( Proxy :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( Proxy :: k -> Type ) = D1 (' MetaData "Proxy" "Data.Proxy" "base" ' False ) ( C1 (' MetaCons "Proxy" ' PrefixI ' False ) ( U1 :: k -> Type ))
type Rep ( Proxy t)
Instance details

Defined in GHC.Generics

type Rep ( Proxy t) = D1 (' MetaData "Proxy" "Data.Proxy" "base" ' False ) ( C1 (' MetaCons "Proxy" ' PrefixI ' False ) ( U1 :: Type -> Type ))

(>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c infixr 1 Source #

Left-to-right composition

(<<<) :: forall k cat (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c infixr 1 Source #

Right-to-left composition

class Category (cat :: k -> k -> Type ) where Source #

A class for categories. Instances should satisfy the laws

Right identity
f . id = f
Left identity
id . f = f
Associativity
f . (g . h) = (f . g) . h

Minimal complete definition

id , (.)

Methods

(.) :: forall (b :: k) (c :: k) (a :: k). cat b c -> cat a b -> cat a c infixr 9 Source #

morphism composition

Instances

Instances details
Category ( Coercion :: k -> k -> Type )

Since: base-4.7.0.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k0). Coercion a a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Coercion b c -> Coercion a b -> Coercion a c Source #

Category ( (:~:) :: k -> k -> Type )

Since: base-4.7.0.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k0). a :~: a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). (b :~: c) -> (a :~: b) -> a :~: c Source #

Category ( (:~~:) :: k -> k -> Type )

Since: base-4.10.0.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k0). a :~~: a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). (b :~~: c) -> (a :~~: b) -> a :~~: c Source #

( Category p, Category q) => Category ( Product p q :: k -> k -> Type )
Instance details

Defined in Data.Bifunctor.Product

Methods

id :: forall (a :: k0). Product p q a a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Product p q b c -> Product p q a b -> Product p q a c Source #

( Applicative f, Category p) => Category ( Tannen f p :: k -> k -> Type )
Instance details

Defined in Data.Bifunctor.Tannen

Methods

id :: forall (a :: k0). Tannen f p a a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Tannen f p b c -> Tannen f p a b -> Tannen f p a c Source #

Category Format

The same as (%). At present using Category has an import overhead, but one day it might be imported as standard.

Instance details

Defined in Formatting.Internal

Methods

id :: forall (a :: k). Format a a Source #

(.) :: forall (b :: k) (c :: k) (a :: k). Format b c -> Format a b -> Format a c Source #

Monad m => Category ( Kleisli m :: Type -> Type -> Type )

Since: base-3.0

Instance details

Defined in Control.Arrow

Methods

id :: forall (a :: k). Kleisli m a a Source #

(.) :: forall (b :: k) (c :: k) (a :: k). Kleisli m b c -> Kleisli m a b -> Kleisli m a c Source #

( Applicative f, Monad f) => Category ( WhenMissing f :: Type -> Type -> Type )

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

id :: forall (a :: k). WhenMissing f a a Source #

(.) :: forall (b :: k) (c :: k) (a :: k). WhenMissing f b c -> WhenMissing f a b -> WhenMissing f a c Source #

Category ((->) :: Type -> Type -> Type )

Since: base-3.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k). a -> a Source #

(.) :: forall (b :: k) (c :: k) (a :: k). (b -> c) -> (a -> b) -> a -> c Source #

( Monad f, Applicative f) => Category ( WhenMatched f x :: Type -> Type -> Type )

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

id :: forall (a :: k). WhenMatched f x a a Source #

(.) :: forall (b :: k) (c :: k) (a :: k). WhenMatched f x b c -> WhenMatched f x a b -> WhenMatched f x a c Source #

( Applicative f, Monad f) => Category ( WhenMissing f k :: Type -> Type -> Type )

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

id :: forall (a :: k0). WhenMissing f k a a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). WhenMissing f k b c -> WhenMissing f k a b -> WhenMissing f k a c Source #

( Monad f, Applicative f) => Category ( WhenMatched f k x :: Type -> Type -> Type )

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

id :: forall (a :: k0). WhenMatched f k x a a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). WhenMatched f k x b c -> WhenMatched f k x a b -> WhenMatched f k x a c Source #

repr :: forall k (a :: k) (b :: k). (a :~: b) -> Coercion a b Source #

Convert propositional (nominal) equality to representational equality

coerceWith :: Coercion a b -> a -> b Source #

Type-safe cast, using representational equality

data Coercion (a :: k) (b :: k) where Source #

Representational equality. If Coercion a b is inhabited by some terminating value, then the type a has the same underlying representation as the type b .

To use this equality in practice, pattern-match on the Coercion a b to get out the Coercible a b instance, and then use coerce to apply it.

Since: base-4.7.0.0

Constructors

Coercion :: forall k (a :: k) (b :: k). Coercible a b => Coercion a b

Instances

Instances details
Category ( Coercion :: k -> k -> Type )

Since: base-4.7.0.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k0). Coercion a a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Coercion b c -> Coercion a b -> Coercion a c Source #

TestCoercion ( Coercion a :: k -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Methods

testCoercion :: forall (a0 :: k0) (b :: k0). Coercion a a0 -> Coercion a b -> Maybe ( Coercion a0 b) Source #

Coercible a b => Bounded ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Coercible a b => Enum ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Eq ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Ord ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Coercible a b => Read ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Show ( Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

gcastWith :: forall k (a :: k) (b :: k) r. (a :~: b) -> (a ~ b => r) -> r Source #

Generalized form of type-safe cast using propositional equality

castWith :: (a :~: b) -> a -> b Source #

Type-safe cast, using propositional equality

trans :: forall k (a :: k) (b :: k) (c :: k). (a :~: b) -> (b :~: c) -> a :~: c Source #

Transitivity of equality

sym :: forall k (a :: k) (b :: k). (a :~: b) -> b :~: a Source #

Symmetry of equality

data (a :: k) :~: (b :: k) where infix 4 Source #

Propositional equality. If a :~: b is inhabited by some terminating value, then the type a is the same as the type b . To use this equality in practice, pattern-match on the a :~: b to get out the Refl constructor; in the body of the pattern-match, the compiler knows that a ~ b .

Since: base-4.7.0.0

Constructors

Refl :: forall k (a :: k). a :~: a

Instances

Instances details
Category ( (:~:) :: k -> k -> Type )

Since: base-4.7.0.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k0). a :~: a Source #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). (b :~: c) -> (a :~: b) -> a :~: c Source #

TestCoercion ( (:~:) a :: k -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Methods

testCoercion :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe ( Coercion a0 b) Source #

TestEquality ( (:~:) a :: k -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

testEquality :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (a0 :~: b) Source #

NFData2 ( (:~:) :: Type -> Type -> Type )

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a :~: b) -> () Source #

NFData1 ( (:~:) a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> (a :~: a0) -> () Source #

a ~ b => Bounded (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

a ~ b => Enum (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Eq (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Ord (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

a ~ b => Read (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Show (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

NFData (a :~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~: b) -> () Source #

type family (a :: k) == (b :: k) :: Bool where ... infix 4 Source #

A type family to compute Boolean equality.

Equations

(f a :: k2) == (g b :: k2) = (f == g) && (a == b)
(a :: k) == (a :: k) = ' True
(_1 :: k) == (_2 :: k) = ' False

data WordPtr Source #

An unsigned integral type that can be losslessly converted to and from Ptr . This type is also compatible with the C99 type uintptr_t , and can be marshalled to and from that type safely.

Instances

Instances details
Bounded WordPtr
Instance details

Defined in Foreign.Ptr

Enum WordPtr
Instance details

Defined in Foreign.Ptr

Eq WordPtr
Instance details

Defined in Foreign.Ptr

Integral WordPtr
Instance details

Defined in Foreign.Ptr

Num WordPtr
Instance details

Defined in Foreign.Ptr

Ord WordPtr
Instance details

Defined in Foreign.Ptr

Read WordPtr
Instance details

Defined in Foreign.Ptr

Real WordPtr
Instance details

Defined in Foreign.Ptr

Show WordPtr
Instance details

Defined in Foreign.Ptr

Hashable WordPtr
Instance details

Defined in Data.Hashable.Class

Storable WordPtr
Instance details

Defined in Foreign.Ptr

Bits WordPtr
Instance details

Defined in Foreign.Ptr

FiniteBits WordPtr
Instance details

Defined in Foreign.Ptr

Buildable WordPtr
Instance details

Defined in Formatting.Buildable

Prim WordPtr

Since: primitive-0.7.1.0

Instance details

Defined in Data.Primitive.Types

data IntPtr Source #

A signed integral type that can be losslessly converted to and from Ptr . This type is also compatible with the C99 type intptr_t , and can be marshalled to and from that type safely.

Instances

Instances details
Bounded IntPtr
Instance details

Defined in Foreign.Ptr

Enum IntPtr
Instance details

Defined in Foreign.Ptr

Eq IntPtr
Instance details

Defined in Foreign.Ptr

Integral IntPtr
Instance details

Defined in Foreign.Ptr

Num IntPtr
Instance details

Defined in Foreign.Ptr

Ord IntPtr
Instance details

Defined in Foreign.Ptr

Read IntPtr
Instance details

Defined in Foreign.Ptr

Real IntPtr
Instance details

Defined in Foreign.Ptr

Show IntPtr
Instance details

Defined in Foreign.Ptr

Hashable IntPtr
Instance details

Defined in Data.Hashable.Class

Storable IntPtr
Instance details

Defined in Foreign.Ptr

Bits IntPtr
Instance details

Defined in Foreign.Ptr

FiniteBits IntPtr
Instance details

Defined in Foreign.Ptr

Buildable IntPtr
Instance details

Defined in Formatting.Buildable

Prim IntPtr

Since: primitive-0.7.1.0

Instance details

Defined in Data.Primitive.Types

data IOMode Source #

Instances

Instances details
Enum IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Eq IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ord IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Read IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Show IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ix IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

class Storable a Source #

The member functions of this class facilitate writing values of primitive types to raw memory (which may have been allocated with the above mentioned routines) and reading values from blocks of raw memory. The class, furthermore, includes support for computing the storage requirements and alignment restrictions of storable types.

Memory addresses are represented as values of type Ptr a , for some a which is an instance of class Storable . The type argument to Ptr helps provide some valuable type safety in FFI code (you can't mix pointers of different types without an explicit cast), while helping the Haskell type system figure out which marshalling method is needed for a given pointer.

All marshalling between Haskell and a foreign language ultimately boils down to translating Haskell data structures into the binary representation of a corresponding data structure of the foreign language and vice versa. To code this marshalling in Haskell, it is necessary to manipulate primitive data types stored in unstructured memory blocks. The class Storable facilitates this manipulation on all types for which it is instantiated, which are the standard basic types of Haskell, the fixed size Int types ( Int8 , Int16 , Int32 , Int64 ), the fixed size Word types ( Word8 , Word16 , Word32 , Word64 ), StablePtr , all types from Foreign.C.Types , as well as Ptr .

Instances

Instances details
Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Char

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Double

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Float

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Int

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Int8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Int16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable ()

Since: base-4.9.0.0

Instance details

Defined in Foreign.Storable

Storable CDev
Instance details

Defined in System.Posix.Types

Storable CIno
Instance details

Defined in System.Posix.Types

Storable CMode
Instance details

Defined in System.Posix.Types

Storable COff
Instance details

Defined in System.Posix.Types

Storable CPid
Instance details

Defined in System.Posix.Types

Storable CSsize
Instance details

Defined in System.Posix.Types

Storable CGid
Instance details

Defined in System.Posix.Types

Storable CNlink
Instance details

Defined in System.Posix.Types

Storable CUid
Instance details

Defined in System.Posix.Types

Storable CCc
Instance details

Defined in System.Posix.Types

Storable CSpeed
Instance details

Defined in System.Posix.Types

Storable CTcflag
Instance details

Defined in System.Posix.Types

Storable CRLim
Instance details

Defined in System.Posix.Types

Storable CBlkSize
Instance details

Defined in System.Posix.Types

Storable CBlkCnt
Instance details

Defined in System.Posix.Types

Storable CClockId
Instance details

Defined in System.Posix.Types

Storable CFsBlkCnt
Instance details

Defined in System.Posix.Types

Storable CFsFilCnt
Instance details

Defined in System.Posix.Types

Storable CId
Instance details

Defined in System.Posix.Types

Storable CKey
Instance details

Defined in System.Posix.Types

Storable CSocklen
Instance details

Defined in System.Posix.Types

Storable CNfds
Instance details

Defined in System.Posix.Types

Storable Fd
Instance details

Defined in System.Posix.Types

Storable CChar
Instance details

Defined in Foreign.C.Types

Storable CSChar
Instance details

Defined in Foreign.C.Types

Storable CUChar
Instance details

Defined in Foreign.C.Types

Storable CShort
Instance details

Defined in Foreign.C.Types

Storable CUShort
Instance details

Defined in Foreign.C.Types

Storable CInt
Instance details

Defined in Foreign.C.Types

Storable CUInt
Instance details

Defined in Foreign.C.Types

Storable CLong
Instance details

Defined in Foreign.C.Types

Storable CULong
Instance details

Defined in Foreign.C.Types

Storable CLLong
Instance details

Defined in Foreign.C.Types

Storable CULLong
Instance details

Defined in Foreign.C.Types

Storable CBool
Instance details

Defined in Foreign.C.Types

Storable CFloat
Instance details

Defined in Foreign.C.Types

Storable CDouble
Instance details

Defined in Foreign.C.Types

Storable CPtrdiff
Instance details

Defined in Foreign.C.Types

Storable CSize
Instance details

Defined in Foreign.C.Types

Storable CWchar
Instance details

Defined in Foreign.C.Types

Storable CSigAtomic
Instance details

Defined in Foreign.C.Types

Storable CClock
Instance details

Defined in Foreign.C.Types

Storable CTime
Instance details

Defined in Foreign.C.Types

Storable CUSeconds
Instance details

Defined in Foreign.C.Types

Storable CSUSeconds
Instance details

Defined in Foreign.C.Types

Storable CIntPtr
Instance details

Defined in Foreign.C.Types

Storable CUIntPtr
Instance details

Defined in Foreign.C.Types

Storable CIntMax
Instance details

Defined in Foreign.C.Types

Storable CUIntMax
Instance details

Defined in Foreign.C.Types

Storable WordPtr
Instance details

Defined in Foreign.Ptr

Storable IntPtr
Instance details

Defined in Foreign.Ptr

Storable Fingerprint

Since: base-4.4.0.0

Instance details

Defined in Foreign.Storable

Storable Int54
Instance details

Defined in Text.JSON.Canonical.Types

Storable UUID

This Storable instance uses the memory layout as described in RFC 4122 , but in contrast to the Binary instance, the fields are stored in host byte order .

Instance details

Defined in Data.UUID.Types.Internal

Storable CodePoint
Instance details

Defined in Data.Text.Encoding

Storable DecoderState
Instance details

Defined in Data.Text.Encoding

Methods

sizeOf :: DecoderState -> Int Source #

alignment :: DecoderState -> Int Source #

peekElemOff :: Ptr DecoderState -> Int -> IO DecoderState Source #

pokeElemOff :: Ptr DecoderState -> Int -> DecoderState -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO DecoderState Source #

pokeByteOff :: Ptr b -> Int -> DecoderState -> IO () Source #

peek :: Ptr DecoderState -> IO DecoderState Source #

poke :: Ptr DecoderState -> DecoderState -> IO () Source #

( Storable a, Integral a) => Storable ( Ratio a)

Since: base-4.8.0.0

Instance details

Defined in Foreign.Storable

Storable ( StablePtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable ( Ptr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable ( FunPtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable a => Storable ( Complex a)

Since: base-4.8.0.0

Instance details

Defined in Data.Complex

Storable a => Storable ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Storable a => Storable ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Prim a => Storable ( PrimStorable a)
Instance details

Defined in Data.Primitive.Types

Storable g => Storable ( AtomicGen g)
Instance details

Defined in System.Random.Stateful

Storable g => Storable ( IOGen g)
Instance details

Defined in System.Random.Stateful

Storable g => Storable ( STGen g)
Instance details

Defined in System.Random.Stateful

Storable g => Storable ( TGen g)
Instance details

Defined in System.Random.Stateful

Storable g => Storable ( StateGen g)
Instance details

Defined in System.Random.Internal

Storable a => Storable ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Storable a => Storable ( Tagged s a)
Instance details

Defined in Data.Tagged

byteSwap64 :: Word64 -> Word64 Source #

Reverse order of bytes in Word64 .

Since: base-4.7.0.0

byteSwap32 :: Word32 -> Word32 Source #

Reverse order of bytes in Word32 .

Since: base-4.7.0.0

byteSwap16 :: Word16 -> Word16 Source #

Reverse order of bytes in Word16 .

Since: base-4.7.0.0

toTitle :: Char -> Char Source #

Convert a letter to the corresponding title-case or upper-case letter, if any. (Title case differs from upper case only for a small number of ligature letters.) Any other character is returned unchanged.

toUpper :: Char -> Char Source #

Convert a letter to the corresponding upper-case letter, if any. Any other character is returned unchanged.

isLower :: Char -> Bool Source #

Selects lower-case alphabetic Unicode characters (letters).

isUpper :: Char -> Bool Source #

Selects upper-case or title-case alphabetic Unicode characters (letters). Title case is used by a small number of letter ligatures like the single-character form of Lj .

isPrint :: Char -> Bool Source #

Selects printable Unicode characters (letters, numbers, marks, punctuation, symbols and spaces).

isControl :: Char -> Bool Source #

Selects control characters, which are the non-printing characters of the Latin-1 subset of Unicode.

isAlphaNum :: Char -> Bool Source #

Selects alphabetic or numeric Unicode characters.

Note that numeric digits outside the ASCII range, as well as numeric characters which aren't digits, are selected by this function but not by isDigit . Such characters may be part of identifiers but are not used by the printer and reader to represent numbers.

isHexDigit :: Char -> Bool Source #

Selects ASCII hexadecimal digits, i.e. '0' .. '9' , 'a' .. 'f' , 'A' .. 'F' .

isAscii :: Char -> Bool Source #

Selects the first 128 characters of the Unicode character set, corresponding to the ASCII character set.

toIntegralSized :: ( Integral a, Integral b, Bits a, Bits b) => a -> Maybe b Source #

Attempt to convert an Integral type a to an Integral type b using the size of the types as measured by Bits methods.

A simpler version of this function is:

toIntegral :: (Integral a, Integral b) => a -> Maybe b
toIntegral x
  | toInteger x == y = Just (fromInteger y)
  | otherwise        = Nothing
  where
    y = toInteger x

This version requires going through Integer , which can be inefficient. However, toIntegralSized is optimized to allow GHC to statically determine the relative type sizes (as measured by bitSizeMaybe and isSigned ) and avoid going through Integer for many types. (The implementation uses fromIntegral , which is itself optimized with rules for base types but may go through Integer for some type pairs.)

Since: base-4.8.0.0

popCountDefault :: ( Bits a, Num a) => a -> Int Source #

Default implementation for popCount .

This implementation is intentionally naive. Instances are expected to provide an optimized implementation for their size.

Since: base-4.6.0.0

testBitDefault :: ( Bits a, Num a) => a -> Int -> Bool Source #

Default implementation for testBit .

Note that: testBitDefault x i = (x .&. bit i) /= 0

Since: base-4.6.0.0

bitDefault :: ( Bits a, Num a) => Int -> a Source #

Default implementation for bit .

Note that: bitDefault i = 1 shiftL i

Since: base-4.6.0.0

class Eq a => Bits a where Source #

The Bits class defines bitwise operations over integral types.

  • Bits are numbered from 0 with bit 0 being the least significant bit.

Methods

(.&.) :: a -> a -> a infixl 7 Source #

Bitwise "and"

(.|.) :: a -> a -> a infixl 5 Source #

Bitwise "or"

xor :: a -> a -> a infixl 6 Source #

Bitwise "xor"

complement :: a -> a Source #

Reverse all the bits in the argument

shift :: a -> Int -> a infixl 8 Source #

shift x i shifts x left by i bits if i is positive, or right by -i bits otherwise. Right shifts perform sign extension on signed number types; i.e. they fill the top bits with 1 if the x is negative and with 0 otherwise.

An instance can define either this unified shift or shiftL and shiftR , depending on which is more convenient for the type in question.

rotate :: a -> Int -> a infixl 8 Source #

rotate x i rotates x left by i bits if i is positive, or right by -i bits otherwise.

For unbounded types like Integer , rotate is equivalent to shift .

An instance can define either this unified rotate or rotateL and rotateR , depending on which is more convenient for the type in question.

zeroBits :: a Source #

zeroBits is the value with all bits unset.

The following laws ought to hold (for all valid bit indices n ):

This method uses clearBit ( bit 0) 0 as its default implementation (which ought to be equivalent to zeroBits for types which possess a 0th bit).

Since: base-4.7.0.0

bit :: Int -> a Source #

bit i is a value with the i th bit set and all other bits clear.

Can be implemented using bitDefault if a is also an instance of Num .

See also zeroBits .

setBit :: a -> Int -> a Source #

x `setBit` i is the same as x .|. bit i

clearBit :: a -> Int -> a Source #

x `clearBit` i is the same as x .&. complement (bit i)

complementBit :: a -> Int -> a Source #

x `complementBit` i is the same as x `xor` bit i

testBit :: a -> Int -> Bool Source #

Return True if the n th bit of the argument is 1

Can be implemented using testBitDefault if a is also an instance of Num .

bitSizeMaybe :: a -> Maybe Int Source #

Return the number of bits in the type of the argument. The actual value of the argument is ignored. Returns Nothing for types that do not have a fixed bitsize, like Integer .

Since: base-4.7.0.0

bitSize :: a -> Int Source #

Return the number of bits in the type of the argument. The actual value of the argument is ignored. The function bitSize is undefined for types that do not have a fixed bitsize, like Integer .

Default implementation based upon bitSizeMaybe provided since 4.12.0.0.

isSigned :: a -> Bool Source #

Return True if the argument is a signed type. The actual value of the argument is ignored

shiftL :: a -> Int -> a infixl 8 Source #

Shift the argument left by the specified number of bits (which must be non-negative). Some instances may throw an Overflow exception if given a negative input.

An instance can define either this and shiftR or the unified shift , depending on which is more convenient for the type in question.

shiftR :: a -> Int -> a infixl 8 Source #

Shift the first argument right by the specified number of bits. The result is undefined for negative shift amounts and shift amounts greater or equal to the bitSize . Some instances may throw an Overflow exception if given a negative input.

Right shifts perform sign extension on signed number types; i.e. they fill the top bits with 1 if the x is negative and with 0 otherwise.

An instance can define either this and shiftL or the unified shift , depending on which is more convenient for the type in question.

rotateL :: a -> Int -> a infixl 8 Source #

Rotate the argument left by the specified number of bits (which must be non-negative).

An instance can define either this and rotateR or the unified rotate , depending on which is more convenient for the type in question.

rotateR :: a -> Int -> a infixl 8 Source #

Rotate the argument right by the specified number of bits (which must be non-negative).

An instance can define either this and rotateL or the unified rotate , depending on which is more convenient for the type in question.

popCount :: a -> Int Source #

Return the number of set bits in the argument. This number is known as the population count or the Hamming weight.

Can be implemented using popCountDefault if a is also an instance of Num .

Since: base-4.5.0.0

Instances

Instances details
Bits Bool

Interpret Bool as 1-bit bit-field

Since: base-4.7.0.0

Instance details

Defined in Data.Bits

Bits Int

Since: base-2.1

Instance details

Defined in Data.Bits

Bits Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Bits Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Bits Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Bits Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Bits Integer

Since: base-2.1

Instance details

Defined in Data.Bits

Bits Natural

Since: base-4.8.0

Instance details

Defined in Data.Bits

Bits Word

Since: base-2.1

Instance details

Defined in Data.Bits

Bits Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Bits Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Bits Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Bits Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Bits CDev
Instance details

Defined in System.Posix.Types

Bits CIno
Instance details

Defined in System.Posix.Types

Bits CMode
Instance details

Defined in System.Posix.Types

Bits COff
Instance details

Defined in System.Posix.Types

Bits CPid
Instance details

Defined in System.Posix.Types

Bits CSsize
Instance details

Defined in System.Posix.Types

Bits CGid
Instance details

Defined in System.Posix.Types

Bits CNlink
Instance details

Defined in System.Posix.Types

Bits CUid
Instance details

Defined in System.Posix.Types

Bits CTcflag
Instance details

Defined in System.Posix.Types

Bits CRLim
Instance details

Defined in System.Posix.Types

Bits CBlkSize
Instance details

Defined in System.Posix.Types

Bits CBlkCnt
Instance details

Defined in System.Posix.Types

Bits CClockId
Instance details

Defined in System.Posix.Types

Bits CFsBlkCnt
Instance details

Defined in System.Posix.Types

Bits CFsFilCnt
Instance details

Defined in System.Posix.Types

Bits CId
Instance details

Defined in System.Posix.Types

Bits CKey
Instance details

Defined in System.Posix.Types

Bits CSocklen
Instance details

Defined in System.Posix.Types

Bits CNfds
Instance details

Defined in System.Posix.Types

Bits Fd
Instance details

Defined in System.Posix.Types

Bits CChar
Instance details

Defined in Foreign.C.Types

Bits CSChar
Instance details

Defined in Foreign.C.Types

Bits CUChar
Instance details

Defined in Foreign.C.Types

Bits CShort
Instance details

Defined in Foreign.C.Types

Bits CUShort
Instance details

Defined in Foreign.C.Types

Bits CInt
Instance details

Defined in Foreign.C.Types

Bits CUInt
Instance details

Defined in Foreign.C.Types

Bits CLong
Instance details

Defined in Foreign.C.Types

Bits CULong
Instance details

Defined in Foreign.C.Types

Bits CLLong
Instance details

Defined in Foreign.C.Types

Bits CULLong
Instance details

Defined in Foreign.C.Types

Bits CBool
Instance details

Defined in Foreign.C.Types

Bits CPtrdiff
Instance details

Defined in Foreign.C.Types

Bits CSize
Instance details

Defined in Foreign.C.Types

Bits CWchar
Instance details

Defined in Foreign.C.Types

Bits CSigAtomic
Instance details

Defined in Foreign.C.Types

Bits CIntPtr
Instance details

Defined in Foreign.C.Types

Bits CUIntPtr
Instance details

Defined in Foreign.C.Types

Bits CIntMax
Instance details

Defined in Foreign.C.Types

Bits CUIntMax
Instance details

Defined in Foreign.C.Types

Bits WordPtr
Instance details

Defined in Foreign.Ptr

Bits IntPtr
Instance details

Defined in Foreign.Ptr

Bits Int54
Instance details

Defined in Text.JSON.Canonical.Types

Bits a => Bits ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bits a => Bits ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Bits a => Bits ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Bits a => Bits ( Tagged s a)
Instance details

Defined in Data.Tagged

class Bits b => FiniteBits b where Source #

The FiniteBits class denotes types with a finite, fixed number of bits.

Since: base-4.7.0.0

Minimal complete definition

finiteBitSize

Methods

finiteBitSize :: b -> Int Source #

Return the number of bits in the type of the argument. The actual value of the argument is ignored. Moreover, finiteBitSize is total, in contrast to the deprecated bitSize function it replaces.

finiteBitSize = bitSize
bitSizeMaybe = Just . finiteBitSize

Since: base-4.7.0.0

countLeadingZeros :: b -> Int Source #

Count number of zero bits preceding the most significant set bit.

countLeadingZeros (zeroBits :: a) = finiteBitSize (zeroBits :: a)

countLeadingZeros can be used to compute log base 2 via

logBase2 x = finiteBitSize x - 1 - countLeadingZeros x

Note: The default implementation for this method is intentionally naive. However, the instances provided for the primitive integral types are implemented using CPU specific machine instructions.

Since: base-4.8.0.0

countTrailingZeros :: b -> Int Source #

Count number of zero bits following the least significant set bit.

countTrailingZeros (zeroBits :: a) = finiteBitSize (zeroBits :: a)
countTrailingZeros . negate = countTrailingZeros

The related find-first-set operation can be expressed in terms of countTrailingZeros as follows

findFirstSet x = 1 + countTrailingZeros x

Note: The default implementation for this method is intentionally naive. However, the instances provided for the primitive integral types are implemented using CPU specific machine instructions.

Since: base-4.8.0.0

Instances

Instances details
FiniteBits Bool

Since: base-4.7.0.0

Instance details

Defined in Data.Bits

FiniteBits Int

Since: base-4.6.0.0

Instance details

Defined in Data.Bits

FiniteBits Int8

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

FiniteBits Int16

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

FiniteBits Int32

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

FiniteBits Int64

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

FiniteBits Word

Since: base-4.6.0.0

Instance details

Defined in Data.Bits

FiniteBits Word8

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

FiniteBits Word16

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

FiniteBits Word32

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

FiniteBits Word64

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

FiniteBits CDev
Instance details

Defined in System.Posix.Types

FiniteBits CIno
Instance details

Defined in System.Posix.Types

FiniteBits CMode
Instance details

Defined in System.Posix.Types

FiniteBits COff
Instance details

Defined in System.Posix.Types

FiniteBits CPid
Instance details

Defined in System.Posix.Types

FiniteBits CSsize
Instance details

Defined in System.Posix.Types

FiniteBits CGid
Instance details

Defined in System.Posix.Types

FiniteBits CNlink
Instance details

Defined in System.Posix.Types

FiniteBits CUid
Instance details

Defined in System.Posix.Types

FiniteBits CTcflag
Instance details

Defined in System.Posix.Types

FiniteBits CRLim
Instance details

Defined in System.Posix.Types

FiniteBits CBlkSize
Instance details

Defined in System.Posix.Types

FiniteBits CBlkCnt
Instance details

Defined in System.Posix.Types

FiniteBits CClockId
Instance details

Defined in System.Posix.Types

FiniteBits CFsBlkCnt
Instance details

Defined in System.Posix.Types

FiniteBits CFsFilCnt
Instance details

Defined in System.Posix.Types

FiniteBits CId
Instance details

Defined in System.Posix.Types

FiniteBits CKey
Instance details

Defined in System.Posix.Types

FiniteBits CSocklen
Instance details

Defined in System.Posix.Types

FiniteBits CNfds
Instance details

Defined in System.Posix.Types

FiniteBits Fd
Instance details

Defined in System.Posix.Types

FiniteBits CChar
Instance details

Defined in Foreign.C.Types

FiniteBits CSChar
Instance details

Defined in Foreign.C.Types

FiniteBits CUChar
Instance details

Defined in Foreign.C.Types

FiniteBits CShort
Instance details

Defined in Foreign.C.Types

FiniteBits CUShort
Instance details

Defined in Foreign.C.Types

FiniteBits CInt
Instance details

Defined in Foreign.C.Types

FiniteBits CUInt
Instance details

Defined in Foreign.C.Types

FiniteBits CLong
Instance details

Defined in Foreign.C.Types

FiniteBits CULong
Instance details

Defined in Foreign.C.Types

FiniteBits CLLong
Instance details

Defined in Foreign.C.Types

FiniteBits CULLong
Instance details

Defined in Foreign.C.Types

FiniteBits CBool
Instance details

Defined in Foreign.C.Types

FiniteBits CPtrdiff
Instance details

Defined in Foreign.C.Types

FiniteBits CSize
Instance details

Defined in Foreign.C.Types

FiniteBits CWchar
Instance details

Defined in Foreign.C.Types

FiniteBits CSigAtomic
Instance details

Defined in Foreign.C.Types

FiniteBits CIntPtr
Instance details

Defined in Foreign.C.Types

FiniteBits CUIntPtr
Instance details

Defined in Foreign.C.Types

FiniteBits CIntMax
Instance details

Defined in Foreign.C.Types

FiniteBits CUIntMax
Instance details

Defined in Foreign.C.Types

FiniteBits WordPtr
Instance details

Defined in Foreign.Ptr

FiniteBits IntPtr
Instance details

Defined in Foreign.Ptr

FiniteBits Int54
Instance details

Defined in Text.JSON.Canonical.Types

FiniteBits a => FiniteBits ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

FiniteBits a => FiniteBits ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

FiniteBits a => FiniteBits ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

FiniteBits a => FiniteBits ( Tagged s a)
Instance details

Defined in Data.Tagged

lcm :: Integral a => a -> a -> a Source #

lcm x y is the smallest positive integer that both x and y divide.

gcd :: Integral a => a -> a -> a Source #

gcd x y is the non-negative factor of both x and y of which every common factor of x and y is also a factor; for example gcd 4 2 = 2 , gcd (-4) 6 = 2 , gcd 0 4 = 4 . gcd 0 0 = 0 . (That is, the common divisor that is "greatest" in the divisibility preordering.)

Note: Since for signed fixed-width integer types, abs minBound < 0 , the result may be negative if one of the arguments is minBound (and necessarily is if the other is 0 or minBound ) for such types.

(^^) :: ( Fractional a, Integral b) => a -> b -> a infixr 8 Source #

raise a number to an integral power

(^) :: ( Num a, Integral b) => a -> b -> a infixr 8 Source #

raise a number to a non-negative integral power

denominator :: Ratio a -> a Source #

Extract the denominator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.

numerator :: Ratio a -> a Source #

Extract the numerator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.

(%) :: Integral a => a -> a -> Ratio a infixl 7 Source #

Forms the ratio of two integral numbers.

reduce :: Integral a => a -> a -> Ratio a Source #

reduce is a subsidiary function used only in this module. It normalises a ratio by dividing both numerator and denominator by their greatest common divisor.

chr :: Int -> Char Source #

The toEnum method restricted to the type Char .

runST :: ( forall s. ST s a) -> a Source #

Return the value computed by a state thread. The forall ensures that the internal state used by the ST computation is inaccessible to the rest of the program.

intToDigit :: Int -> Char Source #

Convert an Int in the range 0 .. 15 to the corresponding single digit Char . This function fails on other inputs, and generates lower-case hexadecimal digits.

unzip :: [(a, b)] -> ([a], [b]) Source #

unzip transforms a list of pairs into a list of first components and a list of second components.

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] Source #

\(\mathcal{O}(\min(m,n))\) . zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function. For example, zipWith (+) is applied to two lists to produce the list of corresponding sums:

>>> zipWith (+) [1, 2, 3] [4, 5, 6]
[5,7,9]

zipWith is right-lazy:

zipWith f [] _|_ = []

zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

reverse :: [a] -> [a] Source #

reverse xs returns the elements of xs in reverse order. xs must be finite.

break :: (a -> Bool ) -> [a] -> ([a], [a]) Source #

break , applied to a predicate p and a list xs , returns a tuple where first element is longest prefix (possibly empty) of xs of elements that do not satisfy p and second element is the remainder of the list:

break (> 3) [1,2,3,4,1,2,3,4] == ([1,2,3],[4,1,2,3,4])
break (< 9) [1,2,3] == ([],[1,2,3])
break (> 9) [1,2,3] == ([1,2,3],[])

break p is equivalent to span ( not . p) .

splitAt :: Int -> [a] -> ([a], [a]) Source #

splitAt n xs returns a tuple where first element is xs prefix of length n and second element is the remainder of the list:

splitAt 6 "Hello World!" == ("Hello ","World!")
splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5])
splitAt 1 [1,2,3] == ([1],[2,3])
splitAt 3 [1,2,3] == ([1,2,3],[])
splitAt 4 [1,2,3] == ([1,2,3],[])
splitAt 0 [1,2,3] == ([],[1,2,3])
splitAt (-1) [1,2,3] == ([],[1,2,3])

It is equivalent to ( take n xs, drop n xs) when n is not _|_ ( splitAt _|_ xs = _|_ ). splitAt is an instance of the more general genericSplitAt , in which n may be of any integral type.

drop :: Int -> [a] -> [a] Source #

drop n xs returns the suffix of xs after the first n elements, or [] if n > length xs :

drop 6 "Hello World!" == "World!"
drop 3 [1,2,3,4,5] == [4,5]
drop 3 [1,2] == []
drop 3 [] == []
drop (-1) [1,2] == [1,2]
drop 0 [1,2] == [1,2]

It is an instance of the more general genericDrop , in which n may be of any integral type.

take :: Int -> [a] -> [a] Source #

take n , applied to a list xs , returns the prefix of xs of length n , or xs itself if n > length xs :

take 5 "Hello World!" == "Hello"
take 3 [1,2,3,4,5] == [1,2,3]
take 3 [1,2] == [1,2]
take 3 [] == []
take (-1) [1,2] == []
take 0 [1,2] == []

It is an instance of the more general genericTake , in which n may be of any integral type.

dropWhile :: (a -> Bool ) -> [a] -> [a] Source #

dropWhile p xs returns the suffix remaining after takeWhile p xs :

dropWhile (< 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3]
dropWhile (< 9) [1,2,3] == []
dropWhile (< 0) [1,2,3] == [1,2,3]

takeWhile :: (a -> Bool ) -> [a] -> [a] Source #

takeWhile , applied to a predicate p and a list xs , returns the longest prefix (possibly empty) of xs of elements that satisfy p :

takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2]
takeWhile (< 9) [1,2,3] == [1,2,3]
takeWhile (< 0) [1,2,3] == []

cycle :: [a] -> [a] Source #

cycle ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.

replicate :: Int -> a -> [a] Source #

replicate n x is a list of length n with x the value of every element. It is an instance of the more general genericReplicate , in which n may be of any integral type.

repeat :: a -> [a] Source #

repeat x is an infinite list, with x the value of every element.

iterate :: (a -> a) -> a -> [a] Source #

iterate f x returns an infinite list of repeated applications of f to x :

iterate f x == [x, f x, f (f x), ...]

Note that iterate is lazy, potentially leading to thunk build-up if the consumer doesn't force each iterate. See iterate' for a strict variant of this function.

scanr :: (a -> b -> b) -> b -> [a] -> [b] Source #

\(\mathcal{O}(n)\) . scanr is the right-to-left dual of scanl . Note that

head (scanr f z xs) == foldr f z xs.

scanl' :: (b -> a -> b) -> b -> [a] -> [b] Source #

\(\mathcal{O}(n)\) . A strictly accumulating version of scanl

scanl :: (b -> a -> b) -> b -> [a] -> [b] Source #

\(\mathcal{O}(n)\) . scanl is similar to foldl , but returns a list of successive reduced values from the left:

scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]

Note that

last (scanl f z xs) == foldl f z xs.

mapMaybe :: (a -> Maybe b) -> [a] -> [b] Source #

The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b . If this is Nothing , no element is added on to the result list. If it is Just b , then b is included in the result list.

Examples

Expand

Using mapMaybe f x is a shortcut for catMaybes $ map f x in most cases:

>>> import Text.Read ( readMaybe )
>>> let readMaybeInt = readMaybe :: String -> Maybe Int
>>> mapMaybe readMaybeInt ["1", "Foo", "3"]
[1,3]
>>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
[1,3]

If we map the Just constructor, the entire list should be returned:

>>> mapMaybe Just [1,2,3]
[1,2,3]

catMaybes :: [ Maybe a] -> [a] Source #

The catMaybes function takes a list of Maybe s and returns a list of all the Just values.

Examples

Expand

Basic usage:

>>> catMaybes [Just 1, Nothing, Just 3]
[1,3]

When constructing a list of Maybe values, catMaybes can be used to return all of the "success" results (if the list is the result of a map , then mapMaybe would be more appropriate):

>>> import Text.Read ( readMaybe )
>>> [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
[Just 1,Nothing,Just 3]
>>> catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
[1,3]

listToMaybe :: [a] -> Maybe a Source #

The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

Examples

Expand

Basic usage:

>>> listToMaybe []
Nothing
>>> listToMaybe [9]
Just 9
>>> listToMaybe [1,2,3]
Just 1

Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:

>>> maybeToList $ listToMaybe [5]
[5]
>>> maybeToList $ listToMaybe []
[]

But not on lists with more than one element:

>>> maybeToList $ listToMaybe [1,2,3]
[1]

maybeToList :: Maybe a -> [a] Source #

The maybeToList function returns an empty list when given Nothing or a singleton list when given Just .

Examples

Expand

Basic usage:

>>> maybeToList (Just 7)
[7]
>>> maybeToList Nothing
[]

One can use maybeToList to avoid pattern matching when combined with a function that (safely) works on lists:

>>> import Text.Read ( readMaybe )
>>> sum $ maybeToList (readMaybe "3")
3
>>> sum $ maybeToList (readMaybe "")
0

fromMaybe :: a -> Maybe a -> a Source #

The fromMaybe function takes a default value and and Maybe value. If the Maybe is Nothing , it returns the default values; otherwise, it returns the value contained in the Maybe .

Examples

Expand

Basic usage:

>>> fromMaybe "" (Just "Hello, World!")
"Hello, World!"
>>> fromMaybe "" Nothing
""

Read an integer from a string using readMaybe . If we fail to parse an integer, we want to return 0 by default:

>>> import Text.Read ( readMaybe )
>>> fromMaybe 0 (readMaybe "5")
5
>>> fromMaybe 0 (readMaybe "")
0

isNothing :: Maybe a -> Bool Source #

The isNothing function returns True iff its argument is Nothing .

Examples

Expand

Basic usage:

>>> isNothing (Just 3)
False
>>> isNothing (Just ())
False
>>> isNothing Nothing
True

Only the outer constructor is taken into consideration:

>>> isNothing (Just Nothing)
False

isJust :: Maybe a -> Bool Source #

The isJust function returns True iff its argument is of the form Just _ .

Examples

Expand

Basic usage:

>>> isJust (Just 3)
True
>>> isJust (Just ())
True
>>> isJust Nothing
False

Only the outer constructor is taken into consideration:

>>> isJust (Just Nothing)
True

maybe :: b -> (a -> b) -> Maybe a -> b Source #

The maybe function takes a default value, a function, and a Maybe value. If the Maybe value is Nothing , the function returns the default value. Otherwise, it applies the function to the value inside the Just and returns the result.

Examples

Expand

Basic usage:

>>> maybe False odd (Just 3)
True
>>> maybe False odd Nothing
False

Read an integer from a string using readMaybe . If we succeed, return twice the integer; that is, apply (*2) to it. If instead we fail to parse an integer, return 0 by default:

>>> import Text.Read ( readMaybe )
>>> maybe 0 (*2) (readMaybe "5")
10
>>> maybe 0 (*2) (readMaybe "")
0

Apply show to a Maybe Int . If we have Just n , we want to show the underlying Int n . But if we have Nothing , we return the empty string instead of (for example) "Nothing":

>>> maybe "" show (Just 5)
"5"
>>> maybe "" show Nothing
""

(&) :: a -> (a -> b) -> b infixl 1 Source #

& is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator $ , which allows & to be nested in $ .

>>> 5 & (+1) & show
"6"

Since: base-4.8.0.0

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c infixl 0 Source #

on b u x y runs the binary function b on the results of applying unary function u to two arguments x and y . From the opposite perspective, it transforms two inputs and combines the outputs.

((+) `on` f) x y = f x + f y

Typical usage: sortBy ( compare `on` fst ) .

Algebraic properties:

  • (*) `on` id = (*) -- (if (*) ∉ {⊥, const ⊥})
  • ((*) `on` f) `on` g = (*) `on` (f . g)
  • flip on f . flip on g = flip on (g . f)

fix :: (a -> a) -> a Source #

fix f is the least fixed point of the function f , i.e. the least defined x such that f x = x .

For example, we can write the factorial function using direct recursion as

>>> let fac n = if n <= 1 then 1 else n * fac (n-1) in fac 5
120

This uses the fact that Haskell’s let introduces recursive bindings. We can rewrite this definition using fix ,

>>> fix (\rec n -> if n <= 1 then 1 else n * rec (n-1)) 5
120

Instead of making a recursive call, we introduce a dummy parameter rec ; when used within fix , this parameter then refers to fix ’s argument, hence the recursion is reintroduced.

void :: Functor f => f a -> f () Source #

void value discards or ignores the result of evaluation, such as the return value of an IO action.

Using ApplicativeDo : ' void as ' can be understood as the do expression

do as
   pure ()

with an inferred Functor constraint.

Examples

Expand

Replace the contents of a Maybe Int with unit:

>>> void Nothing
Nothing
>>> void (Just 3)
Just ()

Replace the contents of an Either Int Int with unit, resulting in an Either Int () :

>>> void (Left 8675309)
Left 8675309
>>> void (Right 8675309)
Right ()

Replace every element of a list with unit:

>>> void [1,2,3]
[(),(),()]

Replace the second element of a pair with unit:

>>> void (1,2)
(1,())

Discard the result of an IO action:

>>> mapM print [1,2]
1
2
[(),()]
>>> void $ mapM print [1,2]
1
2

($>) :: Functor f => f a -> b -> f b infixl 4 Source #

Flipped version of <$ .

Using ApplicativeDo : ' as $> b ' can be understood as the do expression

do as
   pure b

with an inferred Functor constraint.

Examples

Expand

Replace the contents of a Maybe Int with a constant String :

>>> Nothing $> "foo"
Nothing
>>> Just 90210 $> "foo"
Just "foo"

Replace the contents of an Either Int Int with a constant String , resulting in an Either Int String :

>>> Left 8675309 $> "foo"
Left 8675309
>>> Right 8675309 $> "foo"
Right "foo"

Replace each element of a list with a constant String :

>>> [1,2,3] $> "foo"
["foo","foo","foo"]

Replace the second element of a pair with a constant String :

>>> (1,2) $> "foo"
(1,"foo")

Since: base-4.7.0.0

(<&>) :: Functor f => f a -> (a -> b) -> f b infixl 1 Source #

Flipped version of <$> .

(<&>) = flip fmap

Examples

Expand

Apply (+1) to a list, a Just and a Right :

>>> Just 2 <&> (+1)
Just 3
>>> [1,2,3] <&> (+1)
[2,3,4]
>>> Right 3 <&> (+1)
Right 4

Since: base-4.11.0.0

swap :: (a, b) -> (b, a) Source #

Swap the components of a pair.

uncurry :: (a -> b -> c) -> (a, b) -> c Source #

uncurry converts a curried function to a function on pairs.

Examples

Expand
>>> uncurry (+) (1,2)
3
>>> uncurry ($) (show, 1)
"1"
>>> map (uncurry max) [(1,2), (3,4), (6,8)]
[2,4,8]

curry :: ((a, b) -> c) -> a -> b -> c Source #

curry converts an uncurried function to a curried function.

Examples

Expand
>>> curry fst 1 2
1

isEmptyMVar :: MVar a -> IO Bool Source #

Check whether a given MVar is empty.

Notice that the boolean value returned is just a snapshot of the state of the MVar. By the time you get to react on its result, the MVar may have been filled (or emptied) - so be extremely careful when using this operation. Use tryTakeMVar instead if possible.

tryReadMVar :: MVar a -> IO ( Maybe a) Source #

A non-blocking version of readMVar . The tryReadMVar function returns immediately, with Nothing if the MVar was empty, or Just a if the MVar was full with contents a .

Since: base-4.7.0.0

tryPutMVar :: MVar a -> a -> IO Bool Source #

A non-blocking version of putMVar . The tryPutMVar function attempts to put the value a into the MVar , returning True if it was successful, or False otherwise.

tryTakeMVar :: MVar a -> IO ( Maybe a) Source #

A non-blocking version of takeMVar . The tryTakeMVar function returns immediately, with Nothing if the MVar was empty, or Just a if the MVar was full with contents a . After tryTakeMVar , the MVar is left empty.

putMVar :: MVar a -> a -> IO () Source #

Put a value into an MVar . If the MVar is currently full, putMVar will wait until it becomes empty.

There are two further important properties of putMVar :

  • putMVar is single-wakeup. That is, if there are multiple threads blocked in putMVar , and the MVar becomes empty, only one thread will be woken up. The runtime guarantees that the woken thread completes its putMVar operation.
  • When multiple threads are blocked on an MVar , they are woken up in FIFO order. This is useful for providing fairness properties of abstractions built using MVar s.

readMVar :: MVar a -> IO a Source #

Atomically read the contents of an MVar . If the MVar is currently empty, readMVar will wait until it is full. readMVar is guaranteed to receive the next putMVar .

readMVar is multiple-wakeup, so when multiple readers are blocked on an MVar , all of them are woken up at the same time.

Compatibility note: Prior to base 4.7, readMVar was a combination of takeMVar and putMVar . This mean that in the presence of other threads attempting to putMVar , readMVar could block. Furthermore, readMVar would not receive the next putMVar if there was already a pending thread blocked on takeMVar . The old behavior can be recovered by implementing 'readMVar as follows:

 readMVar :: MVar a -> IO a
 readMVar m =
   mask_ $ do
     a <- takeMVar m
     putMVar m a
     return a

takeMVar :: MVar a -> IO a Source #

Return the contents of the MVar . If the MVar is currently empty, takeMVar will wait until it is full. After a takeMVar , the MVar is left empty.

There are two further important properties of takeMVar :

  • takeMVar is single-wakeup. That is, if there are multiple threads blocked in takeMVar , and the MVar becomes full, only one thread will be woken up. The runtime guarantees that the woken thread completes its takeMVar operation.
  • When multiple threads are blocked on an MVar , they are woken up in FIFO order. This is useful for providing fairness properties of abstractions built using MVar s.

newMVar :: a -> IO ( MVar a) Source #

Create an MVar which contains the supplied value.

newEmptyMVar :: IO ( MVar a) Source #

Create an MVar which is initially empty.

data MVar a Source #

An MVar (pronounced "em-var") is a synchronising variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full.

Instances

Instances details
NFData1 MVar

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> MVar a -> () Source #

Eq ( MVar a)

Since: base-4.1.0.0

Instance details

Defined in GHC.MVar

NFData ( MVar a)

NOTE : Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MVar a -> () Source #

subtract :: Num a => a -> a -> a Source #

the same as flip ( - ) .

Because - is treated specially in the Haskell grammar, (- e ) is not a section, but an application of prefix negation. However, ( subtract exp ) is equivalent to the disallowed section.

currentCallStack :: IO [ String ] Source #

Returns a [String] representing the current call stack. This can be useful for debugging.

The implementation uses the call-stack simulation maintained by the profiler, so it only works if the program was compiled with -prof and contains suitable SCC annotations (e.g. by using -fprof-auto ). Otherwise, the list returned is likely to be empty or uninformative.

Since: base-4.5.0.0

asTypeOf :: a -> a -> a Source #

asTypeOf is a type-restricted version of const . It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the second.

until :: (a -> Bool ) -> (a -> a) -> a -> a Source #

until p f yields the result of applying f until p holds.

flip :: (a -> b -> c) -> b -> a -> c Source #

flip f takes its (first) two arguments in the reverse order of f .

>>> flip (++) "hello" "world"
"worldhello"

ord :: Char -> Int Source #

The fromEnum method restricted to the type Char .

ap :: Monad m => m (a -> b) -> m a -> m b Source #

In many situations, the liftM operations can be replaced by uses of ap , which promotes function application.

return f `ap` x1 `ap` ... `ap` xn

is equivalent to

liftMn f x1 x2 ... xn

liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r Source #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2 ).

liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r Source #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2 ).

liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r Source #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2 ).

liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r Source #

Promote a function to a monad, scanning the monadic arguments from left to right. For example,

liftM2 (+) [0,1] [0,2] = [0,2,1,3]
liftM2 (+) (Just 1) Nothing = Nothing

liftM :: Monad m => (a1 -> r) -> m a1 -> m r Source #

Promote a function to a monad.

when :: Applicative f => Bool -> f () -> f () Source #

Conditional execution of Applicative expressions. For example,

when debug (putStrLn "Debugging")

will output the string Debugging if the Boolean value debug is True , and otherwise do nothing.

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 Source #

Same as >>= , but with the arguments interchanged.

liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #

Lift a ternary function to actions.

Using ApplicativeDo : ' liftA3 f as bs cs ' can be understood as the do expression

do a <- as
   b <- bs
   c <- cs
   pure (f a b c)

liftA :: Applicative f => (a -> b) -> f a -> f b Source #

Lift a function to actions. This function may be used as a value for fmap in a Functor instance.

| Using ApplicativeDo : ' liftA f as ' can be understood as the do expression

do a <- as
   pure (f a)

with an inferred Functor constraint, weaker than Applicative .

(<**>) :: Applicative f => f a -> f (a -> b) -> f b infixl 4 Source #

A variant of <*> with the arguments reversed.

Using ApplicativeDo : ' as <**> fs ' can be understood as the do expression

do a <- as
   f <- fs
   pure (f a)

data NonEmpty a Source #

Non-empty (and non-strict) list type.

Since: base-4.9.0.0

Constructors

a :| [a] infixr 5

Instances

Instances details
Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

NFData1 NonEmpty

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> NonEmpty a -> () Source #

Hashable1 NonEmpty

Since: hashable-1.3.1.0

Instance details

Defined in Data.Hashable.Class

Lift a => Lift ( NonEmpty a :: Type )

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

IsList ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item ( NonEmpty a) Source #

Eq a => Eq ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Ord a => Ord ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Read a => Read ( NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Show a => Show ( NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Generic ( NonEmpty a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( NonEmpty a) :: Type -> Type Source #

Semigroup ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Hashable a => Hashable ( NonEmpty a)
Instance details

Defined in Data.Hashable.Class

NFData a => NFData ( NonEmpty a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Generic1 NonEmpty

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 NonEmpty :: k -> Type Source #

type Rep ( NonEmpty a)
Instance details

Defined in GHC.Generics

type Item ( NonEmpty a)
Instance details

Defined in GHC.Exts

type Item ( NonEmpty a) = a
type Rep1 NonEmpty
Instance details

Defined in GHC.Generics

getCallStack :: CallStack -> [([ Char ], SrcLoc )] Source #

Extract a list of call-sites from the CallStack .

The list is ordered by most recent call.

Since: base-4.8.1.0

type HasCallStack = ?callStack :: CallStack Source #

Request a CallStack.

NOTE: The implicit parameter ?callStack :: CallStack is an implementation detail and should not be considered part of the CallStack API, we may decide to change the implementation in the future.

Since: base-4.9.0.0

stimesIdempotentMonoid :: ( Integral b, Monoid a) => b -> a -> a Source #

This is a valid definition of stimes for an idempotent Monoid .

When mappend x x = x , this definition should be preferred, because it works in \(\mathcal{O}(1)\) rather than \(\mathcal{O}(\log n)\)

data SomeException Source #

The SomeException type is the root of the exception type hierarchy. When an exception of type e is thrown, behind the scenes it is encapsulated in a SomeException .

Constructors

Exception e => SomeException e

(&&) :: Bool -> Bool -> Bool infixr 3 Source #

Boolean "and", lazy in the second argument

(||) :: Bool -> Bool -> Bool infixr 2 Source #

Boolean "or", lazy in the second argument

data IntMap a Source #

A map of integers to values a .

Instances

Instances details
Functor IntMap
Instance details

Defined in Data.IntMap.Internal

Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Eq1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Ord1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Read1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Show1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Hashable1 IntMap

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

IsList ( IntMap a)

Since: containers-0.5.6.2

Instance details

Defined in Data.IntMap.Internal

Associated Types

type Item ( IntMap a) Source #

Eq a => Eq ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Data a => Data ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> IntMap a -> c ( IntMap a) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( IntMap a) Source #

toConstr :: IntMap a -> Constr Source #

dataTypeOf :: IntMap a -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( IntMap a)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( IntMap a)) Source #

gmapT :: ( forall b. Data b => b -> b) -> IntMap a -> IntMap a Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> IntMap a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> IntMap a -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> IntMap a -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> IntMap a -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> IntMap a -> m ( IntMap a) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> IntMap a -> m ( IntMap a) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> IntMap a -> m ( IntMap a) Source #

Ord a => Ord ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Read e => Read ( IntMap e)
Instance details

Defined in Data.IntMap.Internal

Show a => Show ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Semigroup ( IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Monoid ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Hashable v => Hashable ( IntMap v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

NFData a => NFData ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Methods

rnf :: IntMap a -> () Source #

HeapWords a => HeapWords ( IntMap a) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

type Item ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

type Item ( IntMap a) = ( Key , a)

data IntSet Source #

A set of integers.

Instances

Instances details
IsList IntSet

Since: containers-0.5.6.2

Instance details

Defined in Data.IntSet.Internal

Associated Types

type Item IntSet Source #

Eq IntSet
Instance details

Defined in Data.IntSet.Internal

Data IntSet
Instance details

Defined in Data.IntSet.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> IntSet -> c IntSet Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c IntSet Source #

toConstr :: IntSet -> Constr Source #

dataTypeOf :: IntSet -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c IntSet ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c IntSet ) Source #

gmapT :: ( forall b. Data b => b -> b) -> IntSet -> IntSet Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> IntSet -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> IntSet -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> IntSet -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> IntSet -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> IntSet -> m IntSet Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> IntSet -> m IntSet Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> IntSet -> m IntSet Source #

Ord IntSet
Instance details

Defined in Data.IntSet.Internal

Read IntSet
Instance details

Defined in Data.IntSet.Internal

Show IntSet
Instance details

Defined in Data.IntSet.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Monoid IntSet
Instance details

Defined in Data.IntSet.Internal

Hashable IntSet

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

NFData IntSet
Instance details

Defined in Data.IntSet.Internal

HeapWords IntSet Source #
Instance details

Defined in Cardano.Prelude.HeapWords

type Item IntSet
Instance details

Defined in Data.IntSet.Internal

data Seq a Source #

General-purpose finite sequences.

Instances

Instances details
Monad Seq
Instance details

Defined in Data.Sequence.Internal

Functor Seq
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b Source #

(<$) :: a -> Seq b -> Seq a Source #

MonadFix Seq

Since: containers-0.5.11

Instance details

Defined in Data.Sequence.Internal

Methods

mfix :: (a -> Seq a) -> Seq a Source #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Foldable Seq
Instance details

Defined in Data.Sequence.Internal

Traversable Seq
Instance details

Defined in Data.Sequence.Internal

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

MonadPlus Seq
Instance details

Defined in Data.Sequence.Internal

Eq1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftEq :: (a -> b -> Bool ) -> Seq a -> Seq b -> Bool Source #

Ord1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Read1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Show1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

MonadZip Seq
 mzipWith = zipWith
 munzip = unzip
Instance details

Defined in Data.Sequence.Internal

Hashable1 Seq

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

UnzipWith Seq
Instance details

Defined in Data.Sequence.Internal

Methods

unzipWith' :: (x -> (a, b)) -> Seq x -> ( Seq a, Seq b)

IsList ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Item ( Seq a) Source #

Eq a => Eq ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Data a => Data ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Seq a -> c ( Seq a) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Seq a) Source #

toConstr :: Seq a -> Constr Source #

dataTypeOf :: Seq a -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Seq a)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Seq a)) Source #

gmapT :: ( forall b. Data b => b -> b) -> Seq a -> Seq a Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Seq a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Seq a -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Seq a -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Seq a -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Seq a -> m ( Seq a) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Seq a -> m ( Seq a) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Seq a -> m ( Seq a) Source #

Ord a => Ord ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Read a => Read ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Show a => Show ( Seq a)
Instance details

Defined in Data.Sequence.Internal

a ~ Char => IsString ( Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Semigroup ( Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Monoid ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Hashable v => Hashable ( Seq v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

NFData a => NFData ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () Source #

HeapWords a => HeapWords ( Seq a) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

type Item ( Seq a)
Instance details

Defined in Data.Sequence.Internal

type Item ( Seq a) = a

data Set a Source #

A set of values a .

Instances

Instances details
Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Eq1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftEq :: (a -> b -> Bool ) -> Set a -> Set b -> Bool Source #

Ord1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Show1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Hashable1 Set

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Ord a => IsList ( Set a)

Since: containers-0.5.6.2

Instance details

Defined in Data.Set.Internal

Associated Types

type Item ( Set a) Source #

Eq a => Eq ( Set a)
Instance details

Defined in Data.Set.Internal

( Data a, Ord a) => Data ( Set a)
Instance details

Defined in Data.Set.Internal

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Set a -> c ( Set a) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Set a) Source #

toConstr :: Set a -> Constr Source #

dataTypeOf :: Set a -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Set a)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Set a)) Source #

gmapT :: ( forall b. Data b => b -> b) -> Set a -> Set a Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Set a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Set a -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> Set a -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> Set a -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Set a -> m ( Set a) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Set a -> m ( Set a) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Set a -> m ( Set a) Source #

Ord a => Ord ( Set a)
Instance details

Defined in Data.Set.Internal

( Read a, Ord a) => Read ( Set a)
Instance details

Defined in Data.Set.Internal

Show a => Show ( Set a)
Instance details

Defined in Data.Set.Internal

Ord a => Semigroup ( Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Ord a => Monoid ( Set a)
Instance details

Defined in Data.Set.Internal

Hashable v => Hashable ( Set v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

NFData a => NFData ( Set a)
Instance details

Defined in Data.Set.Internal

Methods

rnf :: Set a -> () Source #

HeapWords a => HeapWords ( Set a) Source #
Instance details

Defined in Cardano.Prelude.HeapWords

type Item ( Set a)
Instance details

Defined in Data.Set.Internal

type Item ( Set a) = a

force :: NFData a => a -> a Source #

a variant of deepseq that is useful in some circumstances:

force x = x `deepseq` x

force x fully evaluates x , and then returns it. Note that force x only performs evaluation when the value of force x itself is demanded, so essentially it turns shallow evaluation into deep evaluation.

force can be conveniently used in combination with ViewPatterns :

{-# LANGUAGE BangPatterns, ViewPatterns #-}
import Control.DeepSeq

someFun :: ComplexData -> SomeResult
someFun (force -> !arg) = {- 'arg' will be fully evaluated -}

Another useful application is to combine force with evaluate in order to force deep evaluation relative to other IO operations:

import Control.Exception (evaluate)
import Control.DeepSeq

main = do
  result <- evaluate $ force $ pureComputation
  {- 'result' will be fully evaluated at this point -}
  return ()

Finally, here's an exception safe variant of the readFile' example:

readFile' :: FilePath -> IO String
readFile' fn = bracket (openFile fn ReadMode) hClose $ \h ->
                       evaluate . force =<< hGetContents h

Since: deepseq-1.2.0.0

($!!) :: NFData a => (a -> b) -> a -> b infixr 0 Source #

the deep analogue of $! . In the expression f $!! x , x is fully evaluated before the function f is applied to it.

Since: deepseq-1.2.0.0

deepseq :: NFData a => a -> b -> b Source #

deepseq : fully evaluates the first argument, before returning the second.

The name deepseq is used to illustrate the relationship to seq : where seq is shallow in the sense that it only evaluates the top level of its argument, deepseq traverses the entire data structure evaluating it completely.

deepseq can be useful for forcing pending exceptions, eradicating space leaks, or forcing lazy I/O to happen. It is also useful in conjunction with parallel Strategies (see the parallel package).

There is no guarantee about the ordering of evaluation. The implementation may evaluate the components of the structure in any order or in parallel. To impose an actual order on evaluation, use pseq from Control.Parallel in the parallel package.

Since: deepseq-1.1.0.0

class NFData a where Source #

A class of types that can be fully evaluated.

Since: deepseq-1.1.0.0

Minimal complete definition

Nothing

Methods

rnf :: a -> () Source #

rnf should reduce its argument to normal form (that is, fully evaluate all sub-components), and then return () .

Generic NFData deriving

Starting with GHC 7.2, you can automatically derive instances for types possessing a Generic instance.

Note: Generic1 can be auto-derived starting with GHC 7.4

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics (Generic, Generic1)
import Control.DeepSeq

data Foo a = Foo a String
             deriving (Eq, Generic, Generic1)

instance NFData a => NFData (Foo a)
instance NFData1 Foo

data Colour = Red | Green | Blue
              deriving Generic

instance NFData Colour

Starting with GHC 7.10, the example above can be written more concisely by enabling the new DeriveAnyClass extension:

{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}

import GHC.Generics (Generic)
import Control.DeepSeq

data Foo a = Foo a String
             deriving (Eq, Generic, Generic1, NFData, NFData1)

data Colour = Red | Green | Blue
              deriving (Generic, NFData)

Compatibility with previous deepseq versions

Prior to version 1.4.0.0, the default implementation of the rnf method was defined as

rnf a = seq a ()

However, starting with deepseq-1.4.0.0 , the default implementation is based on DefaultSignatures allowing for more accurate auto-derived NFData instances. If you need the previously used exact default rnf method implementation semantics, use

instance NFData Colour where rnf x = seq x ()

or alternatively

instance NFData Colour where rnf = rwhnf

or

{-# LANGUAGE BangPatterns #-}
instance NFData Colour where rnf !_ = ()

Instances

Instances details
NFData Bool
Instance details

Defined in Control.DeepSeq

NFData Char
Instance details

Defined in Control.DeepSeq

NFData Double
Instance details

Defined in Control.DeepSeq

NFData Float
Instance details

Defined in Control.DeepSeq

NFData Int
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () Source #

NFData Int8
Instance details

Defined in Control.DeepSeq

NFData Int16
Instance details

Defined in Control.DeepSeq

NFData Int32
Instance details

Defined in Control.DeepSeq

NFData Int64
Instance details

Defined in Control.DeepSeq

NFData Integer
Instance details

Defined in Control.DeepSeq

NFData Natural

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData Ordering
Instance details

Defined in Control.DeepSeq

NFData Word
Instance details

Defined in Control.DeepSeq

NFData Word8
Instance details

Defined in Control.DeepSeq

NFData Word16
Instance details

Defined in Control.DeepSeq

NFData Word32
Instance details

Defined in Control.DeepSeq

NFData Word64
Instance details

Defined in Control.DeepSeq

NFData CallStack

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

NFData ()
Instance details

Defined in Control.DeepSeq

Methods

rnf :: () -> () Source #

NFData TyCon

NOTE : Prior to deepseq-1.4.4.0 this instance was only defined for base-4.8.0.0 and later.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData ByteString
Instance details

Defined in Data.ByteString.Internal

NFData ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

NFData Scientific
Instance details

Defined in Data.Scientific

NFData UTCTime
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

NFData JSONPathElement
Instance details

Defined in Data.Aeson.Types.Internal

NFData Value
Instance details

Defined in Data.Aeson.Types.Internal

NFData Key
Instance details

Defined in Data.Aeson.Key

Methods

rnf :: Key -> () Source #

NFData ThreadId

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData Void

Defined as rnf = absurd .

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData Unique

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData Version

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

NFData ExitCode

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

NFData MaskingState

Since: deepseq-1.4.4.0

Instance details

Defined in Control.DeepSeq

NFData TypeRep

NOTE : Prior to deepseq-1.4.4.0 this instance was only defined for base-4.8.0.0 and later.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () Source #

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () Source #

NFData CChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CSChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CUChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CShort

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CUShort

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CInt

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CUInt

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CULong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CLLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CULLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CBool

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

NFData CFloat

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CDouble

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CPtrdiff

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CSize

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CWchar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CSigAtomic

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CClock

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CTime

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CUSeconds

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CSUSeconds

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CFile

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CFpos

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CJmpBuf

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CIntPtr

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CUIntPtr

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CIntMax

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData CUIntMax

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData Fingerprint

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData SrcLoc

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

NFData ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

NFData JSValue
Instance details

Defined in Text.JSON.Canonical.Types

NFData JSString
Instance details

Defined in Text.JSON.Canonical.Types

NFData ByteArray
Instance details

Defined in Data.Primitive.ByteArray

NFData IntSet
Instance details

Defined in Data.IntSet.Internal

NFData DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

NFData NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

NFData Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

rnf :: Doc -> () Source #

NFData TextDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

NFData UnicodeException
Instance details

Defined in Data.Text.Encoding.Error

NFData StdGen
Instance details

Defined in System.Random.Internal

NFData ShortText
Instance details

Defined in Data.Text.Short.Internal

NFData ZonedTime
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

NFData LocalTime
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

NFData TimeOfDay
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

NFData TimeZone
Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

NFData UniversalTime
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

NFData Day
Instance details

Defined in Data.Time.Calendar.Days

Methods

rnf :: Day -> () Source #

NFData UUID
Instance details

Defined in Data.UUID.Types.Internal

NFData a => NFData [a]
Instance details

Defined in Control.DeepSeq

Methods

rnf :: [a] -> () Source #

NFData a => NFData ( Maybe a)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () Source #

NFData a => NFData ( Ratio a)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ratio a -> () Source #

NFData ( Ptr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ptr a -> () Source #

NFData ( FunPtr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: FunPtr a -> () Source #

NFData a => NFData ( IResult a)
Instance details

Defined in Data.Aeson.Types.Internal

NFData a => NFData ( Result a)
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: Result a -> () Source #

NFData v => NFData ( KeyMap v)
Instance details

Defined in Data.Aeson.KeyMap

Methods

rnf :: KeyMap v -> () Source #

NFData a => NFData ( Complex a)
Instance details

Defined in Control.DeepSeq

NFData a => NFData ( Min a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Min a -> () Source #

NFData a => NFData ( Max a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Max a -> () Source #

NFData a => NFData ( First a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () Source #

NFData a => NFData ( Last a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () Source #

NFData m => NFData ( WrappedMonoid m)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

NFData a => NFData ( Option a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Option a -> () Source #

NFData ( StableName a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData a => NFData ( ZipList a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData a => NFData ( Identity a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData ( IORef a)

NOTE : Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: IORef a -> () Source #

NFData a => NFData ( First a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () Source #

NFData a => NFData ( Last a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () Source #

NFData a => NFData ( Dual a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Dual a -> () Source #

NFData a => NFData ( Sum a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum a -> () Source #

NFData a => NFData ( Product a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

NFData a => NFData ( Down a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Down a -> () Source #

NFData ( MVar a)

NOTE : Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MVar a -> () Source #

NFData a => NFData ( NonEmpty a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

NFData a => NFData ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Methods

rnf :: IntMap a -> () Source #

NFData a => NFData ( Tree a)
Instance details

Defined in Data.Tree

Methods

rnf :: Tree a -> () Source #

NFData a => NFData ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () Source #

NFData a => NFData ( FingerTree a)
Instance details

Defined in Data.Sequence.Internal

NFData a => NFData ( Digit a)
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Digit a -> () Source #

NFData a => NFData ( Node a)
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Node a -> () Source #

NFData a => NFData ( Elem a)
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Elem a -> () Source #

NFData a => NFData ( Set a)
Instance details

Defined in Data.Set.Internal

Methods

rnf :: Set a -> () Source #

NFData1 f => NFData ( Fix f)
Instance details

Defined in Data.Fix

Methods

rnf :: Fix f -> () Source #

NFData a => NFData ( DNonEmpty a)
Instance details

Defined in Data.DList.DNonEmpty.Internal

NFData a => NFData ( DList a)
Instance details

Defined in Data.DList.Internal

Methods

rnf :: DList a -> () Source #

NFData a => NFData ( Hashed a)
Instance details

Defined in Data.Hashable.Class

Methods

rnf :: Hashed a -> () Source #

NFData a => NFData ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: Doc a -> () Source #

NFData a => NFData ( AnnotDetails a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

NFData ( PrimArray a)
Instance details

Defined in Data.Primitive.PrimArray

NFData ( MutableByteArray s)
Instance details

Defined in Data.Primitive.ByteArray

NFData a => NFData ( SmallArray a)
Instance details

Defined in Data.Primitive.SmallArray

NFData a => NFData ( Array a)
Instance details

Defined in Data.Primitive.Array

Methods

rnf :: Array a -> () Source #

NFData g => NFData ( AtomicGen g)
Instance details

Defined in System.Random.Stateful

NFData g => NFData ( IOGen g)
Instance details

Defined in System.Random.Stateful

Methods

rnf :: IOGen g -> () Source #

NFData g => NFData ( STGen g)
Instance details

Defined in System.Random.Stateful

Methods

rnf :: STGen g -> () Source #

NFData g => NFData ( TGen g)
Instance details

Defined in System.Random.Stateful

Methods

rnf :: TGen g -> () Source #

NFData g => NFData ( StateGen g)
Instance details

Defined in System.Random.Internal

NFData a => NFData ( Maybe a)
Instance details

Defined in Data.Strict.Maybe

Methods

rnf :: Maybe a -> () Source #

NFData a => NFData ( HashSet a)
Instance details

Defined in Data.HashSet.Internal

NFData ( Vector a)
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

rnf :: Vector a -> () Source #

NFData ( Vector a)
Instance details

Defined in Data.Vector.Storable

Methods

rnf :: Vector a -> () Source #

NFData ( Vector a)
Instance details

Defined in Data.Vector.Primitive

Methods

rnf :: Vector a -> () Source #

NFData a => NFData ( Vector a)
Instance details

Defined in Data.Vector

Methods

rnf :: Vector a -> () Source #

NFData (a -> b)

This instance is for convenience and consistency with seq . This assumes that WHNF is equivalent to NF for functions.

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a -> b) -> () Source #

( NFData a, NFData b) => NFData ( Either a b)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Either a b -> () Source #

( NFData a, NFData b) => NFData (a, b)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a, b) -> () Source #

( NFData k, NFData a) => NFData ( Map k a)
Instance details

Defined in Data.Map.Internal

Methods

rnf :: Map k a -> () Source #

( NFData k, NFData v) => NFData ( HashMap k v)
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: HashMap k v -> () Source #

( NFData a, NFData b) => NFData ( Array a b)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Array a b -> () Source #

( NFData i, NFData r) => NFData ( IResult i r)
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

rnf :: IResult i r -> () Source #

NFData ( Fixed a)

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Fixed a -> () Source #

( NFData a, NFData b) => NFData ( Arg a b)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Arg a b -> () Source #

NFData ( Proxy a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Proxy a -> () Source #

NFData ( STRef s a)

NOTE : Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: STRef s a -> () Source #

NFData ( MutablePrimArray s a)
Instance details

Defined in Data.Primitive.PrimArray

( NFData a, NFData b) => NFData ( These a b)

Since: these-0.7.1

Instance details

Defined in Data.These

Methods

rnf :: These a b -> () Source #

( NFData a, NFData b) => NFData ( Pair a b)
Instance details

Defined in Data.Strict.Tuple

Methods

rnf :: Pair a b -> () Source #

( NFData a, NFData b) => NFData ( These a b)
Instance details

Defined in Data.Strict.These

Methods

rnf :: These a b -> () Source #

( NFData a, NFData b) => NFData ( Either a b)
Instance details

Defined in Data.Strict.Either

Methods

rnf :: Either a b -> () Source #

( NFData k, NFData v) => NFData ( Leaf k v)
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: Leaf k v -> () Source #

NFData ( MVector s a)
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

rnf :: MVector s a -> () Source #

NFData ( MVector s a)
Instance details

Defined in Data.Vector.Primitive.Mutable

Methods

rnf :: MVector s a -> () Source #

( NFData a1, NFData a2, NFData a3) => NFData (a1, a2, a3)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3) -> () Source #

NFData a => NFData ( Const a b)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Const a b -> () Source #

NFData (a :~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~: b) -> () Source #

NFData b => NFData ( Tagged s b)
Instance details

Defined in Data.Tagged

Methods

rnf :: Tagged s b -> () Source #

( NFData1 f, NFData1 g, NFData a) => NFData ( These1 f g a)

This instance is available only with deepseq >= 1.4.3.0

Instance details

Defined in Data.Functor.These

Methods

rnf :: These1 f g a -> () Source #

( NFData a1, NFData a2, NFData a3, NFData a4) => NFData (a1, a2, a3, a4)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4) -> () Source #

( NFData1 f, NFData1 g, NFData a) => NFData ( Product f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Product f g a -> () Source #

( NFData1 f, NFData1 g, NFData a) => NFData ( Sum f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum f g a -> () Source #

NFData (a :~~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~~: b) -> () Source #

( NFData a1, NFData a2, NFData a3, NFData a4, NFData a5) => NFData (a1, a2, a3, a4, a5)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5) -> () Source #

( NFData1 f, NFData1 g, NFData a) => NFData ( Compose f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Compose f g a -> () Source #

( NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6) => NFData (a1, a2, a3, a4, a5, a6)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6) -> () Source #

( NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7) => NFData (a1, a2, a3, a4, a5, a6, a7)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6, a7) -> () Source #

( NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8) => NFData (a1, a2, a3, a4, a5, a6, a7, a8)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6, a7, a8) -> () Source #

( NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8, NFData a9) => NFData (a1, a2, a3, a4, a5, a6, a7, a8, a9)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> () Source #

lift :: ( MonadTrans t, Monad m) => m a -> t m a Source #

Lift a computation from the argument monad to the constructed monad.

gets :: MonadState s m => (s -> a) -> m a Source #

Gets specific component of the state, using a projection function supplied.

modify :: MonadState s m => (s -> s) -> m () Source #

Monadic state transformer.

Maps an old state to a new state inside a state monad. The old state is thrown away.

     Main> :t modify ((+1) :: Int -> Int)
     modify (...) :: (MonadState Int a) => a ()

This says that modify (+1) acts over any Monad that is a member of the MonadState class, with an Int state.

class Monad m => MonadState s (m :: Type -> Type ) | m -> s where Source #

Minimal definition is either both of get and put or just state

Minimal complete definition

state | get , put

Methods

get :: m s Source #

Return the state from the internals of the monad.

put :: s -> m () Source #

Replace the state inside the monad.

state :: (s -> (a, s)) -> m a Source #

Embed a simple state action into the monad.

Instances

Instances details
MonadState s m => MonadState s ( MaybeT m)
Instance details

Defined in Control.Monad.State.Class

MonadState s m => MonadState s ( ListT m)
Instance details

Defined in Control.Monad.State.Class

( Monoid w, MonadState s m) => MonadState s ( WriterT w m)
Instance details

Defined in Control.Monad.State.Class

( Monoid w, MonadState s m) => MonadState s ( WriterT w m)
Instance details

Defined in Control.Monad.State.Class

Monad m => MonadState s ( StateT s m)
Instance details

Defined in Control.Monad.State.Class

Monad m => MonadState s ( StateT s m)
Instance details

Defined in Control.Monad.State.Class

MonadState s m => MonadState s ( ReaderT r m)
Instance details

Defined in Control.Monad.State.Class

MonadState s m => MonadState s ( IdentityT m)
Instance details

Defined in Control.Monad.State.Class

MonadState s m => MonadState s ( ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.State.Class

( Error e, MonadState s m) => MonadState s ( ErrorT e m)
Instance details

Defined in Control.Monad.State.Class

MonadState s m => MonadState s ( ContT r m)
Instance details

Defined in Control.Monad.State.Class

( Monad m, Monoid w) => MonadState s ( RWST r w s m)
Instance details

Defined in Control.Monad.State.Class

Methods

get :: RWST r w s m s Source #

put :: s -> RWST r w s m () Source #

state :: (s -> (a, s)) -> RWST r w s m a Source #

( Monad m, Monoid w) => MonadState s ( RWST r w s m)
Instance details

Defined in Control.Monad.State.Class

Methods

get :: RWST r w s m s Source #

put :: s -> RWST r w s m () Source #

state :: (s -> (a, s)) -> RWST r w s m a Source #

asks Source #

Arguments

:: MonadReader r m
=> (r -> a)

The selector function to apply to the environment.

-> m a

Retrieves a function of the current environment.

class Monad m => MonadReader r (m :: Type -> Type ) | m -> r where Source #

See examples in Control.Monad.Reader . Note, the partially applied function type (->) r is a simple reader monad. See the instance declaration below.

Minimal complete definition

( ask | reader ), local

Methods

ask :: m r Source #

Retrieves the monad environment.

local Source #

Arguments

:: (r -> r)

The function to modify the environment.

-> m a

Reader to run in the modified environment.

-> m a

Executes a computation in a modified environment.

reader Source #

Arguments

:: (r -> a)

The selector function to apply to the environment.

-> m a

Retrieves a function of the current environment.

Instances

Instances details
MonadReader r m => MonadReader r ( MaybeT m)
Instance details

Defined in Control.Monad.Reader.Class

MonadReader r m => MonadReader r ( ListT m)
Instance details

Defined in Control.Monad.Reader.Class

( Monoid w, MonadReader r m) => MonadReader r ( WriterT w m)
Instance details

Defined in Control.Monad.Reader.Class

( Monoid w, MonadReader r m) => MonadReader r ( WriterT w m)
Instance details

Defined in Control.Monad.Reader.Class

MonadReader r m => MonadReader r ( StateT s m)
Instance details

Defined in Control.Monad.Reader.Class

MonadReader r m => MonadReader r ( StateT s m)
Instance details

Defined in Control.Monad.Reader.Class

Monad m => MonadReader r ( ReaderT r m)
Instance details

Defined in Control.Monad.Reader.Class

MonadReader r m => MonadReader r ( IdentityT m)
Instance details

Defined in Control.Monad.Reader.Class

MonadReader r m => MonadReader r ( ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Reader.Class

( Error e, MonadReader r m) => MonadReader r ( ErrorT e m)
Instance details

Defined in Control.Monad.Reader.Class

MonadReader r ((->) r :: Type -> Type )
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: r -> r Source #

local :: (r -> r) -> (r -> a) -> r -> a Source #

reader :: (r -> a) -> r -> a Source #

MonadReader r' m => MonadReader r' ( ContT r m)
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ContT r m r' Source #

local :: (r' -> r') -> ContT r m a -> ContT r m a Source #

reader :: (r' -> a) -> ContT r m a Source #

( Monad m, Monoid w) => MonadReader r ( RWST r w s m)
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: RWST r w s m r Source #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a Source #

reader :: (r -> a) -> RWST r w s m a Source #

( Monad m, Monoid w) => MonadReader r ( RWST r w s m)
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: RWST r w s m r Source #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a Source #

reader :: (r -> a) -> RWST r w s m a Source #

class Monad m => MonadError e (m :: Type -> Type ) | m -> e where Source #

The strategy of combining computations that can throw exceptions by bypassing bound functions from the point an exception is thrown to the point that it is handled.

Is parameterized over the type of error information and the monad type constructor. It is common to use Either String as the monad type constructor for an error monad in which error descriptions take the form of strings. In that case and many other common cases the resulting monad is already defined as an instance of the MonadError class. You can also define your own error type and/or use a monad type constructor other than Either String or Either IOError . In these cases you will have to explicitly define instances of the MonadError class. (If you are using the deprecated Control.Monad.Error or Control.Monad.Trans.Error , you may also have to define an Error instance.)

Methods

throwError :: e -> m a Source #

Is used within a monadic computation to begin exception processing.

catchError :: m a -> (e -> m a) -> m a Source #

A handler function to handle previous errors and return to normal execution. A common idiom is:

do { action1; action2; action3 } `catchError` handler

where the action functions can call throwError . Note that handler and the do-block must have the same return type.

Instances

Instances details
MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

MonadError IOException IO
Instance details

Defined in Control.Monad.Error.Class

MonadError e m => MonadError e ( MaybeT m)
Instance details

Defined in Control.Monad.Error.Class

MonadError e m => MonadError e ( ListT m)
Instance details

Defined in Control.Monad.Error.Class

MonadError e ( Either e)
Instance details

Defined in Control.Monad.Error.Class

( Monoid w, MonadError e m) => MonadError e ( WriterT w m)
Instance details

Defined in Control.Monad.Error.Class

( Monoid w, MonadError e m) => MonadError e ( WriterT w m)
Instance details

Defined in Control.Monad.Error.Class

MonadError e m => MonadError e ( StateT s m)
Instance details

Defined in Control.Monad.Error.Class

MonadError e m => MonadError e ( StateT s m)
Instance details

Defined in Control.Monad.Error.Class

MonadError e m => MonadError e ( ReaderT r m)
Instance details

Defined in Control.Monad.Error.Class

MonadError e m => MonadError e ( IdentityT m)
Instance details

Defined in Control.Monad.Error.Class

Monad m => MonadError e ( ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Error.Class

( Monad m, Error e) => MonadError e ( ErrorT e m)
Instance details

Defined in Control.Monad.Error.Class

( Monoid w, MonadError e m) => MonadError e ( RWST r w s m)
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> RWST r w s m a Source #

catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source #

( Monoid w, MonadError e m) => MonadError e ( RWST r w s m)
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> RWST r w s m a Source #

catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a Source #

newtype ExceptT e (m :: Type -> Type ) a Source #

A monad transformer that adds exceptions to other monads.

ExceptT constructs a monad parameterized over two things:

  • e - The exception type.
  • m - The inner monad.

The return function yields a computation that produces the given value, while >>= sequences two subcomputations, exiting on the first exception.

Constructors

ExceptT (m ( Either e a))

Instances

Instances details
MonadState s m => MonadState s ( ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.State.Class

MonadReader r m => MonadReader r ( ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Reader.Class

Monad m => MonadError e ( ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Error.Class

MonadTrans ( ExceptT e)
Instance details

Defined in Control.Monad.Trans.Except

Methods

lift :: Monad m => m a -> ExceptT e m a Source #

Monad m => Monad ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Functor m => Functor ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Methods

fmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b Source #

(<$) :: a -> ExceptT e m b -> ExceptT e m a Source #

MonadFix m => MonadFix ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Methods

mfix :: (a -> ExceptT e m a) -> ExceptT e m a Source #

MonadFail m => MonadFail ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

( Functor m, Monad m) => Applicative ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Foldable f => Foldable ( ExceptT e f)
Instance details

Defined in Control.Monad.Trans.Except

Traversable f => Traversable ( ExceptT e f)
Instance details

Defined in Control.Monad.Trans.Except

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ExceptT e f a -> f0 ( ExceptT e f b) Source #

sequenceA :: Applicative f0 => ExceptT e f (f0 a) -> f0 ( ExceptT e f a) Source #

mapM :: Monad m => (a -> m b) -> ExceptT e f a -> m ( ExceptT e f b) Source #

sequence :: Monad m => ExceptT e f (m a) -> m ( ExceptT e f a) Source #

( Functor m, Monad m, Monoid e) => Alternative ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

( Monad m, Monoid e) => MonadPlus ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Contravariant m => Contravariant ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Methods

contramap :: (a -> b) -> ExceptT e m b -> ExceptT e m a Source #

(>$) :: b -> ExceptT e m b -> ExceptT e m a Source #

( Eq e, Eq1 m) => Eq1 ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftEq :: (a -> b -> Bool ) -> ExceptT e m a -> ExceptT e m b -> Bool Source #

( Ord e, Ord1 m) => Ord1 ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

( Read e, Read1 m) => Read1 ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

( Show e, Show1 m) => Show1 ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

MonadZip m => MonadZip ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

Methods

mzip :: ExceptT e m a -> ExceptT e m b -> ExceptT e m (a, b) Source #

mzipWith :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c Source #

munzip :: ExceptT e m (a, b) -> ( ExceptT e m a, ExceptT e m b) Source #

MonadIO m => MonadIO ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

PrimMonad m => PrimMonad ( ExceptT e m)
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState ( ExceptT e m) Source #

( Eq e, Eq1 m, Eq a) => Eq ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

( Ord e, Ord1 m, Ord a) => Ord ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

( Read e, Read1 m, Read a) => Read ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

( Show e, Show1 m, Show a) => Show ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

type PrimState ( ExceptT e m)
Instance details

Defined in Control.Monad.Primitive

type Except e = ExceptT e Identity Source #

The parameterizable exception monad.

Computations are either exceptions or normal values.

The return function returns a normal value, while >>= exits on the first exception. For a variant that continues after an error and collects all the errors, see Errors .

runExcept :: Except e a -> Either e a Source #

Extractor for computations in the exception monad. (The inverse of except ).

mapExcept :: ( Either e a -> Either e' b) -> Except e a -> Except e' b Source #

Map the unwrapped computation using the given function.

withExcept :: (e -> e') -> Except e a -> Except e' a Source #

Transform any exceptions thrown by the computation using the given function (a specialization of withExceptT ).

runExceptT :: ExceptT e m a -> m ( Either e a) Source #

The inverse of ExceptT .

mapExceptT :: (m ( Either e a) -> n ( Either e' b)) -> ExceptT e m a -> ExceptT e' n b Source #

Map the unwrapped computation using the given function.

withExceptT :: forall (m :: Type -> Type ) e e' a. Functor m => (e -> e') -> ExceptT e m a -> ExceptT e' m a Source #

Transform any exceptions thrown by the computation using the given function.

newtype ReaderT r (m :: Type -> Type ) a Source #

The reader monad transformer, which adds a read-only environment to the given monad.

The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.

Constructors

ReaderT

Fields

Instances

Instances details
MonadState s m => MonadState s ( ReaderT r m)
Instance details

Defined in Control.Monad.State.Class

Monad m => MonadReader r ( ReaderT r m)
Instance details

Defined in Control.Monad.Reader.Class

MonadError e m => MonadError e ( ReaderT r m)
Instance details

Defined in Control.Monad.Error.Class

MonadTrans ( ReaderT r)
Instance details

Defined in Control.Monad.Trans.Reader

Methods

lift :: Monad m => m a -> ReaderT r m a Source #

Monad m => Monad ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Functor m => Functor ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b Source #

(<$) :: a -> ReaderT r m b -> ReaderT r m a Source #

MonadFix m => MonadFix ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mfix :: (a -> ReaderT r m a) -> ReaderT r m a Source #

MonadFail m => MonadFail ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Applicative m => Applicative ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Alternative m => Alternative ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

MonadPlus m => MonadPlus ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Contravariant m => Contravariant ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Methods

contramap :: (a -> b) -> ReaderT r m b -> ReaderT r m a Source #

(>$) :: b -> ReaderT r m b -> ReaderT r m a Source #

MonadZip m => MonadZip ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzip :: ReaderT r m a -> ReaderT r m b -> ReaderT r m (a, b) Source #

mzipWith :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c Source #

munzip :: ReaderT r m (a, b) -> ( ReaderT r m a, ReaderT r m b) Source #

MonadIO m => MonadIO ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

PrimMonad m => PrimMonad ( ReaderT r m)
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState ( ReaderT r m) Source #

type PrimState ( ReaderT r m)
Instance details

Defined in Control.Monad.Primitive

type Reader r = ReaderT r Identity Source #

The parameterizable reader monad.

Computations are functions of a shared environment.

The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.

runReader Source #

Arguments

:: Reader r a

A Reader to run.

-> r

An initial environment.

-> a

Runs a Reader and extracts the final value from it. (The inverse of reader .)

newtype StateT s (m :: Type -> Type ) a Source #

A state transformer monad parameterized by:

  • s - The state.
  • m - The inner monad.

The return function leaves the state unchanged, while >>= uses the final state of the first computation as the initial state of the second.

Constructors

StateT

Fields

Instances

Instances details
Monad m => MonadState s ( StateT s m)
Instance details

Defined in Control.Monad.State.Class

MonadReader r m => MonadReader r ( StateT s m)
Instance details

Defined in Control.Monad.Reader.Class

MonadError e m => MonadError e ( StateT s m)
Instance details

Defined in Control.Monad.Error.Class

MonadTrans ( StateT s)
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

lift :: Monad m => m a -> StateT s m a Source #

Monad m => Monad ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

Functor m => Functor ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

fmap :: (a -> b) -> StateT s m a -> StateT s m b Source #

(<$) :: a -> StateT s m b -> StateT s m a Source #

MonadFix m => MonadFix ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

mfix :: (a -> StateT s m a) -> StateT s m a Source #

MonadFail m => MonadFail ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

( Functor m, Monad m) => Applicative ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

( Functor m, MonadPlus m) => Alternative ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

MonadPlus m => MonadPlus ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

Contravariant m => Contravariant ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

contramap :: (a -> b) -> StateT s m b -> StateT s m a Source #

(>$) :: b -> StateT s m b -> StateT s m a Source #

MonadIO m => MonadIO ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

PrimMonad m => PrimMonad ( StateT s m)
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState ( StateT s m) Source #

type PrimState ( StateT s m)
Instance details

Defined in Control.Monad.Primitive

type State s = StateT s Identity Source #

A state monad parameterized by the type s of the state to carry.

The return function leaves the state unchanged, while >>= uses the final state of the first computation as the initial state of the second.

runState Source #

Arguments

:: State s a

state-passing computation to execute

-> s

initial state

-> (a, s)

return value and final state

Unwrap a state monad computation as a function. (The inverse of state .)

evalState Source #

Arguments

:: State s a

state-passing computation to execute

-> s

initial value

-> a

return value of the state computation

Evaluate a state computation with the given initial state and return the final value, discarding the final state.

execState Source #

Arguments

:: State s a

state-passing computation to execute

-> s

initial value

-> s

final state

Evaluate a state computation with the given initial state and return the final state, discarding the final value.

withState :: (s -> s) -> State s a -> State s a Source #

withState f m executes action m on a state modified by applying f .

evalStateT :: Monad m => StateT s m a -> s -> m a Source #

Evaluate a state computation with the given initial state and return the final value, discarding the final state.

execStateT :: Monad m => StateT s m a -> s -> m s Source #

Evaluate a state computation with the given initial state and return the final state, discarding the final value.

die :: Text -> IO a Source #

Terminate main process with failure

liftIO2 :: MonadIO m => (a -> b -> IO c) -> a -> b -> m c Source #

Lift an IO operation with 2 arguments into another monad

liftIO1 :: MonadIO m => (a -> IO b) -> a -> m b Source #

Lift an IO operation with 1 argument into another monad

guardedA :: ( Functor f, Alternative t) => (a -> f Bool ) -> a -> f (t a) Source #

pass :: Applicative f => f () Source #

Do nothing returning unit inside applicative.

throwTo :: ( MonadIO m, Exception e) => ThreadId -> e -> m () Source #

Lifted throwTo

throwIO :: ( MonadIO m, Exception e) => e -> m a Source #

Lifted throwIO

print :: ( MonadIO m, Show a) => a -> m () Source #

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.

applyN :: Int -> (a -> a) -> a -> a Source #

Apply a function n times to a given value

map :: Functor f => (a -> b) -> f a -> f b Source #

trace :: Print b => b -> a -> a Source #

class Print a where Source #

Minimal complete definition

hPutStr , hPutStrLn

Instances

Instances details
Print ByteString
Instance details

Defined in Protolude.Show

Print ByteString
Instance details

Defined in Protolude.Show

Print Text
Instance details

Defined in Protolude.Show

Print Text
Instance details

Defined in Protolude.Show

Print [ Char ]
Instance details

Defined in Protolude.Show

atDef :: a -> [a] -> Int -> a Source #

foldl1May' :: (a -> a -> a) -> [a] -> Maybe a Source #

foldl1May :: (a -> a -> a) -> [a] -> Maybe a Source #

foldr1May :: (a -> a -> a) -> [a] -> Maybe a Source #

maximumDef :: Ord a => a -> [a] -> a Source #

minimumDef :: Ord a => a -> [a] -> a Source #

lastDef :: a -> [a] -> a Source #

tailDef :: [a] -> [a] -> [a] Source #

initDef :: [a] -> [a] -> [a] Source #

headDef :: a -> [a] -> a Source #

liftM2' :: Monad m => (a -> b -> c) -> m a -> m b -> m c Source #

liftM' :: Monad m => (a -> b) -> m a -> m b Source #

concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b] Source #

list :: [b] -> (a -> b) -> [a] -> [b] Source #

ordNub :: Ord a => [a] -> [a] Source #

sortOn :: Ord o => (a -> o) -> [a] -> [a] Source #

foreach :: Functor f => f a -> (a -> b) -> f b Source #

(<<$>>) :: ( Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) infixl 4 Source #

(<&&>) :: Applicative a => a Bool -> a Bool -> a Bool infixr 3 Source #

&& lifted to an Applicative. Unlike &&^ the operator is not short-circuiting.

(&&^) :: Monad m => m Bool -> m Bool -> m Bool infixr 3 Source #

The && operator lifted to a monad. If the first argument evaluates to False the second argument will not be evaluated.

(<||>) :: Applicative a => a Bool -> a Bool -> a Bool infixr 2 Source #

|| lifted to an Applicative. Unlike ||^ the operator is not short-circuiting.

(||^) :: Monad m => m Bool -> m Bool -> m Bool infixr 2 Source #

The || operator lifted to a monad. If the first argument evaluates to True the second argument will not be evaluated.

ifM :: Monad m => m Bool -> m a -> m a -> m a Source #

unlessM :: Monad m => m Bool -> m () -> m () Source #

whenM :: Monad m => m Bool -> m () -> m () Source #

($!) :: (a -> b) -> a -> b infixr 0 Source #

(<<*>>) :: ( Applicative f, Applicative g) => f (g (a -> b)) -> f (g a) -> f (g b) infixl 4 Source #

liftAA2 :: ( Applicative f, Applicative g) => (a -> b -> c) -> f (g a) -> f (g b) -> f (g c) Source #

throwE :: forall (m :: Type -> Type ) e a. Monad m => e -> ExceptT e m a Source #

Signal an exception value e .

catchE Source #

Arguments

:: forall (m :: Type -> Type ) e a e'. Monad m
=> ExceptT e m a

the inner computation

-> (e -> ExceptT e' m a)

a handler for exceptions in the inner computation

-> ExceptT e' m a

Handle an exception.

type OnDecodeError = OnError Word8 Char Source #

A handler for a decoding error.

type OnError a b = String -> Maybe a -> Maybe b Source #

Function type for handling a coding error. It is supplied with two inputs:

  • A String that describes the error.
  • The input value that caused the error. If the error arose because the end of input was reached or could not be identified precisely, this value will be Nothing .

If the handler returns a value wrapped with Just , that value will be used in the output as the replacement for the invalid input. If it returns Nothing , no value will be used in the output.

Should the handler need to abort processing, it should use error or throw an exception (preferably a UnicodeException ). It may use the description provided to construct a more helpful error report.

lenientDecode :: OnDecodeError Source #

Replace an invalid input byte with the Unicode replacement character U+FFFD.

ignore :: OnError a b Source #

Ignore an invalid input, substituting nothing in the output.

replace :: b -> OnError a b Source #

Replace an invalid input with a valid output.

decodeUtf8With :: OnDecodeError -> ByteString -> Text Source #

Decode a ByteString containing UTF-8 encoded text.

NOTE : The replacement character returned by OnDecodeError MUST be within the BMP plane; surrogate code points will automatically be remapped to the replacement char U+FFFD ( since 0.11.3.0 ), whereas code points beyond the BMP will throw an error ( since 1.2.3.1 ); For earlier versions of text using those unsupported code points would result in undefined behavior.

decodeUtf8 :: ByteString -> Text Source #

Decode a ByteString containing UTF-8 encoded text that is known to be valid.

If the input contains any invalid UTF-8 data, an exception will be thrown that cannot be caught in pure code. For more control over the handling of invalid data, use decodeUtf8' or decodeUtf8With .

decodeUtf8' :: ByteString -> Either UnicodeException Text Source #

Decode a ByteString containing UTF-8 encoded text.

If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.

encodeUtf8 :: Text -> ByteString Source #

Encode text using UTF-8 encoding.

words :: Text -> [ Text ] Source #

O(n) Breaks a Text up into a list of words, delimited by Char s representing white space.

lines :: Text -> [ Text ] Source #

O(n) Breaks a Text up into a list of Text s at newline Char s. The resulting strings do not contain newlines.

unlines :: [ Text ] -> Text Source #

O(n) Joins lines, after appending a terminating newline to each.

unwords :: [ Text ] -> Text Source #

O(n) Joins words using single space characters.

toStrict :: Text -> Text Source #

O(n) Convert a lazy Text into a strict Text .

fromStrict :: Text -> Text Source #

O(c) Convert a strict Text into a lazy Text .

readFile :: FilePath -> IO Text Source #

The readFile function reads a file and returns the contents of the file as a string. The entire file is read strictly, as with getContents .

writeFile :: FilePath -> Text -> IO () Source #

Write a string to a file. The file is truncated to zero length before writing begins.

appendFile :: FilePath -> Text -> IO () Source #

Write a string the end of a file.

interact :: ( Text -> Text ) -> IO () Source #

The interact function takes a function of type Text -> Text as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.

getContents :: IO Text Source #

Read all user input on stdin as a single string.

getLine :: IO Text Source #

Read a single line of user input from stdin .

check :: Bool -> STM () Source #

Check that the boolean condition is true and, if not, retry .

In other words, check b = unless b retry .

Since: stm-2.1.1

identity :: Category cat => cat a a Source #

Rename id to identity to allow id as a variable name

putTextLn :: Text -> IO () Source #

Explicit output with Text since that is what we want most of the time. We don't want to look at the type errors or warnings arising.

length :: HasLength a => a -> Int Source #

We can pass several things here, as long as they have length.