rebase-1.20.2: A more progressive alternative to the "base" package
Safe HaskellSafe-Inferred
LanguageHaskell2010

Rebase.Prelude

Description

This module reexports the non-conflicting definitions from the modules exported by this package, providing a much more featureful alternative to the standard Prelude.

For details check out the source.

Synopsis

Documentation

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

Append two lists, i.e.,

[x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
[x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]

If the first list is not finite, the result is the first list.

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

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

\(\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)] #

\(\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 shorter than the other, excess elements of the longer list are discarded, even if one of the lists is infinite:

>>> zip [1] ['a', 'b']
[(1,'a')]
>>> zip [1, 2] ['a']
[(1,'a')]
>>> zip [] [1..]
[]
>>> zip [1..] []
[]

zip is right-lazy:

>>> zip [] undefined
[]
>>> zip undefined []
*** Exception: Prelude.undefined
...

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

newStablePtr :: a -> IO (StablePtr a) #

Create a stable pointer referring to the given Haskell value.

print :: Show a => a -> IO () #

The print function outputs a value of any printable type to the standard output device. Printable types are those that are instances of class Show; print converts values to strings for output using the show operation and adds a newline.

For example, a program to print the first 20 integers and their powers of 2 could be written as:

main = print ([(n, 2^n) | n <- [0..19]])

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

Extract the first component of a pair.

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

Extract the second component of a pair.

otherwise :: Bool #

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

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

assert :: Bool -> a -> a #

If the first argument evaluates to True, then the result is the second argument. Otherwise an AssertionFailed exception is raised, containing a String with the source file and line number of the call to assert.

Assertions can normally be turned on or off with a compiler flag (for GHC, assertions are normally on unless optimisation is turned on with -O or the -fignore-asserts option is given). When assertions are turned off, the first argument to assert is ignored, and the second argument is returned as the result.

lazy :: a -> a #

The lazy function restrains strictness analysis a little. The call lazy e means the same as e, but lazy has a magical property so far as strictness analysis is concerned: it is lazy in its first argument, even though its semantics is strict. After strictness analysis has run, calls to lazy are inlined to be the identity function.

This behaviour is occasionally useful when controlling evaluation order. Notably, lazy is used in the library definition of par:

par :: a -> b -> b
par x y = case (par# x) of _ -> lazy y

If lazy were not lazy, par would look strict in y which would defeat the whole purpose of par.

assertError :: (?callStack :: CallStack) => Bool -> a -> a #

trace :: String -> a -> a #

The trace function outputs the trace message given as its first argument, before returning the second argument as its result.

For example, this returns the value of f x and outputs the message to stderr. Depending on your terminal (settings), they may or may not be mixed.

>>> let x = 123; f = show
>>> trace ("calling f with x = " ++ show x) (f x)
calling f with x = 123
"123"

The trace function should only be used for debugging, or for monitoring execution. The function is not referentially transparent: its type indicates that it is a pure function but it has the side effect of outputting the trace message.

inline :: a -> a #

The call inline f arranges that f is inlined, regardless of its size. More precisely, the call inline f rewrites to the right-hand side of f's definition. This allows the programmer to control inlining from a particular call site rather than the definition site of the function (c.f. INLINE pragmas).

This inlining occurs regardless of the argument to the call or the size of f's definition; it is unconditional. The main caveat is that f's definition must be visible to the compiler; it is therefore recommended to mark the function with an INLINABLE pragma at its definition so that GHC guarantees to record its unfolding regardless of size.

If no inlining takes place, the inline function expands to the identity function in Phase zero, so its use imposes no overhead.

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

\(\mathcal{O}(n)\). map f xs is the list obtained by applying f to each element of xs, i.e.,

map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
map f [x1, x2, ...] == [f x1, f x2, ...]
>>> map (+1) [1, 2, 3]
[2,3,4]

groupWith :: Ord b => (a -> b) -> [a] -> [[a]] #

The groupWith function uses the user supplied function which projects an element out of every list element in order to first sort the input list and then to form groups by equality on these projected elements

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

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.

coerce :: forall {k :: RuntimeRep} (a :: TYPE k) (b :: TYPE k). Coercible a b => a -> b #

The function coerce allows you to safely convert between values of types that have the same representation with no run-time overhead. In the simplest case you can use it instead of a newtype constructor, to go from the newtype's concrete type to the abstract type. But it also works in more complicated settings, e.g. converting a list of newtypes to a list of concrete types.

This function is runtime-representation polymorphic, but the RuntimeRep type argument is marked as Inferred, meaning that it is not available for visible type application. This means the typechecker will accept coerce @Int @Age 42.

fromIntegral :: (Integral a, Num b) => a -> b #

general coercion from integral types

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

general coercion to fractional types

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

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)

class IsList l where #

The IsList class and its methods are intended to be used in conjunction with the OverloadedLists extension.

Since: base-4.7.0.0

Minimal complete definition

fromList, toList

Associated Types

type Item l #

The Item type function returns the type of items of the structure l.

Methods

fromList :: [Item l] -> l #

The fromList function constructs the structure l from the given list of Item l

fromListN :: Int -> [Item l] -> l #

The fromListN function takes the input list's length and potentially uses it to construct the structure l more efficiently compared to fromList. If the given number does not equal to the input list's length the behaviour of fromListN is not specified.

fromListN (length xs) xs == fromList xs

toList :: l -> [Item l] #

The toList function extracts a list of Item l from the structure l. It should satisfy fromList . toList = id.

Instances

Instances details
IsList Version

Since: base-4.8.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item Version #

IsList CallStack

Be aware that 'fromList . toList = id' only for unfrozen CallStacks, since toList removes frozenness information.

Since: base-4.9.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item CallStack #

IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Internal

Associated Types

type Item ByteString #

IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Lazy.Internal

Associated Types

type Item ByteString #

IsList ShortByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Short.Internal

Associated Types

type Item ShortByteString #

IsList IntSet

Since: containers-0.5.6.2

Instance details

Defined in Data.IntSet.Internal

Associated Types

type Item IntSet #

IsList ByteArray 
Instance details

Defined in Data.Array.Byte

Associated Types

type Item ByteArray #

IsList (ZipList a)

Since: base-4.15.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item (ZipList a) #

Methods

fromList :: [Item (ZipList a)] -> ZipList a #

fromListN :: Int -> [Item (ZipList a)] -> ZipList a #

toList :: ZipList a -> [Item (ZipList a)] #

IsList (IntMap a)

Since: containers-0.5.6.2

Instance details

Defined in Data.IntMap.Internal

Associated Types

type Item (IntMap a) #

Methods

fromList :: [Item (IntMap a)] -> IntMap a #

fromListN :: Int -> [Item (IntMap a)] -> IntMap a #

toList :: IntMap a -> [Item (IntMap a)] #

IsList (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Item (Seq a) #

Methods

fromList :: [Item (Seq a)] -> Seq a #

fromListN :: Int -> [Item (Seq a)] -> Seq a #

toList :: Seq a -> [Item (Seq a)] #

Ord a => IsList (Set a)

Since: containers-0.5.6.2

Instance details

Defined in Data.Set.Internal

Associated Types

type Item (Set a) #

Methods

fromList :: [Item (Set a)] -> Set a #

fromListN :: Int -> [Item (Set a)] -> Set a #

toList :: Set a -> [Item (Set a)] #

IsList (DList a) 
Instance details

Defined in Data.DList.Internal

Associated Types

type Item (DList a) #

Methods

fromList :: [Item (DList a)] -> DList a #

fromListN :: Int -> [Item (DList a)] -> DList a #

toList :: DList a -> [Item (DList a)] #

IsList (Array a) 
Instance details

Defined in Data.Primitive.Array

Associated Types

type Item (Array a) #

Methods

fromList :: [Item (Array a)] -> Array a #

fromListN :: Int -> [Item (Array a)] -> Array a #

toList :: Array a -> [Item (Array a)] #

Prim a => IsList (PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Associated Types

type Item (PrimArray a) #

Methods

fromList :: [Item (PrimArray a)] -> PrimArray a #

fromListN :: Int -> [Item (PrimArray a)] -> PrimArray a #

toList :: PrimArray a -> [Item (PrimArray a)] #

IsList (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Associated Types

type Item (SmallArray a) #

(Eq a, Hashable a) => IsList (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Associated Types

type Item (HashSet a) #

Methods

fromList :: [Item (HashSet a)] -> HashSet a #

fromListN :: Int -> [Item (HashSet a)] -> HashSet a #

toList :: HashSet a -> [Item (HashSet a)] #

IsList (Vector a) 
Instance details

Defined in Data.Vector

Associated Types

type Item (Vector a) #

Methods

fromList :: [Item (Vector a)] -> Vector a #

fromListN :: Int -> [Item (Vector a)] -> Vector a #

toList :: Vector a -> [Item (Vector a)] #

Prim a => IsList (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Associated Types

type Item (Vector a) #

Methods

fromList :: [Item (Vector a)] -> Vector a #

fromListN :: Int -> [Item (Vector a)] -> Vector a #

toList :: Vector a -> [Item (Vector a)] #

Storable a => IsList (Vector a) 
Instance details

Defined in Data.Vector.Storable

Associated Types

type Item (Vector a) #

Methods

fromList :: [Item (Vector a)] -> Vector a #

fromListN :: Int -> [Item (Vector a)] -> Vector a #

toList :: Vector a -> [Item (Vector a)] #

IsList (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item (NonEmpty a) #

Methods

fromList :: [Item (NonEmpty a)] -> NonEmpty a #

fromListN :: Int -> [Item (NonEmpty a)] -> NonEmpty a #

toList :: NonEmpty a -> [Item (NonEmpty a)] #

IsList [a]

Since: base-4.7.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item [a] #

Methods

fromList :: [Item [a]] -> [a] #

fromListN :: Int -> [Item [a]] -> [a] #

toList :: [a] -> [Item [a]] #

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) #

Methods

fromList :: [Item (Map k v)] -> Map k v #

fromListN :: Int -> [Item (Map k v)] -> Map k v #

toList :: Map k v -> [Item (Map k v)] #

(Eq k, Hashable k) => IsList (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Associated Types

type Item (HashMap k v) #

Methods

fromList :: [Item (HashMap k v)] -> HashMap k v #

fromListN :: Int -> [Item (HashMap k v)] -> HashMap k v #

toList :: HashMap k v -> [Item (HashMap k v)] #

toDyn :: Typeable a => a -> Dynamic #

Converts an arbitrary value into an object of type Dynamic.

The type of the object must be an instance of Typeable, which ensures that only monomorphically-typed objects may be converted to Dynamic. To convert a polymorphic object into Dynamic, give it a monomorphic type signature. For example:

   toDyn (id :: Int -> Int)

unsafeEqualityProof :: forall {k} (a :: k) (b :: k). UnsafeEquality a b #

unsafeCoerce# :: forall (q :: RuntimeRep) (r :: RuntimeRep) (a :: TYPE q) (b :: TYPE r). a -> b #

Highly, terribly dangerous coercion from one representation type to another. Misuse of this function can invite the garbage collector to trounce upon your data and then laugh in your face. You don't want this function. Really.

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

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 #

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.

Methods

minBound :: a #

maxBound :: a #

Instances

Instances details
Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: All #

maxBound :: All #

Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Any #

maxBound :: Any #

Bounded CBool 
Instance details

Defined in Foreign.C.Types

Bounded CChar 
Instance details

Defined in Foreign.C.Types

Bounded CInt 
Instance details

Defined in Foreign.C.Types

Bounded CIntMax 
Instance details

Defined in Foreign.C.Types

Bounded CIntPtr 
Instance details

Defined in Foreign.C.Types

Bounded CLLong 
Instance details

Defined in Foreign.C.Types

Bounded CLong 
Instance details

Defined in Foreign.C.Types

Bounded CPtrdiff 
Instance details

Defined in Foreign.C.Types

Bounded CSChar 
Instance details

Defined in Foreign.C.Types

Bounded CShort 
Instance details

Defined in Foreign.C.Types

Bounded CSigAtomic 
Instance details

Defined in Foreign.C.Types

Bounded CSize 
Instance details

Defined in Foreign.C.Types

Bounded CUChar 
Instance details

Defined in Foreign.C.Types

Bounded CUInt 
Instance details

Defined in Foreign.C.Types

Bounded CUIntMax 
Instance details

Defined in Foreign.C.Types

Bounded CUIntPtr 
Instance details

Defined in Foreign.C.Types

Bounded CULLong 
Instance details

Defined in Foreign.C.Types

Bounded CULong 
Instance details

Defined in Foreign.C.Types

Bounded CUShort 
Instance details

Defined in Foreign.C.Types

Bounded CWchar 
Instance details

Defined in Foreign.C.Types

Bounded IntPtr 
Instance details

Defined in Foreign.Ptr

Bounded WordPtr 
Instance details

Defined in Foreign.Ptr

Bounded Associativity

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 SourceStrictness

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 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 Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded CBlkCnt 
Instance details

Defined in System.Posix.Types

Bounded CBlkSize 
Instance details

Defined in System.Posix.Types

Bounded CClockId 
Instance details

Defined in System.Posix.Types

Bounded CDev 
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 CGid 
Instance details

Defined in System.Posix.Types

Bounded CId 
Instance details

Defined in System.Posix.Types

Methods

minBound :: CId #

maxBound :: CId #

Bounded CIno 
Instance details

Defined in System.Posix.Types

Bounded CKey 
Instance details

Defined in System.Posix.Types

Bounded CMode 
Instance details

Defined in System.Posix.Types

Bounded CNfds 
Instance details

Defined in System.Posix.Types

Bounded CNlink 
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 CRLim 
Instance details

Defined in System.Posix.Types

Bounded CSocklen 
Instance details

Defined in System.Posix.Types

Bounded CSsize 
Instance details

Defined in System.Posix.Types

Bounded CTcflag 
Instance details

Defined in System.Posix.Types

Bounded CUid 
Instance details

Defined in System.Posix.Types

Bounded Fd 
Instance details

Defined in System.Posix.Types

Methods

minBound :: Fd #

maxBound :: Fd #

Bounded Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded I16 
Instance details

Defined in Data.Text.Foreign

Methods

minBound :: I16 #

maxBound :: I16 #

Bounded ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: () #

maxBound :: () #

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

Methods

minBound :: Int #

maxBound :: Int #

Bounded Levity

Since: base-4.16.0.0

Instance details

Defined in GHC.Enum

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 Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded a => Bounded (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

minBound :: And a #

maxBound :: And a #

Bounded a => Bounded (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

minBound :: Iff a #

maxBound :: Iff a #

Bounded a => Bounded (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

minBound :: Ior a #

maxBound :: Ior a #

Bounded a => Bounded (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

minBound :: Xor a #

maxBound :: Xor a #

Bounded a => Bounded (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded (Down a)

Swaps minBound and maxBound of the underlying type.

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

minBound :: Down a #

maxBound :: Down a #

Bounded a => Bounded (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: First a #

maxBound :: First a #

Bounded a => Bounded (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Last a #

maxBound :: Last a #

Bounded a => Bounded (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Max a #

maxBound :: Max a #

Bounded a => Bounded (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Min a #

maxBound :: Min a #

Bounded m => Bounded (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Dual a #

maxBound :: Dual a #

Bounded a => Bounded (Product 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

Methods

minBound :: Sum a #

maxBound :: Sum a #

Bounded a => Bounded (a) 
Instance details

Defined in GHC.Enum

Methods

minBound :: (a) #

maxBound :: (a) #

Bounded (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

minBound :: Proxy t #

maxBound :: Proxy t #

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b) #

maxBound :: (a, b) #

Bounded a => Bounded (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

minBound :: Const a b #

maxBound :: Const a b #

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

minBound :: Ap f a #

maxBound :: Ap f a #

Coercible a b => Bounded (Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Methods

minBound :: Coercion a b #

maxBound :: Coercion a b #

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

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound :: a :~: b #

maxBound :: a :~: b #

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

Defined in Data.Tagged

Methods

minBound :: Tagged s b #

maxBound :: Tagged s b #

(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) #

maxBound :: (a, b, c) #

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

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound :: a :~~: b #

maxBound :: a :~~: b #

(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) #

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

(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) #

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

(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) #

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

(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) #

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

(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) #

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

(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) #

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

(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) #

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

(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) #

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

(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) #

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

(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) #

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

(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) #

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

(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) #

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

class Enum a where #

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 #

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

pred :: a -> a #

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

toEnum :: Int -> a #

Convert from an Int.

fromEnum :: a -> Int #

Convert to an Int. It is implementation-dependent what fromEnum returns when applied to a value that is too large to fit in an Int.

enumFrom :: a -> [a] #

Used in Haskell's translation of [n..] with [n..] = enumFrom n, a possible implementation being enumFrom n = n : enumFrom (succ n). For example:

  • enumFrom 4 :: [Integer] = [4,5,6,7,...]
  • enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]

enumFromThen :: a -> a -> [a] #

Used in Haskell's translation of [n,n'..] with [n,n'..] = enumFromThen n n', a possible implementation being enumFromThen n n' = n : n' : worker (f x) (f x n'), worker s v = v : worker s (s v), x = fromEnum n' - fromEnum n and f n y | n > 0 = f (n - 1) (succ y) | n < 0 = f (n + 1) (pred y) | otherwise = y For example:

  • enumFromThen 4 6 :: [Integer] = [4,6,8,10...]
  • enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound :: Int]

enumFromTo :: a -> a -> [a] #

Used in Haskell's translation of [n..m] with [n..m] = enumFromTo n m, a possible implementation being enumFromTo n m | n <= m = n : enumFromTo (succ n) m | otherwise = []. For example:

  • enumFromTo 6 10 :: [Int] = [6,7,8,9,10]
  • enumFromTo 42 1 :: [Integer] = []

enumFromThenTo :: a -> a -> a -> [a] #

Used in Haskell's translation of [n,n'..m] with [n,n'..m] = enumFromThenTo n n' m, a possible implementation being enumFromThenTo n n' m = worker (f x) (c x) n m, x = fromEnum n' - fromEnum n, c x = bool (>=) ((x 0) f n y | n > 0 = f (n - 1) (succ y) | n < 0 = f (n + 1) (pred y) | otherwise = y and worker s c v m | c v m = v : worker s c (s v) m | otherwise = [] For example:

  • enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]
  • enumFromThenTo 6 8 2 :: [Int] = []

Instances

Instances details
Enum CBool 
Instance details

Defined in Foreign.C.Types

Enum CChar 
Instance details

Defined in Foreign.C.Types

Enum CClock 
Instance details

Defined in Foreign.C.Types

Enum CDouble 
Instance details

Defined in Foreign.C.Types

Enum CFloat 
Instance details

Defined in Foreign.C.Types

Enum CInt 
Instance details

Defined in Foreign.C.Types

Methods

succ :: CInt -> CInt #

pred :: CInt -> CInt #

toEnum :: Int -> CInt #

fromEnum :: CInt -> Int #

enumFrom :: CInt -> [CInt] #

enumFromThen :: CInt -> CInt -> [CInt] #

enumFromTo :: CInt -> CInt -> [CInt] #

enumFromThenTo :: CInt -> CInt -> CInt -> [CInt] #

Enum CIntMax 
Instance details

Defined in Foreign.C.Types

Enum CIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CLLong 
Instance details

Defined in Foreign.C.Types

Enum CLong 
Instance details

Defined in Foreign.C.Types

Enum CPtrdiff 
Instance details

Defined in Foreign.C.Types

Enum CSChar 
Instance details

Defined in Foreign.C.Types

Enum CSUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CShort 
Instance details

Defined in Foreign.C.Types

Enum CSigAtomic 
Instance details

Defined in Foreign.C.Types

Enum CSize 
Instance details

Defined in Foreign.C.Types

Enum CTime 
Instance details

Defined in Foreign.C.Types

Enum CUChar 
Instance details

Defined in Foreign.C.Types

Enum CUInt 
Instance details

Defined in Foreign.C.Types

Enum CUIntMax 
Instance details

Defined in Foreign.C.Types

Enum CUIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CULLong 
Instance details

Defined in Foreign.C.Types

Enum CULong 
Instance details

Defined in Foreign.C.Types

Enum CUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CUShort 
Instance details

Defined in Foreign.C.Types

Enum CWchar 
Instance details

Defined in Foreign.C.Types

Enum IntPtr 
Instance details

Defined in Foreign.Ptr

Enum WordPtr 
Instance details

Defined in Foreign.Ptr

Enum Associativity

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 SourceStrictness

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 SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Enum IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

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 Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

succ :: Int8 -> Int8 #

pred :: Int8 -> Int8 #

toEnum :: Int -> Int8 #

fromEnum :: Int8 -> Int #

enumFrom :: Int8 -> [Int8] #

enumFromThen :: Int8 -> Int8 -> [Int8] #

enumFromTo :: Int8 -> Int8 -> [Int8] #

enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] #

Enum GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum CBlkCnt 
Instance details

Defined in System.Posix.Types

Enum CBlkSize 
Instance details

Defined in System.Posix.Types

Enum CCc 
Instance details

Defined in System.Posix.Types

Methods

succ :: CCc -> CCc #

pred :: CCc -> CCc #

toEnum :: Int -> CCc #

fromEnum :: CCc -> Int #

enumFrom :: CCc -> [CCc] #

enumFromThen :: CCc -> CCc -> [CCc] #

enumFromTo :: CCc -> CCc -> [CCc] #

enumFromThenTo :: CCc -> CCc -> CCc -> [CCc] #

Enum CClockId 
Instance details

Defined in System.Posix.Types

Enum CDev 
Instance details

Defined in System.Posix.Types

Methods

succ :: CDev -> CDev #

pred :: CDev -> CDev #

toEnum :: Int -> CDev #

fromEnum :: CDev -> Int #

enumFrom :: CDev -> [CDev] #

enumFromThen :: CDev -> CDev -> [CDev] #

enumFromTo :: CDev -> CDev -> [CDev] #

enumFromThenTo :: CDev -> CDev -> CDev -> [CDev] #

Enum CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Enum CFsFilCnt 
Instance details

Defined in System.Posix.Types

Enum CGid 
Instance details

Defined in System.Posix.Types

Methods

succ :: CGid -> CGid #

pred :: CGid -> CGid #

toEnum :: Int -> CGid #

fromEnum :: CGid -> Int #

enumFrom :: CGid -> [CGid] #

enumFromThen :: CGid -> CGid -> [CGid] #

enumFromTo :: CGid -> CGid -> [CGid] #

enumFromThenTo :: CGid -> CGid -> CGid -> [CGid] #

Enum CId 
Instance details

Defined in System.Posix.Types

Methods

succ :: CId -> CId #

pred :: CId -> CId #

toEnum :: Int -> CId #

fromEnum :: CId -> Int #

enumFrom :: CId -> [CId] #

enumFromThen :: CId -> CId -> [CId] #

enumFromTo :: CId -> CId -> [CId] #

enumFromThenTo :: CId -> CId -> CId -> [CId] #

Enum CIno 
Instance details

Defined in System.Posix.Types

Methods

succ :: CIno -> CIno #

pred :: CIno -> CIno #

toEnum :: Int -> CIno #

fromEnum :: CIno -> Int #

enumFrom :: CIno -> [CIno] #

enumFromThen :: CIno -> CIno -> [CIno] #

enumFromTo :: CIno -> CIno -> [CIno] #

enumFromThenTo :: CIno -> CIno -> CIno -> [CIno] #

Enum CKey 
Instance details

Defined in System.Posix.Types

Methods

succ :: CKey -> CKey #

pred :: CKey -> CKey #

toEnum :: Int -> CKey #

fromEnum :: CKey -> Int #

enumFrom :: CKey -> [CKey] #

enumFromThen :: CKey -> CKey -> [CKey] #

enumFromTo :: CKey -> CKey -> [CKey] #

enumFromThenTo :: CKey -> CKey -> CKey -> [CKey] #

Enum CMode 
Instance details

Defined in System.Posix.Types

Enum CNfds 
Instance details

Defined in System.Posix.Types

Enum CNlink 
Instance details

Defined in System.Posix.Types

Enum COff 
Instance details

Defined in System.Posix.Types

Methods

succ :: COff -> COff #

pred :: COff -> COff #

toEnum :: Int -> COff #

fromEnum :: COff -> Int #

enumFrom :: COff -> [COff] #

enumFromThen :: COff -> COff -> [COff] #

enumFromTo :: COff -> COff -> [COff] #

enumFromThenTo :: COff -> COff -> COff -> [COff] #

Enum CPid 
Instance details

Defined in System.Posix.Types

Methods

succ :: CPid -> CPid #

pred :: CPid -> CPid #

toEnum :: Int -> CPid #

fromEnum :: CPid -> Int #

enumFrom :: CPid -> [CPid] #

enumFromThen :: CPid -> CPid -> [CPid] #

enumFromTo :: CPid -> CPid -> [CPid] #

enumFromThenTo :: CPid -> CPid -> CPid -> [CPid] #

Enum CRLim 
Instance details

Defined in System.Posix.Types

Enum CSocklen 
Instance details

Defined in System.Posix.Types

Enum CSpeed 
Instance details

Defined in System.Posix.Types

Enum CSsize 
Instance details

Defined in System.Posix.Types

Enum CTcflag 
Instance details

Defined in System.Posix.Types

Enum CUid 
Instance details

Defined in System.Posix.Types

Methods

succ :: CUid -> CUid #

pred :: CUid -> CUid #

toEnum :: Int -> CUid #

fromEnum :: CUid -> Int #

enumFrom :: CUid -> [CUid] #

enumFromThen :: CUid -> CUid -> [CUid] #

enumFromTo :: CUid -> CUid -> [CUid] #

enumFromThenTo :: CUid -> CUid -> CUid -> [CUid] #

Enum Fd 
Instance details

Defined in System.Posix.Types

Methods

succ :: Fd -> Fd #

pred :: Fd -> Fd #

toEnum :: Int -> Fd #

fromEnum :: Fd -> Int #

enumFrom :: Fd -> [Fd] #

enumFromThen :: Fd -> Fd -> [Fd] #

enumFromTo :: Fd -> Fd -> [Fd] #

enumFromThenTo :: Fd -> Fd -> Fd -> [Fd] #

Enum Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum I16 
Instance details

Defined in Data.Text.Foreign

Methods

succ :: I16 -> I16 #

pred :: I16 -> I16 #

toEnum :: Int -> I16 #

fromEnum :: I16 -> Int #

enumFrom :: I16 -> [I16] #

enumFromThen :: I16 -> I16 -> [I16] #

enumFromTo :: I16 -> I16 -> [I16] #

enumFromThenTo :: I16 -> I16 -> I16 -> [I16] #

Enum FPFormat 
Instance details

Defined in Data.Text.Lazy.Builder.RealFloat

Enum Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

succ :: Day -> Day #

pred :: Day -> Day #

toEnum :: Int -> Day #

fromEnum :: Day -> Int #

enumFrom :: Day -> [Day] #

enumFromThen :: Day -> Day -> [Day] #

enumFromTo :: Day -> Day -> [Day] #

enumFromThenTo :: Day -> Day -> Day -> [Day] #

Enum DayOfWeek

"Circular", so for example [Tuesday ..] gives an endless sequence. Also: fromEnum gives [1 .. 7] for [Monday .. Sunday], and toEnum performs mod 7 to give a cycle of days.

Instance details

Defined in Data.Time.Calendar.Week

Enum DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Enum NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

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 ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: () -> () #

pred :: () -> () #

toEnum :: Int -> () #

fromEnum :: () -> Int #

enumFrom :: () -> [()] #

enumFromThen :: () -> () -> [()] #

enumFromTo :: () -> () -> [()] #

enumFromThenTo :: () -> () -> () -> [()] #

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Bool -> Bool #

pred :: Bool -> Bool #

toEnum :: Int -> Bool #

fromEnum :: Bool -> Int #

enumFrom :: Bool -> [Bool] #

enumFromThen :: Bool -> Bool -> [Bool] #

enumFromTo :: Bool -> Bool -> [Bool] #

enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Char -> Char #

pred :: Char -> Char #

toEnum :: Int -> Char #

fromEnum :: Char -> Int #

enumFrom :: Char -> [Char] #

enumFromThen :: Char -> Char -> [Char] #

enumFromTo :: Char -> Char -> [Char] #

enumFromThenTo :: Char -> Char -> Char -> [Char] #

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Int -> Int #

pred :: Int -> Int #

toEnum :: Int -> Int #

fromEnum :: Int -> Int #

enumFrom :: Int -> [Int] #

enumFromThen :: Int -> Int -> [Int] #

enumFromTo :: Int -> Int -> [Int] #

enumFromThenTo :: Int -> Int -> Int -> [Int] #

Enum Levity

Since: base-4.16.0.0

Instance details

Defined in GHC.Enum

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 Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Word -> Word #

pred :: Word -> Word #

toEnum :: Int -> Word #

fromEnum :: Word -> Int #

enumFrom :: Word -> [Word] #

enumFromThen :: Word -> Word -> [Word] #

enumFromTo :: Word -> Word -> [Word] #

enumFromThenTo :: Word -> Word -> Word -> [Word] #

Enum a => Enum (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

succ :: And a -> And a #

pred :: And a -> And a #

toEnum :: Int -> And a #

fromEnum :: And a -> Int #

enumFrom :: And a -> [And a] #

enumFromThen :: And a -> And a -> [And a] #

enumFromTo :: And a -> And a -> [And a] #

enumFromThenTo :: And a -> And a -> And a -> [And a] #

Enum a => Enum (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

succ :: Iff a -> Iff a #

pred :: Iff a -> Iff a #

toEnum :: Int -> Iff a #

fromEnum :: Iff a -> Int #

enumFrom :: Iff a -> [Iff a] #

enumFromThen :: Iff a -> Iff a -> [Iff a] #

enumFromTo :: Iff a -> Iff a -> [Iff a] #

enumFromThenTo :: Iff a -> Iff a -> Iff a -> [Iff a] #

Enum a => Enum (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

succ :: Ior a -> Ior a #

pred :: Ior a -> Ior a #

toEnum :: Int -> Ior a #

fromEnum :: Ior a -> Int #

enumFrom :: Ior a -> [Ior a] #

enumFromThen :: Ior a -> Ior a -> [Ior a] #

enumFromTo :: Ior a -> Ior a -> [Ior a] #

enumFromThenTo :: Ior a -> Ior a -> Ior a -> [Ior a] #

Enum a => Enum (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

succ :: Xor a -> Xor a #

pred :: Xor a -> Xor a #

toEnum :: Int -> Xor a #

fromEnum :: Xor a -> Int #

enumFrom :: Xor a -> [Xor a] #

enumFromThen :: Xor a -> Xor a -> [Xor a] #

enumFromTo :: Xor a -> Xor a -> [Xor a] #

enumFromThenTo :: Xor a -> Xor a -> Xor a -> [Xor a] #

Enum a => Enum (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Enum a => Enum (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: First a -> First a #

pred :: First a -> First a #

toEnum :: Int -> First a #

fromEnum :: First a -> Int #

enumFrom :: First a -> [First a] #

enumFromThen :: First a -> First a -> [First a] #

enumFromTo :: First a -> First a -> [First a] #

enumFromThenTo :: First a -> First a -> First a -> [First a] #

Enum a => Enum (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Last a -> Last a #

pred :: Last a -> Last a #

toEnum :: Int -> Last a #

fromEnum :: Last a -> Int #

enumFrom :: Last a -> [Last a] #

enumFromThen :: Last a -> Last a -> [Last a] #

enumFromTo :: Last a -> Last a -> [Last a] #

enumFromThenTo :: Last a -> Last a -> Last a -> [Last a] #

Enum a => Enum (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Max a -> Max a #

pred :: Max a -> Max a #

toEnum :: Int -> Max a #

fromEnum :: Max a -> Int #

enumFrom :: Max a -> [Max a] #

enumFromThen :: Max a -> Max a -> [Max a] #

enumFromTo :: Max a -> Max a -> [Max a] #

enumFromThenTo :: Max a -> Max a -> Max a -> [Max a] #

Enum a => Enum (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Min a -> Min a #

pred :: Min a -> Min a #

toEnum :: Int -> Min a #

fromEnum :: Min a -> Int #

enumFrom :: Min a -> [Min a] #

enumFromThen :: Min a -> Min a -> [Min a] #

enumFromTo :: Min a -> Min a -> [Min a] #

enumFromThenTo :: Min a -> Min a -> Min a -> [Min a] #

Enum a => Enum (WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Integral a => Enum (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

succ :: Ratio a -> Ratio a #

pred :: Ratio a -> Ratio a #

toEnum :: Int -> Ratio a #

fromEnum :: Ratio a -> Int #

enumFrom :: Ratio a -> [Ratio a] #

enumFromThen :: Ratio a -> Ratio a -> [Ratio a] #

enumFromTo :: Ratio a -> Ratio a -> [Ratio a] #

enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] #

Enum a => Enum (a) 
Instance details

Defined in GHC.Enum

Methods

succ :: (a) -> (a) #

pred :: (a) -> (a) #

toEnum :: Int -> (a) #

fromEnum :: (a) -> Int #

enumFrom :: (a) -> [(a)] #

enumFromThen :: (a) -> (a) -> [(a)] #

enumFromTo :: (a) -> (a) -> [(a)] #

enumFromThenTo :: (a) -> (a) -> (a) -> [(a)] #

Enum (Fixed a)

Recall that, for numeric types, succ and pred typically add and subtract 1, respectively. This is not true in the case of Fixed, whose successor and predecessor functions intuitively return the "next" and "previous" values in the enumeration. The results of these functions thus depend on the resolution of the Fixed value. For example, when enumerating values of resolution 10^-3 of type Milli = Fixed E3,

  succ (0.000 :: Milli) == 1.001

and likewise

  pred (0.000 :: Milli) == -0.001

In other words, succ and pred increment and decrement a fixed-precision value by the least amount such that the value's resolution is unchanged. For example, 10^-12 is the smallest (positive) amount that can be added to a value of type Pico = Fixed E12 without changing its resolution, and so

  succ (0.000000000000 :: Pico) == 0.000000000001

and similarly

  pred (0.000000000000 :: Pico) == -0.000000000001

This is worth bearing in mind when defining Fixed arithmetic sequences. In particular, you may be forgiven for thinking the sequence

  [1..10] :: [Pico]

evaluates to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] :: [Pico].

However, this is not true. On the contrary, similarly to the above implementations of succ and pred, enumFromTo :: Pico -> Pico -> [Pico] has a "step size" of 10^-12. Hence, the list [1..10] :: [Pico] has the form

  [1.000000000000, 1.00000000001, 1.00000000002, ..., 10.000000000000]

and contains 9 * 10^12 + 1 values.

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

succ :: Fixed a -> Fixed a #

pred :: Fixed a -> Fixed a #

toEnum :: Int -> Fixed a #

fromEnum :: Fixed a -> Int #

enumFrom :: Fixed a -> [Fixed a] #

enumFromThen :: Fixed a -> Fixed a -> [Fixed a] #

enumFromTo :: Fixed a -> Fixed a -> [Fixed a] #

enumFromThenTo :: Fixed a -> Fixed a -> Fixed a -> [Fixed a] #

Enum (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

succ :: Proxy s -> Proxy s #

pred :: Proxy s -> Proxy s #

toEnum :: Int -> Proxy s #

fromEnum :: Proxy s -> Int #

enumFrom :: Proxy s -> [Proxy s] #

enumFromThen :: Proxy s -> Proxy s -> [Proxy s] #

enumFromTo :: Proxy s -> Proxy s -> [Proxy s] #

enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] #

Enum a => Enum (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

succ :: Const a b -> Const a b #

pred :: Const a b -> Const a b #

toEnum :: Int -> Const a b #

fromEnum :: Const a b -> Int #

enumFrom :: Const a b -> [Const a b] #

enumFromThen :: Const a b -> Const a b -> [Const a b] #

enumFromTo :: Const a b -> Const a b -> [Const a b] #

enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] #

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

succ :: Ap f a -> Ap f a #

pred :: Ap f a -> Ap f a #

toEnum :: Int -> Ap f a #

fromEnum :: Ap f a -> Int #

enumFrom :: Ap f a -> [Ap f a] #

enumFromThen :: Ap f a -> Ap f a -> [Ap f a] #

enumFromTo :: Ap f a -> Ap f a -> [Ap f a] #

enumFromThenTo :: Ap f a -> Ap f a -> Ap f a -> [Ap f a] #

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

succ :: Alt f a -> Alt f a #

pred :: Alt f a -> Alt f a #

toEnum :: Int -> Alt f a #

fromEnum :: Alt f a -> Int #

enumFrom :: Alt f a -> [Alt f a] #

enumFromThen :: Alt f a -> Alt f a -> [Alt f a] #

enumFromTo :: Alt f a -> Alt f a -> [Alt f a] #

enumFromThenTo :: Alt f a -> Alt f a -> Alt f a -> [Alt f a] #

Coercible a b => Enum (Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Methods

succ :: Coercion a b -> Coercion a b #

pred :: Coercion a b -> Coercion a b #

toEnum :: Int -> Coercion a b #

fromEnum :: Coercion a b -> Int #

enumFrom :: Coercion a b -> [Coercion a b] #

enumFromThen :: Coercion a b -> Coercion a b -> [Coercion a b] #

enumFromTo :: Coercion a b -> Coercion a b -> [Coercion a b] #

enumFromThenTo :: Coercion a b -> Coercion a b -> Coercion a b -> [Coercion a b] #

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

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

succ :: (a :~: b) -> a :~: b #

pred :: (a :~: b) -> a :~: b #

toEnum :: Int -> a :~: b #

fromEnum :: (a :~: b) -> Int #

enumFrom :: (a :~: b) -> [a :~: b] #

enumFromThen :: (a :~: b) -> (a :~: b) -> [a :~: b] #

enumFromTo :: (a :~: b) -> (a :~: b) -> [a :~: b] #

enumFromThenTo :: (a :~: b) -> (a :~: b) -> (a :~: b) -> [a :~: b] #

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

Defined in Data.Tagged

Methods

succ :: Tagged s a -> Tagged s a #

pred :: Tagged s a -> Tagged s a #

toEnum :: Int -> Tagged s a #

fromEnum :: Tagged s a -> Int #

enumFrom :: Tagged s a -> [Tagged s a] #

enumFromThen :: Tagged s a -> Tagged s a -> [Tagged s a] #

enumFromTo :: Tagged s a -> Tagged s a -> [Tagged s a] #

enumFromThenTo :: Tagged s a -> Tagged s a -> Tagged s a -> [Tagged s a] #

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

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

succ :: (a :~~: b) -> a :~~: b #

pred :: (a :~~: b) -> a :~~: b #

toEnum :: Int -> a :~~: b #

fromEnum :: (a :~~: b) -> Int #

enumFrom :: (a :~~: b) -> [a :~~: b] #

enumFromThen :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] #

enumFromTo :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] #

enumFromThenTo :: (a :~~: b) -> (a :~~: b) -> (a :~~: b) -> [a :~~: b] #

class Eq a where #

The Eq class defines equality (==) and inequality (/=). All the basic datatypes exported by the Prelude are instances of Eq, and Eq may be derived for any datatype whose constituents are also instances of Eq.

The Haskell Report defines no laws for Eq. However, instances are encouraged to follow these properties:

Reflexivity
x == x = True
Symmetry
x == y = y == x
Transitivity
if x == y && y == z = True, then x == z = True
Extensionality
if x == y = True and f is a 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 #

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

Instances

Instances details
Eq Constr

Equality of constructors

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

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

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

Eq ConstrRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Eq DataRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

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

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

Eq Fixity

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

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

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

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq SomeTypeRep 
Instance details

Defined in Data.Typeable.Internal

Eq Unique 
Instance details

Defined in Data.Unique

Methods

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

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

Eq Version

Since: base-2.1

Instance details

Defined in Data.Version

Methods

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

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

Eq Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

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

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

Eq Errno

Since: base-2.1

Instance details

Defined in Foreign.C.Error

Methods

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

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

Eq CBool 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CClock 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CDouble 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CFloat 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CInt 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CIntMax 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CIntPtr 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CLLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CPtrdiff 
Instance details

Defined in Foreign.C.Types

Eq CSChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CSUSeconds 
Instance details

Defined in Foreign.C.Types

Eq CShort 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CSigAtomic 
Instance details

Defined in Foreign.C.Types

Eq CSize 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CTime 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUInt 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUIntMax 
Instance details

Defined in Foreign.C.Types

Eq CUIntPtr 
Instance details

Defined in Foreign.C.Types

Eq CULLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CULong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUSeconds 
Instance details

Defined in Foreign.C.Types

Eq CUShort 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CWchar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq IntPtr 
Instance details

Defined in Foreign.Ptr

Methods

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

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

Eq WordPtr 
Instance details

Defined in Foreign.Ptr

Methods

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

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

Eq BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Eq ThreadId

Since: base-4.2.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 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 SpecConstrAnnotation

Since: base-4.3.0.0

Instance details

Defined in GHC.Exts

Eq Fingerprint

Since: base-4.4.0.0

Instance details

Defined in GHC.Fingerprint.Type

Eq Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Eq DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Eq BufferState

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Buffer

Eq IODeviceType

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Eq SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Eq CodingProgress

Since: base-4.4.0.0

Instance details

Defined in GHC.IO.Encoding.Types

Eq ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq AsyncException

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 IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq HandlePosn

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle

Eq BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Methods

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

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

Eq Newline

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Methods

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

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

Eq NewlineMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Methods

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

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

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Stack.Types

Methods

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

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

Eq SomeChar 
Instance details

Defined in GHC.TypeLits

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

Methods

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

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

Eq GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Eq Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq CBlkCnt 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CBlkSize 
Instance details

Defined in System.Posix.Types

Eq CCc 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CClockId 
Instance details

Defined in System.Posix.Types

Eq CDev 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Eq CFsFilCnt 
Instance details

Defined in System.Posix.Types

Eq CGid 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CId 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CIno 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CKey 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CMode 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CNfds 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CNlink 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq COff 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CPid 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CRLim 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CSocklen 
Instance details

Defined in System.Posix.Types

Eq CSpeed 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CSsize 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CTcflag 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CTimer 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq CUid 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq Fd 
Instance details

Defined in System.Posix.Types

Methods

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

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

Eq Timeout 
Instance details

Defined in System.Timeout

Methods

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

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

Eq Lexeme

Since: base-2.1

Instance details

Defined in Text.Read.Lex

Methods

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

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

Eq Number

Since: base-4.6.0.0

Instance details

Defined in Text.Read.Lex

Methods

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

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

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal

Eq ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Eq ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Eq IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

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

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

Eq ByteArray 
Instance details

Defined in Data.Array.Byte

Eq ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Eq Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Eq Module 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Ordering 
Instance details

Defined in GHC.Classes

Eq TrName 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq TyCon 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Options 
Instance details

Defined in Data.Functor.Invariant.TH

Methods

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

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

Eq Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

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

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

Eq StdGen 
Instance details

Defined in System.Random.Internal

Methods

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

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

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 TSem 
Instance details

Defined in Control.Concurrent.STM.TSem

Methods

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

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

Eq AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq DecidedStrictness 
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 DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq CodePoint 
Instance details

Defined in Data.Text.Encoding

Methods

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

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

Eq DecoderState 
Instance details

Defined in Data.Text.Encoding

Methods

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

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

Eq UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

Eq I16 
Instance details

Defined in Data.Text.Foreign

Methods

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

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

Eq Builder 
Instance details

Defined in Data.Text.Internal.Builder

Methods

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

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

Eq CalendarDiffDays 
Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Eq Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

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

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

Eq DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Eq FirstWeekType 
Instance details

Defined in Data.Time.Calendar.WeekDate

Eq AbsoluteTime 
Instance details

Defined in Data.Time.Clock.Internal.AbsoluteTime

Eq DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Eq NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Eq SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

Eq UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

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

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

Eq UniversalTime 
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Eq TimeLocale 
Instance details

Defined in Data.Time.Format.Locale

Eq CalendarDiffTime 
Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

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 UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

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

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

Eq UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

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

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

Eq Checks 
Instance details

Defined in Data.Vector.Internal.Check

Methods

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

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

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Methods

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

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

Eq Natural 
Instance details

Defined in GHC.Num.Natural

Methods

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

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

Eq () 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Char 
Instance details

Defined in GHC.Classes

Methods

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

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

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

Methods

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

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

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 extensionality:

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

Defined in GHC.Classes

Methods

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

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

Eq Int 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Word 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq a => Eq (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(==) :: ZipList a -> ZipList a -> Bool #

(/=) :: ZipList a -> ZipList a -> Bool #

Eq (Chan a)

Since: base-4.4.0.0

Instance details

Defined in Control.Concurrent.Chan

Methods

(==) :: Chan a -> Chan a -> Bool #

(/=) :: Chan a -> Chan a -> Bool #

Eq a => Eq (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(==) :: And a -> And a -> Bool #

(/=) :: And a -> And a -> Bool #

Eq a => Eq (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(==) :: Iff a -> Iff a -> Bool #

(/=) :: Iff a -> Iff a -> Bool #

Eq a => Eq (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(==) :: Ior a -> Ior a -> Bool #

(/=) :: Ior a -> Ior a -> Bool #

Eq a => Eq (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(==) :: Xor a -> Xor a -> Bool #

(/=) :: Xor a -> Xor a -> Bool #

Eq a => Eq (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(==) :: Complex a -> Complex a -> Bool #

(/=) :: Complex a -> Complex a -> Bool #

Eq a => Eq (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(==) :: Identity a -> Identity a -> Bool #

(/=) :: Identity a -> Identity a -> Bool #

Eq a => Eq (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

(==) :: First a -> First a -> Bool #

(/=) :: First a -> First a -> Bool #

Eq a => Eq (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

(==) :: Last a -> Last a -> Bool #

(/=) :: Last a -> Last a -> Bool #

Eq a => Eq (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

(==) :: Down a -> Down a -> Bool #

(/=) :: Down a -> Down a -> Bool #

Eq a => Eq (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: First a -> First a -> Bool #

(/=) :: First a -> First a -> Bool #

Eq a => Eq (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Last a -> Last a -> Bool #

(/=) :: Last a -> Last a -> Bool #

Eq a => Eq (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Max a -> Max a -> Bool #

(/=) :: Max a -> Max a -> Bool #

Eq a => Eq (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Min a -> Min a -> Bool #

(/=) :: Min a -> Min a -> Bool #

Eq m => Eq (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Dual a -> Dual a -> Bool #

(/=) :: Dual a -> Dual a -> Bool #

Eq a => Eq (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Product a -> Product a -> Bool #

(/=) :: Product a -> Product a -> Bool #

Eq a => Eq (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Sum a -> Sum a -> Bool #

(/=) :: Sum a -> Sum a -> Bool #

Eq (TVar a)

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(==) :: TVar a -> TVar a -> Bool #

(/=) :: TVar a -> TVar a -> Bool #

Eq (ForeignPtr a)

Since: base-2.1

Instance details

Defined in GHC.ForeignPtr

Methods

(==) :: ForeignPtr a -> ForeignPtr a -> Bool #

(/=) :: ForeignPtr a -> ForeignPtr a -> Bool #

Eq p => Eq (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: Par1 p -> Par1 p -> Bool #

(/=) :: Par1 p -> Par1 p -> Bool #

Eq (IORef a)

Pointer equality.

Since: base-4.0.0.0

Instance details

Defined in GHC.IORef

Methods

(==) :: IORef a -> IORef a -> Bool #

(/=) :: IORef a -> IORef a -> Bool #

Eq (MVar a)

Since: base-4.1.0.0

Instance details

Defined in GHC.MVar

Methods

(==) :: MVar a -> MVar a -> Bool #

(/=) :: MVar a -> MVar a -> Bool #

Eq (FunPtr a) 
Instance details

Defined in GHC.Ptr

Methods

(==) :: FunPtr a -> FunPtr a -> Bool #

(/=) :: FunPtr a -> FunPtr a -> Bool #

Eq (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

(==) :: Ptr a -> Ptr a -> Bool #

(/=) :: Ptr a -> Ptr a -> Bool #

Eq a => Eq (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

(==) :: Ratio a -> Ratio a -> Bool #

(/=) :: Ratio a -> Ratio a -> Bool #

Eq (StablePtr a)

Since: base-2.1

Instance details

Defined in GHC.Stable

Methods

(==) :: StablePtr a -> StablePtr a -> Bool #

(/=) :: StablePtr a -> StablePtr a -> Bool #

Eq (StableName a)

Since: base-2.1

Instance details

Defined in GHC.StableName

Methods

(==) :: StableName a -> StableName a -> Bool #

(/=) :: StableName a -> StableName a -> Bool #

Eq vertex => Eq (SCC vertex)

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

(==) :: SCC vertex -> SCC vertex -> Bool #

(/=) :: SCC vertex -> SCC vertex -> Bool #

Eq a => Eq (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

(==) :: IntMap a -> IntMap a -> Bool #

(/=) :: IntMap a -> IntMap a -> Bool #

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: Seq a -> Seq a -> Bool #

(/=) :: Seq a -> Seq a -> Bool #

Eq a => Eq (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: ViewL a -> ViewL a -> Bool #

(/=) :: ViewL a -> ViewL a -> Bool #

Eq a => Eq (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: ViewR a -> ViewR a -> Bool #

(/=) :: ViewR a -> ViewR a -> Bool #

Eq a => Eq (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

(==) :: Set a -> Set a -> Bool #

(/=) :: Set a -> Set a -> Bool #

Eq a => Eq (Tree a) 
Instance details

Defined in Data.Tree

Methods

(==) :: Tree a -> Tree a -> Bool #

(/=) :: Tree a -> Tree a -> Bool #

Eq (MutableByteArray s) 
Instance details

Defined in Data.Array.Byte

Eq a => Eq (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

(==) :: DList a -> DList a -> Bool #

(/=) :: DList a -> DList a -> Bool #

Eq a => Eq (Hashed a)

Uses precomputed hash to detect inequality faster

Instance details

Defined in Data.Hashable.Class

Methods

(==) :: Hashed a -> Hashed a -> Bool #

(/=) :: Hashed a -> Hashed a -> Bool #

Eq a => Eq (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(==) :: Doc a -> Doc a -> Bool #

(/=) :: Doc a -> Doc a -> Bool #

Eq a => Eq (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(==) :: Span a -> Span a -> Bool #

(/=) :: Span a -> Span a -> Bool #

Eq a => Eq (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

(==) :: Array a -> Array a -> Bool #

(/=) :: Array a -> Array a -> Bool #

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

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Methods

(==) :: PrimArray a -> PrimArray a -> Bool #

(/=) :: PrimArray a -> PrimArray a -> Bool #

Eq a => Eq (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

(==) :: SmallArray a -> SmallArray a -> Bool #

(/=) :: SmallArray a -> SmallArray a -> Bool #

Eq g => Eq (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

(==) :: StateGen g -> StateGen g -> Bool #

(/=) :: StateGen g -> StateGen g -> Bool #

Eq g => Eq (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

(==) :: AtomicGen g -> AtomicGen g -> Bool #

(/=) :: AtomicGen g -> AtomicGen g -> Bool #

Eq g => Eq (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

(==) :: IOGen g -> IOGen g -> Bool #

(/=) :: IOGen g -> IOGen g -> Bool #

Eq g => Eq (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

(==) :: STGen g -> STGen g -> Bool #

(/=) :: STGen g -> STGen g -> Bool #

Eq g => Eq (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

(==) :: TGen g -> TGen g -> Bool #

(/=) :: TGen g -> TGen g -> Bool #

Eq (TBQueue a) 
Instance details

Defined in Control.Concurrent.STM.TBQueue

Methods

(==) :: TBQueue a -> TBQueue a -> Bool #

(/=) :: TBQueue a -> TBQueue a -> Bool #

Eq (TChan a) 
Instance details

Defined in Control.Concurrent.STM.TChan

Methods

(==) :: TChan a -> TChan a -> Bool #

(/=) :: TChan a -> TChan a -> Bool #

Eq (TMVar a) 
Instance details

Defined in Control.Concurrent.STM.TMVar

Methods

(==) :: TMVar a -> TMVar a -> Bool #

(/=) :: TMVar a -> TMVar a -> Bool #

Eq (TQueue a) 
Instance details

Defined in Control.Concurrent.STM.TQueue

Methods

(==) :: TQueue a -> TQueue a -> Bool #

(/=) :: TQueue a -> TQueue a -> Bool #

Eq flag => Eq (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(==) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

(/=) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

Eq a => Eq (HashSet a)

Note that, in the presence of hash collisions, equal HashSets 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

Methods

(==) :: HashSet a -> HashSet a -> Bool #

(/=) :: HashSet a -> HashSet a -> Bool #

Eq a => Eq (Vector a) 
Instance details

Defined in Data.Vector

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

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

Defined in Data.Vector.Primitive

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

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

Defined in Data.Vector.Storable

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

Eq a => Eq (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(==) :: NonEmpty a -> NonEmpty a -> Bool #

(/=) :: NonEmpty a -> NonEmpty a -> Bool #

Eq a => Eq (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

(==) :: Maybe a -> Maybe a -> Bool #

(/=) :: Maybe a -> Maybe a -> Bool #

Eq a => Eq (a) 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq a => Eq [a] 
Instance details

Defined in GHC.Classes

Methods

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

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

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

Since: base-2.1

Instance details

Defined in Data.Either

Methods

(==) :: Either a b -> Either a b -> Bool #

(/=) :: Either a b -> Either a b -> Bool #

Eq (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

(==) :: Fixed a -> Fixed a -> Bool #

(/=) :: Fixed a -> Fixed a -> Bool #

Eq (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(==) :: Proxy s -> Proxy s -> Bool #

(/=) :: Proxy s -> Proxy s -> Bool #

Eq a => Eq (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Arg a b -> Arg a b -> Bool #

(/=) :: Arg a b -> Arg a b -> Bool #

Eq (TypeRep a)

Since: base-2.1

Instance details

Defined in Data.Typeable.Internal

Methods

(==) :: TypeRep a -> TypeRep a -> Bool #

(/=) :: TypeRep a -> TypeRep a -> Bool #

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

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

(==) :: Array i e -> Array i e -> Bool #

(/=) :: Array i e -> Array i e -> Bool #

Eq (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: U1 p -> U1 p -> Bool #

(/=) :: U1 p -> U1 p -> Bool #

Eq (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: V1 p -> V1 p -> Bool #

(/=) :: V1 p -> V1 p -> Bool #

Eq (IOArray i e)

Since: base-4.1.0.0

Instance details

Defined in GHC.IOArray

Methods

(==) :: IOArray i e -> IOArray i e -> Bool #

(/=) :: IOArray i e -> IOArray i e -> Bool #

Eq (STRef s a)

Pointer equality.

Since: base-2.1

Instance details

Defined in GHC.STRef

Methods

(==) :: STRef s a -> STRef s a -> Bool #

(/=) :: STRef s a -> STRef s a -> Bool #

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

Defined in Data.Map.Internal

Methods

(==) :: Map k a -> Map k a -> Bool #

(/=) :: Map k a -> Map k a -> Bool #

(Eq e, Eq a) => Eq (Validation e a) 
Instance details

Defined in Data.Either.Validation

Methods

(==) :: Validation e a -> Validation e a -> Bool #

(/=) :: Validation e a -> Validation e a -> Bool #

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

Defined in Control.Comonad.Cofree

Methods

(==) :: Cofree f a -> Cofree f a -> Bool #

(/=) :: Cofree f a -> Cofree f a -> Bool #

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

Defined in Control.Monad.Free

Methods

(==) :: Free f a -> Free f a -> Bool #

(/=) :: Free f a -> Free f a -> Bool #

Eq (MutableArray s a) 
Instance details

Defined in Data.Primitive.Array

Methods

(==) :: MutableArray s a -> MutableArray s a -> Bool #

(/=) :: MutableArray s a -> MutableArray s a -> Bool #

Eq (MutablePrimArray s a) 
Instance details

Defined in Data.Primitive.PrimArray

Eq (SmallMutableArray s a) 
Instance details

Defined in Data.Primitive.SmallArray

Eq m => Eq (Over m a) 
Instance details

Defined in Control.Selective

Methods

(==) :: Over m a -> Over m a -> Bool #

(/=) :: Over m a -> Over m a -> Bool #

Eq m => Eq (Under m a) 
Instance details

Defined in Control.Selective

Methods

(==) :: Under m a -> Under m a -> Bool #

(/=) :: Under m a -> Under m a -> Bool #

(Eq e, Eq a) => Eq (Validation e a) 
Instance details

Defined in Control.Selective

Methods

(==) :: Validation e a -> Validation e a -> Bool #

(/=) :: Validation e a -> Validation e a -> Bool #

Eq m => Eq (Over m a) 
Instance details

Defined in Control.Selective.Multi

Methods

(==) :: Over m a -> Over m a -> Bool #

(/=) :: Over m a -> Over m a -> Bool #

Eq m => Eq (Under m a) 
Instance details

Defined in Control.Selective.Multi

Methods

(==) :: Under m a -> Under m a -> Bool #

(/=) :: Under m a -> Under m a -> Bool #

Ix i => Eq (TArray i e) 
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

(==) :: TArray i e -> TArray i e -> Bool #

(/=) :: TArray i e -> TArray i e -> Bool #

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

Defined in Control.Applicative.Lift

Methods

(==) :: Lift f a -> Lift f a -> Bool #

(/=) :: Lift f a -> Lift f a -> Bool #

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

Defined in Control.Monad.Trans.Maybe

Methods

(==) :: MaybeT m a -> MaybeT m a -> Bool #

(/=) :: MaybeT m a -> MaybeT m a -> Bool #

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

Note that, in the presence of hash collisions, equal HashMaps 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

Methods

(==) :: HashMap k v -> HashMap k v -> Bool #

(/=) :: HashMap k v -> HashMap k v -> Bool #

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

Defined in Data.HashMap.Internal

Methods

(==) :: Leaf k v -> Leaf k v -> Bool #

(/=) :: Leaf k v -> Leaf k v -> Bool #

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

Defined in GHC.Classes

Methods

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

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

Eq a => Eq (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(==) :: Const a b -> Const a b -> Bool #

(/=) :: Const a b -> Const a b -> Bool #

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(==) :: Ap f a -> Ap f a -> Bool #

(/=) :: Ap f a -> Ap f a -> Bool #

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Alt f a -> Alt f a -> Bool #

(/=) :: Alt f a -> Alt f a -> Bool #

Eq (Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Methods

(==) :: Coercion a b -> Coercion a b -> Bool #

(/=) :: Coercion a b -> Coercion a b -> Bool #

Eq (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

(==) :: (a :~: b) -> (a :~: b) -> Bool #

(/=) :: (a :~: b) -> (a :~: b) -> Bool #

Eq (OrderingI a b) 
Instance details

Defined in Data.Type.Ord

Methods

(==) :: OrderingI a b -> OrderingI a b -> Bool #

(/=) :: OrderingI a b -> OrderingI a b -> Bool #

Eq (STArray s i e)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

(==) :: STArray s i e -> STArray s i e -> Bool #

(/=) :: STArray s i e -> STArray s i e -> Bool #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: Rec1 f p -> Rec1 f p -> Bool #

(/=) :: Rec1 f p -> Rec1 f p -> Bool #

Eq (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(/=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

Eq (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Char p -> URec Char p -> Bool #

(/=) :: URec Char p -> URec Char p -> Bool #

Eq (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Double p -> URec Double p -> Bool #

(/=) :: URec Double p -> URec Double p -> Bool #

Eq (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

(==) :: URec Float p -> URec Float p -> Bool #

(/=) :: URec Float p -> URec Float p -> Bool #

Eq (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Int p -> URec Int p -> Bool #

(/=) :: URec Int p -> URec Int p -> Bool #

Eq (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Word p -> URec Word p -> Bool #

(/=) :: URec Word p -> URec Word p -> Bool #

Eq (p (Fix p a) a) => Eq (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

(==) :: Fix p a -> Fix p a -> Bool #

(/=) :: Fix p a -> Fix p a -> Bool #

Eq (p a a) => Eq (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

(==) :: Join p a -> Join p a -> Bool #

(/=) :: Join p a -> Join p a -> Bool #

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

Defined in Control.Monad.Trans.Free

Methods

(==) :: FreeF f a b -> FreeF f a b -> Bool #

(/=) :: FreeF f a b -> FreeF f a b -> Bool #

(Eq1 f, Eq1 m, Eq a) => Eq (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(==) :: FreeT f m a -> FreeT f m a -> Bool #

(/=) :: FreeT f m a -> FreeT f m a -> Bool #

Eq (f a) => Eq (WrappedContravariant f a) 
Instance details

Defined in Data.Functor.Invariant

Eq (f a) => Eq (WrappedFunctor f a) 
Instance details

Defined in Data.Functor.Invariant

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

Defined in Data.Tagged

Methods

(==) :: Tagged s b -> Tagged s b -> Bool #

(/=) :: Tagged s b -> Tagged s b -> Bool #

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

Defined in Control.Applicative.Backwards

Methods

(==) :: Backwards f a -> Backwards f a -> Bool #

(/=) :: Backwards f a -> Backwards f a -> Bool #

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

Defined in Control.Monad.Trans.Error

Methods

(==) :: ErrorT e m a -> ErrorT e m a -> Bool #

(/=) :: ErrorT e m a -> ErrorT e m a -> Bool #

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

Defined in Control.Monad.Trans.Except

Methods

(==) :: ExceptT e m a -> ExceptT e m a -> Bool #

(/=) :: ExceptT e m a -> ExceptT e m a -> Bool #

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

Defined in Control.Monad.Trans.Identity

Methods

(==) :: IdentityT f a -> IdentityT f a -> Bool #

(/=) :: IdentityT f a -> IdentityT f a -> Bool #

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

(==) :: WriterT w m a -> WriterT w m a -> Bool #

(/=) :: WriterT w m a -> WriterT w m a -> Bool #

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

Defined in Control.Monad.Trans.Writer.Strict

Methods

(==) :: WriterT w m a -> WriterT w m a -> Bool #

(/=) :: WriterT w m a -> WriterT w m a -> Bool #

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

Defined in Data.Functor.Constant

Methods

(==) :: Constant a b -> Constant a b -> Bool #

(/=) :: Constant a b -> Constant a b -> Bool #

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

Defined in Data.Functor.Reverse

Methods

(==) :: Reverse f a -> Reverse f a -> Bool #

(/=) :: Reverse f a -> Reverse f a -> Bool #

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

Defined in GHC.Classes

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

(==) :: Product f g a -> Product f g a -> Bool #

(/=) :: Product f g a -> Product f g a -> Bool #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

(==) :: Sum f g a -> Sum f g a -> Bool #

(/=) :: Sum f g a -> Sum f g a -> Bool #

Eq (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

(==) :: (a :~~: b) -> (a :~~: b) -> Bool #

(/=) :: (a :~~: b) -> (a :~~: b) -> Bool #

(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 #

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

(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 #

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

Eq c => Eq (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: K1 i c p -> K1 i c p -> Bool #

(/=) :: K1 i c p -> K1 i c p -> Bool #

(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 #

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(==) :: Compose f g a -> Compose f g a -> Bool #

(/=) :: Compose f g a -> Compose f g a -> Bool #

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 #

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

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 #

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

Eq (f a) => Eq (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

(==) :: Clown f a b -> Clown f a b -> Bool #

(/=) :: Clown f a b -> Clown f a b -> Bool #

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

Defined in Data.Bifunctor.Flip

Methods

(==) :: Flip p a b -> Flip p a b -> Bool #

(/=) :: Flip p a b -> Flip p a b -> Bool #

Eq (g b) => Eq (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

(==) :: Joker g a b -> Joker g a b -> Bool #

(/=) :: Joker g a b -> Joker g a b -> Bool #

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

Defined in Data.Bifunctor.Wrapped

Methods

(==) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

(/=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

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

Defined in Data.Functor.Invariant

(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 #

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

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

Defined in Data.Bifunctor.Product

Methods

(==) :: Product f g a b -> Product f g a b -> Bool #

(/=) :: Product f g a b -> Product f g a b -> Bool #

(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 #

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

(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 #

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

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

Defined in Data.Bifunctor.Tannen

Methods

(==) :: Tannen f p a b -> Tannen f p a b -> Bool #

(/=) :: Tannen f p a b -> Tannen f p a b -> Bool #

(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 #

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

(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 #

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

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 #

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

(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 #

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

(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 #

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

(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 #

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

(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 #

(/=) :: (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 #

(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 #

(/=) :: (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 #

(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 #

(/=) :: (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 #

(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 #

(/=) :: (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 #

class Fractional a => Floating a where #

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

Minimal complete definition

pi, exp, log, sin, cos, asin, acos, atan, sinh, cosh, asinh, acosh, atanh

Methods

pi :: a #

exp :: a -> a #

log :: a -> a #

sqrt :: a -> a #

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

logBase :: a -> a -> a #

sin :: a -> a #

cos :: a -> a #

tan :: a -> a #

asin :: a -> a #

acos :: a -> a #

atan :: a -> a #

sinh :: a -> a #

cosh :: a -> a #

tanh :: a -> a #

asinh :: a -> a #

acosh :: a -> a #

atanh :: a -> a #

log1p :: a -> a #

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 #

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 #

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

Examples:

  • if x is a large negative number, log (1 + exp x) will be imprecise for the reasons given in log1p.
  • if exp x is close to -1, log (1 + exp x) will be imprecise for the reasons given in expm1.

Since: base-4.9.0.0

log1mexp :: a -> a #

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

Examples:

  • if x is a large negative number, log (1 - exp x) will be imprecise for the reasons given in log1p.
  • if exp x is close to 1, log (1 - exp x) will be imprecise for the reasons given in expm1.

Since: base-4.9.0.0

Instances

Instances details
Floating CDouble 
Instance details

Defined in Foreign.C.Types

Floating CFloat 
Instance details

Defined in Foreign.C.Types

Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat a => Floating (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

pi :: Complex a #

exp :: Complex a -> Complex a #

log :: Complex a -> Complex a #

sqrt :: Complex a -> Complex a #

(**) :: Complex a -> Complex a -> Complex a #

logBase :: Complex a -> Complex a -> Complex a #

sin :: Complex a -> Complex a #

cos :: Complex a -> Complex a #

tan :: Complex a -> Complex a #

asin :: Complex a -> Complex a #

acos :: Complex a -> Complex a #

atan :: Complex a -> Complex a #

sinh :: Complex a -> Complex a #

cosh :: Complex a -> Complex a #

tanh :: Complex a -> Complex a #

asinh :: Complex a -> Complex a #

acosh :: Complex a -> Complex a #

atanh :: Complex a -> Complex a #

log1p :: Complex a -> Complex a #

expm1 :: Complex a -> Complex a #

log1pexp :: Complex a -> Complex a #

log1mexp :: Complex a -> Complex a #

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

Methods

pi :: Down a #

exp :: Down a -> Down a #

log :: Down a -> Down a #

sqrt :: Down a -> Down a #

(**) :: Down a -> Down a -> Down a #

logBase :: Down a -> Down a -> Down a #

sin :: Down a -> Down a #

cos :: Down a -> Down a #

tan :: Down a -> Down a #

asin :: Down a -> Down a #

acos :: Down a -> Down a #

atan :: Down a -> Down a #

sinh :: Down a -> Down a #

cosh :: Down a -> Down a #

tanh :: Down a -> Down a #

asinh :: Down a -> Down a #

acosh :: Down a -> Down a #

atanh :: Down a -> Down a #

log1p :: Down a -> Down a #

expm1 :: Down a -> Down a #

log1pexp :: Down a -> Down a #

log1mexp :: Down a -> Down a #

Floating a => Floating (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

pi :: Op a b #

exp :: Op a b -> Op a b #

log :: Op a b -> Op a b #

sqrt :: Op a b -> Op a b #

(**) :: Op a b -> Op a b -> Op a b #

logBase :: Op a b -> Op a b -> Op a b #

sin :: Op a b -> Op a b #

cos :: Op a b -> Op a b #

tan :: Op a b -> Op a b #

asin :: Op a b -> Op a b #

acos :: Op a b -> Op a b #

atan :: Op a b -> Op a b #

sinh :: Op a b -> Op a b #

cosh :: Op a b -> Op a b #

tanh :: Op a b -> Op a b #

asinh :: Op a b -> Op a b #

acosh :: Op a b -> Op a b #

atanh :: Op a b -> Op a b #

log1p :: Op a b -> Op a b #

expm1 :: Op a b -> Op a b #

log1pexp :: Op a b -> Op a b #

log1mexp :: Op a b -> Op a b #

Floating a => Floating (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

pi :: Const a b #

exp :: Const a b -> Const a b #

log :: Const a b -> Const a b #

sqrt :: Const a b -> Const a b #

(**) :: Const a b -> Const a b -> Const a b #

logBase :: Const a b -> Const a b -> Const a b #

sin :: Const a b -> Const a b #

cos :: Const a b -> Const a b #

tan :: Const a b -> Const a b #

asin :: Const a b -> Const a b #

acos :: Const a b -> Const a b #

atan :: Const a b -> Const a b #

sinh :: Const a b -> Const a b #

cosh :: Const a b -> Const a b #

tanh :: Const a b -> Const a b #

asinh :: Const a b -> Const a b #

acosh :: Const a b -> Const a b #

atanh :: Const a b -> Const a b #

log1p :: Const a b -> Const a b #

expm1 :: Const a b -> Const a b #

log1pexp :: Const a b -> Const a b #

log1mexp :: Const a b -> Const a b #

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

Defined in Data.Tagged

Methods

pi :: Tagged s a #

exp :: Tagged s a -> Tagged s a #

log :: Tagged s a -> Tagged s a #

sqrt :: Tagged s a -> Tagged s a #

(**) :: Tagged s a -> Tagged s a -> Tagged s a #

logBase :: Tagged s a -> Tagged s a -> Tagged s a #

sin :: Tagged s a -> Tagged s a #

cos :: Tagged s a -> Tagged s a #

tan :: Tagged s a -> Tagged s a #

asin :: Tagged s a -> Tagged s a #

acos :: Tagged s a -> Tagged s a #

atan :: Tagged s a -> Tagged s a #

sinh :: Tagged s a -> Tagged s a #

cosh :: Tagged s a -> Tagged s a #

tanh :: Tagged s a -> Tagged s a #

asinh :: Tagged s a -> Tagged s a #

acosh :: Tagged s a -> Tagged s a #

atanh :: Tagged s a -> Tagged s a #

log1p :: Tagged s a -> Tagged s a #

expm1 :: Tagged s a -> Tagged s a #

log1pexp :: Tagged s a -> Tagged s a #

log1mexp :: Tagged s a -> Tagged s a #

class Num a => Fractional a where #

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 #

Fractional division.

recip :: a -> a #

Reciprocal fraction.

fromRational :: Rational -> a #

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 CDouble 
Instance details

Defined in Foreign.C.Types

Fractional CFloat 
Instance details

Defined in Foreign.C.Types

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 DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Fractional NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

RealFloat a => Fractional (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(/) :: Complex a -> Complex a -> Complex a #

recip :: Complex a -> Complex a #

fromRational :: Rational -> Complex a #

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

Methods

(/) :: Down a -> Down a -> Down a #

recip :: Down a -> Down a #

fromRational :: Rational -> Down a #

Integral a => Fractional (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(/) :: Ratio a -> Ratio a -> Ratio a #

recip :: Ratio a -> Ratio a #

fromRational :: Rational -> Ratio a #

HasResolution a => Fractional (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

(/) :: Fixed a -> Fixed a -> Fixed a #

recip :: Fixed a -> Fixed a #

fromRational :: Rational -> Fixed a #

Fractional a => Fractional (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

(/) :: Op a b -> Op a b -> Op a b #

recip :: Op a b -> Op a b #

fromRational :: Rational -> Op a b #

Fractional a => Fractional (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(/) :: Const a b -> Const a b -> Const a b #

recip :: Const a b -> Const a b #

fromRational :: Rational -> Const a b #

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

Defined in Data.Tagged

Methods

(/) :: Tagged s a -> Tagged s a -> Tagged s a #

recip :: Tagged s a -> Tagged s a #

fromRational :: Rational -> Tagged s a #

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

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 #

integer division truncated toward zero

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

integer remainder, satisfying

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

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

integer division truncated toward negative infinity

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

integer modulus, satisfying

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

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

simultaneous quot and rem

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

simultaneous div and mod

toInteger :: a -> Integer #

conversion to Integer

Instances

Instances details
Integral CBool 
Instance details

Defined in Foreign.C.Types

Integral CChar 
Instance details

Defined in Foreign.C.Types

Integral CInt 
Instance details

Defined in Foreign.C.Types

Methods

quot :: CInt -> CInt -> CInt #

rem :: CInt -> CInt -> CInt #

div :: CInt -> CInt -> CInt #

mod :: CInt -> CInt -> CInt #

quotRem :: CInt -> CInt -> (CInt, CInt) #

divMod :: CInt -> CInt -> (CInt, CInt) #

toInteger :: CInt -> Integer #

Integral CIntMax 
Instance details

Defined in Foreign.C.Types

Integral CIntPtr 
Instance details

Defined in Foreign.C.Types

Integral CLLong 
Instance details

Defined in Foreign.C.Types

Integral CLong 
Instance details

Defined in Foreign.C.Types

Integral CPtrdiff 
Instance details

Defined in Foreign.C.Types

Integral CSChar 
Instance details

Defined in Foreign.C.Types

Integral CShort 
Instance details

Defined in Foreign.C.Types

Integral CSigAtomic 
Instance details

Defined in Foreign.C.Types

Integral CSize 
Instance details

Defined in Foreign.C.Types

Integral CUChar 
Instance details

Defined in Foreign.C.Types

Integral CUInt 
Instance details

Defined in Foreign.C.Types

Integral CUIntMax 
Instance details

Defined in Foreign.C.Types

Integral CUIntPtr 
Instance details

Defined in Foreign.C.Types

Integral CULLong 
Instance details

Defined in Foreign.C.Types

Integral CULong 
Instance details

Defined in Foreign.C.Types

Integral CUShort 
Instance details

Defined in Foreign.C.Types

Integral CWchar 
Instance details

Defined in Foreign.C.Types

Integral IntPtr 
Instance details

Defined in Foreign.Ptr

Integral WordPtr 
Instance details

Defined in Foreign.Ptr

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 Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

quot :: Int8 -> Int8 -> Int8 #

rem :: Int8 -> Int8 -> Int8 #

div :: Int8 -> Int8 -> Int8 #

mod :: Int8 -> Int8 -> Int8 #

quotRem :: Int8 -> Int8 -> (Int8, Int8) #

divMod :: Int8 -> Int8 -> (Int8, Int8) #

toInteger :: Int8 -> Integer #

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Integral CBlkCnt 
Instance details

Defined in System.Posix.Types

Integral CBlkSize 
Instance details

Defined in System.Posix.Types

Integral CClockId 
Instance details

Defined in System.Posix.Types

Integral CDev 
Instance details

Defined in System.Posix.Types

Methods

quot :: CDev -> CDev -> CDev #

rem :: CDev -> CDev -> CDev #

div :: CDev -> CDev -> CDev #

mod :: CDev -> CDev -> CDev #

quotRem :: CDev -> CDev -> (CDev, CDev) #

divMod :: CDev -> CDev -> (CDev, CDev) #

toInteger :: CDev -> Integer #

Integral CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Integral CFsFilCnt 
Instance details

Defined in System.Posix.Types

Integral CGid 
Instance details

Defined in System.Posix.Types

Methods

quot :: CGid -> CGid -> CGid #

rem :: CGid -> CGid -> CGid #

div :: CGid -> CGid -> CGid #

mod :: CGid -> CGid -> CGid #

quotRem :: CGid -> CGid -> (CGid, CGid) #

divMod :: CGid -> CGid -> (CGid, CGid) #

toInteger :: CGid -> Integer #

Integral CId 
Instance details

Defined in System.Posix.Types

Methods

quot :: CId -> CId -> CId #

rem :: CId -> CId -> CId #

div :: CId -> CId -> CId #

mod :: CId -> CId -> CId #

quotRem :: CId -> CId -> (CId, CId) #

divMod :: CId -> CId -> (CId, CId) #

toInteger :: CId -> Integer #

Integral CIno 
Instance details

Defined in System.Posix.Types

Methods

quot :: CIno -> CIno -> CIno #

rem :: CIno -> CIno -> CIno #

div :: CIno -> CIno -> CIno #

mod :: CIno -> CIno -> CIno #

quotRem :: CIno -> CIno -> (CIno, CIno) #

divMod :: CIno -> CIno -> (CIno, CIno) #

toInteger :: CIno -> Integer #

Integral CKey 
Instance details

Defined in System.Posix.Types

Methods

quot :: CKey -> CKey -> CKey #

rem :: CKey -> CKey -> CKey #

div :: CKey -> CKey -> CKey #

mod :: CKey -> CKey -> CKey #

quotRem :: CKey -> CKey -> (CKey, CKey) #

divMod :: CKey -> CKey -> (CKey, CKey) #

toInteger :: CKey -> Integer #

Integral CMode 
Instance details

Defined in System.Posix.Types

Integral CNfds 
Instance details

Defined in System.Posix.Types

Integral CNlink 
Instance details

Defined in System.Posix.Types

Integral COff 
Instance details

Defined in System.Posix.Types

Methods

quot :: COff -> COff -> COff #

rem :: COff -> COff -> COff #

div :: COff -> COff -> COff #

mod :: COff -> COff -> COff #

quotRem :: COff -> COff -> (COff, COff) #

divMod :: COff -> COff -> (COff, COff) #

toInteger :: COff -> Integer #

Integral CPid 
Instance details

Defined in System.Posix.Types

Methods

quot :: CPid -> CPid -> CPid #

rem :: CPid -> CPid -> CPid #

div :: CPid -> CPid -> CPid #

mod :: CPid -> CPid -> CPid #

quotRem :: CPid -> CPid -> (CPid, CPid) #

divMod :: CPid -> CPid -> (CPid, CPid) #

toInteger :: CPid -> Integer #

Integral CRLim 
Instance details

Defined in System.Posix.Types

Integral CSocklen 
Instance details

Defined in System.Posix.Types

Integral CSsize 
Instance details

Defined in System.Posix.Types

Integral CTcflag 
Instance details

Defined in System.Posix.Types

Integral CUid 
Instance details

Defined in System.Posix.Types

Methods

quot :: CUid -> CUid -> CUid #

rem :: CUid -> CUid -> CUid #

div :: CUid -> CUid -> CUid #

mod :: CUid -> CUid -> CUid #

quotRem :: CUid -> CUid -> (CUid, CUid) #

divMod :: CUid -> CUid -> (CUid, CUid) #

toInteger :: CUid -> Integer #

Integral Fd 
Instance details

Defined in System.Posix.Types

Methods

quot :: Fd -> Fd -> Fd #

rem :: Fd -> Fd -> Fd #

div :: Fd -> Fd -> Fd #

mod :: Fd -> Fd -> Fd #

quotRem :: Fd -> Fd -> (Fd, Fd) #

divMod :: Fd -> Fd -> (Fd, Fd) #

toInteger :: Fd -> Integer #

Integral I16 
Instance details

Defined in Data.Text.Foreign

Methods

quot :: I16 -> I16 -> I16 #

rem :: I16 -> I16 -> I16 #

div :: I16 -> I16 -> I16 #

mod :: I16 -> I16 -> I16 #

quotRem :: I16 -> I16 -> (I16, I16) #

divMod :: I16 -> I16 -> (I16, I16) #

toInteger :: I16 -> Integer #

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 Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

quot :: Int -> Int -> Int #

rem :: Int -> Int -> Int #

div :: Int -> Int -> Int #

mod :: Int -> Int -> Int #

quotRem :: Int -> Int -> (Int, Int) #

divMod :: Int -> Int -> (Int, Int) #

toInteger :: Int -> Integer #

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

quot :: Word -> Word -> Word #

rem :: Word -> Word -> Word #

div :: Word -> Word -> Word #

mod :: Word -> Word -> Word #

quotRem :: Word -> Word -> (Word, Word) #

divMod :: Word -> Word -> (Word, Word) #

toInteger :: Word -> Integer #

Integral a => Integral (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Integral a => Integral (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

quot :: Const a b -> Const a b -> Const a b #

rem :: Const a b -> Const a b -> Const a b #

div :: Const a b -> Const a b -> Const a b #

mod :: Const a b -> Const a b -> Const a b #

quotRem :: Const a b -> Const a b -> (Const a b, Const a b) #

divMod :: Const a b -> Const a b -> (Const a b, Const a b) #

toInteger :: Const a b -> Integer #

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

Defined in Data.Tagged

Methods

quot :: Tagged s a -> Tagged s a -> Tagged s a #

rem :: Tagged s a -> Tagged s a -> Tagged s a #

div :: Tagged s a -> Tagged s a -> Tagged s a #

mod :: Tagged s a -> Tagged s a -> Tagged s a #

quotRem :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) #

divMod :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) #

toInteger :: Tagged s a -> Integer #

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

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 #

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 #

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 #

Inject a value into the monadic type.

Instances

Instances details
Monad Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

(>>=) :: Complex a -> (a -> Complex b) -> Complex b #

(>>) :: Complex a -> Complex b -> Complex b #

return :: a -> Complex a #

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(>>=) :: Identity a -> (a -> Identity b) -> Identity b #

(>>) :: Identity a -> Identity b -> Identity b #

return :: a -> Identity a #

Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b #

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(>>=) :: Down a -> (a -> Down b) -> Down b #

(>>) :: Down a -> Down b -> Down b #

return :: a -> Down a #

Monad First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

Monad Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b #

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

Monad Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Max a -> (a -> Max b) -> Max b #

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

return :: a -> Max a #

Monad Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Min a -> (a -> Min b) -> Min b #

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

return :: a -> Min a #

Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Dual a -> (a -> Dual b) -> Dual b #

(>>) :: Dual a -> Dual b -> Dual b #

return :: a -> Dual a #

Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Product a -> (a -> Product b) -> Product b #

(>>) :: Product a -> Product b -> Product b #

return :: a -> Product a #

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Sum a -> (a -> Sum b) -> Sum b #

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

return :: a -> Sum a #

Monad STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(>>=) :: STM a -> (a -> STM b) -> STM b #

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

return :: a -> STM a #

Monad NoIO

Since: base-4.4.0.0

Instance details

Defined in GHC.GHCi

Methods

(>>=) :: NoIO a -> (a -> NoIO b) -> NoIO b #

(>>) :: NoIO a -> NoIO b -> NoIO b #

return :: a -> NoIO a #

Monad Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b #

(>>) :: Par1 a -> Par1 b -> Par1 b #

return :: a -> Par1 a #

Monad P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

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

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

return :: a -> P a #

Monad ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

(>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b #

(>>) :: ReadP a -> ReadP b -> ReadP b #

return :: a -> ReadP a #

Monad ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

(>>=) :: ReadPrec a -> (a -> ReadPrec b) -> ReadPrec b #

(>>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

return :: a -> ReadPrec a #

Monad Put 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

(>>=) :: Put a -> (a -> Put b) -> Put b #

(>>) :: Put a -> Put b -> Put b #

return :: a -> Put a #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

(>>=) :: Seq a -> (a -> Seq b) -> Seq b #

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

return :: a -> Seq a #

Monad Tree 
Instance details

Defined in Data.Tree

Methods

(>>=) :: Tree a -> (a -> Tree b) -> Tree b #

(>>) :: Tree a -> Tree b -> Tree b #

return :: a -> Tree a #

Monad DList 
Instance details

Defined in Data.DList.Internal

Methods

(>>=) :: DList a -> (a -> DList b) -> DList b #

(>>) :: DList a -> DList b -> DList b #

return :: a -> DList a #

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: IO a -> (a -> IO b) -> IO b #

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

return :: a -> IO a #

Monad Array 
Instance details

Defined in Data.Primitive.Array

Methods

(>>=) :: Array a -> (a -> Array b) -> Array b #

(>>) :: Array a -> Array b -> Array b #

return :: a -> Array a #

Monad SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

(>>=) :: SmallArray a -> (a -> SmallArray b) -> SmallArray b #

(>>) :: SmallArray a -> SmallArray b -> SmallArray b #

return :: a -> SmallArray a #

Monad Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(>>=) :: Q a -> (a -> Q b) -> Q b #

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

return :: a -> Q a #

Monad Vector 
Instance details

Defined in Data.Vector

Methods

(>>=) :: Vector a -> (a -> Vector b) -> Vector b #

(>>) :: Vector a -> Vector b -> Vector b #

return :: a -> Vector a #

Monad Id 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

(>>=) :: Id a -> (a -> Id b) -> Id b #

(>>) :: Id a -> Id b -> Id b #

return :: a -> Id a #

Monad Box 
Instance details

Defined in Data.Stream.Monadic

Methods

(>>=) :: Box a -> (a -> Box b) -> Box b #

(>>) :: Box a -> Box b -> Box b #

return :: a -> Box a #

Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b #

(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

return :: a -> NonEmpty a #

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #

(>>) :: Maybe a -> Maybe b -> Maybe b #

return :: a -> Maybe a #

Monad Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

(>>=) :: Solo a -> (a -> Solo b) -> Solo b #

(>>) :: Solo a -> Solo b -> Solo b #

return :: a -> Solo a #

Monad []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> [a] #

Representable f => Monad (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

(>>=) :: Co f a -> (a -> Co f b) -> Co f b #

(>>) :: Co f a -> Co f b -> Co f b #

return :: a -> Co f a #

Monad m => Monad (WrappedMonad m)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #

(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

return :: a -> WrappedMonad m a #

ArrowApply a => Monad (ArrowMonad a)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b #

(>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

return :: a0 -> ArrowMonad a a0 #

Monad (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

(>>=) :: ST s a -> (a -> ST s b) -> ST s b #

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

return :: a -> ST s a #

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b #

(>>) :: Either e a -> Either e b -> Either e b #

return :: a -> Either e a #

Monad (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b #

(>>) :: Proxy a -> Proxy b -> Proxy b #

return :: a -> Proxy a #

Monad (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: U1 a -> (a -> U1 b) -> U1 b #

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

return :: a -> U1 a #

Monad (ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

(>>=) :: ST s a -> (a -> ST s b) -> ST s b #

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

return :: a -> ST s a #

Monad (SetM s) 
Instance details

Defined in Data.Graph

Methods

(>>=) :: SetM s a -> (a -> SetM s b) -> SetM s b #

(>>) :: SetM s a -> SetM s b -> SetM s b #

return :: a -> SetM s a #

Alternative f => Monad (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

(>>=) :: Cofree f a -> (a -> Cofree f b) -> Cofree f b #

(>>) :: Cofree f a -> Cofree f b -> Cofree f b #

return :: a -> Cofree f a #

Functor f => Monad (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

(>>=) :: Free f a -> (a -> Free f b) -> Free f b #

(>>) :: Free f a -> Free f b -> Free f b #

return :: a -> Free f a #

Monad f => Monad (SelectM f) 
Instance details

Defined in Control.Selective

Methods

(>>=) :: SelectM f a -> (a -> SelectM f b) -> SelectM f b #

(>>) :: SelectM f a -> SelectM f b -> SelectM f b #

return :: a -> SelectM f a #

Monad m => Monad (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #

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

return :: a -> MaybeT m a #

Monoid a => Monad ((,) a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

Monad m => Monad (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

(>>=) :: Kleisli m a a0 -> (a0 -> Kleisli m a b) -> Kleisli m a b #

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

return :: a0 -> Kleisli m a a0 #

Monad f => Monad (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b #

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

return :: a -> Ap f a #

Monad f => Monad (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b #

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

return :: a -> Alt f a #

Monad f => Monad (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Rec1 f a -> (a -> Rec1 f b) -> Rec1 f b #

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

return :: a -> Rec1 f a #

(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

Methods

(>>=) :: WhenMissing f x a -> (a -> WhenMissing f x b) -> WhenMissing f x b #

(>>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

return :: a -> WhenMissing f x a #

(Functor f, Monad m) => Monad (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(>>=) :: FreeT f m a -> (a -> FreeT f m b) -> FreeT f m b #

(>>) :: FreeT f m a -> FreeT f m b -> FreeT f m b #

return :: a -> FreeT f m a #

Monad m => Monad (WrappedFunctor m) 
Instance details

Defined in Data.Functor.Invariant

Methods

(>>=) :: WrappedFunctor m a -> (a -> WrappedFunctor m b) -> WrappedFunctor m b #

(>>) :: WrappedFunctor m a -> WrappedFunctor m b -> WrappedFunctor m b #

return :: a -> WrappedFunctor m a #

(Monad (Rep p), Representable p) => Monad (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

(>>=) :: Prep p a -> (a -> Prep p b) -> Prep p b #

(>>) :: Prep p a -> Prep p b -> Prep p b #

return :: a -> Prep p a #

Monad (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

(>>=) :: Tagged s a -> (a -> Tagged s b) -> Tagged s b #

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

return :: a -> Tagged s a #

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

Defined in Control.Monad.Trans.Error

Methods

(>>=) :: ErrorT e m a -> (a -> ErrorT e m b) -> ErrorT e m b #

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

return :: a -> ErrorT e m a #

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

Defined in Control.Monad.Trans.Except

Methods

(>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b #

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

return :: a -> ExceptT e m a #

Monad m => Monad (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

(>>=) :: IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b #

(>>) :: IdentityT m a -> IdentityT m b -> IdentityT m b #

return :: a -> IdentityT m a #

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

Defined in Control.Monad.Trans.Reader

Methods

(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b #

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

return :: a -> ReaderT r m a #

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

Defined in Control.Monad.Trans.State.Lazy

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

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

return :: a -> StateT s m a #

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

Defined in Control.Monad.Trans.State.Strict

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

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

return :: a -> StateT s m a #

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

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

return :: a -> WriterT w m a #

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

Defined in Control.Monad.Trans.Writer.Strict

Methods

(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

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

return :: a -> WriterT w m a #

Monad m => Monad (Reverse m)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

(>>=) :: Reverse m a -> (a -> Reverse m b) -> Reverse m b #

(>>) :: Reverse m a -> Reverse m b -> Reverse m b #

return :: a -> Reverse m a #

(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) #

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

(>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b #

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

return :: a -> Product f g a #

(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 #

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

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

Monad (Cokleisli w a) 
Instance details

Defined in Control.Comonad

Methods

(>>=) :: Cokleisli w a a0 -> (a0 -> Cokleisli w a b) -> Cokleisli w a b #

(>>) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a b #

return :: a0 -> Cokleisli w a a0 #

(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

Methods

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

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

return :: a -> WhenMatched f x y a #

(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

Methods

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

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

return :: a -> WhenMissing f k x a #

Monad (Costar f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

(>>=) :: Costar f a a0 -> (a0 -> Costar f a b) -> Costar f a b #

(>>) :: Costar f a a0 -> Costar f a b -> Costar f a b #

return :: a0 -> Costar f a a0 #

Monad f => Monad (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

(>>=) :: Star f a a0 -> (a0 -> Star f a b) -> Star f a b #

(>>) :: Star f a a0 -> Star f a b -> Star f a b #

return :: a0 -> Star f a a0 #

Monad (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

(>>=) :: ContT r m a -> (a -> ContT r m b) -> ContT r m b #

(>>) :: ContT r m a -> ContT r m b -> ContT r m b #

return :: a -> ContT r m a #

(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) #

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

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

Monad ((->) r)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> r -> a #

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 #

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

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

(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

Methods

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

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

return :: a -> WhenMatched f k x y a #

(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 #

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

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

(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 #

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

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

class Typeable a => Data a where #

The Data class comprehends a fundamental primitive gfoldl for folding over constructor applications, say terms. This primitive can be instantiated in several ways to map over the immediate subterms of a term; see the gmap combinators later in this class. Indeed, a generic programmer does not necessarily need to use the ingenious gfoldl primitive but rather the intuitive gmap combinators. The gfoldl primitive is completed by means to query top-level constructors, to turn constructor representations into proper terms, and to list all possible datatype constructors. This completion allows us to serve generic programming scenarios like read, show, equality, term generation.

The combinators gmapT, gmapQ, gmapM, etc are all provided with default definitions in terms of gfoldl, leaving open the opportunity to provide datatype-specific definitions. (The inclusion of the gmap combinators as members of class Data allows the programmer or the compiler to derive specialised, and maybe more efficient code per datatype. Note: gfoldl is more higher-order than the gmap combinators. This is subject to ongoing benchmarking experiments. It might turn out that the gmap combinators will be moved out of the class Data.)

Conceptually, the definition of the gmap combinators in terms of the primitive gfoldl requires the identification of the gfoldl function arguments. Technically, we also need to identify the type constructor c for the construction of the result type from the folded term type.

In the definition of gmapQx combinators, we use phantom type constructors for the c in the type of gfoldl because the result type of a query does not involve the (polymorphic) type of the term argument. In the definition of gmapQl we simply use the plain constant type constructor because gfoldl is left-associative anyway and so it is readily suited to fold a left-associative binary operation over the immediate subterms. In the definition of gmapQr, extra effort is needed. We use a higher-order accumulation trick to mediate between left-associative constructor application vs. right-associative binary operation (e.g., (:)). When the query is meant to compute a value of type r, then the result type within generic folding is r -> r. So the result of folding is a function to which we finally pass the right unit.

With the -XDeriveDataTypeable option, GHC can generate instances of the Data class automatically. For example, given the declaration

data T a b = C1 a b | C2 deriving (Typeable, Data)

GHC will generate an instance that is equivalent to

instance (Data a, Data b) => Data (T a b) where
    gfoldl k z (C1 a b) = z C1 `k` a `k` b
    gfoldl k z C2       = z C2

    gunfold k z c = case constrIndex c of
                        1 -> k (k (z C1))
                        2 -> z C2

    toConstr (C1 _ _) = con_C1
    toConstr C2       = con_C2

    dataTypeOf _ = ty_T

con_C1 = mkConstr ty_T "C1" [] Prefix
con_C2 = mkConstr ty_T "C2" [] Prefix
ty_T   = mkDataType "Module.T" [con_C1, con_C2]

This is suitable for datatypes that are exported transparently.

Minimal complete definition

gunfold, toConstr, dataTypeOf

Methods

gfoldl #

Arguments

:: (forall d b. Data d => c (d -> b) -> d -> c b)

defines how nonempty constructor applications are folded. It takes the folded tail of the constructor application and its head, i.e., an immediate subterm, and combines them in some way.

-> (forall g. g -> c g)

defines how the empty constructor application is folded, like the neutral / start element for list folding.

-> a

structure to be folded.

-> c a

result, with a type defined in terms of a, but variability is achieved by means of type constructor c for the construction of the actual result type.

Left-associative fold operation for constructor applications.

The type of gfoldl is a headache, but operationally it is a simple generalisation of a list fold.

The default definition for gfoldl is const id, which is suitable for abstract datatypes with no substructures.

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a #

Unfolding constructor applications

toConstr :: a -> Constr #

Obtaining the constructor from a given datum. For proper terms, this is meant to be the top-level constructor. Primitive datatypes are here viewed as potentially infinite sets of values (i.e., constructors).

dataTypeOf :: a -> DataType #

The outer type constructor of the type

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a) #

Mediate types and unary type constructors.

In Data instances of the form

    instance (Data a, ...) => Data (T a)

dataCast1 should be defined as gcast1.

The default definition is const Nothing, which is appropriate for instances of other forms.

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a) #

Mediate types and binary type constructors.

In Data instances of the form

    instance (Data a, Data b, ...) => Data (T a b)

dataCast2 should be defined as gcast2.

The default definition is const Nothing, which is appropriate for instances of other forms.

gmapT :: (forall b. Data b => b -> b) -> a -> a #

A generic transformation that maps over the immediate subterms

The default definition instantiates the type constructor c in the type of gfoldl to an identity datatype constructor, using the isomorphism pair as injection and projection.

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r #

A generic query with a left-associative binary operator

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r #

A generic query with a right-associative binary operator

gmapQ :: (forall d. Data d => d -> u) -> a -> [u] #

A generic query that processes the immediate subterms and returns a list of results. The list is given in the same order as originally specified in the declaration of the data constructors.

gmapQi :: Int -> (forall d. Data d => d -> u) -> a -> u #

A generic query that processes one child by index (zero-based)

gmapM :: Monad m => (forall d. Data d => d -> m d) -> a -> m a #

A generic monadic transformation that maps over the immediate subterms

The default definition instantiates the type constructor c in the type of gfoldl to the monad datatype constructor, defining injection and projection using return and >>=.

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a #

Transformation of at least one immediate subterm does not fail

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a #

Transformation of one immediate subterm with success

Instances

Instances details
Data All

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> All -> c All #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c All #

toConstr :: All -> Constr #

dataTypeOf :: All -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c All) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c All) #

gmapT :: (forall b. Data b => b -> b) -> All -> All #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> All -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> All -> r #

gmapQ :: (forall d. Data d => d -> u) -> All -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> All -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> All -> m All #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> All -> m All #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> All -> m All #

Data Any

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Any -> c Any #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Any #

toConstr :: Any -> Constr #

dataTypeOf :: Any -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Any) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Any) #

gmapT :: (forall b. Data b => b -> b) -> Any -> Any #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Any -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Any -> r #

gmapQ :: (forall d. Data d => d -> u) -> Any -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Any -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Any -> m Any #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Any -> m Any #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Any -> m Any #

Data Version

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Version -> c Version #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Version #

toConstr :: Version -> Constr #

dataTypeOf :: Version -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Version) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Version) #

gmapT :: (forall b. Data b => b -> b) -> Version -> Version #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r #

gmapQ :: (forall d. Data d => d -> u) -> Version -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Version -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Version -> m Version #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version #

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 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Void #

toConstr :: Void -> Constr #

dataTypeOf :: Void -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Void) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void) #

gmapT :: (forall b. Data b => b -> b) -> Void -> Void #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r #

gmapQ :: (forall d. Data d => d -> u) -> Void -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Void -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Void -> m Void #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void #

Data IntPtr

Since: base-4.11.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntPtr -> c IntPtr #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntPtr #

toConstr :: IntPtr -> Constr #

dataTypeOf :: IntPtr -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntPtr) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntPtr) #

gmapT :: (forall b. Data b => b -> b) -> IntPtr -> IntPtr #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntPtr -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntPtr -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntPtr -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntPtr -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntPtr -> m IntPtr #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntPtr -> m IntPtr #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntPtr -> m IntPtr #

Data WordPtr

Since: base-4.11.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WordPtr -> c WordPtr #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WordPtr #

toConstr :: WordPtr -> Constr #

dataTypeOf :: WordPtr -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WordPtr) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WordPtr) #

gmapT :: (forall b. Data b => b -> b) -> WordPtr -> WordPtr #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WordPtr -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WordPtr -> r #

gmapQ :: (forall d. Data d => d -> u) -> WordPtr -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WordPtr -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WordPtr -> m WordPtr #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WordPtr -> m WordPtr #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WordPtr -> m WordPtr #

Data SpecConstrAnnotation

Since: base-4.3.0.0

Instance details

Defined in GHC.Exts

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpecConstrAnnotation -> c SpecConstrAnnotation #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpecConstrAnnotation #

toConstr :: SpecConstrAnnotation -> Constr #

dataTypeOf :: SpecConstrAnnotation -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpecConstrAnnotation) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpecConstrAnnotation) #

gmapT :: (forall b. Data b => b -> b) -> SpecConstrAnnotation -> SpecConstrAnnotation #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpecConstrAnnotation -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpecConstrAnnotation -> r #

gmapQ :: (forall d. Data d => d -> u) -> SpecConstrAnnotation -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SpecConstrAnnotation -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpecConstrAnnotation -> m SpecConstrAnnotation #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpecConstrAnnotation -> m SpecConstrAnnotation #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpecConstrAnnotation -> m SpecConstrAnnotation #

Data Associativity

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Associativity -> c Associativity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Associativity #

toConstr :: Associativity -> Constr #

dataTypeOf :: Associativity -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Associativity) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Associativity) #

gmapT :: (forall b. Data b => b -> b) -> Associativity -> Associativity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Associativity -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Associativity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Associativity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Associativity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Associativity -> m Associativity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Associativity -> m Associativity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Associativity -> m Associativity #

Data DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DecidedStrictness -> c DecidedStrictness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DecidedStrictness #

toConstr :: DecidedStrictness -> Constr #

dataTypeOf :: DecidedStrictness -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DecidedStrictness) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DecidedStrictness) #

gmapT :: (forall b. Data b => b -> b) -> DecidedStrictness -> DecidedStrictness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DecidedStrictness -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DecidedStrictness -> r #

gmapQ :: (forall d. Data d => d -> u) -> DecidedStrictness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DecidedStrictness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DecidedStrictness -> m DecidedStrictness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DecidedStrictness -> m DecidedStrictness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DecidedStrictness -> m DecidedStrictness #

Data Fixity

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity #

toConstr :: Fixity -> Constr #

dataTypeOf :: Fixity -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) #

gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

Data SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceStrictness -> c SourceStrictness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceStrictness #

toConstr :: SourceStrictness -> Constr #

dataTypeOf :: SourceStrictness -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceStrictness) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceStrictness) #

gmapT :: (forall b. Data b => b -> b) -> SourceStrictness -> SourceStrictness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceStrictness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceStrictness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness #

Data SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceUnpackedness -> c SourceUnpackedness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceUnpackedness #

toConstr :: SourceUnpackedness -> Constr #

dataTypeOf :: SourceUnpackedness -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceUnpackedness) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceUnpackedness) #

gmapT :: (forall b. Data b => b -> b) -> SourceUnpackedness -> SourceUnpackedness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceUnpackedness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceUnpackedness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness #

Data Int16

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int16 -> c Int16 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int16 #

toConstr :: Int16 -> Constr #

dataTypeOf :: Int16 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int16) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int16) #

gmapT :: (forall b. Data b => b -> b) -> Int16 -> Int16 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int16 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int16 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int16 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int16 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 #

Data Int32

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int32 -> c Int32 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int32 #

toConstr :: Int32 -> Constr #

dataTypeOf :: Int32 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int32) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int32) #

gmapT :: (forall b. Data b => b -> b) -> Int32 -> Int32 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int32 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int32 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #

Data Int64

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int64 -> c Int64 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int64 #

toConstr :: Int64 -> Constr #

dataTypeOf :: Int64 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int64) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int64) #

gmapT :: (forall b. Data b => b -> b) -> Int64 -> Int64 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int64 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int64 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #

Data Int8

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int8 -> c Int8 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int8 #

toConstr :: Int8 -> Constr #

dataTypeOf :: Int8 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int8) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int8) #

gmapT :: (forall b. Data b => b -> b) -> Int8 -> Int8 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int8 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int8 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int8 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int8 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 #

Data Word16

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word16 -> c Word16 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word16 #

toConstr :: Word16 -> Constr #

dataTypeOf :: Word16 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word16) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word16) #

gmapT :: (forall b. Data b => b -> b) -> Word16 -> Word16 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word16 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word16 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 #

Data Word32

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word32 -> c Word32 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word32 #

toConstr :: Word32 -> Constr #

dataTypeOf :: Word32 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word32) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word32) #

gmapT :: (forall b. Data b => b -> b) -> Word32 -> Word32 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word32 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word32 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #

Data Word64

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word64 -> c Word64 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word64 #

toConstr :: Word64 -> Constr #

dataTypeOf :: Word64 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word64) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word64) #

gmapT :: (forall b. Data b => b -> b) -> Word64 -> Word64 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word64 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word64 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #

Data Word8

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word8 -> c Word8 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word8 #

toConstr :: Word8 -> Constr #

dataTypeOf :: Word8 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word8) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word8) #

gmapT :: (forall b. Data b => b -> b) -> Word8 -> Word8 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word8 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word8 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #

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 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString #

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

Data ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteString -> c ByteString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString #

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

Data ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ShortByteString -> c ShortByteString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ShortByteString #

toConstr :: ShortByteString -> Constr #

dataTypeOf :: ShortByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ShortByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ShortByteString) #

gmapT :: (forall b. Data b => b -> b) -> ShortByteString -> ShortByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ShortByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ShortByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ShortByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ShortByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ShortByteString -> m ShortByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ShortByteString -> m ShortByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ShortByteString -> m ShortByteString #

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 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntSet #

toConstr :: IntSet -> Constr #

dataTypeOf :: IntSet -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntSet) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntSet) #

gmapT :: (forall b. Data b => b -> b) -> IntSet -> IntSet #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntSet -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntSet -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

Data ByteArray 
Instance details

Defined in Data.Array.Byte

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteArray -> c ByteArray #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteArray #

toConstr :: ByteArray -> Constr #

dataTypeOf :: ByteArray -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteArray) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteArray) #

gmapT :: (forall b. Data b => b -> b) -> ByteArray -> ByteArray #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteArray -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteArray -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteArray -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteArray -> m ByteArray #

Data Ordering

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ordering -> c Ordering #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering #

toConstr :: Ordering -> Constr #

dataTypeOf :: Ordering -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Ordering) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ordering) #

gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

Data Scientific 
Instance details

Defined in Data.Scientific

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Scientific -> c Scientific #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Scientific #

toConstr :: Scientific -> Constr #

dataTypeOf :: Scientific -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Scientific) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Scientific) #

gmapT :: (forall b. Data b => b -> b) -> Scientific -> Scientific #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Scientific -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Scientific -> r #

gmapQ :: (forall d. Data d => d -> u) -> Scientific -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Scientific -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Scientific -> m Scientific #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Scientific -> m Scientific #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Scientific -> m Scientific #

Data AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnLookup -> c AnnLookup #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnLookup #

toConstr :: AnnLookup -> Constr #

dataTypeOf :: AnnLookup -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnLookup) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnLookup) #

gmapT :: (forall b. Data b => b -> b) -> AnnLookup -> AnnLookup #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnLookup -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnLookup -> r #

gmapQ :: (forall d. Data d => d -> u) -> AnnLookup -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnLookup -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnLookup -> m AnnLookup #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnLookup -> m AnnLookup #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnLookup -> m AnnLookup #

Data AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnTarget -> c AnnTarget #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnTarget #

toConstr :: AnnTarget -> Constr #

dataTypeOf :: AnnTarget -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnTarget) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnTarget) #

gmapT :: (forall b. Data b => b -> b) -> AnnTarget -> AnnTarget #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnTarget -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnTarget -> r #

gmapQ :: (forall d. Data d => d -> u) -> AnnTarget -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnTarget -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnTarget -> m AnnTarget #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnTarget -> m AnnTarget #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnTarget -> m AnnTarget #

Data Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bang -> c Bang #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bang #

toConstr :: Bang -> Constr #

dataTypeOf :: Bang -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bang) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bang) #

gmapT :: (forall b. Data b => b -> b) -> Bang -> Bang #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bang -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bang -> r #

gmapQ :: (forall d. Data d => d -> u) -> Bang -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Bang -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bang -> m Bang #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bang -> m Bang #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bang -> m Bang #

Data Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Body -> c Body #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Body #

toConstr :: Body -> Constr #

dataTypeOf :: Body -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Body) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Body) #

gmapT :: (forall b. Data b => b -> b) -> Body -> Body #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Body -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Body -> r #

gmapQ :: (forall d. Data d => d -> u) -> Body -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Body -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Body -> m Body #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Body -> m Body #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Body -> m Body #

Data Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bytes -> c Bytes #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bytes #

toConstr :: Bytes -> Constr #

dataTypeOf :: Bytes -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bytes) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bytes) #

gmapT :: (forall b. Data b => b -> b) -> Bytes -> Bytes #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bytes -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bytes -> r #

gmapQ :: (forall d. Data d => d -> u) -> Bytes -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Bytes -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bytes -> m Bytes #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bytes -> m Bytes #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bytes -> m Bytes #

Data Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Callconv -> c Callconv #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Callconv #

toConstr :: Callconv -> Constr #

dataTypeOf :: Callconv -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Callconv) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Callconv) #

gmapT :: (forall b. Data b => b -> b) -> Callconv -> Callconv #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Callconv -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Callconv -> r #

gmapQ :: (forall d. Data d => d -> u) -> Callconv -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Callconv -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Callconv -> m Callconv #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Callconv -> m Callconv #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Callconv -> m Callconv #

Data Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Clause -> c Clause #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Clause #

toConstr :: Clause -> Constr #

dataTypeOf :: Clause -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Clause) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Clause) #

gmapT :: (forall b. Data b => b -> b) -> Clause -> Clause #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Clause -> r #

gmapQ :: (forall d. Data d => d -> u) -> Clause -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Clause -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Clause -> m Clause #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Clause -> m Clause #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Clause -> m Clause #

Data Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Con -> c Con #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Con #

toConstr :: Con -> Constr #

dataTypeOf :: Con -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Con) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Con) #

gmapT :: (forall b. Data b => b -> b) -> Con -> Con #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Con -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Con -> r #

gmapQ :: (forall d. Data d => d -> u) -> Con -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Con -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Con -> m Con #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Con -> m Con #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Con -> m Con #

Data Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Dec -> c Dec #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Dec #

toConstr :: Dec -> Constr #

dataTypeOf :: Dec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Dec) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Dec) #

gmapT :: (forall b. Data b => b -> b) -> Dec -> Dec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Dec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Dec -> r #

gmapQ :: (forall d. Data d => d -> u) -> Dec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Dec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Dec -> m Dec #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Dec -> m Dec #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Dec -> m Dec #

Data DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DecidedStrictness -> c DecidedStrictness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DecidedStrictness #

toConstr :: DecidedStrictness -> Constr #

dataTypeOf :: DecidedStrictness -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DecidedStrictness) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DecidedStrictness) #

gmapT :: (forall b. Data b => b -> b) -> DecidedStrictness -> DecidedStrictness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DecidedStrictness -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DecidedStrictness -> r #

gmapQ :: (forall d. Data d => d -> u) -> DecidedStrictness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DecidedStrictness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DecidedStrictness -> m DecidedStrictness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DecidedStrictness -> m DecidedStrictness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DecidedStrictness -> m DecidedStrictness #

Data DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DerivClause -> c DerivClause #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DerivClause #

toConstr :: DerivClause -> Constr #

dataTypeOf :: DerivClause -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DerivClause) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DerivClause) #

gmapT :: (forall b. Data b => b -> b) -> DerivClause -> DerivClause #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DerivClause -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DerivClause -> r #

gmapQ :: (forall d. Data d => d -> u) -> DerivClause -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DerivClause -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DerivClause -> m DerivClause #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DerivClause -> m DerivClause #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DerivClause -> m DerivClause #

Data DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DerivStrategy -> c DerivStrategy #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DerivStrategy #

toConstr :: DerivStrategy -> Constr #

dataTypeOf :: DerivStrategy -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DerivStrategy) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DerivStrategy) #

gmapT :: (forall b. Data b => b -> b) -> DerivStrategy -> DerivStrategy #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DerivStrategy -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DerivStrategy -> r #

gmapQ :: (forall d. Data d => d -> u) -> DerivStrategy -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DerivStrategy -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DerivStrategy -> m DerivStrategy #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DerivStrategy -> m DerivStrategy #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DerivStrategy -> m DerivStrategy #

Data DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DocLoc -> c DocLoc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DocLoc #

toConstr :: DocLoc -> Constr #

dataTypeOf :: DocLoc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DocLoc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DocLoc) #

gmapT :: (forall b. Data b => b -> b) -> DocLoc -> DocLoc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DocLoc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DocLoc -> r #

gmapQ :: (forall d. Data d => d -> u) -> DocLoc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DocLoc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DocLoc -> m DocLoc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DocLoc -> m DocLoc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DocLoc -> m DocLoc #

Data Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Exp -> c Exp #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Exp #

toConstr :: Exp -> Constr #

dataTypeOf :: Exp -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Exp) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Exp) #

gmapT :: (forall b. Data b => b -> b) -> Exp -> Exp #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Exp -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Exp -> r #

gmapQ :: (forall d. Data d => d -> u) -> Exp -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Exp -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Exp -> m Exp #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Exp -> m Exp #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Exp -> m Exp #

Data FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FamilyResultSig -> c FamilyResultSig #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FamilyResultSig #

toConstr :: FamilyResultSig -> Constr #

dataTypeOf :: FamilyResultSig -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FamilyResultSig) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FamilyResultSig) #

gmapT :: (forall b. Data b => b -> b) -> FamilyResultSig -> FamilyResultSig #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FamilyResultSig -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FamilyResultSig -> r #

gmapQ :: (forall d. Data d => d -> u) -> FamilyResultSig -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FamilyResultSig -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FamilyResultSig -> m FamilyResultSig #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FamilyResultSig -> m FamilyResultSig #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FamilyResultSig -> m FamilyResultSig #

Data Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity #

toConstr :: Fixity -> Constr #

dataTypeOf :: Fixity -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) #

gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity #

Data FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FixityDirection -> c FixityDirection #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FixityDirection #

toConstr :: FixityDirection -> Constr #

dataTypeOf :: FixityDirection -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FixityDirection) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FixityDirection) #

gmapT :: (forall b. Data b => b -> b) -> FixityDirection -> FixityDirection #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FixityDirection -> r #

gmapQ :: (forall d. Data d => d -> u) -> FixityDirection -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FixityDirection -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FixityDirection -> m FixityDirection #

Data Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Foreign -> c Foreign #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Foreign #

toConstr :: Foreign -> Constr #

dataTypeOf :: Foreign -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Foreign) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Foreign) #

gmapT :: (forall b. Data b => b -> b) -> Foreign -> Foreign #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Foreign -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Foreign -> r #

gmapQ :: (forall d. Data d => d -> u) -> Foreign -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Foreign -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Foreign -> m Foreign #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Foreign -> m Foreign #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Foreign -> m Foreign #

Data FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunDep -> c FunDep #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunDep #

toConstr :: FunDep -> Constr #

dataTypeOf :: FunDep -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunDep) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunDep) #

gmapT :: (forall b. Data b => b -> b) -> FunDep -> FunDep #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunDep -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunDep -> r #

gmapQ :: (forall d. Data d => d -> u) -> FunDep -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FunDep -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunDep -> m FunDep #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunDep -> m FunDep #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunDep -> m FunDep #

Data Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Guard -> c Guard #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Guard #

toConstr :: Guard -> Constr #

dataTypeOf :: Guard -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Guard) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Guard) #

gmapT :: (forall b. Data b => b -> b) -> Guard -> Guard #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Guard -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Guard -> r #

gmapQ :: (forall d. Data d => d -> u) -> Guard -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Guard -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Guard -> m Guard #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Guard -> m Guard #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Guard -> m Guard #

Data Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Info -> c Info #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Info #

toConstr :: Info -> Constr #

dataTypeOf :: Info -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Info) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Info) #

gmapT :: (forall b. Data b => b -> b) -> Info -> Info #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Info -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Info -> r #

gmapQ :: (forall d. Data d => d -> u) -> Info -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Info -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Info -> m Info #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Info -> m Info #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Info -> m Info #

Data InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InjectivityAnn -> c InjectivityAnn #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InjectivityAnn #

toConstr :: InjectivityAnn -> Constr #

dataTypeOf :: InjectivityAnn -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InjectivityAnn) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InjectivityAnn) #

gmapT :: (forall b. Data b => b -> b) -> InjectivityAnn -> InjectivityAnn #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InjectivityAnn -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InjectivityAnn -> r #

gmapQ :: (forall d. Data d => d -> u) -> InjectivityAnn -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> InjectivityAnn -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InjectivityAnn -> m InjectivityAnn #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InjectivityAnn -> m InjectivityAnn #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InjectivityAnn -> m InjectivityAnn #

Data Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Inline -> c Inline #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Inline #

toConstr :: Inline -> Constr #

dataTypeOf :: Inline -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Inline) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Inline) #

gmapT :: (forall b. Data b => b -> b) -> Inline -> Inline #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Inline -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Inline -> r #

gmapQ :: (forall d. Data d => d -> u) -> Inline -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Inline -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Inline -> m Inline #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Inline -> m Inline #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Inline -> m Inline #

Data Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Lit -> c Lit #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Lit #

toConstr :: Lit -> Constr #

dataTypeOf :: Lit -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Lit) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Lit) #

gmapT :: (forall b. Data b => b -> b) -> Lit -> Lit #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Lit -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Lit -> r #

gmapQ :: (forall d. Data d => d -> u) -> Lit -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Lit -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Lit -> m Lit #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Lit -> m Lit #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Lit -> m Lit #

Data Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Loc -> c Loc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Loc #

toConstr :: Loc -> Constr #

dataTypeOf :: Loc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Loc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Loc) #

gmapT :: (forall b. Data b => b -> b) -> Loc -> Loc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Loc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Loc -> r #

gmapQ :: (forall d. Data d => d -> u) -> Loc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Loc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Loc -> m Loc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Loc -> m Loc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Loc -> m Loc #

Data Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Match -> c Match #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Match #

toConstr :: Match -> Constr #

dataTypeOf :: Match -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Match) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Match) #

gmapT :: (forall b. Data b => b -> b) -> Match -> Match #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Match -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Match -> r #

gmapQ :: (forall d. Data d => d -> u) -> Match -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Match -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Match -> m Match #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Match -> m Match #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Match -> m Match #

Data ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModName -> c ModName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModName #

toConstr :: ModName -> Constr #

dataTypeOf :: ModName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModName) #

gmapT :: (forall b. Data b => b -> b) -> ModName -> ModName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModName -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModName -> r #

gmapQ :: (forall d. Data d => d -> u) -> ModName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModName -> m ModName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModName -> m ModName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModName -> m ModName #

Data Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Module -> c Module #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Module #

toConstr :: Module -> Constr #

dataTypeOf :: Module -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Module) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Module) #

gmapT :: (forall b. Data b => b -> b) -> Module -> Module #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Module -> r #

gmapQ :: (forall d. Data d => d -> u) -> Module -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Module -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Module -> m Module #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Module -> m Module #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Module -> m Module #

Data ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModuleInfo -> c ModuleInfo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModuleInfo #

toConstr :: ModuleInfo -> Constr #

dataTypeOf :: ModuleInfo -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModuleInfo) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModuleInfo) #

gmapT :: (forall b. Data b => b -> b) -> ModuleInfo -> ModuleInfo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModuleInfo -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModuleInfo -> r #

gmapQ :: (forall d. Data d => d -> u) -> ModuleInfo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModuleInfo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModuleInfo -> m ModuleInfo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleInfo -> m ModuleInfo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleInfo -> m ModuleInfo #

Data Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Name -> c Name #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Name #

toConstr :: Name -> Constr #

dataTypeOf :: Name -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Name) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Name) #

gmapT :: (forall b. Data b => b -> b) -> Name -> Name #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Name -> r #

gmapQ :: (forall d. Data d => d -> u) -> Name -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Name -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Name -> m Name #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Name -> m Name #

Data NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NameFlavour -> c NameFlavour #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NameFlavour #

toConstr :: NameFlavour -> Constr #

dataTypeOf :: NameFlavour -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NameFlavour) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NameFlavour) #

gmapT :: (forall b. Data b => b -> b) -> NameFlavour -> NameFlavour #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NameFlavour -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NameFlavour -> r #

gmapQ :: (forall d. Data d => d -> u) -> NameFlavour -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NameFlavour -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NameFlavour -> m NameFlavour #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NameFlavour -> m NameFlavour #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NameFlavour -> m NameFlavour #

Data NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NameSpace -> c NameSpace #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NameSpace #

toConstr :: NameSpace -> Constr #

dataTypeOf :: NameSpace -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NameSpace) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NameSpace) #

gmapT :: (forall b. Data b => b -> b) -> NameSpace -> NameSpace #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NameSpace -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NameSpace -> r #

gmapQ :: (forall d. Data d => d -> u) -> NameSpace -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NameSpace -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NameSpace -> m NameSpace #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NameSpace -> m NameSpace #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NameSpace -> m NameSpace #

Data OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OccName -> c OccName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OccName #

toConstr :: OccName -> Constr #

dataTypeOf :: OccName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OccName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OccName) #

gmapT :: (forall b. Data b => b -> b) -> OccName -> OccName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OccName -> r #

gmapQ :: (forall d. Data d => d -> u) -> OccName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> OccName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> OccName -> m OccName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OccName -> m OccName #

Data Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Overlap -> c Overlap #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Overlap #

toConstr :: Overlap -> Constr #

dataTypeOf :: Overlap -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Overlap) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Overlap) #

gmapT :: (forall b. Data b => b -> b) -> Overlap -> Overlap #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Overlap -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Overlap -> r #

gmapQ :: (forall d. Data d => d -> u) -> Overlap -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Overlap -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Overlap -> m Overlap #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Overlap -> m Overlap #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Overlap -> m Overlap #

Data Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pat -> c Pat #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pat #

toConstr :: Pat -> Constr #

dataTypeOf :: Pat -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pat) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pat) #

gmapT :: (forall b. Data b => b -> b) -> Pat -> Pat #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pat -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pat -> r #

gmapQ :: (forall d. Data d => d -> u) -> Pat -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Pat -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pat -> m Pat #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat -> m Pat #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat -> m Pat #

Data PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PatSynArgs -> c PatSynArgs #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PatSynArgs #

toConstr :: PatSynArgs -> Constr #

dataTypeOf :: PatSynArgs -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PatSynArgs) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatSynArgs) #

gmapT :: (forall b. Data b => b -> b) -> PatSynArgs -> PatSynArgs #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PatSynArgs -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PatSynArgs -> r #

gmapQ :: (forall d. Data d => d -> u) -> PatSynArgs -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PatSynArgs -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PatSynArgs -> m PatSynArgs #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PatSynArgs -> m PatSynArgs #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PatSynArgs -> m PatSynArgs #

Data PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PatSynDir -> c PatSynDir #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PatSynDir #

toConstr :: PatSynDir -> Constr #

dataTypeOf :: PatSynDir -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PatSynDir) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatSynDir) #

gmapT :: (forall b. Data b => b -> b) -> PatSynDir -> PatSynDir #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PatSynDir -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PatSynDir -> r #

gmapQ :: (forall d. Data d => d -> u) -> PatSynDir -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PatSynDir -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PatSynDir -> m PatSynDir #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PatSynDir -> m PatSynDir #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PatSynDir -> m PatSynDir #

Data Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Phases -> c Phases #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Phases #

toConstr :: Phases -> Constr #

dataTypeOf :: Phases -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Phases) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Phases) #

gmapT :: (forall b. Data b => b -> b) -> Phases -> Phases #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Phases -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Phases -> r #

gmapQ :: (forall d. Data d => d -> u) -> Phases -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Phases -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Phases -> m Phases #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Phases -> m Phases #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Phases -> m Phases #

Data PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PkgName -> c PkgName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PkgName #

toConstr :: PkgName -> Constr #

dataTypeOf :: PkgName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PkgName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PkgName) #

gmapT :: (forall b. Data b => b -> b) -> PkgName -> PkgName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PkgName -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PkgName -> r #

gmapQ :: (forall d. Data d => d -> u) -> PkgName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PkgName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PkgName -> m PkgName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PkgName -> m PkgName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PkgName -> m PkgName #

Data Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pragma -> c Pragma #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Pragma #

toConstr :: Pragma -> Constr #

dataTypeOf :: Pragma -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Pragma) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Pragma) #

gmapT :: (forall b. Data b => b -> b) -> Pragma -> Pragma #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pragma -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pragma -> r #

gmapQ :: (forall d. Data d => d -> u) -> Pragma -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Pragma -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pragma -> m Pragma #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pragma -> m Pragma #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pragma -> m Pragma #

Data Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Range -> c Range #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Range #

toConstr :: Range -> Constr #

dataTypeOf :: Range -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Range) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Range) #

gmapT :: (forall b. Data b => b -> b) -> Range -> Range #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Range -> r #

gmapQ :: (forall d. Data d => d -> u) -> Range -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Range -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Range -> m Range #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Range -> m Range #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Range -> m Range #

Data Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role #

toConstr :: Role -> Constr #

dataTypeOf :: Role -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) #

gmapT :: (forall b. Data b => b -> b) -> Role -> Role #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r #

gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role #

Data RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RuleBndr -> c RuleBndr #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RuleBndr #

toConstr :: RuleBndr -> Constr #

dataTypeOf :: RuleBndr -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RuleBndr) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RuleBndr) #

gmapT :: (forall b. Data b => b -> b) -> RuleBndr -> RuleBndr #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RuleBndr -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RuleBndr -> r #

gmapQ :: (forall d. Data d => d -> u) -> RuleBndr -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RuleBndr -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RuleBndr -> m RuleBndr #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleBndr -> m RuleBndr #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleBndr -> m RuleBndr #

Data RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RuleMatch -> c RuleMatch #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RuleMatch #

toConstr :: RuleMatch -> Constr #

dataTypeOf :: RuleMatch -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RuleMatch) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RuleMatch) #

gmapT :: (forall b. Data b => b -> b) -> RuleMatch -> RuleMatch #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RuleMatch -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RuleMatch -> r #

gmapQ :: (forall d. Data d => d -> u) -> RuleMatch -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RuleMatch -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RuleMatch -> m RuleMatch #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleMatch -> m RuleMatch #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleMatch -> m RuleMatch #

Data Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Safety -> c Safety #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Safety #

toConstr :: Safety -> Constr #

dataTypeOf :: Safety -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Safety) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Safety) #

gmapT :: (forall b. Data b => b -> b) -> Safety -> Safety #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Safety -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Safety -> r #

gmapQ :: (forall d. Data d => d -> u) -> Safety -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Safety -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Safety -> m Safety #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Safety -> m Safety #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Safety -> m Safety #

Data SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceStrictness -> c SourceStrictness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceStrictness #

toConstr :: SourceStrictness -> Constr #

dataTypeOf :: SourceStrictness -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceStrictness) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceStrictness) #

gmapT :: (forall b. Data b => b -> b) -> SourceStrictness -> SourceStrictness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceStrictness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceStrictness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness #

Data SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceUnpackedness -> c SourceUnpackedness #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceUnpackedness #

toConstr :: SourceUnpackedness -> Constr #

dataTypeOf :: SourceUnpackedness -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceUnpackedness) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceUnpackedness) #

gmapT :: (forall b. Data b => b -> b) -> SourceUnpackedness -> SourceUnpackedness #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceUnpackedness -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceUnpackedness -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness #

Data Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Specificity -> c Specificity #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Specificity #

toConstr :: Specificity -> Constr #

dataTypeOf :: Specificity -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Specificity) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Specificity) #

gmapT :: (forall b. Data b => b -> b) -> Specificity -> Specificity #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Specificity -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Specificity -> r #

gmapQ :: (forall d. Data d => d -> u) -> Specificity -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Specificity -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity #

Data Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Stmt -> c Stmt #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Stmt #

toConstr :: Stmt -> Constr #

dataTypeOf :: Stmt -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Stmt) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Stmt) #

gmapT :: (forall b. Data b => b -> b) -> Stmt -> Stmt #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Stmt -> r #

gmapQ :: (forall d. Data d => d -> u) -> Stmt -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Stmt -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Stmt -> m Stmt #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Stmt -> m Stmt #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Stmt -> m Stmt #

Data TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyLit -> c TyLit #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyLit #

toConstr :: TyLit -> Constr #

dataTypeOf :: TyLit -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyLit) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyLit) #

gmapT :: (forall b. Data b => b -> b) -> TyLit -> TyLit #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyLit -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyLit -> r #

gmapQ :: (forall d. Data d => d -> u) -> TyLit -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TyLit -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyLit -> m TyLit #

Data TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TySynEqn -> c TySynEqn #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TySynEqn #

toConstr :: TySynEqn -> Constr #

dataTypeOf :: TySynEqn -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TySynEqn) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TySynEqn) #

gmapT :: (forall b. Data b => b -> b) -> TySynEqn -> TySynEqn #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TySynEqn -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TySynEqn -> r #

gmapQ :: (forall d. Data d => d -> u) -> TySynEqn -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TySynEqn -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TySynEqn -> m TySynEqn #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TySynEqn -> m TySynEqn #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TySynEqn -> m TySynEqn #

Data Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Type -> c Type #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Type #

toConstr :: Type -> Constr #

dataTypeOf :: Type -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Type) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Type) #

gmapT :: (forall b. Data b => b -> b) -> Type -> Type #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Type -> r #

gmapQ :: (forall d. Data d => d -> u) -> Type -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Type -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Type -> m Type #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Type -> m Type #

Data TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TypeFamilyHead -> c TypeFamilyHead #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TypeFamilyHead #

toConstr :: TypeFamilyHead -> Constr #

dataTypeOf :: TypeFamilyHead -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TypeFamilyHead) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeFamilyHead) #

gmapT :: (forall b. Data b => b -> b) -> TypeFamilyHead -> TypeFamilyHead #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TypeFamilyHead -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TypeFamilyHead -> r #

gmapQ :: (forall d. Data d => d -> u) -> TypeFamilyHead -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeFamilyHead -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TypeFamilyHead -> m TypeFamilyHead #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeFamilyHead -> m TypeFamilyHead #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeFamilyHead -> m TypeFamilyHead #

Data CalendarDiffDays

Since: time-1.9.2

Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CalendarDiffDays -> c CalendarDiffDays #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CalendarDiffDays #

toConstr :: CalendarDiffDays -> Constr #

dataTypeOf :: CalendarDiffDays -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CalendarDiffDays) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CalendarDiffDays) #

gmapT :: (forall b. Data b => b -> b) -> CalendarDiffDays -> CalendarDiffDays #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CalendarDiffDays -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CalendarDiffDays -> r #

gmapQ :: (forall d. Data d => d -> u) -> CalendarDiffDays -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CalendarDiffDays -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CalendarDiffDays -> m CalendarDiffDays #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CalendarDiffDays -> m CalendarDiffDays #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CalendarDiffDays -> m CalendarDiffDays #

Data Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Day -> c Day #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Day #

toConstr :: Day -> Constr #

dataTypeOf :: Day -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Day) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Day) #

gmapT :: (forall b. Data b => b -> b) -> Day -> Day #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r #

gmapQ :: (forall d. Data d => d -> u) -> Day -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Day -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Day -> m Day #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Day -> m Day #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Day -> m Day #

Data DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DayOfWeek -> c DayOfWeek #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DayOfWeek #

toConstr :: DayOfWeek -> Constr #

dataTypeOf :: DayOfWeek -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DayOfWeek) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DayOfWeek) #

gmapT :: (forall b. Data b => b -> b) -> DayOfWeek -> DayOfWeek #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DayOfWeek -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DayOfWeek -> r #

gmapQ :: (forall d. Data d => d -> u) -> DayOfWeek -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DayOfWeek -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DayOfWeek -> m DayOfWeek #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DayOfWeek -> m DayOfWeek #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DayOfWeek -> m DayOfWeek #

Data AbsoluteTime 
Instance details

Defined in Data.Time.Clock.Internal.AbsoluteTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AbsoluteTime -> c AbsoluteTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AbsoluteTime #

toConstr :: AbsoluteTime -> Constr #

dataTypeOf :: AbsoluteTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AbsoluteTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AbsoluteTime) #

gmapT :: (forall b. Data b => b -> b) -> AbsoluteTime -> AbsoluteTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AbsoluteTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AbsoluteTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> AbsoluteTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AbsoluteTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AbsoluteTime -> m AbsoluteTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AbsoluteTime -> m AbsoluteTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AbsoluteTime -> m AbsoluteTime #

Data DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DiffTime -> c DiffTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DiffTime #

toConstr :: DiffTime -> Constr #

dataTypeOf :: DiffTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DiffTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DiffTime) #

gmapT :: (forall b. Data b => b -> b) -> DiffTime -> DiffTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> DiffTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DiffTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime #

Data NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NominalDiffTime -> c NominalDiffTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NominalDiffTime #

toConstr :: NominalDiffTime -> Constr #

dataTypeOf :: NominalDiffTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NominalDiffTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NominalDiffTime) #

gmapT :: (forall b. Data b => b -> b) -> NominalDiffTime -> NominalDiffTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NominalDiffTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NominalDiffTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> NominalDiffTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NominalDiffTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NominalDiffTime -> m NominalDiffTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NominalDiffTime -> m NominalDiffTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NominalDiffTime -> m NominalDiffTime #

Data SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SystemTime -> c SystemTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SystemTime #

toConstr :: SystemTime -> Constr #

dataTypeOf :: SystemTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SystemTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SystemTime) #

gmapT :: (forall b. Data b => b -> b) -> SystemTime -> SystemTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SystemTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SystemTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> SystemTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SystemTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SystemTime -> m SystemTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SystemTime -> m SystemTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SystemTime -> m SystemTime #

Data UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime #

toConstr :: UTCTime -> Constr #

dataTypeOf :: UTCTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) #

gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

Data UniversalTime 
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniversalTime -> c UniversalTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UniversalTime #

toConstr :: UniversalTime -> Constr #

dataTypeOf :: UniversalTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UniversalTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UniversalTime) #

gmapT :: (forall b. Data b => b -> b) -> UniversalTime -> UniversalTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniversalTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniversalTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> UniversalTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UniversalTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniversalTime -> m UniversalTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniversalTime -> m UniversalTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniversalTime -> m UniversalTime #

Data CalendarDiffTime

Since: time-1.9.2

Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CalendarDiffTime -> c CalendarDiffTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CalendarDiffTime #

toConstr :: CalendarDiffTime -> Constr #

dataTypeOf :: CalendarDiffTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CalendarDiffTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CalendarDiffTime) #

gmapT :: (forall b. Data b => b -> b) -> CalendarDiffTime -> CalendarDiffTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CalendarDiffTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CalendarDiffTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> CalendarDiffTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CalendarDiffTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CalendarDiffTime -> m CalendarDiffTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CalendarDiffTime -> m CalendarDiffTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CalendarDiffTime -> m CalendarDiffTime #

Data LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LocalTime -> c LocalTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LocalTime #

toConstr :: LocalTime -> Constr #

dataTypeOf :: LocalTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LocalTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LocalTime) #

gmapT :: (forall b. Data b => b -> b) -> LocalTime -> LocalTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LocalTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LocalTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> LocalTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LocalTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LocalTime -> m LocalTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LocalTime -> m LocalTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LocalTime -> m LocalTime #

Data TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TimeOfDay -> c TimeOfDay #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TimeOfDay #

toConstr :: TimeOfDay -> Constr #

dataTypeOf :: TimeOfDay -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TimeOfDay) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeOfDay) #

gmapT :: (forall b. Data b => b -> b) -> TimeOfDay -> TimeOfDay #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r #

gmapQ :: (forall d. Data d => d -> u) -> TimeOfDay -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TimeOfDay -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay #

Data TimeZone 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TimeZone -> c TimeZone #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TimeZone #

toConstr :: TimeZone -> Constr #

dataTypeOf :: TimeZone -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TimeZone) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeZone) #

gmapT :: (forall b. Data b => b -> b) -> TimeZone -> TimeZone #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TimeZone -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TimeZone -> r #

gmapQ :: (forall d. Data d => d -> u) -> TimeZone -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TimeZone -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TimeZone -> m TimeZone #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeZone -> m TimeZone #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeZone -> m TimeZone #

Data ZonedTime 
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZonedTime -> c ZonedTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ZonedTime #

toConstr :: ZonedTime -> Constr #

dataTypeOf :: ZonedTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ZonedTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ZonedTime) #

gmapT :: (forall b. Data b => b -> b) -> ZonedTime -> ZonedTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZonedTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZonedTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> ZonedTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ZonedTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime #

Data UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UUID -> c UUID #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UUID #

toConstr :: UUID -> Constr #

dataTypeOf :: UUID -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UUID) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UUID) #

gmapT :: (forall b. Data b => b -> b) -> UUID -> UUID #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UUID -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UUID -> r #

gmapQ :: (forall d. Data d => d -> u) -> UUID -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UUID -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UUID -> m UUID #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UUID -> m UUID #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UUID -> m UUID #

Data Integer

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer #

toConstr :: Integer -> Constr #

dataTypeOf :: Integer -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Integer) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Integer) #

gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r #

gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

Data Natural

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural #

toConstr :: Natural -> Constr #

dataTypeOf :: Natural -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Natural) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) #

gmapT :: (forall b. Data b => b -> b) -> Natural -> Natural #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #

gmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

Data ()

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> () -> c () #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c () #

toConstr :: () -> Constr #

dataTypeOf :: () -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ()) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ()) #

gmapT :: (forall b. Data b => b -> b) -> () -> () #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> () -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> () -> r #

gmapQ :: (forall d. Data d => d -> u) -> () -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> () -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> () -> m () #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> () -> m () #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> () -> m () #

Data Bool

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bool -> c Bool #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bool #

toConstr :: Bool -> Constr #

dataTypeOf :: Bool -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bool) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bool) #

gmapT :: (forall b. Data b => b -> b) -> Bool -> Bool #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r #

gmapQ :: (forall d. Data d => d -> u) -> Bool -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Bool -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bool -> m Bool #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool #

Data Char

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Char -> c Char #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Char #

toConstr :: Char -> Constr #

dataTypeOf :: Char -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Char) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Char) #

gmapT :: (forall b. Data b => b -> b) -> Char -> Char #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r #

gmapQ :: (forall d. Data d => d -> u) -> Char -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Char -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Char -> m Char #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char #

Data Double

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Double -> c Double #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Double #

toConstr :: Double -> Constr #

dataTypeOf :: Double -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Double) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Double) #

gmapT :: (forall b. Data b => b -> b) -> Double -> Double #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r #

gmapQ :: (forall d. Data d => d -> u) -> Double -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Double -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Double -> m Double #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double #

Data Float

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Float -> c Float #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Float #

toConstr :: Float -> Constr #

dataTypeOf :: Float -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Float) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float) #

gmapT :: (forall b. Data b => b -> b) -> Float -> Float #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r #

gmapQ :: (forall d. Data d => d -> u) -> Float -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Float -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Float -> m Float #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float #

Data Int

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int -> c Int #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int #

toConstr :: Int -> Constr #

dataTypeOf :: Int -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int) #

gmapT :: (forall b. Data b => b -> b) -> Int -> Int #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int -> m Int #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int #

Data Word

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word #

toConstr :: Word -> Constr #

dataTypeOf :: Word -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word) #

gmapT :: (forall b. Data b => b -> b) -> Word -> Word #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

Data a => Data (ZipList a)

Since: base-4.14.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZipList a -> c (ZipList a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ZipList a) #

toConstr :: ZipList a -> Constr #

dataTypeOf :: ZipList a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ZipList a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ZipList a)) #

gmapT :: (forall b. Data b => b -> b) -> ZipList a -> ZipList a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r #

gmapQ :: (forall d. Data d => d -> u) -> ZipList a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ZipList a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) #

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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Complex a) #

toConstr :: Complex a -> Constr #

dataTypeOf :: Complex a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Complex a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Complex a)) #

gmapT :: (forall b. Data b => b -> b) -> Complex a -> Complex a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Complex a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Complex a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Complex a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Complex a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) #

Data a => Data (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Identity a -> c (Identity a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Identity a) #

toConstr :: Identity a -> Constr #

dataTypeOf :: Identity a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Identity a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Identity a)) #

gmapT :: (forall b. Data b => b -> b) -> Identity a -> Identity a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Identity a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Identity a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

Data a => Data (First a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> First a -> c (First a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (First a) #

toConstr :: First a -> Constr #

dataTypeOf :: First a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (First a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (First a)) #

gmapT :: (forall b. Data b => b -> b) -> First a -> First a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r #

gmapQ :: (forall d. Data d => d -> u) -> First a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> First a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

Data a => Data (Last a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Last a -> c (Last a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Last a) #

toConstr :: Last a -> Constr #

dataTypeOf :: Last a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Last a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Last a)) #

gmapT :: (forall b. Data b => b -> b) -> Last a -> Last a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Last a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Last a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

Data a => Data (Down a)

Since: base-4.12.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Down a -> c (Down a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Down a) #

toConstr :: Down a -> Constr #

dataTypeOf :: Down a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Down a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Down a)) #

gmapT :: (forall b. Data b => b -> b) -> Down a -> Down a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Down a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Down a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) #

Data a => Data (First 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) -> First a -> c (First a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (First a) #

toConstr :: First a -> Constr #

dataTypeOf :: First a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (First a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (First a)) #

gmapT :: (forall b. Data b => b -> b) -> First a -> First a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r #

gmapQ :: (forall d. Data d => d -> u) -> First a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> First a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

Data a => Data (Last 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) -> Last a -> c (Last a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Last a) #

toConstr :: Last a -> Constr #

dataTypeOf :: Last a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Last a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Last a)) #

gmapT :: (forall b. Data b => b -> b) -> Last a -> Last a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Last a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Last a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

Data a => Data (Max 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) -> Max a -> c (Max a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Max a) #

toConstr :: Max a -> Constr #

dataTypeOf :: Max a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Max a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Max a)) #

gmapT :: (forall b. Data b => b -> b) -> Max a -> Max a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Max a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Max a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Max a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Max a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Max a -> m (Max a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Max a -> m (Max a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Max a -> m (Max a) #

Data a => Data (Min 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) -> Min a -> c (Min a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Min a) #

toConstr :: Min a -> Constr #

dataTypeOf :: Min a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Min a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Min a)) #

gmapT :: (forall b. Data b => b -> b) -> Min a -> Min a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Min a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Min a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Min a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Min a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Min a -> m (Min a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Min a -> m (Min a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Min a -> m (Min a) #

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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonoid m) #

toConstr :: WrappedMonoid m -> Constr #

dataTypeOf :: WrappedMonoid m -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonoid m)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonoid m)) #

gmapT :: (forall b. Data b => b -> b) -> WrappedMonoid m -> WrappedMonoid m #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r #

gmapQ :: (forall d. Data d => d -> u) -> WrappedMonoid m -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonoid m -> u #

gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) #

gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) #

gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) #

Data a => Data (Dual a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Dual a -> c (Dual a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Dual a) #

toConstr :: Dual a -> Constr #

dataTypeOf :: Dual a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Dual a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Dual a)) #

gmapT :: (forall b. Data b => b -> b) -> Dual a -> Dual a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Dual a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Dual a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Dual a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Dual a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Dual a -> m (Dual a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Dual a -> m (Dual a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Dual a -> m (Dual a) #

Data a => Data (Product a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Product a -> c (Product a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Product a) #

toConstr :: Product a -> Constr #

dataTypeOf :: Product a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Product a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Product a)) #

gmapT :: (forall b. Data b => b -> b) -> Product a -> Product a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Product a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Product a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Product a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Product a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) #

Data a => Data (Sum a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Sum a -> c (Sum a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sum a) #

toConstr :: Sum a -> Constr #

dataTypeOf :: Sum a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Sum a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sum a)) #

gmapT :: (forall b. Data b => b -> b) -> Sum a -> Sum a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sum a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sum a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Sum a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Sum a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) #

Data a => Data (ForeignPtr a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignPtr a -> c (ForeignPtr a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignPtr a) #

toConstr :: ForeignPtr a -> Constr #

dataTypeOf :: ForeignPtr a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignPtr a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignPtr a)) #

gmapT :: (forall b. Data b => b -> b) -> ForeignPtr a -> ForeignPtr a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignPtr a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignPtr a -> r #

gmapQ :: (forall d. Data d => d -> u) -> ForeignPtr a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignPtr a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignPtr a -> m (ForeignPtr a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignPtr a -> m (ForeignPtr a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignPtr a -> m (ForeignPtr a) #

Data p => Data (Par1 p)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Par1 p -> c (Par1 p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Par1 p) #

toConstr :: Par1 p -> Constr #

dataTypeOf :: Par1 p -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Par1 p)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Par1 p)) #

gmapT :: (forall b. Data b => b -> b) -> Par1 p -> Par1 p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Par1 p -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Par1 p -> r #

gmapQ :: (forall d. Data d => d -> u) -> Par1 p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Par1 p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Par1 p -> m (Par1 p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Par1 p -> m (Par1 p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Par1 p -> m (Par1 p) #

Data a => Data (Ptr a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ptr a -> c (Ptr a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ptr a) #

toConstr :: Ptr a -> Constr #

dataTypeOf :: Ptr a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ptr a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ptr a)) #

gmapT :: (forall b. Data b => b -> b) -> Ptr a -> Ptr a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ptr a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ptr a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ptr a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ptr a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) #

(Data a, Integral a) => Data (Ratio a)

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ratio a -> c (Ratio a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ratio a) #

toConstr :: Ratio a -> Constr #

dataTypeOf :: Ratio a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ratio a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ratio a)) #

gmapT :: (forall b. Data b => b -> b) -> Ratio a -> Ratio a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ratio a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ratio a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ratio a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ratio a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ratio a -> m (Ratio a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ratio a -> m (Ratio a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ratio a -> m (Ratio a) #

Data vertex => Data (SCC vertex)

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SCC vertex -> c (SCC vertex) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SCC vertex) #

toConstr :: SCC vertex -> Constr #

dataTypeOf :: SCC vertex -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SCC vertex)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SCC vertex)) #

gmapT :: (forall b. Data b => b -> b) -> SCC vertex -> SCC vertex #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SCC vertex -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SCC vertex -> r #

gmapQ :: (forall d. Data d => d -> u) -> SCC vertex -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SCC vertex -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SCC vertex -> m (SCC vertex) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SCC vertex -> m (SCC vertex) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SCC vertex -> m (SCC vertex) #

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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IntMap a) #

toConstr :: IntMap a -> Constr #

dataTypeOf :: IntMap a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IntMap a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IntMap a)) #

gmapT :: (forall b. Data b => b -> b) -> IntMap a -> IntMap a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntMap a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntMap a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) #

toConstr :: Seq a -> Constr #

dataTypeOf :: Seq a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) #

gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

Data a => Data (ViewL 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) -> ViewL a -> c (ViewL a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ViewL a) #

toConstr :: ViewL a -> Constr #

dataTypeOf :: ViewL a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ViewL a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ViewL a)) #

gmapT :: (forall b. Data b => b -> b) -> ViewL a -> ViewL a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ViewL a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ViewL a -> r #

gmapQ :: (forall d. Data d => d -> u) -> ViewL a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ViewL a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ViewL a -> m (ViewL a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ViewL a -> m (ViewL a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ViewL a -> m (ViewL a) #

Data a => Data (ViewR 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) -> ViewR a -> c (ViewR a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ViewR a) #

toConstr :: ViewR a -> Constr #

dataTypeOf :: ViewR a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ViewR a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ViewR a)) #

gmapT :: (forall b. Data b => b -> b) -> ViewR a -> ViewR a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ViewR a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ViewR a -> r #

gmapQ :: (forall d. Data d => d -> u) -> ViewR a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ViewR a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ViewR a -> m (ViewR a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ViewR a -> m (ViewR a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ViewR a -> m (ViewR a) #

(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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Set a) #

toConstr :: Set a -> Constr #

dataTypeOf :: Set a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Set a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Set a)) #

gmapT :: (forall b. Data b => b -> b) -> Set a -> Set a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Set a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Set a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

Data a => Data (Tree a) 
Instance details

Defined in Data.Tree

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tree a -> c (Tree a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tree a) #

toConstr :: Tree a -> Constr #

dataTypeOf :: Tree a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tree a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tree a)) #

gmapT :: (forall b. Data b => b -> b) -> Tree a -> Tree a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tree a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tree a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Tree a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Tree a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tree a -> m (Tree a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tree a -> m (Tree a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tree a -> m (Tree a) #

Typeable s => Data (MutableByteArray s) 
Instance details

Defined in Data.Array.Byte

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MutableByteArray s -> c (MutableByteArray s) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MutableByteArray s) #

toConstr :: MutableByteArray s -> Constr #

dataTypeOf :: MutableByteArray s -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MutableByteArray s)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MutableByteArray s)) #

gmapT :: (forall b. Data b => b -> b) -> MutableByteArray s -> MutableByteArray s #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MutableByteArray s -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MutableByteArray s -> r #

gmapQ :: (forall d. Data d => d -> u) -> MutableByteArray s -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MutableByteArray s -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MutableByteArray s -> m (MutableByteArray s) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MutableByteArray s -> m (MutableByteArray s) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MutableByteArray s -> m (MutableByteArray s) #

Data a => Data (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Array a -> c (Array a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Array a) #

toConstr :: Array a -> Constr #

dataTypeOf :: Array a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Array a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Array a)) #

gmapT :: (forall b. Data b => b -> b) -> Array a -> Array a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Array a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Array a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Array a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Array a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Array a -> m (Array a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Array a -> m (Array a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Array a -> m (Array a) #

Data a => Data (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SmallArray a -> c (SmallArray a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SmallArray a) #

toConstr :: SmallArray a -> Constr #

dataTypeOf :: SmallArray a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SmallArray a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SmallArray a)) #

gmapT :: (forall b. Data b => b -> b) -> SmallArray a -> SmallArray a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SmallArray a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SmallArray a -> r #

gmapQ :: (forall d. Data d => d -> u) -> SmallArray a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SmallArray a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SmallArray a -> m (SmallArray a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SmallArray a -> m (SmallArray a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SmallArray a -> m (SmallArray a) #

Data flag => Data (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyVarBndr flag -> c (TyVarBndr flag) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TyVarBndr flag) #

toConstr :: TyVarBndr flag -> Constr #

dataTypeOf :: TyVarBndr flag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (TyVarBndr flag)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TyVarBndr flag)) #

gmapT :: (forall b. Data b => b -> b) -> TyVarBndr flag -> TyVarBndr flag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyVarBndr flag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyVarBndr flag -> r #

gmapQ :: (forall d. Data d => d -> u) -> TyVarBndr flag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TyVarBndr flag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyVarBndr flag -> m (TyVarBndr flag) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyVarBndr flag -> m (TyVarBndr flag) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyVarBndr flag -> m (TyVarBndr flag) #

(Data a, Eq a, Hashable a) => Data (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashSet a -> c (HashSet a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashSet a) #

toConstr :: HashSet a -> Constr #

dataTypeOf :: HashSet a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashSet a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashSet a)) #

gmapT :: (forall b. Data b => b -> b) -> HashSet a -> HashSet a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r #

gmapQ :: (forall d. Data d => d -> u) -> HashSet a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashSet a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

Data a => Data (Vector a) 
Instance details

Defined in Data.Vector

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) #

toConstr :: Vector a -> Constr #

dataTypeOf :: Vector a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) #

gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

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

Defined in Data.Vector.Primitive

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) #

toConstr :: Vector a -> Constr #

dataTypeOf :: Vector a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) #

gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

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

Defined in Data.Vector.Storable

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) #

toConstr :: Vector a -> Constr #

dataTypeOf :: Vector a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) #

gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

(Data a, Unbox a) => Data (Vector a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) #

toConstr :: Vector a -> Constr #

dataTypeOf :: Vector a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) #

gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

Data a => Data (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NonEmpty a -> c (NonEmpty a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NonEmpty a) #

toConstr :: NonEmpty a -> Constr #

dataTypeOf :: NonEmpty a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NonEmpty a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NonEmpty a)) #

gmapT :: (forall b. Data b => b -> b) -> NonEmpty a -> NonEmpty a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NonEmpty a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NonEmpty a -> r #

gmapQ :: (forall d. Data d => d -> u) -> NonEmpty a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NonEmpty a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) #

Data a => Data (Maybe a)

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) #

toConstr :: Maybe a -> Constr #

dataTypeOf :: Maybe a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Maybe a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Maybe a)) #

gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

Data a => Data (a)

Since: base-4.15

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> (a) -> c (a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a) #

toConstr :: (a) -> Constr #

dataTypeOf :: (a) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a)) #

gmapT :: (forall b. Data b => b -> b) -> (a) -> (a) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a) -> r #

gmapQ :: (forall d. Data d => d -> u) -> (a) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a) -> m (a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a) -> m (a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a) -> m (a) #

Data a => Data [a]

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> [a] -> c [a] #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c [a] #

toConstr :: [a] -> Constr #

dataTypeOf :: [a] -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c [a]) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c [a]) #

gmapT :: (forall b. Data b => b -> b) -> [a] -> [a] #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> [a] -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> [a] -> r #

gmapQ :: (forall d. Data d => d -> u) -> [a] -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> [a] -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> [a] -> m [a] #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> [a] -> m [a] #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> [a] -> m [a] #

(Typeable m, Typeable a, Data (m a)) => Data (WrappedMonad m a)

Since: base-4.14.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonad m a -> c (WrappedMonad m a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonad m a) #

toConstr :: WrappedMonad m a -> Constr #

dataTypeOf :: WrappedMonad m a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonad m a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonad m a)) #

gmapT :: (forall b. Data b => b -> b) -> WrappedMonad m a -> WrappedMonad m a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r #

gmapQ :: (forall d. Data d => d -> u) -> WrappedMonad m a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonad m a -> u #

gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) #

gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) #

gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) #

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

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Either a b -> c (Either a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Either a b) #

toConstr :: Either a b -> Constr #

dataTypeOf :: Either a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Either a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Either a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Either a b -> Either a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Either a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Either a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #

(Typeable k, Typeable a) => Data (Fixed a)

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixed a -> c (Fixed a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Fixed a) #

toConstr :: Fixed a -> Constr #

dataTypeOf :: Fixed a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Fixed a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Fixed a)) #

gmapT :: (forall b. Data b => b -> b) -> Fixed a -> Fixed a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixed a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixed a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Fixed a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixed a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixed a -> m (Fixed a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixed a -> m (Fixed a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixed a -> m (Fixed a) #

Data t => Data (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Proxy t -> c (Proxy t) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Proxy t) #

toConstr :: Proxy t -> Constr #

dataTypeOf :: Proxy t -> DataType #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Proxy t)) #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Proxy t)) #

gmapT :: (forall b. Data b => b -> b) -> Proxy t -> Proxy t #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r #

gmapQ :: (forall d. Data d => d -> u) -> Proxy t -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Proxy t -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) #

(Data a, Data b) => Data (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Arg a b -> c (Arg a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Arg a b) #

toConstr :: Arg a b -> Constr #

dataTypeOf :: Arg a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Arg a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Arg a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Arg a b -> Arg a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arg a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arg a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Arg a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Arg a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Arg a b -> m (Arg a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg a b -> m (Arg a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg a b -> m (Arg a b) #

(Data a, Data b, Ix a) => Data (Array a b)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Array a b -> c (Array a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Array a b) #

toConstr :: Array a b -> Constr #

dataTypeOf :: Array a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Array a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Array a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Array a b -> Array a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Array a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Array a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Array a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Array a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Array a b -> m (Array a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Array a b -> m (Array a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Array a b -> m (Array a b) #

Data p => Data (U1 p)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> U1 p -> c (U1 p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (U1 p) #

toConstr :: U1 p -> Constr #

dataTypeOf :: U1 p -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (U1 p)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (U1 p)) #

gmapT :: (forall b. Data b => b -> b) -> U1 p -> U1 p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> U1 p -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> U1 p -> r #

gmapQ :: (forall d. Data d => d -> u) -> U1 p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> U1 p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> U1 p -> m (U1 p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> U1 p -> m (U1 p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> U1 p -> m (U1 p) #

Data p => Data (V1 p)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V1 p -> c (V1 p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V1 p) #

toConstr :: V1 p -> Constr #

dataTypeOf :: V1 p -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (V1 p)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V1 p)) #

gmapT :: (forall b. Data b => b -> b) -> V1 p -> V1 p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V1 p -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V1 p -> r #

gmapQ :: (forall d. Data d => d -> u) -> V1 p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V1 p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V1 p -> m (V1 p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V1 p -> m (V1 p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V1 p -> m (V1 p) #

(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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k a) #

toConstr :: Map k a -> Constr #

dataTypeOf :: Map k a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k a)) #

gmapT :: (forall b. Data b => b -> b) -> Map k a -> Map k a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Map k a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

(Typeable f, Data (f (Cofree f a)), Data a) => Data (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Cofree f a -> c (Cofree f a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Cofree f a) #

toConstr :: Cofree f a -> Constr #

dataTypeOf :: Cofree f a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Cofree f a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Cofree f a)) #

gmapT :: (forall b. Data b => b -> b) -> Cofree f a -> Cofree f a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Cofree f a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Cofree f a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Cofree f a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Cofree f a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Cofree f a -> m (Cofree f a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Cofree f a -> m (Cofree f a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Cofree f a -> m (Cofree f a) #

(Typeable f, Data (f (Free f a)), Data a) => Data (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Free f a -> c (Free f a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Free f a) #

toConstr :: Free f a -> Constr #

dataTypeOf :: Free f a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Free f a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Free f a)) #

gmapT :: (forall b. Data b => b -> b) -> Free f a -> Free f a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Free f a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Free f a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Free f a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Free f a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Free f a -> m (Free f a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Free f a -> m (Free f a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Free f a -> m (Free f a) #

(Typeable s, Typeable a) => Data (MutableArray s a) 
Instance details

Defined in Data.Primitive.Array

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MutableArray s a -> c (MutableArray s a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MutableArray s a) #

toConstr :: MutableArray s a -> Constr #

dataTypeOf :: MutableArray s a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MutableArray s a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MutableArray s a)) #

gmapT :: (forall b. Data b => b -> b) -> MutableArray s a -> MutableArray s a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MutableArray s a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MutableArray s a -> r #

gmapQ :: (forall d. Data d => d -> u) -> MutableArray s a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MutableArray s a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MutableArray s a -> m (MutableArray s a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MutableArray s a -> m (MutableArray s a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MutableArray s a -> m (MutableArray s a) #

(Typeable s, Typeable a) => Data (SmallMutableArray s a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SmallMutableArray s a -> c (SmallMutableArray s a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SmallMutableArray s a) #

toConstr :: SmallMutableArray s a -> Constr #

dataTypeOf :: SmallMutableArray s a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SmallMutableArray s a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SmallMutableArray s a)) #

gmapT :: (forall b. Data b => b -> b) -> SmallMutableArray s a -> SmallMutableArray s a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SmallMutableArray s a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SmallMutableArray s a -> r #

gmapQ :: (forall d. Data d => d -> u) -> SmallMutableArray s a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SmallMutableArray s a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SmallMutableArray s a -> m (SmallMutableArray s a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SmallMutableArray s a -> m (SmallMutableArray s a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SmallMutableArray s a -> m (SmallMutableArray s a) #

(Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashMap k v -> c (HashMap k v) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashMap k v) #

toConstr :: HashMap k v -> Constr #

dataTypeOf :: HashMap k v -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashMap k v)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashMap k v)) #

gmapT :: (forall b. Data b => b -> b) -> HashMap k v -> HashMap k v #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r #

gmapQ :: (forall d. Data d => d -> u) -> HashMap k v -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashMap k v -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

(Data a, Data b) => Data (a, b)

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> (a, b) -> c (a, b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a, b) #

toConstr :: (a, b) -> Constr #

dataTypeOf :: (a, b) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a, b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a, b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a, b) -> (a, b) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a, b) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a, b) -> r #

gmapQ :: (forall d. Data d => d -> u) -> (a, b) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a, b) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a, b) -> m (a, b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a, b) -> m (a, b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a, b) -> m (a, b) #

(Typeable a, Typeable b, Typeable c, Data (a b c)) => Data (WrappedArrow a b c)

Since: base-4.14.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c0 (d -> b0) -> d -> c0 b0) -> (forall g. g -> c0 g) -> WrappedArrow a b c -> c0 (WrappedArrow a b c) #

gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (WrappedArrow a b c) #

toConstr :: WrappedArrow a b c -> Constr #

dataTypeOf :: WrappedArrow a b c -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (WrappedArrow a b c)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (WrappedArrow a b c)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> WrappedArrow a b c -> WrappedArrow a b c #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r #

gmapQ :: (forall d. Data d => d -> u) -> WrappedArrow a b c -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedArrow a b c -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) #

(Typeable k, Data a, Typeable b) => Data (Const a b)

Since: base-4.10.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Const a b -> c (Const a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const a b) #

toConstr :: Const a b -> Constr #

dataTypeOf :: Const a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Const a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Const a b -> Const a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Const a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Const a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #

(Data (f a), Data a, Typeable f) => Data (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ap f a -> c (Ap f a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ap f a) #

toConstr :: Ap f a -> Constr #

dataTypeOf :: Ap f a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ap f a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ap f a)) #

gmapT :: (forall b. Data b => b -> b) -> Ap f a -> Ap f a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ap f a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ap f a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ap f a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ap f a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ap f a -> m (Ap f a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ap f a -> m (Ap f a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ap f a -> m (Ap f a) #

(Data (f a), Data a, Typeable f) => Data (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Alt f a -> c (Alt f a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Alt f a) #

toConstr :: Alt f a -> Constr #

dataTypeOf :: Alt f a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Alt f a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Alt f a)) #

gmapT :: (forall b. Data b => b -> b) -> Alt f a -> Alt f a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Alt f a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Alt f a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Alt f a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Alt f a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Alt f a -> m (Alt f a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Alt f a -> m (Alt f a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Alt f a -> m (Alt f a) #

(Coercible a b, Data a, Data b) => Data (Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Coercion a b -> c (Coercion a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Coercion a b) #

toConstr :: Coercion a b -> Constr #

dataTypeOf :: Coercion a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Coercion a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Coercion a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Coercion a b -> Coercion a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Coercion a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Coercion a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Coercion a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Coercion a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Coercion a b -> m (Coercion a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion a b -> m (Coercion a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Coercion a b -> m (Coercion a b) #

(a ~ b, Data a) => Data (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> (a :~: b) -> c (a :~: b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a :~: b) #

toConstr :: (a :~: b) -> Constr #

dataTypeOf :: (a :~: b) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a :~: b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a :~: b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a :~: b) -> a :~: b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r #

gmapQ :: (forall d. Data d => d -> u) -> (a :~: b) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a :~: b) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) #

(Data (f p), Typeable f, Data p) => Data (Rec1 f p)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Rec1 f p -> c (Rec1 f p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Rec1 f p) #

toConstr :: Rec1 f p -> Constr #

dataTypeOf :: Rec1 f p -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Rec1 f p)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Rec1 f p)) #

gmapT :: (forall b. Data b => b -> b) -> Rec1 f p -> Rec1 f p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Rec1 f p -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Rec1 f p -> r #

gmapQ :: (forall d. Data d => d -> u) -> Rec1 f p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Rec1 f p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Rec1 f p -> m (Rec1 f p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Rec1 f p -> m (Rec1 f p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Rec1 f p -> m (Rec1 f p) #

(Typeable f, Typeable b, Data a, Data (f b)) => Data (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> FreeF f a b -> c (FreeF f a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FreeF f a b) #

toConstr :: FreeF f a b -> Constr #

dataTypeOf :: FreeF f a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FreeF f a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FreeF f a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> FreeF f a b -> FreeF f a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FreeF f a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FreeF f a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> FreeF f a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FreeF f a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FreeF f a b -> m (FreeF f a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FreeF f a b -> m (FreeF f a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FreeF f a b -> m (FreeF f a b) #

(Data s, Data b) => Data (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Tagged s b -> c (Tagged s b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Tagged s b) #

toConstr :: Tagged s b -> Constr #

dataTypeOf :: Tagged s b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Tagged s b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Tagged s b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Tagged s b -> Tagged s b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tagged s b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tagged s b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Tagged s b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Tagged s b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tagged s b -> m (Tagged s b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tagged s b -> m (Tagged s b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tagged s b -> m (Tagged s b) #

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

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c0 (d -> b0) -> d -> c0 b0) -> (forall g. g -> c0 g) -> (a, b, c) -> c0 (a, b, c) #

gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (a, b, c) #

toConstr :: (a, b, c) -> Constr #

dataTypeOf :: (a, b, c) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (a, b, c)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (a, b, c)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a, b, c) -> (a, b, c) #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a, b, c) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a, b, c) -> r #

gmapQ :: (forall d. Data d => d -> u) -> (a, b, c) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a, b, c) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a, b, c) -> m (a, b, c) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a, b, c) -> m (a, b, c) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a, b, c) -> m (a, b, c) #

(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Product f g a -> c (Product f g a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Product f g a) #

toConstr :: Product f g a -> Constr #

dataTypeOf :: Product f g a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Product f g a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Product f g a)) #

gmapT :: (forall b. Data b => b -> b) -> Product f g a -> Product f g a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Product f g a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Product f g a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Product f g a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Product f g a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Product f g a -> m (Product f g a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Product f g a -> m (Product f g a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Product f g a -> m (Product f g a) #

(Typeable a, Typeable f, Typeable g, Typeable k, Data (f a), Data (g a)) => Data (Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Sum f g a -> c (Sum f g a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sum f g a) #

toConstr :: Sum f g a -> Constr #

dataTypeOf :: Sum f g a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Sum f g a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sum f g a)) #

gmapT :: (forall b. Data b => b -> b) -> Sum f g a -> Sum f g a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sum f g a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sum f g a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Sum f g a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Sum f g a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum f g a -> m (Sum f g a) #

(Typeable i, Typeable j, Typeable a, Typeable b, a ~~ b) => Data (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> (a :~~: b) -> c (a :~~: b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a :~~: b) #

toConstr :: (a :~~: b) -> Constr #

dataTypeOf :: (a :~~: b) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a :~~: b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a :~~: b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a :~~: b) -> a :~~: b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a :~~: b) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a :~~: b) -> r #

gmapQ :: (forall d. Data d => d -> u) -> (a :~~: b) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a :~~: b) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a :~~: b) -> m (a :~~: b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~~: b) -> m (a :~~: b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~~: b) -> m (a :~~: b) #

(Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((f :*: g) p)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> (f :*: g) p -> c ((f :*: g) p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ((f :*: g) p) #

toConstr :: (f :*: g) p -> Constr #

dataTypeOf :: (f :*: g) p -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ((f :*: g) p)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ((f :*: g) p)) #

gmapT :: (forall b. Data b => b -> b) -> (f :*: g) p -> (f :*: g) p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (f :*: g) p -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (f :*: g) p -> r #

gmapQ :: (forall d. Data d => d -> u) -> (f :*: g) p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (f :*: g) p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (f :*: g) p -> m ((f :*: g) p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (f :*: g) p -> m ((f :*: g) p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (f :*: g) p -> m ((f :*: g) p) #

(Typeable f, Typeable g, Data p, Data (f p), Data (g p)) => Data ((f :+: g) p)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> (f :+: g) p -> c ((f :+: g) p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ((f :+: g) p) #

toConstr :: (f :+: g) p -> Constr #

dataTypeOf :: (f :+: g) p -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ((f :+: g) p)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ((f :+: g) p)) #

gmapT :: (forall b. Data b => b -> b) -> (f :+: g) p -> (f :+: g) p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (f :+: g) p -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (f :+: g) p -> r #

gmapQ :: (forall d. Data d => d -> u) -> (f :+: g) p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (f :+: g) p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (f :+: g) p -> m ((f :+: g) p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (f :+: g) p -> m ((f :+: g) p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (f :+: g) p -> m ((f :+: g) p) #

(Typeable i, Data p, Data c) => Data (K1 i c p)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c0 (d -> b) -> d -> c0 b) -> (forall g. g -> c0 g) -> K1 i c p -> c0 (K1 i c p) #

gunfold :: (forall b r. Data b => c0 (b -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (K1 i c p) #

toConstr :: K1 i c p -> Constr #

dataTypeOf :: K1 i c p -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (K1 i c p)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (K1 i c p)) #

gmapT :: (forall b. Data b => b -> b) -> K1 i c p -> K1 i c p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> K1 i c p -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> K1 i c p -> r #

gmapQ :: (forall d. Data d => d -> u) -> K1 i c p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> K1 i c p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> K1 i c p -> m (K1 i c p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> K1 i c p -> m (K1 i c p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> K1 i c p -> m (K1 i c p) #

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

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d0 b0. Data d0 => c0 (d0 -> b0) -> d0 -> c0 b0) -> (forall g. g -> c0 g) -> (a, b, c, d) -> c0 (a, b, c, d) #

gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (a, b, c, d) #

toConstr :: (a, b, c, d) -> Constr #

dataTypeOf :: (a, b, c, d) -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c0 (t d0)) -> Maybe (c0 (a, b, c, d)) #

dataCast2 :: Typeable t => (forall d0 e. (Data d0, Data e) => c0 (t d0 e)) -> Maybe (c0 (a, b, c, d)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a, b, c, d) -> (a, b, c, d) #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> (a, b, c, d) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> (a, b, c, d) -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> (a, b, c, d) -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> (a, b, c, d) -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d) -> m (a, b, c, d) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d) -> m (a, b, c, d) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d) -> m (a, b, c, d) #

(Typeable a, Typeable f, Typeable g, Typeable k1, Typeable k2, Data (f (g a))) => Data (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Compose f g a -> c (Compose f g a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Compose f g a) #

toConstr :: Compose f g a -> Constr #

dataTypeOf :: Compose f g a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Compose f g a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Compose f g a)) #

gmapT :: (forall b. Data b => b -> b) -> Compose f g a -> Compose f g a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Compose f g a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Compose f g a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) #

(Typeable f, Typeable g, Data p, Data (f (g p))) => Data ((f :.: g) p)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> (f :.: g) p -> c ((f :.: g) p) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ((f :.: g) p) #

toConstr :: (f :.: g) p -> Constr #

dataTypeOf :: (f :.: g) p -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ((f :.: g) p)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ((f :.: g) p)) #

gmapT :: (forall b. Data b => b -> b) -> (f :.: g) p -> (f :.: g) p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (f :.: g) p -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (f :.: g) p -> r #

gmapQ :: (forall d. Data d => d -> u) -> (f :.: g) p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (f :.: g) p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (f :.: g) p -> m ((f :.: g) p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (f :.: g) p -> m ((f :.: g) p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (f :.: g) p -> m ((f :.: g) p) #

(Data p, Data (f p), Typeable c, Typeable i, Typeable f) => Data (M1 i c f p)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c0 (d -> b) -> d -> c0 b) -> (forall g. g -> c0 g) -> M1 i c f p -> c0 (M1 i c f p) #

gunfold :: (forall b r. Data b => c0 (b -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (M1 i c f p) #

toConstr :: M1 i c f p -> Constr #

dataTypeOf :: M1 i c f p -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (M1 i c f p)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (M1 i c f p)) #

gmapT :: (forall b. Data b => b -> b) -> M1 i c f p -> M1 i c f p #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> M1 i c f p -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> M1 i c f p -> r #

gmapQ :: (forall d. Data d => d -> u) -> M1 i c f p -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> M1 i c f p -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> M1 i c f p -> m (M1 i c f p) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> M1 i c f p -> m (M1 i c f p) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> M1 i c f p -> m (M1 i c f p) #

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

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d0 b0. Data d0 => c0 (d0 -> b0) -> d0 -> c0 b0) -> (forall g. g -> c0 g) -> (a, b, c, d, e) -> c0 (a, b, c, d, e) #

gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (a, b, c, d, e) #

toConstr :: (a, b, c, d, e) -> Constr #

dataTypeOf :: (a, b, c, d, e) -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c0 (t d0)) -> Maybe (c0 (a, b, c, d, e)) #

dataCast2 :: Typeable t => (forall d0 e0. (Data d0, Data e0) => c0 (t d0 e0)) -> Maybe (c0 (a, b, c, d, e)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a, b, c, d, e) -> (a, b, c, d, e) #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> (a, b, c, d, e) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> (a, b, c, d, e) -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> (a, b, c, d, e) -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> (a, b, c, d, e) -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d, e) -> m (a, b, c, d, e) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d, e) -> m (a, b, c, d, e) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d, e) -> m (a, b, c, d, e) #

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

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d0 b0. Data d0 => c0 (d0 -> b0) -> d0 -> c0 b0) -> (forall g. g -> c0 g) -> (a, b, c, d, e, f) -> c0 (a, b, c, d, e, f) #

gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (a, b, c, d, e, f) #

toConstr :: (a, b, c, d, e, f) -> Constr #

dataTypeOf :: (a, b, c, d, e, f) -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c0 (t d0)) -> Maybe (c0 (a, b, c, d, e, f)) #

dataCast2 :: Typeable t => (forall d0 e0. (Data d0, Data e0) => c0 (t d0 e0)) -> Maybe (c0 (a, b, c, d, e, f)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> (a, b, c, d, e, f) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> (a, b, c, d, e, f) -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> (a, b, c, d, e, f) -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> (a, b, c, d, e, f) -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d, e, f) -> m (a, b, c, d, e, f) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d, e, f) -> m (a, b, c, d, e, f) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d, e, f) -> m (a, b, c, d, e, f) #

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

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d0 b0. Data d0 => c0 (d0 -> b0) -> d0 -> c0 b0) -> (forall g0. g0 -> c0 g0) -> (a, b, c, d, e, f, g) -> c0 (a, b, c, d, e, f, g) #

gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (a, b, c, d, e, f, g) #

toConstr :: (a, b, c, d, e, f, g) -> Constr #

dataTypeOf :: (a, b, c, d, e, f, g) -> DataType #

dataCast1 :: Typeable t => (forall d0. Data d0 => c0 (t d0)) -> Maybe (c0 (a, b, c, d, e, f, g)) #

dataCast2 :: Typeable t => (forall d0 e0. (Data d0, Data e0) => c0 (t d0 e0)) -> Maybe (c0 (a, b, c, d, e, f, g)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #

gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> (a, b, c, d, e, f, g) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> (a, b, c, d, e, f, g) -> r #

gmapQ :: (forall d0. Data d0 => d0 -> u) -> (a, b, c, d, e, f, g) -> [u] #

gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> (a, b, c, d, e, f, g) -> u #

gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d, e, f, g) -> m (a, b, c, d, e, f, g) #

gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d, e, f, g) -> m (a, b, c, d, e, f, g) #

gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> (a, b, c, d, e, f, g) -> m (a, b, c, d, e, f, g) #

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

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 #

fmap is used to apply a function of type (a -> b) to a value of type f a, where f is a functor, to produce a value of type f b. Note that for any type constructor with more than one parameter (e.g., Either), only the last type parameter can be modified with fmap (e.g., b in `Either a b`).

Some type constructors with two parameters or more have a Bifunctor instance that allows both the last and the penultimate parameters to be mapped over.

Examples

Expand

Convert from a Maybe Int to a Maybe String using show:

>>> fmap show Nothing
Nothing
>>> fmap show (Just 3)
Just "3"

Convert from an Either Int Int to an Either Int String using show:

>>> fmap show (Left 17)
Left 17
>>> fmap show (Right 17)
Right "17"

Double each element of a list:

>>> fmap (*2) [1,2,3]
[2,4,6]

Apply even to the second element of a pair:

>>> fmap even (2,2)
(2,True)

It may seem surprising that the function is only applied to the last element of the tuple compared to the list example above which applies it to every element in the list. To understand, remember that tuples are type constructors with multiple type parameters: a tuple of 3 elements (a,b,c) can also be written (,,) a b c and its Functor instance is defined for Functor ((,,) a b) (i.e., only the third parameter is free to be mapped over with fmap).

It explains why fmap can be used with tuples containing values of different types as in the following example:

>>> fmap even ("hello", 1.0, 4)
("hello",1.0,True)

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

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.

Instances

Instances details
Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> ZipList a -> ZipList b #

(<$) :: a -> ZipList b -> ZipList a #

Functor Handler

Since: base-4.6.0.0

Instance details

Defined in Control.Exception

Methods

fmap :: (a -> b) -> Handler a -> Handler b #

(<$) :: a -> Handler b -> Handler a #

Functor Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

fmap :: (a -> b) -> Complex a -> Complex b #

(<$) :: a -> Complex b -> Complex a #

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fmap :: (a -> b) -> Identity a -> Identity b #

(<$) :: a -> Identity b -> Identity a #

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Last a -> Last b #

(<$) :: a -> Last b -> Last a #

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

fmap :: (a -> b) -> Down a -> Down b #

(<$) :: a -> Down b -> Down a #

Functor First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

Functor Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Last a -> Last b #

(<$) :: a -> Last b -> Last a #

Functor Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Functor Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Dual a -> Dual b #

(<$) :: a -> Dual b -> Dual a #

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Product a -> Product b #

(<$) :: a -> Product b -> Product a #

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

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

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

Functor NoIO

Since: base-4.8.0.0

Instance details

Defined in GHC.GHCi

Methods

fmap :: (a -> b) -> NoIO a -> NoIO b #

(<$) :: a -> NoIO b -> NoIO a #

Functor Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Par1 a -> Par1 b #

(<$) :: a -> Par1 b -> Par1 a #

Functor ArgDescr

Since: base-4.6.0.0

Instance details

Defined in System.Console.GetOpt

Methods

fmap :: (a -> b) -> ArgDescr a -> ArgDescr b #

(<$) :: a -> ArgDescr b -> ArgDescr a #

Functor ArgOrder

Since: base-4.6.0.0

Instance details

Defined in System.Console.GetOpt

Methods

fmap :: (a -> b) -> ArgOrder a -> ArgOrder b #

(<$) :: a -> ArgOrder b -> ArgOrder a #

Functor OptDescr

Since: base-4.6.0.0

Instance details

Defined in System.Console.GetOpt

Methods

fmap :: (a -> b) -> OptDescr a -> OptDescr b #

(<$) :: a -> OptDescr b -> OptDescr a #

Functor P

Since: base-4.8.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

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

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

Functor ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> ReadP a -> ReadP b #

(<$) :: a -> ReadP b -> ReadP a #

Functor ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

fmap :: (a -> b) -> ReadPrec a -> ReadPrec b #

(<$) :: a -> ReadPrec b -> ReadPrec a #

Functor Put 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

fmap :: (a -> b) -> Put a -> Put b #

(<$) :: a -> Put b -> Put a #

Functor SCC

Since: containers-0.5.4

Instance details

Defined in Data.Graph

Methods

fmap :: (a -> b) -> SCC a -> SCC b #

(<$) :: a -> SCC b -> SCC a #

Functor IntMap 
Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> IntMap a -> IntMap b #

(<$) :: a -> IntMap b -> IntMap a #

Functor Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Digit a -> Digit b #

(<$) :: a -> Digit b -> Digit a #

Functor Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Elem a -> Elem b #

(<$) :: a -> Elem b -> Elem a #

Functor FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> FingerTree a -> FingerTree b #

(<$) :: a -> FingerTree b -> FingerTree a #

Functor Node 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Node a -> Node b #

(<$) :: a -> Node b -> Node a #

Functor Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Functor ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewL a -> ViewL b #

(<$) :: a -> ViewL b -> ViewL a #

Functor ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewR a -> ViewR b #

(<$) :: a -> ViewR b -> ViewR a #

Functor Tree 
Instance details

Defined in Data.Tree

Methods

fmap :: (a -> b) -> Tree a -> Tree b #

(<$) :: a -> Tree b -> Tree a #

Functor DList 
Instance details

Defined in Data.DList.Internal

Methods

fmap :: (a -> b) -> DList a -> DList b #

(<$) :: a -> DList b -> DList a #

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor AnnotDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> AnnotDetails a -> AnnotDetails b #

(<$) :: a -> AnnotDetails b -> AnnotDetails a #

Functor Doc 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Functor Span 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> Span a -> Span b #

(<$) :: a -> Span b -> Span a #

Functor Array 
Instance details

Defined in Data.Primitive.Array

Methods

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

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

Functor SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fmap :: (a -> b) -> SmallArray a -> SmallArray b #

(<$) :: a -> SmallArray b -> SmallArray a #

Functor Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Functor TyVarBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fmap :: (a -> b) -> TyVarBndr a -> TyVarBndr b #

(<$) :: a -> TyVarBndr b -> TyVarBndr a #

Functor Vector 
Instance details

Defined in Data.Vector

Methods

fmap :: (a -> b) -> Vector a -> Vector b #

(<$) :: a -> Vector b -> Vector a #

Functor Id 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

fmap :: (a -> b) -> Id a -> Id b #

(<$) :: a -> Id b -> Id a #

Functor Box 
Instance details

Defined in Data.Stream.Monadic

Methods

fmap :: (a -> b) -> Box a -> Box b #

(<$) :: a -> Box b -> Box a #

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> NonEmpty a -> NonEmpty b #

(<$) :: a -> NonEmpty b -> NonEmpty a #

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b #

(<$) :: a -> Maybe b -> Maybe a #

Functor Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Solo a -> Solo b #

(<$) :: a -> Solo b -> Solo a #

Functor []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor f => Functor (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

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

(<$) :: a -> Co f b -> Co f a #

Monad m => Functor (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

(<$) :: a -> WrappedMonad m b -> WrappedMonad m a #

Arrow a => Functor (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

(<$) :: a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Functor (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

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

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

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

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

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

Functor (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

fmap :: (a -> b) -> Proxy a -> Proxy b #

(<$) :: a -> Proxy b -> Proxy a #

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 #

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

Functor (Array i)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

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

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

Functor (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor (V1 :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor (ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

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

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

Functor (SetM s) 
Instance details

Defined in Data.Graph

Methods

fmap :: (a -> b) -> SetM s a -> SetM s b #

(<$) :: a -> SetM s b -> SetM s a #

Functor (Map k) 
Instance details

Defined in Data.Map.Internal

Methods

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

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

Functor (Validation e) 
Instance details

Defined in Data.Either.Validation

Methods

fmap :: (a -> b) -> Validation e a -> Validation e b #

(<$) :: a -> Validation e b -> Validation e a #

Functor f => Functor (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

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

(<$) :: a -> Cofree f b -> Cofree f a #

Functor f => Functor (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

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

(<$) :: a -> Free f b -> Free f a #

Functor f => Functor (Act f) 
Instance details

Defined in Data.Key

Methods

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

(<$) :: a -> Act f b -> Act f a #

Functor (StateL s) 
Instance details

Defined in Data.Key

Methods

fmap :: (a -> b) -> StateL s a -> StateL s b #

(<$) :: a -> StateL s b -> StateL s a #

Functor (StateR s) 
Instance details

Defined in Data.Key

Methods

fmap :: (a -> b) -> StateR s a -> StateR s b #

(<$) :: a -> StateR s b -> StateR s a #

Functor (Over m) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> Over m a -> Over m b #

(<$) :: a -> Over m b -> Over m a #

Functor f => Functor (SelectA f) 
Instance details

Defined in Control.Selective

Methods

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

(<$) :: a -> SelectA f b -> SelectA f a #

Functor f => Functor (SelectM f) 
Instance details

Defined in Control.Selective

Methods

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

(<$) :: a -> SelectM f b -> SelectM f a #

Functor (Under m) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> Under m a -> Under m b #

(<$) :: a -> Under m b -> Under m a #

Functor (Validation e) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> Validation e a -> Validation e b #

(<$) :: a -> Validation e b -> Validation e a #

Functor (Select f) 
Instance details

Defined in Control.Selective.Free

Methods

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

(<$) :: a -> Select f b -> Select f a #

Functor (Over m) 
Instance details

Defined in Control.Selective.Multi

Methods

fmap :: (a -> b) -> Over m a -> Over m b #

(<$) :: a -> Over m b -> Over m a #

Functor (Under m) 
Instance details

Defined in Control.Selective.Multi

Methods

fmap :: (a -> b) -> Under m a -> Under m b #

(<$) :: a -> Under m b -> Under m a #

Functor f => Functor (Select f) 
Instance details

Defined in Control.Selective.Rigid.Free

Methods

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

(<$) :: a -> Select f b -> Select f a #

Functor (Select f) 
Instance details

Defined in Control.Selective.Rigid.Freer

Methods

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

(<$) :: a -> Select f b -> Select f a #

Functor f => Functor (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

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

(<$) :: a -> MaybeApply f b -> MaybeApply f a #

Functor f => Functor (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

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

(<$) :: a -> WrappedApplicative f b -> WrappedApplicative f a #

Functor f => Functor (Act f) 
Instance details

Defined in Data.Semigroup.Bifoldable

Methods

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

(<$) :: a -> Act f b -> Act f a #

Functor f => Functor (Act f) 
Instance details

Defined in Data.Semigroup.Foldable

Methods

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

(<$) :: a -> Act f b -> Act f a #

Functor f => Functor (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

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

(<$) :: a -> Lift f b -> Lift f a #

Functor m => Functor (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

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

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

Functor (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fmap :: (a -> b) -> HashMap k a -> HashMap k b #

(<$) :: a -> HashMap k b -> HashMap k a #

Functor (Step s) 
Instance details

Defined in Data.Stream.Monadic

Methods

fmap :: (a -> b) -> Step s a -> Step s b #

(<$) :: a -> Step s b -> Step s a #

Monad m => Functor (Stream m) 
Instance details

Defined in Data.Stream.Monadic

Methods

fmap :: (a -> b) -> Stream m a -> Stream m b #

(<$) :: a -> Stream m b -> Stream m a #

Functor ((,) a)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Arrow a => Functor (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

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

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 #

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

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 #

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

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 #

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

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 #

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

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 #

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor (URec Char :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Char a -> URec Char b #

(<$) :: a -> URec Char b -> URec Char a #

Functor (URec Double :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Double a -> URec Double b #

(<$) :: a -> URec Double b -> URec Double a #

Functor (URec Float :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Float a -> URec Float b #

(<$) :: a -> URec Float b -> URec Float a #

Functor (URec Int :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Int a -> URec Int b #

(<$) :: a -> URec Int b -> URec Int a #

Functor (URec Word :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Word a -> URec Word b #

(<$) :: a -> URec Word b -> URec Word a #

Functor (Mag a b) 
Instance details

Defined in Data.Biapplicative

Methods

fmap :: (a0 -> b0) -> Mag a b a0 -> Mag a b b0 #

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

Bifunctor p => Functor (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

fmap :: (a -> b) -> Fix p a -> Fix p b #

(<$) :: a -> Fix p b -> Fix p a #

Bifunctor p => Functor (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

fmap :: (a -> b) -> Join p a -> Join p b #

(<$) :: a -> Join p b -> Join p a #

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

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

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

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

(Contravariant f, Contravariant g) => Functor (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant.Compose

Methods

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

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

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

Defined in Data.Functor.Contravariant.Compose

Methods

fmap :: (a -> b) -> ComposeCF f g a -> ComposeCF f g b #

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

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

Defined in Data.Functor.Contravariant.Compose

Methods

fmap :: (a -> b) -> ComposeFC f g a -> ComposeFC f g b #

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

Functor f => Functor (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fmap :: (a0 -> b) -> FreeF f a a0 -> FreeF f a b #

(<$) :: a0 -> FreeF f a b -> FreeF f a a0 #

(Functor f, Functor m) => Functor (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fmap :: (a -> b) -> FreeT f m a -> FreeT f m b #

(<$) :: a -> FreeT f m b -> FreeT f m a #

Functor f => Functor (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

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

(<$) :: a -> WrappedFunctor f b -> WrappedFunctor f a #

Functor (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

fmap :: (a -> b) -> Day f g a -> Day f g b #

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

Functor (CopastroSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> CopastroSum p a a0 -> CopastroSum p a b #

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

Functor (CotambaraSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> CotambaraSum p a a0 -> CotambaraSum p a b #

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

Functor (PastroSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> PastroSum p a a0 -> PastroSum p a b #

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

Profunctor p => Functor (TambaraSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> TambaraSum p a a0 -> TambaraSum p a b #

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

Profunctor p => Functor (Closure p a) 
Instance details

Defined in Data.Profunctor.Closed

Methods

fmap :: (a0 -> b) -> Closure p a a0 -> Closure p a b #

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

Functor (Environment p a) 
Instance details

Defined in Data.Profunctor.Closed

Methods

fmap :: (a0 -> b) -> Environment p a a0 -> Environment p a b #

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

Functor (Bar t b) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

fmap :: (a -> b0) -> Bar t b a -> Bar t b b0 #

(<$) :: a -> Bar t b b0 -> Bar t b a #

Functor (FreeMapping p a) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

fmap :: (a0 -> b) -> FreeMapping p a a0 -> FreeMapping p a b #

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

Profunctor p => Functor (Coprep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

fmap :: (a -> b) -> Coprep p a -> Coprep p b #

(<$) :: a -> Coprep p b -> Coprep p a #

Profunctor p => Functor (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

fmap :: (a -> b) -> Prep p a -> Prep p b #

(<$) :: a -> Prep p b -> Prep p a #

Functor (Copastro p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

fmap :: (a0 -> b) -> Copastro p a a0 -> Copastro p a b #

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

Functor (Cotambara p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

fmap :: (a0 -> b) -> Cotambara p a a0 -> Cotambara p a b #

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

Functor (Pastro p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

fmap :: (a0 -> b) -> Pastro p a a0 -> Pastro p a b #

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

Profunctor p => Functor (Tambara p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

fmap :: (a0 -> b) -> Tambara p a a0 -> Tambara p a b #

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

Functor (Baz t b) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

fmap :: (a -> b0) -> Baz t b a -> Baz t b b0 #

(<$) :: a -> Baz t b b0 -> Baz t b a #

Functor (Bazaar a b) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

fmap :: (a0 -> b0) -> Bazaar a b a0 -> Bazaar a b b0 #

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

Functor (FreeTraversing p a) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

fmap :: (a0 -> b) -> FreeTraversing p a a0 -> FreeTraversing p a b #

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

Functor (Coyoneda p a) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

fmap :: (a0 -> b) -> Coyoneda p a a0 -> Coyoneda p a b #

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

Functor (Yoneda p a) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

fmap :: (a0 -> b) -> Yoneda p a a0 -> Yoneda p a b #

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

Functor f => Functor (ComposeEither f e) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> ComposeEither f e a -> ComposeEither f e b #

(<$) :: a -> ComposeEither f e b -> ComposeEither f e a #

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

Defined in Control.Selective

Methods

fmap :: (a -> b) -> ComposeTraversable f g a -> ComposeTraversable f g b #

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

Functor f => Functor (Static f a) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

fmap :: (a0 -> b) -> Static f a a0 -> Static f a b #

(<$) :: a0 -> Static f a b -> Static f a a0 #

Functor (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

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

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

Functor f => Functor (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

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

(<$) :: a -> Backwards f b -> Backwards f a #

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 #

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

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 #

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

Functor m => Functor (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fmap :: (a -> b) -> IdentityT m a -> IdentityT m b #

(<$) :: a -> IdentityT m b -> IdentityT m a #

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 #

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

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 #

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

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 #

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

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 #

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

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 #

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

Functor (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

fmap :: (a0 -> b) -> Constant a a0 -> Constant a b #

(<$) :: a0 -> Constant a b -> Constant a a0 #

Functor f => Functor (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

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

(<$) :: a -> Reverse f b -> Reverse f a #

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) #

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

(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 #

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

(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 #

(<$) :: a -> Sum f g b -> Sum 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 #

(<$) :: a -> (f :*: g) b -> (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 #

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

Functor (K1 i c :: TYPE LiftedRep -> 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 #

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

Functor (Cokleisli w a) 
Instance details

Defined in Control.Comonad

Methods

fmap :: (a0 -> b) -> Cokleisli w a a0 -> Cokleisli w a b #

(<$) :: a0 -> Cokleisli w a b -> Cokleisli w a a0 #

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 #

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

(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 #

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

Functor (Costar f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

fmap :: (a0 -> b) -> Costar f a a0 -> Costar f a b #

(<$) :: a0 -> Costar f a b -> Costar f a a0 #

Functor (Forget r a :: Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

fmap :: (a0 -> b) -> Forget r a a0 -> Forget r a b #

(<$) :: a0 -> Forget r a b -> Forget r a a0 #

Functor f => Functor (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

fmap :: (a0 -> b) -> Star f a a0 -> Star f a b #

(<$) :: a0 -> Star f a b -> Star f a a0 #

Functor (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

fmap :: (a -> b) -> ContT r m a -> ContT r m b #

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

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) #

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

Functor ((->) r)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

(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 #

(<$) :: a -> Compose f g b -> Compose 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 #

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

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 #

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

Functor (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

fmap :: (a0 -> b) -> Clown f a a0 -> Clown f a b #

(<$) :: a0 -> Clown f a b -> Clown f a a0 #

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 #

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

Functor g => Functor (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

fmap :: (a0 -> b) -> Joker g a a0 -> Joker g a b #

(<$) :: a0 -> Joker g a b -> Joker g a a0 #

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

Defined in Data.Bifunctor.Wrapped

Methods

fmap :: (a0 -> b) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b #

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

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 #

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

Profunctor p => Functor (Codensity p a) 
Instance details

Defined in Data.Profunctor.Ran

Methods

fmap :: (a0 -> b) -> Codensity p a a0 -> Codensity p a b #

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

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 #

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

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 #

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

(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 #

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

(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 #

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

(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 #

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

Profunctor p => Functor (Procompose p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Procompose p q a a0 -> Procompose p q a b #

(<$) :: a0 -> Procompose p q a b -> Procompose p q a a0 #

Profunctor p => Functor (Rift p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Rift p q a a0 -> Rift p q a b #

(<$) :: a0 -> Rift p q a b -> Rift p q a a0 #

Profunctor q => Functor (Ran p q a) 
Instance details

Defined in Data.Profunctor.Ran

Methods

fmap :: (a0 -> b) -> Ran p q a a0 -> Ran p q a b #

(<$) :: a0 -> Ran p q a b -> Ran p q a a0 #

(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 #

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

class Num a where #

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 #

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

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

negate :: a -> a #

Unary negation.

abs :: a -> a #

Absolute value.

signum :: a -> a #

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 #

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 CBool 
Instance details

Defined in Foreign.C.Types

Num CChar 
Instance details

Defined in Foreign.C.Types

Num CClock 
Instance details

Defined in Foreign.C.Types

Num CDouble 
Instance details

Defined in Foreign.C.Types

Num CFloat 
Instance details

Defined in Foreign.C.Types

Num CInt 
Instance details

Defined in Foreign.C.Types

Methods

(+) :: CInt -> CInt -> CInt #

(-) :: CInt -> CInt -> CInt #

(*) :: CInt -> CInt -> CInt #

negate :: CInt -> CInt #

abs :: CInt -> CInt #

signum :: CInt -> CInt #

fromInteger :: Integer -> CInt #

Num CIntMax 
Instance details

Defined in Foreign.C.Types

Num CIntPtr 
Instance details

Defined in Foreign.C.Types

Num CLLong 
Instance details

Defined in Foreign.C.Types

Num CLong 
Instance details

Defined in Foreign.C.Types

Num CPtrdiff 
Instance details

Defined in Foreign.C.Types

Num CSChar 
Instance details

Defined in Foreign.C.Types

Num CSUSeconds 
Instance details

Defined in Foreign.C.Types

Num CShort 
Instance details

Defined in Foreign.C.Types

Num CSigAtomic 
Instance details

Defined in Foreign.C.Types

Num CSize 
Instance details

Defined in Foreign.C.Types

Num CTime 
Instance details

Defined in Foreign.C.Types

Num CUChar 
Instance details

Defined in Foreign.C.Types

Num CUInt 
Instance details

Defined in Foreign.C.Types

Num CUIntMax 
Instance details

Defined in Foreign.C.Types

Num CUIntPtr 
Instance details

Defined in Foreign.C.Types

Num CULLong 
Instance details

Defined in Foreign.C.Types

Num CULong 
Instance details

Defined in Foreign.C.Types

Num CUSeconds 
Instance details

Defined in Foreign.C.Types

Num CUShort 
Instance details

Defined in Foreign.C.Types

Num CWchar 
Instance details

Defined in Foreign.C.Types

Num IntPtr 
Instance details

Defined in Foreign.Ptr

Num WordPtr 
Instance details

Defined in Foreign.Ptr

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 Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(+) :: Int8 -> Int8 -> Int8 #

(-) :: Int8 -> Int8 -> Int8 #

(*) :: Int8 -> Int8 -> Int8 #

negate :: Int8 -> Int8 #

abs :: Int8 -> Int8 #

signum :: Int8 -> Int8 #

fromInteger :: Integer -> Int8 #

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num CBlkCnt 
Instance details

Defined in System.Posix.Types

Num CBlkSize 
Instance details

Defined in System.Posix.Types

Num CCc 
Instance details

Defined in System.Posix.Types

Methods

(+) :: CCc -> CCc -> CCc #

(-) :: CCc -> CCc -> CCc #

(*) :: CCc -> CCc -> CCc #

negate :: CCc -> CCc #

abs :: CCc -> CCc #

signum :: CCc -> CCc #

fromInteger :: Integer -> CCc #

Num CClockId 
Instance details

Defined in System.Posix.Types

Num CDev 
Instance details

Defined in System.Posix.Types

Methods

(+) :: CDev -> CDev -> CDev #

(-) :: CDev -> CDev -> CDev #

(*) :: CDev -> CDev -> CDev #

negate :: CDev -> CDev #

abs :: CDev -> CDev #

signum :: CDev -> CDev #

fromInteger :: Integer -> CDev #

Num CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Num CFsFilCnt 
Instance details

Defined in System.Posix.Types

Num CGid 
Instance details

Defined in System.Posix.Types

Methods

(+) :: CGid -> CGid -> CGid #

(-) :: CGid -> CGid -> CGid #

(*) :: CGid -> CGid -> CGid #

negate :: CGid -> CGid #

abs :: CGid -> CGid #

signum :: CGid -> CGid #

fromInteger :: Integer -> CGid #

Num CId 
Instance details

Defined in System.Posix.Types

Methods

(+) :: CId -> CId -> CId #

(-) :: CId -> CId -> CId #

(*) :: CId -> CId -> CId #

negate :: CId -> CId #

abs :: CId -> CId #

signum :: CId -> CId #

fromInteger :: Integer -> CId #

Num CIno 
Instance details

Defined in System.Posix.Types

Methods

(+) :: CIno -> CIno -> CIno #

(-) :: CIno -> CIno -> CIno #

(*) :: CIno -> CIno -> CIno #

negate :: CIno -> CIno #

abs :: CIno -> CIno #

signum :: CIno -> CIno #

fromInteger :: Integer -> CIno #

Num CKey 
Instance details

Defined in System.Posix.Types

Methods

(+) :: CKey -> CKey -> CKey #

(-) :: CKey -> CKey -> CKey #

(*) :: CKey -> CKey -> CKey #

negate :: CKey -> CKey #

abs :: CKey -> CKey #

signum :: CKey -> CKey #

fromInteger :: Integer -> CKey #

Num CMode 
Instance details

Defined in System.Posix.Types

Num CNfds 
Instance details

Defined in System.Posix.Types

Num CNlink 
Instance details

Defined in System.Posix.Types

Num COff 
Instance details

Defined in System.Posix.Types

Methods

(+) :: COff -> COff -> COff #

(-) :: COff -> COff -> COff #

(*) :: COff -> COff -> COff #

negate :: COff -> COff #

abs :: COff -> COff #

signum :: COff -> COff #

fromInteger :: Integer -> COff #

Num CPid 
Instance details

Defined in System.Posix.Types

Methods

(+) :: CPid -> CPid -> CPid #

(-) :: CPid -> CPid -> CPid #

(*) :: CPid -> CPid -> CPid #

negate :: CPid -> CPid #

abs :: CPid -> CPid #

signum :: CPid -> CPid #

fromInteger :: Integer -> CPid #

Num CRLim 
Instance details

Defined in System.Posix.Types

Num CSocklen 
Instance details

Defined in System.Posix.Types

Num CSpeed 
Instance details

Defined in System.Posix.Types

Num CSsize 
Instance details

Defined in System.Posix.Types

Num CTcflag 
Instance details

Defined in System.Posix.Types

Num CUid 
Instance details

Defined in System.Posix.Types

Methods

(+) :: CUid -> CUid -> CUid #

(-) :: CUid -> CUid -> CUid #

(*) :: CUid -> CUid -> CUid #

negate :: CUid -> CUid #

abs :: CUid -> CUid #

signum :: CUid -> CUid #

fromInteger :: Integer -> CUid #

Num Fd 
Instance details

Defined in System.Posix.Types

Methods

(+) :: Fd -> Fd -> Fd #

(-) :: Fd -> Fd -> Fd #

(*) :: Fd -> Fd -> Fd #

negate :: Fd -> Fd #

abs :: Fd -> Fd #

signum :: Fd -> Fd #

fromInteger :: Integer -> Fd #

Num Scientific

WARNING: + and - compute the Integer magnitude: 10^e where e is the difference between the base10Exponents 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 CodePoint 
Instance details

Defined in Data.Text.Encoding

Methods

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

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

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

negate :: CodePoint -> CodePoint #

abs :: CodePoint -> CodePoint #

signum :: CodePoint -> CodePoint #

fromInteger :: Integer -> CodePoint #

Num DecoderState 
Instance details

Defined in Data.Text.Encoding

Methods

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

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

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

negate :: DecoderState -> DecoderState #

abs :: DecoderState -> DecoderState #

signum :: DecoderState -> DecoderState #

fromInteger :: Integer -> DecoderState #

Num I16 
Instance details

Defined in Data.Text.Foreign

Methods

(+) :: I16 -> I16 -> I16 #

(-) :: I16 -> I16 -> I16 #

(*) :: I16 -> I16 -> I16 #

negate :: I16 -> I16 #

abs :: I16 -> I16 #

signum :: I16 -> I16 #

fromInteger :: Integer -> I16 #

Num DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Num NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

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 Int

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Int -> Int -> Int #

(-) :: Int -> Int -> Int #

(*) :: Int -> Int -> Int #

negate :: Int -> Int #

abs :: Int -> Int #

signum :: Int -> Int #

fromInteger :: Integer -> Int #

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Word -> Word -> Word #

(-) :: Word -> Word -> Word #

(*) :: Word -> Word -> Word #

negate :: Word -> Word #

abs :: Word -> Word #

signum :: Word -> Word #

fromInteger :: Integer -> Word #

RealFloat a => Num (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(+) :: Complex a -> Complex a -> Complex a #

(-) :: Complex a -> Complex a -> Complex a #

(*) :: Complex a -> Complex a -> Complex a #

negate :: Complex a -> Complex a #

abs :: Complex a -> Complex a #

signum :: Complex a -> Complex a #

fromInteger :: Integer -> Complex a #

Num a => Num (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(+) :: Down a -> Down a -> Down a #

(-) :: Down a -> Down a -> Down a #

(*) :: Down a -> Down a -> Down a #

negate :: Down a -> Down a #

abs :: Down a -> Down a #

signum :: Down a -> Down a #

fromInteger :: Integer -> Down a #

Num a => Num (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Max a -> Max a -> Max a #

(-) :: Max a -> Max a -> Max a #

(*) :: Max a -> Max a -> Max a #

negate :: Max a -> Max a #

abs :: Max a -> Max a #

signum :: Max a -> Max a #

fromInteger :: Integer -> Max a #

Num a => Num (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Min a -> Min a -> Min a #

(-) :: Min a -> Min a -> Min a #

(*) :: Min a -> Min a -> Min a #

negate :: Min a -> Min a #

abs :: Min a -> Min a #

signum :: Min a -> Min a #

fromInteger :: Integer -> Min a #

Num a => Num (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Product a -> Product a -> Product a #

(-) :: Product a -> Product a -> Product a #

(*) :: Product a -> Product a -> Product a #

negate :: Product a -> Product a #

abs :: Product a -> Product a #

signum :: Product a -> Product a #

fromInteger :: Integer -> Product a #

Num a => Num (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Sum a -> Sum a -> Sum a #

(-) :: Sum a -> Sum a -> Sum a #

(*) :: Sum a -> Sum a -> Sum a #

negate :: Sum a -> Sum a #

abs :: Sum a -> Sum a #

signum :: Sum a -> Sum a #

fromInteger :: Integer -> Sum a #

Integral a => Num (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(+) :: Ratio a -> Ratio a -> Ratio a #

(-) :: Ratio a -> Ratio a -> Ratio a #

(*) :: Ratio a -> Ratio a -> Ratio a #

negate :: Ratio a -> Ratio a #

abs :: Ratio a -> Ratio a #

signum :: Ratio a -> Ratio a #

fromInteger :: Integer -> Ratio a #

HasResolution a => Num (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

(+) :: Fixed a -> Fixed a -> Fixed a #

(-) :: Fixed a -> Fixed a -> Fixed a #

(*) :: Fixed a -> Fixed a -> Fixed a #

negate :: Fixed a -> Fixed a #

abs :: Fixed a -> Fixed a #

signum :: Fixed a -> Fixed a #

fromInteger :: Integer -> Fixed a #

Num a => Num (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

(+) :: Op a b -> Op a b -> Op a b #

(-) :: Op a b -> Op a b -> Op a b #

(*) :: Op a b -> Op a b -> Op a b #

negate :: Op a b -> Op a b #

abs :: Op a b -> Op a b #

signum :: Op a b -> Op a b #

fromInteger :: Integer -> Op a b #

Num a => Num (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(+) :: Const a b -> Const a b -> Const a b #

(-) :: Const a b -> Const a b -> Const a b #

(*) :: Const a b -> Const a b -> Const a b #

negate :: Const a b -> Const a b #

abs :: Const a b -> Const a b #

signum :: Const a b -> Const a b #

fromInteger :: Integer -> Const a b #

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

Note that even if the underlying Num and Applicative instances are lawful, for most Applicatives, this instance will not be lawful. If you use this instance with the list Applicative, the following customary laws will not hold:

Commutativity:

>>> Ap [10,20] + Ap [1,2]
Ap {getAp = [11,12,21,22]}
>>> Ap [1,2] + Ap [10,20]
Ap {getAp = [11,21,12,22]}

Additive inverse:

>>> Ap [] + negate (Ap [])
Ap {getAp = []}
>>> fromInteger 0 :: Ap [] Int
Ap {getAp = [0]}

Distributivity:

>>> Ap [1,2] * (3 + 4)
Ap {getAp = [7,14]}
>>> (Ap [1,2] * 3) + (Ap [1,2] * 4)
Ap {getAp = [7,11,10,14]}

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(+) :: Ap f a -> Ap f a -> Ap f a #

(-) :: Ap f a -> Ap f a -> Ap f a #

(*) :: Ap f a -> Ap f a -> Ap f a #

negate :: Ap f a -> Ap f a #

abs :: Ap f a -> Ap f a #

signum :: Ap f a -> Ap f a #

fromInteger :: Integer -> Ap f a #

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Alt f a -> Alt f a -> Alt f a #

(-) :: Alt f a -> Alt f a -> Alt f a #

(*) :: Alt f a -> Alt f a -> Alt f a #

negate :: Alt f a -> Alt f a #

abs :: Alt f a -> Alt f a #

signum :: Alt f a -> Alt f a #

fromInteger :: Integer -> Alt f a #

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

Defined in Data.Tagged

Methods

(+) :: Tagged s a -> Tagged s a -> Tagged s a #

(-) :: Tagged s a -> Tagged s a -> Tagged s a #

(*) :: Tagged s a -> Tagged s a -> Tagged s a #

negate :: Tagged s a -> Tagged s a #

abs :: Tagged s a -> Tagged s a #

signum :: Tagged s a -> Tagged s a #

fromInteger :: Integer -> Tagged s a #

class Eq a => Ord a where #

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.

Ord, as defined by the Haskell report, implements a total order and has the following properties:

Comparability
x <= y || y <= x = True
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

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 #

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

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

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

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

max :: a -> a -> a #

min :: a -> a -> a #

Instances

Instances details
Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: All -> All -> Ordering #

(<) :: All -> All -> Bool #

(<=) :: All -> All -> Bool #

(>) :: All -> All -> Bool #

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

max :: All -> All -> All #

min :: All -> All -> All #

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Any -> Any -> Ordering #

(<) :: Any -> Any -> Bool #

(<=) :: Any -> Any -> Bool #

(>) :: Any -> Any -> Bool #

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

max :: Any -> Any -> Any #

min :: Any -> Any -> Any #

Ord SomeTypeRep 
Instance details

Defined in Data.Typeable.Internal

Ord Unique 
Instance details

Defined in Data.Unique

Ord Version

Since: base-2.1

Instance details

Defined in Data.Version

Ord Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

compare :: Void -> Void -> Ordering #

(<) :: Void -> Void -> Bool #

(<=) :: Void -> Void -> Bool #

(>) :: Void -> Void -> Bool #

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

max :: Void -> Void -> Void #

min :: Void -> Void -> Void #

Ord CBool 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CBool -> CBool -> Ordering #

(<) :: CBool -> CBool -> Bool #

(<=) :: CBool -> CBool -> Bool #

(>) :: CBool -> CBool -> Bool #

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

max :: CBool -> CBool -> CBool #

min :: CBool -> CBool -> CBool #

Ord CChar 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CChar -> CChar -> Ordering #

(<) :: CChar -> CChar -> Bool #

(<=) :: CChar -> CChar -> Bool #

(>) :: CChar -> CChar -> Bool #

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

max :: CChar -> CChar -> CChar #

min :: CChar -> CChar -> CChar #

Ord CClock 
Instance details

Defined in Foreign.C.Types

Ord CDouble 
Instance details

Defined in Foreign.C.Types

Ord CFloat 
Instance details

Defined in Foreign.C.Types

Ord CInt 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CInt -> CInt -> Ordering #

(<) :: CInt -> CInt -> Bool #

(<=) :: CInt -> CInt -> Bool #

(>) :: CInt -> CInt -> Bool #

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

max :: CInt -> CInt -> CInt #

min :: CInt -> CInt -> CInt #

Ord CIntMax 
Instance details

Defined in Foreign.C.Types

Ord CIntPtr 
Instance details

Defined in Foreign.C.Types

Ord CLLong 
Instance details

Defined in Foreign.C.Types

Ord CLong 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CLong -> CLong -> Ordering #

(<) :: CLong -> CLong -> Bool #

(<=) :: CLong -> CLong -> Bool #

(>) :: CLong -> CLong -> Bool #

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

max :: CLong -> CLong -> CLong #

min :: CLong -> CLong -> CLong #

Ord CPtrdiff 
Instance details

Defined in Foreign.C.Types

Ord CSChar 
Instance details

Defined in Foreign.C.Types

Ord CSUSeconds 
Instance details

Defined in Foreign.C.Types

Ord CShort 
Instance details

Defined in Foreign.C.Types

Ord CSigAtomic 
Instance details

Defined in Foreign.C.Types

Ord CSize 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CSize -> CSize -> Ordering #

(<) :: CSize -> CSize -> Bool #

(<=) :: CSize -> CSize -> Bool #

(>) :: CSize -> CSize -> Bool #

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

max :: CSize -> CSize -> CSize #

min :: CSize -> CSize -> CSize #

Ord CTime 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CTime -> CTime -> Ordering #

(<) :: CTime -> CTime -> Bool #

(<=) :: CTime -> CTime -> Bool #

(>) :: CTime -> CTime -> Bool #

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

max :: CTime -> CTime -> CTime #

min :: CTime -> CTime -> CTime #

Ord CUChar 
Instance details

Defined in Foreign.C.Types

Ord CUInt 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CUInt -> CUInt -> Ordering #

(<) :: CUInt -> CUInt -> Bool #

(<=) :: CUInt -> CUInt -> Bool #

(>) :: CUInt -> CUInt -> Bool #

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

max :: CUInt -> CUInt -> CUInt #

min :: CUInt -> CUInt -> CUInt #

Ord CUIntMax 
Instance details

Defined in Foreign.C.Types

Ord CUIntPtr 
Instance details

Defined in Foreign.C.Types

Ord CULLong 
Instance details

Defined in Foreign.C.Types

Ord CULong 
Instance details

Defined in Foreign.C.Types

Ord CUSeconds 
Instance details

Defined in Foreign.C.Types

Ord CUShort 
Instance details

Defined in Foreign.C.Types

Ord CWchar 
Instance details

Defined in Foreign.C.Types

Ord IntPtr 
Instance details

Defined in Foreign.Ptr

Ord WordPtr 
Instance details

Defined in Foreign.Ptr

Ord BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Ord ThreadId

Since: base-4.2.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 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 Fingerprint

Since: base-4.4.0.0

Instance details

Defined in GHC.Fingerprint.Type

Ord Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Ord ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord AsyncException

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 IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int16 -> Int16 -> Ordering #

(<) :: Int16 -> Int16 -> Bool #

(<=) :: Int16 -> Int16 -> Bool #

(>) :: Int16 -> Int16 -> Bool #

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

max :: Int16 -> Int16 -> Int16 #

min :: Int16 -> Int16 -> Int16 #

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int32 -> Int32 -> Ordering #

(<) :: Int32 -> Int32 -> Bool #

(<=) :: Int32 -> Int32 -> Bool #

(>) :: Int32 -> Int32 -> Bool #

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

max :: Int32 -> Int32 -> Int32 #

min :: Int32 -> Int32 -> Int32 #

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int64 -> Int64 -> Ordering #

(<) :: Int64 -> Int64 -> Bool #

(<=) :: Int64 -> Int64 -> Bool #

(>) :: Int64 -> Int64 -> Bool #

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

max :: Int64 -> Int64 -> Int64 #

min :: Int64 -> Int64 -> Int64 #

Ord Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int8 -> Int8 -> Ordering #

(<) :: Int8 -> Int8 -> Bool #

(<=) :: Int8 -> Int8 -> Bool #

(>) :: Int8 -> Int8 -> Bool #

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

max :: Int8 -> Int8 -> Int8 #

min :: Int8 -> Int8 -> Int8 #

Ord SomeChar 
Instance details

Defined in GHC.TypeLits

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 GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

compare :: Word8 -> Word8 -> Ordering #

(<) :: Word8 -> Word8 -> Bool #

(<=) :: Word8 -> Word8 -> Bool #

(>) :: Word8 -> Word8 -> Bool #

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

max :: Word8 -> Word8 -> Word8 #

min :: Word8 -> Word8 -> Word8 #

Ord CBlkCnt 
Instance details

Defined in System.Posix.Types

Ord CBlkSize 
Instance details

Defined in System.Posix.Types

Ord CCc 
Instance details

Defined in System.Posix.Types

Methods

compare :: CCc -> CCc -> Ordering #

(<) :: CCc -> CCc -> Bool #

(<=) :: CCc -> CCc -> Bool #

(>) :: CCc -> CCc -> Bool #

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

max :: CCc -> CCc -> CCc #

min :: CCc -> CCc -> CCc #

Ord CClockId 
Instance details

Defined in System.Posix.Types

Ord CDev 
Instance details

Defined in System.Posix.Types

Methods

compare :: CDev -> CDev -> Ordering #

(<) :: CDev -> CDev -> Bool #

(<=) :: CDev -> CDev -> Bool #

(>) :: CDev -> CDev -> Bool #

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

max :: CDev -> CDev -> CDev #

min :: CDev -> CDev -> CDev #

Ord CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Ord CFsFilCnt 
Instance details

Defined in System.Posix.Types

Ord CGid 
Instance details

Defined in System.Posix.Types

Methods

compare :: CGid -> CGid -> Ordering #

(<) :: CGid -> CGid -> Bool #

(<=) :: CGid -> CGid -> Bool #

(>) :: CGid -> CGid -> Bool #

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

max :: CGid -> CGid -> CGid #

min :: CGid -> CGid -> CGid #

Ord CId 
Instance details

Defined in System.Posix.Types

Methods

compare :: CId -> CId -> Ordering #

(<) :: CId -> CId -> Bool #

(<=) :: CId -> CId -> Bool #

(>) :: CId -> CId -> Bool #

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

max :: CId -> CId -> CId #

min :: CId -> CId -> CId #

Ord CIno 
Instance details

Defined in System.Posix.Types

Methods

compare :: CIno -> CIno -> Ordering #

(<) :: CIno -> CIno -> Bool #

(<=) :: CIno -> CIno -> Bool #

(>) :: CIno -> CIno -> Bool #

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

max :: CIno -> CIno -> CIno #

min :: CIno -> CIno -> CIno #

Ord CKey 
Instance details

Defined in System.Posix.Types

Methods

compare :: CKey -> CKey -> Ordering #

(<) :: CKey -> CKey -> Bool #

(<=) :: CKey -> CKey -> Bool #

(>) :: CKey -> CKey -> Bool #

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

max :: CKey -> CKey -> CKey #

min :: CKey -> CKey -> CKey #

Ord CMode 
Instance details

Defined in System.Posix.Types

Methods

compare :: CMode -> CMode -> Ordering #

(<) :: CMode -> CMode -> Bool #

(<=) :: CMode -> CMode -> Bool #

(>) :: CMode -> CMode -> Bool #

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

max :: CMode -> CMode -> CMode #

min :: CMode -> CMode -> CMode #

Ord CNfds 
Instance details

Defined in System.Posix.Types

Methods

compare :: CNfds -> CNfds -> Ordering #

(<) :: CNfds -> CNfds -> Bool #

(<=) :: CNfds -> CNfds -> Bool #

(>) :: CNfds -> CNfds -> Bool #

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

max :: CNfds -> CNfds -> CNfds #

min :: CNfds -> CNfds -> CNfds #

Ord CNlink 
Instance details

Defined in System.Posix.Types

Ord COff 
Instance details

Defined in System.Posix.Types

Methods

compare :: COff -> COff -> Ordering #

(<) :: COff -> COff -> Bool #

(<=) :: COff -> COff -> Bool #

(>) :: COff -> COff -> Bool #

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

max :: COff -> COff -> COff #

min :: COff -> COff -> COff #

Ord CPid 
Instance details

Defined in System.Posix.Types

Methods

compare :: CPid -> CPid -> Ordering #

(<) :: CPid -> CPid -> Bool #

(<=) :: CPid -> CPid -> Bool #

(>) :: CPid -> CPid -> Bool #

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

max :: CPid -> CPid -> CPid #

min :: CPid -> CPid -> CPid #

Ord CRLim 
Instance details

Defined in System.Posix.Types

Methods

compare :: CRLim -> CRLim -> Ordering #

(<) :: CRLim -> CRLim -> Bool #

(<=) :: CRLim -> CRLim -> Bool #

(>) :: CRLim -> CRLim -> Bool #

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

max :: CRLim -> CRLim -> CRLim #

min :: CRLim -> CRLim -> CRLim #

Ord CSocklen 
Instance details

Defined in System.Posix.Types

Ord CSpeed 
Instance details

Defined in System.Posix.Types

Ord CSsize 
Instance details

Defined in System.Posix.Types

Ord CTcflag 
Instance details

Defined in System.Posix.Types

Ord CTimer 
Instance details

Defined in System.Posix.Types

Ord CUid 
Instance details

Defined in System.Posix.Types

Methods

compare :: CUid -> CUid -> Ordering #

(<) :: CUid -> CUid -> Bool #

(<=) :: CUid -> CUid -> Bool #

(>) :: CUid -> CUid -> Bool #

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

max :: CUid -> CUid -> CUid #

min :: CUid -> CUid -> CUid #

Ord Fd 
Instance details

Defined in System.Posix.Types

Methods

compare :: Fd -> Fd -> Ordering #

(<) :: Fd -> Fd -> Bool #

(<=) :: Fd -> Fd -> Bool #

(>) :: Fd -> Fd -> Bool #

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

max :: Fd -> Fd -> Fd #

min :: Fd -> Fd -> Fd #

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal

Ord ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Ord ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Ord IntSet 
Instance details

Defined in Data.IntSet.Internal

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.

Instance details

Defined in Data.Array.Byte

Ord Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Ord Ordering 
Instance details

Defined in GHC.Classes

Ord TyCon 
Instance details

Defined in GHC.Classes

Methods

compare :: TyCon -> TyCon -> Ordering #

(<) :: TyCon -> TyCon -> Bool #

(<=) :: TyCon -> TyCon -> Bool #

(>) :: TyCon -> TyCon -> Bool #

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

max :: TyCon -> TyCon -> TyCon #

min :: TyCon -> TyCon -> TyCon #

Ord Options 
Instance details

Defined in Data.Functor.Invariant.TH

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 AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Bang -> Bang -> Ordering #

(<) :: Bang -> Bang -> Bool #

(<=) :: Bang -> Bang -> Bool #

(>) :: Bang -> Bang -> Bool #

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

max :: Bang -> Bang -> Bang #

min :: Bang -> Bang -> Bang #

Ord Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Body -> Body -> Ordering #

(<) :: Body -> Body -> Bool #

(<=) :: Body -> Body -> Bool #

(>) :: Body -> Body -> Bool #

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

max :: Body -> Body -> Body #

min :: Body -> Body -> Body #

Ord Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Bytes -> Bytes -> Ordering #

(<) :: Bytes -> Bytes -> Bool #

(<=) :: Bytes -> Bytes -> Bool #

(>) :: Bytes -> Bytes -> Bool #

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

max :: Bytes -> Bytes -> Bytes #

min :: Bytes -> Bytes -> Bytes #

Ord Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Con -> Con -> Ordering #

(<) :: Con -> Con -> Bool #

(<=) :: Con -> Con -> Bool #

(>) :: Con -> Con -> Bool #

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

max :: Con -> Con -> Con #

min :: Con -> Con -> Con #

Ord Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Dec -> Dec -> Ordering #

(<) :: Dec -> Dec -> Bool #

(<=) :: Dec -> Dec -> Bool #

(>) :: Dec -> Dec -> Bool #

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

max :: Dec -> Dec -> Dec #

min :: Dec -> Dec -> Dec #

Ord DecidedStrictness 
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 DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Exp -> Exp -> Ordering #

(<) :: Exp -> Exp -> Bool #

(<=) :: Exp -> Exp -> Bool #

(>) :: Exp -> Exp -> Bool #

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

max :: Exp -> Exp -> Exp #

min :: Exp -> Exp -> Exp #

Ord FamilyResultSig 
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 Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Guard -> Guard -> Ordering #

(<) :: Guard -> Guard -> Bool #

(<=) :: Guard -> Guard -> Bool #

(>) :: Guard -> Guard -> Bool #

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

max :: Guard -> Guard -> Guard #

min :: Guard -> Guard -> Guard #

Ord Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Info -> Info -> Ordering #

(<) :: Info -> Info -> Bool #

(<=) :: Info -> Info -> Bool #

(>) :: Info -> Info -> Bool #

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

max :: Info -> Info -> Info #

min :: Info -> Info -> Info #

Ord InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Lit -> Lit -> Ordering #

(<) :: Lit -> Lit -> Bool #

(<=) :: Lit -> Lit -> Bool #

(>) :: Lit -> Lit -> Bool #

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

max :: Lit -> Lit -> Lit #

min :: Lit -> Lit -> Lit #

Ord Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Loc -> Loc -> Ordering #

(<) :: Loc -> Loc -> Bool #

(<=) :: Loc -> Loc -> Bool #

(>) :: Loc -> Loc -> Bool #

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

max :: Loc -> Loc -> Loc #

min :: Loc -> Loc -> Loc #

Ord Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Match -> Match -> Ordering #

(<) :: Match -> Match -> Bool #

(<=) :: Match -> Match -> Bool #

(>) :: Match -> Match -> Bool #

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

max :: Match -> Match -> Match #

min :: Match -> Match -> Match #

Ord ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

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

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Ord NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Pat -> Pat -> Ordering #

(<) :: Pat -> Pat -> Bool #

(<=) :: Pat -> Pat -> Bool #

(>) :: Pat -> Pat -> Bool #

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

max :: Pat -> Pat -> Pat #

min :: Pat -> Pat -> Pat #

Ord PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Range -> Range -> Ordering #

(<) :: Range -> Range -> Bool #

(<=) :: Range -> Range -> Bool #

(>) :: Range -> Range -> Bool #

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

max :: Range -> Range -> Range #

min :: Range -> Range -> Range #

Ord Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Role -> Role -> Ordering #

(<) :: Role -> Role -> Bool #

(<=) :: Role -> Role -> Bool #

(>) :: Role -> Role -> Bool #

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

max :: Role -> Role -> Role #

min :: Role -> Role -> Role #

Ord RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Stmt -> Stmt -> Ordering #

(<) :: Stmt -> Stmt -> Bool #

(<=) :: Stmt -> Stmt -> Bool #

(>) :: Stmt -> Stmt -> Bool #

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

max :: Stmt -> Stmt -> Stmt #

min :: Stmt -> Stmt -> Stmt #

Ord TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: TyLit -> TyLit -> Ordering #

(<) :: TyLit -> TyLit -> Bool #

(<=) :: TyLit -> TyLit -> Bool #

(>) :: TyLit -> TyLit -> Bool #

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

max :: TyLit -> TyLit -> TyLit #

min :: TyLit -> TyLit -> TyLit #

Ord TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

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

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

Ord TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord I16 
Instance details

Defined in Data.Text.Foreign

Methods

compare :: I16 -> I16 -> Ordering #

(<) :: I16 -> I16 -> Bool #

(<=) :: I16 -> I16 -> Bool #

(>) :: I16 -> I16 -> Bool #

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

max :: I16 -> I16 -> I16 #

min :: I16 -> I16 -> I16 #

Ord Builder 
Instance details

Defined in Data.Text.Internal.Builder

Ord Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

compare :: Day -> Day -> Ordering #

(<) :: Day -> Day -> Bool #

(<=) :: Day -> Day -> Bool #

(>) :: Day -> Day -> Bool #

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

max :: Day -> Day -> Day #

min :: Day -> Day -> Day #

Ord DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Ord AbsoluteTime 
Instance details

Defined in Data.Time.Clock.Internal.AbsoluteTime

Ord DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Ord NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Ord SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

Ord UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Ord UniversalTime 
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Ord TimeLocale 
Instance details

Defined in Data.Time.Format.Locale

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 UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

compare :: UUID -> UUID -> Ordering #

(<) :: UUID -> UUID -> Bool #

(<=) :: UUID -> UUID -> Bool #

(>) :: UUID -> UUID -> Bool #

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

max :: UUID -> UUID -> UUID #

min :: UUID -> UUID -> UUID #

Ord UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

compare :: UnpackedUUID -> UnpackedUUID -> Ordering #

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

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

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

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

max :: UnpackedUUID -> UnpackedUUID -> UnpackedUUID #

min :: UnpackedUUID -> UnpackedUUID -> UnpackedUUID #

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Ord Natural 
Instance details

Defined in GHC.Num.Natural

Ord () 
Instance details

Defined in GHC.Classes

Methods

compare :: () -> () -> Ordering #

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

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

(>) :: () -> () -> Bool #

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

max :: () -> () -> () #

min :: () -> () -> () #

Ord Bool 
Instance details

Defined in GHC.Classes

Methods

compare :: Bool -> Bool -> Ordering #

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

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

(>) :: Bool -> Bool -> Bool #

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

max :: Bool -> Bool -> Bool #

min :: Bool -> Bool -> Bool #

Ord Char 
Instance details

Defined in GHC.Classes

Methods

compare :: Char -> Char -> Ordering #

(<) :: Char -> Char -> Bool #

(<=) :: Char -> Char -> Bool #

(>) :: Char -> Char -> Bool #

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

max :: Char -> Char -> Char #

min :: Char -> Char -> Char #

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

Methods

compare :: Float -> Float -> Ordering #

(<) :: Float -> Float -> Bool #

(<=) :: Float -> Float -> Bool #

(>) :: Float -> Float -> Bool #

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

max :: Float -> Float -> Float #

min :: Float -> Float -> Float #

Ord Int 
Instance details

Defined in GHC.Classes

Methods

compare :: Int -> Int -> Ordering #

(<) :: Int -> Int -> Bool #

(<=) :: Int -> Int -> Bool #

(>) :: Int -> Int -> Bool #

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

max :: Int -> Int -> Int #

min :: Int -> Int -> Int #

Ord Word 
Instance details

Defined in GHC.Classes

Methods

compare :: Word -> Word -> Ordering #

(<) :: Word -> Word -> Bool #

(<=) :: Word -> Word -> Bool #

(>) :: Word -> Word -> Bool #

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

max :: Word -> Word -> Word #

min :: Word -> Word -> Word #

Ord a => Ord (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

compare :: ZipList a -> ZipList a -> Ordering #

(<) :: ZipList a -> ZipList a -> Bool #

(<=) :: ZipList a -> ZipList a -> Bool #

(>) :: ZipList a -> ZipList a -> Bool #

(>=) :: ZipList a -> ZipList a -> Bool #

max :: ZipList a -> ZipList a -> ZipList a #

min :: ZipList a -> ZipList a -> ZipList a #

Ord a => Ord (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

compare :: Identity a -> Identity a -> Ordering #

(<) :: Identity a -> Identity a -> Bool #

(<=) :: Identity a -> Identity a -> Bool #

(>) :: Identity a -> Identity a -> Bool #

(>=) :: Identity a -> Identity a -> Bool #

max :: Identity a -> Identity a -> Identity a #

min :: Identity a -> Identity a -> Identity a #

Ord a => Ord (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: First a -> First a -> Ordering #

(<) :: First a -> First a -> Bool #

(<=) :: First a -> First a -> Bool #

(>) :: First a -> First a -> Bool #

(>=) :: First a -> First a -> Bool #

max :: First a -> First a -> First a #

min :: First a -> First a -> First a #

Ord a => Ord (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: Last a -> Last a -> Ordering #

(<) :: Last a -> Last a -> Bool #

(<=) :: Last a -> Last a -> Bool #

(>) :: Last a -> Last a -> Bool #

(>=) :: Last a -> Last a -> Bool #

max :: Last a -> Last a -> Last a #

min :: Last a -> Last a -> Last a #

Ord a => Ord (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

compare :: Down a -> Down a -> Ordering #

(<) :: Down a -> Down a -> Bool #

(<=) :: Down a -> Down a -> Bool #

(>) :: Down a -> Down a -> Bool #

(>=) :: Down a -> Down a -> Bool #

max :: Down a -> Down a -> Down a #

min :: Down a -> Down a -> Down a #

Ord a => Ord (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: First a -> First a -> Ordering #

(<) :: First a -> First a -> Bool #

(<=) :: First a -> First a -> Bool #

(>) :: First a -> First a -> Bool #

(>=) :: First a -> First a -> Bool #

max :: First a -> First a -> First a #

min :: First a -> First a -> First a #

Ord a => Ord (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Last a -> Last a -> Ordering #

(<) :: Last a -> Last a -> Bool #

(<=) :: Last a -> Last a -> Bool #

(>) :: Last a -> Last a -> Bool #

(>=) :: Last a -> Last a -> Bool #

max :: Last a -> Last a -> Last a #

min :: Last a -> Last a -> Last a #

Ord a => Ord (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Max a -> Max a -> Ordering #

(<) :: Max a -> Max a -> Bool #

(<=) :: Max a -> Max a -> Bool #

(>) :: Max a -> Max a -> Bool #

(>=) :: Max a -> Max a -> Bool #

max :: Max a -> Max a -> Max a #

min :: Max a -> Max a -> Max a #

Ord a => Ord (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Min a -> Min a -> Ordering #

(<) :: Min a -> Min a -> Bool #

(<=) :: Min a -> Min a -> Bool #

(>) :: Min a -> Min a -> Bool #

(>=) :: Min a -> Min a -> Bool #

max :: Min a -> Min a -> Min a #

min :: Min a -> Min a -> Min a #

Ord m => Ord (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Dual a -> Dual a -> Ordering #

(<) :: Dual a -> Dual a -> Bool #

(<=) :: Dual a -> Dual a -> Bool #

(>) :: Dual a -> Dual a -> Bool #

(>=) :: Dual a -> Dual a -> Bool #

max :: Dual a -> Dual a -> Dual a #

min :: Dual a -> Dual a -> Dual a #

Ord a => Ord (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Product a -> Product a -> Ordering #

(<) :: Product a -> Product a -> Bool #

(<=) :: Product a -> Product a -> Bool #

(>) :: Product a -> Product a -> Bool #

(>=) :: Product a -> Product a -> Bool #

max :: Product a -> Product a -> Product a #

min :: Product a -> Product a -> Product a #

Ord a => Ord (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Sum a -> Sum a -> Ordering #

(<) :: Sum a -> Sum a -> Bool #

(<=) :: Sum a -> Sum a -> Bool #

(>) :: Sum a -> Sum a -> Bool #

(>=) :: Sum a -> Sum a -> Bool #

max :: Sum a -> Sum a -> Sum a #

min :: Sum a -> Sum a -> Sum a #

Ord (ForeignPtr a)

Since: base-2.1

Instance details

Defined in GHC.ForeignPtr

Ord p => Ord (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: Par1 p -> Par1 p -> Ordering #

(<) :: Par1 p -> Par1 p -> Bool #

(<=) :: Par1 p -> Par1 p -> Bool #

(>) :: Par1 p -> Par1 p -> Bool #

(>=) :: Par1 p -> Par1 p -> Bool #

max :: Par1 p -> Par1 p -> Par1 p #

min :: Par1 p -> Par1 p -> Par1 p #

Ord (FunPtr a) 
Instance details

Defined in GHC.Ptr

Methods

compare :: FunPtr a -> FunPtr a -> Ordering #

(<) :: FunPtr a -> FunPtr a -> Bool #

(<=) :: FunPtr a -> FunPtr a -> Bool #

(>) :: FunPtr a -> FunPtr a -> Bool #

(>=) :: FunPtr a -> FunPtr a -> Bool #

max :: FunPtr a -> FunPtr a -> FunPtr a #

min :: FunPtr a -> FunPtr a -> FunPtr a #

Ord (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

compare :: Ptr a -> Ptr a -> Ordering #

(<) :: Ptr a -> Ptr a -> Bool #

(<=) :: Ptr a -> Ptr a -> Bool #

(>) :: Ptr a -> Ptr a -> Bool #

(>=) :: Ptr a -> Ptr a -> Bool #

max :: Ptr a -> Ptr a -> Ptr a #

min :: Ptr a -> Ptr a -> Ptr a #

Integral a => Ord (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

compare :: Ratio a -> Ratio a -> Ordering #

(<) :: Ratio a -> Ratio a -> Bool #

(<=) :: Ratio a -> Ratio a -> Bool #

(>) :: Ratio a -> Ratio a -> Bool #

(>=) :: Ratio a -> Ratio a -> Bool #

max :: Ratio a -> Ratio a -> Ratio a #

min :: Ratio a -> Ratio a -> Ratio a #

Ord a => Ord (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

compare :: IntMap a -> IntMap a -> Ordering #

(<) :: IntMap a -> IntMap a -> Bool #

(<=) :: IntMap a -> IntMap a -> Bool #

(>) :: IntMap a -> IntMap a -> Bool #

(>=) :: IntMap a -> IntMap a -> Bool #

max :: IntMap a -> IntMap a -> IntMap a #

min :: IntMap a -> IntMap a -> IntMap a #

Ord a => Ord (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: Seq a -> Seq a -> Ordering #

(<) :: Seq a -> Seq a -> Bool #

(<=) :: Seq a -> Seq a -> Bool #

(>) :: Seq a -> Seq a -> Bool #

(>=) :: Seq a -> Seq a -> Bool #

max :: Seq a -> Seq a -> Seq a #

min :: Seq a -> Seq a -> Seq a #

Ord a => Ord (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: ViewL a -> ViewL a -> Ordering #

(<) :: ViewL a -> ViewL a -> Bool #

(<=) :: ViewL a -> ViewL a -> Bool #

(>) :: ViewL a -> ViewL a -> Bool #

(>=) :: ViewL a -> ViewL a -> Bool #

max :: ViewL a -> ViewL a -> ViewL a #

min :: ViewL a -> ViewL a -> ViewL a #

Ord a => Ord (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: ViewR a -> ViewR a -> Ordering #

(<) :: ViewR a -> ViewR a -> Bool #

(<=) :: ViewR a -> ViewR a -> Bool #

(>) :: ViewR a -> ViewR a -> Bool #

(>=) :: ViewR a -> ViewR a -> Bool #

max :: ViewR a -> ViewR a -> ViewR a #

min :: ViewR a -> ViewR a -> ViewR a #

Ord a => Ord (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

compare :: Set a -> Set a -> Ordering #

(<) :: Set a -> Set a -> Bool #

(<=) :: Set a -> Set a -> Bool #

(>) :: Set a -> Set a -> Bool #

(>=) :: Set a -> Set a -> Bool #

max :: Set a -> Set a -> Set a #

min :: Set a -> Set a -> Set a #

Ord a => Ord (Tree a)

Since: containers-0.6.5

Instance details

Defined in Data.Tree

Methods

compare :: Tree a -> Tree a -> Ordering #

(<) :: Tree a -> Tree a -> Bool #

(<=) :: Tree a -> Tree a -> Bool #

(>) :: Tree a -> Tree a -> Bool #

(>=) :: Tree a -> Tree a -> Bool #

max :: Tree a -> Tree a -> Tree a #

min :: Tree a -> Tree a -> Tree a #

Ord a => Ord (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

compare :: DList a -> DList a -> Ordering #

(<) :: DList a -> DList a -> Bool #

(<=) :: DList a -> DList a -> Bool #

(>) :: DList a -> DList a -> Bool #

(>=) :: DList a -> DList a -> Bool #

max :: DList a -> DList a -> DList a #

min :: DList a -> DList a -> DList a #

Ord a => Ord (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

compare :: Hashed a -> Hashed a -> Ordering #

(<) :: Hashed a -> Hashed a -> Bool #

(<=) :: Hashed a -> Hashed a -> Bool #

(>) :: Hashed a -> Hashed a -> Bool #

(>=) :: Hashed a -> Hashed a -> Bool #

max :: Hashed a -> Hashed a -> Hashed a #

min :: Hashed a -> Hashed a -> Hashed a #

Ord a => Ord (Array a)

Lexicographic ordering. Subject to change between major versions.

Instance details

Defined in Data.Primitive.Array

Methods

compare :: Array a -> Array a -> Ordering #

(<) :: Array a -> Array a -> Bool #

(<=) :: Array a -> Array a -> Bool #

(>) :: Array a -> Array a -> Bool #

(>=) :: Array a -> Array a -> Bool #

max :: Array a -> Array a -> Array a #

min :: Array a -> Array a -> Array a #

(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 g => Ord (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

compare :: StateGen g -> StateGen g -> Ordering #

(<) :: StateGen g -> StateGen g -> Bool #

(<=) :: StateGen g -> StateGen g -> Bool #

(>) :: StateGen g -> StateGen g -> Bool #

(>=) :: StateGen g -> StateGen g -> Bool #

max :: StateGen g -> StateGen g -> StateGen g #

min :: StateGen g -> StateGen g -> StateGen g #

Ord g => Ord (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Ord g => Ord (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: IOGen g -> IOGen g -> Ordering #

(<) :: IOGen g -> IOGen g -> Bool #

(<=) :: IOGen g -> IOGen g -> Bool #

(>) :: IOGen g -> IOGen g -> Bool #

(>=) :: IOGen g -> IOGen g -> Bool #

max :: IOGen g -> IOGen g -> IOGen g #

min :: IOGen g -> IOGen g -> IOGen g #

Ord g => Ord (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: STGen g -> STGen g -> Ordering #

(<) :: STGen g -> STGen g -> Bool #

(<=) :: STGen g -> STGen g -> Bool #

(>) :: STGen g -> STGen g -> Bool #

(>=) :: STGen g -> STGen g -> Bool #

max :: STGen g -> STGen g -> STGen g #

min :: STGen g -> STGen g -> STGen g #

Ord g => Ord (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: TGen g -> TGen g -> Ordering #

(<) :: TGen g -> TGen g -> Bool #

(<=) :: TGen g -> TGen g -> Bool #

(>) :: TGen g -> TGen g -> Bool #

(>=) :: TGen g -> TGen g -> Bool #

max :: TGen g -> TGen g -> TGen g #

min :: TGen g -> TGen g -> TGen g #

Ord flag => Ord (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: TyVarBndr flag -> TyVarBndr flag -> Ordering #

(<) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

(<=) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

(>) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

(>=) :: TyVarBndr flag -> TyVarBndr flag -> Bool #

max :: TyVarBndr flag -> TyVarBndr flag -> TyVarBndr flag #

min :: TyVarBndr flag -> TyVarBndr flag -> TyVarBndr flag #

Ord a => Ord (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

compare :: HashSet a -> HashSet a -> Ordering #

(<) :: HashSet a -> HashSet a -> Bool #

(<=) :: HashSet a -> HashSet a -> Bool #

(>) :: HashSet a -> HashSet a -> Bool #

(>=) :: HashSet a -> HashSet a -> Bool #

max :: HashSet a -> HashSet a -> HashSet a #

min :: HashSet a -> HashSet a -> HashSet a #

Ord a => Ord (Vector a) 
Instance details

Defined in Data.Vector

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

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

Defined in Data.Vector.Primitive

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

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

Defined in Data.Vector.Storable

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

Ord a => Ord (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

compare :: NonEmpty a -> NonEmpty a -> Ordering #

(<) :: NonEmpty a -> NonEmpty a -> Bool #

(<=) :: NonEmpty a -> NonEmpty a -> Bool #

(>) :: NonEmpty a -> NonEmpty a -> Bool #

(>=) :: NonEmpty a -> NonEmpty a -> Bool #

max :: NonEmpty a -> NonEmpty a -> NonEmpty a #

min :: NonEmpty a -> NonEmpty a -> NonEmpty a #

Ord a => Ord (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

compare :: Maybe a -> Maybe a -> Ordering #

(<) :: Maybe a -> Maybe a -> Bool #

(<=) :: Maybe a -> Maybe a -> Bool #

(>) :: Maybe a -> Maybe a -> Bool #

(>=) :: Maybe a -> Maybe a -> Bool #

max :: Maybe a -> Maybe a -> Maybe a #

min :: Maybe a -> Maybe a -> Maybe a #

Ord a => Ord (a) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a) -> (a) -> Ordering #

(<) :: (a) -> (a) -> Bool #

(<=) :: (a) -> (a) -> Bool #

(>) :: (a) -> (a) -> Bool #

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

max :: (a) -> (a) -> (a) #

min :: (a) -> (a) -> (a) #

Ord a => Ord [a] 
Instance details

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Since: base-2.1

Instance details

Defined in Data.Either

Methods

compare :: Either a b -> Either a b -> Ordering #

(<) :: Either a b -> Either a b -> Bool #

(<=) :: Either a b -> Either a b -> Bool #

(>) :: Either a b -> Either a b -> Bool #

(>=) :: Either a b -> Either a b -> Bool #

max :: Either a b -> Either a b -> Either a b #

min :: Either a b -> Either a b -> Either a b #

Ord (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

compare :: Fixed a -> Fixed a -> Ordering #

(<) :: Fixed a -> Fixed a -> Bool #

(<=) :: Fixed a -> Fixed a -> Bool #

(>) :: Fixed a -> Fixed a -> Bool #

(>=) :: Fixed a -> Fixed a -> Bool #

max :: Fixed a -> Fixed a -> Fixed a #

min :: Fixed a -> Fixed a -> Fixed a #

Ord (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

compare :: Proxy s -> Proxy s -> Ordering #

(<) :: Proxy s -> Proxy s -> Bool #

(<=) :: Proxy s -> Proxy s -> Bool #

(>) :: Proxy s -> Proxy s -> Bool #

(>=) :: Proxy s -> Proxy s -> Bool #

max :: Proxy s -> Proxy s -> Proxy s #

min :: Proxy s -> Proxy s -> Proxy s #

Ord a => Ord (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Arg a b -> Arg a b -> Ordering #

(<) :: Arg a b -> Arg a b -> Bool #

(<=) :: Arg a b -> Arg a b -> Bool #

(>) :: Arg a b -> Arg a b -> Bool #

(>=) :: Arg a b -> Arg a b -> Bool #

max :: Arg a b -> Arg a b -> Arg a b #

min :: Arg a b -> Arg a b -> Arg a b #

Ord (TypeRep a)

Since: base-4.4.0.0

Instance details

Defined in Data.Typeable.Internal

Methods

compare :: TypeRep a -> TypeRep a -> Ordering #

(<) :: TypeRep a -> TypeRep a -> Bool #

(<=) :: TypeRep a -> TypeRep a -> Bool #

(>) :: TypeRep a -> TypeRep a -> Bool #

(>=) :: TypeRep a -> TypeRep a -> Bool #

max :: TypeRep a -> TypeRep a -> TypeRep a #

min :: TypeRep a -> TypeRep a -> TypeRep a #

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

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

compare :: Array i e -> Array i e -> Ordering #

(<) :: Array i e -> Array i e -> Bool #

(<=) :: Array i e -> Array i e -> Bool #

(>) :: Array i e -> Array i e -> Bool #

(>=) :: Array i e -> Array i e -> Bool #

max :: Array i e -> Array i e -> Array i e #

min :: Array i e -> Array i e -> Array i e #

Ord (U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: U1 p -> U1 p -> Ordering #

(<) :: U1 p -> U1 p -> Bool #

(<=) :: U1 p -> U1 p -> Bool #

(>) :: U1 p -> U1 p -> Bool #

(>=) :: U1 p -> U1 p -> Bool #

max :: U1 p -> U1 p -> U1 p #

min :: U1 p -> U1 p -> U1 p #

Ord (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: V1 p -> V1 p -> Ordering #

(<) :: V1 p -> V1 p -> Bool #

(<=) :: V1 p -> V1 p -> Bool #

(>) :: V1 p -> V1 p -> Bool #

(>=) :: V1 p -> V1 p -> Bool #

max :: V1 p -> V1 p -> V1 p #

min :: V1 p -> V1 p -> V1 p #

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

Defined in Data.Map.Internal

Methods

compare :: Map k v -> Map k v -> Ordering #

(<) :: Map k v -> Map k v -> Bool #

(<=) :: Map k v -> Map k v -> Bool #

(>) :: Map k v -> Map k v -> Bool #

(>=) :: Map k v -> Map k v -> Bool #

max :: Map k v -> Map k v -> Map k v #

min :: Map k v -> Map k v -> Map k v #

(Ord e, Ord a) => Ord (Validation e a) 
Instance details

Defined in Data.Either.Validation

Methods

compare :: Validation e a -> Validation e a -> Ordering #

(<) :: Validation e a -> Validation e a -> Bool #

(<=) :: Validation e a -> Validation e a -> Bool #

(>) :: Validation e a -> Validation e a -> Bool #

(>=) :: Validation e a -> Validation e a -> Bool #

max :: Validation e a -> Validation e a -> Validation e a #

min :: Validation e a -> Validation e a -> Validation e a #

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

Defined in Control.Comonad.Cofree

Methods

compare :: Cofree f a -> Cofree f a -> Ordering #

(<) :: Cofree f a -> Cofree f a -> Bool #

(<=) :: Cofree f a -> Cofree f a -> Bool #

(>) :: Cofree f a -> Cofree f a -> Bool #

(>=) :: Cofree f a -> Cofree f a -> Bool #

max :: Cofree f a -> Cofree f a -> Cofree f a #

min :: Cofree f a -> Cofree f a -> Cofree f a #

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

Defined in Control.Monad.Free

Methods

compare :: Free f a -> Free f a -> Ordering #

(<) :: Free f a -> Free f a -> Bool #

(<=) :: Free f a -> Free f a -> Bool #

(>) :: Free f a -> Free f a -> Bool #

(>=) :: Free f a -> Free f a -> Bool #

max :: Free f a -> Free f a -> Free f a #

min :: Free f a -> Free f a -> Free f a #

Ord m => Ord (Over m a) 
Instance details

Defined in Control.Selective

Methods

compare :: Over m a -> Over m a -> Ordering #

(<) :: Over m a -> Over m a -> Bool #

(<=) :: Over m a -> Over m a -> Bool #

(>) :: Over m a -> Over m a -> Bool #

(>=) :: Over m a -> Over m a -> Bool #

max :: Over m a -> Over m a -> Over m a #

min :: Over m a -> Over m a -> Over m a #

Ord m => Ord (Under m a) 
Instance details

Defined in Control.Selective

Methods

compare :: Under m a -> Under m a -> Ordering #

(<) :: Under m a -> Under m a -> Bool #

(<=) :: Under m a -> Under m a -> Bool #

(>) :: Under m a -> Under m a -> Bool #

(>=) :: Under m a -> Under m a -> Bool #

max :: Under m a -> Under m a -> Under m a #

min :: Under m a -> Under m a -> Under m a #

(Ord e, Ord a) => Ord (Validation e a) 
Instance details

Defined in Control.Selective

Methods

compare :: Validation e a -> Validation e a -> Ordering #

(<) :: Validation e a -> Validation e a -> Bool #

(<=) :: Validation e a -> Validation e a -> Bool #

(>) :: Validation e a -> Validation e a -> Bool #

(>=) :: Validation e a -> Validation e a -> Bool #

max :: Validation e a -> Validation e a -> Validation e a #

min :: Validation e a -> Validation e a -> Validation e a #

Ord m => Ord (Over m a) 
Instance details

Defined in Control.Selective.Multi

Methods

compare :: Over m a -> Over m a -> Ordering #

(<) :: Over m a -> Over m a -> Bool #

(<=) :: Over m a -> Over m a -> Bool #

(>) :: Over m a -> Over m a -> Bool #

(>=) :: Over m a -> Over m a -> Bool #

max :: Over m a -> Over m a -> Over m a #

min :: Over m a -> Over m a -> Over m a #

Ord m => Ord (Under m a) 
Instance details

Defined in Control.Selective.Multi

Methods

compare :: Under m a -> Under m a -> Ordering #

(<) :: Under m a -> Under m a -> Bool #

(<=) :: Under m a -> Under m a -> Bool #

(>) :: Under m a -> Under m a -> Bool #

(>=) :: Under m a -> Under m a -> Bool #

max :: Under m a -> Under m a -> Under m a #

min :: Under m a -> Under m a -> Under m a #

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

Defined in Control.Applicative.Lift

Methods

compare :: Lift f a -> Lift f a -> Ordering #

(<) :: Lift f a -> Lift f a -> Bool #

(<=) :: Lift f a -> Lift f a -> Bool #

(>) :: Lift f a -> Lift f a -> Bool #

(>=) :: Lift f a -> Lift f a -> Bool #

max :: Lift f a -> Lift f a -> Lift f a #

min :: Lift f a -> Lift f a -> Lift f a #

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

Defined in Control.Monad.Trans.Maybe

Methods

compare :: MaybeT m a -> MaybeT m a -> Ordering #

(<) :: MaybeT m a -> MaybeT m a -> Bool #

(<=) :: MaybeT m a -> MaybeT m a -> Bool #

(>) :: MaybeT m a -> MaybeT m a -> Bool #

(>=) :: MaybeT m a -> MaybeT m a -> Bool #

max :: MaybeT m a -> MaybeT m a -> MaybeT m a #

min :: MaybeT m a -> MaybeT m a -> MaybeT m a #

(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

Methods

compare :: HashMap k v -> HashMap k v -> Ordering #

(<) :: HashMap k v -> HashMap k v -> Bool #

(<=) :: HashMap k v -> HashMap k v -> Bool #

(>) :: HashMap k v -> HashMap k v -> Bool #

(>=) :: HashMap k v -> HashMap k v -> Bool #

max :: HashMap k v -> HashMap k v -> HashMap k v #

min :: HashMap k v -> HashMap k v -> HashMap k v #

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

Ord a => Ord (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

compare :: Const a b -> Const a b -> Ordering #

(<) :: Const a b -> Const a b -> Bool #

(<=) :: Const a b -> Const a b -> Bool #

(>) :: Const a b -> Const a b -> Bool #

(>=) :: Const a b -> Const a b -> Bool #

max :: Const a b -> Const a b -> Const a b #

min :: Const a b -> Const a b -> Const a b #

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

compare :: Ap f a -> Ap f a -> Ordering #

(<) :: Ap f a -> Ap f a -> Bool #

(<=) :: Ap f a -> Ap f a -> Bool #

(>) :: Ap f a -> Ap f a -> Bool #

(>=) :: Ap f a -> Ap f a -> Bool #

max :: Ap f a -> Ap f a -> Ap f a #

min :: Ap f a -> Ap f a -> Ap f a #

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Alt f a -> Alt f a -> Ordering #

(<) :: Alt f a -> Alt f a -> Bool #

(<=) :: Alt f a -> Alt f a -> Bool #

(>) :: Alt f a -> Alt f a -> Bool #

(>=) :: Alt f a -> Alt f a -> Bool #

max :: Alt f a -> Alt f a -> Alt f a #

min :: Alt f a -> Alt f a -> Alt f a #

Ord (Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Methods

compare :: Coercion a b -> Coercion a b -> Ordering #

(<) :: Coercion a b -> Coercion a b -> Bool #

(<=) :: Coercion a b -> Coercion a b -> Bool #

(>) :: Coercion a b -> Coercion a b -> Bool #

(>=) :: Coercion a b -> Coercion a b -> Bool #

max :: Coercion a b -> Coercion a b -> Coercion a b #

min :: Coercion a b -> Coercion a b -> Coercion a b #

Ord (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

compare :: (a :~: b) -> (a :~: b) -> Ordering #

(<) :: (a :~: b) -> (a :~: b) -> Bool #

(<=) :: (a :~: b) -> (a :~: b) -> Bool #

(>) :: (a :~: b) -> (a :~: b) -> Bool #

(>=) :: (a :~: b) -> (a :~: b) -> Bool #

max :: (a :~: b) -> (a :~: b) -> a :~: b #

min :: (a :~: b) -> (a :~: b) -> a :~: b #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: Rec1 f p -> Rec1 f p -> Ordering #

(<) :: Rec1 f p -> Rec1 f p -> Bool #

(<=) :: Rec1 f p -> Rec1 f p -> Bool #

(>) :: Rec1 f p -> Rec1 f p -> Bool #

(>=) :: Rec1 f p -> Rec1 f p -> Bool #

max :: Rec1 f p -> Rec1 f p -> Rec1 f p #

min :: Rec1 f p -> Rec1 f p -> Rec1 f p #

Ord (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering #

(<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #

min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #

Ord (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Char p -> URec Char p -> Ordering #

(<) :: URec Char p -> URec Char p -> Bool #

(<=) :: URec Char p -> URec Char p -> Bool #

(>) :: URec Char p -> URec Char p -> Bool #

(>=) :: URec Char p -> URec Char p -> Bool #

max :: URec Char p -> URec Char p -> URec Char p #

min :: URec Char p -> URec Char p -> URec Char p #

Ord (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Double p -> URec Double p -> Ordering #

(<) :: URec Double p -> URec Double p -> Bool #

(<=) :: URec Double p -> URec Double p -> Bool #

(>) :: URec Double p -> URec Double p -> Bool #

(>=) :: URec Double p -> URec Double p -> Bool #

max :: URec Double p -> URec Double p -> URec Double p #

min :: URec Double p -> URec Double p -> URec Double p #

Ord (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

compare :: URec Float p -> URec Float p -> Ordering #

(<) :: URec Float p -> URec Float p -> Bool #

(<=) :: URec Float p -> URec Float p -> Bool #

(>) :: URec Float p -> URec Float p -> Bool #

(>=) :: URec Float p -> URec Float p -> Bool #

max :: URec Float p -> URec Float p -> URec Float p #

min :: URec Float p -> URec Float p -> URec Float p #

Ord (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Int p -> URec Int p -> Ordering #

(<) :: URec Int p -> URec Int p -> Bool #

(<=) :: URec Int p -> URec Int p -> Bool #

(>) :: URec Int p -> URec Int p -> Bool #

(>=) :: URec Int p -> URec Int p -> Bool #

max :: URec Int p -> URec Int p -> URec Int p #

min :: URec Int p -> URec Int p -> URec Int p #

Ord (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Word p -> URec Word p -> Ordering #

(<) :: URec Word p -> URec Word p -> Bool #

(<=) :: URec Word p -> URec Word p -> Bool #

(>) :: URec Word p -> URec Word p -> Bool #

(>=) :: URec Word p -> URec Word p -> Bool #

max :: URec Word p -> URec Word p -> URec Word p #

min :: URec Word p -> URec Word p -> URec Word p #

Ord (p (Fix p a) a) => Ord (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

compare :: Fix p a -> Fix p a -> Ordering #

(<) :: Fix p a -> Fix p a -> Bool #

(<=) :: Fix p a -> Fix p a -> Bool #

(>) :: Fix p a -> Fix p a -> Bool #

(>=) :: Fix p a -> Fix p a -> Bool #

max :: Fix p a -> Fix p a -> Fix p a #

min :: Fix p a -> Fix p a -> Fix p a #

Ord (p a a) => Ord (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

compare :: Join p a -> Join p a -> Ordering #

(<) :: Join p a -> Join p a -> Bool #

(<=) :: Join p a -> Join p a -> Bool #

(>) :: Join p a -> Join p a -> Bool #

(>=) :: Join p a -> Join p a -> Bool #

max :: Join p a -> Join p a -> Join p a #

min :: Join p a -> Join p a -> Join p a #

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

Defined in Control.Monad.Trans.Free

Methods

compare :: FreeF f a b -> FreeF f a b -> Ordering #

(<) :: FreeF f a b -> FreeF f a b -> Bool #

(<=) :: FreeF f a b -> FreeF f a b -> Bool #

(>) :: FreeF f a b -> FreeF f a b -> Bool #

(>=) :: FreeF f a b -> FreeF f a b -> Bool #

max :: FreeF f a b -> FreeF f a b -> FreeF f a b #

min :: FreeF f a b -> FreeF f a b -> FreeF f a b #

(Ord1 f, Ord1 m, Ord a) => Ord (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

compare :: FreeT f m a -> FreeT f m a -> Ordering #

(<) :: FreeT f m a -> FreeT f m a -> Bool #

(<=) :: FreeT f m a -> FreeT f m a -> Bool #

(>) :: FreeT f m a -> FreeT f m a -> Bool #

(>=) :: FreeT f m a -> FreeT f m a -> Bool #

max :: FreeT f m a -> FreeT f m a -> FreeT f m a #

min :: FreeT f m a -> FreeT f m a -> FreeT f m a #

Ord (f a) => Ord (WrappedContravariant f a) 
Instance details

Defined in Data.Functor.Invariant

Ord (f a) => Ord (WrappedFunctor f a) 
Instance details

Defined in Data.Functor.Invariant

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

Defined in Data.Tagged

Methods

compare :: Tagged s b -> Tagged s b -> Ordering #

(<) :: Tagged s b -> Tagged s b -> Bool #

(<=) :: Tagged s b -> Tagged s b -> Bool #

(>) :: Tagged s b -> Tagged s b -> Bool #

(>=) :: Tagged s b -> Tagged s b -> Bool #

max :: Tagged s b -> Tagged s b -> Tagged s b #

min :: Tagged s b -> Tagged s b -> Tagged s b #

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

Defined in Control.Applicative.Backwards

Methods

compare :: Backwards f a -> Backwards f a -> Ordering #

(<) :: Backwards f a -> Backwards f a -> Bool #

(<=) :: Backwards f a -> Backwards f a -> Bool #

(>) :: Backwards f a -> Backwards f a -> Bool #

(>=) :: Backwards f a -> Backwards f a -> Bool #

max :: Backwards f a -> Backwards f a -> Backwards f a #

min :: Backwards f a -> Backwards f a -> Backwards f a #

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

Defined in Control.Monad.Trans.Error

Methods

compare :: ErrorT e m a -> ErrorT e m a -> Ordering #

(<) :: ErrorT e m a -> ErrorT e m a -> Bool #

(<=) :: ErrorT e m a -> ErrorT e m a -> Bool #

(>) :: ErrorT e m a -> ErrorT e m a -> Bool #

(>=) :: ErrorT e m a -> ErrorT e m a -> Bool #

max :: ErrorT e m a -> ErrorT e m a -> ErrorT e m a #

min :: ErrorT e m a -> ErrorT e m a -> ErrorT e m a #

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

Defined in Control.Monad.Trans.Except

Methods

compare :: ExceptT e m a -> ExceptT e m a -> Ordering #

(<) :: ExceptT e m a -> ExceptT e m a -> Bool #

(<=) :: ExceptT e m a -> ExceptT e m a -> Bool #

(>) :: ExceptT e m a -> ExceptT e m a -> Bool #

(>=) :: ExceptT e m a -> ExceptT e m a -> Bool #

max :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

min :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

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

Defined in Control.Monad.Trans.Identity

Methods

compare :: IdentityT f a -> IdentityT f a -> Ordering #

(<) :: IdentityT f a -> IdentityT f a -> Bool #

(<=) :: IdentityT f a -> IdentityT f a -> Bool #

(>) :: IdentityT f a -> IdentityT f a -> Bool #

(>=) :: IdentityT f a -> IdentityT f a -> Bool #

max :: IdentityT f a -> IdentityT f a -> IdentityT f a #

min :: IdentityT f a -> IdentityT f a -> IdentityT f a #

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

compare :: WriterT w m a -> WriterT w m a -> Ordering #

(<) :: WriterT w m a -> WriterT w m a -> Bool #

(<=) :: WriterT w m a -> WriterT w m a -> Bool #

(>) :: WriterT w m a -> WriterT w m a -> Bool #

(>=) :: WriterT w m a -> WriterT w m a -> Bool #

max :: WriterT w m a -> WriterT w m a -> WriterT w m a #

min :: WriterT w m a -> WriterT w m a -> WriterT w m a #

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

Defined in Control.Monad.Trans.Writer.Strict

Methods

compare :: WriterT w m a -> WriterT w m a -> Ordering #

(<) :: WriterT w m a -> WriterT w m a -> Bool #

(<=) :: WriterT w m a -> WriterT w m a -> Bool #

(>) :: WriterT w m a -> WriterT w m a -> Bool #

(>=) :: WriterT w m a -> WriterT w m a -> Bool #

max :: WriterT w m a -> WriterT w m a -> WriterT w m a #

min :: WriterT w m a -> WriterT w m a -> WriterT w m a #

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

Defined in Data.Functor.Constant

Methods

compare :: Constant a b -> Constant a b -> Ordering #

(<) :: Constant a b -> Constant a b -> Bool #

(<=) :: Constant a b -> Constant a b -> Bool #

(>) :: Constant a b -> Constant a b -> Bool #

(>=) :: Constant a b -> Constant a b -> Bool #

max :: Constant a b -> Constant a b -> Constant a b #

min :: Constant a b -> Constant a b -> Constant a b #

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

Defined in Data.Functor.Reverse

Methods

compare :: Reverse f a -> Reverse f a -> Ordering #

(<) :: Reverse f a -> Reverse f a -> Bool #

(<=) :: Reverse f a -> Reverse f a -> Bool #

(>) :: Reverse f a -> Reverse f a -> Bool #

(>=) :: Reverse f a -> Reverse f a -> Bool #

max :: Reverse f a -> Reverse f a -> Reverse f a #

min :: Reverse f a -> Reverse f a -> Reverse f a #

(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 #

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

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

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

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

compare :: Product f g a -> Product f g a -> Ordering #

(<) :: Product f g a -> Product f g a -> Bool #

(<=) :: Product f g a -> Product f g a -> Bool #

(>) :: Product f g a -> Product f g a -> Bool #

(>=) :: Product f g a -> Product f g a -> Bool #

max :: Product f g a -> Product f g a -> Product f g a #

min :: Product f g a -> Product f g a -> Product f g a #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

compare :: Sum f g a -> Sum f g a -> Ordering #

(<) :: Sum f g a -> Sum f g a -> Bool #

(<=) :: Sum f g a -> Sum f g a -> Bool #

(>) :: Sum f g a -> Sum f g a -> Bool #

(>=) :: Sum f g a -> Sum f g a -> Bool #

max :: Sum f g a -> Sum f g a -> Sum f g a #

min :: Sum f g a -> Sum f g a -> Sum f g a #

Ord (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

compare :: (a :~~: b) -> (a :~~: b) -> Ordering #

(<) :: (a :~~: b) -> (a :~~: b) -> Bool #

(<=) :: (a :~~: b) -> (a :~~: b) -> Bool #

(>) :: (a :~~: b) -> (a :~~: b) -> Bool #

(>=) :: (a :~~: b) -> (a :~~: b) -> Bool #

max :: (a :~~: b) -> (a :~~: b) -> a :~~: b #

min :: (a :~~: b) -> (a :~~: b) -> a :~~: b #

(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 #

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

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

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

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

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

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

(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 #

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

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

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

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

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

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

Ord c => Ord (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: K1 i c p -> K1 i c p -> Ordering #

(<) :: K1 i c p -> K1 i c p -> Bool #

(<=) :: K1 i c p -> K1 i c p -> Bool #

(>) :: K1 i c p -> K1 i c p -> Bool #

(>=) :: K1 i c p -> K1 i c p -> Bool #

max :: K1 i c p -> K1 i c p -> K1 i c p #

min :: K1 i c p -> K1 i c p -> K1 i c p #

(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 #

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

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

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

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

compare :: Compose f g a -> Compose f g a -> Ordering #

(<) :: Compose f g a -> Compose f g a -> Bool #

(<=) :: Compose f g a -> Compose f g a -> Bool #

(>) :: Compose f g a -> Compose f g a -> Bool #

(>=) :: Compose f g a -> Compose f g a -> Bool #

max :: Compose f g a -> Compose f g a -> Compose f g a #

min :: Compose f g a -> Compose f g a -> Compose f g a #

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 #

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

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

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

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

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

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

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 #

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

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

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

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

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

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

Ord (f a) => Ord (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

compare :: Clown f a b -> Clown f a b -> Ordering #

(<) :: Clown f a b -> Clown f a b -> Bool #

(<=) :: Clown f a b -> Clown f a b -> Bool #

(>) :: Clown f a b -> Clown f a b -> Bool #

(>=) :: Clown f a b -> Clown f a b -> Bool #

max :: Clown f a b -> Clown f a b -> Clown f a b #

min :: Clown f a b -> Clown f a b -> Clown f a b #

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

Defined in Data.Bifunctor.Flip

Methods

compare :: Flip p a b -> Flip p a b -> Ordering #

(<) :: Flip p a b -> Flip p a b -> Bool #

(<=) :: Flip p a b -> Flip p a b -> Bool #

(>) :: Flip p a b -> Flip p a b -> Bool #

(>=) :: Flip p a b -> Flip p a b -> Bool #

max :: Flip p a b -> Flip p a b -> Flip p a b #

min :: Flip p a b -> Flip p a b -> Flip p a b #

Ord (g b) => Ord (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

compare :: Joker g a b -> Joker g a b -> Ordering #

(<) :: Joker g a b -> Joker g a b -> Bool #

(<=) :: Joker g a b -> Joker g a b -> Bool #

(>) :: Joker g a b -> Joker g a b -> Bool #

(>=) :: Joker g a b -> Joker g a b -> Bool #

max :: Joker g a b -> Joker g a b -> Joker g a b #

min :: Joker g a b -> Joker g a b -> Joker g a b #

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

Defined in Data.Bifunctor.Wrapped

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

Defined in Data.Functor.Invariant

(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 #

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

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

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

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

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

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

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

Defined in Data.Bifunctor.Product

Methods

compare :: Product f g a b -> Product f g a b -> Ordering #

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

(<=) :: Product f g a b -> Product f g a b -> Bool #

(>) :: Product f g a b -> Product f g a b -> Bool #

(>=) :: Product f g a b -> Product f g a b -> Bool #

max :: Product f g a b -> Product f g a b -> Product f g a b #

min :: Product f g a b -> Product f g a b -> Product f g a b #

(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 #

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

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

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

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

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

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

(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 #

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

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

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

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

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

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

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

Defined in Data.Bifunctor.Tannen

Methods

compare :: Tannen f p a b -> Tannen f p a b -> Ordering #

(<) :: Tannen f p a b -> Tannen f p a b -> Bool #

(<=) :: Tannen f p a b -> Tannen f p a b -> Bool #

(>) :: Tannen f p a b -> Tannen f p a b -> Bool #

(>=) :: Tannen f p a b -> Tannen f p a b -> Bool #

max :: Tannen f p a b -> Tannen f p a b -> Tannen f p a b #

min :: Tannen f p a b -> Tannen f p a b -> Tannen f p a b #

(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 #

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

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

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

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

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

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

(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 #

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

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

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

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

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) #

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) #

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 #

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

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

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

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

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

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

(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 #

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

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

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

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

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) #

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) #

(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 #

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

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

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

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

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) #

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) #

(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 #

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

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

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

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

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) #

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) #

(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 #

(<) :: (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 #

(<=) :: (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 #

(>) :: (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 #

(>=) :: (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 #

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) #

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) #

(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 #

(<) :: (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 #

(<=) :: (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 #

(>) :: (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 #

(>=) :: (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 #

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) #

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) #

(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 #

(<) :: (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 #

(<=) :: (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 #

(>) :: (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 #

(>=) :: (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 #

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) #

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) #

(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 #

(<) :: (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 #

(<=) :: (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 #

(>) :: (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 #

(>=) :: (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 #

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) #

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) #

class Read a where #

Parsing of Strings, 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

Methods

readsPrec #

Arguments

:: Int

the operator precedence of the enclosing context (a number from 0 to 11). Function application has precedence 10.

-> ReadS a 

attempts to parse a value from the front of the string, returning a list of (parsed value, remaining string) pairs. If there is no successful parse, the returned list is empty.

Derived instances of Read and Show satisfy the following:

That is, readsPrec parses the string produced by showsPrec, and delivers the value that showsPrec started with.

readList :: ReadS [a] #

The method readList is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined Read instance of the Char type, where values of type String should be are expected to use double quotes, rather than square brackets.

readPrec :: ReadPrec a #

Proposed replacement for readsPrec using new-style parsers (GHC only).

readListPrec :: ReadPrec [a] #

Proposed replacement for readList using new-style parsers (GHC only). The default definition uses readList. Instances that define readPrec should also define readListPrec as readListPrecDefault.

Instances

Instances details
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 Version

Since: base-2.1

Instance details

Defined in Data.Version

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 CBool 
Instance details

Defined in Foreign.C.Types

Read CChar 
Instance details

Defined in Foreign.C.Types

Read CClock 
Instance details

Defined in Foreign.C.Types

Read CDouble 
Instance details

Defined in Foreign.C.Types

Read CFloat 
Instance details

Defined in Foreign.C.Types

Read CInt 
Instance details

Defined in Foreign.C.Types

Read CIntMax 
Instance details

Defined in Foreign.C.Types

Read CIntPtr 
Instance details

Defined in Foreign.C.Types

Read CLLong 
Instance details

Defined in Foreign.C.Types

Read CLong 
Instance details

Defined in Foreign.C.Types

Read CPtrdiff 
Instance details

Defined in Foreign.C.Types

Read CSChar 
Instance details

Defined in Foreign.C.Types

Read CSUSeconds 
Instance details

Defined in Foreign.C.Types

Read CShort 
Instance details

Defined in Foreign.C.Types

Read CSigAtomic 
Instance details

Defined in Foreign.C.Types

Read CSize 
Instance details

Defined in Foreign.C.Types

Read CTime 
Instance details

Defined in Foreign.C.Types

Read CUChar 
Instance details

Defined in Foreign.C.Types

Read CUInt 
Instance details

Defined in Foreign.C.Types

Read CUIntMax 
Instance details

Defined in Foreign.C.Types

Read CUIntPtr 
Instance details

Defined in Foreign.C.Types

Read CULLong 
Instance details

Defined in Foreign.C.Types

Read CULong 
Instance details

Defined in Foreign.C.Types

Read CUSeconds 
Instance details

Defined in Foreign.C.Types

Read CUShort 
Instance details

Defined in Foreign.C.Types

Read CWchar 
Instance details

Defined in Foreign.C.Types

Read IntPtr 
Instance details

Defined in Foreign.Ptr

Read WordPtr 
Instance details

Defined in Foreign.Ptr

Read Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

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 IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

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 Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Read GCDetails

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Read RTSStats

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Read SomeChar 
Instance details

Defined in GHC.TypeLits

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 GeneralCategory

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Read CBlkCnt 
Instance details

Defined in System.Posix.Types

Read CBlkSize 
Instance details

Defined in System.Posix.Types

Read CCc 
Instance details

Defined in System.Posix.Types

Read CClockId 
Instance details

Defined in System.Posix.Types

Read CDev 
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 CGid 
Instance details

Defined in System.Posix.Types

Read CId 
Instance details

Defined in System.Posix.Types

Read CIno 
Instance details

Defined in System.Posix.Types

Read CKey 
Instance details

Defined in System.Posix.Types

Read CMode 
Instance details

Defined in System.Posix.Types

Read CNfds 
Instance details

Defined in System.Posix.Types

Read CNlink 
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 CRLim 
Instance details

Defined in System.Posix.Types

Read CSocklen 
Instance details

Defined in System.Posix.Types

Read CSpeed 
Instance details

Defined in System.Posix.Types

Read CSsize 
Instance details

Defined in System.Posix.Types

Read CTcflag 
Instance details

Defined in System.Posix.Types

Read CUid 
Instance details

Defined in System.Posix.Types

Read Fd 
Instance details

Defined in System.Posix.Types

Read Lexeme

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 ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Read IntSet 
Instance details

Defined in Data.IntSet.Internal

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Read Options 
Instance details

Defined in Data.Functor.Invariant.TH

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 I16 
Instance details

Defined in Data.Text.Foreign

Read FPFormat 
Instance details

Defined in Data.Text.Lazy.Builder.RealFloat

Read DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Read DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Read NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Read UUID 
Instance details

Defined in Data.UUID.Types.Internal

Read UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

readsPrec :: Int -> ReadS UnpackedUUID #

readList :: ReadS [UnpackedUUID] #

readPrec :: ReadPrec UnpackedUUID #

readListPrec :: ReadPrec [UnpackedUUID] #

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 ()

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS () #

readList :: ReadS [()] #

readPrec :: ReadPrec () #

readListPrec :: ReadPrec [()] #

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 Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Read a => Read (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Read a => Read (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Read a => Read (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Read a => Read (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Read a => Read (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Read a => Read (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

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 (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 (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 a => Read (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Min 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 (Dual 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 (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read p => Read (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

(Integral a, Read a) => Read (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Read

Read vertex => Read (SCC vertex)

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

readsPrec :: Int -> ReadS (SCC vertex) #

readList :: ReadS [SCC vertex] #

readPrec :: ReadPrec (SCC vertex) #

readListPrec :: ReadPrec [SCC vertex] #

Read e => Read (IntMap e) 
Instance details

Defined in Data.IntMap.Internal

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

Read a => Read (Tree a) 
Instance details

Defined in Data.Tree

Read a => Read (DList a) 
Instance details

Defined in Data.DList.Internal

Read a => Read (Array a) 
Instance details

Defined in Data.Primitive.Array

Read a => Read (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

(Eq a, Hashable a, Read a) => Read (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Read a => Read (Vector a) 
Instance details

Defined in Data.Vector

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

Defined in Data.Vector.Primitive

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

Defined in Data.Vector.Storable

Read a => Read (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Read a => Read (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

Read a => Read (a)

Since: base-4.15

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a) #

readList :: ReadS [(a)] #

readPrec :: ReadPrec (a) #

readListPrec :: ReadPrec [(a)] #

Read a => Read [a]

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS [a] #

readList :: ReadS [[a]] #

readPrec :: ReadPrec [a] #

readListPrec :: ReadPrec [[a]] #

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

Since: base-3.0

Instance details

Defined in Data.Either

HasResolution a => Read (Fixed a)

Since: base-4.3.0.0

Instance details

Defined in Data.Fixed

Read (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

(Read a, Read b) => Read (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

readsPrec :: Int -> ReadS (Arg a b) #

readList :: ReadS [Arg a b] #

readPrec :: ReadPrec (Arg a b) #

readListPrec :: ReadPrec [Arg a b] #

(Ix a, Read a, Read b) => Read (Array a b)

Since: base-2.1

Instance details

Defined in GHC.Read

Read (U1 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

(Ord k, Read k, Read e) => Read (Map k e) 
Instance details

Defined in Data.Map.Internal

Methods

readsPrec :: Int -> ReadS (Map k e) #

readList :: ReadS [Map k e] #

readPrec :: ReadPrec (Map k e) #

readListPrec :: ReadPrec [Map k e] #

(Read1 f, Read a) => Read (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

(Read1 f, Read a) => Read (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

readsPrec :: Int -> ReadS (Free f a) #

readList :: ReadS [Free f a] #

readPrec :: ReadPrec (Free f a) #

readListPrec :: ReadPrec [Free f a] #

(Read1 f, Read a) => Read (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Methods

readsPrec :: Int -> ReadS (Lift f a) #

readList :: ReadS [Lift f a] #

readPrec :: ReadPrec (Lift f a) #

readListPrec :: ReadPrec [Lift f a] #

(Read1 m, Read a) => Read (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) 
Instance details

Defined in Data.HashMap.Internal

(Read a, Read b) => Read (a, b)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b) #

readList :: ReadS [(a, b)] #

readPrec :: ReadPrec (a, b) #

readListPrec :: ReadPrec [(a, b)] #

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

Methods

readsPrec :: Int -> ReadS (Ap f a) #

readList :: ReadS [Ap f a] #

readPrec :: ReadPrec (Ap f a) #

readListPrec :: ReadPrec [Ap f a] #

Read (f a) => Read (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

readsPrec :: Int -> ReadS (Alt f a) #

readList :: ReadS [Alt f a] #

readPrec :: ReadPrec (Alt f a) #

readListPrec :: ReadPrec [Alt f a] #

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

Methods

readsPrec :: Int -> ReadS (a :~: b) #

readList :: ReadS [a :~: b] #

readPrec :: ReadPrec (a :~: b) #

readListPrec :: ReadPrec [a :~: b] #

Read (f p) => Read (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (Rec1 f p) #

readList :: ReadS [Rec1 f p] #

readPrec :: ReadPrec (Rec1 f p) #

readListPrec :: ReadPrec [Rec1 f p] #

Read (p (Fix p a) a) => Read (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

readsPrec :: Int -> ReadS (Fix p a) #

readList :: ReadS [Fix p a] #

readPrec :: ReadPrec (Fix p a) #

readListPrec :: ReadPrec [Fix p a] #

Read (p a a) => Read (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

readsPrec :: Int -> ReadS (Join p a) #

readList :: ReadS [Join p a] #

readPrec :: ReadPrec (Join p a) #

readListPrec :: ReadPrec [Join p a] #

(Read a, Read (f b)) => Read (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

readsPrec :: Int -> ReadS (FreeF f a b) #

readList :: ReadS [FreeF f a b] #

readPrec :: ReadPrec (FreeF f a b) #

readListPrec :: ReadPrec [FreeF f a b] #

(Read1 f, Read1 m, Read a) => Read (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

readsPrec :: Int -> ReadS (FreeT f m a) #

readList :: ReadS [FreeT f m a] #

readPrec :: ReadPrec (FreeT f m a) #

readListPrec :: ReadPrec [FreeT f m a] #

Read (f a) => Read (WrappedContravariant f a) 
Instance details

Defined in Data.Functor.Invariant

Read (f a) => Read (WrappedFunctor f a) 
Instance details

Defined in Data.Functor.Invariant

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

Defined in Data.Tagged

(Read1 f, Read a) => Read (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

(Read e, Read1 m, Read a) => Read (ErrorT e m a) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

readsPrec :: Int -> ReadS (ErrorT e m a) #

readList :: ReadS [ErrorT e m a] #

readPrec :: ReadPrec (ErrorT e m a) #

readListPrec :: ReadPrec [ErrorT e m a] #

(Read e, Read1 m, Read a) => Read (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

readsPrec :: Int -> ReadS (ExceptT e m a) #

readList :: ReadS [ExceptT e m a] #

readPrec :: ReadPrec (ExceptT e m a) #

readListPrec :: ReadPrec [ExceptT e m a] #

(Read1 f, Read a) => Read (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

(Read w, Read1 m, Read a) => Read (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

readsPrec :: Int -> ReadS (WriterT w m a) #

readList :: ReadS [WriterT w m a] #

readPrec :: ReadPrec (WriterT w m a) #

readListPrec :: ReadPrec [WriterT w m a] #

(Read w, Read1 m, Read a) => Read (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

readsPrec :: Int -> ReadS (WriterT w m a) #

readList :: ReadS [WriterT w m a] #

readPrec :: ReadPrec (WriterT w m a) #

readListPrec :: ReadPrec [WriterT w m a] #

Read a => Read (Constant a b) 
Instance details

Defined in Data.Functor.Constant

(Read1 f, Read a) => Read (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c) #

readList :: ReadS [(a, b, c)] #

readPrec :: ReadPrec (a, b, c) #

readListPrec :: ReadPrec [(a, b, c)] #

(Read1 f, Read1 g, Read a) => Read (Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

readsPrec :: Int -> ReadS (Product f g a) #

readList :: ReadS [Product f g a] #

readPrec :: ReadPrec (Product f g a) #

readListPrec :: ReadPrec [Product f g a] #

(Read1 f, Read1 g, Read a) => Read (Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

readsPrec :: Int -> ReadS (Sum f g a) #

readList :: ReadS [Sum f g a] #

readPrec :: ReadPrec (Sum f g a) #

readListPrec :: ReadPrec [Sum f g a] #

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

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

readsPrec :: Int -> ReadS (a :~~: b) #

readList :: ReadS [a :~~: b] #

readPrec :: ReadPrec (a :~~: b) #

readListPrec :: ReadPrec [a :~~: b] #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :*: g) p) #

readList :: ReadS [(f :*: g) p] #

readPrec :: ReadPrec ((f :*: g) p) #

readListPrec :: ReadPrec [(f :*: g) p] #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :+: g) p) #

readList :: ReadS [(f :+: g) p] #

readPrec :: ReadPrec ((f :+: g) p) #

readListPrec :: ReadPrec [(f :+: g) p] #

Read c => Read (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (K1 i c p) #

readList :: ReadS [K1 i c p] #

readPrec :: ReadPrec (K1 i c p) #

readListPrec :: ReadPrec [K1 i c p] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d) #

readList :: ReadS [(a, b, c, d)] #

readPrec :: ReadPrec (a, b, c, d) #

readListPrec :: ReadPrec [(a, b, c, d)] #

(Read1 f, Read1 g, Read a) => Read (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

readsPrec :: Int -> ReadS (Compose f g a) #

readList :: ReadS [Compose f g a] #

readPrec :: ReadPrec (Compose f g a) #

readListPrec :: ReadPrec [Compose f g a] #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :.: g) p) #

readList :: ReadS [(f :.: g) p] #

readPrec :: ReadPrec ((f :.: g) p) #

readListPrec :: ReadPrec [(f :.: g) p] #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (M1 i c f p) #

readList :: ReadS [M1 i c f p] #

readPrec :: ReadPrec (M1 i c f p) #

readListPrec :: ReadPrec [M1 i c f p] #

Read (f a) => Read (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

readsPrec :: Int -> ReadS (Clown f a b) #

readList :: ReadS [Clown f a b] #

readPrec :: ReadPrec (Clown f a b) #

readListPrec :: ReadPrec [Clown f a b] #

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

Defined in Data.Bifunctor.Flip

Methods

readsPrec :: Int -> ReadS (Flip p a b) #

readList :: ReadS [Flip p a b] #

readPrec :: ReadPrec (Flip p a b) #

readListPrec :: ReadPrec [Flip p a b] #

Read (g b) => Read (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

readsPrec :: Int -> ReadS (Joker g a b) #

readList :: ReadS [Joker g a b] #

readPrec :: ReadPrec (Joker g a b) #

readListPrec :: ReadPrec [Joker g a b] #

Read (p a b) => Read (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Read (p a b) => Read (WrappedProfunctor p a b) 
Instance details

Defined in Data.Functor.Invariant

(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

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e) #

readList :: ReadS [(a, b, c, d, e)] #

readPrec :: ReadPrec (a, b, c, d, e) #

readListPrec :: ReadPrec [(a, b, c, d, e)] #

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

Defined in Data.Bifunctor.Product

Methods

readsPrec :: Int -> ReadS (Product f g a b) #

readList :: ReadS [Product f g a b] #

readPrec :: ReadPrec (Product f g a b) #

readListPrec :: ReadPrec [Product f g a b] #

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

Defined in Data.Bifunctor.Sum

Methods

readsPrec :: Int -> ReadS (Sum p q a b) #

readList :: ReadS [Sum p q a b] #

readPrec :: ReadPrec (Sum p q a b) #

readListPrec :: ReadPrec [Sum p q a b] #

(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) #

readList :: ReadS [(a, b, c, d, e, f)] #

readPrec :: ReadPrec (a, b, c, d, e, f) #

readListPrec :: ReadPrec [(a, b, c, d, e, f)] #

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

Defined in Data.Bifunctor.Tannen

Methods

readsPrec :: Int -> ReadS (Tannen f p a b) #

readList :: ReadS [Tannen f p a b] #

readPrec :: ReadPrec (Tannen f p a b) #

readListPrec :: ReadPrec [Tannen f p a b] #

(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) #

readList :: ReadS [(a, b, c, d, e, f, g)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g)] #

(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) #

readList :: ReadS [(a, b, c, d, e, f, g, h)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h)] #

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

Defined in Data.Bifunctor.Biff

Methods

readsPrec :: Int -> ReadS (Biff p f g a b) #

readList :: ReadS [Biff p f g a b] #

readPrec :: ReadPrec (Biff p f g a b) #

readListPrec :: ReadPrec [Biff p f g a b] #

(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) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i)] #

(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) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j)] #

readPrec :: ReadPrec (a, b, c, d, e, f, g, h, i, j) #

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j)] #

(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) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k)] #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k)] #

(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) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l)] #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l)] #

(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) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m)] #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m)] #

(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) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] #

(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) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] #

class (Num a, Ord a) => Real a where #

Methods

toRational :: a -> Rational #

the rational equivalent of its real argument with full precision

Instances

Instances details
Real CBool 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CBool -> Rational #

Real CChar 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CChar -> Rational #

Real CClock 
Instance details

Defined in Foreign.C.Types

Real CDouble 
Instance details

Defined in Foreign.C.Types

Real CFloat 
Instance details

Defined in Foreign.C.Types

Real CInt 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CInt -> Rational #

Real CIntMax 
Instance details

Defined in Foreign.C.Types

Real CIntPtr 
Instance details

Defined in Foreign.C.Types

Real CLLong 
Instance details

Defined in Foreign.C.Types

Real CLong 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CLong -> Rational #

Real CPtrdiff 
Instance details

Defined in Foreign.C.Types

Real CSChar 
Instance details

Defined in Foreign.C.Types

Real CSUSeconds 
Instance details

Defined in Foreign.C.Types

Real CShort 
Instance details

Defined in Foreign.C.Types

Real CSigAtomic 
Instance details

Defined in Foreign.C.Types

Real CSize 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CSize -> Rational #

Real CTime 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CTime -> Rational #

Real CUChar 
Instance details

Defined in Foreign.C.Types

Real CUInt 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CUInt -> Rational #

Real CUIntMax 
Instance details

Defined in Foreign.C.Types

Real CUIntPtr 
Instance details

Defined in Foreign.C.Types

Real CULLong 
Instance details

Defined in Foreign.C.Types

Real CULong 
Instance details

Defined in Foreign.C.Types

Real CUSeconds 
Instance details

Defined in Foreign.C.Types

Real CUShort 
Instance details

Defined in Foreign.C.Types

Real CWchar 
Instance details

Defined in Foreign.C.Types

Real IntPtr 
Instance details

Defined in Foreign.Ptr

Real WordPtr 
Instance details

Defined in Foreign.Ptr

Real Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int16 -> Rational #

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int32 -> Rational #

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int64 -> Rational #

Real Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int8 -> Rational #

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

toRational :: Word8 -> Rational #

Real CBlkCnt 
Instance details

Defined in System.Posix.Types

Real CBlkSize 
Instance details

Defined in System.Posix.Types

Real CCc 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CCc -> Rational #

Real CClockId 
Instance details

Defined in System.Posix.Types

Real CDev 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CDev -> Rational #

Real CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Real CFsFilCnt 
Instance details

Defined in System.Posix.Types

Real CGid 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CGid -> Rational #

Real CId 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CId -> Rational #

Real CIno 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CIno -> Rational #

Real CKey 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CKey -> Rational #

Real CMode 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CMode -> Rational #

Real CNfds 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CNfds -> Rational #

Real CNlink 
Instance details

Defined in System.Posix.Types

Real COff 
Instance details

Defined in System.Posix.Types

Methods

toRational :: COff -> Rational #

Real CPid 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CPid -> Rational #

Real CRLim 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CRLim -> Rational #

Real CSocklen 
Instance details

Defined in System.Posix.Types

Real CSpeed 
Instance details

Defined in System.Posix.Types

Real CSsize 
Instance details

Defined in System.Posix.Types

Real CTcflag 
Instance details

Defined in System.Posix.Types

Real CUid 
Instance details

Defined in System.Posix.Types

Methods

toRational :: CUid -> Rational #

Real Fd 
Instance details

Defined in System.Posix.Types

Methods

toRational :: Fd -> Rational #

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 I16 
Instance details

Defined in Data.Text.Foreign

Methods

toRational :: I16 -> Rational #

Real DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Real NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

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 Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Int -> Rational #

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

toRational :: Word -> Rational #

Real a => Real (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

toRational :: Identity a -> Rational #

Real a => Real (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

toRational :: Down a -> Rational #

Integral a => Real (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Ratio a -> Rational #

HasResolution a => Real (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

toRational :: Fixed a -> Rational #

Real a => Real (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

toRational :: Const a b -> Rational #

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

Defined in Data.Tagged

Methods

toRational :: Tagged s a -> Rational #

class (RealFrac a, Floating a) => RealFloat a where #

Efficient, machine-independent access to the components of a floating-point number.

Methods

floatRadix :: a -> Integer #

a constant function, returning the radix of the representation (often 2)

floatDigits :: a -> Int #

a constant function, returning the number of digits of floatRadix in the significand

floatRange :: a -> (Int, Int) #

a constant function, returning the lowest and highest values the exponent may assume

decodeFloat :: a -> (Integer, Int) #

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 #

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 #

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 #

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 #

multiplies a floating-point number by an integer power of the radix

isNaN :: a -> Bool #

True if the argument is an IEEE "not-a-number" (NaN) value

isInfinite :: a -> Bool #

True if the argument is an IEEE infinity or negative infinity

isDenormalized :: a -> Bool #

True if the argument is too small to be represented in normalized format

isNegativeZero :: a -> Bool #

True if the argument is an IEEE negative zero

isIEEE :: a -> Bool #

True if the argument is an IEEE floating point number

atan2 :: a -> a -> a #

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 CDouble 
Instance details

Defined in Foreign.C.Types

RealFloat CFloat 
Instance details

Defined in Foreign.C.Types

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 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 (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

floatRadix :: Const a b -> Integer #

floatDigits :: Const a b -> Int #

floatRange :: Const a b -> (Int, Int) #

decodeFloat :: Const a b -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Const a b #

exponent :: Const a b -> Int #

significand :: Const a b -> Const a b #

scaleFloat :: Int -> Const a b -> Const a b #

isNaN :: Const a b -> Bool #

isInfinite :: Const a b -> Bool #

isDenormalized :: Const a b -> Bool #

isNegativeZero :: Const a b -> Bool #

isIEEE :: Const a b -> Bool #

atan2 :: Const a b -> Const a b -> Const a b #

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

Defined in Data.Tagged

Methods

floatRadix :: Tagged s a -> Integer #

floatDigits :: Tagged s a -> Int #

floatRange :: Tagged s a -> (Int, Int) #

decodeFloat :: Tagged s a -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Tagged s a #

exponent :: Tagged s a -> Int #

significand :: Tagged s a -> Tagged s a #

scaleFloat :: Int -> Tagged s a -> Tagged s a #

isNaN :: Tagged s a -> Bool #

isInfinite :: Tagged s a -> Bool #

isDenormalized :: Tagged s a -> Bool #

isNegativeZero :: Tagged s a -> Bool #

isIEEE :: Tagged s a -> Bool #

atan2 :: Tagged s a -> Tagged s a -> Tagged s a #

class (Real a, Fractional a) => RealFrac a where #

Extracting components of fractions.

Minimal complete definition

properFraction

Methods

properFraction :: Integral b => a -> (b, a) #

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 #

truncate x returns the integer nearest x between zero and x

round :: Integral b => a -> b #

round x returns the nearest integer to x; the even integer if x is equidistant between two integers

ceiling :: Integral b => a -> b #

ceiling x returns the least integer not less than x

floor :: Integral b => a -> b #

floor x returns the greatest integer not greater than x

Instances

Instances details
RealFrac CDouble 
Instance details

Defined in Foreign.C.Types

Methods

properFraction :: Integral b => CDouble -> (b, CDouble) #

truncate :: Integral b => CDouble -> b #

round :: Integral b => CDouble -> b #

ceiling :: Integral b => CDouble -> b #

floor :: Integral b => CDouble -> b #

RealFrac CFloat 
Instance details

Defined in Foreign.C.Types

Methods

properFraction :: Integral b => CFloat -> (b, CFloat) #

truncate :: Integral b => CFloat -> b #

round :: Integral b => CFloat -> b #

ceiling :: Integral b => CFloat -> b #

floor :: Integral b => CFloat -> b #

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 DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

properFraction :: Integral b => DiffTime -> (b, DiffTime) #

truncate :: Integral b => DiffTime -> b #

round :: Integral b => DiffTime -> b #

ceiling :: Integral b => DiffTime -> b #

floor :: Integral b => DiffTime -> b #

RealFrac NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

RealFrac a => RealFrac (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

properFraction :: Integral b => Identity a -> (b, Identity a) #

truncate :: Integral b => Identity a -> b #

round :: Integral b => Identity a -> b #

ceiling :: Integral b => Identity a -> b #

floor :: Integral b => Identity a -> b #

RealFrac a => RealFrac (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

properFraction :: Integral b => Down a -> (b, Down a) #

truncate :: Integral b => Down a -> b #

round :: Integral b => Down a -> b #

ceiling :: Integral b => Down a -> b #

floor :: Integral b => Down a -> b #

Integral a => RealFrac (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

properFraction :: Integral b => Ratio a -> (b, Ratio a) #

truncate :: Integral b => Ratio a -> b #

round :: Integral b => Ratio a -> b #

ceiling :: Integral b => Ratio a -> b #

floor :: Integral b => Ratio a -> b #

HasResolution a => RealFrac (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

properFraction :: Integral b => Fixed a -> (b, Fixed a) #

truncate :: Integral b => Fixed a -> b #

round :: Integral b => Fixed a -> b #

ceiling :: Integral b => Fixed a -> b #

floor :: Integral b => Fixed a -> b #

RealFrac a => RealFrac (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

properFraction :: Integral b0 => Const a b -> (b0, Const a b) #

truncate :: Integral b0 => Const a b -> b0 #

round :: Integral b0 => Const a b -> b0 #

ceiling :: Integral b0 => Const a b -> b0 #

floor :: Integral b0 => Const a b -> b0 #

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

Defined in Data.Tagged

Methods

properFraction :: Integral b => Tagged s a -> (b, Tagged s a) #

truncate :: Integral b => Tagged s a -> b #

round :: Integral b => Tagged s a -> b #

ceiling :: Integral b => Tagged s a -> b #

floor :: Integral b => Tagged s a -> b #

class Show a where #

Conversion of values to readable Strings.

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

Methods

showsPrec #

Arguments

:: Int

the operator precedence of the enclosing context (a number from 0 to 11). Function application has precedence 10.

-> a

the value to be converted to a String

-> ShowS 

Convert a value to a readable String.

showsPrec should satisfy the law

showsPrec d x r ++ s  ==  showsPrec d x (r ++ s)

Derived instances of Read and Show satisfy the following:

That is, readsPrec parses the string produced by showsPrec, and delivers the value that showsPrec started with.

show :: a -> String #

A specialised variant of showsPrec, using precedence context zero, and returning an ordinary String.

showList :: [a] -> ShowS #

The method showList is provided to allow the programmer to give a specialised way of showing lists of values. For example, this is used by the predefined Show instance of the Char type, where values of type String should be shown in double quotes, rather than between square brackets.

Instances

Instances details
Show NestedAtomically

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 NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show PatternMatchFail

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 RecSelError

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 TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Show Constr

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show ConstrRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show DataRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show DataType

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show Fixity

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show Dynamic

Since: base-2.1

Instance details

Defined in Data.Dynamic

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> All -> ShowS #

show :: All -> String #

showList :: [All] -> ShowS #

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Any -> ShowS #

show :: Any -> String #

showList :: [Any] -> ShowS #

Show SomeTypeRep

Since: base-4.10.0.0

Instance details

Defined in Data.Typeable.Internal

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

Show Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

showsPrec :: Int -> Void -> ShowS #

show :: Void -> String #

showList :: [Void] -> ShowS #

Show CBool 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CBool -> ShowS #

show :: CBool -> String #

showList :: [CBool] -> ShowS #

Show CChar 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CChar -> ShowS #

show :: CChar -> String #

showList :: [CChar] -> ShowS #

Show CClock 
Instance details

Defined in Foreign.C.Types

Show CDouble 
Instance details

Defined in Foreign.C.Types

Show CFloat 
Instance details

Defined in Foreign.C.Types

Show CInt 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CInt -> ShowS #

show :: CInt -> String #

showList :: [CInt] -> ShowS #

Show CIntMax 
Instance details

Defined in Foreign.C.Types

Show CIntPtr 
Instance details

Defined in Foreign.C.Types

Show CLLong 
Instance details

Defined in Foreign.C.Types

Show CLong 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CLong -> ShowS #

show :: CLong -> String #

showList :: [CLong] -> ShowS #

Show CPtrdiff 
Instance details

Defined in Foreign.C.Types

Show CSChar 
Instance details

Defined in Foreign.C.Types

Show CSUSeconds 
Instance details

Defined in Foreign.C.Types

Show CShort 
Instance details

Defined in Foreign.C.Types

Show CSigAtomic 
Instance details

Defined in Foreign.C.Types

Show CSize 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CSize -> ShowS #

show :: CSize -> String #

showList :: [CSize] -> ShowS #

Show CTime 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CTime -> ShowS #

show :: CTime -> String #

showList :: [CTime] -> ShowS #

Show CUChar 
Instance details

Defined in Foreign.C.Types

Show CUInt 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CUInt -> ShowS #

show :: CUInt -> String #

showList :: [CUInt] -> ShowS #

Show CUIntMax 
Instance details

Defined in Foreign.C.Types

Show CUIntPtr 
Instance details

Defined in Foreign.C.Types

Show CULLong 
Instance details

Defined in Foreign.C.Types

Show CULong 
Instance details

Defined in Foreign.C.Types

Show CUSeconds 
Instance details

Defined in Foreign.C.Types

Show CUShort 
Instance details

Defined in Foreign.C.Types

Show CWchar 
Instance details

Defined in Foreign.C.Types

Show IntPtr 
Instance details

Defined in Foreign.Ptr

Show WordPtr 
Instance details

Defined in Foreign.Ptr

Show BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Show ThreadId

Since: base-4.2.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 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 SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Show Fingerprint

Since: base-4.7.0.0

Instance details

Defined in GHC.Fingerprint.Type

Show Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Show SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Show CodingFailureMode

Since: base-4.4.0.0

Instance details

Defined in GHC.IO.Encoding.Failure

Show CodingProgress

Since: base-4.4.0.0

Instance details

Defined in GHC.IO.Encoding.Types

Show TextEncoding

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Encoding.Types

Show AllocationLimitExceeded

Since: base-4.7.1.0

Instance details

Defined in GHC.IO.Exception

Show ArrayException

Since: base-4.1.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 AsyncException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

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 CompactionFailed

Since: base-4.10.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 ExitCode 
Instance details

Defined in GHC.IO.Exception

Show FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Show IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show IOException

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 FD

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.FD

Methods

showsPrec :: Int -> FD -> ShowS #

show :: FD -> String #

showList :: [FD] -> ShowS #

Show HandlePosn

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle

Show FileLockingNotSupported

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Handle.Lock.Common

Show BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show HandleType

Since: base-4.1.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 IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int16 -> ShowS #

show :: Int16 -> String #

showList :: [Int16] -> ShowS #

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

Show Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int8 -> ShowS #

show :: Int8 -> String #

showList :: [Int8] -> ShowS #

Show FractionalExponentBase 
Instance details

Defined in GHC.Real

Show CallStack

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show GCDetails

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Show RTSStats

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Show SomeChar 
Instance details

Defined in GHC.TypeLits

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 GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

Show CBlkCnt 
Instance details

Defined in System.Posix.Types

Show CBlkSize 
Instance details

Defined in System.Posix.Types

Show CCc 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CCc -> ShowS #

show :: CCc -> String #

showList :: [CCc] -> ShowS #

Show CClockId 
Instance details

Defined in System.Posix.Types

Show CDev 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CDev -> ShowS #

show :: CDev -> String #

showList :: [CDev] -> ShowS #

Show CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Show CFsFilCnt 
Instance details

Defined in System.Posix.Types

Show CGid 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CGid -> ShowS #

show :: CGid -> String #

showList :: [CGid] -> ShowS #

Show CId 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CId -> ShowS #

show :: CId -> String #

showList :: [CId] -> ShowS #

Show CIno 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CIno -> ShowS #

show :: CIno -> String #

showList :: [CIno] -> ShowS #

Show CKey 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CKey -> ShowS #

show :: CKey -> String #

showList :: [CKey] -> ShowS #

Show CMode 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CMode -> ShowS #

show :: CMode -> String #

showList :: [CMode] -> ShowS #

Show CNfds 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CNfds -> ShowS #

show :: CNfds -> String #

showList :: [CNfds] -> ShowS #

Show CNlink 
Instance details

Defined in System.Posix.Types

Show COff 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> COff -> ShowS #

show :: COff -> String #

showList :: [COff] -> ShowS #

Show CPid 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CPid -> ShowS #

show :: CPid -> String #

showList :: [CPid] -> ShowS #

Show CRLim 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CRLim -> ShowS #

show :: CRLim -> String #

showList :: [CRLim] -> ShowS #

Show CSocklen 
Instance details

Defined in System.Posix.Types

Show CSpeed 
Instance details

Defined in System.Posix.Types

Show CSsize 
Instance details

Defined in System.Posix.Types

Show CTcflag 
Instance details

Defined in System.Posix.Types

Show CTimer 
Instance details

Defined in System.Posix.Types

Show CUid 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> CUid -> ShowS #

show :: CUid -> String #

showList :: [CUid] -> ShowS #

Show Fd 
Instance details

Defined in System.Posix.Types

Methods

showsPrec :: Int -> Fd -> ShowS #

show :: Fd -> String #

showList :: [Fd] -> ShowS #

Show Timeout

Since: base-4.0

Instance details

Defined in System.Timeout

Show Lexeme

Since: base-2.1

Instance details

Defined in Text.Read.Lex

Show Number

Since: base-4.6.0.0

Instance details

Defined in Text.Read.Lex

Show FormatMode 
Instance details

Defined in Data.ByteString.Builder.RealFloat

Methods

showsPrec :: Int -> FormatMode -> ShowS #

show :: FormatMode -> String #

showList :: [FormatMode] -> ShowS #

Show ByteString 
Instance details

Defined in Data.ByteString.Internal

Show ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Show ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

Show ByteArray 
Instance details

Defined in Data.Array.Byte

Show ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Show Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Show KindRep 
Instance details

Defined in GHC.Show

Show Module

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Show TrName

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show TyCon

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> TyCon -> ShowS #

show :: TyCon -> String #

showList :: [TyCon] -> ShowS #

Show TypeLitSort

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show Options 
Instance details

Defined in Data.Functor.Invariant.TH

Show Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

Show Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Show TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String #

showList :: [Doc] -> ShowS #

Show StdGen 
Instance details

Defined in System.Random.Internal

Show Scientific

See formatScientific if you need more control over the rendering.

Instance details

Defined in Data.Scientific

Show AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Show AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Bang -> ShowS #

show :: Bang -> String #

showList :: [Bang] -> ShowS #

Show Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Body -> ShowS #

show :: Body -> String #

showList :: [Body] -> ShowS #

Show Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Bytes -> ShowS #

show :: Bytes -> String #

showList :: [Bytes] -> ShowS #

Show Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Con -> ShowS #

show :: Con -> String #

showList :: [Con] -> ShowS #

Show Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Dec -> ShowS #

show :: Dec -> String #

showList :: [Dec] -> ShowS #

Show DecidedStrictness 
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 DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Exp -> ShowS #

show :: Exp -> String #

showList :: [Exp] -> ShowS #

Show FamilyResultSig 
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 Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Show FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Guard -> ShowS #

show :: Guard -> String #

showList :: [Guard] -> ShowS #

Show Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Info -> ShowS #

show :: Info -> String #

showList :: [Info] -> ShowS #

Show InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Lit -> ShowS #

show :: Lit -> String #

showList :: [Lit] -> ShowS #

Show Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Loc -> ShowS #

show :: Loc -> String #

showList :: [Loc] -> ShowS #

Show Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Match -> ShowS #

show :: Match -> String #

showList :: [Match] -> ShowS #

Show ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Show ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

Show NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Show OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Pat -> ShowS #

show :: Pat -> String #

showList :: [Pat] -> ShowS #

Show PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Show PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Show PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

Show Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Role -> ShowS #

show :: Role -> String #

showList :: [Role] -> ShowS #

Show RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Stmt -> ShowS #

show :: Stmt -> String #

showList :: [Stmt] -> ShowS #

Show TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> TyLit -> ShowS #

show :: TyLit -> String #

showList :: [TyLit] -> ShowS #

Show TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

Show TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Show CodePoint 
Instance details

Defined in Data.Text.Encoding

Methods

showsPrec :: Int -> CodePoint -> ShowS #

show :: CodePoint -> String #

showList :: [CodePoint] -> ShowS #

Show DecoderState 
Instance details

Defined in Data.Text.Encoding

Methods

showsPrec :: Int -> DecoderState -> ShowS #

show :: DecoderState -> String #

showList :: [DecoderState] -> ShowS #

Show Decoding 
Instance details

Defined in Data.Text.Encoding

Show UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

Show I16 
Instance details

Defined in Data.Text.Foreign

Methods

showsPrec :: Int -> I16 -> ShowS #

show :: I16 -> String #

showList :: [I16] -> ShowS #

Show Builder 
Instance details

Defined in Data.Text.Internal.Builder

Show FPFormat 
Instance details

Defined in Data.Text.Lazy.Builder.RealFloat

Show CalendarDiffDays 
Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Show DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Show DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Show NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Show SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

Show TimeLocale 
Instance details

Defined in Data.Time.Format.Locale

Show CalendarDiffTime 
Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

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 ZonedTime 
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

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

Methods

showsPrec :: Int -> UUID -> ShowS #

show :: UUID -> String #

showList :: [UUID] -> ShowS #

Show UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

showsPrec :: Int -> UnpackedUUID -> ShowS #

show :: UnpackedUUID -> String #

showList :: [UnpackedUUID] -> ShowS #

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 ()

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> () -> ShowS #

show :: () -> String #

showList :: [()] -> ShowS #

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Bool -> ShowS #

show :: Bool -> String #

showList :: [Bool] -> ShowS #

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Char -> ShowS #

show :: Char -> String #

showList :: [Char] -> ShowS #

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Int -> ShowS #

show :: Int -> String #

showList :: [Int] -> ShowS #

Show Levity

Since: base-4.15.0.0

Instance details

Defined in GHC.Show

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 Word

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

Show a => Show (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

showsPrec :: Int -> ZipList a -> ShowS #

show :: ZipList a -> String #

showList :: [ZipList a] -> ShowS #

Show a => Show (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

showsPrec :: Int -> And a -> ShowS #

show :: And a -> String #

showList :: [And a] -> ShowS #

Show a => Show (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

showsPrec :: Int -> Iff a -> ShowS #

show :: Iff a -> String #

showList :: [Iff a] -> ShowS #

Show a => Show (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

showsPrec :: Int -> Ior a -> ShowS #

show :: Ior a -> String #

showList :: [Ior a] -> ShowS #

Show a => Show (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

showsPrec :: Int -> Xor a -> ShowS #

show :: Xor a -> String #

showList :: [Xor a] -> ShowS #

Show a => Show (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

showsPrec :: Int -> Complex a -> ShowS #

show :: Complex a -> String #

showList :: [Complex a] -> ShowS #

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

Methods

showsPrec :: Int -> Identity a -> ShowS #

show :: Identity a -> String #

showList :: [Identity a] -> ShowS #

Show a => Show (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Show a => Show (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

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

Methods

showsPrec :: Int -> Down a -> ShowS #

show :: Down a -> String #

showList :: [Down a] -> ShowS #

Show a => Show (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Show a => Show (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

Show a => Show (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Max a -> ShowS #

show :: Max a -> String #

showList :: [Max a] -> ShowS #

Show a => Show (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Min a -> ShowS #

show :: Min a -> String #

showList :: [Min a] -> ShowS #

Show m => Show (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Dual a -> ShowS #

show :: Dual a -> String #

showList :: [Dual a] -> ShowS #

Show a => Show (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Product a -> ShowS #

show :: Product a -> String #

showList :: [Product a] -> ShowS #

Show a => Show (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Sum a -> ShowS #

show :: Sum a -> String #

showList :: [Sum a] -> ShowS #

Show (ForeignPtr a)

Since: base-2.1

Instance details

Defined in GHC.ForeignPtr

Show p => Show (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> Par1 p -> ShowS #

show :: Par1 p -> String #

showList :: [Par1 p] -> ShowS #

Show (FunPtr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

showsPrec :: Int -> FunPtr a -> ShowS #

show :: FunPtr a -> String #

showList :: [FunPtr a] -> ShowS #

Show (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

showsPrec :: Int -> Ptr a -> ShowS #

show :: Ptr a -> String #

showList :: [Ptr a] -> ShowS #

Show a => Show (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

showsPrec :: Int -> Ratio a -> ShowS #

show :: Ratio a -> String #

showList :: [Ratio a] -> ShowS #

Show vertex => Show (SCC vertex)

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

showsPrec :: Int -> SCC vertex -> ShowS #

show :: SCC vertex -> String #

showList :: [SCC vertex] -> ShowS #

Show a => Show (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

showsPrec :: Int -> IntMap a -> ShowS #

show :: IntMap a -> String #

showList :: [IntMap a] -> ShowS #

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS #

show :: Seq a -> String #

showList :: [Seq a] -> ShowS #

Show a => Show (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> ViewL a -> ShowS #

show :: ViewL a -> String #

showList :: [ViewL a] -> ShowS #

Show a => Show (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> ViewR a -> ShowS #

show :: ViewR a -> String #

showList :: [ViewR a] -> ShowS #

Show a => Show (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

Show a => Show (Tree a) 
Instance details

Defined in Data.Tree

Methods

showsPrec :: Int -> Tree a -> ShowS #

show :: Tree a -> String #

showList :: [Tree a] -> ShowS #

Show a => Show (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

showsPrec :: Int -> DList a -> ShowS #

show :: DList a -> String #

showList :: [DList a] -> ShowS #

Show a => Show (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

showsPrec :: Int -> Hashed a -> ShowS #

show :: Hashed a -> String #

showList :: [Hashed a] -> ShowS #

Show a => Show (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Doc a -> ShowS #

show :: Doc a -> String #

showList :: [Doc a] -> ShowS #

Show a => Show (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Span a -> ShowS #

show :: Span a -> String #

showList :: [Span a] -> ShowS #

Show a => Show (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

showsPrec :: Int -> Array a -> ShowS #

show :: Array a -> String #

showList :: [Array a] -> ShowS #

(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 g => Show (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

showsPrec :: Int -> StateGen g -> ShowS #

show :: StateGen g -> String #

showList :: [StateGen g] -> ShowS #

Show g => Show (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Show g => Show (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> IOGen g -> ShowS #

show :: IOGen g -> String #

showList :: [IOGen g] -> ShowS #

Show g => Show (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> STGen g -> ShowS #

show :: STGen g -> String #

showList :: [STGen g] -> ShowS #

Show g => Show (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> TGen g -> ShowS #

show :: TGen g -> String #

showList :: [TGen g] -> ShowS #

Show flag => Show (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> TyVarBndr flag -> ShowS #

show :: TyVarBndr flag -> String #

showList :: [TyVarBndr flag] -> ShowS #

Show a => Show (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

showsPrec :: Int -> HashSet a -> ShowS #

show :: HashSet a -> String #

showList :: [HashSet a] -> ShowS #

Show a => Show (Vector a) 
Instance details

Defined in Data.Vector

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

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

Defined in Data.Vector.Primitive

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

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

Defined in Data.Vector.Storable

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

Show a => Show (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

Show a => Show (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Show a => Show (a)

Since: base-4.15

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a) -> ShowS #

show :: (a) -> String #

showList :: [(a)] -> ShowS #

Show a => Show [a]

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> [a] -> ShowS #

show :: [a] -> String #

showList :: [[a]] -> ShowS #

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

Since: base-3.0

Instance details

Defined in Data.Either

Methods

showsPrec :: Int -> Either a b -> ShowS #

show :: Either a b -> String #

showList :: [Either a b] -> ShowS #

HasResolution a => Show (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

showsPrec :: Int -> Fixed a -> ShowS #

show :: Fixed a -> String #

showList :: [Fixed a] -> ShowS #

Show (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

showsPrec :: Int -> Proxy s -> ShowS #

show :: Proxy s -> String #

showList :: [Proxy s] -> ShowS #

(Show a, Show b) => Show (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Arg a b -> ShowS #

show :: Arg a b -> String #

showList :: [Arg a b] -> ShowS #

Show (TypeRep a) 
Instance details

Defined in Data.Typeable.Internal

Methods

showsPrec :: Int -> TypeRep a -> ShowS #

show :: TypeRep a -> String #

showList :: [TypeRep a] -> ShowS #

(Ix a, Show a, Show b) => Show (Array a b)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

showsPrec :: Int -> Array a b -> ShowS #

show :: Array a b -> String #

showList :: [Array a b] -> ShowS #

Show (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> U1 p -> ShowS #

show :: U1 p -> String #

showList :: [U1 p] -> ShowS #

Show (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> V1 p -> ShowS #

show :: V1 p -> String #

showList :: [V1 p] -> ShowS #

Show (ST s a)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

showsPrec :: Int -> ST s a -> ShowS #

show :: ST s a -> String #

showList :: [ST s a] -> ShowS #

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

Defined in Data.Map.Internal

Methods

showsPrec :: Int -> Map k a -> ShowS #

show :: Map k a -> String #

showList :: [Map k a] -> ShowS #

(Show e, Show a) => Show (Validation e a) 
Instance details

Defined in Data.Either.Validation

Methods

showsPrec :: Int -> Validation e a -> ShowS #

show :: Validation e a -> String #

showList :: [Validation e a] -> ShowS #

(Show1 f, Show a) => Show (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

showsPrec :: Int -> Cofree f a -> ShowS #

show :: Cofree f a -> String #

showList :: [Cofree f a] -> ShowS #

(Show1 f, Show a) => Show (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

showsPrec :: Int -> Free f a -> ShowS #

show :: Free f a -> String #

showList :: [Free f a] -> ShowS #

Show m => Show (Over m a) 
Instance details

Defined in Control.Selective

Methods

showsPrec :: Int -> Over m a -> ShowS #

show :: Over m a -> String #

showList :: [Over m a] -> ShowS #

Show m => Show (Under m a) 
Instance details

Defined in Control.Selective

Methods

showsPrec :: Int -> Under m a -> ShowS #

show :: Under m a -> String #

showList :: [Under m a] -> ShowS #

(Show e, Show a) => Show (Validation e a) 
Instance details

Defined in Control.Selective

Methods

showsPrec :: Int -> Validation e a -> ShowS #

show :: Validation e a -> String #

showList :: [Validation e a] -> ShowS #

Show m => Show (Over m a) 
Instance details

Defined in Control.Selective.Multi

Methods

showsPrec :: Int -> Over m a -> ShowS #

show :: Over m a -> String #

showList :: [Over m a] -> ShowS #

Show m => Show (Under m a) 
Instance details

Defined in Control.Selective.Multi

Methods

showsPrec :: Int -> Under m a -> ShowS #

show :: Under m a -> String #

showList :: [Under m a] -> ShowS #

(Show1 f, Show a) => Show (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Methods

showsPrec :: Int -> Lift f a -> ShowS #

show :: Lift f a -> String #

showList :: [Lift f a] -> ShowS #

(Show1 m, Show a) => Show (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

showsPrec :: Int -> MaybeT m a -> ShowS #

show :: MaybeT m a -> String #

showList :: [MaybeT m a] -> ShowS #

(Show k, Show v) => Show (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

showsPrec :: Int -> HashMap k v -> ShowS #

show :: HashMap k v -> String #

showList :: [HashMap k v] -> ShowS #

(Show a, Show b) => Show (a, b)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b) -> ShowS #

show :: (a, b) -> String #

showList :: [(a, b)] -> ShowS #

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

Methods

showsPrec :: Int -> Const a b -> ShowS #

show :: Const a b -> String #

showList :: [Const a b] -> ShowS #

Show (f a) => Show (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Ap f a -> ShowS #

show :: Ap f a -> String #

showList :: [Ap f a] -> ShowS #

Show (f a) => Show (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Alt f a -> ShowS #

show :: Alt f a -> String #

showList :: [Alt f a] -> ShowS #

Show (Coercion a b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Coercion

Methods

showsPrec :: Int -> Coercion a b -> ShowS #

show :: Coercion a b -> String #

showList :: [Coercion a b] -> ShowS #

Show (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

showsPrec :: Int -> (a :~: b) -> ShowS #

show :: (a :~: b) -> String #

showList :: [a :~: b] -> ShowS #

Show (OrderingI a b) 
Instance details

Defined in Data.Type.Ord

Methods

showsPrec :: Int -> OrderingI a b -> ShowS #

show :: OrderingI a b -> String #

showList :: [OrderingI a b] -> ShowS #

Show (f p) => Show (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> Rec1 f p -> ShowS #

show :: Rec1 f p -> String #

showList :: [Rec1 f p] -> ShowS #

Show (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Char p -> ShowS #

show :: URec Char p -> String #

showList :: [URec Char p] -> ShowS #

Show (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Double p -> ShowS #

show :: URec Double p -> String #

showList :: [URec Double p] -> ShowS #

Show (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Float p -> ShowS #

show :: URec Float p -> String #

showList :: [URec Float p] -> ShowS #

Show (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Int p -> ShowS #

show :: URec Int p -> String #

showList :: [URec Int p] -> ShowS #

Show (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Word p -> ShowS #

show :: URec Word p -> String #

showList :: [URec Word p] -> ShowS #

Show (p (Fix p a) a) => Show (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

showsPrec :: Int -> Fix p a -> ShowS #

show :: Fix p a -> String #

showList :: [Fix p a] -> ShowS #

Show (p a a) => Show (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

showsPrec :: Int -> Join p a -> ShowS #

show :: Join p a -> String #

showList :: [Join p a] -> ShowS #

(Show a, Show (f b)) => Show (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

showsPrec :: Int -> FreeF f a b -> ShowS #

show :: FreeF f a b -> String #

showList :: [FreeF f a b] -> ShowS #

(Show1 f, Show1 m, Show a) => Show (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

showsPrec :: Int -> FreeT f m a -> ShowS #

show :: FreeT f m a -> String #

showList :: [FreeT f m a] -> ShowS #

Show (f a) => Show (WrappedContravariant f a) 
Instance details

Defined in Data.Functor.Invariant

Show (f a) => Show (WrappedFunctor f a) 
Instance details

Defined in Data.Functor.Invariant

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

Defined in Data.Tagged

Methods

showsPrec :: Int -> Tagged s b -> ShowS #

show :: Tagged s b -> String #

showList :: [Tagged s b] -> ShowS #

(Show1 f, Show a) => Show (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

Methods

showsPrec :: Int -> Backwards f a -> ShowS #

show :: Backwards f a -> String #

showList :: [Backwards f a] -> ShowS #

(Show e, Show1 m, Show a) => Show (ErrorT e m a) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

showsPrec :: Int -> ErrorT e m a -> ShowS #

show :: ErrorT e m a -> String #

showList :: [ErrorT e m a] -> ShowS #

(Show e, Show1 m, Show a) => Show (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

showsPrec :: Int -> ExceptT e m a -> ShowS #

show :: ExceptT e m a -> String #

showList :: [ExceptT e m a] -> ShowS #

(Show1 f, Show a) => Show (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

showsPrec :: Int -> IdentityT f a -> ShowS #

show :: IdentityT f a -> String #

showList :: [IdentityT f a] -> ShowS #

(Show w, Show1 m, Show a) => Show (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

showsPrec :: Int -> WriterT w m a -> ShowS #

show :: WriterT w m a -> String #

showList :: [WriterT w m a] -> ShowS #

(Show w, Show1 m, Show a) => Show (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

showsPrec :: Int -> WriterT w m a -> ShowS #

show :: WriterT w m a -> String #

showList :: [WriterT w m a] -> ShowS #

Show a => Show (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

showsPrec :: Int -> Constant a b -> ShowS #

show :: Constant a b -> String #

showList :: [Constant a b] -> ShowS #

(Show1 f, Show a) => Show (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

Methods

showsPrec :: Int -> Reverse f a -> ShowS #

show :: Reverse f a -> String #

showList :: [Reverse f a] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c) -> ShowS #

show :: (a, b, c) -> String #

showList :: [(a, b, c)] -> ShowS #

(Show1 f, Show1 g, Show a) => Show (Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

showsPrec :: Int -> Product f g a -> ShowS #

show :: Product f g a -> String #

showList :: [Product f g a] -> ShowS #

(Show1 f, Show1 g, Show a) => Show (Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

showsPrec :: Int -> Sum f g a -> ShowS #

show :: Sum f g a -> String #

showList :: [Sum f g a] -> ShowS #

Show (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

showsPrec :: Int -> (a :~~: b) -> ShowS #

show :: (a :~~: b) -> String #

showList :: [a :~~: b] -> ShowS #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :*: g) p -> ShowS #

show :: (f :*: g) p -> String #

showList :: [(f :*: g) p] -> ShowS #

(Show (f p), Show (g p)) => Show ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :+: g) p -> ShowS #

show :: (f :+: g) p -> String #

showList :: [(f :+: g) p] -> ShowS #

Show c => Show (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> K1 i c p -> ShowS #

show :: K1 i c p -> String #

showList :: [K1 i c p] -> ShowS #

(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 #

show :: (a, b, c, d) -> String #

showList :: [(a, b, c, d)] -> ShowS #

(Show1 f, Show1 g, Show a) => Show (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

showsPrec :: Int -> Compose f g a -> ShowS #

show :: Compose f g a -> String #

showList :: [Compose f g a] -> ShowS #

Show (f (g p)) => Show ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :.: g) p -> ShowS #

show :: (f :.: g) p -> String #

showList :: [(f :.: g) p] -> ShowS #

Show (f p) => Show (M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> M1 i c f p -> ShowS #

show :: M1 i c f p -> String #

showList :: [M1 i c f p] -> ShowS #

Show (f a) => Show (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

showsPrec :: Int -> Clown f a b -> ShowS #

show :: Clown f a b -> String #

showList :: [Clown f a b] -> ShowS #

Show (p b a) => Show (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

showsPrec :: Int -> Flip p a b -> ShowS #

show :: Flip p a b -> String #

showList :: [Flip p a b] -> ShowS #

Show (g b) => Show (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

showsPrec :: Int -> Joker g a b -> ShowS #

show :: Joker g a b -> String #

showList :: [Joker g a b] -> ShowS #

Show (p a b) => Show (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Show (p a b) => Show (WrappedProfunctor p a b) 
Instance details

Defined in Data.Functor.Invariant

(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 #

show :: (a, b, c, d, e) -> String #

showList :: [(a, b, c, d, e)] -> ShowS #

(Show (f a b), Show (g a b)) => Show (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Methods

showsPrec :: Int -> Product f g a b -> ShowS #

show :: Product f g a b -> String #

showList :: [Product f g a b] -> ShowS #

(Show (p a b), Show (q a b)) => Show (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

showsPrec :: Int -> Sum p q a b -> ShowS #

show :: Sum p q a b -> String #

showList :: [Sum p q a b] -> ShowS #

(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 #

show :: (a, b, c, d, e, f) -> String #

showList :: [(a, b, c, d, e, f)] -> ShowS #

Show (f (p a b)) => Show (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

showsPrec :: Int -> Tannen f p a b -> ShowS #

show :: Tannen f p a b -> String #

showList :: [Tannen f p a b] -> ShowS #

(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 #

show :: (a, b, c, d, e, f, g) -> String #

showList :: [(a, b, c, d, e, f, g)] -> ShowS #

(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 #

show :: (a, b, c, d, e, f, g, h) -> String #

showList :: [(a, b, c, d, e, f, g, h)] -> ShowS #

Show (p (f a) (g b)) => Show (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

showsPrec :: Int -> Biff p f g a b -> ShowS #

show :: Biff p f g a b -> String #

showList :: [Biff p f g a b] -> ShowS #

(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 #

show :: (a, b, c, d, e, f, g, h, i) -> String #

showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS #

(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 #

show :: (a, b, c, d, e, f, g, h, i, j) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS #

(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 #

show :: (a, b, c, d, e, f, g, h, i, j, k) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS #

(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 #

show :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> ShowS #

(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 #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> ShowS #

(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 #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> ShowS #

(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 #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> ShowS #

class Ord a => Ix a where #

The Ix class is used to map a contiguous subrange of values in a type onto integers. It is used primarily for array indexing (see the array package).

The first argument (l,u) of each of these operations is a pair specifying the lower and upper bounds of a contiguous subrange of values.

An implementation is entitled to assume the following laws about these operations:

Minimal complete definition

range, (index | unsafeIndex), inRange

Methods

range :: (a, a) -> [a] #

The list of values in the subrange defined by a bounding pair.

index :: (a, a) -> a -> Int #

The position of a subscript in the subrange.

inRange :: (a, a) -> a -> Bool #

Returns True the given subscript lies in the range defined the bounding pair.

rangeSize :: (a, a) -> Int #

The size of the subrange defined by a bounding pair.

Instances

Instances details
Ix Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

range :: (Void, Void) -> [Void] #

index :: (Void, Void) -> Void -> Int #

unsafeIndex :: (Void, Void) -> Void -> Int #

inRange :: (Void, Void) -> Void -> Bool #

rangeSize :: (Void, Void) -> Int #

unsafeRangeSize :: (Void, Void) -> Int #

Ix CBool 
Instance details

Defined in Foreign.C.Types

Ix CChar 
Instance details

Defined in Foreign.C.Types

Ix CInt 
Instance details

Defined in Foreign.C.Types

Methods

range :: (CInt, CInt) -> [CInt] #

index :: (CInt, CInt) -> CInt -> Int #

unsafeIndex :: (CInt, CInt) -> CInt -> Int #

inRange :: (CInt, CInt) -> CInt -> Bool #

rangeSize :: (CInt, CInt) -> Int #

unsafeRangeSize :: (CInt, CInt) -> Int #

Ix CIntMax 
Instance details

Defined in Foreign.C.Types

Ix CIntPtr 
Instance details

Defined in Foreign.C.Types

Ix CLLong 
Instance details

Defined in Foreign.C.Types

Ix CLong 
Instance details

Defined in Foreign.C.Types

Ix CPtrdiff 
Instance details

Defined in Foreign.C.Types

Ix CSChar 
Instance details

Defined in Foreign.C.Types

Ix CShort 
Instance details

Defined in Foreign.C.Types

Ix CSigAtomic 
Instance details

Defined in Foreign.C.Types

Ix CSize 
Instance details

Defined in Foreign.C.Types

Ix CUChar 
Instance details

Defined in Foreign.C.Types

Ix CUInt 
Instance details

Defined in Foreign.C.Types

Ix CUIntMax 
Instance details

Defined in Foreign.C.Types

Ix CUIntPtr 
Instance details

Defined in Foreign.C.Types

Ix CULLong 
Instance details

Defined in Foreign.C.Types

Ix CULong 
Instance details

Defined in Foreign.C.Types

Ix CUShort 
Instance details

Defined in Foreign.C.Types

Ix CWchar 
Instance details

Defined in Foreign.C.Types

Ix IntPtr 
Instance details

Defined in Foreign.Ptr

Ix WordPtr 
Instance details

Defined in Foreign.Ptr

Ix Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ix DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ix SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ix SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ix SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Ix IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ix Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

range :: (Int8, Int8) -> [Int8] #

index :: (Int8, Int8) -> Int8 -> Int #

unsafeIndex :: (Int8, Int8) -> Int8 -> Int #

inRange :: (Int8, Int8) -> Int8 -> Bool #

rangeSize :: (Int8, Int8) -> Int #

unsafeRangeSize :: (Int8, Int8) -> Int #

Ix GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Ix Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ix CBlkCnt 
Instance details

Defined in System.Posix.Types

Ix CBlkSize 
Instance details

Defined in System.Posix.Types

Ix CClockId 
Instance details

Defined in System.Posix.Types

Ix CDev 
Instance details

Defined in System.Posix.Types

Methods

range :: (CDev, CDev) -> [CDev] #

index :: (CDev, CDev) -> CDev -> Int #

unsafeIndex :: (CDev, CDev) -> CDev -> Int #

inRange :: (CDev, CDev) -> CDev -> Bool #

rangeSize :: (CDev, CDev) -> Int #

unsafeRangeSize :: (CDev, CDev) -> Int #

Ix CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Ix CFsFilCnt 
Instance details

Defined in System.Posix.Types

Ix CGid 
Instance details

Defined in System.Posix.Types

Methods

range :: (CGid, CGid) -> [CGid] #

index :: (CGid, CGid) -> CGid -> Int #

unsafeIndex :: (CGid, CGid) -> CGid -> Int #

inRange :: (CGid, CGid) -> CGid -> Bool #

rangeSize :: (CGid, CGid) -> Int #

unsafeRangeSize :: (CGid, CGid) -> Int #

Ix CId 
Instance details

Defined in System.Posix.Types

Methods

range :: (CId, CId) -> [CId] #

index :: (CId, CId) -> CId -> Int #

unsafeIndex :: (CId, CId) -> CId -> Int #

inRange :: (CId, CId) -> CId -> Bool #

rangeSize :: (CId, CId) -> Int #

unsafeRangeSize :: (CId, CId) -> Int #

Ix CIno 
Instance details

Defined in System.Posix.Types

Methods

range :: (CIno, CIno) -> [CIno] #

index :: (CIno, CIno) -> CIno -> Int #

unsafeIndex :: (CIno, CIno) -> CIno -> Int #

inRange :: (CIno, CIno) -> CIno -> Bool #

rangeSize :: (CIno, CIno) -> Int #

unsafeRangeSize :: (CIno, CIno) -> Int #

Ix CKey 
Instance details

Defined in System.Posix.Types

Methods

range :: (CKey, CKey) -> [CKey] #

index :: (CKey, CKey) -> CKey -> Int #

unsafeIndex :: (CKey, CKey) -> CKey -> Int #

inRange :: (CKey, CKey) -> CKey -> Bool #

rangeSize :: (CKey, CKey) -> Int #

unsafeRangeSize :: (CKey, CKey) -> Int #

Ix CMode 
Instance details

Defined in System.Posix.Types

Ix CNfds 
Instance details

Defined in System.Posix.Types

Ix CNlink 
Instance details

Defined in System.Posix.Types

Ix COff 
Instance details

Defined in System.Posix.Types

Methods

range :: (COff, COff) -> [COff] #

index :: (COff, COff) -> COff -> Int #

unsafeIndex :: (COff, COff) -> COff -> Int #

inRange :: (COff, COff) -> COff -> Bool #

rangeSize :: (COff, COff) -> Int #

unsafeRangeSize :: (COff, COff) -> Int #

Ix CPid 
Instance details

Defined in System.Posix.Types

Methods

range :: (CPid, CPid) -> [CPid] #

index :: (CPid, CPid) -> CPid -> Int #

unsafeIndex :: (CPid, CPid) -> CPid -> Int #

inRange :: (CPid, CPid) -> CPid -> Bool #

rangeSize :: (CPid, CPid) -> Int #

unsafeRangeSize :: (CPid, CPid) -> Int #

Ix CRLim 
Instance details

Defined in System.Posix.Types

Ix CSocklen 
Instance details

Defined in System.Posix.Types

Ix CSsize 
Instance details

Defined in System.Posix.Types

Ix CTcflag 
Instance details

Defined in System.Posix.Types

Ix CUid 
Instance details

Defined in System.Posix.Types

Methods

range :: (CUid, CUid) -> [CUid] #

index :: (CUid, CUid) -> CUid -> Int #

unsafeIndex :: (CUid, CUid) -> CUid -> Int #

inRange :: (CUid, CUid) -> CUid -> Bool #

rangeSize :: (CUid, CUid) -> Int #

unsafeRangeSize :: (CUid, CUid) -> Int #

Ix Fd 
Instance details

Defined in System.Posix.Types

Methods

range :: (Fd, Fd) -> [Fd] #

index :: (Fd, Fd) -> Fd -> Int #

unsafeIndex :: (Fd, Fd) -> Fd -> Int #

inRange :: (Fd, Fd) -> Fd -> Bool #

rangeSize :: (Fd, Fd) -> Int #

unsafeRangeSize :: (Fd, Fd) -> Int #

Ix Ordering

Since: base-2.1

Instance details

Defined in GHC.Ix

Ix Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

range :: (Day, Day) -> [Day] #

index :: (Day, Day) -> Day -> Int #

unsafeIndex :: (Day, Day) -> Day -> Int #

inRange :: (Day, Day) -> Day -> Bool #

rangeSize :: (Day, Day) -> Int #

unsafeRangeSize :: (Day, Day) -> Int #

Ix DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Ix Integer

Since: base-2.1

Instance details

Defined in GHC.Ix

Ix Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Ix

Ix ()

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: ((), ()) -> [()] #

index :: ((), ()) -> () -> Int #

unsafeIndex :: ((), ()) -> () -> Int #

inRange :: ((), ()) -> () -> Bool #

rangeSize :: ((), ()) -> Int #

unsafeRangeSize :: ((), ()) -> Int #

Ix Bool

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: (Bool, Bool) -> [Bool] #

index :: (Bool, Bool) -> Bool -> Int #

unsafeIndex :: (Bool, Bool) -> Bool -> Int #

inRange :: (Bool, Bool) -> Bool -> Bool #

rangeSize :: (Bool, Bool) -> Int #

unsafeRangeSize :: (Bool, Bool) -> Int #

Ix Char

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: (Char, Char) -> [Char] #

index :: (Char, Char) -> Char -> Int #

unsafeIndex :: (Char, Char) -> Char -> Int #

inRange :: (Char, Char) -> Char -> Bool #

rangeSize :: (Char, Char) -> Int #

unsafeRangeSize :: (Char, Char) -> Int #

Ix Int

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: (Int, Int) -> [Int] #

index :: (Int, Int) -> Int -> Int #

unsafeIndex :: (Int, Int) -> Int -> Int #

inRange :: (Int, Int) -> Int -> Bool #

rangeSize :: (Int, Int) -> Int #

unsafeRangeSize :: (Int, Int) -> Int #

Ix Word

Since: base-4.6.0.0

Instance details

Defined in GHC.Ix

Methods

range :: (Word, Word) -> [Word] #

index :: (Word, Word) -> Word -> Int #

unsafeIndex :: (Word, Word) -> Word -> Int #

inRange :: (Word, Word) -> Word -> Bool #

rangeSize :: (Word, Word) -> Int #

unsafeRangeSize :: (Word, Word) -> Int #

Ix a => Ix (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Ix a => Ix (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

range :: (Down a, Down a) -> [Down a] #

index :: (Down a, Down a) -> Down a -> Int #

unsafeIndex :: (Down a, Down a) -> Down a -> Int #

inRange :: (Down a, Down a) -> Down a -> Bool #

rangeSize :: (Down a, Down a) -> Int #

unsafeRangeSize :: (Down a, Down a) -> Int #

Ix a => Ix (a) 
Instance details

Defined in GHC.Ix

Methods

range :: ((a), (a)) -> [(a)] #

index :: ((a), (a)) -> (a) -> Int #

unsafeIndex :: ((a), (a)) -> (a) -> Int #

inRange :: ((a), (a)) -> (a) -> Bool #

rangeSize :: ((a), (a)) -> Int #

unsafeRangeSize :: ((a), (a)) -> Int #

Ix (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

range :: (Proxy s, Proxy s) -> [Proxy s] #

index :: (Proxy s, Proxy s) -> Proxy s -> Int #

unsafeIndex :: (Proxy s, Proxy s) -> Proxy s -> Int #

inRange :: (Proxy s, Proxy s) -> Proxy s -> Bool #

rangeSize :: (Proxy s, Proxy s) -> Int #

unsafeRangeSize :: (Proxy s, Proxy s) -> Int #

(Ix a, Ix b) => Ix (a, b)

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: ((a, b), (a, b)) -> [(a, b)] #

index :: ((a, b), (a, b)) -> (a, b) -> Int #

unsafeIndex :: ((a, b), (a, b)) -> (a, b) -> Int #

inRange :: ((a, b), (a, b)) -> (a, b) -> Bool #

rangeSize :: ((a, b), (a, b)) -> Int #

unsafeRangeSize :: ((a, b), (a, b)) -> Int #

Ix a => Ix (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

range :: (Const a b, Const a b) -> [Const a b] #

index :: (Const a b, Const a b) -> Const a b -> Int #

unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int #

inRange :: (Const a b, Const a b) -> Const a b -> Bool #

rangeSize :: (Const a b, Const a b) -> Int #

unsafeRangeSize :: (Const a b, Const a b) -> Int #

Ix b => Ix (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

range :: (Tagged s b, Tagged s b) -> [Tagged s b] #

index :: (Tagged s b, Tagged s b) -> Tagged s b -> Int #

unsafeIndex :: (Tagged s b, Tagged s b) -> Tagged s b -> Int #

inRange :: (Tagged s b, Tagged s b) -> Tagged s b -> Bool #

rangeSize :: (Tagged s b, Tagged s b) -> Int #

unsafeRangeSize :: (Tagged s b, Tagged s b) -> Int #

(Ix a1, Ix a2, Ix a3) => Ix (a1, a2, a3)

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3), (a1, a2, a3)) -> [(a1, a2, a3)] #

index :: ((a1, a2, a3), (a1, a2, a3)) -> (a1, a2, a3) -> Int #

unsafeIndex :: ((a1, a2, a3), (a1, a2, a3)) -> (a1, a2, a3) -> Int #

inRange :: ((a1, a2, a3), (a1, a2, a3)) -> (a1, a2, a3) -> Bool #

rangeSize :: ((a1, a2, a3), (a1, a2, a3)) -> Int #

unsafeRangeSize :: ((a1, a2, a3), (a1, a2, a3)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4) => Ix (a1, a2, a3, a4)

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4), (a1, a2, a3, a4)) -> [(a1, a2, a3, a4)] #

index :: ((a1, a2, a3, a4), (a1, a2, a3, a4)) -> (a1, a2, a3, a4) -> Int #

unsafeIndex :: ((a1, a2, a3, a4), (a1, a2, a3, a4)) -> (a1, a2, a3, a4) -> Int #

inRange :: ((a1, a2, a3, a4), (a1, a2, a3, a4)) -> (a1, a2, a3, a4) -> Bool #

rangeSize :: ((a1, a2, a3, a4), (a1, a2, a3, a4)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4), (a1, a2, a3, a4)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5) => Ix (a1, a2, a3, a4, a5)

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5), (a1, a2, a3, a4, a5)) -> [(a1, a2, a3, a4, a5)] #

index :: ((a1, a2, a3, a4, a5), (a1, a2, a3, a4, a5)) -> (a1, a2, a3, a4, a5) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5), (a1, a2, a3, a4, a5)) -> (a1, a2, a3, a4, a5) -> Int #

inRange :: ((a1, a2, a3, a4, a5), (a1, a2, a3, a4, a5)) -> (a1, a2, a3, a4, a5) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5), (a1, a2, a3, a4, a5)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5), (a1, a2, a3, a4, a5)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6) => Ix (a1, a2, a3, a4, a5, a6)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6), (a1, a2, a3, a4, a5, a6)) -> [(a1, a2, a3, a4, a5, a6)] #

index :: ((a1, a2, a3, a4, a5, a6), (a1, a2, a3, a4, a5, a6)) -> (a1, a2, a3, a4, a5, a6) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6), (a1, a2, a3, a4, a5, a6)) -> (a1, a2, a3, a4, a5, a6) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6), (a1, a2, a3, a4, a5, a6)) -> (a1, a2, a3, a4, a5, a6) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6), (a1, a2, a3, a4, a5, a6)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6), (a1, a2, a3, a4, a5, a6)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7) => Ix (a1, a2, a3, a4, a5, a6, a7)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6, a7), (a1, a2, a3, a4, a5, a6, a7)) -> [(a1, a2, a3, a4, a5, a6, a7)] #

index :: ((a1, a2, a3, a4, a5, a6, a7), (a1, a2, a3, a4, a5, a6, a7)) -> (a1, a2, a3, a4, a5, a6, a7) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7), (a1, a2, a3, a4, a5, a6, a7)) -> (a1, a2, a3, a4, a5, a6, a7) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6, a7), (a1, a2, a3, a4, a5, a6, a7)) -> (a1, a2, a3, a4, a5, a6, a7) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6, a7), (a1, a2, a3, a4, a5, a6, a7)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6, a7), (a1, a2, a3, a4, a5, a6, a7)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8) => Ix (a1, a2, a3, a4, a5, a6, a7, a8)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6, a7, a8), (a1, a2, a3, a4, a5, a6, a7, a8)) -> [(a1, a2, a3, a4, a5, a6, a7, a8)] #

index :: ((a1, a2, a3, a4, a5, a6, a7, a8), (a1, a2, a3, a4, a5, a6, a7, a8)) -> (a1, a2, a3, a4, a5, a6, a7, a8) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8), (a1, a2, a3, a4, a5, a6, a7, a8)) -> (a1, a2, a3, a4, a5, a6, a7, a8) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8), (a1, a2, a3, a4, a5, a6, a7, a8)) -> (a1, a2, a3, a4, a5, a6, a7, a8) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8), (a1, a2, a3, a4, a5, a6, a7, a8)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8), (a1, a2, a3, a4, a5, a6, a7, a8)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9) => Ix (a1, a2, a3, a4, a5, a6, a7, a8, a9)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9), (a1, a2, a3, a4, a5, a6, a7, a8, a9)) -> [(a1, a2, a3, a4, a5, a6, a7, a8, a9)] #

index :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9), (a1, a2, a3, a4, a5, a6, a7, a8, a9)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9), (a1, a2, a3, a4, a5, a6, a7, a8, a9)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9), (a1, a2, a3, a4, a5, a6, a7, a8, a9)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9), (a1, a2, a3, a4, a5, a6, a7, a8, a9)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9), (a1, a2, a3, a4, a5, a6, a7, a8, a9)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9, Ix aA) => Ix (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA)) -> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA)] #

index :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9, Ix aA, Ix aB) => Ix (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB)) -> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB)] #

index :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9, Ix aA, Ix aB, Ix aC) => Ix (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC)) -> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC)] #

index :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9, Ix aA, Ix aB, Ix aC, Ix aD) => Ix (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD)) -> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD)] #

index :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9, Ix aA, Ix aB, Ix aC, Ix aD, Ix aE) => Ix (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE)) -> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE)] #

index :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE)) -> Int #

(Ix a1, Ix a2, Ix a3, Ix a4, Ix a5, Ix a6, Ix a7, Ix a8, Ix a9, Ix aA, Ix aB, Ix aC, Ix aD, Ix aE, Ix aF) => Ix (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)

Since: base-4.15.0.0

Instance details

Defined in GHC.Ix

Methods

range :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)) -> [(a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)] #

index :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF) -> Int #

unsafeIndex :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF) -> Int #

inRange :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)) -> (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF) -> Bool #

rangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)) -> Int #

unsafeRangeSize :: ((a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF), (a1, a2, a3, a4, a5, a6, a7, a8, a9, aA, aB, aC, aD, aE, aF)) -> Int #

class Typeable (a :: k) #

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#

class Monad m => MonadFix (m :: Type -> Type) where #

Monads having fixed points with a 'knot-tying' semantics. Instances of MonadFix should satisfy the following laws:

Purity
mfix (return . h) = return (fix h)
Left shrinking (or Tightening)
mfix (\x -> a >>= \y -> f x y) = a >>= \y -> mfix (\x -> f x y)
Sliding
mfix (liftM h . f) = liftM h (mfix (f . h)), for strict h.
Nesting
mfix (\x -> mfix (\y -> f x y)) = mfix (\x -> f x x)

This class is used in the translation of the recursive do notation supported by GHC and Hugs.

Methods

mfix :: (a -> m a) -> m a #

The fixed point of a monadic computation. mfix f executes the action f only once, with the eventual output fed back as the input. Hence f should not be strict, for then mfix f would diverge.

Instances

Instances details
MonadFix Complex

Since: base-4.15.0.0

Instance details

Defined in Data.Complex

Methods

mfix :: (a -> Complex a) -> Complex a #

MonadFix Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mfix :: (a -> Identity a) -> Identity a #

MonadFix First

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> First a) -> First a #

MonadFix Last

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Last a) -> Last a #

MonadFix Down

Since: base-4.12.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Down a) -> Down a #

MonadFix First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> First a) -> First a #

MonadFix Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Last a) -> Last a #

MonadFix Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Max a) -> Max a #

MonadFix Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Min a) -> Min a #

MonadFix Dual

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Dual a) -> Dual a #

MonadFix Product

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Product a) -> Product a #

MonadFix Sum

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Sum a) -> Sum a #

MonadFix Par1

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Par1 a) -> Par1 a #

MonadFix Seq

Since: containers-0.5.11

Instance details

Defined in Data.Sequence.Internal

Methods

mfix :: (a -> Seq a) -> Seq a #

MonadFix Tree

Since: containers-0.5.11

Instance details

Defined in Data.Tree

Methods

mfix :: (a -> Tree a) -> Tree a #

MonadFix IO

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> IO a) -> IO a #

MonadFix Array 
Instance details

Defined in Data.Primitive.Array

Methods

mfix :: (a -> Array a) -> Array a #

MonadFix SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

mfix :: (a -> SmallArray a) -> SmallArray a #

MonadFix Q

If the function passed to mfix inspects its argument, the resulting action will throw a FixIOException.

Since: template-haskell-2.17.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

mfix :: (a -> Q a) -> Q a #

MonadFix Vector

This instance has the same semantics as the one for lists.

Since: vector-0.12.2.0

Instance details

Defined in Data.Vector

Methods

mfix :: (a -> Vector a) -> Vector a #

MonadFix NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> NonEmpty a) -> NonEmpty a #

MonadFix Maybe

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Maybe a) -> Maybe a #

MonadFix Solo

Since: base-4.15

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Solo a) -> Solo a #

MonadFix []

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> [a]) -> [a] #

MonadFix (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

mfix :: (a -> ST s a) -> ST s a #

MonadFix (Either e)

Since: base-4.3.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Either e a) -> Either e a #

MonadFix (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> ST s a) -> ST s a #

Functor f => MonadFix (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

mfix :: (a -> Free f a) -> Free f a #

MonadFix m => MonadFix (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mfix :: (a -> MaybeT m a) -> MaybeT m a #

MonadFix f => MonadFix (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Ap f a) -> Ap f a #

MonadFix f => MonadFix (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Alt f a) -> Alt f a #

MonadFix f => MonadFix (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Rec1 f a) -> Rec1 f a #

(MonadFix m, Error e) => MonadFix (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

mfix :: (a -> ErrorT e m a) -> ErrorT e m a #

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 #

MonadFix m => MonadFix (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mfix :: (a -> IdentityT m a) -> IdentityT m a #

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 #

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 #

MonadFix m => MonadFix (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

mfix :: (a -> StateT s m a) -> StateT s m a #

(Monoid w, MonadFix m) => MonadFix (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

mfix :: (a -> WriterT w m a) -> WriterT w m a #

(Monoid w, MonadFix m) => MonadFix (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

mfix :: (a -> WriterT w m a) -> WriterT w m a #

(MonadFix f, MonadFix g) => MonadFix (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

mfix :: (a -> Product f g a) -> Product f g a #

(MonadFix f, MonadFix g) => MonadFix (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> (f :*: g) a) -> (f :*: g) a #

MonadFix ((->) r)

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> r -> a) -> r -> a #

MonadFix f => MonadFix (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> M1 i c f a) -> M1 i c f a #

(Monoid w, MonadFix m) => MonadFix (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

mfix :: (a -> RWST r w s m a) -> RWST r w s m a #

(Monoid w, MonadFix m) => MonadFix (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

mfix :: (a -> RWST r w s m a) -> RWST r w s m a #

class Monad m => MonadFail (m :: Type -> Type) where #

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

Methods

fail :: String -> m a #

Instances

Instances details
MonadFail P

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> P a #

MonadFail ReadP

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> ReadP a #

MonadFail ReadPrec

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

fail :: String -> ReadPrec a #

MonadFail DList 
Instance details

Defined in Data.DList.Internal

Methods

fail :: String -> DList a #

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> IO a #

MonadFail Array 
Instance details

Defined in Data.Primitive.Array

Methods

fail :: String -> Array a #

MonadFail SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fail :: String -> SmallArray a #

MonadFail Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fail :: String -> Q a #

MonadFail Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector

Methods

fail :: String -> Vector a #

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> Maybe a #

MonadFail []

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> [a] #

MonadFail (ST s)

Since: base-4.10

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

fail :: String -> ST s a #

MonadFail (ST s)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

fail :: String -> ST s a #

Monad m => MonadFail (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fail :: String -> MaybeT m a #

MonadFail f => MonadFail (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fail :: String -> Ap f a #

(Functor f, MonadFail m) => MonadFail (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fail :: String -> FreeT f m a #

(Monad m, Error e) => MonadFail (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

fail :: String -> ErrorT e m a #

MonadFail m => MonadFail (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fail :: String -> ExceptT e m a #

MonadFail m => MonadFail (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fail :: String -> IdentityT m a #

MonadFail m => MonadFail (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fail :: String -> ReaderT r m a #

MonadFail m => MonadFail (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

fail :: String -> StateT s m a #

MonadFail m => MonadFail (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

fail :: String -> StateT s m a #

(Monoid w, MonadFail m) => MonadFail (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fail :: String -> WriterT w m a #

(Monoid w, MonadFail m) => MonadFail (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

fail :: String -> WriterT w m a #

MonadFail m => MonadFail (Reverse m) 
Instance details

Defined in Data.Functor.Reverse

Methods

fail :: String -> Reverse m a #

MonadFail m => MonadFail (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

fail :: String -> ContT r m a #

(Monoid w, MonadFail m) => MonadFail (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

fail :: String -> RWST r w s m a #

(Monoid w, MonadFail m) => MonadFail (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

fail :: String -> RWST r w s m a #

class IsString a where #

Class for string-like datastructures; used by the overloaded string extension (-XOverloadedStrings in GHC).

Methods

fromString :: String -> a #

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 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 Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

fromString :: String -> Doc #

IsString Builder 
Instance details

Defined in Data.Text.Internal.Builder

Methods

fromString :: String -> Builder #

IsString a => IsString (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Identity a #

a ~ Char => IsString (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

fromString :: String -> Seq a #

a ~ Char => IsString (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

fromString :: String -> DList a #

(IsString a, Hashable a) => IsString (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

fromString :: String -> Hashed a #

IsString (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fromString :: String -> Doc a #

a ~ Char => IsString [a]

(a ~ Char) context was introduced in 4.9.0.0

Since: base-2.1

Instance details

Defined in Data.String

Methods

fromString :: String -> [a] #

IsString a => IsString (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Const a b #

IsString a => IsString (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

fromString :: String -> Tagged s a #

class Functor f => Applicative (f :: Type -> Type) where #

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 #

Lift a value.

(<*>) :: f (a -> b) -> f a -> f b infixl 4 #

Sequential application.

A few functors support an implementation of <*> that is more efficient than the default one.

Example

Expand

Used in combination with (<$>), (<*>) can be used to build a record.

>>> data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}
>>> produceFoo :: Applicative f => f Foo
>>> produceBar :: Applicative f => f Bar
>>> produceBaz :: Applicative f => f Baz
>>> mkState :: Applicative f => f MyState
>>> mkState = MyState <$> produceFoo <*> produceBar <*> produceBaz

liftA2 :: (a -> b -> c) -> f a -> f b -> f c #

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.

Example

Expand
>>> liftA2 (,) (Just 3) (Just 5)
Just (3,5)

(*>) :: f a -> f b -> f b infixl 4 #

Sequence actions, discarding the value of the first argument.

Examples

Expand

If used in conjunction with the Applicative instance for Maybe, you can chain Maybe computations, with a possible "early return" in case of Nothing.

>>> Just 2 *> Just 3
Just 3
>>> Nothing *> Just 3
Nothing

Of course a more interesting use case would be to have effectful computations instead of just returning pure values.

>>> import Data.Char
>>> import Text.ParserCombinators.ReadP
>>> let p = string "my name is " *> munch1 isAlpha <* eof
>>> readP_to_S p "my name is Simon"
[("Simon","")]

(<*) :: f a -> f b -> f a infixl 4 #

Sequence actions, discarding the value of the second argument.

Instances

Instances details
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

Methods

pure :: a -> ZipList a #

(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

(*>) :: ZipList a -> ZipList b -> ZipList b #

(<*) :: ZipList a -> ZipList b -> ZipList a #

Applicative Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

pure :: a -> Complex a #

(<*>) :: Complex (a -> b) -> Complex a -> Complex b #

liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

(*>) :: Complex a -> Complex b -> Complex b #

(<*) :: Complex a -> Complex b -> Complex a #

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

pure :: a -> Identity a #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b #

liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

(*>) :: Identity a -> Identity b -> Identity b #

(<*) :: Identity a -> Identity b -> Identity a #

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

pure :: a -> Down a #

(<*>) :: Down (a -> b) -> Down a -> Down b #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

(*>) :: Down a -> Down b -> Down b #

(<*) :: Down a -> Down b -> Down a #

Applicative First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Max a #

(<*>) :: Max (a -> b) -> Max a -> Max b #

liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c #

(*>) :: Max a -> Max b -> Max b #

(<*) :: Max a -> Max b -> Max a #

Applicative Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Min a #

(<*>) :: Min (a -> b) -> Min a -> Min b #

liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c #

(*>) :: Min a -> Min b -> Min b #

(<*) :: Min a -> Min b -> Min a #

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Dual a #

(<*>) :: Dual (a -> b) -> Dual a -> Dual b #

liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

(*>) :: Dual a -> Dual b -> Dual b #

(<*) :: Dual a -> Dual b -> Dual a #

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Product a #

(<*>) :: Product (a -> b) -> Product a -> Product b #

liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c #

(*>) :: Product a -> Product b -> Product b #

(<*) :: Product a -> Product b -> Product a #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Sum a #

(<*>) :: Sum (a -> b) -> Sum a -> Sum b #

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

(*>) :: Sum a -> Sum b -> Sum b #

(<*) :: Sum a -> Sum b -> Sum a #

Applicative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

pure :: a -> STM a #

(<*>) :: STM (a -> b) -> STM a -> STM b #

liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c #

(*>) :: STM a -> STM b -> STM b #

(<*) :: STM a -> STM b -> STM a #

Applicative NoIO

Since: base-4.8.0.0

Instance details

Defined in GHC.GHCi

Methods

pure :: a -> NoIO a #

(<*>) :: NoIO (a -> b) -> NoIO a -> NoIO b #

liftA2 :: (a -> b -> c) -> NoIO a -> NoIO b -> NoIO c #

(*>) :: NoIO a -> NoIO b -> NoIO b #

(<*) :: NoIO a -> NoIO b -> NoIO a #

Applicative Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Par1 a #

(<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b #

liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c #

(*>) :: Par1 a -> Par1 b -> Par1 b #

(<*) :: Par1 a -> Par1 b -> Par1 a #

Applicative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> P a #

(<*>) :: P (a -> b) -> P a -> P b #

liftA2 :: (a -> b -> c) -> P a -> P b -> P c #

(*>) :: P a -> P b -> P b #

(<*) :: P a -> P b -> P a #

Applicative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> ReadP a #

(<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b #

liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c #

(*>) :: ReadP a -> ReadP b -> ReadP b #

(<*) :: ReadP a -> ReadP b -> ReadP a #

Applicative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

pure :: a -> ReadPrec a #

(<*>) :: ReadPrec (a -> b) -> ReadPrec a -> ReadPrec b #

liftA2 :: (a -> b -> c) -> ReadPrec a -> ReadPrec b -> ReadPrec c #

(*>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

(<*) :: ReadPrec a -> ReadPrec b -> ReadPrec a #

Applicative Put 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

pure :: a -> Put a #

(<*>) :: Put (a -> b) -> Put a -> Put b #

liftA2 :: (a -> b -> c) -> Put a -> Put b -> Put c #

(*>) :: Put a -> Put b -> Put b #

(<*) :: Put a -> Put b -> Put a #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

(*>) :: Seq a -> Seq b -> Seq b #

(<*) :: Seq a -> Seq b -> Seq a #

Applicative Tree 
Instance details

Defined in Data.Tree

Methods

pure :: a -> Tree a #

(<*>) :: Tree (a -> b) -> Tree a -> Tree b #

liftA2 :: (a -> b -> c) -> Tree a -> Tree b -> Tree c #

(*>) :: Tree a -> Tree b -> Tree b #

(<*) :: Tree a -> Tree b -> Tree a #

Applicative DList 
Instance details

Defined in Data.DList.Internal

Methods

pure :: a -> DList a #

(<*>) :: DList (a -> b) -> DList a -> DList b #

liftA2 :: (a -> b -> c) -> DList a -> DList b -> DList c #

(*>) :: DList a -> DList b -> DList b #

(<*) :: DList a -> DList b -> DList a #

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> IO a #

(<*>) :: IO (a -> b) -> IO a -> IO b #

liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c #

(*>) :: IO a -> IO b -> IO b #

(<*) :: IO a -> IO b -> IO a #

Applicative Array 
Instance details

Defined in Data.Primitive.Array

Methods

pure :: a -> Array a #

(<*>) :: Array (a -> b) -> Array a -> Array b #

liftA2 :: (a -> b -> c) -> Array a -> Array b -> Array c #

(*>) :: Array a -> Array b -> Array b #

(<*) :: Array a -> Array b -> Array a #

Applicative SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

pure :: a -> SmallArray a #

(<*>) :: SmallArray (a -> b) -> SmallArray a -> SmallArray b #

liftA2 :: (a -> b -> c) -> SmallArray a -> SmallArray b -> SmallArray c #

(*>) :: SmallArray a -> SmallArray b -> SmallArray b #

(<*) :: SmallArray a -> SmallArray b -> SmallArray a #

Applicative Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

pure :: a -> Q a #

(<*>) :: Q (a -> b) -> Q a -> Q b #

liftA2 :: (a -> b -> c) -> Q a -> Q b -> Q c #

(*>) :: Q a -> Q b -> Q b #

(<*) :: Q a -> Q b -> Q a #

Applicative Vector 
Instance details

Defined in Data.Vector

Methods

pure :: a -> Vector a #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

(*>) :: Vector a -> Vector b -> Vector b #

(<*) :: Vector a -> Vector b -> Vector a #

Applicative Id 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

pure :: a -> Id a #

(<*>) :: Id (a -> b) -> Id a -> Id b #

liftA2 :: (a -> b -> c) -> Id a -> Id b -> Id c #

(*>) :: Id a -> Id b -> Id b #

(<*) :: Id a -> Id b -> Id a #

Applicative Box 
Instance details

Defined in Data.Stream.Monadic

Methods

pure :: a -> Box a #

(<*>) :: Box (a -> b) -> Box a -> Box b #

liftA2 :: (a -> b -> c) -> Box a -> Box b -> Box c #

(*>) :: Box a -> Box b -> Box b #

(<*) :: Box a -> Box b -> Box a #

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a -> NonEmpty a #

(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> Maybe a #

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

(*>) :: Maybe a -> Maybe b -> Maybe b #

(<*) :: Maybe a -> Maybe b -> Maybe a #

Applicative Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

pure :: a -> Solo a #

(<*>) :: Solo (a -> b) -> Solo a -> Solo b #

liftA2 :: (a -> b -> c) -> Solo a -> Solo b -> Solo c #

(*>) :: Solo a -> Solo b -> Solo b #

(<*) :: Solo a -> Solo b -> Solo a #

Applicative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> [a] #

(<*>) :: [a -> b] -> [a] -> [b] #

liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] #

(*>) :: [a] -> [b] -> [b] #

(<*) :: [a] -> [b] -> [a] #

Representable f => Applicative (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

pure :: a -> Co f a #

(<*>) :: Co f (a -> b) -> Co f a -> Co f b #

liftA2 :: (a -> b -> c) -> Co f a -> Co f b -> Co f c #

(*>) :: Co f a -> Co f b -> Co f b #

(<*) :: Co f a -> Co f b -> Co f a #

Monad m => Applicative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

Arrow a => Applicative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> ArrowMonad a a0 #

(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c #

(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Applicative (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

pure :: a -> ST s a #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c #

(*>) :: ST s a -> ST s b -> ST s b #

(<*) :: ST s a -> ST s b -> ST s a #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Applicative (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

pure :: a -> Proxy a #

(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b #

liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

(*>) :: Proxy a -> Proxy b -> Proxy b #

(<*) :: Proxy a -> Proxy b -> Proxy a #

Applicative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> U1 a #

(<*>) :: U1 (a -> b) -> U1 a -> U1 b #

liftA2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c #

(*>) :: U1 a -> U1 b -> U1 b #

(<*) :: U1 a -> U1 b -> U1 a #

Applicative (ST s)

Since: base-4.4.0.0

Instance details

Defined in GHC.ST

Methods

pure :: a -> ST s a #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c #

(*>) :: ST s a -> ST s b -> ST s b #

(<*) :: ST s a -> ST s b -> ST s a #

Applicative (SetM s) 
Instance details

Defined in Data.Graph

Methods

pure :: a -> SetM s a #

(<*>) :: SetM s (a -> b) -> SetM s a -> SetM s b #

liftA2 :: (a -> b -> c) -> SetM s a -> SetM s b -> SetM s c #

(*>) :: SetM s a -> SetM s b -> SetM s b #

(<*) :: SetM s a -> SetM s b -> SetM s a #

Semigroup e => Applicative (Validation e) 
Instance details

Defined in Data.Either.Validation

Methods

pure :: a -> Validation e a #

(<*>) :: Validation e (a -> b) -> Validation e a -> Validation e b #

liftA2 :: (a -> b -> c) -> Validation e a -> Validation e b -> Validation e c #

(*>) :: Validation e a -> Validation e b -> Validation e b #

(<*) :: Validation e a -> Validation e b -> Validation e a #

Alternative f => Applicative (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

pure :: a -> Cofree f a #

(<*>) :: Cofree f (a -> b) -> Cofree f a -> Cofree f b #

liftA2 :: (a -> b -> c) -> Cofree f a -> Cofree f b -> Cofree f c #

(*>) :: Cofree f a -> Cofree f b -> Cofree f b #

(<*) :: Cofree f a -> Cofree f b -> Cofree f a #

Functor f => Applicative (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

pure :: a -> Free f a #

(<*>) :: Free f (a -> b) -> Free f a -> Free f b #

liftA2 :: (a -> b -> c) -> Free f a -> Free f b -> Free f c #

(*>) :: Free f a -> Free f b -> Free f b #

(<*) :: Free f a -> Free f b -> Free f a #

Applicative (StateL s) 
Instance details

Defined in Data.Key

Methods

pure :: a -> StateL s a #

(<*>) :: StateL s (a -> b) -> StateL s a -> StateL s b #

liftA2 :: (a -> b -> c) -> StateL s a -> StateL s b -> StateL s c #

(*>) :: StateL s a -> StateL s b -> StateL s b #

(<*) :: StateL s a -> StateL s b -> StateL s a #

Applicative (StateR s) 
Instance details

Defined in Data.Key

Methods

pure :: a -> StateR s a #

(<*>) :: StateR s (a -> b) -> StateR s a -> StateR s b #

liftA2 :: (a -> b -> c) -> StateR s a -> StateR s b -> StateR s c #

(*>) :: StateR s a -> StateR s b -> StateR s b #

(<*) :: StateR s a -> StateR s b -> StateR s a #

Monoid m => Applicative (Over m) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> Over m a #

(<*>) :: Over m (a -> b) -> Over m a -> Over m b #

liftA2 :: (a -> b -> c) -> Over m a -> Over m b -> Over m c #

(*>) :: Over m a -> Over m b -> Over m b #

(<*) :: Over m a -> Over m b -> Over m a #

Applicative f => Applicative (SelectA f) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> SelectA f a #

(<*>) :: SelectA f (a -> b) -> SelectA f a -> SelectA f b #

liftA2 :: (a -> b -> c) -> SelectA f a -> SelectA f b -> SelectA f c #

(*>) :: SelectA f a -> SelectA f b -> SelectA f b #

(<*) :: SelectA f a -> SelectA f b -> SelectA f a #

Applicative f => Applicative (SelectM f) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> SelectM f a #

(<*>) :: SelectM f (a -> b) -> SelectM f a -> SelectM f b #

liftA2 :: (a -> b -> c) -> SelectM f a -> SelectM f b -> SelectM f c #

(*>) :: SelectM f a -> SelectM f b -> SelectM f b #

(<*) :: SelectM f a -> SelectM f b -> SelectM f a #

Monoid m => Applicative (Under m) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> Under m a #

(<*>) :: Under m (a -> b) -> Under m a -> Under m b #

liftA2 :: (a -> b -> c) -> Under m a -> Under m b -> Under m c #

(*>) :: Under m a -> Under m b -> Under m b #

(<*) :: Under m a -> Under m b -> Under m a #

Semigroup e => Applicative (Validation e) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> Validation e a #

(<*>) :: Validation e (a -> b) -> Validation e a -> Validation e b #

liftA2 :: (a -> b -> c) -> Validation e a -> Validation e b -> Validation e c #

(*>) :: Validation e a -> Validation e b -> Validation e b #

(<*) :: Validation e a -> Validation e b -> Validation e a #

Applicative (Select f) 
Instance details

Defined in Control.Selective.Free

Methods

pure :: a -> Select f a #

(<*>) :: Select f (a -> b) -> Select f a -> Select f b #

liftA2 :: (a -> b -> c) -> Select f a -> Select f b -> Select f c #

(*>) :: Select f a -> Select f b -> Select f b #

(<*) :: Select f a -> Select f b -> Select f a #

Monoid m => Applicative (Over m) 
Instance details

Defined in Control.Selective.Multi

Methods

pure :: a -> Over m a #

(<*>) :: Over m (a -> b) -> Over m a -> Over m b #

liftA2 :: (a -> b -> c) -> Over m a -> Over m b -> Over m c #

(*>) :: Over m a -> Over m b -> Over m b #

(<*) :: Over m a -> Over m b -> Over m a #

Monoid m => Applicative (Under m) 
Instance details

Defined in Control.Selective.Multi

Methods

pure :: a -> Under m a #

(<*>) :: Under m (a -> b) -> Under m a -> Under m b #

liftA2 :: (a -> b -> c) -> Under m a -> Under m b -> Under m c #

(*>) :: Under m a -> Under m b -> Under m b #

(<*) :: Under m a -> Under m b -> Under m a #

Functor f => Applicative (Select f) 
Instance details

Defined in Control.Selective.Rigid.Free

Methods

pure :: a -> Select f a #

(<*>) :: Select f (a -> b) -> Select f a -> Select f b #

liftA2 :: (a -> b -> c) -> Select f a -> Select f b -> Select f c #

(*>) :: Select f a -> Select f b -> Select f b #

(<*) :: Select f a -> Select f b -> Select f a #

Applicative (Select f) 
Instance details

Defined in Control.Selective.Rigid.Freer

Methods

pure :: a -> Select f a #

(<*>) :: Select f (a -> b) -> Select f a -> Select f b #

liftA2 :: (a -> b -> c) -> Select f a -> Select f b -> Select f c #

(*>) :: Select f a -> Select f b -> Select f b #

(<*) :: Select f a -> Select f b -> Select f a #

Apply f => Applicative (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

pure :: a -> MaybeApply f a #

(<*>) :: MaybeApply f (a -> b) -> MaybeApply f a -> MaybeApply f b #

liftA2 :: (a -> b -> c) -> MaybeApply f a -> MaybeApply f b -> MaybeApply f c #

(*>) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f b #

(<*) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f a #

Applicative f => Applicative (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Bind.Class

Applicative f => Applicative (Lift f)

A combination is Pure only if both parts are.

Instance details

Defined in Control.Applicative.Lift

Methods

pure :: a -> Lift f a #

(<*>) :: Lift f (a -> b) -> Lift f a -> Lift f b #

liftA2 :: (a -> b -> c) -> Lift f a -> Lift f b -> Lift f c #

(*>) :: Lift f a -> Lift f b -> Lift f b #

(<*) :: Lift f a -> Lift f b -> Lift f a #

(Functor m, Monad m) => Applicative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

pure :: a -> MaybeT m a #

(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #

liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a #

Monoid a => Applicative ((,) a)

For tuples, the Monoid constraint on a determines how the first values merge. For example, Strings concatenate:

("hello ", (+15)) <*> ("world!", 2002)
("hello world!",2017)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, a0) #

(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) #

liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) #

(*>) :: (a, a0) -> (a, b) -> (a, b) #

(<*) :: (a, a0) -> (a, b) -> (a, a0) #

Arrow a => Applicative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Applicative m => Applicative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> Kleisli m a a0 #

(<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b #

liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c #

(*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #

(<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 #

Monoid m => Applicative (Const m :: Type -> Type)

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

(*>) :: Const m a -> Const m b -> Const m b #

(<*) :: Const m a -> Const m b -> Const m a #

Applicative f => Applicative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #

(*>) :: Ap f a -> Ap f b -> Ap f b #

(<*) :: Ap f a -> Ap f b -> Ap f a #

Applicative f => Applicative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Alt f a #

(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b #

liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c #

(*>) :: Alt f a -> Alt f b -> Alt f b #

(<*) :: Alt f a -> Alt f b -> Alt f a #

Applicative f => Applicative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Rec1 f a #

(<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b #

liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c #

(*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #

(<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a #

Applicative (Mag a b) 
Instance details

Defined in Data.Biapplicative

Methods

pure :: a0 -> Mag a b a0 #

(<*>) :: Mag a b (a0 -> b0) -> Mag a b a0 -> Mag a b b0 #

liftA2 :: (a0 -> b0 -> c) -> Mag a b a0 -> Mag a b b0 -> Mag a b c #

(*>) :: Mag a b a0 -> Mag a b b0 -> Mag a b b0 #

(<*) :: Mag a b a0 -> Mag a b b0 -> Mag a b a0 #

Biapplicative p => Applicative (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

pure :: a -> Fix p a #

(<*>) :: Fix p (a -> b) -> Fix p a -> Fix p b #

liftA2 :: (a -> b -> c) -> Fix p a -> Fix p b -> Fix p c #

(*>) :: Fix p a -> Fix p b -> Fix p b #

(<*) :: Fix p a -> Fix p b -> Fix p a #

Biapplicative p => Applicative (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

pure :: a -> Join p a #

(<*>) :: Join p (a -> b) -> Join p a -> Join p b #

liftA2 :: (a -> b -> c) -> Join p a -> Join p b -> Join p c #

(*>) :: Join p a -> Join p b -> Join p b #

(<*) :: Join p a -> Join p b -> Join p a #

(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

Methods

pure :: a -> WhenMissing f x a #

(<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b #

liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c #

(*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

(<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a #

(Functor f, Monad m) => Applicative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

pure :: a -> FreeT f m a #

(<*>) :: FreeT f m (a -> b) -> FreeT f m a -> FreeT f m b #

liftA2 :: (a -> b -> c) -> FreeT f m a -> FreeT f m b -> FreeT f m c #

(*>) :: FreeT f m a -> FreeT f m b -> FreeT f m b #

(<*) :: FreeT f m a -> FreeT f m b -> FreeT f m a #

Applicative f => Applicative (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

pure :: a -> WrappedFunctor f a #

(<*>) :: WrappedFunctor f (a -> b) -> WrappedFunctor f a -> WrappedFunctor f b #

liftA2 :: (a -> b -> c) -> WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f c #

(*>) :: WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f b #

(<*) :: WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f a #

(Applicative f, Applicative g) => Applicative (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

pure :: a -> Day f g a #

(<*>) :: Day f g (a -> b) -> Day f g a -> Day f g b #

liftA2 :: (a -> b -> c) -> Day f g a -> Day f g b -> Day f g c #

(*>) :: Day f g a -> Day f g b -> Day f g b #

(<*) :: Day f g a -> Day f g b -> Day f g a #

(Profunctor p, Arrow p) => Applicative (Closure p a) 
Instance details

Defined in Data.Profunctor.Closed

Methods

pure :: a0 -> Closure p a a0 #

(<*>) :: Closure p a (a0 -> b) -> Closure p a a0 -> Closure p a b #

liftA2 :: (a0 -> b -> c) -> Closure p a a0 -> Closure p a b -> Closure p a c #

(*>) :: Closure p a a0 -> Closure p a b -> Closure p a b #

(<*) :: Closure p a a0 -> Closure p a b -> Closure p a a0 #

(Applicative (Rep p), Representable p) => Applicative (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

pure :: a -> Prep p a #

(<*>) :: Prep p (a -> b) -> Prep p a -> Prep p b #

liftA2 :: (a -> b -> c) -> Prep p a -> Prep p b -> Prep p c #

(*>) :: Prep p a -> Prep p b -> Prep p b #

(<*) :: Prep p a -> Prep p b -> Prep p a #

(Profunctor p, Arrow p) => Applicative (Tambara p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

pure :: a0 -> Tambara p a a0 #

(<*>) :: Tambara p a (a0 -> b) -> Tambara p a a0 -> Tambara p a b #

liftA2 :: (a0 -> b -> c) -> Tambara p a a0 -> Tambara p a b -> Tambara p a c #

(*>) :: Tambara p a a0 -> Tambara p a b -> Tambara p a b #

(<*) :: Tambara p a a0 -> Tambara p a b -> Tambara p a a0 #

Applicative (Bazaar a b) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

pure :: a0 -> Bazaar a b a0 #

(<*>) :: Bazaar a b (a0 -> b0) -> Bazaar a b a0 -> Bazaar a b b0 #

liftA2 :: (a0 -> b0 -> c) -> Bazaar a b a0 -> Bazaar a b b0 -> Bazaar a b c #

(*>) :: Bazaar a b a0 -> Bazaar a b b0 -> Bazaar a b b0 #

(<*) :: Bazaar a b a0 -> Bazaar a b b0 -> Bazaar a b a0 #

Selective f => Applicative (ComposeEither f e) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> ComposeEither f e a #

(<*>) :: ComposeEither f e (a -> b) -> ComposeEither f e a -> ComposeEither f e b #

liftA2 :: (a -> b -> c) -> ComposeEither f e a -> ComposeEither f e b -> ComposeEither f e c #

(*>) :: ComposeEither f e a -> ComposeEither f e b -> ComposeEither f e b #

(<*) :: ComposeEither f e a -> ComposeEither f e b -> ComposeEither f e a #

(Applicative f, Applicative g) => Applicative (ComposeTraversable f g) 
Instance details

Defined in Control.Selective

Applicative f => Applicative (Static f a) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

pure :: a0 -> Static f a a0 #

(<*>) :: Static f a (a0 -> b) -> Static f a a0 -> Static f a b #

liftA2 :: (a0 -> b -> c) -> Static f a a0 -> Static f a b -> Static f a c #

(*>) :: Static f a a0 -> Static f a b -> Static f a b #

(<*) :: Static f a a0 -> Static f a b -> Static f a a0 #

Applicative (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

pure :: a -> Tagged s a #

(<*>) :: Tagged s (a -> b) -> Tagged s a -> Tagged s b #

liftA2 :: (a -> b -> c) -> Tagged s a -> Tagged s b -> Tagged s c #

(*>) :: Tagged s a -> Tagged s b -> Tagged s b #

(<*) :: Tagged s a -> Tagged s b -> Tagged s a #

Applicative f => Applicative (Backwards f)

Apply f-actions in the reverse order.

Instance details

Defined in Control.Applicative.Backwards

Methods

pure :: a -> Backwards f a #

(<*>) :: Backwards f (a -> b) -> Backwards f a -> Backwards f b #

liftA2 :: (a -> b -> c) -> Backwards f a -> Backwards f b -> Backwards f c #

(*>) :: Backwards f a -> Backwards f b -> Backwards f b #

(<*) :: Backwards f a -> Backwards f b -> Backwards f a #

(Functor m, Monad m) => Applicative (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

pure :: a -> ErrorT e m a #

(<*>) :: ErrorT e m (a -> b) -> ErrorT e m a -> ErrorT e m b #

liftA2 :: (a -> b -> c) -> ErrorT e m a -> ErrorT e m b -> ErrorT e m c #

(*>) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m b #

(<*) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m a #

(Functor m, Monad m) => Applicative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

pure :: a -> ExceptT e m a #

(<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b #

liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c #

(*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

(<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a #

Applicative m => Applicative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

pure :: a -> IdentityT m a #

(<*>) :: IdentityT m (a -> b) -> IdentityT m a -> IdentityT m b #

liftA2 :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c #

(*>) :: IdentityT m a -> IdentityT m b -> IdentityT m b #

(<*) :: IdentityT m a -> IdentityT m b -> IdentityT m a #

Applicative m => Applicative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a #

(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b #

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

(Monoid w, Applicative m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

(Monoid w, Applicative m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

Monoid a => Applicative (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

pure :: a0 -> Constant a a0 #

(<*>) :: Constant a (a0 -> b) -> Constant a a0 -> Constant a b #

liftA2 :: (a0 -> b -> c) -> Constant a a0 -> Constant a b -> Constant a c #

(*>) :: Constant a a0 -> Constant a b -> Constant a b #

(<*) :: Constant a a0 -> Constant a b -> Constant a a0 #

Applicative f => Applicative (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

pure :: a -> Reverse f a #

(<*>) :: Reverse f (a -> b) -> Reverse f a -> Reverse f b #

liftA2 :: (a -> b -> c) -> Reverse f a -> Reverse f b -> Reverse f c #

(*>) :: Reverse f a -> Reverse f b -> Reverse f b #

(<*) :: Reverse f a -> Reverse f b -> Reverse f a #

(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) #

(<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) #

liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) #

(*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) #

(<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) #

(Applicative f, Applicative g) => Applicative (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

pure :: a -> Product f g a #

(<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b #

liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

(*>) :: Product f g a -> Product f g b -> Product f g b #

(<*) :: Product f g a -> Product f g b -> Product f g a #

(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 #

(<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b #

liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c #

(*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #

(<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a #

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 #

(<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b #

liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 #

(*>) :: K1 i c a -> K1 i c b -> K1 i c b #

(<*) :: K1 i c a -> K1 i c b -> K1 i c a #

Applicative (Cokleisli w a) 
Instance details

Defined in Control.Comonad

Methods

pure :: a0 -> Cokleisli w a a0 #

(<*>) :: Cokleisli w a (a0 -> b) -> Cokleisli w a a0 -> Cokleisli w a b #

liftA2 :: (a0 -> b -> c) -> Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a c #

(*>) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a b #

(<*) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a a0 #

(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

Methods

pure :: a -> WhenMatched f x y a #

(<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #

liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c #

(*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #

(<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a #

(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

Methods

pure :: a -> WhenMissing f k x a #

(<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #

liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c #

(*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b #

(<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a #

Applicative (Costar f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

pure :: a0 -> Costar f a a0 #

(<*>) :: Costar f a (a0 -> b) -> Costar f a a0 -> Costar f a b #

liftA2 :: (a0 -> b -> c) -> Costar f a a0 -> Costar f a b -> Costar f a c #

(*>) :: Costar f a a0 -> Costar f a b -> Costar f a b #

(<*) :: Costar f a a0 -> Costar f a b -> Costar f a a0 #

Applicative f => Applicative (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

pure :: a0 -> Star f a a0 #

(<*>) :: Star f a (a0 -> b) -> Star f a a0 -> Star f a b #

liftA2 :: (a0 -> b -> c) -> Star f a a0 -> Star f a b -> Star f a c #

(*>) :: Star f a a0 -> Star f a b -> Star f a b #

(<*) :: Star f a a0 -> Star f a b -> Star f a a0 #

Applicative (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

pure :: a -> ContT r m a #

(<*>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b #

liftA2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c #

(*>) :: ContT r m a -> ContT r m b -> ContT r m b #

(<*) :: ContT r m a -> ContT r m b -> ContT r m a #

(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) #

(<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) #

liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) #

(*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) #

(<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) #

Applicative ((->) r)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> r -> a #

(<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b #

liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c #

(*>) :: (r -> a) -> (r -> b) -> r -> b #

(<*) :: (r -> a) -> (r -> b) -> r -> a #

(Applicative f, Applicative g) => Applicative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a #

(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(*>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<*) :: Compose f g a -> Compose f g b -> Compose f g a #

(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 #

(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b #

liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c #

(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b #

(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a #

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 #

(<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b #

liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 #

(*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b #

(<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a #

(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 #

(<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #

liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c #

(*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b #

(<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a #

(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 #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

(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 #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

class Foldable (t :: TYPE LiftedRep -> Type) where #

The Foldable class represents data structures that can be reduced to a summary value one element at a time. Strict left-associative folds are a good fit for space-efficient reduction, while lazy right-associative folds are a good fit for corecursive iteration, or for folds that short-circuit after processing an initial subsequence of the structure's elements.

Instances can be derived automatically by enabling the DeriveFoldable extension. For example, a derived instance for a binary tree might be:

{-# LANGUAGE DeriveFoldable #-}
data Tree a = Empty
            | Leaf a
            | Node (Tree a) a (Tree a)
    deriving Foldable

A more detailed description can be found in the Overview section of Data.Foldable.

For the class laws see the Laws section of Data.Foldable.

Minimal complete definition

foldMap | foldr

Methods

fold :: Monoid m => t m -> m #

Given a structure with elements whose type is a Monoid, combine them via the monoid's (<>) operator. This fold is right-associative and lazy in the accumulator. When you need a strict left-associative fold, use foldMap' instead, with id as the map.

Examples

Expand

Basic usage:

>>> fold [[1, 2, 3], [4, 5], [6], []]
[1,2,3,4,5,6]
>>> fold $ Node (Leaf (Sum 1)) (Sum 3) (Leaf (Sum 5))
Sum {getSum = 9}

Folds of unbounded structures do not terminate when the monoid's (<>) operator is strict:

>>> fold (repeat Nothing)
* Hangs forever *

Lazy corecursive folds of unbounded structures are fine:

>>> take 12 $ fold $ map (\i -> [i..i+2]) [0..]
[0,1,2,1,2,3,2,3,4,3,4,5]
>>> sum $ take 4000000 $ fold $ map (\i -> [i..i+2]) [0..]
2666668666666

foldMap :: Monoid m => (a -> m) -> t a -> m #

Map each element of the structure into a monoid, and combine the results with (<>). This fold is right-associative and lazy in the accumulator. For strict left-associative folds consider foldMap' instead.

Examples

Expand

Basic usage:

>>> foldMap Sum [1, 3, 5]
Sum {getSum = 9}
>>> foldMap Product [1, 3, 5]
Product {getProduct = 15}
>>> foldMap (replicate 3) [1, 2, 3]
[1,1,1,2,2,2,3,3,3]

When a Monoid's (<>) is lazy in its second argument, foldMap can return a result even from an unbounded structure. For example, lazy accumulation enables Data.ByteString.Builder to efficiently serialise large data structures and produce the output incrementally:

>>> import qualified Data.ByteString.Lazy as L
>>> import qualified Data.ByteString.Builder as B
>>> let bld :: Int -> B.Builder; bld i = B.intDec i <> B.word8 0x20
>>> let lbs = B.toLazyByteString $ foldMap bld [0..]
>>> L.take 64 lbs
"0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24"

foldMap' :: Monoid m => (a -> m) -> t a -> m #

A left-associative variant of foldMap that is strict in the accumulator. Use this method for strict reduction when partial results are merged via (<>).

Examples

Expand

Define a Monoid over finite bit strings under xor. Use it to strictly compute the xor of a list of Int values.

>>> :set -XGeneralizedNewtypeDeriving
>>> import Data.Bits (Bits, FiniteBits, xor, zeroBits)
>>> import Data.Foldable (foldMap')
>>> import Numeric (showHex)
>>> 
>>> newtype X a = X a deriving (Eq, Bounded, Enum, Bits, FiniteBits)
>>> instance Bits a => Semigroup (X a) where X a <> X b = X (a `xor` b)
>>> instance Bits a => Monoid    (X a) where mempty     = X zeroBits
>>> 
>>> let bits :: [Int]; bits = [0xcafe, 0xfeed, 0xdeaf, 0xbeef, 0x5411]
>>> (\ (X a) -> showString "0x" . showHex a $ "") $ foldMap' X bits
"0x42"

Since: base-4.13.0.0

foldr :: (a -> b -> b) -> b -> t a -> b #

Right-associative fold of a structure, lazy in the accumulator.

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, given an operator lazy in its right argument, foldr can produce a terminating expression from an unbounded list.

For a general Foldable structure this should be semantically identical to,

foldr f z = foldr f z . toList

Examples

Expand

Basic usage:

>>> foldr (||) False [False, True, False]
True
>>> foldr (||) False []
False
>>> foldr (\c acc -> acc ++ [c]) "foo" ['a', 'b', 'c', 'd']
"foodcba"
Infinite structures

⚠️ Applying foldr to infinite structures usually doesn't terminate.

It may still terminate under one of the following conditions:

  • the folding function is short-circuiting
  • the folding function is lazy on its second argument
Short-circuiting

(||) short-circuits on True values, so the following terminates because there is a True value finitely far from the left side:

>>> foldr (||) False (True : repeat False)
True

But the following doesn't terminate:

>>> foldr (||) False (repeat False ++ [True])
* Hangs forever *
Laziness in the second argument

Applying foldr to infinite structures terminates when the operator is lazy in its second argument (the initial accumulator is never used in this case, and so could be left undefined, but [] is more clear):

>>> take 5 $ foldr (\i acc -> i : fmap (+3) acc) [] (repeat 1)
[1,4,7,10,13]

foldr' :: (a -> b -> b) -> b -> t a -> b #

Right-associative fold of a structure, strict in the accumulator. This is rarely what you want.

Since: base-4.6.0.0

foldl :: (b -> a -> b) -> b -> t a -> b #

Left-associative fold of a structure, lazy in the accumulator. This is rarely what you want, but can work well for structures with efficient right-to-left sequencing and an operator that is lazy in its left argument.

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. Like all left-associative folds, foldl will diverge if given an infinite list.

If you want an efficient strict left-fold, you probably want to use foldl' instead of foldl. The reason for this is that the 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

Examples

Expand

The first example is a strict fold, which in practice is best performed with foldl'.

>>> foldl (+) 42 [1,2,3,4]
52

Though the result below is lazy, the input is reversed before prepending it to the initial accumulator, so corecursion begins only after traversing the entire input string.

>>> foldl (\acc c -> c : acc) "abcd" "efgh"
"hgfeabcd"

A left fold of a structure that is infinite on the right cannot terminate, even when for any finite input the fold just returns the initial accumulator:

>>> foldl (\a _ -> a) 0 $ repeat 1
* Hangs forever *

WARNING: When it comes to lists, you always want to use either foldl' or foldr instead.

foldl' :: (b -> a -> b) -> b -> t a -> b #

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 structure to a single strict result (e.g. sum).

For a general Foldable structure this should be semantically identical to,

foldl' f z = foldl' f z . toList

Since: base-4.6.0.0

foldr1 :: (a -> a -> a) -> t a -> a #

A variant of foldr that has no base case, and thus may only be applied to non-empty structures.

This function is non-total and will raise a runtime exception if the structure happens to be empty.

Examples

Expand

Basic usage:

>>> foldr1 (+) [1..4]
10
>>> foldr1 (+) []
Exception: Prelude.foldr1: empty list
>>> foldr1 (+) Nothing
*** Exception: foldr1: empty structure
>>> foldr1 (-) [1..4]
-2
>>> foldr1 (&&) [True, False, True, True]
False
>>> foldr1 (||) [False, False, True, True]
True
>>> foldr1 (+) [1..]
* Hangs forever *

foldl1 :: (a -> a -> a) -> t a -> a #

A variant of foldl that has no base case, and thus may only be applied to non-empty structures.

This function is non-total and will raise a runtime exception if the structure happens to be empty.

foldl1 f = foldl1 f . toList

Examples

Expand

Basic usage:

>>> foldl1 (+) [1..4]
10
>>> foldl1 (+) []
*** Exception: Prelude.foldl1: empty list
>>> foldl1 (+) Nothing
*** Exception: foldl1: empty structure
>>> foldl1 (-) [1..4]
-8
>>> foldl1 (&&) [True, False, True, True]
False
>>> foldl1 (||) [False, False, True, True]
True
>>> foldl1 (+) [1..]
* Hangs forever *

null :: t a -> Bool #

Test whether the structure is empty. The default implementation is Left-associative and lazy in both the initial element and the accumulator. Thus optimised for structures where the first element can be accessed in constant time. Structures where this is not the case should have a non-default implementation.

Examples

Expand

Basic usage:

>>> null []
True
>>> null [1]
False

null is expected to terminate even for infinite structures. The default implementation terminates provided the structure is bounded on the left (there is a leftmost element).

>>> null [1..]
False

Since: base-4.8.0.0

length :: t a -> Int #

Returns the size/length of a finite structure as an Int. The default implementation just counts elements starting with the leftmost. Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.

Examples

Expand

Basic usage:

>>> length []
0
>>> length ['a', 'b', 'c']
3
>>> length [1..]
* Hangs forever *

Since: base-4.8.0.0

elem :: Eq a => a -> t a -> Bool infix 4 #

Does the element occur in the structure?

Note: elem is often used in infix form.

Examples

Expand

Basic usage:

>>> 3 `elem` []
False
>>> 3 `elem` [1,2]
False
>>> 3 `elem` [1,2,3,4,5]
True

For infinite structures, the default implementation of elem terminates if the sought-after value exists at a finite distance from the left side of the structure:

>>> 3 `elem` [1..]
True
>>> 3 `elem` ([4..] ++ [3])
* Hangs forever *

Since: base-4.8.0.0

maximum :: Ord a => t a -> a #

The largest element of a non-empty structure.

This function is non-total and will raise a runtime exception if the structure happens to be empty. A structure that supports random access and maintains its elements in order should provide a specialised implementation to return the maximum in faster than linear time.

Examples

Expand

Basic usage:

>>> maximum [1..10]
10
>>> maximum []
*** Exception: Prelude.maximum: empty list
>>> maximum Nothing
*** Exception: maximum: empty structure

WARNING: This function is partial for possibly-empty structures like lists.

Since: base-4.8.0.0

minimum :: Ord a => t a -> a #

The least element of a non-empty structure.

This function is non-total and will raise a runtime exception if the structure happens to be empty. A structure that supports random access and maintains its elements in order should provide a specialised implementation to return the minimum in faster than linear time.

Examples

Expand

Basic usage:

>>> minimum [1..10]
1
>>> minimum []
*** Exception: Prelude.minimum: empty list
>>> minimum Nothing
*** Exception: minimum: empty structure

WARNING: This function is partial for possibly-empty structures like lists.

Since: base-4.8.0.0

sum :: Num a => t a -> a #

The sum function computes the sum of the numbers of a structure.

Examples

Expand

Basic usage:

>>> sum []
0
>>> sum [42]
42
>>> sum [1..10]
55
>>> sum [4.1, 2.0, 1.7]
7.8
>>> sum [1..]
* Hangs forever *

Since: base-4.8.0.0

product :: Num a => t a -> a #

The product function computes the product of the numbers of a structure.

Examples

Expand

Basic usage:

>>> product []
1
>>> product [42]
42
>>> product [1..10]
3628800
>>> product [4.1, 2.0, 1.7]
13.939999999999998
>>> product [1..]
* Hangs forever *

Since: base-4.8.0.0

Instances

Instances details
Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Methods

fold :: Monoid m => ZipList m -> m #

foldMap :: Monoid m => (a -> m) -> ZipList a -> m #

foldMap' :: Monoid m => (a -> m) -> ZipList a -> m #

foldr :: (a -> b -> b) -> b -> ZipList a -> b #

foldr' :: (a -> b -> b) -> b -> ZipList a -> b #

foldl :: (b -> a -> b) -> b -> ZipList a -> b #

foldl' :: (b -> a -> b) -> b -> ZipList a -> b #

foldr1 :: (a -> a -> a) -> ZipList a -> a #

foldl1 :: (a -> a -> a) -> ZipList a -> a #

toList :: ZipList a -> [a] #

null :: ZipList a -> Bool #

length :: ZipList a -> Int #

elem :: Eq a => a -> ZipList a -> Bool #

maximum :: Ord a => ZipList a -> a #

minimum :: Ord a => ZipList a -> a #

sum :: Num a => ZipList a -> a #

product :: Num a => ZipList a -> a #

Foldable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

fold :: Monoid m => Complex m -> m #

foldMap :: Monoid m => (a -> m) -> Complex a -> m #

foldMap' :: Monoid m => (a -> m) -> Complex a -> m #

foldr :: (a -> b -> b) -> b -> Complex a -> b #

foldr' :: (a -> b -> b) -> b -> Complex a -> b #

foldl :: (b -> a -> b) -> b -> Complex a -> b #

foldl' :: (b -> a -> b) -> b -> Complex a -> b #

foldr1 :: (a -> a -> a) -> Complex a -> a #

foldl1 :: (a -> a -> a) -> Complex a -> a #

toList :: Complex a -> [a] #

null :: Complex a -> Bool #

length :: Complex a -> Int #

elem :: Eq a => a -> Complex a -> Bool #

maximum :: Ord a => Complex a -> a #

minimum :: Ord a => Complex a -> a #

sum :: Num a => Complex a -> a #

product :: Num a => Complex a -> a #

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fold :: Monoid m => Identity m -> m #

foldMap :: Monoid m => (a -> m) -> Identity a -> m #

foldMap' :: Monoid m => (a -> m) -> Identity a -> m #

foldr :: (a -> b -> b) -> b -> Identity a -> b #

foldr' :: (a -> b -> b) -> b -> Identity a -> b #

foldl :: (b -> a -> b) -> b -> Identity a -> b #

foldl' :: (b -> a -> b) -> b -> Identity a -> b #

foldr1 :: (a -> a -> a) -> Identity a -> a #

foldl1 :: (a -> a -> a) -> Identity a -> a #

toList :: Identity a -> [a] #

null :: Identity a -> Bool #

length :: Identity a -> Int #

elem :: Eq a => a -> Identity a -> Bool #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

sum :: Num a => Identity a -> a #

product :: Num a => Identity a -> a #

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldMap' :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Foldable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

foldMap' :: Monoid m => (a -> m) -> Last a -> m #

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Down m -> m #

foldMap :: Monoid m => (a -> m) -> Down a -> m #

foldMap' :: Monoid m => (a -> m) -> Down a -> m #

foldr :: (a -> b -> b) -> b -> Down a -> b #

foldr' :: (a -> b -> b) -> b -> Down a -> b #

foldl :: (b -> a -> b) -> b -> Down a -> b #

foldl' :: (b -> a -> b) -> b -> Down a -> b #

foldr1 :: (a -> a -> a) -> Down a -> a #

foldl1 :: (a -> a -> a) -> Down a -> a #

toList :: Down a -> [a] #

null :: Down a -> Bool #

length :: Down a -> Int #

elem :: Eq a => a -> Down a -> Bool #

maximum :: Ord a => Down a -> a #

minimum :: Ord a => Down a -> a #

sum :: Num a => Down a -> a #

product :: Num a => Down a -> a #

Foldable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldMap' :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Foldable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

foldMap' :: Monoid m => (a -> m) -> Last a -> m #

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Foldable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Max m -> m #

foldMap :: Monoid m => (a -> m) -> Max a -> m #

foldMap' :: Monoid m => (a -> m) -> Max a -> m #

foldr :: (a -> b -> b) -> b -> Max a -> b #

foldr' :: (a -> b -> b) -> b -> Max a -> b #

foldl :: (b -> a -> b) -> b -> Max a -> b #

foldl' :: (b -> a -> b) -> b -> Max a -> b #

foldr1 :: (a -> a -> a) -> Max a -> a #

foldl1 :: (a -> a -> a) -> Max a -> a #

toList :: Max a -> [a] #

null :: Max a -> Bool #

length :: Max a -> Int #

elem :: Eq a => a -> Max a -> Bool #

maximum :: Ord a => Max a -> a #

minimum :: Ord a => Max a -> a #

sum :: Num a => Max a -> a #

product :: Num a => Max a -> a #

Foldable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Min m -> m #

foldMap :: Monoid m => (a -> m) -> Min a -> m #

foldMap' :: Monoid m => (a -> m) -> Min a -> m #

foldr :: (a -> b -> b) -> b -> Min a -> b #

foldr' :: (a -> b -> b) -> b -> Min a -> b #

foldl :: (b -> a -> b) -> b -> Min a -> b #

foldl' :: (b -> a -> b) -> b -> Min a -> b #

foldr1 :: (a -> a -> a) -> Min a -> a #

foldl1 :: (a -> a -> a) -> Min a -> a #

toList :: Min a -> [a] #

null :: Min a -> Bool #

length :: Min a -> Int #

elem :: Eq a => a -> Min a -> Bool #

maximum :: Ord a => Min a -> a #

minimum :: Ord a => Min a -> a #

sum :: Num a => Min a -> a #

product :: Num a => Min a -> a #

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Dual m -> m #

foldMap :: Monoid m => (a -> m) -> Dual a -> m #

foldMap' :: Monoid m => (a -> m) -> Dual a -> m #

foldr :: (a -> b -> b) -> b -> Dual a -> b #

foldr' :: (a -> b -> b) -> b -> Dual a -> b #

foldl :: (b -> a -> b) -> b -> Dual a -> b #

foldl' :: (b -> a -> b) -> b -> Dual a -> b #

foldr1 :: (a -> a -> a) -> Dual a -> a #

foldl1 :: (a -> a -> a) -> Dual a -> a #

toList :: Dual a -> [a] #

null :: Dual a -> Bool #

length :: Dual a -> Int #

elem :: Eq a => a -> Dual a -> Bool #

maximum :: Ord a => Dual a -> a #

minimum :: Ord a => Dual a -> a #

sum :: Num a => Dual a -> a #

product :: Num a => Dual a -> a #

Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Product m -> m #

foldMap :: Monoid m => (a -> m) -> Product a -> m #

foldMap' :: Monoid m => (a -> m) -> Product a -> m #

foldr :: (a -> b -> b) -> b -> Product a -> b #

foldr' :: (a -> b -> b) -> b -> Product a -> b #

foldl :: (b -> a -> b) -> b -> Product a -> b #

foldl' :: (b -> a -> b) -> b -> Product a -> b #

foldr1 :: (a -> a -> a) -> Product a -> a #

foldl1 :: (a -> a -> a) -> Product a -> a #

toList :: Product a -> [a] #

null :: Product a -> Bool #

length :: Product a -> Int #

elem :: Eq a => a -> Product a -> Bool #

maximum :: Ord a => Product a -> a #

minimum :: Ord a => Product a -> a #

sum :: Num a => Product a -> a #

product :: Num a => Product a -> a #

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Sum m -> m #

foldMap :: Monoid m => (a -> m) -> Sum a -> m #

foldMap' :: Monoid m => (a -> m) -> Sum a -> m #

foldr :: (a -> b -> b) -> b -> Sum a -> b #

foldr' :: (a -> b -> b) -> b -> Sum a -> b #

foldl :: (b -> a -> b) -> b -> Sum a -> b #

foldl' :: (b -> a -> b) -> b -> Sum a -> b #

foldr1 :: (a -> a -> a) -> Sum a -> a #

foldl1 :: (a -> a -> a) -> Sum a -> a #

toList :: Sum a -> [a] #

null :: Sum a -> Bool #

length :: Sum a -> Int #

elem :: Eq a => a -> Sum a -> Bool #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

sum :: Num a => Sum a -> a #

product :: Num a => Sum a -> a #

Foldable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Par1 m -> m #

foldMap :: Monoid m => (a -> m) -> Par1 a -> m #

foldMap' :: Monoid m => (a -> m) -> Par1 a -> m #

foldr :: (a -> b -> b) -> b -> Par1 a -> b #

foldr' :: (a -> b -> b) -> b -> Par1 a -> b #

foldl :: (b -> a -> b) -> b -> Par1 a -> b #

foldl' :: (b -> a -> b) -> b -> Par1 a -> b #

foldr1 :: (a -> a -> a) -> Par1 a -> a #

foldl1 :: (a -> a -> a) -> Par1 a -> a #

toList :: Par1 a -> [a] #

null :: Par1 a -> Bool #

length :: Par1 a -> Int #

elem :: Eq a => a -> Par1 a -> Bool #

maximum :: Ord a => Par1 a -> a #

minimum :: Ord a => Par1 a -> a #

sum :: Num a => Par1 a -> a #

product :: Num a => Par1 a -> a #

Foldable SCC

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

fold :: Monoid m => SCC m -> m #

foldMap :: Monoid m => (a -> m) -> SCC a -> m #

foldMap' :: Monoid m => (a -> m) -> SCC a -> m #

foldr :: (a -> b -> b) -> b -> SCC a -> b #

foldr' :: (a -> b -> b) -> b -> SCC a -> b #

foldl :: (b -> a -> b) -> b -> SCC a -> b #

foldl' :: (b -> a -> b) -> b -> SCC a -> b #

foldr1 :: (a -> a -> a) -> SCC a -> a #

foldl1 :: (a -> a -> a) -> SCC a -> a #

toList :: SCC a -> [a] #

null :: SCC a -> Bool #

length :: SCC a -> Int #

elem :: Eq a => a -> SCC a -> Bool #

maximum :: Ord a => SCC a -> a #

minimum :: Ord a => SCC a -> a #

sum :: Num a => SCC a -> a #

product :: Num a => SCC a -> a #

Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

fold :: Monoid m => IntMap m -> m #

foldMap :: Monoid m => (a -> m) -> IntMap a -> m #

foldMap' :: Monoid m => (a -> m) -> IntMap a -> m #

foldr :: (a -> b -> b) -> b -> IntMap a -> b #

foldr' :: (a -> b -> b) -> b -> IntMap a -> b #

foldl :: (b -> a -> b) -> b -> IntMap a -> b #

foldl' :: (b -> a -> b) -> b -> IntMap a -> b #

foldr1 :: (a -> a -> a) -> IntMap a -> a #

foldl1 :: (a -> a -> a) -> IntMap a -> a #

toList :: IntMap a -> [a] #

null :: IntMap a -> Bool #

length :: IntMap a -> Int #

elem :: Eq a => a -> IntMap a -> Bool #

maximum :: Ord a => IntMap a -> a #

minimum :: Ord a => IntMap a -> a #

sum :: Num a => IntMap a -> a #

product :: Num a => IntMap a -> a #

Foldable Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Digit m -> m #

foldMap :: Monoid m => (a -> m) -> Digit a -> m #

foldMap' :: Monoid m => (a -> m) -> Digit a -> m #

foldr :: (a -> b -> b) -> b -> Digit a -> b #

foldr' :: (a -> b -> b) -> b -> Digit a -> b #

foldl :: (b -> a -> b) -> b -> Digit a -> b #

foldl' :: (b -> a -> b) -> b -> Digit a -> b #

foldr1 :: (a -> a -> a) -> Digit a -> a #

foldl1 :: (a -> a -> a) -> Digit a -> a #

toList :: Digit a -> [a] #

null :: Digit a -> Bool #

length :: Digit a -> Int #

elem :: Eq a => a -> Digit a -> Bool #

maximum :: Ord a => Digit a -> a #

minimum :: Ord a => Digit a -> a #

sum :: Num a => Digit a -> a #

product :: Num a => Digit a -> a #

Foldable Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Elem m -> m #

foldMap :: Monoid m => (a -> m) -> Elem a -> m #

foldMap' :: Monoid m => (a -> m) -> Elem a -> m #

foldr :: (a -> b -> b) -> b -> Elem a -> b #

foldr' :: (a -> b -> b) -> b -> Elem a -> b #

foldl :: (b -> a -> b) -> b -> Elem a -> b #

foldl' :: (b -> a -> b) -> b -> Elem a -> b #

foldr1 :: (a -> a -> a) -> Elem a -> a #

foldl1 :: (a -> a -> a) -> Elem a -> a #

toList :: Elem a -> [a] #

null :: Elem a -> Bool #

length :: Elem a -> Int #

elem :: Eq a => a -> Elem a -> Bool #

maximum :: Ord a => Elem a -> a #

minimum :: Ord a => Elem a -> a #

sum :: Num a => Elem a -> a #

product :: Num a => Elem a -> a #

Foldable FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => FingerTree m -> m #

foldMap :: Monoid m => (a -> m) -> FingerTree a -> m #

foldMap' :: Monoid m => (a -> m) -> FingerTree a -> m #

foldr :: (a -> b -> b) -> b -> FingerTree a -> b #

foldr' :: (a -> b -> b) -> b -> FingerTree a -> b #

foldl :: (b -> a -> b) -> b -> FingerTree a -> b #

foldl' :: (b -> a -> b) -> b -> FingerTree a -> b #

foldr1 :: (a -> a -> a) -> FingerTree a -> a #

foldl1 :: (a -> a -> a) -> FingerTree a -> a #

toList :: FingerTree a -> [a] #

null :: FingerTree a -> Bool #

length :: FingerTree a -> Int #

elem :: Eq a => a -> FingerTree a -> Bool #

maximum :: Ord a => FingerTree a -> a #

minimum :: Ord a => FingerTree a -> a #

sum :: Num a => FingerTree a -> a #

product :: Num a => FingerTree a -> a #

Foldable Node 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Node m -> m #

foldMap :: Monoid m => (a -> m) -> Node a -> m #

foldMap' :: Monoid m => (a -> m) -> Node a -> m #

foldr :: (a -> b -> b) -> b -> Node a -> b #

foldr' :: (a -> b -> b) -> b -> Node a -> b #

foldl :: (b -> a -> b) -> b -> Node a -> b #

foldl' :: (b -> a -> b) -> b -> Node a -> b #

foldr1 :: (a -> a -> a) -> Node a -> a #

foldl1 :: (a -> a -> a) -> Node a -> a #

toList :: Node a -> [a] #

null :: Node a -> Bool #

length :: Node a -> Int #

elem :: Eq a => a -> Node a -> Bool #

maximum :: Ord a => Node a -> a #

minimum :: Ord a => Node a -> a #

sum :: Num a => Node a -> a #

product :: Num a => Node a -> a #

Foldable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Seq m -> m #

foldMap :: Monoid m => (a -> m) -> Seq a -> m #

foldMap' :: Monoid m => (a -> m) -> Seq a -> m #

foldr :: (a -> b -> b) -> b -> Seq a -> b #

foldr' :: (a -> b -> b) -> b -> Seq a -> b #

foldl :: (b -> a -> b) -> b -> Seq a -> b #

foldl' :: (b -> a -> b) -> b -> Seq a -> b #

foldr1 :: (a -> a -> a) -> Seq a -> a #

foldl1 :: (a -> a -> a) -> Seq a -> a #

toList :: Seq a -> [a] #

null :: Seq a -> Bool #

length :: Seq a -> Int #

elem :: Eq a => a -> Seq a -> Bool #

maximum :: Ord a => Seq a -> a #

minimum :: Ord a => Seq a -> a #

sum :: Num a => Seq a -> a #

product :: Num a => Seq a -> a #

Foldable ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => ViewL m -> m #

foldMap :: Monoid m => (a -> m) -> ViewL a -> m #

foldMap' :: Monoid m => (a -> m) -> ViewL a -> m #

foldr :: (a -> b -> b) -> b -> ViewL a -> b #

foldr' :: (a -> b -> b) -> b -> ViewL a -> b #

foldl :: (b -> a -> b) -> b -> ViewL a -> b #

foldl' :: (b -> a -> b) -> b -> ViewL a -> b #

foldr1 :: (a -> a -> a) -> ViewL a -> a #

foldl1 :: (a -> a -> a) -> ViewL a -> a #

toList :: ViewL a -> [a] #

null :: ViewL a -> Bool #

length :: ViewL a -> Int #

elem :: Eq a => a -> ViewL a -> Bool #

maximum :: Ord a => ViewL a -> a #

minimum :: Ord a => ViewL a -> a #

sum :: Num a => ViewL a -> a #

product :: Num a => ViewL a -> a #

Foldable ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => ViewR m -> m #

foldMap :: Monoid m => (a -> m) -> ViewR a -> m #

foldMap' :: Monoid m => (a -> m) -> ViewR a -> m #

foldr :: (a -> b -> b) -> b -> ViewR a -> b #

foldr' :: (a -> b -> b) -> b -> ViewR a -> b #

foldl :: (b -> a -> b) -> b -> ViewR a -> b #

foldl' :: (b -> a -> b) -> b -> ViewR a -> b #

foldr1 :: (a -> a -> a) -> ViewR a -> a #

foldl1 :: (a -> a -> a) -> ViewR a -> a #

toList :: ViewR a -> [a] #

null :: ViewR a -> Bool #

length :: ViewR a -> Int #

elem :: Eq a => a -> ViewR a -> Bool #

maximum :: Ord a => ViewR a -> a #

minimum :: Ord a => ViewR a -> a #

sum :: Num a => ViewR a -> a #

product :: Num a => ViewR a -> a #

Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Methods

fold :: Monoid m => Set m -> m #

foldMap :: Monoid m => (a -> m) -> Set a -> m #

foldMap' :: Monoid m => (a -> m) -> Set a -> m #

foldr :: (a -> b -> b) -> b -> Set a -> b #

foldr' :: (a -> b -> b) -> b -> Set a -> b #

foldl :: (b -> a -> b) -> b -> Set a -> b #

foldl' :: (b -> a -> b) -> b -> Set a -> b #

foldr1 :: (a -> a -> a) -> Set a -> a #

foldl1 :: (a -> a -> a) -> Set a -> a #

toList :: Set a -> [a] #

null :: Set a -> Bool #

length :: Set a -> Int #

elem :: Eq a => a -> Set a -> Bool #

maximum :: Ord a => Set a -> a #

minimum :: Ord a => Set a -> a #

sum :: Num a => Set a -> a #

product :: Num a => Set a -> a #

Foldable Tree 
Instance details

Defined in Data.Tree

Methods

fold :: Monoid m => Tree m -> m #

foldMap :: Monoid m => (a -> m) -> Tree a -> m #

foldMap' :: Monoid m => (a -> m) -> Tree a -> m #

foldr :: (a -> b -> b) -> b -> Tree a -> b #

foldr' :: (a -> b -> b) -> b -> Tree a -> b #

foldl :: (b -> a -> b) -> b -> Tree a -> b #

foldl' :: (b -> a -> b) -> b -> Tree a -> b #

foldr1 :: (a -> a -> a) -> Tree a -> a #

foldl1 :: (a -> a -> a) -> Tree a -> a #

toList :: Tree a -> [a] #

null :: Tree a -> Bool #

length :: Tree a -> Int #

elem :: Eq a => a -> Tree a -> Bool #

maximum :: Ord a => Tree a -> a #

minimum :: Ord a => Tree a -> a #

sum :: Num a => Tree a -> a #

product :: Num a => Tree a -> a #

Foldable DList 
Instance details

Defined in Data.DList.Internal

Methods

fold :: Monoid m => DList m -> m #

foldMap :: Monoid m => (a -> m) -> DList a -> m #

foldMap' :: Monoid m => (a -> m) -> DList a -> m #

foldr :: (a -> b -> b) -> b -> DList a -> b #

foldr' :: (a -> b -> b) -> b -> DList a -> b #

foldl :: (b -> a -> b) -> b -> DList a -> b #

foldl' :: (b -> a -> b) -> b -> DList a -> b #

foldr1 :: (a -> a -> a) -> DList a -> a #

foldl1 :: (a -> a -> a) -> DList a -> a #

toList :: DList a -> [a] #

null :: DList a -> Bool #

length :: DList a -> Int #

elem :: Eq a => a -> DList a -> Bool #

maximum :: Ord a => DList a -> a #

minimum :: Ord a => DList a -> a #

sum :: Num a => DList a -> a #

product :: Num a => DList a -> a #

Foldable Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

fold :: Monoid m => Hashed m -> m #

foldMap :: Monoid m => (a -> m) -> Hashed a -> m #

foldMap' :: Monoid m => (a -> m) -> Hashed a -> m #

foldr :: (a -> b -> b) -> b -> Hashed a -> b #

foldr' :: (a -> b -> b) -> b -> Hashed a -> b #

foldl :: (b -> a -> b) -> b -> Hashed a -> b #

foldl' :: (b -> a -> b) -> b -> Hashed a -> b #

foldr1 :: (a -> a -> a) -> Hashed a -> a #

foldl1 :: (a -> a -> a) -> Hashed a -> a #

toList :: Hashed a -> [a] #

null :: Hashed a -> Bool #

length :: Hashed a -> Int #

elem :: Eq a => a -> Hashed a -> Bool #

maximum :: Ord a => Hashed a -> a #

minimum :: Ord a => Hashed a -> a #

sum :: Num a => Hashed a -> a #

product :: Num a => Hashed a -> a #

Foldable Array 
Instance details

Defined in Data.Primitive.Array

Methods

fold :: Monoid m => Array m -> m #

foldMap :: Monoid m => (a -> m) -> Array a -> m #

foldMap' :: Monoid m => (a -> m) -> Array a -> m #

foldr :: (a -> b -> b) -> b -> Array a -> b #

foldr' :: (a -> b -> b) -> b -> Array a -> b #

foldl :: (b -> a -> b) -> b -> Array a -> b #

foldl' :: (b -> a -> b) -> b -> Array a -> b #

foldr1 :: (a -> a -> a) -> Array a -> a #

foldl1 :: (a -> a -> a) -> Array a -> a #

toList :: Array a -> [a] #

null :: Array a -> Bool #

length :: Array a -> Int #

elem :: Eq a => a -> Array a -> Bool #

maximum :: Ord a => Array a -> a #

minimum :: Ord a => Array a -> a #

sum :: Num a => Array a -> a #

product :: Num a => Array a -> a #

Foldable SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fold :: Monoid m => SmallArray m -> m #

foldMap :: Monoid m => (a -> m) -> SmallArray a -> m #

foldMap' :: Monoid m => (a -> m) -> SmallArray a -> m #

foldr :: (a -> b -> b) -> b -> SmallArray a -> b #

foldr' :: (a -> b -> b) -> b -> SmallArray a -> b #

foldl :: (b -> a -> b) -> b -> SmallArray a -> b #

foldl' :: (b -> a -> b) -> b -> SmallArray a -> b #

foldr1 :: (a -> a -> a) -> SmallArray a -> a #

foldl1 :: (a -> a -> a) -> SmallArray a -> a #

toList :: SmallArray a -> [a] #

null :: SmallArray a -> Bool #

length :: SmallArray a -> Int #

elem :: Eq a => a -> SmallArray a -> Bool #

maximum :: Ord a => SmallArray a -> a #

minimum :: Ord a => SmallArray a -> a #

sum :: Num a => SmallArray a -> a #

product :: Num a => SmallArray a -> a #

Foldable HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

fold :: Monoid m => HashSet m -> m #

foldMap :: Monoid m => (a -> m) -> HashSet a -> m #

foldMap' :: Monoid m => (a -> m) -> HashSet a -> m #

foldr :: (a -> b -> b) -> b -> HashSet a -> b #

foldr' :: (a -> b -> b) -> b -> HashSet a -> b #

foldl :: (b -> a -> b) -> b -> HashSet a -> b #

foldl' :: (b -> a -> b) -> b -> HashSet a -> b #

foldr1 :: (a -> a -> a) -> HashSet a -> a #

foldl1 :: (a -> a -> a) -> HashSet a -> a #

toList :: HashSet a -> [a] #

null :: HashSet a -> Bool #

length :: HashSet a -> Int #

elem :: Eq a => a -> HashSet a -> Bool #

maximum :: Ord a => HashSet a -> a #

minimum :: Ord a => HashSet a -> a #

sum :: Num a => HashSet a -> a #

product :: Num a => HashSet a -> a #

Foldable Vector 
Instance details

Defined in Data.Vector

Methods

fold :: Monoid m => Vector m -> m #

foldMap :: Monoid m => (a -> m) -> Vector a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector a -> m #

foldr :: (a -> b -> b) -> b -> Vector a -> b #

foldr' :: (a -> b -> b) -> b -> Vector a -> b #

foldl :: (b -> a -> b) -> b -> Vector a -> b #

foldl' :: (b -> a -> b) -> b -> Vector a -> b #

foldr1 :: (a -> a -> a) -> Vector a -> a #

foldl1 :: (a -> a -> a) -> Vector a -> a #

toList :: Vector a -> [a] #

null :: Vector a -> Bool #

length :: Vector a -> Int #

elem :: Eq a => a -> Vector a -> Bool #

maximum :: Ord a => Vector a -> a #

minimum :: Ord a => Vector a -> a #

sum :: Num a => Vector a -> a #

product :: Num a => Vector a -> a #

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => NonEmpty m -> m #

foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m #

foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m #

foldr :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldl :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a #

toList :: NonEmpty a -> [a] #

null :: NonEmpty a -> Bool #

length :: NonEmpty a -> Int #

elem :: Eq a => a -> NonEmpty a -> Bool #

maximum :: Ord a => NonEmpty a -> a #

minimum :: Ord a => NonEmpty a -> a #

sum :: Num a => NonEmpty a -> a #

product :: Num a => NonEmpty a -> a #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Maybe m -> m #

foldMap :: Monoid m => (a -> m) -> Maybe a -> m #

foldMap' :: Monoid m => (a -> m) -> Maybe a -> m #

foldr :: (a -> b -> b) -> b -> Maybe a -> b #

foldr' :: (a -> b -> b) -> b -> Maybe a -> b #

foldl :: (b -> a -> b) -> b -> Maybe a -> b #

foldl' :: (b -> a -> b) -> b -> Maybe a -> b #

foldr1 :: (a -> a -> a) -> Maybe a -> a #

foldl1 :: (a -> a -> a) -> Maybe a -> a #

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

elem :: Eq a => a -> Maybe a -> Bool #

maximum :: Ord a => Maybe a -> a #

minimum :: Ord a => Maybe a -> a #

sum :: Num a => Maybe a -> a #

product :: Num a => Maybe a -> a #

Foldable Solo

Since: base-4.15

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Solo m -> m #

foldMap :: Monoid m => (a -> m) -> Solo a -> m #

foldMap' :: Monoid m => (a -> m) -> Solo a -> m #

foldr :: (a -> b -> b) -> b -> Solo a -> b #

foldr' :: (a -> b -> b) -> b -> Solo a -> b #

foldl :: (b -> a -> b) -> b -> Solo a -> b #

foldl' :: (b -> a -> b) -> b -> Solo a -> b #

foldr1 :: (a -> a -> a) -> Solo a -> a #

foldl1 :: (a -> a -> a) -> Solo a -> a #

toList :: Solo a -> [a] #

null :: Solo a -> Bool #

length :: Solo a -> Int #

elem :: Eq a => a -> Solo a -> Bool #

maximum :: Ord a => Solo a -> a #

minimum :: Ord a => Solo a -> a #

sum :: Num a => Solo a -> a #

product :: Num a => Solo a -> a #

Foldable []

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => [m] -> m #

foldMap :: Monoid m => (a -> m) -> [a] -> m #

foldMap' :: Monoid m => (a -> m) -> [a] -> m #

foldr :: (a -> b -> b) -> b -> [a] -> b #

foldr' :: (a -> b -> b) -> b -> [a] -> b #

foldl :: (b -> a -> b) -> b -> [a] -> b #

foldl' :: (b -> a -> b) -> b -> [a] -> b #

foldr1 :: (a -> a -> a) -> [a] -> a #

foldl1 :: (a -> a -> a) -> [a] -> a #

toList :: [a] -> [a] #

null :: [a] -> Bool #

length :: [a] -> Int #

elem :: Eq a => a -> [a] -> Bool #

maximum :: Ord a => [a] -> a #

minimum :: Ord a => [a] -> a #

sum :: Num a => [a] -> a #

product :: Num a => [a] -> a #

Foldable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

toList :: Either a a0 -> [a0] #

null :: Either a a0 -> Bool #

length :: Either a a0 -> Int #

elem :: Eq a0 => a0 -> Either a a0 -> Bool #

maximum :: Ord a0 => Either a a0 -> a0 #

minimum :: Ord a0 => Either a a0 -> a0 #

sum :: Num a0 => Either a a0 -> a0 #

product :: Num a0 => Either a a0 -> a0 #

Foldable (Proxy :: TYPE LiftedRep -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Proxy m -> m #

foldMap :: Monoid m => (a -> m) -> Proxy a -> m #

foldMap' :: Monoid m => (a -> m) -> Proxy a -> m #

foldr :: (a -> b -> b) -> b -> Proxy a -> b #

foldr' :: (a -> b -> b) -> b -> Proxy a -> b #

foldl :: (b -> a -> b) -> b -> Proxy a -> b #

foldl' :: (b -> a -> b) -> b -> Proxy a -> b #

foldr1 :: (a -> a -> a) -> Proxy a -> a #

foldl1 :: (a -> a -> a) -> Proxy a -> a #

toList :: Proxy a -> [a] #

null :: Proxy a -> Bool #

length :: Proxy a -> Int #

elem :: Eq a => a -> Proxy a -> Bool #

maximum :: Ord a => Proxy a -> a #

minimum :: Ord a => Proxy a -> a #

sum :: Num a => Proxy a -> a #

product :: Num a => Proxy a -> a #

Foldable (Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Arg a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Arg a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Arg a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Arg a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 #

toList :: Arg a a0 -> [a0] #

null :: Arg a a0 -> Bool #

length :: Arg a a0 -> Int #

elem :: Eq a0 => a0 -> Arg a a0 -> Bool #

maximum :: Ord a0 => Arg a a0 -> a0 #

minimum :: Ord a0 => Arg a a0 -> a0 #

sum :: Num a0 => Arg a a0 -> a0 #

product :: Num a0 => Arg a a0 -> a0 #

Foldable (Array i)

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Array i m -> m #

foldMap :: Monoid m => (a -> m) -> Array i a -> m #

foldMap' :: Monoid m => (a -> m) -> Array i a -> m #

foldr :: (a -> b -> b) -> b -> Array i a -> b #

foldr' :: (a -> b -> b) -> b -> Array i a -> b #

foldl :: (b -> a -> b) -> b -> Array i a -> b #

foldl' :: (b -> a -> b) -> b -> Array i a -> b #

foldr1 :: (a -> a -> a) -> Array i a -> a #

foldl1 :: (a -> a -> a) -> Array i a -> a #

toList :: Array i a -> [a] #

null :: Array i a -> Bool #

length :: Array i a -> Int #

elem :: Eq a => a -> Array i a -> Bool #

maximum :: Ord a => Array i a -> a #

minimum :: Ord a => Array i a -> a #

sum :: Num a => Array i a -> a #

product :: Num a => Array i a -> a #

Foldable (U1 :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => U1 m -> m #

foldMap :: Monoid m => (a -> m) -> U1 a -> m #

foldMap' :: Monoid m => (a -> m) -> U1 a -> m #

foldr :: (a -> b -> b) -> b -> U1 a -> b #

foldr' :: (a -> b -> b) -> b -> U1 a -> b #

foldl :: (b -> a -> b) -> b -> U1 a -> b #

foldl' :: (b -> a -> b) -> b -> U1 a -> b #

foldr1 :: (a -> a -> a) -> U1 a -> a #

foldl1 :: (a -> a -> a) -> U1 a -> a #

toList :: U1 a -> [a] #

null :: U1 a -> Bool #

length :: U1 a -> Int #

elem :: Eq a => a -> U1 a -> Bool #

maximum :: Ord a => U1 a -> a #

minimum :: Ord a => U1 a -> a #

sum :: Num a => U1 a -> a #

product :: Num a => U1 a -> a #

Foldable (UAddr :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UAddr m -> m #

foldMap :: Monoid m => (a -> m) -> UAddr a -> m #

foldMap' :: Monoid m => (a -> m) -> UAddr a -> m #

foldr :: (a -> b -> b) -> b -> UAddr a -> b #

foldr' :: (a -> b -> b) -> b -> UAddr a -> b #

foldl :: (b -> a -> b) -> b -> UAddr a -> b #

foldl' :: (b -> a -> b) -> b -> UAddr a -> b #

foldr1 :: (a -> a -> a) -> UAddr a -> a #

foldl1 :: (a -> a -> a) -> UAddr a -> a #

toList :: UAddr a -> [a] #

null :: UAddr a -> Bool #

length :: UAddr a -> Int #

elem :: Eq a => a -> UAddr a -> Bool #

maximum :: Ord a => UAddr a -> a #

minimum :: Ord a => UAddr a -> a #

sum :: Num a => UAddr a -> a #

product :: Num a => UAddr a -> a #

Foldable (UChar :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UChar m -> m #

foldMap :: Monoid m => (a -> m) -> UChar a -> m #

foldMap' :: Monoid m => (a -> m) -> UChar a -> m #

foldr :: (a -> b -> b) -> b -> UChar a -> b #

foldr' :: (a -> b -> b) -> b -> UChar a -> b #

foldl :: (b -> a -> b) -> b -> UChar a -> b #

foldl' :: (b -> a -> b) -> b -> UChar a -> b #

foldr1 :: (a -> a -> a) -> UChar a -> a #

foldl1 :: (a -> a -> a) -> UChar a -> a #

toList :: UChar a -> [a] #

null :: UChar a -> Bool #

length :: UChar a -> Int #

elem :: Eq a => a -> UChar a -> Bool #

maximum :: Ord a => UChar a -> a #

minimum :: Ord a => UChar a -> a #

sum :: Num a => UChar a -> a #

product :: Num a => UChar a -> a #

Foldable (UDouble :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UDouble m -> m #

foldMap :: Monoid m => (a -> m) -> UDouble a -> m #

foldMap' :: Monoid m => (a -> m) -> UDouble a -> m #

foldr :: (a -> b -> b) -> b -> UDouble a -> b #

foldr' :: (a -> b -> b) -> b -> UDouble a -> b #

foldl :: (b -> a -> b) -> b -> UDouble a -> b #

foldl' :: (b -> a -> b) -> b -> UDouble a -> b #

foldr1 :: (a -> a -> a) -> UDouble a -> a #

foldl1 :: (a -> a -> a) -> UDouble a -> a #

toList :: UDouble a -> [a] #

null :: UDouble a -> Bool #

length :: UDouble a -> Int #

elem :: Eq a => a -> UDouble a -> Bool #

maximum :: Ord a => UDouble a -> a #

minimum :: Ord a => UDouble a -> a #

sum :: Num a => UDouble a -> a #

product :: Num a => UDouble a -> a #

Foldable (UFloat :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UFloat m -> m #

foldMap :: Monoid m => (a -> m) -> UFloat a -> m #

foldMap' :: Monoid m => (a -> m) -> UFloat a -> m #

foldr :: (a -> b -> b) -> b -> UFloat a -> b #

foldr' :: (a -> b -> b) -> b -> UFloat a -> b #

foldl :: (b -> a -> b) -> b -> UFloat a -> b #

foldl' :: (b -> a -> b) -> b -> UFloat a -> b #

foldr1 :: (a -> a -> a) -> UFloat a -> a #

foldl1 :: (a -> a -> a) -> UFloat a -> a #

toList :: UFloat a -> [a] #

null :: UFloat a -> Bool #

length :: UFloat a -> Int #

elem :: Eq a => a -> UFloat a -> Bool #

maximum :: Ord a => UFloat a -> a #

minimum :: Ord a => UFloat a -> a #

sum :: Num a => UFloat a -> a #

product :: Num a => UFloat a -> a #

Foldable (UInt :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UInt m -> m #

foldMap :: Monoid m => (a -> m) -> UInt a -> m #

foldMap' :: Monoid m => (a -> m) -> UInt a -> m #

foldr :: (a -> b -> b) -> b -> UInt a -> b #

foldr' :: (a -> b -> b) -> b -> UInt a -> b #

foldl :: (b -> a -> b) -> b -> UInt a -> b #

foldl' :: (b -> a -> b) -> b -> UInt a -> b #

foldr1 :: (a -> a -> a) -> UInt a -> a #

foldl1 :: (a -> a -> a) -> UInt a -> a #

toList :: UInt a -> [a] #

null :: UInt a -> Bool #

length :: UInt a -> Int #

elem :: Eq a => a -> UInt a -> Bool #

maximum :: Ord a => UInt a -> a #

minimum :: Ord a => UInt a -> a #

sum :: Num a => UInt a -> a #

product :: Num a => UInt a -> a #

Foldable (UWord :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UWord m -> m #

foldMap :: Monoid m => (a -> m) -> UWord a -> m #

foldMap' :: Monoid m => (a -> m) -> UWord a -> m #

foldr :: (a -> b -> b) -> b -> UWord a -> b #

foldr' :: (a -> b -> b) -> b -> UWord a -> b #

foldl :: (b -> a -> b) -> b -> UWord a -> b #

foldl' :: (b -> a -> b) -> b -> UWord a -> b #

foldr1 :: (a -> a -> a) -> UWord a -> a #

foldl1 :: (a -> a -> a) -> UWord a -> a #

toList :: UWord a -> [a] #

null :: UWord a -> Bool #

length :: UWord a -> Int #

elem :: Eq a => a -> UWord a -> Bool #

maximum :: Ord a => UWord a -> a #

minimum :: Ord a => UWord a -> a #

sum :: Num a => UWord a -> a #

product :: Num a => UWord a -> a #

Foldable (V1 :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => V1 m -> m #

foldMap :: Monoid m => (a -> m) -> V1 a -> m #

foldMap' :: Monoid m => (a -> m) -> V1 a -> m #

foldr :: (a -> b -> b) -> b -> V1 a -> b #

foldr' :: (a -> b -> b) -> b -> V1 a -> b #

foldl :: (b -> a -> b) -> b -> V1 a -> b #

foldl' :: (b -> a -> b) -> b -> V1 a -> b #

foldr1 :: (a -> a -> a) -> V1 a -> a #

foldl1 :: (a -> a -> a) -> V1 a -> a #

toList :: V1 a -> [a] #

null :: V1 a -> Bool #

length :: V1 a -> Int #

elem :: Eq a => a -> V1 a -> Bool #

maximum :: Ord a => V1 a -> a #

minimum :: Ord a => V1 a -> a #

sum :: Num a => V1 a -> a #

product :: Num a => V1 a -> a #

Foldable (Map k)

Folds in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m #

foldMap :: Monoid m => (a -> m) -> Map k a -> m #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m #

foldr :: (a -> b -> b) -> b -> Map k a -> b #

foldr' :: (a -> b -> b) -> b -> Map k a -> b #

foldl :: (b -> a -> b) -> b -> Map k a -> b #

foldl' :: (b -> a -> b) -> b -> Map k a -> b #

foldr1 :: (a -> a -> a) -> Map k a -> a #

foldl1 :: (a -> a -> a) -> Map k a -> a #

toList :: Map k a -> [a] #

null :: Map k a -> Bool #

length :: Map k a -> Int #

elem :: Eq a => a -> Map k a -> Bool #

maximum :: Ord a => Map k a -> a #

minimum :: Ord a => Map k a -> a #

sum :: Num a => Map k a -> a #

product :: Num a => Map k a -> a #

Foldable (Validation e) 
Instance details

Defined in Data.Either.Validation

Methods

fold :: Monoid m => Validation e m -> m #

foldMap :: Monoid m => (a -> m) -> Validation e a -> m #

foldMap' :: Monoid m => (a -> m) -> Validation e a -> m #

foldr :: (a -> b -> b) -> b -> Validation e a -> b #

foldr' :: (a -> b -> b) -> b -> Validation e a -> b #

foldl :: (b -> a -> b) -> b -> Validation e a -> b #

foldl' :: (b -> a -> b) -> b -> Validation e a -> b #

foldr1 :: (a -> a -> a) -> Validation e a -> a #

foldl1 :: (a -> a -> a) -> Validation e a -> a #

toList :: Validation e a -> [a] #

null :: Validation e a -> Bool #

length :: Validation e a -> Int #

elem :: Eq a => a -> Validation e a -> Bool #

maximum :: Ord a => Validation e a -> a #

minimum :: Ord a => Validation e a -> a #

sum :: Num a => Validation e a -> a #

product :: Num a => Validation e a -> a #

Foldable f => Foldable (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

fold :: Monoid m => Cofree f m -> m #

foldMap :: Monoid m => (a -> m) -> Cofree f a -> m #

foldMap' :: Monoid m => (a -> m) -> Cofree f a -> m #

foldr :: (a -> b -> b) -> b -> Cofree f a -> b #

foldr' :: (a -> b -> b) -> b -> Cofree f a -> b #

foldl :: (b -> a -> b) -> b -> Cofree f a -> b #

foldl' :: (b -> a -> b) -> b -> Cofree f a -> b #

foldr1 :: (a -> a -> a) -> Cofree f a -> a #

foldl1 :: (a -> a -> a) -> Cofree f a -> a #

toList :: Cofree f a -> [a] #

null :: Cofree f a -> Bool #

length :: Cofree f a -> Int #

elem :: Eq a => a -> Cofree f a -> Bool #

maximum :: Ord a => Cofree f a -> a #

minimum :: Ord a => Cofree f a -> a #

sum :: Num a => Cofree f a -> a #

product :: Num a => Cofree f a -> a #

Foldable f => Foldable (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

fold :: Monoid m => Free f m -> m #

foldMap :: Monoid m => (a -> m) -> Free f a -> m #

foldMap' :: Monoid m => (a -> m) -> Free f a -> m #

foldr :: (a -> b -> b) -> b -> Free f a -> b #

foldr' :: (a -> b -> b) -> b -> Free f a -> b #

foldl :: (b -> a -> b) -> b -> Free f a -> b #

foldl' :: (b -> a -> b) -> b -> Free f a -> b #

foldr1 :: (a -> a -> a) -> Free f a -> a #

foldl1 :: (a -> a -> a) -> Free f a -> a #

toList :: Free f a -> [a] #

null :: Free f a -> Bool #

length :: Free f a -> Int #

elem :: Eq a => a -> Free f a -> Bool #

maximum :: Ord a => Free f a -> a #

minimum :: Ord a => Free f a -> a #

sum :: Num a => Free f a -> a #

product :: Num a => Free f a -> a #

Foldable (Under m) 
Instance details

Defined in Control.Selective

Methods

fold :: Monoid m0 => Under m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> Under m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> Under m a -> m0 #

foldr :: (a -> b -> b) -> b -> Under m a -> b #

foldr' :: (a -> b -> b) -> b -> Under m a -> b #

foldl :: (b -> a -> b) -> b -> Under m a -> b #

foldl' :: (b -> a -> b) -> b -> Under m a -> b #

foldr1 :: (a -> a -> a) -> Under m a -> a #

foldl1 :: (a -> a -> a) -> Under m a -> a #

toList :: Under m a -> [a] #

null :: Under m a -> Bool #

length :: Under m a -> Int #

elem :: Eq a => a -> Under m a -> Bool #

maximum :: Ord a => Under m a -> a #

minimum :: Ord a => Under m a -> a #

sum :: Num a => Under m a -> a #

product :: Num a => Under m a -> a #

Foldable f => Foldable (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

fold :: Monoid m => Lift f m -> m #

foldMap :: Monoid m => (a -> m) -> Lift f a -> m #

foldMap' :: Monoid m => (a -> m) -> Lift f a -> m #

foldr :: (a -> b -> b) -> b -> Lift f a -> b #

foldr' :: (a -> b -> b) -> b -> Lift f a -> b #

foldl :: (b -> a -> b) -> b -> Lift f a -> b #

foldl' :: (b -> a -> b) -> b -> Lift f a -> b #

foldr1 :: (a -> a -> a) -> Lift f a -> a #

foldl1 :: (a -> a -> a) -> Lift f a -> a #

toList :: Lift f a -> [a] #

null :: Lift f a -> Bool #

length :: Lift f a -> Int #

elem :: Eq a => a -> Lift f a -> Bool #

maximum :: Ord a => Lift f a -> a #

minimum :: Ord a => Lift f a -> a #

sum :: Num a => Lift f a -> a #

product :: Num a => Lift f a -> a #

Foldable f => Foldable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fold :: Monoid m => MaybeT f m -> m #

foldMap :: Monoid m => (a -> m) -> MaybeT f a -> m #

foldMap' :: Monoid m => (a -> m) -> MaybeT f a -> m #

foldr :: (a -> b -> b) -> b -> MaybeT f a -> b #

foldr' :: (a -> b -> b) -> b -> MaybeT f a -> b #

foldl :: (b -> a -> b) -> b -> MaybeT f a -> b #

foldl' :: (b -> a -> b) -> b -> MaybeT f a -> b #

foldr1 :: (a -> a -> a) -> MaybeT f a -> a #

foldl1 :: (a -> a -> a) -> MaybeT f a -> a #

toList :: MaybeT f a -> [a] #

null :: MaybeT f a -> Bool #

length :: MaybeT f a -> Int #

elem :: Eq a => a -> MaybeT f a -> Bool #

maximum :: Ord a => MaybeT f a -> a #

minimum :: Ord a => MaybeT f a -> a #

sum :: Num a => MaybeT f a -> a #

product :: Num a => MaybeT f a -> a #

Foldable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fold :: Monoid m => HashMap k m -> m #

foldMap :: Monoid m => (a -> m) -> HashMap k a -> m #

foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m #

foldr :: (a -> b -> b) -> b -> HashMap k a -> b #

foldr' :: (a -> b -> b) -> b -> HashMap k a -> b #

foldl :: (b -> a -> b) -> b -> HashMap k a -> b #

foldl' :: (b -> a -> b) -> b -> HashMap k a -> b #

foldr1 :: (a -> a -> a) -> HashMap k a -> a #

foldl1 :: (a -> a -> a) -> HashMap k a -> a #

toList :: HashMap k a -> [a] #

null :: HashMap k a -> Bool #

length :: HashMap k a -> Int #

elem :: Eq a => a -> HashMap k a -> Bool #

maximum :: Ord a => HashMap k a -> a #

minimum :: Ord a => HashMap k a -> a #

sum :: Num a => HashMap k a -> a #

product :: Num a => HashMap k a -> a #

Foldable ((,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (a, m) -> m #

foldMap :: Monoid m => (a0 -> m) -> (a, a0) -> m #

foldMap' :: Monoid m => (a0 -> m) -> (a, a0) -> m #

foldr :: (a0 -> b -> b) -> b -> (a, a0) -> b #

foldr' :: (a0 -> b -> b) -> b -> (a, a0) -> b #

foldl :: (b -> a0 -> b) -> b -> (a, a0) -> b #

foldl' :: (b -> a0 -> b) -> b -> (a, a0) -> b #

foldr1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 #

toList :: (a, a0) -> [a0] #

null :: (a, a0) -> Bool #

length :: (a, a0) -> Int #

elem :: Eq a0 => a0 -> (a, a0) -> Bool #

maximum :: Ord a0 => (a, a0) -> a0 #

minimum :: Ord a0 => (a, a0) -> a0 #

sum :: Num a0 => (a, a0) -> a0 #

product :: Num a0 => (a, a0) -> a0 #

Foldable (Const m :: TYPE LiftedRep -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Functor.Const

Methods

fold :: Monoid m0 => Const m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 #

foldr :: (a -> b -> b) -> b -> Const m a -> b #

foldr' :: (a -> b -> b) -> b -> Const m a -> b #

foldl :: (b -> a -> b) -> b -> Const m a -> b #

foldl' :: (b -> a -> b) -> b -> Const m a -> b #

foldr1 :: (a -> a -> a) -> Const m a -> a #

foldl1 :: (a -> a -> a) -> Const m a -> a #

toList :: Const m a -> [a] #

null :: Const m a -> Bool #

length :: Const m a -> Int #

elem :: Eq a => a -> Const m a -> Bool #

maximum :: Ord a => Const m a -> a #

minimum :: Ord a => Const m a -> a #

sum :: Num a => Const m a -> a #

product :: Num a => Const m a -> a #

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 #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m #

foldMap' :: Monoid m => (a -> m) -> Ap f a -> m #

foldr :: (a -> b -> b) -> b -> Ap f a -> b #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b #

foldl :: (b -> a -> b) -> b -> Ap f a -> b #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b #

foldr1 :: (a -> a -> a) -> Ap f a -> a #

foldl1 :: (a -> a -> a) -> Ap f a -> a #

toList :: Ap f a -> [a] #

null :: Ap f a -> Bool #

length :: Ap f a -> Int #

elem :: Eq a => a -> Ap f a -> Bool #

maximum :: Ord a => Ap f a -> a #

minimum :: Ord a => Ap f a -> a #

sum :: Num a => Ap f a -> a #

product :: Num a => Ap f a -> a #

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 #

foldMap :: Monoid m => (a -> m) -> Alt f a -> m #

foldMap' :: Monoid m => (a -> m) -> Alt f a -> m #

foldr :: (a -> b -> b) -> b -> Alt f a -> b #

foldr' :: (a -> b -> b) -> b -> Alt f a -> b #

foldl :: (b -> a -> b) -> b -> Alt f a -> b #

foldl' :: (b -> a -> b) -> b -> Alt f a -> b #

foldr1 :: (a -> a -> a) -> Alt f a -> a #

foldl1 :: (a -> a -> a) -> Alt f a -> a #

toList :: Alt f a -> [a] #

null :: Alt f a -> Bool #

length :: Alt f a -> Int #

elem :: Eq a => a -> Alt f a -> Bool #

maximum :: Ord a => Alt f a -> a #

minimum :: Ord a => Alt f a -> a #

sum :: Num a => Alt f a -> a #

product :: Num a => Alt f a -> a #

Foldable f => Foldable (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Rec1 f m -> m #

foldMap :: Monoid m => (a -> m) -> Rec1 f a -> m #

foldMap' :: Monoid m => (a -> m) -> Rec1 f a -> m #

foldr :: (a -> b -> b) -> b -> Rec1 f a -> b #

foldr' :: (a -> b -> b) -> b -> Rec1 f a -> b #

foldl :: (b -> a -> b) -> b -> Rec1 f a -> b #

foldl' :: (b -> a -> b) -> b -> Rec1 f a -> b #

foldr1 :: (a -> a -> a) -> Rec1 f a -> a #

foldl1 :: (a -> a -> a) -> Rec1 f a -> a #

toList :: Rec1 f a -> [a] #

null :: Rec1 f a -> Bool #

length :: Rec1 f a -> Int #

elem :: Eq a => a -> Rec1 f a -> Bool #

maximum :: Ord a => Rec1 f a -> a #

minimum :: Ord a => Rec1 f a -> a #

sum :: Num a => Rec1 f a -> a #

product :: Num a => Rec1 f a -> a #

Bifoldable p => Foldable (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

fold :: Monoid m => Fix p m -> m #

foldMap :: Monoid m => (a -> m) -> Fix p a -> m #

foldMap' :: Monoid m => (a -> m) -> Fix p a -> m #

foldr :: (a -> b -> b) -> b -> Fix p a -> b #

foldr' :: (a -> b -> b) -> b -> Fix p a -> b #

foldl :: (b -> a -> b) -> b -> Fix p a -> b #

foldl' :: (b -> a -> b) -> b -> Fix p a -> b #

foldr1 :: (a -> a -> a) -> Fix p a -> a #

foldl1 :: (a -> a -> a) -> Fix p a -> a #

toList :: Fix p a -> [a] #

null :: Fix p a -> Bool #

length :: Fix p a -> Int #

elem :: Eq a => a -> Fix p a -> Bool #

maximum :: Ord a => Fix p a -> a #

minimum :: Ord a => Fix p a -> a #

sum :: Num a => Fix p a -> a #

product :: Num a => Fix p a -> a #

Bifoldable p => Foldable (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

fold :: Monoid m => Join p m -> m #

foldMap :: Monoid m => (a -> m) -> Join p a -> m #

foldMap' :: Monoid m => (a -> m) -> Join p a -> m #

foldr :: (a -> b -> b) -> b -> Join p a -> b #

foldr' :: (a -> b -> b) -> b -> Join p a -> b #

foldl :: (b -> a -> b) -> b -> Join p a -> b #

foldl' :: (b -> a -> b) -> b -> Join p a -> b #

foldr1 :: (a -> a -> a) -> Join p a -> a #

foldl1 :: (a -> a -> a) -> Join p a -> a #

toList :: Join p a -> [a] #

null :: Join p a -> Bool #

length :: Join p a -> Int #

elem :: Eq a => a -> Join p a -> Bool #

maximum :: Ord a => Join p a -> a #

minimum :: Ord a => Join p a -> a #

sum :: Num a => Join p a -> a #

product :: Num a => Join p a -> a #

Foldable f => Foldable (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fold :: Monoid m => FreeF f a m -> m #

foldMap :: Monoid m => (a0 -> m) -> FreeF f a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> FreeF f a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> FreeF f a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> FreeF f a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> FreeF f a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> FreeF f a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> FreeF f a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> FreeF f a a0 -> a0 #

toList :: FreeF f a a0 -> [a0] #

null :: FreeF f a a0 -> Bool #

length :: FreeF f a a0 -> Int #

elem :: Eq a0 => a0 -> FreeF f a a0 -> Bool #

maximum :: Ord a0 => FreeF f a a0 -> a0 #

minimum :: Ord a0 => FreeF f a a0 -> a0 #

sum :: Num a0 => FreeF f a a0 -> a0 #

product :: Num a0 => FreeF f a a0 -> a0 #

(Foldable m, Foldable f) => Foldable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fold :: Monoid m0 => FreeT f m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> FreeT f m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> FreeT f m a -> m0 #

foldr :: (a -> b -> b) -> b -> FreeT f m a -> b #

foldr' :: (a -> b -> b) -> b -> FreeT f m a -> b #

foldl :: (b -> a -> b) -> b -> FreeT f m a -> b #

foldl' :: (b -> a -> b) -> b -> FreeT f m a -> b #

foldr1 :: (a -> a -> a) -> FreeT f m a -> a #

foldl1 :: (a -> a -> a) -> FreeT f m a -> a #

toList :: FreeT f m a -> [a] #

null :: FreeT f m a -> Bool #

length :: FreeT f m a -> Int #

elem :: Eq a => a -> FreeT f m a -> Bool #

maximum :: Ord a => FreeT f m a -> a #

minimum :: Ord a => FreeT f m a -> a #

sum :: Num a => FreeT f m a -> a #

product :: Num a => FreeT f m a -> a #

Foldable f => Foldable (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

fold :: Monoid m => WrappedFunctor f m -> m #

foldMap :: Monoid m => (a -> m) -> WrappedFunctor f a -> m #

foldMap' :: Monoid m => (a -> m) -> WrappedFunctor f a -> m #

foldr :: (a -> b -> b) -> b -> WrappedFunctor f a -> b #

foldr' :: (a -> b -> b) -> b -> WrappedFunctor f a -> b #

foldl :: (b -> a -> b) -> b -> WrappedFunctor f a -> b #

foldl' :: (b -> a -> b) -> b -> WrappedFunctor f a -> b #

foldr1 :: (a -> a -> a) -> WrappedFunctor f a -> a #

foldl1 :: (a -> a -> a) -> WrappedFunctor f a -> a #

toList :: WrappedFunctor f a -> [a] #

null :: WrappedFunctor f a -> Bool #

length :: WrappedFunctor f a -> Int #

elem :: Eq a => a -> WrappedFunctor f a -> Bool #

maximum :: Ord a => WrappedFunctor f a -> a #

minimum :: Ord a => WrappedFunctor f a -> a #

sum :: Num a => WrappedFunctor f a -> a #

product :: Num a => WrappedFunctor f a -> a #

Foldable (Baz t b) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

fold :: Monoid m => Baz t b m -> m #

foldMap :: Monoid m => (a -> m) -> Baz t b a -> m #

foldMap' :: Monoid m => (a -> m) -> Baz t b a -> m #

foldr :: (a -> b0 -> b0) -> b0 -> Baz t b a -> b0 #

foldr' :: (a -> b0 -> b0) -> b0 -> Baz t b a -> b0 #

foldl :: (b0 -> a -> b0) -> b0 -> Baz t b a -> b0 #

foldl' :: (b0 -> a -> b0) -> b0 -> Baz t b a -> b0 #

foldr1 :: (a -> a -> a) -> Baz t b a -> a #

foldl1 :: (a -> a -> a) -> Baz t b a -> a #

toList :: Baz t b a -> [a] #

null :: Baz t b a -> Bool #

length :: Baz t b a -> Int #

elem :: Eq a => a -> Baz t b a -> Bool #

maximum :: Ord a => Baz t b a -> a #

minimum :: Ord a => Baz t b a -> a #

sum :: Num a => Baz t b a -> a #

product :: Num a => Baz t b a -> a #

Foldable (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

fold :: Monoid m => Tagged s m -> m #

foldMap :: Monoid m => (a -> m) -> Tagged s a -> m #

foldMap' :: Monoid m => (a -> m) -> Tagged s a -> m #

foldr :: (a -> b -> b) -> b -> Tagged s a -> b #

foldr' :: (a -> b -> b) -> b -> Tagged s a -> b #

foldl :: (b -> a -> b) -> b -> Tagged s a -> b #

foldl' :: (b -> a -> b) -> b -> Tagged s a -> b #

foldr1 :: (a -> a -> a) -> Tagged s a -> a #

foldl1 :: (a -> a -> a) -> Tagged s a -> a #

toList :: Tagged s a -> [a] #

null :: Tagged s a -> Bool #

length :: Tagged s a -> Int #

elem :: Eq a => a -> Tagged s a -> Bool #

maximum :: Ord a => Tagged s a -> a #

minimum :: Ord a => Tagged s a -> a #

sum :: Num a => Tagged s a -> a #

product :: Num a => Tagged s a -> a #

Foldable f => Foldable (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

fold :: Monoid m => Backwards f m -> m #

foldMap :: Monoid m => (a -> m) -> Backwards f a -> m #

foldMap' :: Monoid m => (a -> m) -> Backwards f a -> m #

foldr :: (a -> b -> b) -> b -> Backwards f a -> b #

foldr' :: (a -> b -> b) -> b -> Backwards f a -> b #

foldl :: (b -> a -> b) -> b -> Backwards f a -> b #

foldl' :: (b -> a -> b) -> b -> Backwards f a -> b #

foldr1 :: (a -> a -> a) -> Backwards f a -> a #

foldl1 :: (a -> a -> a) -> Backwards f a -> a #

toList :: Backwards f a -> [a] #

null :: Backwards f a -> Bool #

length :: Backwards f a -> Int #

elem :: Eq a => a -> Backwards f a -> Bool #

maximum :: Ord a => Backwards f a -> a #

minimum :: Ord a => Backwards f a -> a #

sum :: Num a => Backwards f a -> a #

product :: Num a => Backwards f a -> a #

Foldable f => Foldable (ErrorT e f) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

fold :: Monoid m => ErrorT e f m -> m #

foldMap :: Monoid m => (a -> m) -> ErrorT e f a -> m #

foldMap' :: Monoid m => (a -> m) -> ErrorT e f a -> m #

foldr :: (a -> b -> b) -> b -> ErrorT e f a -> b #

foldr' :: (a -> b -> b) -> b -> ErrorT e f a -> b #

foldl :: (b -> a -> b) -> b -> ErrorT e f a -> b #

foldl' :: (b -> a -> b) -> b -> ErrorT e f a -> b #

foldr1 :: (a -> a -> a) -> ErrorT e f a -> a #

foldl1 :: (a -> a -> a) -> ErrorT e f a -> a #

toList :: ErrorT e f a -> [a] #

null :: ErrorT e f a -> Bool #

length :: ErrorT e f a -> Int #

elem :: Eq a => a -> ErrorT e f a -> Bool #

maximum :: Ord a => ErrorT e f a -> a #

minimum :: Ord a => ErrorT e f a -> a #

sum :: Num a => ErrorT e f a -> a #

product :: Num a => ErrorT e f a -> a #

Foldable f => Foldable (ExceptT e f) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fold :: Monoid m => ExceptT e f m -> m #

foldMap :: Monoid m => (a -> m) -> ExceptT e f a -> m #

foldMap' :: Monoid m => (a -> m) -> ExceptT e f a -> m #

foldr :: (a -> b -> b) -> b -> ExceptT e f a -> b #

foldr' :: (a -> b -> b) -> b -> ExceptT e f a -> b #

foldl :: (b -> a -> b) -> b -> ExceptT e f a -> b #

foldl' :: (b -> a -> b) -> b -> ExceptT e f a -> b #

foldr1 :: (a -> a -> a) -> ExceptT e f a -> a #

foldl1 :: (a -> a -> a) -> ExceptT e f a -> a #

toList :: ExceptT e f a -> [a] #

null :: ExceptT e f a -> Bool #

length :: ExceptT e f a -> Int #

elem :: Eq a => a -> ExceptT e f a -> Bool #

maximum :: Ord a => ExceptT e f a -> a #

minimum :: Ord a => ExceptT e f a -> a #

sum :: Num a => ExceptT e f a -> a #

product :: Num a => ExceptT e f a -> a #

Foldable f => Foldable (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fold :: Monoid m => IdentityT f m -> m #

foldMap :: Monoid m => (a -> m) -> IdentityT f a -> m #

foldMap' :: Monoid m => (a -> m) -> IdentityT f a -> m #

foldr :: (a -> b -> b) -> b -> IdentityT f a -> b #

foldr' :: (a -> b -> b) -> b -> IdentityT f a -> b #

foldl :: (b -> a -> b) -> b -> IdentityT f a -> b #

foldl' :: (b -> a -> b) -> b -> IdentityT f a -> b #

foldr1 :: (a -> a -> a) -> IdentityT f a -> a #

foldl1 :: (a -> a -> a) -> IdentityT f a -> a #

toList :: IdentityT f a -> [a] #

null :: IdentityT f a -> Bool #

length :: IdentityT f a -> Int #

elem :: Eq a => a -> IdentityT f a -> Bool #

maximum :: Ord a => IdentityT f a -> a #

minimum :: Ord a => IdentityT f a -> a #

sum :: Num a => IdentityT f a -> a #

product :: Num a => IdentityT f a -> a #

Foldable f => Foldable (WriterT w f) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fold :: Monoid m => WriterT w f m -> m #

foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldr :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldl :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldr1 :: (a -> a -> a) -> WriterT w f a -> a #

foldl1 :: (a -> a -> a) -> WriterT w f a -> a #

toList :: WriterT w f a -> [a] #

null :: WriterT w f a -> Bool #

length :: WriterT w f a -> Int #

elem :: Eq a => a -> WriterT w f a -> Bool #

maximum :: Ord a => WriterT w f a -> a #

minimum :: Ord a => WriterT w f a -> a #

sum :: Num a => WriterT w f a -> a #

product :: Num a => WriterT w f a -> a #

Foldable f => Foldable (WriterT w f) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

fold :: Monoid m => WriterT w f m -> m #

foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldr :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldl :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldr1 :: (a -> a -> a) -> WriterT w f a -> a #

foldl1 :: (a -> a -> a) -> WriterT w f a -> a #

toList :: WriterT w f a -> [a] #

null :: WriterT w f a -> Bool #

length :: WriterT w f a -> Int #

elem :: Eq a => a -> WriterT w f a -> Bool #

maximum :: Ord a => WriterT w f a -> a #

minimum :: Ord a => WriterT w f a -> a #

sum :: Num a => WriterT w f a -> a #

product :: Num a => WriterT w f a -> a #

Foldable (Constant a :: TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

fold :: Monoid m => Constant a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Constant a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Constant a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Constant a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Constant a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Constant a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Constant a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 #

toList :: Constant a a0 -> [a0] #

null :: Constant a a0 -> Bool #

length :: Constant a a0 -> Int #

elem :: Eq a0 => a0 -> Constant a a0 -> Bool #

maximum :: Ord a0 => Constant a a0 -> a0 #

minimum :: Ord a0 => Constant a a0 -> a0 #

sum :: Num a0 => Constant a a0 -> a0 #

product :: Num a0 => Constant a a0 -> a0 #

Foldable f => Foldable (Reverse f)

Fold from right to left.

Instance details

Defined in Data.Functor.Reverse

Methods

fold :: Monoid m => Reverse f m -> m #

foldMap :: Monoid m => (a -> m) -> Reverse f a -> m #

foldMap' :: Monoid m => (a -> m) -> Reverse f a -> m #

foldr :: (a -> b -> b) -> b -> Reverse f a -> b #

foldr' :: (a -> b -> b) -> b -> Reverse f a -> b #

foldl :: (b -> a -> b) -> b -> Reverse f a -> b #

foldl' :: (b -> a -> b) -> b -> Reverse f a -> b #

foldr1 :: (a -> a -> a) -> Reverse f a -> a #

foldl1 :: (a -> a -> a) -> Reverse f a -> a #

toList :: Reverse f a -> [a] #

null :: Reverse f a -> Bool #

length :: Reverse f a -> Int #

elem :: Eq a => a -> Reverse f a -> Bool #

maximum :: Ord a => Reverse f a -> a #

minimum :: Ord a => Reverse f a -> a #

sum :: Num a => Reverse f a -> a #

product :: Num a => Reverse f a -> a #

(Foldable f, Foldable g) => Foldable (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

fold :: Monoid m => Product f g m -> m #

foldMap :: Monoid m => (a -> m) -> Product f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Product f g a -> m #

foldr :: (a -> b -> b) -> b -> Product f g a -> b #

foldr' :: (a -> b -> b) -> b -> Product f g a -> b #

foldl :: (b -> a -> b) -> b -> Product f g a -> b #

foldl' :: (b -> a -> b) -> b -> Product f g a -> b #

foldr1 :: (a -> a -> a) -> Product f g a -> a #

foldl1 :: (a -> a -> a) -> Product f g a -> a #

toList :: Product f g a -> [a] #

null :: Product f g a -> Bool #

length :: Product f g a -> Int #

elem :: Eq a => a -> Product f g a -> Bool #

maximum :: Ord a => Product f g a -> a #

minimum :: Ord a => Product f g a -> a #

sum :: Num a => Product f g a -> a #

product :: Num a => Product f g a -> a #

(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 #

foldMap :: Monoid m => (a -> m) -> Sum f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Sum f g a -> m #

foldr :: (a -> b -> b) -> b -> Sum f g a -> b #

foldr' :: (a -> b -> b) -> b -> Sum f g a -> b #

foldl :: (b -> a -> b) -> b -> Sum f g a -> b #

foldl' :: (b -> a -> b) -> b -> Sum f g a -> b #

foldr1 :: (a -> a -> a) -> Sum f g a -> a #

foldl1 :: (a -> a -> a) -> Sum f g a -> a #

toList :: Sum f g a -> [a] #

null :: Sum f g a -> Bool #

length :: Sum f g a -> Int #

elem :: Eq a => a -> Sum f g a -> Bool #

maximum :: Ord a => Sum f g a -> a #

minimum :: Ord a => Sum f g a -> a #

sum :: Num a => Sum f g a -> a #

product :: Num a => Sum f g a -> a #

(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 #

foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m #

foldr :: (a -> b -> b) -> b -> (f :*: g) a -> b #

foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b #

foldl :: (b -> a -> b) -> b -> (f :*: g) a -> b #

foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b #

foldr1 :: (a -> a -> a) -> (f :*: g) a -> a #

foldl1 :: (a -> a -> a) -> (f :*: g) a -> a #

toList :: (f :*: g) a -> [a] #

null :: (f :*: g) a -> Bool #

length :: (f :*: g) a -> Int #

elem :: Eq a => a -> (f :*: g) a -> Bool #

maximum :: Ord a => (f :*: g) a -> a #

minimum :: Ord a => (f :*: g) a -> a #

sum :: Num a => (f :*: g) a -> a #

product :: Num a => (f :*: g) a -> a #

(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 #

foldMap :: Monoid m => (a -> m) -> (f :+: g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f :+: g) a -> m #

foldr :: (a -> b -> b) -> b -> (f :+: g) a -> b #

foldr' :: (a -> b -> b) -> b -> (f :+: g) a -> b #

foldl :: (b -> a -> b) -> b -> (f :+: g) a -> b #

foldl' :: (b -> a -> b) -> b -> (f :+: g) a -> b #

foldr1 :: (a -> a -> a) -> (f :+: g) a -> a #

foldl1 :: (a -> a -> a) -> (f :+: g) a -> a #

toList :: (f :+: g) a -> [a] #

null :: (f :+: g) a -> Bool #

length :: (f :+: g) a -> Int #

elem :: Eq a => a -> (f :+: g) a -> Bool #

maximum :: Ord a => (f :+: g) a -> a #

minimum :: Ord a => (f :+: g) a -> a #

sum :: Num a => (f :+: g) a -> a #

product :: Num a => (f :+: g) a -> a #

Foldable (K1 i c :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => K1 i c m -> m #

foldMap :: Monoid m => (a -> m) -> K1 i c a -> m #

foldMap' :: Monoid m => (a -> m) -> K1 i c a -> m #

foldr :: (a -> b -> b) -> b -> K1 i c a -> b #

foldr' :: (a -> b -> b) -> b -> K1 i c a -> b #

foldl :: (b -> a -> b) -> b -> K1 i c a -> b #

foldl' :: (b -> a -> b) -> b -> K1 i c a -> b #

foldr1 :: (a -> a -> a) -> K1 i c a -> a #

foldl1 :: (a -> a -> a) -> K1 i c a -> a #

toList :: K1 i c a -> [a] #

null :: K1 i c a -> Bool #

length :: K1 i c a -> Int #

elem :: Eq a => a -> K1 i c a -> Bool #

maximum :: Ord a => K1 i c a -> a #

minimum :: Ord a => K1 i c a -> a #

sum :: Num a => K1 i c a -> a #

product :: Num a => K1 i c a -> a #

Foldable (Forget r a :: TYPE LiftedRep -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

fold :: Monoid m => Forget r a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Forget r a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Forget r a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Forget r a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Forget r a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Forget r a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Forget r a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Forget r a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Forget r a a0 -> a0 #

toList :: Forget r a a0 -> [a0] #

null :: Forget r a a0 -> Bool #

length :: Forget r a a0 -> Int #

elem :: Eq a0 => a0 -> Forget r a a0 -> Bool #

maximum :: Ord a0 => Forget r a a0 -> a0 #

minimum :: Ord a0 => Forget r a a0 -> a0 #

sum :: Num a0 => Forget r a a0 -> a0 #

product :: Num a0 => Forget r a a0 -> a0 #

(Foldable f, Foldable g) => Foldable (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fold :: Monoid m => Compose f g m -> m #

foldMap :: Monoid m => (a -> m) -> Compose f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m #

foldr :: (a -> b -> b) -> b -> Compose f g a -> b #

foldr' :: (a -> b -> b) -> b -> Compose f g a -> b #

foldl :: (b -> a -> b) -> b -> Compose f g a -> b #

foldl' :: (b -> a -> b) -> b -> Compose f g a -> b #

foldr1 :: (a -> a -> a) -> Compose f g a -> a #

foldl1 :: (a -> a -> a) -> Compose f g a -> a #

toList :: Compose f g a -> [a] #

null :: Compose f g a -> Bool #

length :: Compose f g a -> Int #

elem :: Eq a => a -> Compose f g a -> Bool #

maximum :: Ord a => Compose f g a -> a #

minimum :: Ord a => Compose f g a -> a #

sum :: Num a => Compose f g a -> a #

product :: Num a => Compose f g a -> a #

(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 #

foldMap :: Monoid m => (a -> m) -> (f :.: g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f :.: g) a -> m #

foldr :: (a -> b -> b) -> b -> (f :.: g) a -> b #

foldr' :: (a -> b -> b) -> b -> (f :.: g) a -> b #

foldl :: (b -> a -> b) -> b -> (f :.: g) a -> b #

foldl' :: (b -> a -> b) -> b -> (f :.: g) a -> b #

foldr1 :: (a -> a -> a) -> (f :.: g) a -> a #

foldl1 :: (a -> a -> a) -> (f :.: g) a -> a #

toList :: (f :.: g) a -> [a] #

null :: (f :.: g) a -> Bool #

length :: (f :.: g) a -> Int #

elem :: Eq a => a -> (f :.: g) a -> Bool #

maximum :: Ord a => (f :.: g) a -> a #

minimum :: Ord a => (f :.: g) a -> a #

sum :: Num a => (f :.: g) a -> a #

product :: Num a => (f :.: g) a -> a #

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 #

foldMap :: Monoid m => (a -> m) -> M1 i c f a -> m #

foldMap' :: Monoid m => (a -> m) -> M1 i c f a -> m #

foldr :: (a -> b -> b) -> b -> M1 i c f a -> b #

foldr' :: (a -> b -> b) -> b -> M1 i c f a -> b #

foldl :: (b -> a -> b) -> b -> M1 i c f a -> b #

foldl' :: (b -> a -> b) -> b -> M1 i c f a -> b #

foldr1 :: (a -> a -> a) -> M1 i c f a -> a #

foldl1 :: (a -> a -> a) -> M1 i c f a -> a #

toList :: M1 i c f a -> [a] #

null :: M1 i c f a -> Bool #

length :: M1 i c f a -> Int #

elem :: Eq a => a -> M1 i c f a -> Bool #

maximum :: Ord a => M1 i c f a -> a #

minimum :: Ord a => M1 i c f a -> a #

sum :: Num a => M1 i c f a -> a #

product :: Num a => M1 i c f a -> a #

Foldable (Clown f a :: TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

fold :: Monoid m => Clown f a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Clown f a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Clown f a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Clown f a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Clown f a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Clown f a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Clown f a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 #

toList :: Clown f a a0 -> [a0] #

null :: Clown f a a0 -> Bool #

length :: Clown f a a0 -> Int #

elem :: Eq a0 => a0 -> Clown f a a0 -> Bool #

maximum :: Ord a0 => Clown f a a0 -> a0 #

minimum :: Ord a0 => Clown f a a0 -> a0 #

sum :: Num a0 => Clown f a a0 -> a0 #

product :: Num a0 => Clown f a a0 -> a0 #

Bifoldable p => Foldable (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

fold :: Monoid m => Flip p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Flip p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Flip p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Flip p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Flip p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Flip p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Flip p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 #

toList :: Flip p a a0 -> [a0] #

null :: Flip p a a0 -> Bool #

length :: Flip p a a0 -> Int #

elem :: Eq a0 => a0 -> Flip p a a0 -> Bool #

maximum :: Ord a0 => Flip p a a0 -> a0 #

minimum :: Ord a0 => Flip p a a0 -> a0 #

sum :: Num a0 => Flip p a a0 -> a0 #

product :: Num a0 => Flip p a a0 -> a0 #

Foldable g => Foldable (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

fold :: Monoid m => Joker g a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Joker g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Joker g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Joker g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Joker g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Joker g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Joker g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 #

toList :: Joker g a a0 -> [a0] #

null :: Joker g a a0 -> Bool #

length :: Joker g a a0 -> Int #

elem :: Eq a0 => a0 -> Joker g a a0 -> Bool #

maximum :: Ord a0 => Joker g a a0 -> a0 #

minimum :: Ord a0 => Joker g a a0 -> a0 #

sum :: Num a0 => Joker g a a0 -> a0 #

product :: Num a0 => Joker g a a0 -> a0 #

Bifoldable p => Foldable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

fold :: Monoid m => WrappedBifunctor p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 #

toList :: WrappedBifunctor p a a0 -> [a0] #

null :: WrappedBifunctor p a a0 -> Bool #

length :: WrappedBifunctor p a a0 -> Int #

elem :: Eq a0 => a0 -> WrappedBifunctor p a a0 -> Bool #

maximum :: Ord a0 => WrappedBifunctor p a a0 -> a0 #

minimum :: Ord a0 => WrappedBifunctor p a a0 -> a0 #

sum :: Num a0 => WrappedBifunctor p a a0 -> a0 #

product :: Num a0 => WrappedBifunctor p a a0 -> a0 #

(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 #

foldMap :: Monoid m => (a0 -> m) -> Product f g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Product f g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Product f g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Product f g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Product f g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Product f g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 #

toList :: Product f g a a0 -> [a0] #

null :: Product f g a a0 -> Bool #

length :: Product f g a a0 -> Int #

elem :: Eq a0 => a0 -> Product f g a a0 -> Bool #

maximum :: Ord a0 => Product f g a a0 -> a0 #

minimum :: Ord a0 => Product f g a a0 -> a0 #

sum :: Num a0 => Product f g a a0 -> a0 #

product :: Num a0 => Product f g a a0 -> a0 #

(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 #

foldMap :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 #

toList :: Sum f g a a0 -> [a0] #

null :: Sum f g a a0 -> Bool #

length :: Sum f g a a0 -> Int #

elem :: Eq a0 => a0 -> Sum f g a a0 -> Bool #

maximum :: Ord a0 => Sum f g a a0 -> a0 #

minimum :: Ord a0 => Sum f g a a0 -> a0 #

sum :: Num a0 => Sum f g a a0 -> a0 #

product :: Num a0 => Sum f g a a0 -> a0 #

(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 #

foldMap :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 #

toList :: Tannen f p a a0 -> [a0] #

null :: Tannen f p a a0 -> Bool #

length :: Tannen f p a a0 -> Int #

elem :: Eq a0 => a0 -> Tannen f p a a0 -> Bool #

maximum :: Ord a0 => Tannen f p a a0 -> a0 #

minimum :: Ord a0 => Tannen f p a a0 -> a0 #

sum :: Num a0 => Tannen f p a a0 -> a0 #

product :: Num a0 => Tannen f p a a0 -> a0 #

(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 #

foldMap :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 #

toList :: Biff p f g a a0 -> [a0] #

null :: Biff p f g a a0 -> Bool #

length :: Biff p f g a a0 -> Int #

elem :: Eq a0 => a0 -> Biff p f g a a0 -> Bool #

maximum :: Ord a0 => Biff p f g a a0 -> a0 #

minimum :: Ord a0 => Biff p f g a a0 -> a0 #

sum :: Num a0 => Biff p f g a a0 -> a0 #

product :: Num a0 => Biff p f g a a0 -> a0 #

class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where #

Functors representing data structures that can be transformed to structures of the same shape by performing an Applicative (or, therefore, Monad) action on each element from left to right.

A more detailed description of what same shape means, the various methods, how traversals are constructed, and example advanced use-cases can be found in the Overview section of Data.Traversable.

For the class laws see the Laws section of Data.Traversable.

Minimal complete definition

traverse | sequenceA

Methods

traverse :: Applicative f => (a -> f b) -> t a -> f (t b) #

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_.

Examples

Expand

Basic usage:

In the first two examples we show each evaluated action mapping to the output structure.

>>> traverse Just [1,2,3,4]
Just [1,2,3,4]
>>> traverse id [Right 1, Right 2, Right 3, Right 4]
Right [1,2,3,4]

In the next examples, we show that Nothing and Left values short circuit the created structure.

>>> traverse (const Nothing) [1,2,3,4]
Nothing
>>> traverse (\x -> if odd x then Just x else Nothing)  [1,2,3,4]
Nothing
>>> traverse id [Right 1, Right 2, Right 3, Right 4, Left 0]
Left 0

sequenceA :: Applicative f => t (f a) -> f (t a) #

Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

Examples

Expand

Basic usage:

For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.

>>> sequenceA [Just 1, Just 2, Just 3]
Just [1,2,3]
>>> sequenceA [Right 1, Right 2, Right 3]
Right [1,2,3]

The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.

>>> sequenceA [Just 1, Just 2, Just 3, Nothing]
Nothing
>>> sequenceA [Right 1, Right 2, Right 3, Left 4]
Left 4

mapM :: Monad m => (a -> m b) -> t a -> m (t b) #

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_.

Examples

Expand

mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.

sequence :: Monad m => t (m a) -> m (t a) #

Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.

Examples

Expand

Basic usage:

The first two examples are instances where the input and and output of sequence are isomorphic.

>>> sequence $ Right [1,2,3,4]
[Right 1,Right 2,Right 3,Right 4]
>>> sequence $ [Right 1,Right 2,Right 3,Right 4]
Right [1,2,3,4]

The following examples demonstrate short circuit behavior for sequence.

>>> sequence $ Left [1,2,3,4]
Left [1,2,3,4]
>>> sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4]
Left 0

Instances

Instances details
Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) #

sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) #

mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) #

sequence :: Monad m => ZipList (m a) -> m (ZipList a) #

Traversable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

traverse :: Applicative f => (a -> f b) -> Complex a -> f (Complex b) #

sequenceA :: Applicative f => Complex (f a) -> f (Complex a) #

mapM :: Monad m => (a -> m b) -> Complex a -> m (Complex b) #

sequence :: Monad m => Complex (m a) -> m (Complex a) #

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) #

sequenceA :: Applicative f => Identity (f a) -> f (Identity a) #

mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) #

sequence :: Monad m => Identity (m a) -> m (Identity a) #

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) #

sequenceA :: Applicative f => First (f a) -> f (First a) #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) #

sequence :: Monad m => First (m a) -> m (First a) #

Traversable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) #

sequenceA :: Applicative f => Last (f a) -> f (Last a) #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) #

sequence :: Monad m => Last (m a) -> m (Last a) #

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Down a -> f (Down b) #

sequenceA :: Applicative f => Down (f a) -> f (Down a) #

mapM :: Monad m => (a -> m b) -> Down a -> m (Down b) #

sequence :: Monad m => Down (m a) -> m (Down a) #

Traversable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) #

sequenceA :: Applicative f => First (f a) -> f (First a) #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) #

sequence :: Monad m => First (m a) -> m (First a) #

Traversable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) #

sequenceA :: Applicative f => Last (f a) -> f (Last a) #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) #

sequence :: Monad m => Last (m a) -> m (Last a) #

Traversable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) #

sequenceA :: Applicative f => Max (f a) -> f (Max a) #

mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) #

sequence :: Monad m => Max (m a) -> m (Max a) #

Traversable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) #

sequenceA :: Applicative f => Min (f a) -> f (Min a) #

mapM :: Monad m => (a -> m b) -> Min a -> m (Min b) #

sequence :: Monad m => Min (m a) -> m (Min a) #

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) #

sequenceA :: Applicative f => Dual (f a) -> f (Dual a) #

mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) #

sequence :: Monad m => Dual (m a) -> m (Dual a) #

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) #

sequenceA :: Applicative f => Product (f a) -> f (Product a) #

mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) #

sequence :: Monad m => Product (m a) -> m (Product a) #

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) #

sequenceA :: Applicative f => Sum (f a) -> f (Sum a) #

mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) #

sequence :: Monad m => Sum (m a) -> m (Sum a) #

Traversable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Par1 a -> f (Par1 b) #

sequenceA :: Applicative f => Par1 (f a) -> f (Par1 a) #

mapM :: Monad m => (a -> m b) -> Par1 a -> m (Par1 b) #

sequence :: Monad m => Par1 (m a) -> m (Par1 a) #

Traversable SCC

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

traverse :: Applicative f => (a -> f b) -> SCC a -> f (SCC b) #

sequenceA :: Applicative f => SCC (f a) -> f (SCC a) #

mapM :: Monad m => (a -> m b) -> SCC a -> m (SCC b) #

sequence :: Monad m => SCC (m a) -> m (SCC a) #

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> IntMap a -> f (IntMap b) #

sequenceA :: Applicative f => IntMap (f a) -> f (IntMap a) #

mapM :: Monad m => (a -> m b) -> IntMap a -> m (IntMap b) #

sequence :: Monad m => IntMap (m a) -> m (IntMap a) #

Traversable Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Digit a -> f (Digit b) #

sequenceA :: Applicative f => Digit (f a) -> f (Digit a) #

mapM :: Monad m => (a -> m b) -> Digit a -> m (Digit b) #

sequence :: Monad m => Digit (m a) -> m (Digit a) #

Traversable Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Elem a -> f (Elem b) #

sequenceA :: Applicative f => Elem (f a) -> f (Elem a) #

mapM :: Monad m => (a -> m b) -> Elem a -> m (Elem b) #

sequence :: Monad m => Elem (m a) -> m (Elem a) #

Traversable FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> FingerTree a -> f (FingerTree b) #

sequenceA :: Applicative f => FingerTree (f a) -> f (FingerTree a) #

mapM :: Monad m => (a -> m b) -> FingerTree a -> m (FingerTree b) #

sequence :: Monad m => FingerTree (m a) -> m (FingerTree a) #

Traversable Node 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Node a -> f (Node b) #

sequenceA :: Applicative f => Node (f a) -> f (Node a) #

mapM :: Monad m => (a -> m b) -> Node a -> m (Node b) #

sequence :: Monad m => Node (m a) -> m (Node a) #

Traversable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Seq a -> f (Seq b) #

sequenceA :: Applicative f => Seq (f a) -> f (Seq a) #

mapM :: Monad m => (a -> m b) -> Seq a -> m (Seq b) #

sequence :: Monad m => Seq (m a) -> m (Seq a) #

Traversable ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> ViewL a -> f (ViewL b) #

sequenceA :: Applicative f => ViewL (f a) -> f (ViewL a) #

mapM :: Monad m => (a -> m b) -> ViewL a -> m (ViewL b) #

sequence :: Monad m => ViewL (m a) -> m (ViewL a) #

Traversable ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> ViewR a -> f (ViewR b) #

sequenceA :: Applicative f => ViewR (f a) -> f (ViewR a) #

mapM :: Monad m => (a -> m b) -> ViewR a -> m (ViewR b) #

sequence :: Monad m => ViewR (m a) -> m (ViewR a) #

Traversable Tree 
Instance details

Defined in Data.Tree

Methods

traverse :: Applicative f => (a -> f b) -> Tree a -> f (Tree b) #

sequenceA :: Applicative f => Tree (f a) -> f (Tree a) #

mapM :: Monad m => (a -> m b) -> Tree a -> m (Tree b) #

sequence :: Monad m => Tree (m a) -> m (Tree a) #

Traversable DList 
Instance details

Defined in Data.DList.Internal

Methods

traverse :: Applicative f => (a -> f b) -> DList a -> f (DList b) #

sequenceA :: Applicative f => DList (f a) -> f (DList a) #

mapM :: Monad m => (a -> m b) -> DList a -> m (DList b) #

sequence :: Monad m => DList (m a) -> m (DList a) #

Traversable Array 
Instance details

Defined in Data.Primitive.Array

Methods

traverse :: Applicative f => (a -> f b) -> Array a -> f (Array b) #

sequenceA :: Applicative f => Array (f a) -> f (Array a) #

mapM :: Monad m => (a -> m b) -> Array a -> m (Array b) #

sequence :: Monad m => Array (m a) -> m (Array a) #

Traversable SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

traverse :: Applicative f => (a -> f b) -> SmallArray a -> f (SmallArray b) #

sequenceA :: Applicative f => SmallArray (f a) -> f (SmallArray a) #

mapM :: Monad m => (a -> m b) -> SmallArray a -> m (SmallArray b) #

sequence :: Monad m => SmallArray (m a) -> m (SmallArray a) #

Traversable Vector 
Instance details

Defined in Data.Vector

Methods

traverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) #

sequenceA :: Applicative f => Vector (f a) -> f (Vector a) #

mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) #

sequence :: Monad m => Vector (m a) -> m (Vector a) #

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) #

sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) #

mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) #

sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) #

Traversable Solo

Since: base-4.15

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Solo a -> f (Solo b) #

sequenceA :: Applicative f => Solo (f a) -> f (Solo a) #

mapM :: Monad m => (a -> m b) -> Solo a -> m (Solo b) #

sequence :: Monad m => Solo (m a) -> m (Solo a) #

Traversable []

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> [a] -> f [b] #

sequenceA :: Applicative f => [f a] -> f [a] #

mapM :: Monad m => (a -> m b) -> [a] -> m [b] #

sequence :: Monad m => [m a] -> m [a] #

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) #

sequenceA :: Applicative f => Either a (f a0) -> f (Either a a0) #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m (Either a b) #

sequence :: Monad m => Either a (m a0) -> m (Either a a0) #

Traversable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Proxy a -> f (Proxy b) #

sequenceA :: Applicative f => Proxy (f a) -> f (Proxy a) #

mapM :: Monad m => (a -> m b) -> Proxy a -> m (Proxy b) #

sequence :: Monad m => Proxy (m a) -> m (Proxy a) #

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) #

sequenceA :: Applicative f => Arg a (f a0) -> f (Arg a a0) #

mapM :: Monad m => (a0 -> m b) -> Arg a a0 -> m (Arg a b) #

sequence :: Monad m => Arg a (m a0) -> m (Arg a a0) #

Ix i => Traversable (Array i)

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Array i a -> f (Array i b) #

sequenceA :: Applicative f => Array i (f a) -> f (Array i a) #

mapM :: Monad m => (a -> m b) -> Array i a -> m (Array i b) #

sequence :: Monad m => Array i (m a) -> m (Array i a) #

Traversable (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> U1 a -> f (U1 b) #

sequenceA :: Applicative f => U1 (f a) -> f (U1 a) #

mapM :: Monad m => (a -> m b) -> U1 a -> m (U1 b) #

sequence :: Monad m => U1 (m a) -> m (U1 a) #

Traversable (UAddr :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UAddr a -> f (UAddr b) #

sequenceA :: Applicative f => UAddr (f a) -> f (UAddr a) #

mapM :: Monad m => (a -> m b) -> UAddr a -> m (UAddr b) #

sequence :: Monad m => UAddr (m a) -> m (UAddr a) #

Traversable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) #

sequenceA :: Applicative f => UChar (f a) -> f (UChar a) #

mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) #

sequence :: Monad m => UChar (m a) -> m (UChar a) #

Traversable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) #

sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) #

mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) #

sequence :: Monad m => UDouble (m a) -> m (UDouble a) #

Traversable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) #

sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) #

mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) #

sequence :: Monad m => UFloat (m a) -> m (UFloat a) #

Traversable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) #

sequenceA :: Applicative f => UInt (f a) -> f (UInt a) #

mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) #

sequence :: Monad m => UInt (m a) -> m (UInt a) #

Traversable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) #

sequenceA :: Applicative f => UWord (f a) -> f (UWord a) #

mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) #

sequence :: Monad m => UWord (m a) -> m (UWord a) #

Traversable (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> V1 a -> f (V1 b) #

sequenceA :: Applicative f => V1 (f a) -> f (V1 a) #

mapM :: Monad m => (a -> m b) -> V1 a -> m (V1 b) #

sequence :: Monad m => V1 (m a) -> m (V1 a) #

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) #

sequenceA :: Applicative f => Map k (f a) -> f (Map k a) #

mapM :: Monad m => (a -> m b) -> Map k a -> m (Map k b) #

sequence :: Monad m => Map k (m a) -> m (Map k a) #

Traversable (Validation e) 
Instance details

Defined in Data.Either.Validation

Methods

traverse :: Applicative f => (a -> f b) -> Validation e a -> f (Validation e b) #

sequenceA :: Applicative f => Validation e (f a) -> f (Validation e a) #

mapM :: Monad m => (a -> m b) -> Validation e a -> m (Validation e b) #

sequence :: Monad m => Validation e (m a) -> m (Validation e a) #

Traversable f => Traversable (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Cofree f a -> f0 (Cofree f b) #

sequenceA :: Applicative f0 => Cofree f (f0 a) -> f0 (Cofree f a) #

mapM :: Monad m => (a -> m b) -> Cofree f a -> m (Cofree f b) #

sequence :: Monad m => Cofree f (m a) -> m (Cofree f a) #

Traversable f => Traversable (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Free f a -> f0 (Free f b) #

sequenceA :: Applicative f0 => Free f (f0 a) -> f0 (Free f a) #

mapM :: Monad m => (a -> m b) -> Free f a -> m (Free f b) #

sequence :: Monad m => Free f (m a) -> m (Free f a) #

Traversable (Under m) 
Instance details

Defined in Control.Selective

Methods

traverse :: Applicative f => (a -> f b) -> Under m a -> f (Under m b) #

sequenceA :: Applicative f => Under m (f a) -> f (Under m a) #

mapM :: Monad m0 => (a -> m0 b) -> Under m a -> m0 (Under m b) #

sequence :: Monad m0 => Under m (m0 a) -> m0 (Under m a) #

Traversable f => Traversable (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Lift f a -> f0 (Lift f b) #

sequenceA :: Applicative f0 => Lift f (f0 a) -> f0 (Lift f a) #

mapM :: Monad m => (a -> m b) -> Lift f a -> m (Lift f b) #

sequence :: Monad m => Lift f (m a) -> m (Lift f a) #

Traversable f => Traversable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

traverse :: Applicative f0 => (a -> f0 b) -> MaybeT f a -> f0 (MaybeT f b) #

sequenceA :: Applicative f0 => MaybeT f (f0 a) -> f0 (MaybeT f a) #

mapM :: Monad m => (a -> m b) -> MaybeT f a -> m (MaybeT f b) #

sequence :: Monad m => MaybeT f (m a) -> m (MaybeT f a) #

Traversable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> HashMap k a -> f (HashMap k b) #

sequenceA :: Applicative f => HashMap k (f a) -> f (HashMap k a) #

mapM :: Monad m => (a -> m b) -> HashMap k a -> m (HashMap k b) #

sequence :: Monad m => HashMap k (m a) -> m (HashMap k a) #

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) #

sequenceA :: Applicative f => (a, f a0) -> f (a, a0) #

mapM :: Monad m => (a0 -> m b) -> (a, a0) -> m (a, b) #

sequence :: Monad m => (a, m a0) -> m (a, a0) #

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) #

sequenceA :: Applicative f => Const m (f a) -> f (Const m a) #

mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 (Const m b) #

sequence :: Monad m0 => Const m (m0 a) -> m0 (Const m a) #

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) #

sequenceA :: Applicative f0 => Ap f (f0 a) -> f0 (Ap f a) #

mapM :: Monad m => (a -> m b) -> Ap f a -> m (Ap f b) #

sequence :: Monad m => Ap f (m a) -> m (Ap f a) #

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) #

sequenceA :: Applicative f0 => Alt f (f0 a) -> f0 (Alt f a) #

mapM :: Monad m => (a -> m b) -> Alt f a -> m (Alt f b) #

sequence :: Monad m => Alt f (m a) -> m (Alt f a) #

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) #

sequenceA :: Applicative f0 => Rec1 f (f0 a) -> f0 (Rec1 f a) #

mapM :: Monad m => (a -> m b) -> Rec1 f a -> m (Rec1 f b) #

sequence :: Monad m => Rec1 f (m a) -> m (Rec1 f a) #

Bitraversable p => Traversable (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

traverse :: Applicative f => (a -> f b) -> Fix p a -> f (Fix p b) #

sequenceA :: Applicative f => Fix p (f a) -> f (Fix p a) #

mapM :: Monad m => (a -> m b) -> Fix p a -> m (Fix p b) #

sequence :: Monad m => Fix p (m a) -> m (Fix p a) #

Bitraversable p => Traversable (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

traverse :: Applicative f => (a -> f b) -> Join p a -> f (Join p b) #

sequenceA :: Applicative f => Join p (f a) -> f (Join p a) #

mapM :: Monad m => (a -> m b) -> Join p a -> m (Join p b) #

sequence :: Monad m => Join p (m a) -> m (Join p a) #

Traversable f => Traversable (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> FreeF f a a0 -> f0 (FreeF f a b) #

sequenceA :: Applicative f0 => FreeF f a (f0 a0) -> f0 (FreeF f a a0) #

mapM :: Monad m => (a0 -> m b) -> FreeF f a a0 -> m (FreeF f a b) #

sequence :: Monad m => FreeF f a (m a0) -> m (FreeF f a a0) #

(Monad m, Traversable m, Traversable f) => Traversable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

traverse :: Applicative f0 => (a -> f0 b) -> FreeT f m a -> f0 (FreeT f m b) #

sequenceA :: Applicative f0 => FreeT f m (f0 a) -> f0 (FreeT f m a) #

mapM :: Monad m0 => (a -> m0 b) -> FreeT f m a -> m0 (FreeT f m b) #

sequence :: Monad m0 => FreeT f m (m0 a) -> m0 (FreeT f m a) #

Traversable f => Traversable (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

traverse :: Applicative f0 => (a -> f0 b) -> WrappedFunctor f a -> f0 (WrappedFunctor f b) #

sequenceA :: Applicative f0 => WrappedFunctor f (f0 a) -> f0 (WrappedFunctor f a) #

mapM :: Monad m => (a -> m b) -> WrappedFunctor f a -> m (WrappedFunctor f b) #

sequence :: Monad m => WrappedFunctor f (m a) -> m (WrappedFunctor f a) #

Traversable (Baz t b) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse :: Applicative f => (a -> f b0) -> Baz t b a -> f (Baz t b b0) #

sequenceA :: Applicative f => Baz t b (f a) -> f (Baz t b a) #

mapM :: Monad m => (a -> m b0) -> Baz t b a -> m (Baz t b b0) #

sequence :: Monad m => Baz t b (m a) -> m (Baz t b a) #

Traversable (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

traverse :: Applicative f => (a -> f b) -> Tagged s a -> f (Tagged s b) #

sequenceA :: Applicative f => Tagged s (f a) -> f (Tagged s a) #

mapM :: Monad m => (a -> m b) -> Tagged s a -> m (Tagged s b) #

sequence :: Monad m => Tagged s (m a) -> m (Tagged s a) #

Traversable f => Traversable (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Backwards f a -> f0 (Backwards f b) #

sequenceA :: Applicative f0 => Backwards f (f0 a) -> f0 (Backwards f a) #

mapM :: Monad m => (a -> m b) -> Backwards f a -> m (Backwards f b) #

sequence :: Monad m => Backwards f (m a) -> m (Backwards f a) #

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) #

sequenceA :: Applicative f0 => ErrorT e f (f0 a) -> f0 (ErrorT e f a) #

mapM :: Monad m => (a -> m b) -> ErrorT e f a -> m (ErrorT e f b) #

sequence :: Monad m => ErrorT e f (m a) -> m (ErrorT e f a) #

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) #

sequenceA :: Applicative f0 => ExceptT e f (f0 a) -> f0 (ExceptT e f a) #

mapM :: Monad m => (a -> m b) -> ExceptT e f a -> m (ExceptT e f b) #

sequence :: Monad m => ExceptT e f (m a) -> m (ExceptT e f a) #

Traversable f => Traversable (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

traverse :: Applicative f0 => (a -> f0 b) -> IdentityT f a -> f0 (IdentityT f b) #

sequenceA :: Applicative f0 => IdentityT f (f0 a) -> f0 (IdentityT f a) #

mapM :: Monad m => (a -> m b) -> IdentityT f a -> m (IdentityT f b) #

sequence :: Monad m => IdentityT f (m a) -> m (IdentityT f a) #

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) #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 (WriterT w f a) #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m (WriterT w f b) #

sequence :: Monad m => WriterT w f (m a) -> m (WriterT w f a) #

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) #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 (WriterT w f a) #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m (WriterT w f b) #

sequence :: Monad m => WriterT w f (m a) -> m (WriterT w f a) #

Traversable (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

traverse :: Applicative f => (a0 -> f b) -> Constant a a0 -> f (Constant a b) #

sequenceA :: Applicative f => Constant a (f a0) -> f (Constant a a0) #

mapM :: Monad m => (a0 -> m b) -> Constant a a0 -> m (Constant a b) #

sequence :: Monad m => Constant a (m a0) -> m (Constant a a0) #

Traversable f => Traversable (Reverse f)

Traverse from right to left.

Instance details

Defined in Data.Functor.Reverse

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Reverse f a -> f0 (Reverse f b) #

sequenceA :: Applicative f0 => Reverse f (f0 a) -> f0 (Reverse f a) #

mapM :: Monad m => (a -> m b) -> Reverse f a -> m (Reverse f b) #

sequence :: Monad m => Reverse f (m a) -> m (Reverse f a) #

(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) #

sequenceA :: Applicative f0 => Product f g (f0 a) -> f0 (Product f g a) #

mapM :: Monad m => (a -> m b) -> Product f g a -> m (Product f g b) #

sequence :: Monad m => Product f g (m a) -> m (Product f g a) #

(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) #

sequenceA :: Applicative f0 => Sum f g (f0 a) -> f0 (Sum f g a) #

mapM :: Monad m => (a -> m b) -> Sum f g a -> m (Sum f g b) #

sequence :: Monad m => Sum f g (m a) -> m (Sum f g a) #

(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) #

sequenceA :: Applicative f0 => (f :*: g) (f0 a) -> f0 ((f :*: g) a) #

mapM :: Monad m => (a -> m b) -> (f :*: g) a -> m ((f :*: g) b) #

sequence :: Monad m => (f :*: g) (m a) -> m ((f :*: g) a) #

(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) #

sequenceA :: Applicative f0 => (f :+: g) (f0 a) -> f0 ((f :+: g) a) #

mapM :: Monad m => (a -> m b) -> (f :+: g) a -> m ((f :+: g) b) #

sequence :: Monad m => (f :+: g) (m a) -> m ((f :+: g) a) #

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) #

sequenceA :: Applicative f => K1 i c (f a) -> f (K1 i c a) #

mapM :: Monad m => (a -> m b) -> K1 i c a -> m (K1 i c b) #

sequence :: Monad m => K1 i c (m a) -> m (K1 i c a) #

Traversable (Forget r a :: Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

traverse :: Applicative f => (a0 -> f b) -> Forget r a a0 -> f (Forget r a b) #

sequenceA :: Applicative f => Forget r a (f a0) -> f (Forget r a a0) #

mapM :: Monad m => (a0 -> m b) -> Forget r a a0 -> m (Forget r a b) #

sequence :: Monad m => Forget r a (m a0) -> m (Forget r a a0) #

(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) #

sequenceA :: Applicative f0 => Compose f g (f0 a) -> f0 (Compose f g a) #

mapM :: Monad m => (a -> m b) -> Compose f g a -> m (Compose f g b) #

sequence :: Monad m => Compose f g (m a) -> m (Compose f g a) #

(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) #

sequenceA :: Applicative f0 => (f :.: g) (f0 a) -> f0 ((f :.: g) a) #

mapM :: Monad m => (a -> m b) -> (f :.: g) a -> m ((f :.: g) b) #

sequence :: Monad m => (f :.: g) (m a) -> m ((f :.: g) a) #

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) #

sequenceA :: Applicative f0 => M1 i c f (f0 a) -> f0 (M1 i c f a) #

mapM :: Monad m => (a -> m b) -> M1 i c f a -> m (M1 i c f b) #

sequence :: Monad m => M1 i c f (m a) -> m (M1 i c f a) #

Traversable (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Clown f a a0 -> f0 (Clown f a b) #

sequenceA :: Applicative f0 => Clown f a (f0 a0) -> f0 (Clown f a a0) #

mapM :: Monad m => (a0 -> m b) -> Clown f a a0 -> m (Clown f a b) #

sequence :: Monad m => Clown f a (m a0) -> m (Clown f a a0) #

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) #

sequenceA :: Applicative f => Flip p a (f a0) -> f (Flip p a a0) #

mapM :: Monad m => (a0 -> m b) -> Flip p a a0 -> m (Flip p a b) #

sequence :: Monad m => Flip p a (m a0) -> m (Flip p a a0) #

Traversable g => Traversable (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

traverse :: Applicative f => (a0 -> f b) -> Joker g a a0 -> f (Joker g a b) #

sequenceA :: Applicative f => Joker g a (f a0) -> f (Joker g a a0) #

mapM :: Monad m => (a0 -> m b) -> Joker g a a0 -> m (Joker g a b) #

sequence :: Monad m => Joker g a (m a0) -> m (Joker g a a0) #

Bitraversable p => Traversable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

traverse :: Applicative f => (a0 -> f b) -> WrappedBifunctor p a a0 -> f (WrappedBifunctor p a b) #

sequenceA :: Applicative f => WrappedBifunctor p a (f a0) -> f (WrappedBifunctor p a a0) #

mapM :: Monad m => (a0 -> m b) -> WrappedBifunctor p a a0 -> m (WrappedBifunctor p a b) #

sequence :: Monad m => WrappedBifunctor p a (m a0) -> m (WrappedBifunctor p a a0) #

(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) #

sequenceA :: Applicative f0 => Product f g a (f0 a0) -> f0 (Product f g a a0) #

mapM :: Monad m => (a0 -> m b) -> Product f g a a0 -> m (Product f g a b) #

sequence :: Monad m => Product f g a (m a0) -> m (Product f g a a0) #

(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) #

sequenceA :: Applicative f0 => Sum f g a (f0 a0) -> f0 (Sum f g a a0) #

mapM :: Monad m => (a0 -> m b) -> Sum f g a a0 -> m (Sum f g a b) #

sequence :: Monad m => Sum f g a (m a0) -> m (Sum f g a a0) #

(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) #

sequenceA :: Applicative f0 => Tannen f p a (f0 a0) -> f0 (Tannen f p a a0) #

mapM :: Monad m => (a0 -> m b) -> Tannen f p a a0 -> m (Tannen f p a b) #

sequence :: Monad m => Tannen f p a (m a0) -> m (Tannen f p a a0) #

(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) #

sequenceA :: Applicative f0 => Biff p f g a (f0 a0) -> f0 (Biff p f g a a0) #

mapM :: Monad m => (a0 -> m b) -> Biff p f g a a0 -> m (Biff p f g a b) #

sequence :: Monad m => Biff p f g a (m a0) -> m (Biff p f g a a0) #

class Generic a #

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

Minimal complete definition

from, to

Instances

Instances details
Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type #

Methods

from :: All -> Rep All x #

to :: Rep All x -> All #

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type #

Methods

from :: Any -> Rep Any x #

to :: Rep Any x -> Any #

Generic Version 
Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Generic Void 
Instance details

Defined in Data.Void

Associated Types

type Rep Void :: Type -> Type #

Methods

from :: Void -> Rep Void x #

to :: Rep Void x -> Void #

Generic Fingerprint 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fingerprint :: Type -> Type #

Generic Associativity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Associativity :: Type -> Type #

Generic DecidedStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Generic Fixity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic SourceStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceStrictness :: Type -> Type #

Generic SourceUnpackedness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type #

Methods

from :: ExitCode -> Rep ExitCode x #

to :: Rep ExitCode x -> ExitCode #

Generic SrcLoc 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SrcLoc :: Type -> Type #

Methods

from :: SrcLoc -> Rep SrcLoc x #

to :: Rep SrcLoc x -> SrcLoc #

Generic GCDetails 
Instance details

Defined in GHC.Stats

Associated Types

type Rep GCDetails :: Type -> Type #

Generic RTSStats 
Instance details

Defined in GHC.Stats

Associated Types

type Rep RTSStats :: Type -> Type #

Methods

from :: RTSStats -> Rep RTSStats x #

to :: Rep RTSStats x -> RTSStats #

Generic GeneralCategory 
Instance details

Defined in GHC.Generics

Associated Types

type Rep GeneralCategory :: Type -> Type #

Generic ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Associated Types

type Rep ForeignSrcLang :: Type -> Type #

Generic Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Associated Types

type Rep Extension :: Type -> Type #

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Generic Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Mode :: Type -> Type #

Methods

from :: Mode -> Rep Mode x #

to :: Rep Mode x -> Mode #

Generic Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Style :: Type -> Type #

Methods

from :: Style -> Rep Style x #

to :: Rep Style x -> Style #

Generic TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep TextDetails :: Type -> Type #

Generic Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Associated Types

type Rep Doc :: Type -> Type #

Methods

from :: Doc -> Rep Doc x #

to :: Rep Doc x -> Doc #

Generic AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnLookup :: Type -> Type #

Generic AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnTarget :: Type -> Type #

Generic Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bang :: Type -> Type #

Methods

from :: Bang -> Rep Bang x #

to :: Rep Bang x -> Bang #

Generic Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Body :: Type -> Type #

Methods

from :: Body -> Rep Body x #

to :: Rep Body x -> Body #

Generic Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bytes :: Type -> Type #

Methods

from :: Bytes -> Rep Bytes x #

to :: Rep Bytes x -> Bytes #

Generic Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Callconv :: Type -> Type #

Methods

from :: Callconv -> Rep Callconv x #

to :: Rep Callconv x -> Callconv #

Generic Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Clause :: Type -> Type #

Methods

from :: Clause -> Rep Clause x #

to :: Rep Clause x -> Clause #

Generic Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Con :: Type -> Type #

Methods

from :: Con -> Rep Con x #

to :: Rep Con x -> Con #

Generic Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Dec :: Type -> Type #

Methods

from :: Dec -> Rep Dec x #

to :: Rep Dec x -> Dec #

Generic DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DecidedStrictness :: Type -> Type #

Generic DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivClause :: Type -> Type #

Generic DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivStrategy :: Type -> Type #

Generic DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DocLoc :: Type -> Type #

Methods

from :: DocLoc -> Rep DocLoc x #

to :: Rep DocLoc x -> DocLoc #

Generic Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Exp :: Type -> Type #

Methods

from :: Exp -> Rep Exp x #

to :: Rep Exp x -> Exp #

Generic FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FamilyResultSig :: Type -> Type #

Generic Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Fixity :: Type -> Type #

Methods

from :: Fixity -> Rep Fixity x #

to :: Rep Fixity x -> Fixity #

Generic FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FixityDirection :: Type -> Type #

Generic Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Foreign :: Type -> Type #

Methods

from :: Foreign -> Rep Foreign x #

to :: Rep Foreign x -> Foreign #

Generic FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FunDep :: Type -> Type #

Methods

from :: FunDep -> Rep FunDep x #

to :: Rep FunDep x -> FunDep #

Generic Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Guard :: Type -> Type #

Methods

from :: Guard -> Rep Guard x #

to :: Rep Guard x -> Guard #

Generic Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Info :: Type -> Type #

Methods

from :: Info -> Rep Info x #

to :: Rep Info x -> Info #

Generic InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep InjectivityAnn :: Type -> Type #

Generic Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Inline :: Type -> Type #

Methods

from :: Inline -> Rep Inline x #

to :: Rep Inline x -> Inline #

Generic Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Lit :: Type -> Type #

Methods

from :: Lit -> Rep Lit x #

to :: Rep Lit x -> Lit #

Generic Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Loc :: Type -> Type #

Methods

from :: Loc -> Rep Loc x #

to :: Rep Loc x -> Loc #

Generic Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Match :: Type -> Type #

Methods

from :: Match -> Rep Match x #

to :: Rep Match x -> Match #

Generic ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModName :: Type -> Type #

Methods

from :: ModName -> Rep ModName x #

to :: Rep ModName x -> ModName #

Generic Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Module :: Type -> Type #

Methods

from :: Module -> Rep Module x #

to :: Rep Module x -> Module #

Generic ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModuleInfo :: Type -> Type #

Generic Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Name :: Type -> Type #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

Generic NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameFlavour :: Type -> Type #

Generic NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameSpace :: Type -> Type #

Generic OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep OccName :: Type -> Type #

Methods

from :: OccName -> Rep OccName x #

to :: Rep OccName x -> OccName #

Generic Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Overlap :: Type -> Type #

Methods

from :: Overlap -> Rep Overlap x #

to :: Rep Overlap x -> Overlap #

Generic Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pat :: Type -> Type #

Methods

from :: Pat -> Rep Pat x #

to :: Rep Pat x -> Pat #

Generic PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynArgs :: Type -> Type #

Generic PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynDir :: Type -> Type #

Generic Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Phases :: Type -> Type #

Methods

from :: Phases -> Rep Phases x #

to :: Rep Phases x -> Phases #

Generic PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PkgName :: Type -> Type #

Methods

from :: PkgName -> Rep PkgName x #

to :: Rep PkgName x -> PkgName #

Generic Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pragma :: Type -> Type #

Methods

from :: Pragma -> Rep Pragma x #

to :: Rep Pragma x -> Pragma #

Generic Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Range :: Type -> Type #

Methods

from :: Range -> Rep Range x #

to :: Rep Range x -> Range #

Generic Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Role :: Type -> Type #

Methods

from :: Role -> Rep Role x #

to :: Rep Role x -> Role #

Generic RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleBndr :: Type -> Type #

Methods

from :: RuleBndr -> Rep RuleBndr x #

to :: Rep RuleBndr x -> RuleBndr #

Generic RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleMatch :: Type -> Type #

Generic Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Safety :: Type -> Type #

Methods

from :: Safety -> Rep Safety x #

to :: Rep Safety x -> Safety #

Generic SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceStrictness :: Type -> Type #

Generic SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceUnpackedness :: Type -> Type #

Generic Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Specificity :: Type -> Type #

Generic Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Stmt :: Type -> Type #

Methods

from :: Stmt -> Rep Stmt x #

to :: Rep Stmt x -> Stmt #

Generic TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TyLit :: Type -> Type #

Methods

from :: TyLit -> Rep TyLit x #

to :: Rep TyLit x -> TyLit #

Generic TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TySynEqn :: Type -> Type #

Methods

from :: TySynEqn -> Rep TySynEqn x #

to :: Rep TySynEqn x -> TySynEqn #

Generic Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Type :: Type -> Type #

Methods

from :: Type -> Rep Type x #

to :: Rep Type x -> Type #

Generic TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TypeFamilyHead :: Type -> Type #

Generic () 
Instance details

Defined in GHC.Generics

Associated Types

type Rep () :: Type -> Type #

Methods

from :: () -> Rep () x #

to :: Rep () x -> () #

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

Generic (ZipList a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (ZipList a) :: Type -> Type #

Methods

from :: ZipList a -> Rep (ZipList a) x #

to :: Rep (ZipList a) x -> ZipList a #

Generic (Complex a) 
Instance details

Defined in Data.Complex

Associated Types

type Rep (Complex a) :: Type -> Type #

Methods

from :: Complex a -> Rep (Complex a) x #

to :: Rep (Complex a) x -> Complex a #

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Generic (First a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type #

Methods

from :: Down a -> Rep (Down a) x #

to :: Rep (Down a) x -> Down a #

Generic (First a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Generic (Last a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Generic (Max a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Max a) :: Type -> Type #

Methods

from :: Max a -> Rep (Max a) x #

to :: Rep (Max a) x -> Max a #

Generic (Min a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Min a) :: Type -> Type #

Methods

from :: Min a -> Rep (Min a) x #

to :: Rep (Min a) x -> Min a #

Generic (WrappedMonoid m) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type #

Generic (Dual a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type #

Methods

from :: Dual a -> Rep (Dual a) x #

to :: Rep (Dual a) x -> Dual a #

Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type #

Methods

from :: Endo a -> Rep (Endo a) x #

to :: Rep (Endo a) x -> Endo a #

Generic (Product a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type #

Methods

from :: Product a -> Rep (Product a) x #

to :: Rep (Product a) x -> Product a #

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type #

Methods

from :: Sum a -> Rep (Sum a) x #

to :: Rep (Sum a) x -> Sum a #

Generic (Par1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Par1 p) :: Type -> Type #

Methods

from :: Par1 p -> Rep (Par1 p) x #

to :: Rep (Par1 p) x -> Par1 p #

Generic (SCC vertex) 
Instance details

Defined in Data.Graph

Associated Types

type Rep (SCC vertex) :: Type -> Type #

Methods

from :: SCC vertex -> Rep (SCC vertex) x #

to :: Rep (SCC vertex) x -> SCC vertex #

Generic (Digit a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Digit a) :: Type -> Type #

Methods

from :: Digit a -> Rep (Digit a) x #

to :: Rep (Digit a) x -> Digit a #

Generic (Elem a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Elem a) :: Type -> Type #

Methods

from :: Elem a -> Rep (Elem a) x #

to :: Rep (Elem a) x -> Elem a #

Generic (FingerTree a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (FingerTree a) :: Type -> Type #

Methods

from :: FingerTree a -> Rep (FingerTree a) x #

to :: Rep (FingerTree a) x -> FingerTree a #

Generic (Node a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Node a) :: Type -> Type #

Methods

from :: Node a -> Rep (Node a) x #

to :: Rep (Node a) x -> Node a #

Generic (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewL a) :: Type -> Type #

Methods

from :: ViewL a -> Rep (ViewL a) x #

to :: Rep (ViewL a) x -> ViewL a #

Generic (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewR a) :: Type -> Type #

Methods

from :: ViewR a -> Rep (ViewR a) x #

to :: Rep (ViewR a) x -> ViewR a #

Generic (Tree a) 
Instance details

Defined in Data.Tree

Associated Types

type Rep (Tree a) :: Type -> Type #

Methods

from :: Tree a -> Rep (Tree a) x #

to :: Rep (Tree a) x -> Tree a #

Generic (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep (Doc a) :: Type -> Type #

Methods

from :: Doc a -> Rep (Doc a) x #

to :: Rep (Doc a) x -> Doc a #

Generic (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep (TyVarBndr flag) :: Type -> Type #

Methods

from :: TyVarBndr flag -> Rep (TyVarBndr flag) x #

to :: Rep (TyVarBndr flag) x -> TyVarBndr flag #

Generic (NonEmpty a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a) :: Type -> Type #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x #

to :: Rep (NonEmpty a) x -> NonEmpty a #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Generic (a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a) :: Type -> Type #

Methods

from :: (a) -> Rep (a) x #

to :: Rep (a) x -> (a) #

Generic [a] 
Instance details

Defined in GHC.Generics

Associated Types

type Rep [a] :: Type -> Type #

Methods

from :: [a] -> Rep [a] x #

to :: Rep [a] x -> [a] #

Generic (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedMonad m a) :: Type -> Type #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a #

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type #

Methods

from :: Proxy t -> Rep (Proxy t) x #

to :: Rep (Proxy t) x -> Proxy t #

Generic (Arg a b) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Arg a b) :: Type -> Type #

Methods

from :: Arg a b -> Rep (Arg a b) x #

to :: Rep (Arg a b) x -> Arg a b #

Generic (U1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (U1 p) :: Type -> Type #

Methods

from :: U1 p -> Rep (U1 p) x #

to :: Rep (U1 p) x -> U1 p #

Generic (V1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (V1 p) :: Type -> Type #

Methods

from :: V1 p -> Rep (V1 p) x #

to :: Rep (V1 p) x -> V1 p #

Generic (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Associated Types

type Rep (Cofree f a) :: Type -> Type #

Methods

from :: Cofree f a -> Rep (Cofree f a) x #

to :: Rep (Cofree f a) x -> Cofree f a #

Generic (Free f a) 
Instance details

Defined in Control.Monad.Free

Associated Types

type Rep (Free f a) :: Type -> Type #

Methods

from :: Free f a -> Rep (Free f a) x #

to :: Rep (Free f a) x -> Free f a #

Generic (a, b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b) :: Type -> Type #

Methods

from :: (a, b) -> Rep (a, b) x #

to :: Rep (a, b) x -> (a, b) #

Generic (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedArrow a b c) :: Type -> Type #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c #

Generic (Kleisli m a b) 
Instance details

Defined in Control.Arrow

Associated Types

type Rep (Kleisli m a b) :: Type -> Type #

Methods

from :: Kleisli m a b -> Rep (Kleisli m a b) x #

to :: Rep (Kleisli m a b) x -> Kleisli m a b #

Generic (Const a b) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep (Const a b) :: Type -> Type #

Methods

from :: Const a b -> Rep (Const a b) x #

to :: Rep (Const a b) x -> Const a b #

Generic (Ap f a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type #

Methods

from :: Ap f a -> Rep (Ap f a) x #

to :: Rep (Ap f a) x -> Ap f a #

Generic (Alt f a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Alt f a) :: Type -> Type #

Methods

from :: Alt f a -> Rep (Alt f a) x #

to :: Rep (Alt f a) x -> Alt f a #

Generic (Rec1 f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Rec1 f p) :: Type -> Type #

Methods

from :: Rec1 f p -> Rep (Rec1 f p) x #

to :: Rep (Rec1 f p) x -> Rec1 f p #

Generic (URec (Ptr ()) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec (Ptr ()) p) :: Type -> Type #

Methods

from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x #

to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p #

Generic (URec Char p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type #

Methods

from :: URec Char p -> Rep (URec Char p) x #

to :: Rep (URec Char p) x -> URec Char p #

Generic (URec Double p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type #

Methods

from :: URec Double p -> Rep (URec Double p) x #

to :: Rep (URec Double p) x -> URec Double p #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type #

Methods

from :: URec Float p -> Rep (URec Float p) x #

to :: Rep (URec Float p) x -> URec Float p #

Generic (URec Int p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type #

Methods

from :: URec Int p -> Rep (URec Int p) x #

to :: Rep (URec Int p) x -> URec Int p #

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type #

Methods

from :: URec Word p -> Rep (URec Word p) x #

to :: Rep (URec Word p) x -> URec Word p #

Generic (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Associated Types

type Rep (Fix p a) :: Type -> Type #

Methods

from :: Fix p a -> Rep (Fix p a) x #

to :: Rep (Fix p a) x -> Fix p a #

Generic (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Associated Types

type Rep (Join p a) :: Type -> Type #

Methods

from :: Join p a -> Rep (Join p a) x #

to :: Rep (Join p a) x -> Join p a #

Generic (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Associated Types

type Rep (FreeF f a b) :: Type -> Type #

Methods

from :: FreeF f a b -> Rep (FreeF f a b) x #

to :: Rep (FreeF f a b) x -> FreeF f a b #

Generic (Tagged s b) 
Instance details

Defined in Data.Tagged

Associated Types

type Rep (Tagged s b) :: Type -> Type #

Methods

from :: Tagged s b -> Rep (Tagged s b) x #

to :: Rep (Tagged s b) x -> Tagged s b #

Generic (a, b, c) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c) :: Type -> Type #

Methods

from :: (a, b, c) -> Rep (a, b, c) x #

to :: Rep (a, b, c) x -> (a, b, c) #

Generic (Product f g a) 
Instance details

Defined in Data.Functor.Product

Associated Types

type Rep (Product f g a) :: Type -> Type #

Methods

from :: Product f g a -> Rep (Product f g a) x #

to :: Rep (Product f g a) x -> Product f g a #

Generic (Sum f g a) 
Instance details

Defined in Data.Functor.Sum

Associated Types

type Rep (Sum f g a) :: Type -> Type #

Methods

from :: Sum f g a -> Rep (Sum f g a) x #

to :: Rep (Sum f g a) x -> Sum f g a #

Generic ((f :*: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x #

to :: Rep ((f :*: g) p) x -> (f :*: g) p #

Generic ((f :+: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x #

to :: Rep ((f :+: g) p) x -> (f :+: g) p #

Generic (K1 i c p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (K1 i c p) :: Type -> Type #

Methods

from :: K1 i c p -> Rep (K1 i c p) x #

to :: Rep (K1 i c p) x -> K1 i c p #

Generic (a, b, c, d) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d) :: Type -> Type #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x #

to :: Rep (a, b, c, d) x -> (a, b, c, d) #

Generic (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type #

Methods

from :: Compose f g a -> Rep (Compose f g a) x #

to :: Rep (Compose f g a) x -> Compose f g a #

Generic ((f :.: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x #

to :: Rep ((f :.: g) p) x -> (f :.: g) p #

Generic (M1 i c f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (M1 i c f p) :: Type -> Type #

Methods

from :: M1 i c f p -> Rep (M1 i c f p) x #

to :: Rep (M1 i c f p) x -> M1 i c f p #

Generic (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Associated Types

type Rep (Clown f a b) :: Type -> Type #

Methods

from :: Clown f a b -> Rep (Clown f a b) x #

to :: Rep (Clown f a b) x -> Clown f a b #

Generic (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Associated Types

type Rep (Flip p a b) :: Type -> Type #

Methods

from :: Flip p a b -> Rep (Flip p a b) x #

to :: Rep (Flip p a b) x -> Flip p a b #

Generic (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Associated Types

type Rep (Joker g a b) :: Type -> Type #

Methods

from :: Joker g a b -> Rep (Joker g a b) x #

to :: Rep (Joker g a b) x -> Joker g a b #

Generic (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Associated Types

type Rep (WrappedBifunctor p a b) :: Type -> Type #

Methods

from :: WrappedBifunctor p a b -> Rep (WrappedBifunctor p a b) x #

to :: Rep (WrappedBifunctor p a b) x -> WrappedBifunctor p a b #

Generic (a, b, c, d, e) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e) :: Type -> Type #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) #

Generic (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Associated Types

type Rep (Product f g a b) :: Type -> Type #

Methods

from :: Product f g a b -> Rep (Product f g a b) x #

to :: Rep (Product f g a b) x -> Product f g a b #

Generic (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep (Sum p q a b) :: Type -> Type #

Methods

from :: Sum p q a b -> Rep (Sum p q a b) x #

to :: Rep (Sum p q a b) x -> Sum p q a b #

Generic (a, b, c, d, e, f) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) #

Generic (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Associated Types

type Rep (Tannen f p a b) :: Type -> Type #

Methods

from :: Tannen f p a b -> Rep (Tannen f p a b) x #

to :: Rep (Tannen f p a b) x -> Tannen f p a b #

Generic (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) #

Generic (a, b, c, d, e, f, g, h) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h) -> Rep (a, b, c, d, e, f, g, h) x #

to :: Rep (a, b, c, d, e, f, g, h) x -> (a, b, c, d, e, f, g, h) #

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 #

Methods

from :: Biff p f g a b -> Rep (Biff p f g a b) x #

to :: Rep (Biff p f g a b) x -> Biff p f g a b #

Generic (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i) -> Rep (a, b, c, d, e, f, g, h, i) x #

to :: Rep (a, b, c, d, e, f, g, h, i) x -> (a, b, c, d, e, f, g, h, i) #

Generic (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j) -> Rep (a, b, c, d, e, f, g, h, i, j) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j) x -> (a, b, c, d, e, f, g, h, i, j) #

Generic (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k) -> Rep (a, b, c, d, e, f, g, h, i, j, k) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k) x -> (a, b, c, d, e, f, g, h, i, j, k) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l) x -> (a, b, c, d, e, f, g, h, i, j, k, l) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type -> Type #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

class Semigroup a where #

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 #

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

sconcat :: NonEmpty a -> a #

Reduce a non-empty list with <>

The default definition should be sufficient, but this can be overridden for efficiency.

>>> import Data.List.NonEmpty (NonEmpty (..))
>>> sconcat $ "Hello" :| [" ", "Haskell", "!"]
"Hello Haskell!"

stimes :: Integral b => b -> a -> a #

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 All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: All -> All -> All #

sconcat :: NonEmpty All -> All #

stimes :: Integral b => b -> All -> All #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Any -> Any -> Any #

sconcat :: NonEmpty Any -> Any #

stimes :: Integral b => b -> Any -> Any #

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in Data.Void

Methods

(<>) :: Void -> Void -> Void #

sconcat :: NonEmpty Void -> Void #

stimes :: Integral b => b -> Void -> Void #

Semigroup Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Semigroup ByteArray 
Instance details

Defined in Data.Array.Byte

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

(<>) :: Doc -> Doc -> Doc #

sconcat :: NonEmpty Doc -> Doc #

stimes :: Integral b => b -> Doc -> Doc #

Semigroup Builder 
Instance details

Defined in Data.Text.Internal.Builder

Semigroup CalendarDiffDays

Additive

Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Semigroup CalendarDiffTime

Additive

Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

Semigroup ()

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: () -> () -> () #

sconcat :: NonEmpty () -> () #

stimes :: Integral b => b -> () -> () #

Bits a => Semigroup (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(<>) :: And a -> And a -> And a #

sconcat :: NonEmpty (And a) -> And a #

stimes :: Integral b => b -> And a -> And a #

FiniteBits a => Semigroup (Iff a)

This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(<>) :: Iff a -> Iff a -> Iff a #

sconcat :: NonEmpty (Iff a) -> Iff a #

stimes :: Integral b => b -> Iff a -> Iff a #

Bits a => Semigroup (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(<>) :: Ior a -> Ior a -> Ior a #

sconcat :: NonEmpty (Ior a) -> Ior a #

stimes :: Integral b => b -> Ior a -> Ior a #

Bits a => Semigroup (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(<>) :: Xor a -> Xor a -> Xor a #

sconcat :: NonEmpty (Xor a) -> Xor a #

stimes :: Integral b => b -> Xor a -> Xor a #

Semigroup (Comparison a)

(<>) on comparisons combines results with (<>) @Ordering. Without newtypes this equals liftA2 (liftA2 (<>)).

(<>) :: Comparison a -> Comparison a -> Comparison a
Comparison cmp <> Comparison cmp' = Comparison a a' ->
  cmp a a' <> cmp a a'
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Equivalence a)

(<>) on equivalences uses logical conjunction (&&) on the results. Without newtypes this equals liftA2 (liftA2 (&&)).

(<>) :: Equivalence a -> Equivalence a -> Equivalence a
Equivalence equiv <> Equivalence equiv' = Equivalence a b ->
  equiv a b && equiv a b
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Predicate a)

(<>) on predicates uses logical conjunction (&&) on the results. Without newtypes this equals liftA2 (&&).

(<>) :: Predicate a -> Predicate a -> Predicate a
Predicate pred <> Predicate pred' = Predicate a ->
  pred a && pred' a
Instance details

Defined in Data.Functor.Contravariant

Methods

(<>) :: Predicate a -> Predicate a -> Predicate a #

sconcat :: NonEmpty (Predicate a) -> Predicate a #

stimes :: Integral b => b -> Predicate a -> Predicate a #

Semigroup a => Semigroup (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(<>) :: Identity a -> Identity a -> Identity a #

sconcat :: NonEmpty (Identity a) -> Identity a #

stimes :: Integral b => b -> Identity a -> Identity a #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Last a -> Last a -> Last a #

sconcat :: NonEmpty (Last a) -> Last a #

stimes :: Integral b => b -> Last a -> Last a #

Semigroup a => Semigroup (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(<>) :: Down a -> Down a -> Down a #

sconcat :: NonEmpty (Down a) -> Down a #

stimes :: Integral b => b -> Down a -> Down a #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Last a -> Last a -> Last a #

sconcat :: NonEmpty (Last a) -> Last a #

stimes :: Integral b => b -> Last a -> Last a #

Ord a => Semigroup (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Max a -> Max a -> Max a #

sconcat :: NonEmpty (Max a) -> Max a #

stimes :: Integral b => b -> Max a -> Max a #

Ord a => Semigroup (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Min a -> Min a -> Min a #

sconcat :: NonEmpty (Min a) -> Min a #

stimes :: Integral b => b -> Min a -> Min a #

Monoid m => Semigroup (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Semigroup (Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Dual a -> Dual a -> Dual a #

sconcat :: NonEmpty (Dual a) -> Dual a #

stimes :: Integral b => b -> Dual a -> Dual a #

Semigroup (Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Endo a -> Endo a -> Endo a #

sconcat :: NonEmpty (Endo a) -> Endo a #

stimes :: Integral b => b -> Endo a -> Endo a #

Num a => Semigroup (Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Product a -> Product a -> Product a #

sconcat :: NonEmpty (Product a) -> Product a #

stimes :: Integral b => b -> Product a -> Product a #

Num a => Semigroup (Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Sum a -> Sum a -> Sum a #

sconcat :: NonEmpty (Sum a) -> Sum a #

stimes :: Integral b => b -> Sum a -> Sum a #

Semigroup p => Semigroup (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Par1 p -> Par1 p -> Par1 p #

sconcat :: NonEmpty (Par1 p) -> Par1 p #

stimes :: Integral b => b -> Par1 p -> Par1 p #

Semigroup (IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Methods

(<>) :: IntMap a -> IntMap a -> IntMap a #

sconcat :: NonEmpty (IntMap a) -> IntMap a #

stimes :: Integral b => b -> IntMap a -> IntMap a #

Semigroup (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

(<>) :: Seq a -> Seq a -> Seq a #

sconcat :: NonEmpty (Seq a) -> Seq a #

stimes :: Integral b => b -> Seq a -> Seq a #

Semigroup (MergeSet a) 
Instance details

Defined in Data.Set.Internal

Methods

(<>) :: MergeSet a -> MergeSet a -> MergeSet a #

sconcat :: NonEmpty (MergeSet a) -> MergeSet a #

stimes :: Integral b => b -> MergeSet a -> MergeSet a #

Ord a => Semigroup (Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Methods

(<>) :: Set a -> Set a -> Set a #

sconcat :: NonEmpty (Set a) -> Set a #

stimes :: Integral b => b -> Set a -> Set a #

Semigroup (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

(<>) :: DList a -> DList a -> DList a #

sconcat :: NonEmpty (DList a) -> DList a #

stimes :: Integral b => b -> DList a -> DList a #

Semigroup (FromMaybe b) 
Instance details

Defined in Data.Foldable1

Methods

(<>) :: FromMaybe b -> FromMaybe b -> FromMaybe b #

sconcat :: NonEmpty (FromMaybe b) -> FromMaybe b #

stimes :: Integral b0 => b0 -> FromMaybe b -> FromMaybe b #

Semigroup a => Semigroup (JoinWith a) 
Instance details

Defined in Data.Foldable1

Methods

(<>) :: JoinWith a -> JoinWith a -> JoinWith a #

sconcat :: NonEmpty (JoinWith a) -> JoinWith a #

stimes :: Integral b => b -> JoinWith a -> JoinWith a #

Semigroup (NonEmptyDList a) 
Instance details

Defined in Data.Foldable1

Methods

(<>) :: NonEmptyDList a -> NonEmptyDList a -> NonEmptyDList a #

sconcat :: NonEmpty (NonEmptyDList a) -> NonEmptyDList a #

stimes :: Integral b => b -> NonEmptyDList a -> NonEmptyDList a #

Semigroup a => Semigroup (IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: IO a -> IO a -> IO a #

sconcat :: NonEmpty (IO a) -> IO a #

stimes :: Integral b => b -> IO a -> IO a #

Semigroup (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(<>) :: Doc a -> Doc a -> Doc a #

sconcat :: NonEmpty (Doc a) -> Doc a #

stimes :: Integral b => b -> Doc a -> Doc a #

Semigroup (Array a)

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.Array

Methods

(<>) :: Array a -> Array a -> Array a #

sconcat :: NonEmpty (Array a) -> Array a #

stimes :: Integral b => b -> Array a -> Array a #

Semigroup (PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Methods

(<>) :: PrimArray a -> PrimArray a -> PrimArray a #

sconcat :: NonEmpty (PrimArray a) -> PrimArray a #

stimes :: Integral b => b -> PrimArray a -> PrimArray a #

Semigroup (SmallArray a)

Since: primitive-0.6.3.0

Instance details

Defined in Data.Primitive.SmallArray

Semigroup a => Semigroup (JoinWith a) 
Instance details

Defined in Data.Semigroup.Foldable

Methods

(<>) :: JoinWith a -> JoinWith a -> JoinWith a #

sconcat :: NonEmpty (JoinWith a) -> JoinWith a #

stimes :: Integral b => b -> JoinWith a -> JoinWith a #

Semigroup a => Semigroup (Q a)

Since: template-haskell-2.17.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(<>) :: Q a -> Q a -> Q a #

sconcat :: NonEmpty (Q a) -> Q a #

stimes :: Integral b => b -> Q a -> Q a #

(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

Methods

(<>) :: HashSet a -> HashSet a -> HashSet a #

sconcat :: NonEmpty (HashSet a) -> HashSet a #

stimes :: Integral b => b -> HashSet a -> HashSet a #

Semigroup (Vector a) 
Instance details

Defined in Data.Vector

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

Prim a => Semigroup (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

Storable a => Semigroup (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

Semigroup (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a #

sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a #

stimes :: Integral b => b -> NonEmpty a -> NonEmpty a #

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a #

sconcat :: NonEmpty (Maybe a) -> Maybe a #

stimes :: Integral b => b -> Maybe a -> Maybe a #

Semigroup a => Semigroup (a)

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

(<>) :: (a) -> (a) -> (a) #

sconcat :: NonEmpty (a) -> (a) #

stimes :: Integral b => b -> (a) -> (a) #

Semigroup [a]

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: [a] -> [a] -> [a] #

sconcat :: NonEmpty [a] -> [a] #

stimes :: Integral b => b -> [a] -> [a] #

Semigroup (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b #

sconcat :: NonEmpty (Either a b) -> Either a b #

stimes :: Integral b0 => b0 -> Either a b -> Either a b #

Semigroup a => Semigroup (Op a b)

(<>) @(Op a b) without newtypes is (<>) @(b->a) = liftA2 (<>). This lifts the Semigroup operation (<>) over the output of a.

(<>) :: Op a b -> Op a b -> Op a b
Op f <> Op g = Op a -> f a <> g a
Instance details

Defined in Data.Functor.Contravariant

Methods

(<>) :: Op a b -> Op a b -> Op a b #

sconcat :: NonEmpty (Op a b) -> Op a b #

stimes :: Integral b0 => b0 -> Op a b -> Op a b #

Semigroup (Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

(<>) :: Proxy s -> Proxy s -> Proxy s #

sconcat :: NonEmpty (Proxy s) -> Proxy s #

stimes :: Integral b => b -> Proxy s -> Proxy s #

Semigroup (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: U1 p -> U1 p -> U1 p #

sconcat :: NonEmpty (U1 p) -> U1 p #

stimes :: Integral b => b -> U1 p -> U1 p #

Semigroup (V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: V1 p -> V1 p -> V1 p #

sconcat :: NonEmpty (V1 p) -> V1 p #

stimes :: Integral b => b -> V1 p -> V1 p #

Semigroup a => Semigroup (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

(<>) :: ST s a -> ST s a -> ST s a #

sconcat :: NonEmpty (ST s a) -> ST s a #

stimes :: Integral b => b -> ST s a -> ST s a #

Ord k => Semigroup (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

(<>) :: Map k v -> Map k v -> Map k v #

sconcat :: NonEmpty (Map k v) -> Map k v #

stimes :: Integral b => b -> Map k v -> Map k v #

Semigroup e => Semigroup (Validation e a) 
Instance details

Defined in Data.Either.Validation

Methods

(<>) :: Validation e a -> Validation e a -> Validation e a #

sconcat :: NonEmpty (Validation e a) -> Validation e a #

stimes :: Integral b => b -> Validation e a -> Validation e a #

Apply f => Semigroup (Act f a) 
Instance details

Defined in Data.Key

Methods

(<>) :: Act f a -> Act f a -> Act f a #

sconcat :: NonEmpty (Act f a) -> Act f a #

stimes :: Integral b => b -> Act f a -> Act f a #

Apply f => Semigroup (Act f a) 
Instance details

Defined in Data.Semigroup.Bifoldable

Methods

(<>) :: Act f a -> Act f a -> Act f a #

sconcat :: NonEmpty (Act f a) -> Act f a #

stimes :: Integral b => b -> Act f a -> Act f a #

Apply f => Semigroup (Act f a) 
Instance details

Defined in Data.Semigroup.Foldable

Methods

(<>) :: Act f a -> Act f a -> Act f a #

sconcat :: NonEmpty (Act f a) -> Act f a #

stimes :: Integral b => b -> Act f a -> Act f a #

Alt f => Semigroup (Alt_ f a) 
Instance details

Defined in Data.Semigroup.Foldable

Methods

(<>) :: Alt_ f a -> Alt_ f a -> Alt_ f a #

sconcat :: NonEmpty (Alt_ f a) -> Alt_ f a #

stimes :: Integral b => b -> Alt_ f a -> Alt_ f a #

(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

Methods

(<>) :: HashMap k v -> HashMap k v -> HashMap k v #

sconcat :: NonEmpty (HashMap k v) -> HashMap k v #

stimes :: Integral b => b -> HashMap k v -> HashMap k v #

Semigroup b => Semigroup (a -> b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a -> b) -> (a -> b) -> a -> b #

sconcat :: NonEmpty (a -> b) -> a -> b #

stimes :: Integral b0 => b0 -> (a -> b) -> a -> b #

(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) #

sconcat :: NonEmpty (a, b) -> (a, b) #

stimes :: Integral b0 => b0 -> (a, b) -> (a, b) #

Semigroup a => Semigroup (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(<>) :: Const a b -> Const a b -> Const a b #

sconcat :: NonEmpty (Const a b) -> Const a b #

stimes :: Integral b0 => b0 -> Const a b -> Const a b #

(Applicative f, Semigroup a) => Semigroup (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Ap f a -> Ap f a -> Ap f a #

sconcat :: NonEmpty (Ap f a) -> Ap f a #

stimes :: Integral b => b -> Ap f a -> Ap f a #

Alternative f => Semigroup (Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Alt f a -> Alt f a -> Alt f a #

sconcat :: NonEmpty (Alt f a) -> Alt f a #

stimes :: Integral b => b -> Alt f a -> Alt f a #

Semigroup (f p) => Semigroup (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Rec1 f p -> Rec1 f p -> Rec1 f p #

sconcat :: NonEmpty (Rec1 f p) -> Rec1 f p #

stimes :: Integral b => b -> Rec1 f p -> Rec1 f p #

(Profunctor p, Arrow p, Semigroup b) => Semigroup (Closure p a b) 
Instance details

Defined in Data.Profunctor.Closed

Methods

(<>) :: Closure p a b -> Closure p a b -> Closure p a b #

sconcat :: NonEmpty (Closure p a b) -> Closure p a b #

stimes :: Integral b0 => b0 -> Closure p a b -> Closure p a b #

ArrowPlus p => Semigroup (Tambara p a b) 
Instance details

Defined in Data.Profunctor.Strong

Methods

(<>) :: Tambara p a b -> Tambara p a b -> Tambara p a b #

sconcat :: NonEmpty (Tambara p a b) -> Tambara p a b #

stimes :: Integral b0 => b0 -> Tambara p a b -> Tambara p a b #

Semigroup a => Semigroup (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(<>) :: Tagged s a -> Tagged s a -> Tagged s a #

sconcat :: NonEmpty (Tagged s a) -> Tagged s a #

stimes :: Integral b => b -> Tagged s a -> Tagged s a #

Semigroup a => Semigroup (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

(<>) :: Constant a b -> Constant a b -> Constant a b #

sconcat :: NonEmpty (Constant a b) -> Constant a b #

stimes :: Integral b0 => b0 -> Constant a b -> Constant a b #

(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) #

sconcat :: NonEmpty (a, b, c) -> (a, b, c) #

stimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) #

(Semigroup (f a), Semigroup (g a)) => Semigroup (Product f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Product

Methods

(<>) :: Product f g a -> Product f g a -> Product f g a #

sconcat :: NonEmpty (Product f g a) -> Product f g a #

stimes :: Integral b => b -> Product f g a -> Product f g a #

(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 #

sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p #

stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p #

Semigroup c => Semigroup (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: K1 i c p -> K1 i c p -> K1 i c p #

sconcat :: NonEmpty (K1 i c p) -> K1 i c p #

stimes :: Integral b => b -> K1 i c p -> K1 i c p #

Semigroup r => Semigroup (Forget r a b)

Via Semigroup r => (a -> r)

Since: profunctors-5.6.2

Instance details

Defined in Data.Profunctor.Types

Methods

(<>) :: Forget r a b -> Forget r a b -> Forget r a b #

sconcat :: NonEmpty (Forget r a b) -> Forget r a b #

stimes :: Integral b0 => b0 -> Forget r a b -> Forget r a b #

(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) #

sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) #

stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) #

Semigroup (f (g a)) => Semigroup (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(<>) :: Compose f g a -> Compose f g a -> Compose f g a #

sconcat :: NonEmpty (Compose f g a) -> Compose f g a #

stimes :: Integral b => b -> Compose f g a -> Compose f g a #

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 #

sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p #

stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p #

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 #

sconcat :: NonEmpty (M1 i c f p) -> M1 i c f p #

stimes :: Integral b => b -> M1 i c f p -> M1 i c f p #

(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) #

sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) #

stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) #

class Semigroup a => Monoid a where #

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 newtypes 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 #

Identity of mappend

>>> "Hello world" <> mempty
"Hello world"

mappend :: a -> a -> a #

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 #

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 All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: All #

mappend :: All -> All -> All #

mconcat :: [All] -> All #

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Any #

mappend :: Any -> Any -> Any #

mconcat :: [Any] -> Any #

Monoid Builder 
Instance details

Defined in Data.ByteString.Builder.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Monoid ByteArray 
Instance details

Defined in Data.Array.Byte

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

Monoid Builder 
Instance details

Defined in Data.Text.Internal.Builder

Monoid CalendarDiffDays

Additive

Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Monoid CalendarDiffTime

Additive

Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: () #

mappend :: () -> () -> () #

mconcat :: [()] -> () #

FiniteBits a => Monoid (And a)

This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

mempty :: And a #

mappend :: And a -> And a -> And a #

mconcat :: [And a] -> And a #

FiniteBits a => Monoid (Iff a)

This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

mempty :: Iff a #

mappend :: Iff a -> Iff a -> Iff a #

mconcat :: [Iff a] -> Iff a #

Bits a => Monoid (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

mempty :: Ior a #

mappend :: Ior a -> Ior a -> Ior a #

mconcat :: [Ior a] -> Ior a #

Bits a => Monoid (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

mempty :: Xor a #

mappend :: Xor a -> Xor a -> Xor a #

mconcat :: [Xor a] -> Xor a #

Monoid (Comparison a)

mempty on comparisons always returns EQ. Without newtypes this equals pure (pure EQ).

mempty :: Comparison a
mempty = Comparison _ _ -> EQ
Instance details

Defined in Data.Functor.Contravariant

Monoid (Equivalence a)

mempty on equivalences always returns True. Without newtypes this equals pure (pure True).

mempty :: Equivalence a
mempty = Equivalence _ _ -> True
Instance details

Defined in Data.Functor.Contravariant

Monoid (Predicate a)

mempty on predicates always returns True. Without newtypes this equals pure True.

mempty :: Predicate a
mempty = _ -> True
Instance details

Defined in Data.Functor.Contravariant

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

mconcat :: [Identity a] -> Identity a #

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a #

mappend :: First a -> First a -> First a #

mconcat :: [First a] -> First a #

Monoid (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: Last a #

mappend :: Last a -> Last a -> Last a #

mconcat :: [Last a] -> Last a #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a #

mappend :: Down a -> Down a -> Down a #

mconcat :: [Down a] -> Down a #

(Ord a, Bounded a) => Monoid (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

(Ord a, Bounded a) => Monoid (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Min a #

mappend :: Min a -> Min a -> Min a #

mconcat :: [Min a] -> Min a #

Monoid m => Monoid (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a #

mappend :: Dual a -> Dual a -> Dual a #

mconcat :: [Dual a] -> Dual a #

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a #

mappend :: Endo a -> Endo a -> Endo a #

mconcat :: [Endo a] -> Endo a #

Num a => Monoid (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Product a #

mappend :: Product a -> Product a -> Product a #

mconcat :: [Product a] -> Product a #

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a #

mappend :: Sum a -> Sum a -> Sum a #

mconcat :: [Sum a] -> Sum a #

Monoid p => Monoid (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Par1 p #

mappend :: Par1 p -> Par1 p -> Par1 p #

mconcat :: [Par1 p] -> Par1 p #

Monoid (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

mempty :: IntMap a #

mappend :: IntMap a -> IntMap a -> IntMap a #

mconcat :: [IntMap a] -> IntMap a #

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a #

mappend :: Seq a -> Seq a -> Seq a #

mconcat :: [Seq a] -> Seq a #

Monoid (MergeSet a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: MergeSet a #

mappend :: MergeSet a -> MergeSet a -> MergeSet a #

mconcat :: [MergeSet a] -> MergeSet a #

Ord a => Monoid (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: Set a #

mappend :: Set a -> Set a -> Set a #

mconcat :: [Set a] -> Set a #

Monoid (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

mempty :: DList a #

mappend :: DList a -> DList a -> DList a #

mconcat :: [DList a] -> DList a #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

Monoid (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

mempty :: Doc a #

mappend :: Doc a -> Doc a -> Doc a #

mconcat :: [Doc a] -> Doc a #

Monoid (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

mempty :: Array a #

mappend :: Array a -> Array a -> Array a #

mconcat :: [Array a] -> Array a #

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 a => Monoid (Q a)

Since: template-haskell-2.17.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

mempty :: Q a #

mappend :: Q a -> Q a -> Q a #

mconcat :: [Q a] -> Q a #

(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

Methods

mempty :: HashSet a #

mappend :: HashSet a -> HashSet a -> HashSet a #

mconcat :: [HashSet a] -> HashSet a #

Monoid (Vector a) 
Instance details

Defined in Data.Vector

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Prim a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Storable a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

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

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Monoid a => Monoid (a)

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

mempty :: (a) #

mappend :: (a) -> (a) -> (a) #

mconcat :: [(a)] -> (a) #

Monoid [a]

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: [a] #

mappend :: [a] -> [a] -> [a] #

mconcat :: [[a]] -> [a] #

Monoid a => Monoid (Op a b)

mempty @(Op a b) without newtypes is mempty @(b->a) = _ -> mempty.

mempty :: Op a b
mempty = Op _ -> mempty
Instance details

Defined in Data.Functor.Contravariant

Methods

mempty :: Op a b #

mappend :: Op a b -> Op a b -> Op a b #

mconcat :: [Op a b] -> Op a b #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s #

mappend :: Proxy s -> Proxy s -> Proxy s #

mconcat :: [Proxy s] -> Proxy s #

Monoid (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: U1 p #

mappend :: U1 p -> U1 p -> U1 p #

mconcat :: [U1 p] -> U1 p #

Monoid a => Monoid (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

mempty :: ST s a #

mappend :: ST s a -> ST s a -> ST s a #

mconcat :: [ST s a] -> ST s a #

Ord k => Monoid (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

mempty :: Map k v #

mappend :: Map k v -> Map k v -> Map k v #

mconcat :: [Map k v] -> Map k v #

Monoid e => Monoid (Validation e a) 
Instance details

Defined in Data.Either.Validation

Methods

mempty :: Validation e a #

mappend :: Validation e a -> Validation e a -> Validation e a #

mconcat :: [Validation e a] -> Validation e a #

(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

Methods

mempty :: HashMap k v #

mappend :: HashMap k v -> HashMap k v -> HashMap k v #

mconcat :: [HashMap k v] -> HashMap k v #

Monoid b => Monoid (a -> b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: a -> b #

mappend :: (a -> b) -> (a -> b) -> a -> b #

mconcat :: [a -> b] -> a -> b #

(Monoid a, Monoid b) => Monoid (a, b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b) #

mappend :: (a, b) -> (a, b) -> (a, b) #

mconcat :: [(a, b)] -> (a, b) #

Monoid a => Monoid (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: Const a b #

mappend :: Const a b -> Const a b -> Const a b #

mconcat :: [Const a b] -> Const a b #

(Applicative f, Monoid a) => Monoid (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mempty :: Ap f a #

mappend :: Ap f a -> Ap f a -> Ap f a #

mconcat :: [Ap f a] -> Ap f a #

Alternative f => Monoid (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Alt f a #

mappend :: Alt f a -> Alt f a -> Alt f a #

mconcat :: [Alt f a] -> Alt f a #

Monoid (f p) => Monoid (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Rec1 f p #

mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p #

mconcat :: [Rec1 f p] -> Rec1 f p #

(Profunctor p, Arrow p, Semigroup b, Monoid b) => Monoid (Closure p a b) 
Instance details

Defined in Data.Profunctor.Closed

Methods

mempty :: Closure p a b #

mappend :: Closure p a b -> Closure p a b -> Closure p a b #

mconcat :: [Closure p a b] -> Closure p a b #

ArrowPlus p => Monoid (Tambara p a b) 
Instance details

Defined in Data.Profunctor.Strong

Methods

mempty :: Tambara p a b #

mappend :: Tambara p a b -> Tambara p a b -> Tambara p a b #

mconcat :: [Tambara p a b] -> Tambara p a b #

(Semigroup a, Monoid a) => Monoid (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

mempty :: Tagged s a #

mappend :: Tagged s a -> Tagged s a -> Tagged s a #

mconcat :: [Tagged s a] -> Tagged s a #

Monoid a => Monoid (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

mempty :: Constant a b #

mappend :: Constant a b -> Constant a b -> Constant a b #

mconcat :: [Constant a b] -> Constant a b #

(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) #

mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) #

mconcat :: [(a, b, c)] -> (a, b, c) #

(Monoid (f a), Monoid (g a)) => Monoid (Product f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Product

Methods

mempty :: Product f g a #

mappend :: Product f g a -> Product f g a -> Product f g a #

mconcat :: [Product f g a] -> Product f g a #

(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 #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

mconcat :: [(f :*: g) p] -> (f :*: g) p #

Monoid c => Monoid (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: K1 i c p #

mappend :: K1 i c p -> K1 i c p -> K1 i c p #

mconcat :: [K1 i c p] -> K1 i c p #

Monoid r => Monoid (Forget r a b)

Via Monoid r => (a -> r)

Since: profunctors-5.6.2

Instance details

Defined in Data.Profunctor.Types

Methods

mempty :: Forget r a b #

mappend :: Forget r a b -> Forget r a b -> Forget r a b #

mconcat :: [Forget r a b] -> Forget r a b #

(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) #

mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

mconcat :: [(a, b, c, d)] -> (a, b, c, d) #

Monoid (f (g a)) => Monoid (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

mempty :: Compose f g a #

mappend :: Compose f g a -> Compose f g a -> Compose f g a #

mconcat :: [Compose f g a] -> Compose f g a #

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 #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

mconcat :: [(f :.: g) p] -> (f :.: g) p #

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 #

mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p #

mconcat :: [M1 i c f p] -> M1 i c f p #

(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) #

mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) #

class HasField (x :: k) r a | x r -> a where #

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 #

Selector function to extract the field from the record.

data Bool #

Constructors

False 
True 

Instances

Instances details
Data Bool

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bool -> c Bool #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bool #

toConstr :: Bool -> Constr #

dataTypeOf :: Bool -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bool) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bool) #

gmapT :: (forall b. Data b => b -> b) -> Bool -> Bool #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r #

gmapQ :: (forall d. Data d => d -> u) -> Bool -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Bool -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bool -> m Bool #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool #

Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Bool -> Int #

alignment :: Bool -> Int #

peekElemOff :: Ptr Bool -> Int -> IO Bool #

pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () #

peekByteOff :: Ptr b -> Int -> IO Bool #

pokeByteOff :: Ptr b -> Int -> Bool -> IO () #

peek :: Ptr Bool -> IO Bool #

poke :: Ptr Bool -> Bool -> IO () #

Bits Bool

Interpret Bool as 1-bit bit-field

Since: base-4.7.0.0

Instance details

Defined in GHC.Bits

FiniteBits Bool

Since: base-4.7.0.0

Instance details

Defined in GHC.Bits

Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Bool -> Bool #

pred :: Bool -> Bool #

toEnum :: Int -> Bool #

fromEnum :: Bool -> Int #

enumFrom :: Bool -> [Bool] #

enumFromThen :: Bool -> Bool -> [Bool] #

enumFromTo :: Bool -> Bool -> [Bool] #

enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

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

Ix Bool

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: (Bool, Bool) -> [Bool] #

index :: (Bool, Bool) -> Bool -> Int #

unsafeIndex :: (Bool, Bool) -> Bool -> Int #

inRange :: (Bool, Bool) -> Bool -> Bool #

rangeSize :: (Bool, Bool) -> Int #

unsafeRangeSize :: (Bool, Bool) -> Int #

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Bool -> ShowS #

show :: Bool -> String #

showList :: [Bool] -> ShowS #

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Bool -> () #

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

(==) :: Bool -> Bool -> Bool #

(/=) :: Bool -> Bool -> Bool #

Ord Bool 
Instance details

Defined in GHC.Classes

Methods

compare :: Bool -> Bool -> Ordering #

(<) :: Bool -> Bool -> Bool #

(<=) :: Bool -> Bool -> Bool #

(>) :: Bool -> Bool -> Bool #

(>=) :: Bool -> Bool -> Bool #

max :: Bool -> Bool -> Bool #

min :: Bool -> Bool -> Bool #

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int #

hash :: Bool -> Int #

Uniform Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Bool #

UniformRange Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Bool, Bool) -> g -> m Bool #

Unbox 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

Lift Bool 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Bool -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Bool -> Code m Bool #

Vector Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

type DemoteRep Bool 
Instance details

Defined in GHC.Generics

type DemoteRep Bool = Bool
type Rep Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep Bool = D1 ('MetaData "Bool" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "True" 'PrefixI 'False) (U1 :: Type -> Type))
data Sing (a :: Bool) 
Instance details

Defined in GHC.Generics

data Sing (a :: Bool) where
newtype Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Bool = MV_Bool (MVector s Word8)

type String = [Char] #

A String is a list of characters. String constants in Haskell are values of type String.

See Data.List for operations on lists.

data Char #

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
Data Char

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Char -> c Char #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Char #

toConstr :: Char -> Constr #

dataTypeOf :: Char -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Char) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Char) #

gmapT :: (forall b. Data b => b -> b) -> Char -> Char #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r #

gmapQ :: (forall d. Data d => d -> u) -> Char -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Char -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Char -> m Char #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char #

Storable Char

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Char -> Int #

alignment :: Char -> Int #

peekElemOff :: Ptr Char -> Int -> IO Char #

pokeElemOff :: Ptr Char -> Int -> Char -> IO () #

peekByteOff :: Ptr b -> Int -> IO Char #

pokeByteOff :: Ptr b -> Int -> Char -> IO () #

peek :: Ptr Char -> IO Char #

poke :: Ptr Char -> Char -> IO () #

Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Char -> Char #

pred :: Char -> Char #

toEnum :: Int -> Char #

fromEnum :: Char -> Int #

enumFrom :: Char -> [Char] #

enumFromThen :: Char -> Char -> [Char] #

enumFromTo :: Char -> Char -> [Char] #

enumFromThenTo :: Char -> Char -> Char -> [Char] #

Ix Char

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: (Char, Char) -> [Char] #

index :: (Char, Char) -> Char -> Int #

unsafeIndex :: (Char, Char) -> Char -> Int #

inRange :: (Char, Char) -> Char -> Bool #

rangeSize :: (Char, Char) -> Int #

unsafeRangeSize :: (Char, Char) -> Int #

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Char -> ShowS #

show :: Char -> String #

showList :: [Char] -> ShowS #

IsChar Char

Since: base-2.1

Instance details

Defined in Text.Printf

Methods

toChar :: Char -> Char #

fromChar :: Char -> Char #

PrintfArg Char

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Char 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Char -> () #

Eq Char 
Instance details

Defined in GHC.Classes

Methods

(==) :: Char -> Char -> Bool #

(/=) :: Char -> Char -> Bool #

Ord Char 
Instance details

Defined in GHC.Classes

Methods

compare :: Char -> Char -> Ordering #

(<) :: Char -> Char -> Bool #

(<=) :: Char -> Char -> Bool #

(>) :: Char -> Char -> Bool #

(>=) :: Char -> Char -> Bool #

max :: Char -> Char -> Char #

min :: Char -> Char -> Char #

Hashable Char 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Char -> Int #

hash :: Char -> Int #

Prim Char 
Instance details

Defined in Data.Primitive.Types

Uniform Char 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Char #

UniformRange Char 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Char, Char) -> g -> m Char #

ErrorList Char 
Instance details

Defined in Control.Monad.Trans.Error

Methods

listMsg :: String -> [Char] #

Unbox Char 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Char 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Char -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Char -> Code m Char #

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) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Char) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Char a -> Rep1 (URec Char) a #

to1 :: forall (a :: k0). Rep1 (URec Char) a -> URec Char a #

Foldable (UChar :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UChar m -> m #

foldMap :: Monoid m => (a -> m) -> UChar a -> m #

foldMap' :: Monoid m => (a -> m) -> UChar a -> m #

foldr :: (a -> b -> b) -> b -> UChar a -> b #

foldr' :: (a -> b -> b) -> b -> UChar a -> b #

foldl :: (b -> a -> b) -> b -> UChar a -> b #

foldl' :: (b -> a -> b) -> b -> UChar a -> b #

foldr1 :: (a -> a -> a) -> UChar a -> a #

foldl1 :: (a -> a -> a) -> UChar a -> a #

toList :: UChar a -> [a] #

null :: UChar a -> Bool #

length :: UChar a -> Int #

elem :: Eq a => a -> UChar a -> Bool #

maximum :: Ord a => UChar a -> a #

minimum :: Ord a => UChar a -> a #

sum :: Num a => UChar a -> a #

product :: Num a => UChar a -> a #

Traversable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) #

sequenceA :: Applicative f => UChar (f a) -> f (UChar a) #

mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) #

sequence :: Monad m => UChar (m a) -> m (UChar a) #

Invariant (UChar :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UChar a -> UChar b #

Functor (URec Char :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Char a -> URec Char b #

(<$) :: a -> URec Char b -> URec Char a #

Generic (URec Char p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type #

Methods

from :: URec Char p -> Rep (URec Char p) x #

to :: Rep (URec Char p) x -> URec Char p #

Show (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Char p -> ShowS #

show :: URec Char p -> String #

showList :: [URec Char p] -> ShowS #

Eq (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Char p -> URec Char p -> Bool #

(/=) :: URec Char p -> URec Char p -> Bool #

Ord (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Char p -> URec Char p -> Ordering #

(<) :: URec Char p -> URec Char p -> Bool #

(<=) :: URec Char p -> URec Char p -> Bool #

(>) :: URec Char p -> URec Char p -> Bool #

(>=) :: URec Char p -> URec Char p -> Bool #

max :: URec Char p -> URec Char p -> URec Char p #

min :: URec Char p -> URec Char p -> URec Char p #

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

data URec Char (p :: k) = UChar {}
newtype MVector s Char 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Char = MV_Char (MVector s Char)
type Compare (a :: Char) (b :: Char) 
Instance details

Defined in Data.Type.Ord

type Compare (a :: Char) (b :: Char) = CmpChar a b
type Rep1 (URec Char :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Char :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: k -> Type)))
type Rep (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Char p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: Type -> Type)))

data Double #

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.

Instances

Instances details
Data Double

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Double -> c Double #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Double #

toConstr :: Double -> Constr #

dataTypeOf :: Double -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Double) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Double) #

gmapT :: (forall b. Data b => b -> b) -> Double -> Double #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r #

gmapQ :: (forall d. Data d => d -> u) -> Double -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Double -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Double -> m Double #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double #

Storable Double

Since: base-2.1

Instance details

Defined in Foreign.Storable

Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

PrintfArg Double

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Double 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Double -> () #

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

Methods

(==) :: Double -> Double -> Bool #

(/=) :: Double -> Double -> Bool #

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

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

Methods

hashWithSalt :: Int -> Double -> Int #

hash :: Double -> Int #

Prim Double 
Instance details

Defined in Data.Primitive.Types

UniformRange Double

See Floating point number caveats.

Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Double, Double) -> g -> m Double #

Unbox Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Double 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Double -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Double -> Code m Double #

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) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Double) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Double a -> Rep1 (URec Double) a #

to1 :: forall (a :: k0). Rep1 (URec Double) a -> URec Double a #

Foldable (UDouble :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UDouble m -> m #

foldMap :: Monoid m => (a -> m) -> UDouble a -> m #

foldMap' :: Monoid m => (a -> m) -> UDouble a -> m #

foldr :: (a -> b -> b) -> b -> UDouble a -> b #

foldr' :: (a -> b -> b) -> b -> UDouble a -> b #

foldl :: (b -> a -> b) -> b -> UDouble a -> b #

foldl' :: (b -> a -> b) -> b -> UDouble a -> b #

foldr1 :: (a -> a -> a) -> UDouble a -> a #

foldl1 :: (a -> a -> a) -> UDouble a -> a #

toList :: UDouble a -> [a] #

null :: UDouble a -> Bool #

length :: UDouble a -> Int #

elem :: Eq a => a -> UDouble a -> Bool #

maximum :: Ord a => UDouble a -> a #

minimum :: Ord a => UDouble a -> a #

sum :: Num a => UDouble a -> a #

product :: Num a => UDouble a -> a #

Traversable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) #

sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) #

mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) #

sequence :: Monad m => UDouble (m a) -> m (UDouble a) #

Invariant (UDouble :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UDouble a -> UDouble b #

Functor (URec Double :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Double a -> URec Double b #

(<$) :: a -> URec Double b -> URec Double a #

Generic (URec Double p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type #

Methods

from :: URec Double p -> Rep (URec Double p) x #

to :: Rep (URec Double p) x -> URec Double p #

Show (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Double p -> ShowS #

show :: URec Double p -> String #

showList :: [URec Double p] -> ShowS #

Eq (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Double p -> URec Double p -> Bool #

(/=) :: URec Double p -> URec Double p -> Bool #

Ord (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Double p -> URec Double p -> Ordering #

(<) :: URec Double p -> URec Double p -> Bool #

(<=) :: URec Double p -> URec Double p -> Bool #

(>) :: URec Double p -> URec Double p -> Bool #

(>=) :: URec Double p -> URec Double p -> Bool #

max :: URec Double p -> URec Double p -> URec Double p #

min :: URec Double p -> URec Double p -> URec Double p #

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

data URec Double (p :: k) = UDouble {}
newtype MVector s Double 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 (URec Double :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Double :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: k -> Type)))
type Rep (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Double p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: Type -> Type)))

data Float #

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.

Instances

Instances details
Data Float

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Float -> c Float #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Float #

toConstr :: Float -> Constr #

dataTypeOf :: Float -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Float) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float) #

gmapT :: (forall b. Data b => b -> b) -> Float -> Float #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r #

gmapQ :: (forall d. Data d => d -> u) -> Float -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Float -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Float -> m Float #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float #

Storable Float

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Float -> Int #

alignment :: Float -> Int #

peekElemOff :: Ptr Float -> Int -> IO Float #

pokeElemOff :: Ptr Float -> Int -> Float -> IO () #

peekByteOff :: Ptr b -> Int -> IO Float #

pokeByteOff :: Ptr b -> Int -> Float -> IO () #

peek :: Ptr Float -> IO Float #

poke :: Ptr Float -> Float -> IO () #

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

PrintfArg Float

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Float 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Float -> () #

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 extensionality:

>>> 0 == (-0 :: Float)
True
>>> recip 0 == recip (-0 :: Float)
False
Instance details

Defined in GHC.Classes

Methods

(==) :: Float -> Float -> Bool #

(/=) :: Float -> Float -> Bool #

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

Methods

compare :: Float -> Float -> Ordering #

(<) :: Float -> Float -> Bool #

(<=) :: Float -> Float -> Bool #

(>) :: Float -> Float -> Bool #

(>=) :: Float -> Float -> Bool #

max :: Float -> Float -> Float #

min :: Float -> Float -> 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

Methods

hashWithSalt :: Int -> Float -> Int #

hash :: Float -> Int #

Prim Float 
Instance details

Defined in Data.Primitive.Types

UniformRange Float

See Floating point number caveats.

Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Float, Float) -> g -> m Float #

Unbox Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Float 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Float -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Float -> Code m Float #

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) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Float) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Float a -> Rep1 (URec Float) a #

to1 :: forall (a :: k0). Rep1 (URec Float) a -> URec Float a #

Foldable (UFloat :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UFloat m -> m #

foldMap :: Monoid m => (a -> m) -> UFloat a -> m #

foldMap' :: Monoid m => (a -> m) -> UFloat a -> m #

foldr :: (a -> b -> b) -> b -> UFloat a -> b #

foldr' :: (a -> b -> b) -> b -> UFloat a -> b #

foldl :: (b -> a -> b) -> b -> UFloat a -> b #

foldl' :: (b -> a -> b) -> b -> UFloat a -> b #

foldr1 :: (a -> a -> a) -> UFloat a -> a #

foldl1 :: (a -> a -> a) -> UFloat a -> a #

toList :: UFloat a -> [a] #

null :: UFloat a -> Bool #

length :: UFloat a -> Int #

elem :: Eq a => a -> UFloat a -> Bool #

maximum :: Ord a => UFloat a -> a #

minimum :: Ord a => UFloat a -> a #

sum :: Num a => UFloat a -> a #

product :: Num a => UFloat a -> a #

Traversable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) #

sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) #

mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) #

sequence :: Monad m => UFloat (m a) -> m (UFloat a) #

Invariant (UFloat :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UFloat a -> UFloat b #

Functor (URec Float :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Float a -> URec Float b #

(<$) :: a -> URec Float b -> URec Float a #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type #

Methods

from :: URec Float p -> Rep (URec Float p) x #

to :: Rep (URec Float p) x -> URec Float p #

Show (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Float p -> ShowS #

show :: URec Float p -> String #

showList :: [URec Float p] -> ShowS #

Eq (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

(==) :: URec Float p -> URec Float p -> Bool #

(/=) :: URec Float p -> URec Float p -> Bool #

Ord (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

compare :: URec Float p -> URec Float p -> Ordering #

(<) :: URec Float p -> URec Float p -> Bool #

(<=) :: URec Float p -> URec Float p -> Bool #

(>) :: URec Float p -> URec Float p -> Bool #

(>=) :: URec Float p -> URec Float p -> Bool #

max :: URec Float p -> URec Float p -> URec Float p #

min :: URec Float p -> URec Float p -> URec Float p #

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

data URec Float (p :: k) = UFloat {}
newtype MVector s Float 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 (URec Float :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Float :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: k -> Type)))
type Rep (URec Float p) 
Instance details

Defined in GHC.Generics

type Rep (URec Float p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: Type -> Type)))

data Int #

A fixed-precision integer type with at least the range [-2^29 .. 2^29-1]. The exact range for a given implementation can be determined by using minBound and maxBound from the Bounded class.

Instances

Instances details
Data Int

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int -> c Int #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int #

toConstr :: Int -> Constr #

dataTypeOf :: Int -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int) #

gmapT :: (forall b. Data b => b -> b) -> Int -> Int #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int -> m Int #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int #

Storable Int

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int -> Int #

alignment :: Int -> Int #

peekElemOff :: Ptr Int -> Int -> IO Int #

pokeElemOff :: Ptr Int -> Int -> Int -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int #

pokeByteOff :: Ptr b -> Int -> Int -> IO () #

peek :: Ptr Int -> IO Int #

poke :: Ptr Int -> Int -> IO () #

Bits Int

Since: base-2.1

Instance details

Defined in GHC.Bits

Methods

(.&.) :: Int -> Int -> Int #

(.|.) :: Int -> Int -> Int #

xor :: Int -> Int -> Int #

complement :: Int -> Int #

shift :: Int -> Int -> Int #

rotate :: Int -> Int -> Int #

zeroBits :: Int #

bit :: Int -> Int #

setBit :: Int -> Int -> Int #

clearBit :: Int -> Int -> Int #

complementBit :: Int -> Int -> Int #

testBit :: Int -> Int -> Bool #

bitSizeMaybe :: Int -> Maybe Int #

bitSize :: Int -> Int #

isSigned :: Int -> Bool #

shiftL :: Int -> Int -> Int #

unsafeShiftL :: Int -> Int -> Int #

shiftR :: Int -> Int -> Int #

unsafeShiftR :: Int -> Int -> Int #

rotateL :: Int -> Int -> Int #

rotateR :: Int -> Int -> Int #

popCount :: Int -> Int #

FiniteBits Int

Since: base-4.6.0.0

Instance details

Defined in GHC.Bits

Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: Int #

maxBound :: Int #

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Int -> Int #

pred :: Int -> Int #

toEnum :: Int -> Int #

fromEnum :: Int -> Int #

enumFrom :: Int -> [Int] #

enumFromThen :: Int -> Int -> [Int] #

enumFromTo :: Int -> Int -> [Int] #

enumFromThenTo :: Int -> Int -> Int -> [Int] #

Ix Int

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: (Int, Int) -> [Int] #

index :: (Int, Int) -> Int -> Int #

unsafeIndex :: (Int, Int) -> Int -> Int #

inRange :: (Int, Int) -> Int -> Bool #

rangeSize :: (Int, Int) -> Int #

unsafeRangeSize :: (Int, Int) -> Int #

Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Int -> Int -> Int #

(-) :: Int -> Int -> Int #

(*) :: Int -> Int -> Int #

negate :: Int -> Int #

abs :: Int -> Int #

signum :: Int -> Int #

fromInteger :: Integer -> Int #

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

quot :: Int -> Int -> Int #

rem :: Int -> Int -> Int #

div :: Int -> Int -> Int #

mod :: Int -> Int -> Int #

quotRem :: Int -> Int -> (Int, Int) #

divMod :: Int -> Int -> (Int, Int) #

toInteger :: Int -> Integer #

Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Int -> Rational #

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Int -> ShowS #

show :: Int -> String #

showList :: [Int] -> ShowS #

PrintfArg Int

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Int 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () #

Eq Int 
Instance details

Defined in GHC.Classes

Methods

(==) :: Int -> Int -> Bool #

(/=) :: Int -> Int -> Bool #

Ord Int 
Instance details

Defined in GHC.Classes

Methods

compare :: Int -> Int -> Ordering #

(<) :: Int -> Int -> Bool #

(<=) :: Int -> Int -> Bool #

(>) :: Int -> Int -> Bool #

(>=) :: Int -> Int -> Bool #

max :: Int -> Int -> Int #

min :: Int -> Int -> Int #

Hashable Int 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int -> Int #

hash :: Int -> Int #

Prim Int 
Instance details

Defined in Data.Primitive.Types

Uniform Int 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int #

UniformRange Int 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int, Int) -> g -> m Int #

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

Lift Int 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Int -> Code m Int #

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) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Int) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Int a -> Rep1 (URec Int) a #

to1 :: forall (a :: k0). Rep1 (URec Int) a -> URec Int a #

Foldable (UInt :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UInt m -> m #

foldMap :: Monoid m => (a -> m) -> UInt a -> m #

foldMap' :: Monoid m => (a -> m) -> UInt a -> m #

foldr :: (a -> b -> b) -> b -> UInt a -> b #

foldr' :: (a -> b -> b) -> b -> UInt a -> b #

foldl :: (b -> a -> b) -> b -> UInt a -> b #

foldl' :: (b -> a -> b) -> b -> UInt a -> b #

foldr1 :: (a -> a -> a) -> UInt a -> a #

foldl1 :: (a -> a -> a) -> UInt a -> a #

toList :: UInt a -> [a] #

null :: UInt a -> Bool #

length :: UInt a -> Int #

elem :: Eq a => a -> UInt a -> Bool #

maximum :: Ord a => UInt a -> a #

minimum :: Ord a => UInt a -> a #

sum :: Num a => UInt a -> a #

product :: Num a => UInt a -> a #

Traversable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) #

sequenceA :: Applicative f => UInt (f a) -> f (UInt a) #

mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) #

sequence :: Monad m => UInt (m a) -> m (UInt a) #

Invariant (UInt :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UInt a -> UInt b #

Functor (URec Int :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Int a -> URec Int b #

(<$) :: a -> URec Int b -> URec Int a #

Generic (URec Int p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type #

Methods

from :: URec Int p -> Rep (URec Int p) x #

to :: Rep (URec Int p) x -> URec Int p #

Show (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Int p -> ShowS #

show :: URec Int p -> String #

showList :: [URec Int p] -> ShowS #

Eq (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Int p -> URec Int p -> Bool #

(/=) :: URec Int p -> URec Int p -> Bool #

Ord (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Int p -> URec Int p -> Ordering #

(<) :: URec Int p -> URec Int p -> Bool #

(<=) :: URec Int p -> URec Int p -> Bool #

(>) :: URec Int p -> URec Int p -> Bool #

(>=) :: URec Int p -> URec Int p -> Bool #

max :: URec Int p -> URec Int p -> URec Int p #

min :: URec Int p -> URec Int p -> URec Int p #

newtype Vector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int = V_Int (Vector Int)
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 Int (p :: k) = UInt {}
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

newtype MVector s Int = MV_Int (MVector s Int)
type Rep1 (URec Int :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Int :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: k -> Type)))
type Rep (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Int p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: Type -> Type)))

data Int8 #

8-bit signed integer type

Instances

Instances details
Data Int8

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int8 -> c Int8 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int8 #

toConstr :: Int8 -> Constr #

dataTypeOf :: Int8 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int8) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int8) #

gmapT :: (forall b. Data b => b -> b) -> Int8 -> Int8 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int8 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int8 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int8 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int8 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int8 -> m Int8 #

Storable Int8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int8 -> Int #

alignment :: Int8 -> Int #

peekElemOff :: Ptr Int8 -> Int -> IO Int8 #

pokeElemOff :: Ptr Int8 -> Int -> Int8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int8 #

pokeByteOff :: Ptr b -> Int -> Int8 -> IO () #

peek :: Ptr Int8 -> IO Int8 #

poke :: Ptr Int8 -> Int8 -> IO () #

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

Bounded Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

succ :: Int8 -> Int8 #

pred :: Int8 -> Int8 #

toEnum :: Int -> Int8 #

fromEnum :: Int8 -> Int #

enumFrom :: Int8 -> [Int8] #

enumFromThen :: Int8 -> Int8 -> [Int8] #

enumFromTo :: Int8 -> Int8 -> [Int8] #

enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] #

Ix Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

range :: (Int8, Int8) -> [Int8] #

index :: (Int8, Int8) -> Int8 -> Int #

unsafeIndex :: (Int8, Int8) -> Int8 -> Int #

inRange :: (Int8, Int8) -> Int8 -> Bool #

rangeSize :: (Int8, Int8) -> Int #

unsafeRangeSize :: (Int8, Int8) -> Int #

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(+) :: Int8 -> Int8 -> Int8 #

(-) :: Int8 -> Int8 -> Int8 #

(*) :: Int8 -> Int8 -> Int8 #

negate :: Int8 -> Int8 #

abs :: Int8 -> Int8 #

signum :: Int8 -> Int8 #

fromInteger :: Integer -> Int8 #

Read Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

quot :: Int8 -> Int8 -> Int8 #

rem :: Int8 -> Int8 -> Int8 #

div :: Int8 -> Int8 -> Int8 #

mod :: Int8 -> Int8 -> Int8 #

quotRem :: Int8 -> Int8 -> (Int8, Int8) #

divMod :: Int8 -> Int8 -> (Int8, Int8) #

toInteger :: Int8 -> Integer #

Real Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int8 -> Rational #

Show Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int8 -> ShowS #

show :: Int8 -> String #

showList :: [Int8] -> ShowS #

PrintfArg Int8

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Int8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int8 -> () #

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int8 -> Int8 -> Bool #

(/=) :: Int8 -> Int8 -> Bool #

Ord Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int8 -> Int8 -> Ordering #

(<) :: Int8 -> Int8 -> Bool #

(<=) :: Int8 -> Int8 -> Bool #

(>) :: Int8 -> Int8 -> Bool #

(>=) :: Int8 -> Int8 -> Bool #

max :: Int8 -> Int8 -> Int8 #

min :: Int8 -> Int8 -> Int8 #

Hashable Int8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int8 -> Int #

hash :: Int8 -> Int #

Prim Int8 
Instance details

Defined in Data.Primitive.Types

Uniform Int8 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int8 #

UniformRange Int8 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int8, Int8) -> g -> m Int8 #

Unbox Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int8 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Int8 -> Code m Int8 #

Vector Vector Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int8 = MV_Int8 (MVector s Int8)

data Int16 #

16-bit signed integer type

Instances

Instances details
Data Int16

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int16 -> c Int16 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int16 #

toConstr :: Int16 -> Constr #

dataTypeOf :: Int16 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int16) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int16) #

gmapT :: (forall b. Data b => b -> b) -> Int16 -> Int16 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int16 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int16 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int16 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int16 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int16 -> m Int16 #

Storable Int16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int16 -> Int #

alignment :: Int16 -> Int #

peekElemOff :: Ptr Int16 -> Int -> IO Int16 #

pokeElemOff :: Ptr Int16 -> Int -> Int16 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int16 #

pokeByteOff :: Ptr b -> Int -> Int16 -> IO () #

peek :: Ptr Int16 -> IO Int16 #

poke :: Ptr Int16 -> Int16 -> IO () #

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

Bounded Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int16 -> Rational #

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int16 -> ShowS #

show :: Int16 -> String #

showList :: [Int16] -> ShowS #

PrintfArg Int16

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Int16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int16 -> () #

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int16 -> Int16 -> Bool #

(/=) :: Int16 -> Int16 -> Bool #

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int16 -> Int16 -> Ordering #

(<) :: Int16 -> Int16 -> Bool #

(<=) :: Int16 -> Int16 -> Bool #

(>) :: Int16 -> Int16 -> Bool #

(>=) :: Int16 -> Int16 -> Bool #

max :: Int16 -> Int16 -> Int16 #

min :: Int16 -> Int16 -> Int16 #

Hashable Int16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int16 -> Int #

hash :: Int16 -> Int #

Prim Int16 
Instance details

Defined in Data.Primitive.Types

Uniform Int16 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int16 #

UniformRange Int16 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int16, Int16) -> g -> m Int16 #

Unbox Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int16 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int16 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Int16 -> Code m Int16 #

Vector Vector Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int16 
Instance details

Defined in Data.Vector.Unboxed.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 #

32-bit signed integer type

Instances

Instances details
Data Int32

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int32 -> c Int32 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int32 #

toConstr :: Int32 -> Constr #

dataTypeOf :: Int32 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int32) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int32) #

gmapT :: (forall b. Data b => b -> b) -> Int32 -> Int32 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int32 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int32 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int32 -> Int #

alignment :: Int32 -> Int #

peekElemOff :: Ptr Int32 -> Int -> IO Int32 #

pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int32 #

pokeByteOff :: Ptr b -> Int -> Int32 -> IO () #

peek :: Ptr Int32 -> IO Int32 #

poke :: Ptr Int32 -> Int32 -> IO () #

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

Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int32 -> Rational #

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

PrintfArg Int32

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Int32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int32 -> () #

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int32 -> Int32 -> Bool #

(/=) :: Int32 -> Int32 -> Bool #

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int32 -> Int32 -> Ordering #

(<) :: Int32 -> Int32 -> Bool #

(<=) :: Int32 -> Int32 -> Bool #

(>) :: Int32 -> Int32 -> Bool #

(>=) :: Int32 -> Int32 -> Bool #

max :: Int32 -> Int32 -> Int32 #

min :: Int32 -> Int32 -> Int32 #

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int #

Prim Int32 
Instance details

Defined in Data.Primitive.Types

Uniform Int32 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int32 #

UniformRange Int32 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int32, Int32) -> g -> m Int32 #

Unbox Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int32 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Int32 -> Code m Int32 #

Vector Vector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int32 
Instance details

Defined in Data.Vector.Unboxed.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 #

64-bit signed integer type

Instances

Instances details
Data Int64

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int64 -> c Int64 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int64 #

toConstr :: Int64 -> Constr #

dataTypeOf :: Int64 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int64) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int64) #

gmapT :: (forall b. Data b => b -> b) -> Int64 -> Int64 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int64 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int64 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int64 -> Int #

alignment :: Int64 -> Int #

peekElemOff :: Ptr Int64 -> Int -> IO Int64 #

pokeElemOff :: Ptr Int64 -> Int -> Int64 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int64 #

pokeByteOff :: Ptr b -> Int -> Int64 -> IO () #

peek :: Ptr Int64 -> IO Int64 #

poke :: Ptr Int64 -> Int64 -> IO () #

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

Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int64 -> Rational #

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

PrintfArg Int64

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Int64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int64 -> () #

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int64 -> Int64 -> Bool #

(/=) :: Int64 -> Int64 -> Bool #

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int64 -> Int64 -> Ordering #

(<) :: Int64 -> Int64 -> Bool #

(<=) :: Int64 -> Int64 -> Bool #

(>) :: Int64 -> Int64 -> Bool #

(>=) :: Int64 -> Int64 -> Bool #

max :: Int64 -> Int64 -> Int64 #

min :: Int64 -> Int64 -> Int64 #

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int #

hash :: Int64 -> Int #

Prim Int64 
Instance details

Defined in Data.Primitive.Types

Uniform Int64 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int64 #

UniformRange Int64 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int64, Int64) -> g -> m Int64 #

Unbox Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int64 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Int64 -> Code m Int64 #

Vector Vector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int64 
Instance details

Defined in Data.Vector.Unboxed.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 #

Arbitrary precision integers. In contrast with fixed-size integral types such as Int, the Integer type represents the entire infinite range of integers.

Integers are stored in a kind of sign-magnitude form, hence do not expect two's complement form when using bit operations.

If the value is small (fit into an Int), IS constructor is used. Otherwise Integer and IN constructors are used to store a BigNat representing respectively the positive or the negative value magnitude.

Invariant: Integer and IN are used iff value doesn't fit in IS

Instances

Instances details
Data Integer

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer #

toConstr :: Integer -> Constr #

dataTypeOf :: Integer -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Integer) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Integer) #

gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r #

gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

Bits Integer

Since: base-2.1

Instance details

Defined in GHC.Bits

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Ix Integer

Since: base-2.1

Instance details

Defined in GHC.Ix

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

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

PrintfArg Integer

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Integer 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Integer -> () #

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Methods

(==) :: Integer -> Integer -> Bool #

(/=) :: Integer -> Integer -> Bool #

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int #

hash :: Integer -> Int #

UniformRange Integer 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Integer, Integer) -> g -> m Integer #

Lift Integer 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Integer -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Integer -> Code m Integer #

data Natural #

Natural number

Invariant: numbers <= 0xffffffffffffffff use the NS constructor

Instances

Instances details
Data Natural

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural #

toConstr :: Natural -> Constr #

dataTypeOf :: Natural -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Natural) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) #

gmapT :: (forall b. Data b => b -> b) -> Natural -> Natural #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #

gmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

Bits Natural

Since: base-4.8.0

Instance details

Defined in GHC.Bits

Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Ix Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Ix

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

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

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

PrintfArg Natural

Since: base-4.8.0.0

Instance details

Defined in Text.Printf

NFData Natural

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Natural -> () #

Eq Natural 
Instance details

Defined in GHC.Num.Natural

Methods

(==) :: Natural -> Natural -> Bool #

(/=) :: Natural -> Natural -> Bool #

Ord Natural 
Instance details

Defined in GHC.Num.Natural

Hashable Natural 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Natural -> Int #

hash :: Natural -> Int #

UniformRange Natural 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Natural, Natural) -> g -> m Natural #

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

Methods

resolution :: p n -> Integer #

Lift Natural 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Natural -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Natural -> Code m Natural #

type Compare (a :: Natural) (b :: Natural) 
Instance details

Defined in Data.Type.Ord

type Compare (a :: Natural) (b :: Natural) = CmpNat a b

data Maybe a #

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
MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> Maybe a #

MonadFix Maybe

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Maybe a) -> Maybe a #

MonadZip Maybe

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: Maybe a -> Maybe b -> Maybe (a, b) #

mzipWith :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

munzip :: Maybe (a, b) -> (Maybe a, Maybe b) #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Maybe m -> m #

foldMap :: Monoid m => (a -> m) -> Maybe a -> m #

foldMap' :: Monoid m => (a -> m) -> Maybe a -> m #

foldr :: (a -> b -> b) -> b -> Maybe a -> b #

foldr' :: (a -> b -> b) -> b -> Maybe a -> b #

foldl :: (b -> a -> b) -> b -> Maybe a -> b #

foldl' :: (b -> a -> b) -> b -> Maybe a -> b #

foldr1 :: (a -> a -> a) -> Maybe a -> a #

foldl1 :: (a -> a -> a) -> Maybe a -> a #

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

elem :: Eq a => a -> Maybe a -> Bool #

maximum :: Ord a => Maybe a -> a #

minimum :: Ord a => Maybe a -> a #

sum :: Num a => Maybe a -> a #

product :: Num a => Maybe a -> a #

Eq1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool #

Ord1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering #

Read1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Maybe a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Maybe a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Maybe a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Maybe a] #

Show1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) #

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> Maybe a #

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

(*>) :: Maybe a -> Maybe b -> Maybe b #

(<*) :: Maybe a -> Maybe b -> Maybe a #

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b #

(<$) :: a -> Maybe b -> Maybe a #

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #

(>>) :: Maybe a -> Maybe b -> Maybe b #

return :: a -> Maybe a #

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

NFData1 Maybe

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Maybe a -> () #

Hashable1 Maybe 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Maybe a -> Int #

Invariant Maybe 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Maybe a -> Maybe b #

FoldableWithKey Maybe 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Maybe a -> [(Key Maybe, a)] #

foldMapWithKey :: Monoid m => (Key Maybe -> a -> m) -> Maybe a -> m #

foldrWithKey :: (Key Maybe -> a -> b -> b) -> b -> Maybe a -> b #

foldlWithKey :: (b -> Key Maybe -> a -> b) -> b -> Maybe a -> b #

Indexable Maybe 
Instance details

Defined in Data.Key

Methods

index :: Maybe a -> Key Maybe -> a #

Keyed Maybe 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key Maybe -> a -> b) -> Maybe a -> Maybe b #

Lookup Maybe 
Instance details

Defined in Data.Key

Methods

lookup :: Key Maybe -> Maybe a -> Maybe a #

TraversableWithKey Maybe 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key Maybe -> a -> f b) -> Maybe a -> f (Maybe b) #

mapWithKeyM :: Monad m => (Key Maybe -> a -> m b) -> Maybe a -> m (Maybe b) #

Zip Maybe 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

zip :: Maybe a -> Maybe b -> Maybe (a, b) #

zap :: Maybe (a -> b) -> Maybe a -> Maybe b #

ZipWithKey Maybe 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key Maybe -> a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

zapWithKey :: Maybe (Key Maybe -> a -> b) -> Maybe a -> Maybe b #

Selective Maybe 
Instance details

Defined in Control.Selective

Methods

select :: Maybe (Either a b) -> Maybe (a -> b) -> Maybe b #

Alt Maybe 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Maybe a -> Maybe a -> Maybe a #

some :: Applicative Maybe => Maybe a -> Maybe [a] #

many :: Applicative Maybe => Maybe a -> Maybe [a] #

Apply Maybe 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

(.>) :: Maybe a -> Maybe b -> Maybe b #

(<.) :: Maybe a -> Maybe b -> Maybe a #

liftF2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

Bind Maybe 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Maybe a -> (a -> Maybe b) -> Maybe b #

join :: Maybe (Maybe a) -> Maybe a #

Extend Maybe 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Maybe a -> Maybe (Maybe a) #

extended :: (Maybe a -> b) -> Maybe a -> Maybe b #

Plus Maybe 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Maybe a #

Generic1 Maybe 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Maybe :: k -> Type #

Methods

from1 :: forall (a :: k). Maybe a -> Rep1 Maybe a #

to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a #

MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: () -> Maybe a #

catchError :: Maybe a -> (() -> Maybe a) -> Maybe a #

Lift a => Lift (Maybe a :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Maybe a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Maybe a -> Code m (Maybe a) #

Data a => Data (Maybe a)

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) #

toConstr :: Maybe a -> Constr #

dataTypeOf :: Maybe a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Maybe a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Maybe a)) #

gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

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

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a #

sconcat :: NonEmpty (Maybe a) -> Maybe a #

stimes :: Integral b => b -> Maybe a -> Maybe a #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

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)

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

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

NFData a => NFData (Maybe a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () #

Eq a => Eq (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

(==) :: Maybe a -> Maybe a -> Bool #

(/=) :: Maybe a -> Maybe a -> Bool #

Ord a => Ord (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

compare :: Maybe a -> Maybe a -> Ordering #

(<) :: Maybe a -> Maybe a -> Bool #

(<=) :: Maybe a -> Maybe a -> Bool #

(>) :: Maybe a -> Maybe a -> Bool #

(>=) :: Maybe a -> Maybe a -> Bool #

max :: Maybe a -> Maybe a -> Maybe a #

min :: Maybe a -> Maybe a -> Maybe a #

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int #

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 Key Maybe 
Instance details

Defined in Data.Key

type Key Maybe = ()
type Rep1 Maybe

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep1 Maybe = D1 ('MetaData "Maybe" "GHC.Maybe" "base" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type DemoteRep (Maybe a) 
Instance details

Defined in GHC.Generics

type DemoteRep (Maybe a) = Maybe (DemoteRep a)
type Rep (Maybe a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (Maybe a) = D1 ('MetaData "Maybe" "GHC.Maybe" "base" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
data Sing (b :: Maybe a) 
Instance details

Defined in GHC.Generics

data Sing (b :: Maybe a) where

data Ordering #

Constructors

LT 
EQ 
GT 

Instances

Instances details
Data Ordering

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ordering -> c Ordering #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering #

toConstr :: Ordering -> Constr #

dataTypeOf :: Ordering -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Ordering) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ordering) #

gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Ix Ordering

Since: base-2.1

Instance details

Defined in GHC.Ix

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

NFData Ordering 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ordering -> () #

Eq Ordering 
Instance details

Defined in GHC.Classes

Ord Ordering 
Instance details

Defined in GHC.Classes

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ordering -> Int #

hash :: Ordering -> Int #

type Rep Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep Ordering = D1 ('MetaData "Ordering" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "LT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EQ" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GT" 'PrefixI 'False) (U1 :: Type -> Type)))

data Ratio a #

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 -> () #

Integral a => Lift (Ratio a :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Ratio a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Ratio a -> Code m (Ratio a) #

(Data a, Integral a) => Data (Ratio a)

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ratio a -> c (Ratio a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ratio a) #

toConstr :: Ratio a -> Constr #

dataTypeOf :: Ratio a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ratio a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ratio a)) #

gmapT :: (forall b. Data b => b -> b) -> Ratio a -> Ratio a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ratio a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ratio a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ratio a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ratio a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ratio a -> m (Ratio a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ratio a -> m (Ratio a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ratio a -> m (Ratio a) #

(Storable a, Integral a) => Storable (Ratio a)

Since: base-4.8.0.0

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ratio a -> Int #

alignment :: Ratio a -> Int #

peekElemOff :: Ptr (Ratio a) -> Int -> IO (Ratio a) #

pokeElemOff :: Ptr (Ratio a) -> Int -> Ratio a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ratio a) #

pokeByteOff :: Ptr b -> Int -> Ratio a -> IO () #

peek :: Ptr (Ratio a) -> IO (Ratio a) #

poke :: Ptr (Ratio a) -> Ratio a -> IO () #

Integral a => Enum (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

succ :: Ratio a -> Ratio a #

pred :: Ratio a -> Ratio a #

toEnum :: Int -> Ratio a #

fromEnum :: Ratio a -> Int #

enumFrom :: Ratio a -> [Ratio a] #

enumFromThen :: Ratio a -> Ratio a -> [Ratio a] #

enumFromTo :: Ratio a -> Ratio a -> [Ratio a] #

enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] #

Integral a => Num (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(+) :: Ratio a -> Ratio a -> Ratio a #

(-) :: Ratio a -> Ratio a -> Ratio a #

(*) :: Ratio a -> Ratio a -> Ratio a #

negate :: Ratio a -> Ratio a #

abs :: Ratio a -> Ratio a #

signum :: Ratio a -> Ratio a #

fromInteger :: Integer -> Ratio a #

(Integral a, Read a) => Read (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Read

Integral a => Fractional (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(/) :: Ratio a -> Ratio a -> Ratio a #

recip :: Ratio a -> Ratio a #

fromRational :: Rational -> Ratio a #

Integral a => Real (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Ratio a -> Rational #

Integral a => RealFrac (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

properFraction :: Integral b => Ratio a -> (b, Ratio a) #

truncate :: Integral b => Ratio a -> b #

round :: Integral b => Ratio a -> b #

ceiling :: Integral b => Ratio a -> b #

floor :: Integral b => Ratio a -> b #

Show a => Show (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

showsPrec :: Int -> Ratio a -> ShowS #

show :: Ratio a -> String #

showList :: [Ratio a] -> ShowS #

NFData a => NFData (Ratio a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ratio a -> () #

Eq a => Eq (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

(==) :: Ratio a -> Ratio a -> Bool #

(/=) :: Ratio a -> Ratio a -> Bool #

Integral a => Ord (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

compare :: Ratio a -> Ratio a -> Ordering #

(<) :: Ratio a -> Ratio a -> Bool #

(<=) :: Ratio a -> Ratio a -> Bool #

(>) :: Ratio a -> Ratio a -> Bool #

(>=) :: Ratio a -> Ratio a -> Bool #

max :: Ratio a -> Ratio a -> Ratio a #

min :: Ratio a -> Ratio a -> Ratio a #

Hashable a => Hashable (Ratio a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ratio a -> Int #

hash :: Ratio a -> Int #

type Rational = Ratio Integer #

Arbitrary-precision rational numbers, represented as a ratio of two Integer values. A rational number may be constructed using the % operator.

data RealWorld #

RealWorld is deeply magical. It is primitive, but it is not unlifted (hence ptrArg). We never manipulate values of type RealWorld; it's only used in the type system, to parameterise State#.

data StablePtr a #

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
Storable (StablePtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: StablePtr a -> Int #

alignment :: StablePtr a -> Int #

peekElemOff :: Ptr (StablePtr a) -> Int -> IO (StablePtr a) #

pokeElemOff :: Ptr (StablePtr a) -> Int -> StablePtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (StablePtr a) #

pokeByteOff :: Ptr b -> Int -> StablePtr a -> IO () #

peek :: Ptr (StablePtr a) -> IO (StablePtr a) #

poke :: Ptr (StablePtr a) -> StablePtr a -> IO () #

Eq (StablePtr a)

Since: base-2.1

Instance details

Defined in GHC.Stable

Methods

(==) :: StablePtr a -> StablePtr a -> Bool #

(/=) :: StablePtr a -> StablePtr a -> Bool #

Prim (StablePtr a) 
Instance details

Defined in Data.Primitive.Types

data IO a #

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
MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> IO a #

MonadFix IO

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> IO a) -> IO a #

MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

Alternative IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> IO a #

(<*>) :: IO (a -> b) -> IO a -> IO b #

liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c #

(*>) :: IO a -> IO b -> IO b #

(<*) :: IO a -> IO b -> IO a #

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> IO a -> IO b #

(<$) :: a -> IO b -> IO a #

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: IO a -> (a -> IO b) -> IO b #

(>>) :: IO a -> IO b -> IO b #

return :: a -> IO a #

MonadPlus IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a #

mplus :: IO a -> IO a -> IO a #

GHCiSandboxIO IO

Since: base-4.4.0.0

Instance details

Defined in GHC.GHCi

Methods

ghciStepIO :: IO a -> IO a #

Invariant IO 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> IO a -> IO b #

PrimBase IO 
Instance details

Defined in Control.Monad.Primitive

Methods

internal :: IO a -> State# (PrimState IO) -> (# State# (PrimState IO), a #) #

PrimMonad IO 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState IO #

Methods

primitive :: (State# (PrimState IO) -> (# State# (PrimState IO), a #)) -> IO a #

Selective IO 
Instance details

Defined in Control.Selective

Methods

select :: IO (Either a b) -> IO (a -> b) -> IO b #

Alt IO

This instance does not actually satisfy the (<.>) right distributive law It instead satisfies the "left catch" law

Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: IO a -> IO a -> IO a #

some :: Applicative IO => IO a -> IO [a] #

many :: Applicative IO => IO a -> IO [a] #

Apply IO 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: IO (a -> b) -> IO a -> IO b #

(.>) :: IO a -> IO b -> IO b #

(<.) :: IO a -> IO b -> IO a #

liftF2 :: (a -> b -> c) -> IO a -> IO b -> IO c #

Bind IO 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: IO a -> (a -> IO b) -> IO b #

join :: IO (IO a) -> IO a #

Plus IO 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: IO a #

Quasi IO 
Instance details

Defined in Language.Haskell.TH.Syntax

Quote IO 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

newName :: String -> IO Name #

MonadError IOException IO 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: IOException -> IO a #

catchError :: IO a -> (IOException -> IO a) -> IO a #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

Semigroup a => Semigroup (IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: IO a -> IO a -> IO a #

sconcat :: NonEmpty (IO a) -> IO a #

stimes :: Integral b => b -> IO a -> IO a #

a ~ () => HPrintfType (IO a)

Since: base-4.7.0.0

Instance details

Defined in Text.Printf

Methods

hspr :: Handle -> String -> [UPrintf] -> IO a

a ~ () => PrintfType (IO a)

Since: base-4.7.0.0

Instance details

Defined in Text.Printf

Methods

spr :: String -> [UPrintf] -> IO a

type PrimState IO 
Instance details

Defined in Control.Monad.Primitive

data Word #

A Word is an unsigned integral type, with the same size as Int.

Instances

Instances details
Data Word

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word #

toConstr :: Word -> Constr #

dataTypeOf :: Word -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word) #

gmapT :: (forall b. Data b => b -> b) -> Word -> Word #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word -> Int #

alignment :: Word -> Int #

peekElemOff :: Ptr Word -> Int -> IO Word #

pokeElemOff :: Ptr Word -> Int -> Word -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word #

pokeByteOff :: Ptr b -> Int -> Word -> IO () #

peek :: Ptr Word -> IO Word #

poke :: Ptr Word -> Word -> IO () #

Bits Word

Since: base-2.1

Instance details

Defined in GHC.Bits

FiniteBits Word

Since: base-4.6.0.0

Instance details

Defined in GHC.Bits

Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Word -> Word #

pred :: Word -> Word #

toEnum :: Int -> Word #

fromEnum :: Word -> Int #

enumFrom :: Word -> [Word] #

enumFromThen :: Word -> Word -> [Word] #

enumFromTo :: Word -> Word -> [Word] #

enumFromThenTo :: Word -> Word -> Word -> [Word] #

Ix Word

Since: base-4.6.0.0

Instance details

Defined in GHC.Ix

Methods

range :: (Word, Word) -> [Word] #

index :: (Word, Word) -> Word -> Int #

unsafeIndex :: (Word, Word) -> Word -> Int #

inRange :: (Word, Word) -> Word -> Bool #

rangeSize :: (Word, Word) -> Int #

unsafeRangeSize :: (Word, Word) -> Int #

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Word -> Word -> Word #

(-) :: Word -> Word -> Word #

(*) :: Word -> Word -> Word #

negate :: Word -> Word #

abs :: Word -> Word #

signum :: Word -> Word #

fromInteger :: Integer -> Word #

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

quot :: Word -> Word -> Word #

rem :: Word -> Word -> Word #

div :: Word -> Word -> Word #

mod :: Word -> Word -> Word #

quotRem :: Word -> Word -> (Word, Word) #

divMod :: Word -> Word -> (Word, Word) #

toInteger :: Word -> Integer #

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

toRational :: Word -> Rational #

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

PrintfArg Word

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Word 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word -> () #

Eq Word 
Instance details

Defined in GHC.Classes

Methods

(==) :: Word -> Word -> Bool #

(/=) :: Word -> Word -> Bool #

Ord Word 
Instance details

Defined in GHC.Classes

Methods

compare :: Word -> Word -> Ordering #

(<) :: Word -> Word -> Bool #

(<=) :: Word -> Word -> Bool #

(>) :: Word -> Word -> Bool #

(>=) :: Word -> Word -> Bool #

max :: Word -> Word -> Word #

min :: Word -> Word -> Word #

Hashable Word 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word -> Int #

hash :: Word -> Int #

Prim Word 
Instance details

Defined in Data.Primitive.Types

Uniform Word 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word #

UniformRange Word 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word, Word) -> g -> m Word #

Unbox Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Word -> Code m Word #

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) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Word) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Word a -> Rep1 (URec Word) a #

to1 :: forall (a :: k0). Rep1 (URec Word) a -> URec Word a #

Foldable (UWord :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UWord m -> m #

foldMap :: Monoid m => (a -> m) -> UWord a -> m #

foldMap' :: Monoid m => (a -> m) -> UWord a -> m #

foldr :: (a -> b -> b) -> b -> UWord a -> b #

foldr' :: (a -> b -> b) -> b -> UWord a -> b #

foldl :: (b -> a -> b) -> b -> UWord a -> b #

foldl' :: (b -> a -> b) -> b -> UWord a -> b #

foldr1 :: (a -> a -> a) -> UWord a -> a #

foldl1 :: (a -> a -> a) -> UWord a -> a #

toList :: UWord a -> [a] #

null :: UWord a -> Bool #

length :: UWord a -> Int #

elem :: Eq a => a -> UWord a -> Bool #

maximum :: Ord a => UWord a -> a #

minimum :: Ord a => UWord a -> a #

sum :: Num a => UWord a -> a #

product :: Num a => UWord a -> a #

Traversable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) #

sequenceA :: Applicative f => UWord (f a) -> f (UWord a) #

mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) #

sequence :: Monad m => UWord (m a) -> m (UWord a) #

Invariant (UWord :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UWord a -> UWord b #

Functor (URec Word :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Word a -> URec Word b #

(<$) :: a -> URec Word b -> URec Word a #

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type #

Methods

from :: URec Word p -> Rep (URec Word p) x #

to :: Rep (URec Word p) x -> URec Word p #

Show (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Word p -> ShowS #

show :: URec Word p -> String #

showList :: [URec Word p] -> ShowS #

Eq (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Word p -> URec Word p -> Bool #

(/=) :: URec Word p -> URec Word p -> Bool #

Ord (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Word p -> URec Word p -> Ordering #

(<) :: URec Word p -> URec Word p -> Bool #

(<=) :: URec Word p -> URec Word p -> Bool #

(>) :: URec Word p -> URec Word p -> Bool #

(>=) :: URec Word p -> URec Word p -> Bool #

max :: URec Word p -> URec Word p -> URec Word p #

min :: URec Word p -> URec Word p -> URec Word p #

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

data URec Word (p :: k) = UWord {}
newtype MVector s Word 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word = MV_Word (MVector s Word)
type Rep1 (URec Word :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Word :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: k -> Type)))
type Rep (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Word p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: Type -> Type)))

data Word8 #

8-bit unsigned integer type

Instances

Instances details
Data Word8

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word8 -> c Word8 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word8 #

toConstr :: Word8 -> Constr #

dataTypeOf :: Word8 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word8) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word8) #

gmapT :: (forall b. Data b => b -> b) -> Word8 -> Word8 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word8 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word8 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #

Storable Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word8 -> Int #

alignment :: Word8 -> Int #

peekElemOff :: Ptr Word8 -> Int -> IO Word8 #

pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word8 #

pokeByteOff :: Ptr b -> Int -> Word8 -> IO () #

peek :: Ptr Word8 -> IO Word8 #

poke :: Ptr Word8 -> Word8 -> IO () #

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

Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

toRational :: Word8 -> Rational #

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

PrintfArg Word8

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Word8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word8 -> () #

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word8 -> Word8 -> Bool #

(/=) :: Word8 -> Word8 -> Bool #

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

compare :: Word8 -> Word8 -> Ordering #

(<) :: Word8 -> Word8 -> Bool #

(<=) :: Word8 -> Word8 -> Bool #

(>) :: Word8 -> Word8 -> Bool #

(>=) :: Word8 -> Word8 -> Bool #

max :: Word8 -> Word8 -> Word8 #

min :: Word8 -> Word8 -> Word8 #

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int #

hash :: Word8 -> Int #

Prim Word8 
Instance details

Defined in Data.Primitive.Types

Uniform Word8 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word8 #

UniformRange Word8 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word8, Word8) -> g -> m Word8 #

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

Lift Word8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word8 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Word8 -> Code m Word8 #

Vector Vector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word8 
Instance details

Defined in Data.Vector.Unboxed.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 #

16-bit unsigned integer type

Instances

Instances details
Data Word16

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word16 -> c Word16 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word16 #

toConstr :: Word16 -> Constr #

dataTypeOf :: Word16 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word16) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word16) #

gmapT :: (forall b. Data b => b -> b) -> Word16 -> Word16 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word16 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word16 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word16 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word16 -> m Word16 #

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

Bounded Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word16

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word16

Since: base-2.1

Instance details

Defined in GHC.Word

PrintfArg Word16

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Word16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word16 -> () #

Eq Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word16 -> Word16 -> Bool #

(/=) :: Word16 -> Word16 -> Bool #

Ord Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word16 -> Int #

hash :: Word16 -> Int #

Prim Word16 
Instance details

Defined in Data.Primitive.Types

Uniform Word16 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word16 #

UniformRange Word16 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word16, Word16) -> g -> m Word16 #

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

Methods

lift :: Quote m => Word16 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Word16 -> Code m Word16 #

Vector Vector Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word16 
Instance details

Defined in Data.Vector.Unboxed.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 #

32-bit unsigned integer type

Instances

Instances details
Data Word32

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word32 -> c Word32 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word32 #

toConstr :: Word32 -> Constr #

dataTypeOf :: Word32 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word32) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word32) #

gmapT :: (forall b. Data b => b -> b) -> Word32 -> Word32 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word32 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word32 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #

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

Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

PrintfArg Word32

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Word32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word32 -> () #

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word32 -> Word32 -> Bool #

(/=) :: Word32 -> Word32 -> Bool #

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int #

hash :: Word32 -> Int #

Prim Word32 
Instance details

Defined in Data.Primitive.Types

Uniform Word32 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word32 #

UniformRange Word32 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word32, Word32) -> g -> m Word32 #

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

Lift Word32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word32 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Word32 -> Code m Word32 #

Vector Vector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word32 
Instance details

Defined in Data.Vector.Unboxed.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 #

64-bit unsigned integer type

Instances

Instances details
Data Word64

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word64 -> c Word64 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word64 #

toConstr :: Word64 -> Constr #

dataTypeOf :: Word64 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word64) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word64) #

gmapT :: (forall b. Data b => b -> b) -> Word64 -> Word64 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word64 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word64 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #

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

Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

PrintfArg Word64

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Word64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word64 -> () #

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word64 -> Word64 -> Bool #

(/=) :: Word64 -> Word64 -> Bool #

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int #

hash :: Word64 -> Int #

Prim Word64 
Instance details

Defined in Data.Primitive.Types

Uniform Word64 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word64 #

UniformRange Word64 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word64, Word64) -> g -> m Word64 #

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

Lift Word64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word64 -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Word64 -> Code m Word64 #

Vector Vector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word64 
Instance details

Defined in Data.Vector.Unboxed.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 #

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 -> () #

Generic1 (URec (Ptr ()) :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec (Ptr ())) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec (Ptr ()) a -> Rep1 (URec (Ptr ())) a #

to1 :: forall (a :: k0). Rep1 (URec (Ptr ())) a -> URec (Ptr ()) a #

Data a => Data (Ptr a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ptr a -> c (Ptr a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ptr a) #

toConstr :: Ptr a -> Constr #

dataTypeOf :: Ptr a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ptr a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ptr a)) #

gmapT :: (forall b. Data b => b -> b) -> Ptr a -> Ptr a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ptr a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ptr a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ptr a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ptr a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ptr a -> m (Ptr a) #

Foldable (UAddr :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UAddr m -> m #

foldMap :: Monoid m => (a -> m) -> UAddr a -> m #

foldMap' :: Monoid m => (a -> m) -> UAddr a -> m #

foldr :: (a -> b -> b) -> b -> UAddr a -> b #

foldr' :: (a -> b -> b) -> b -> UAddr a -> b #

foldl :: (b -> a -> b) -> b -> UAddr a -> b #

foldl' :: (b -> a -> b) -> b -> UAddr a -> b #

foldr1 :: (a -> a -> a) -> UAddr a -> a #

foldl1 :: (a -> a -> a) -> UAddr a -> a #

toList :: UAddr a -> [a] #

null :: UAddr a -> Bool #

length :: UAddr a -> Int #

elem :: Eq a => a -> UAddr a -> Bool #

maximum :: Ord a => UAddr a -> a #

minimum :: Ord a => UAddr a -> a #

sum :: Num a => UAddr a -> a #

product :: Num a => UAddr a -> a #

Traversable (UAddr :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UAddr a -> f (UAddr b) #

sequenceA :: Applicative f => UAddr (f a) -> f (UAddr a) #

mapM :: Monad m => (a -> m b) -> UAddr a -> m (UAddr b) #

sequence :: Monad m => UAddr (m a) -> m (UAddr a) #

Storable (Ptr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ptr a -> Int #

alignment :: Ptr a -> Int #

peekElemOff :: Ptr (Ptr a) -> Int -> IO (Ptr a) #

pokeElemOff :: Ptr (Ptr a) -> Int -> Ptr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ptr a) #

pokeByteOff :: Ptr b -> Int -> Ptr a -> IO () #

peek :: Ptr (Ptr a) -> IO (Ptr a) #

poke :: Ptr (Ptr a) -> Ptr a -> IO () #

Show (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

showsPrec :: Int -> Ptr a -> ShowS #

show :: Ptr a -> String #

showList :: [Ptr a] -> ShowS #

NFData (Ptr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ptr a -> () #

Eq (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

(==) :: Ptr a -> Ptr a -> Bool #

(/=) :: Ptr a -> Ptr a -> Bool #

Ord (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

compare :: Ptr a -> Ptr a -> Ordering #

(<) :: Ptr a -> Ptr a -> Bool #

(<=) :: Ptr a -> Ptr a -> Bool #

(>) :: Ptr a -> Ptr a -> Bool #

(>=) :: Ptr a -> Ptr a -> Bool #

max :: Ptr a -> Ptr a -> Ptr a #

min :: Ptr a -> Ptr a -> Ptr a #

Hashable (Ptr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ptr a -> Int #

hash :: Ptr a -> Int #

Invariant (UAddr :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UAddr a -> UAddr b #

Prim (Ptr a) 
Instance details

Defined in Data.Primitive.Types

Functor (URec (Ptr ()) :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec (Ptr ()) a -> URec (Ptr ()) b #

(<$) :: a -> URec (Ptr ()) b -> URec (Ptr ()) a #

Generic (URec (Ptr ()) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec (Ptr ()) p) :: Type -> Type #

Methods

from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x #

to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p #

Eq (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(/=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

Ord (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering #

(<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #

min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #

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)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec (Ptr ()) :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UAddr" 'PrefixI 'True) (S1 ('MetaSel ('Just "uAddr#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UAddr :: k -> Type)))
type Rep (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec (Ptr ()) p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UAddr" 'PrefixI 'True) (S1 ('MetaSel ('Just "uAddr#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UAddr :: Type -> Type)))

data FunPtr a #

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 -> () #

Storable (FunPtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: FunPtr a -> Int #

alignment :: FunPtr a -> Int #

peekElemOff :: Ptr (FunPtr a) -> Int -> IO (FunPtr a) #

pokeElemOff :: Ptr (FunPtr a) -> Int -> FunPtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (FunPtr a) #

pokeByteOff :: Ptr b -> Int -> FunPtr a -> IO () #

peek :: Ptr (FunPtr a) -> IO (FunPtr a) #

poke :: Ptr (FunPtr a) -> FunPtr a -> IO () #

Show (FunPtr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

showsPrec :: Int -> FunPtr a -> ShowS #

show :: FunPtr a -> String #

showList :: [FunPtr a] -> ShowS #

NFData (FunPtr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: FunPtr a -> () #

Eq (FunPtr a) 
Instance details

Defined in GHC.Ptr

Methods

(==) :: FunPtr a -> FunPtr a -> Bool #

(/=) :: FunPtr a -> FunPtr a -> Bool #

Ord (FunPtr a) 
Instance details

Defined in GHC.Ptr

Methods

compare :: FunPtr a -> FunPtr a -> Ordering #

(<) :: FunPtr a -> FunPtr a -> Bool #

(<=) :: FunPtr a -> FunPtr a -> Bool #

(>) :: FunPtr a -> FunPtr a -> Bool #

(>=) :: FunPtr a -> FunPtr a -> Bool #

max :: FunPtr a -> FunPtr a -> FunPtr a #

min :: FunPtr a -> FunPtr a -> FunPtr a #

Hashable (FunPtr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> FunPtr a -> Int #

hash :: FunPtr a -> Int #

Prim (FunPtr a) 
Instance details

Defined in Data.Primitive.Types

data Either a b #

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 Strings, and the Right constructor can be used only on Ints:

>>> 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 Ints.

>>> :{
    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
Bifoldable Either

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => Either m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Either a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Either a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Either a b -> c #

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 #

first :: (a -> b) -> Either a c -> Either b c #

second :: (b -> c) -> Either a b -> Either a c #

Bitraversable Either

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) #

Eq2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Either a c -> Either b d -> Bool #

Ord2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Either a c -> Either b d -> Ordering #

Read2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Either a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Either a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Either a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Either a b] #

Show2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Either a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Either a b] -> ShowS #

NFData2 Either

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Either a b -> () #

Bifoldable1 Either 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => Either m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Either a b -> m #

Hashable2 Either 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Either a b -> Int #

Invariant2 Either 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Either a b -> Either c d #

Bitraversable1 Either 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Either a c -> f (Either b d) #

bisequence1 :: Apply f => Either (f a) (f b) -> f (Either a b) #

Generic1 (Either a :: Type -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (Either a) :: k -> Type #

Methods

from1 :: forall (a0 :: k). Either a a0 -> Rep1 (Either a) a0 #

to1 :: forall (a0 :: k). Rep1 (Either a) a0 -> Either a a0 #

MonadError e (Either e) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> Either e a #

catchError :: Either e a -> (e -> Either e a) -> Either e a #

(Lift a, Lift b) => Lift (Either a b :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Either a b -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Either a b -> Code m (Either a b) #

MonadFix (Either e)

Since: base-4.3.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Either e a) -> Either e a #

Foldable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

toList :: Either a a0 -> [a0] #

null :: Either a a0 -> Bool #

length :: Either a a0 -> Int #

elem :: Eq a0 => a0 -> Either a a0 -> Bool #

maximum :: Ord a0 => Either a a0 -> a0 #

minimum :: Ord a0 => Either a a0 -> a0 #

sum :: Num a0 => Either a a0 -> a0 #

product :: Num a0 => Either a a0 -> a0 #

Eq a => Eq1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b -> Bool) -> Either a a0 -> Either a b -> Bool #

Ord a => Ord1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b -> Ordering) -> Either a a0 -> Either a b -> Ordering #

Read a => Read1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Either a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Either a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Either a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Either a a0] #

Show a => Show1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Either a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Either a a0] -> ShowS #

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) #

sequenceA :: Applicative f => Either a (f a0) -> f (Either a a0) #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m (Either a b) #

sequence :: Monad m => Either a (m a0) -> m (Either a a0) #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b #

(<$) :: a0 -> Either a b -> Either a a0 #

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b #

(>>) :: Either e a -> Either e b -> Either e b #

return :: a -> Either e a #

NFData a => NFData1 (Either a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Either a a0 -> () #

Hashable a => Hashable1 (Either a) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Either a a0 -> Int #

Invariant (Either a) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Either a a0 -> Either a b #

Selective (Either e) 
Instance details

Defined in Control.Selective

Methods

select :: Either e (Either a b) -> Either e (a -> b) -> Either e b #

Alt (Either a) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Either a a0 -> Either a a0 -> Either a a0 #

some :: Applicative (Either a) => Either a a0 -> Either a [a0] #

many :: Applicative (Either a) => Either a a0 -> Either a [a0] #

Apply (Either a) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Either a (a0 -> b) -> Either a a0 -> Either a b #

(.>) :: Either a a0 -> Either a b -> Either a b #

(<.) :: Either a a0 -> Either a b -> Either a a0 #

liftF2 :: (a0 -> b -> c) -> Either a a0 -> Either a b -> Either a c #

Bind (Either a) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Either a a0 -> (a0 -> Either a b) -> Either a b #

join :: Either a (Either a a0) -> Either a a0 #

Extend (Either a) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Either a a0 -> Either a (Either a a0) #

extended :: (Either a a0 -> b) -> Either a a0 -> Either a b #

(Data a, Data b) => Data (Either a b)

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Either a b -> c (Either a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Either a b) #

toConstr :: Either a b -> Constr #

dataTypeOf :: Either a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Either a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Either a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Either a b -> Either a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Either a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Either a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #

Semigroup (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b #

sconcat :: NonEmpty (Either a b) -> Either a b #

stimes :: Integral b0 => b0 -> Either a b -> Either a b #

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

(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

Methods

showsPrec :: Int -> Either a b -> ShowS #

show :: Either a b -> String #

showList :: [Either a b] -> ShowS #

(NFData a, NFData b) => NFData (Either a b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Either a b -> () #

(Eq a, Eq b) => Eq (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

(==) :: Either a b -> Either a b -> Bool #

(/=) :: Either a b -> Either a b -> Bool #

(Ord a, Ord b) => Ord (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

compare :: Either a b -> Either a b -> Ordering #

(<) :: Either a b -> Either a b -> Bool #

(<=) :: Either a b -> Either a b -> Bool #

(>) :: Either a b -> Either a b -> Bool #

(>=) :: Either a b -> Either a b -> Bool #

max :: Either a b -> Either a b -> Either a b #

min :: Either a b -> Either a b -> Either a b #

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int #

type Rep1 (Either a :: Type -> Type)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

data NonEmpty a #

Non-empty (and non-strict) list type.

Since: base-4.9.0.0

Constructors

a :| [a] infixr 5 

Instances

Instances details
MonadFix NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> NonEmpty a) -> NonEmpty a #

MonadZip NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: NonEmpty a -> NonEmpty b -> NonEmpty (a, b) #

mzipWith :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

munzip :: NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) #

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => NonEmpty m -> m #

foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m #

foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m #

foldr :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldl :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a #

toList :: NonEmpty a -> [a] #

null :: NonEmpty a -> Bool #

length :: NonEmpty a -> Int #

elem :: Eq a => a -> NonEmpty a -> Bool #

maximum :: Ord a => NonEmpty a -> a #

minimum :: Ord a => NonEmpty a -> a #

sum :: Num a => NonEmpty a -> a #

product :: Num a => NonEmpty a -> a #

Eq1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> NonEmpty a -> NonEmpty b -> Bool #

Ord1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> NonEmpty a -> NonEmpty b -> Ordering #

Read1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (NonEmpty a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [NonEmpty a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (NonEmpty a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [NonEmpty a] #

Show1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> NonEmpty a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [NonEmpty a] -> ShowS #

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) #

sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) #

mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) #

sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) #

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a -> NonEmpty a #

(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> NonEmpty a -> NonEmpty b #

(<$) :: a -> NonEmpty b -> NonEmpty a #

Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b #

(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

return :: a -> NonEmpty a #

Comonad NonEmpty 
Instance details

Defined in Control.Comonad

Methods

extract :: NonEmpty a -> a #

duplicate :: NonEmpty a -> NonEmpty (NonEmpty a) #

extend :: (NonEmpty a -> b) -> NonEmpty a -> NonEmpty b #

ComonadApply NonEmpty 
Instance details

Defined in Control.Comonad

Methods

(<@>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

(@>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<@) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

NFData1 NonEmpty

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> NonEmpty a -> () #

Foldable1 NonEmpty 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => NonEmpty m -> m #

foldMap1 :: Semigroup m => (a -> m) -> NonEmpty a -> m #

foldMap1' :: Semigroup m => (a -> m) -> NonEmpty a -> m #

toNonEmpty :: NonEmpty a -> NonEmpty a #

maximum :: Ord a => NonEmpty a -> a #

minimum :: Ord a => NonEmpty a -> a #

head :: NonEmpty a -> a #

last :: NonEmpty a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> NonEmpty a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> NonEmpty a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> NonEmpty a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> NonEmpty a -> b #

Hashable1 NonEmpty

Since: hashable-1.3.1.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> NonEmpty a -> Int #

Invariant NonEmpty

from Data.List.NonEmpty

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> NonEmpty a -> NonEmpty b #

Adjustable NonEmpty 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key NonEmpty -> NonEmpty a -> NonEmpty a #

replace :: Key NonEmpty -> a -> NonEmpty a -> NonEmpty a #

FoldableWithKey NonEmpty 
Instance details

Defined in Data.Key

Methods

toKeyedList :: NonEmpty a -> [(Key NonEmpty, a)] #

foldMapWithKey :: Monoid m => (Key NonEmpty -> a -> m) -> NonEmpty a -> m #

foldrWithKey :: (Key NonEmpty -> a -> b -> b) -> b -> NonEmpty a -> b #

foldlWithKey :: (b -> Key NonEmpty -> a -> b) -> b -> NonEmpty a -> b #

FoldableWithKey1 NonEmpty 
Instance details

Defined in Data.Key

Methods

foldMapWithKey1 :: Semigroup m => (Key NonEmpty -> a -> m) -> NonEmpty a -> m #

Indexable NonEmpty 
Instance details

Defined in Data.Key

Methods

index :: NonEmpty a -> Key NonEmpty -> a #

Keyed NonEmpty 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key NonEmpty -> a -> b) -> NonEmpty a -> NonEmpty b #

Lookup NonEmpty 
Instance details

Defined in Data.Key

Methods

lookup :: Key NonEmpty -> NonEmpty a -> Maybe a #

TraversableWithKey NonEmpty 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key NonEmpty -> a -> f b) -> NonEmpty a -> f (NonEmpty b) #

mapWithKeyM :: Monad m => (Key NonEmpty -> a -> m b) -> NonEmpty a -> m (NonEmpty b) #

TraversableWithKey1 NonEmpty 
Instance details

Defined in Data.Key

Methods

traverseWithKey1 :: Apply f => (Key NonEmpty -> a -> f b) -> NonEmpty a -> f (NonEmpty b) #

Zip NonEmpty 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

zip :: NonEmpty a -> NonEmpty b -> NonEmpty (a, b) #

zap :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

ZipWithKey NonEmpty 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key NonEmpty -> a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

zapWithKey :: NonEmpty (Key NonEmpty -> a -> b) -> NonEmpty a -> NonEmpty b #

Selective NonEmpty 
Instance details

Defined in Control.Selective

Methods

select :: NonEmpty (Either a b) -> NonEmpty (a -> b) -> NonEmpty b #

Alt NonEmpty 
Instance details

Defined in Data.Functor.Alt

Apply NonEmpty 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

(.>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<.) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

liftF2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

Bind NonEmpty 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b #

join :: NonEmpty (NonEmpty a) -> NonEmpty a #

Extend NonEmpty 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: NonEmpty a -> NonEmpty (NonEmpty a) #

extended :: (NonEmpty a -> b) -> NonEmpty a -> NonEmpty b #

Traversable1 NonEmpty 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) #

sequence1 :: Apply f => NonEmpty (f b) -> f (NonEmpty b) #

Generic1 NonEmpty 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 NonEmpty :: k -> Type #

Methods

from1 :: forall (a :: k). NonEmpty a -> Rep1 NonEmpty a #

to1 :: forall (a :: k). Rep1 NonEmpty a -> NonEmpty a #

Lift a => Lift (NonEmpty a :: Type)

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => NonEmpty a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => NonEmpty a -> Code m (NonEmpty a) #

Data a => Data (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NonEmpty a -> c (NonEmpty a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NonEmpty a) #

toConstr :: NonEmpty a -> Constr #

dataTypeOf :: NonEmpty a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NonEmpty a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NonEmpty a)) #

gmapT :: (forall b. Data b => b -> b) -> NonEmpty a -> NonEmpty a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NonEmpty a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NonEmpty a -> r #

gmapQ :: (forall d. Data d => d -> u) -> NonEmpty a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NonEmpty a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) #

Semigroup (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a #

sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a #

stimes :: Integral b => b -> NonEmpty a -> NonEmpty a #

IsList (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item (NonEmpty a) #

Methods

fromList :: [Item (NonEmpty a)] -> NonEmpty a #

fromListN :: Int -> [Item (NonEmpty a)] -> NonEmpty a #

toList :: NonEmpty a -> [Item (NonEmpty a)] #

Generic (NonEmpty a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a) :: Type -> Type #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x #

to :: Rep (NonEmpty a) x -> NonEmpty a #

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

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

NFData a => NFData (NonEmpty a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: NonEmpty a -> () #

Eq a => Eq (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(==) :: NonEmpty a -> NonEmpty a -> Bool #

(/=) :: NonEmpty a -> NonEmpty a -> Bool #

Ord a => Ord (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

compare :: NonEmpty a -> NonEmpty a -> Ordering #

(<) :: NonEmpty a -> NonEmpty a -> Bool #

(<=) :: NonEmpty a -> NonEmpty a -> Bool #

(>) :: NonEmpty a -> NonEmpty a -> Bool #

(>=) :: NonEmpty a -> NonEmpty a -> Bool #

max :: NonEmpty a -> NonEmpty a -> NonEmpty a #

min :: NonEmpty a -> NonEmpty a -> NonEmpty a #

Hashable a => Hashable (NonEmpty a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> NonEmpty a -> Int #

hash :: NonEmpty a -> Int #

type Key NonEmpty 
Instance details

Defined in Data.Key

type Rep1 NonEmpty

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Item (NonEmpty a) 
Instance details

Defined in GHC.Exts

type Item (NonEmpty a) = a
type Rep (NonEmpty a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

class a ~R# b => Coercible (a :: k) (b :: k) #

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 UnsafeEquality (a :: k) (b :: k) where #

This type is treated magically within GHC. Any pattern match of the form case unsafeEqualityProof of UnsafeRefl -> body gets transformed just into body. This is ill-typed, but the transformation takes place after type-checking is complete. It is used to implement unsafeCoerce. You probably don't want to use UnsafeRefl in an expression, but you might conceivably want to pattern-match on it. Use unsafeEqualityProof to create one of these.

Constructors

UnsafeRefl :: forall {k} (a :: k). UnsafeEquality a a 

data TyCon #

Instances

Instances details
Show TyCon

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> TyCon -> ShowS #

show :: TyCon -> String #

showList :: [TyCon] -> ShowS #

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

Methods

rnf :: TyCon -> () #

Eq TyCon 
Instance details

Defined in GHC.Classes

Methods

(==) :: TyCon -> TyCon -> Bool #

(/=) :: TyCon -> TyCon -> Bool #

Ord TyCon 
Instance details

Defined in GHC.Classes

Methods

compare :: TyCon -> TyCon -> Ordering #

(<) :: TyCon -> TyCon -> Bool #

(<=) :: TyCon -> TyCon -> Bool #

(>) :: TyCon -> TyCon -> Bool #

(>=) :: TyCon -> TyCon -> Bool #

max :: TyCon -> TyCon -> TyCon #

min :: TyCon -> TyCon -> TyCon #

liftM :: Monad m => (a1 -> r) -> m a1 -> m r #

Promote a function to a monad.

newtype Op a b #

Dual function arrows.

Constructors

Op 

Fields

Instances

Instances details
Invariant2 Op

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Op a b -> Op c d #

Category Op 
Instance details

Defined in Data.Functor.Contravariant

Methods

id :: forall (a :: k). Op a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Op b c -> Op a b -> Op a c #

Semigroupoid Op 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Op j k1 -> Op i j -> Op i k1 #

Contravariant (Op a) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a0) -> Op a a0 -> Op a a' #

(>$) :: b -> Op a b -> Op a a0 #

Monoid r => Decidable (Op r) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Op r a #

choose :: (a -> Either b c) -> Op r b -> Op r c -> Op r a #

Monoid r => Divisible (Op r) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Op r b -> Op r c -> Op r a #

conquer :: Op r a #

Invariant (Op a)

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Op a a0 -> Op a b #

Monoid a => Monoid (Op a b)

mempty @(Op a b) without newtypes is mempty @(b->a) = _ -> mempty.

mempty :: Op a b
mempty = Op _ -> mempty
Instance details

Defined in Data.Functor.Contravariant

Methods

mempty :: Op a b #

mappend :: Op a b -> Op a b -> Op a b #

mconcat :: [Op a b] -> Op a b #

Semigroup a => Semigroup (Op a b)

(<>) @(Op a b) without newtypes is (<>) @(b->a) = liftA2 (<>). This lifts the Semigroup operation (<>) over the output of a.

(<>) :: Op a b -> Op a b -> Op a b
Op f <> Op g = Op a -> f a <> g a
Instance details

Defined in Data.Functor.Contravariant

Methods

(<>) :: Op a b -> Op a b -> Op a b #

sconcat :: NonEmpty (Op a b) -> Op a b #

stimes :: Integral b0 => b0 -> Op a b -> Op a b #

Floating a => Floating (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

pi :: Op a b #

exp :: Op a b -> Op a b #

log :: Op a b -> Op a b #

sqrt :: Op a b -> Op a b #

(**) :: Op a b -> Op a b -> Op a b #

logBase :: Op a b -> Op a b -> Op a b #

sin :: Op a b -> Op a b #

cos :: Op a b -> Op a b #

tan :: Op a b -> Op a b #

asin :: Op a b -> Op a b #

acos :: Op a b -> Op a b #

atan :: Op a b -> Op a b #

sinh :: Op a b -> Op a b #

cosh :: Op a b -> Op a b #

tanh :: Op a b -> Op a b #

asinh :: Op a b -> Op a b #

acosh :: Op a b -> Op a b #

atanh :: Op a b -> Op a b #

log1p :: Op a b -> Op a b #

expm1 :: Op a b -> Op a b #

log1pexp :: Op a b -> Op a b #

log1mexp :: Op a b -> Op a b #

Num a => Num (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

(+) :: Op a b -> Op a b -> Op a b #

(-) :: Op a b -> Op a b -> Op a b #

(*) :: Op a b -> Op a b -> Op a b #

negate :: Op a b -> Op a b #

abs :: Op a b -> Op a b #

signum :: Op a b -> Op a b #

fromInteger :: Integer -> Op a b #

Fractional a => Fractional (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

(/) :: Op a b -> Op a b -> Op a b #

recip :: Op a b -> Op a b #

fromRational :: Rational -> Op a b #

Abelian a => Abelian (Op a b) 
Instance details

Defined in Data.Group

Group a => Group (Op a b) 
Instance details

Defined in Data.Group

Methods

invert :: Op a b -> Op a b #

(~~) :: Op a b -> Op a b -> Op a b #

pow :: Integral x => Op a b -> x -> Op a b #

either :: (a -> c) -> (b -> c) -> Either a b -> c #

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

class Contravariant (f :: Type -> Type) where #

The class of contravariant functors.

Whereas in Haskell, one can think of a Functor as containing or producing values, a contravariant functor is a functor that can be thought of as consuming values.

As an example, consider the type of predicate functions a -> Bool. One such predicate might be negative x = x < 0, which classifies integers as to whether they are negative. However, given this predicate, we can re-use it in other situations, providing we have a way to map values to integers. For instance, we can use the negative predicate on a person's bank balance to work out if they are currently overdrawn:

newtype Predicate a = Predicate { getPredicate :: a -> Bool }

instance Contravariant Predicate where
  contramap :: (a' -> a) -> (Predicate a -> Predicate a')
  contramap f (Predicate p) = Predicate (p . f)
                                         |   `- First, map the input...
                                         `----- then apply the predicate.

overdrawn :: Predicate Person
overdrawn = contramap personBankBalance negative

Any instance should be subject to the following laws:

Identity
contramap id = id
Composition
contramap (g . f) = contramap f . contramap g

Note, that the second law follows from the free theorem of the type of contramap and the first law, so you need only check that the former condition holds.

Minimal complete definition

contramap

Methods

contramap :: (a' -> a) -> f a -> f a' #

(>$) :: b -> f b -> f a infixl 4 #

Replace all locations in the output with the same value. The default definition is contramap . const, but this may be overridden with a more efficient version.

Instances

Instances details
Contravariant Comparison

A Comparison is a Contravariant Functor, because contramap can apply its function argument to each input of the comparison function.

Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Comparison a -> Comparison a' #

(>$) :: b -> Comparison b -> Comparison a #

Contravariant Equivalence

Equivalence relations are Contravariant, because you can apply the contramapped function to each input to the equivalence relation.

Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Equivalence a -> Equivalence a' #

(>$) :: b -> Equivalence b -> Equivalence a #

Contravariant Predicate

A Predicate is a Contravariant Functor, because contramap can apply its function argument to the input of the predicate.

Without newtypes contramap f equals precomposing with f (= (. f)).

contramap :: (a' -> a) -> (Predicate a -> Predicate a')
contramap f (Predicate g) = Predicate (g . f)
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Predicate a -> Predicate a' #

(>$) :: b -> Predicate b -> Predicate a #

Contravariant (Op a) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a0) -> Op a a0 -> Op a a' #

(>$) :: b -> Op a b -> Op a a0 #

Contravariant (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Proxy a -> Proxy a' #

(>$) :: b -> Proxy b -> Proxy a #

Contravariant (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> U1 a -> U1 a' #

(>$) :: b -> U1 b -> U1 a #

Contravariant (V1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> V1 a -> V1 a' #

(>$) :: b -> V1 b -> V1 a #

Contravariant m => Contravariant (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

contramap :: (a' -> a) -> MaybeT m a -> MaybeT m a' #

(>$) :: b -> MaybeT m b -> MaybeT m a #

Contravariant (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a0) -> Const a a0 -> Const a a' #

(>$) :: b -> Const a b -> Const a a0 #

Contravariant f => Contravariant (Alt f) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Alt f a -> Alt f a' #

(>$) :: b -> Alt f b -> Alt f a #

Contravariant f => Contravariant (Rec1 f) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Rec1 f a -> Rec1 f a' #

(>$) :: b -> Rec1 f b -> Rec1 f a #

(Contravariant f, Functor g) => Contravariant (ComposeCF f g) 
Instance details

Defined in Data.Functor.Contravariant.Compose

Methods

contramap :: (a' -> a) -> ComposeCF f g a -> ComposeCF f g a' #

(>$) :: b -> ComposeCF f g b -> ComposeCF f g a #

(Functor f, Contravariant g) => Contravariant (ComposeFC f g) 
Instance details

Defined in Data.Functor.Contravariant.Compose

Methods

contramap :: (a' -> a) -> ComposeFC f g a -> ComposeFC f g a' #

(>$) :: b -> ComposeFC f g b -> ComposeFC f g a #

Contravariant f => Contravariant (WrappedContravariant f) 
Instance details

Defined in Data.Functor.Invariant

Contravariant f => Contravariant (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

contramap :: (a' -> a) -> Backwards f a -> Backwards f a' #

(>$) :: b -> Backwards f b -> Backwards f a #

Contravariant m => Contravariant (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

contramap :: (a' -> a) -> ErrorT e m a -> ErrorT e m a' #

(>$) :: b -> ErrorT e m b -> ErrorT e m a #

Contravariant m => Contravariant (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

contramap :: (a' -> a) -> ExceptT e m a -> ExceptT e m a' #

(>$) :: b -> ExceptT e m b -> ExceptT e m a #

Contravariant f => Contravariant (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

contramap :: (a' -> a) -> IdentityT f a -> IdentityT f a' #

(>$) :: b -> IdentityT f b -> IdentityT f a #

Contravariant m => Contravariant (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

contramap :: (a' -> a) -> ReaderT r m a -> ReaderT r m a' #

(>$) :: b -> ReaderT r m b -> ReaderT r m a #

Contravariant m => Contravariant (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

contramap :: (a' -> a) -> StateT s m a -> StateT s m a' #

(>$) :: b -> StateT s m b -> StateT s m a #

Contravariant m => Contravariant (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

contramap :: (a' -> a) -> StateT s m a -> StateT s m a' #

(>$) :: b -> StateT s m b -> StateT s m a #

Contravariant m => Contravariant (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

contramap :: (a' -> a) -> WriterT w m a -> WriterT w m a' #

(>$) :: b -> WriterT w m b -> WriterT w m a #

Contravariant m => Contravariant (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

contramap :: (a' -> a) -> WriterT w m a -> WriterT w m a' #

(>$) :: b -> WriterT w m b -> WriterT w m a #

Contravariant (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

contramap :: (a' -> a0) -> Constant a a0 -> Constant a a' #

(>$) :: b -> Constant a b -> Constant a a0 #

Contravariant f => Contravariant (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

contramap :: (a' -> a) -> Reverse f a -> Reverse f a' #

(>$) :: b -> Reverse f b -> Reverse f a #

(Contravariant f, Contravariant g) => Contravariant (Product f g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Product f g a -> Product f g a' #

(>$) :: b -> Product f g b -> Product f g a #

(Contravariant f, Contravariant g) => Contravariant (Sum f g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Sum f g a -> Sum f g a' #

(>$) :: b -> Sum f g b -> Sum f g a #

(Contravariant f, Contravariant g) => Contravariant (f :*: g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> (f :*: g) a -> (f :*: g) a' #

(>$) :: b -> (f :*: g) b -> (f :*: g) a #

(Contravariant f, Contravariant g) => Contravariant (f :+: g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> (f :+: g) a -> (f :+: g) a' #

(>$) :: b -> (f :+: g) b -> (f :+: g) a #

Contravariant (K1 i c :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> K1 i c a -> K1 i c a' #

(>$) :: b -> K1 i c b -> K1 i c a #

Contravariant (Forget r a :: Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

contramap :: (a' -> a0) -> Forget r a a0 -> Forget r a a' #

(>$) :: b -> Forget r a b -> Forget r a a0 #

Contravariant f => Contravariant (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

contramap :: (a' -> a0) -> Star f a a0 -> Star f a a' #

(>$) :: b -> Star f a b -> Star f a a0 #

(Functor f, Contravariant g) => Contravariant (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Compose f g a -> Compose f g a' #

(>$) :: b -> Compose f g b -> Compose f g a #

(Functor f, Contravariant g) => Contravariant (f :.: g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> (f :.: g) a -> (f :.: g) a' #

(>$) :: b -> (f :.: g) b -> (f :.: g) a #

Contravariant f => Contravariant (M1 i c f) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> M1 i c f a -> M1 i c f a' #

(>$) :: b -> M1 i c f b -> M1 i c f a #

Contravariant m => Contravariant (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

contramap :: (a' -> a) -> RWST r w s m a -> RWST r w s m a' #

(>$) :: b -> RWST r w s m b -> RWST r w s m a #

Contravariant m => Contravariant (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

contramap :: (a' -> a) -> RWST r w s m a -> RWST r w s m a' #

(>$) :: b -> RWST r w s m b -> RWST r w s m a #

class Monad m => MonadReader r (m :: Type -> Type) | m -> r where #

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 #

Retrieves the monad environment.

local #

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 #

Arguments

:: (r -> a)

The selector function to apply to the environment.

-> m a 

Retrieves a function of the current environment.

Instances

Instances details
(Representable f, Rep f ~ a) => MonadReader a (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

ask :: Co f a #

local :: (a -> a) -> Co f a0 -> Co f a0 #

reader :: (a -> a0) -> Co f a0 #

MonadReader e m => MonadReader e (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

ask :: Free m e #

local :: (e -> e) -> Free m a -> Free m a #

reader :: (e -> a) -> Free m a #

MonadReader r m => MonadReader r (ListT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ListT m r #

local :: (r -> r) -> ListT m a -> ListT m a #

reader :: (r -> a) -> ListT m a #

MonadReader r m => MonadReader r (MaybeT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: MaybeT m r #

local :: (r -> r) -> MaybeT m a -> MaybeT m a #

reader :: (r -> a) -> MaybeT m a #

(Functor f, MonadReader r m) => MonadReader r (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

ask :: FreeT f m r #

local :: (r -> r) -> FreeT f m a -> FreeT f m a #

reader :: (r -> a) -> FreeT f m a #

(Error e, MonadReader r m) => MonadReader r (ErrorT e m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ErrorT e m r #

local :: (r -> r) -> ErrorT e m a -> ErrorT e m a #

reader :: (r -> a) -> ErrorT e m a #

MonadReader r m => MonadReader r (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ExceptT e m r #

local :: (r -> r) -> ExceptT e m a -> ExceptT e m a #

reader :: (r -> a) -> ExceptT e m a #

MonadReader r m => MonadReader r (IdentityT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: IdentityT m r #

local :: (r -> r) -> IdentityT m a -> IdentityT m a #

reader :: (r -> a) -> IdentityT m a #

Monad m => MonadReader r (ReaderT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ReaderT r m r #

local :: (r -> r) -> ReaderT r m a -> ReaderT r m a #

reader :: (r -> a) -> ReaderT r m a #

MonadReader r m => MonadReader r (StateT s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: StateT s m r #

local :: (r -> r) -> StateT s m a -> StateT s m a #

reader :: (r -> a) -> StateT s m a #

MonadReader r m => MonadReader r (StateT s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: StateT s m r #

local :: (r -> r) -> StateT s m a -> StateT s m a #

reader :: (r -> a) -> StateT s m a #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: WriterT w m r #

local :: (r -> r) -> WriterT w m a -> WriterT w m a #

reader :: (r -> a) -> WriterT w m a #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: WriterT w m r #

local :: (r -> r) -> WriterT w m a -> WriterT w m a #

reader :: (r -> a) -> WriterT w m a #

MonadReader r ((->) r) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: r -> r #

local :: (r -> r) -> (r -> a) -> r -> a #

reader :: (r -> a) -> r -> a #

MonadReader r' m => MonadReader r' (ContT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ContT r m r' #

local :: (r' -> r') -> ContT r m a -> ContT r m a #

reader :: (r' -> a) -> ContT r m a #

(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 #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a #

reader :: (r -> a) -> RWST r w s m a #

(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 #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a #

reader :: (r -> a) -> RWST r w s m a #

class Monad m => MonadState s (m :: Type -> Type) | m -> s where #

Minimal definition is either both of get and put or just state

Minimal complete definition

state | get, put

Methods

get :: m s #

Return the state from the internals of the monad.

put :: s -> m () #

Replace the state inside the monad.

state :: (s -> (a, s)) -> m a #

Embed a simple state action into the monad.

Instances

Instances details
MonadState s m => MonadState s (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

get :: Free m s #

put :: s -> Free m () #

state :: (s -> (a, s)) -> Free m a #

MonadState s m => MonadState s (ListT m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: ListT m s #

put :: s -> ListT m () #

state :: (s -> (a, s)) -> ListT m a #

MonadState s m => MonadState s (MaybeT m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: MaybeT m s #

put :: s -> MaybeT m () #

state :: (s -> (a, s)) -> MaybeT m a #

(Functor f, MonadState s m) => MonadState s (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

get :: FreeT f m s #

put :: s -> FreeT f m () #

state :: (s -> (a, s)) -> FreeT f m a #

(Error e, MonadState s m) => MonadState s (ErrorT e m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: ErrorT e m s #

put :: s -> ErrorT e m () #

state :: (s -> (a, s)) -> ErrorT e m a #

MonadState s m => MonadState s (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.State.Class

Methods

get :: ExceptT e m s #

put :: s -> ExceptT e m () #

state :: (s -> (a, s)) -> ExceptT e m a #

MonadState s m => MonadState s (IdentityT m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: IdentityT m s #

put :: s -> IdentityT m () #

state :: (s -> (a, s)) -> IdentityT m a #

MonadState s m => MonadState s (ReaderT r m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: ReaderT r m s #

put :: s -> ReaderT r m () #

state :: (s -> (a, s)) -> ReaderT r m a #

Monad m => MonadState s (StateT s m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: StateT s m s #

put :: s -> StateT s m () #

state :: (s -> (a, s)) -> StateT s m a #

Monad m => MonadState s (StateT s m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: StateT s m s #

put :: s -> StateT s m () #

state :: (s -> (a, s)) -> StateT s m a #

(Monoid w, MonadState s m) => MonadState s (WriterT w m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: WriterT w m s #

put :: s -> WriterT w m () #

state :: (s -> (a, s)) -> WriterT w m a #

(Monoid w, MonadState s m) => MonadState s (WriterT w m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: WriterT w m s #

put :: s -> WriterT w m () #

state :: (s -> (a, s)) -> WriterT w m a #

MonadState s m => MonadState s (ContT r m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: ContT r m s #

put :: s -> ContT r m () #

state :: (s -> (a, s)) -> ContT r m a #

(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 #

put :: s -> RWST r w s m () #

state :: (s -> (a, s)) -> RWST r w s m a #

(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 #

put :: s -> RWST r w s m () #

state :: (s -> (a, s)) -> RWST r w s m a #

data ForeignPtr a #

The type ForeignPtr represents references to objects that are maintained in a foreign language, i.e., that are not part of the data structures usually managed by the Haskell storage manager. The essential difference between ForeignPtrs and vanilla memory references of type Ptr a is that the former may be associated with finalizers. A finalizer is a routine that is invoked when the Haskell storage manager detects that - within the Haskell heap and stack - there are no more references left that are pointing to the ForeignPtr. Typically, the finalizer will, then, invoke routines in the foreign language that free the resources bound by the foreign object.

The ForeignPtr is parameterised in the same way as Ptr. The type argument of ForeignPtr should normally be an instance of class Storable.

Instances

Instances details
Data a => Data (ForeignPtr a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignPtr a -> c (ForeignPtr a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignPtr a) #

toConstr :: ForeignPtr a -> Constr #

dataTypeOf :: ForeignPtr a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignPtr a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignPtr a)) #

gmapT :: (forall b. Data b => b -> b) -> ForeignPtr a -> ForeignPtr a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignPtr a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignPtr a -> r #

gmapQ :: (forall d. Data d => d -> u) -> ForeignPtr a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignPtr a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignPtr a -> m (ForeignPtr a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignPtr a -> m (ForeignPtr a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignPtr a -> m (ForeignPtr a) #

Show (ForeignPtr a)

Since: base-2.1

Instance details

Defined in GHC.ForeignPtr

Eq (ForeignPtr a)

Since: base-2.1

Instance details

Defined in GHC.ForeignPtr

Methods

(==) :: ForeignPtr a -> ForeignPtr a -> Bool #

(/=) :: ForeignPtr a -> ForeignPtr a -> Bool #

Ord (ForeignPtr a)

Since: base-2.1

Instance details

Defined in GHC.ForeignPtr

data Handle #

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.

Instances

Instances details
Show Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Methods

(==) :: Handle -> Handle -> Bool #

(/=) :: Handle -> Handle -> Bool #

data ST s a #

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

  • an uninstantiated type variable (inside invocations of runST), or
  • RealWorld (inside invocations of stToIO).

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
MonadFail (ST s)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

fail :: String -> ST s a #

MonadFix (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> ST s a) -> ST s a #

Applicative (ST s)

Since: base-4.4.0.0

Instance details

Defined in GHC.ST

Methods

pure :: a -> ST s a #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c #

(*>) :: ST s a -> ST s b -> ST s b #

(<*) :: ST s a -> ST s b -> ST s a #

Functor (ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

fmap :: (a -> b) -> ST s a -> ST s b #

(<$) :: a -> ST s b -> ST s a #

Monad (ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

(>>=) :: ST s a -> (a -> ST s b) -> ST s b #

(>>) :: ST s a -> ST s b -> ST s b #

return :: a -> ST s a #

Invariant (ST s) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ST s a -> ST s b #

PrimBase (ST s) 
Instance details

Defined in Control.Monad.Primitive

Methods

internal :: ST s a -> State# (PrimState (ST s)) -> (# State# (PrimState (ST s)), a #) #

PrimMonad (ST s) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ST s) #

Methods

primitive :: (State# (PrimState (ST s)) -> (# State# (PrimState (ST s)), a #)) -> ST s a #

Selective (ST s) 
Instance details

Defined in Control.Selective

Methods

select :: ST s (Either a b) -> ST s (a -> b) -> ST s b #

RandomGen g => FrozenGen (STGen g) (ST s) 
Instance details

Defined in System.Random.Stateful

Associated Types

type MutableGen (STGen g) (ST s) = (g :: Type) #

Methods

freezeGen :: MutableGen (STGen g) (ST s) -> ST s (STGen g) #

thawGen :: STGen g -> ST s (MutableGen (STGen g) (ST s)) #

Monoid a => Monoid (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

mempty :: ST s a #

mappend :: ST s a -> ST s a -> ST s a #

mconcat :: [ST s a] -> ST s a #

Semigroup a => Semigroup (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

(<>) :: ST s a -> ST s a -> ST s a #

sconcat :: NonEmpty (ST s a) -> ST s a #

stimes :: Integral b => b -> ST s a -> ST s a #

Show (ST s a)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

showsPrec :: Int -> ST s a -> ShowS #

show :: ST s a -> String #

showList :: [ST s a] -> ShowS #

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 #

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

type MutableGen (STGen g) (ST s) = STGenM g s

class Bifunctor (p :: Type -> Type -> Type) where #

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 #

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 #

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 #

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 #

first :: (a -> b) -> Either a c -> Either b c #

second :: (b -> c) -> Either a b -> Either a c #

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 #

first :: (a -> b) -> Arg a c -> Arg b c #

second :: (b -> c) -> Arg a b -> Arg a c #

Bifunctor Validation 
Instance details

Defined in Data.Either.Validation

Methods

bimap :: (a -> b) -> (c -> d) -> Validation a c -> Validation b d #

first :: (a -> b) -> Validation a c -> Validation b c #

second :: (b -> c) -> Validation a b -> Validation a c #

Bifunctor (,)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) #

first :: (a -> b) -> (a, c) -> (b, c) #

second :: (b -> c) -> (a, b) -> (a, c) #

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 #

first :: (a -> b) -> Const a c -> Const b c #

second :: (b -> c) -> Const a b -> Const a c #

Functor f => Bifunctor (FreeF f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

bimap :: (a -> b) -> (c -> d) -> FreeF f a c -> FreeF f b d #

first :: (a -> b) -> FreeF f a c -> FreeF f b c #

second :: (b -> c) -> FreeF f a b -> FreeF f a c #

Bifunctor (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Tagged

Methods

bimap :: (a -> b) -> (c -> d) -> Tagged a c -> Tagged b d #

first :: (a -> b) -> Tagged a c -> Tagged b c #

second :: (b -> c) -> Tagged a b -> Tagged a c #

Bifunctor (Constant :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

bimap :: (a -> b) -> (c -> d) -> Constant a c -> Constant b d #

first :: (a -> b) -> Constant a c -> Constant b c #

second :: (b -> c) -> Constant a b -> Constant a c #

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) #

first :: (a -> b) -> (x1, a, c) -> (x1, b, c) #

second :: (b -> c) -> (x1, a, b) -> (x1, a, c) #

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 #

first :: (a -> b) -> K1 i a c -> K1 i b c #

second :: (b -> c) -> K1 i a b -> K1 i a c #

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) #

first :: (a -> b) -> (x1, x2, a, c) -> (x1, x2, b, c) #

second :: (b -> c) -> (x1, x2, a, b) -> (x1, x2, a, c) #

Functor f => Bifunctor (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

bimap :: (a -> b) -> (c -> d) -> Clown f a c -> Clown f b d #

first :: (a -> b) -> Clown f a c -> Clown f b c #

second :: (b -> c) -> Clown f a b -> Clown f a c #

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 #

first :: (a -> b) -> Flip p a c -> Flip p b c #

second :: (b -> c) -> Flip p a b -> Flip p a c #

Functor g => Bifunctor (Joker g :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

bimap :: (a -> b) -> (c -> d) -> Joker g a c -> Joker g b d #

first :: (a -> b) -> Joker g a c -> Joker g b c #

second :: (b -> c) -> Joker g a b -> Joker g a c #

Bifunctor p => Bifunctor (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bimap :: (a -> b) -> (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d #

first :: (a -> b) -> WrappedBifunctor p a c -> WrappedBifunctor p b c #

second :: (b -> c) -> WrappedBifunctor p a b -> WrappedBifunctor p a c #

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) #

first :: (a -> b) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, c) #

second :: (b -> c) -> (x1, x2, x3, a, b) -> (x1, x2, x3, a, c) #

(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 #

first :: (a -> b) -> Product f g a c -> Product f g b c #

second :: (b -> c) -> Product f g a b -> Product f g a c #

(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 #

first :: (a -> b) -> Sum p q a c -> Sum p q b c #

second :: (b -> c) -> Sum p q a b -> Sum p q a c #

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) #

first :: (a -> b) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, c) #

second :: (b -> c) -> (x1, x2, x3, x4, a, b) -> (x1, x2, x3, x4, a, c) #

(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 #

first :: (a -> b) -> Tannen f p a c -> Tannen f p b c #

second :: (b -> c) -> Tannen f p a b -> Tannen f p a c #

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) #

first :: (a -> b) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, c) #

second :: (b -> c) -> (x1, x2, x3, x4, x5, a, b) -> (x1, x2, x3, x4, x5, a, c) #

(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 #

first :: (a -> b) -> Biff p f g a c -> Biff p f g b c #

second :: (b -> c) -> Biff p f g a b -> Biff p f g a c #

newtype Predicate a #

Constructors

Predicate 

Fields

Instances

Instances details
Contravariant Predicate

A Predicate is a Contravariant Functor, because contramap can apply its function argument to the input of the predicate.

Without newtypes contramap f equals precomposing with f (= (. f)).

contramap :: (a' -> a) -> (Predicate a -> Predicate a')
contramap f (Predicate g) = Predicate (g . f)
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Predicate a -> Predicate a' #

(>$) :: b -> Predicate b -> Predicate a #

Decidable Predicate 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Predicate a #

choose :: (a -> Either b c) -> Predicate b -> Predicate c -> Predicate a #

Divisible Predicate 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Predicate b -> Predicate c -> Predicate a #

conquer :: Predicate a #

Invariant Predicate

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Predicate a -> Predicate b #

Monoid (Predicate a)

mempty on predicates always returns True. Without newtypes this equals pure True.

mempty :: Predicate a
mempty = _ -> True
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Predicate a)

(<>) on predicates uses logical conjunction (&&) on the results. Without newtypes this equals liftA2 (&&).

(<>) :: Predicate a -> Predicate a -> Predicate a
Predicate pred <> Predicate pred' = Predicate a ->
  pred a && pred' a
Instance details

Defined in Data.Functor.Contravariant

Methods

(<>) :: Predicate a -> Predicate a -> Predicate a #

sconcat :: NonEmpty (Predicate a) -> Predicate a #

stimes :: Integral b => b -> Predicate a -> Predicate a #

newtype Equivalence a #

This data type represents an equivalence relation.

Equivalence relations are expected to satisfy three laws:

Reflexivity
getEquivalence f a a = True
Symmetry
getEquivalence f a b = getEquivalence f b a
Transitivity
If getEquivalence f a b and getEquivalence f b c are both True then so is getEquivalence f a c.

The types alone do not enforce these laws, so you'll have to check them yourself.

Constructors

Equivalence 

Fields

Instances

Instances details
Contravariant Equivalence

Equivalence relations are Contravariant, because you can apply the contramapped function to each input to the equivalence relation.

Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Equivalence a -> Equivalence a' #

(>$) :: b -> Equivalence b -> Equivalence a #

Decidable Equivalence 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Equivalence a #

choose :: (a -> Either b c) -> Equivalence b -> Equivalence c -> Equivalence a #

Divisible Equivalence 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Equivalence b -> Equivalence c -> Equivalence a #

conquer :: Equivalence a #

Invariant Equivalence

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Equivalence a -> Equivalence b #

Monoid (Equivalence a)

mempty on equivalences always returns True. Without newtypes this equals pure (pure True).

mempty :: Equivalence a
mempty = Equivalence _ _ -> True
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Equivalence a)

(<>) on equivalences uses logical conjunction (&&) on the results. Without newtypes this equals liftA2 (liftA2 (&&)).

(<>) :: Equivalence a -> Equivalence a -> Equivalence a
Equivalence equiv <> Equivalence equiv' = Equivalence a b ->
  equiv a b && equiv a b
Instance details

Defined in Data.Functor.Contravariant

newtype Comparison a #

Defines a total ordering on a type as per compare.

This condition is not checked by the types. You must ensure that the supplied values are valid total orderings yourself.

Constructors

Comparison 

Fields

Instances

Instances details
Contravariant Comparison

A Comparison is a Contravariant Functor, because contramap can apply its function argument to each input of the comparison function.

Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Comparison a -> Comparison a' #

(>$) :: b -> Comparison b -> Comparison a #

Decidable Comparison 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Comparison a #

choose :: (a -> Either b c) -> Comparison b -> Comparison c -> Comparison a #

Divisible Comparison 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Comparison b -> Comparison c -> Comparison a #

conquer :: Comparison a #

Invariant Comparison

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Comparison a -> Comparison b #

Monoid (Comparison a)

mempty on comparisons always returns EQ. Without newtypes this equals pure (pure EQ).

mempty :: Comparison a
mempty = Comparison _ _ -> EQ
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Comparison a)

(<>) on comparisons combines results with (<>) @Ordering. Without newtypes this equals liftA2 (liftA2 (<>)).

(<>) :: Comparison a -> Comparison a -> Comparison a
Comparison cmp <> Comparison cmp' = Comparison a a' ->
  cmp a a' <> cmp a a'
Instance details

Defined in Data.Functor.Contravariant

phantom :: (Functor f, Contravariant f) => f a -> f b #

If f is both Functor and Contravariant then by the time you factor in the laws of each of those classes, it can't actually use its argument in any meaningful capacity.

This method is surprisingly useful. Where both instances exist and are lawful we have the following laws:

fmap      f ≡ phantom
contramap f ≡ phantom

defaultEquivalence :: Eq a => Equivalence a #

Check for equivalence with ==.

Note: The instances for Double and Float violate reflexivity for NaN.

defaultComparison :: Ord a => Comparison a #

Compare using compare.

(>$<) :: Contravariant f => (a -> b) -> f b -> f a infixl 4 #

This is an infix alias for contramap.

(>$$<) :: Contravariant f => f b -> (a -> b) -> f a infixl 4 #

This is an infix version of contramap with the arguments flipped.

($<) :: Contravariant f => f b -> b -> f a infixl 4 #

This is >$ with its arguments flipped.

newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) infixr 9 #

Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.

Constructors

Compose infixr 9 

Fields

Instances

Instances details
TestEquality f => TestEquality (Compose f g :: k2 -> Type)

The deduction (via generativity) that if g x :~: g y then x :~: y.

Since: base-4.14.0.0

Instance details

Defined in Data.Functor.Compose

Methods

testEquality :: forall (a :: k) (b :: k). Compose f g a -> Compose f g b -> Maybe (a :~: b) #

Functor f => Generic1 (Compose f g :: k -> Type) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep1 (Compose f g) :: k -> Type #

Methods

from1 :: forall (a :: k0). Compose f g a -> Rep1 (Compose f g) a #

to1 :: forall (a :: k0). Rep1 (Compose f g) a -> Compose f g a #

Unbox (f (g a)) => Vector Vector (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Compose f g a) -> ST s (Vector (Compose f g a)) #

basicUnsafeThaw :: Vector (Compose f g a) -> ST s (Mutable Vector s (Compose f g a)) #

basicLength :: Vector (Compose f g a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Compose f g a) -> Vector (Compose f g a) #

basicUnsafeIndexM :: Vector (Compose f g a) -> Int -> Box (Compose f g a) #

basicUnsafeCopy :: Mutable Vector s (Compose f g a) -> Vector (Compose f g a) -> ST s () #

elemseq :: Vector (Compose f g a) -> Compose f g a -> b -> b #

Unbox (f (g a)) => MVector MVector (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Compose f g a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Compose f g a) -> MVector s (Compose f g a) #

basicOverlaps :: MVector s (Compose f g a) -> MVector s (Compose f g a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Compose f g a)) #

basicInitialize :: MVector s (Compose f g a) -> ST s () #

basicUnsafeReplicate :: Int -> Compose f g a -> ST s (MVector s (Compose f g a)) #

basicUnsafeRead :: MVector s (Compose f g a) -> Int -> ST s (Compose f g a) #

basicUnsafeWrite :: MVector s (Compose f g a) -> Int -> Compose f g a -> ST s () #

basicClear :: MVector s (Compose f g a) -> ST s () #

basicSet :: MVector s (Compose f g a) -> Compose f g a -> ST s () #

basicUnsafeCopy :: MVector s (Compose f g a) -> MVector s (Compose f g a) -> ST s () #

basicUnsafeMove :: MVector s (Compose f g a) -> MVector s (Compose f g a) -> ST s () #

basicUnsafeGrow :: MVector s (Compose f g a) -> Int -> ST s (MVector s (Compose f g a)) #

(Representable f, Representable g) => Representable (Compose f g) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (Compose f g) #

Methods

tabulate :: (Rep (Compose f g) -> a) -> Compose f g a #

index :: Compose f g a -> Rep (Compose f g) -> a #

(Foldable f, Foldable g) => Foldable (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fold :: Monoid m => Compose f g m -> m #

foldMap :: Monoid m => (a -> m) -> Compose f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m #

foldr :: (a -> b -> b) -> b -> Compose f g a -> b #

foldr' :: (a -> b -> b) -> b -> Compose f g a -> b #

foldl :: (b -> a -> b) -> b -> Compose f g a -> b #

foldl' :: (b -> a -> b) -> b -> Compose f g a -> b #

foldr1 :: (a -> a -> a) -> Compose f g a -> a #

foldl1 :: (a -> a -> a) -> Compose f g a -> a #

toList :: Compose f g a -> [a] #

null :: Compose f g a -> Bool #

length :: Compose f g a -> Int #

elem :: Eq a => a -> Compose f g a -> Bool #

maximum :: Ord a => Compose f g a -> a #

minimum :: Ord a => Compose f g a -> a #

sum :: Num a => Compose f g a -> a #

product :: Num a => Compose f g a -> a #

(Eq1 f, Eq1 g) => Eq1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftEq :: (a -> b -> Bool) -> Compose f g a -> Compose f g b -> Bool #

(Ord1 f, Ord1 g) => Ord1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftCompare :: (a -> b -> Ordering) -> Compose f g a -> Compose f g b -> Ordering #

(Read1 f, Read1 g) => Read1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Compose f g a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Compose f g a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Compose f g a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Compose f g a] #

(Show1 f, Show1 g) => Show1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Compose f g a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Compose f g a] -> ShowS #

(Functor f, Contravariant g) => Contravariant (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Compose f g a -> Compose f g a' #

(>$) :: b -> Compose f g b -> Compose f g a #

(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) #

sequenceA :: Applicative f0 => Compose f g (f0 a) -> f0 (Compose f g a) #

mapM :: Monad m => (a -> m b) -> Compose f g a -> m (Compose f g b) #

sequence :: Monad m => Compose f g (m a) -> m (Compose f g a) #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Compose f g a -> Compose f g [a] #

many :: Compose f g a -> Compose f g [a] #

(Applicative f, Applicative g) => Applicative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a #

(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(*>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<*) :: Compose f g a -> Compose f g b -> Compose f g a #

(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 #

(<$) :: a -> Compose f g b -> Compose f g a #

(Applicative f, Decidable g) => Decidable (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Compose f g a #

choose :: (a -> Either b c) -> Compose f g b -> Compose f g c -> Compose f g a #

(Applicative f, Divisible g) => Divisible (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Compose f g b -> Compose f g c -> Compose f g a #

conquer :: Compose f g a #

(NFData1 f, NFData1 g) => NFData1 (Compose f g)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Compose f g a -> () #

(Foldable1 f, Foldable1 g) => Foldable1 (Compose f g) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Compose f g m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Compose f g a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Compose f g a -> m #

toNonEmpty :: Compose f g a -> NonEmpty a #

maximum :: Ord a => Compose f g a -> a #

minimum :: Ord a => Compose f g a -> a #

head :: Compose f g a -> a #

last :: Compose f g a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Compose f g a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Compose f g a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Compose f g a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Compose f g a -> b #

(Hashable1 f, Hashable1 g) => Hashable1 (Compose f g) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Compose f g a -> Int #

(Invariant f, Invariant g) => Invariant (Compose f g)

from Data.Functor.Compose

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Compose f g a -> Compose f g b #

(FoldableWithKey f, FoldableWithKey m) => FoldableWithKey (Compose f m) 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Compose f m a -> [(Key (Compose f m), a)] #

foldMapWithKey :: Monoid m0 => (Key (Compose f m) -> a -> m0) -> Compose f m a -> m0 #

foldrWithKey :: (Key (Compose f m) -> a -> b -> b) -> b -> Compose f m a -> b #

foldlWithKey :: (b -> Key (Compose f m) -> a -> b) -> b -> Compose f m a -> b #

(FoldableWithKey1 f, FoldableWithKey1 m) => FoldableWithKey1 (Compose f m) 
Instance details

Defined in Data.Key

Methods

foldMapWithKey1 :: Semigroup m0 => (Key (Compose f m) -> a -> m0) -> Compose f m a -> m0 #

(Indexable f, Indexable g) => Indexable (Compose f g) 
Instance details

Defined in Data.Key

Methods

index :: Compose f g a -> Key (Compose f g) -> a #

(Keyed f, Keyed g) => Keyed (Compose f g) 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key (Compose f g) -> a -> b) -> Compose f g a -> Compose f g b #

(Lookup f, Lookup g) => Lookup (Compose f g) 
Instance details

Defined in Data.Key

Methods

lookup :: Key (Compose f g) -> Compose f g a -> Maybe a #

(TraversableWithKey f, TraversableWithKey m) => TraversableWithKey (Compose f m) 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f0 => (Key (Compose f m) -> a -> f0 b) -> Compose f m a -> f0 (Compose f m b) #

mapWithKeyM :: Monad m0 => (Key (Compose f m) -> a -> m0 b) -> Compose f m a -> m0 (Compose f m b) #

(TraversableWithKey1 f, TraversableWithKey1 m) => TraversableWithKey1 (Compose f m) 
Instance details

Defined in Data.Key

Methods

traverseWithKey1 :: Apply f0 => (Key (Compose f m) -> a -> f0 b) -> Compose f m a -> f0 (Compose f m b) #

(Zip f, Zip g) => Zip (Compose f g) 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

zip :: Compose f g a -> Compose f g b -> Compose f g (a, b) #

zap :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

(ZipWithKey f, ZipWithKey g) => ZipWithKey (Compose f g) 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key (Compose f g) -> a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

zapWithKey :: Compose f g (Key (Compose f g) -> a -> b) -> Compose f g a -> Compose f g b #

(Applicative f, Selective g) => Selective (Compose f g) 
Instance details

Defined in Control.Selective

Methods

select :: Compose f g (Either a b) -> Compose f g (a -> b) -> Compose f g b #

(Alt f, Functor g) => Alt (Compose f g) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Applicative (Compose f g) => Compose f g a -> Compose f g [a] #

many :: Applicative (Compose f g) => Compose f g a -> Compose f g [a] #

(Apply f, Apply g) => Apply (Compose f g) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

(.>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<.) :: Compose f g a -> Compose f g b -> Compose f g a #

liftF2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(Plus f, Functor g) => Plus (Compose f g) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Compose f g a #

(Traversable1 f, Traversable1 g) => Traversable1 (Compose f g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Compose f g a -> f0 (Compose f g b) #

sequence1 :: Apply f0 => Compose f g (f0 b) -> f0 (Compose f g b) #

(Typeable a, Typeable f, Typeable g, Typeable k1, Typeable k2, Data (f (g a))) => Data (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Compose f g a -> c (Compose f g a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Compose f g a) #

toConstr :: Compose f g a -> Constr #

dataTypeOf :: Compose f g a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Compose f g a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Compose f g a)) #

gmapT :: (forall b. Data b => b -> b) -> Compose f g a -> Compose f g a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Compose f g a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Compose f g a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) #

Monoid (f (g a)) => Monoid (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

mempty :: Compose f g a #

mappend :: Compose f g a -> Compose f g a -> Compose f g a #

mconcat :: [Compose f g a] -> Compose f g a #

Semigroup (f (g a)) => Semigroup (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(<>) :: Compose f g a -> Compose f g a -> Compose f g a #

sconcat :: NonEmpty (Compose f g a) -> Compose f g a #

stimes :: Integral b => b -> Compose f g a -> Compose f g a #

Generic (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type #

Methods

from :: Compose f g a -> Rep (Compose f g a) x #

to :: Rep (Compose f g a) x -> Compose f g a #

(Read1 f, Read1 g, Read a) => Read (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

readsPrec :: Int -> ReadS (Compose f g a) #

readList :: ReadS [Compose f g a] #

readPrec :: ReadPrec (Compose f g a) #

readListPrec :: ReadPrec [Compose f g a] #

(Show1 f, Show1 g, Show a) => Show (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

showsPrec :: Int -> Compose f g a -> ShowS #

show :: Compose f g a -> String #

showList :: [Compose f g a] -> ShowS #

(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 -> () #

(Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(==) :: Compose f g a -> Compose f g a -> Bool #

(/=) :: Compose f g a -> Compose f g a -> Bool #

(Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

compare :: Compose f g a -> Compose f g a -> Ordering #

(<) :: Compose f g a -> Compose f g a -> Bool #

(<=) :: Compose f g a -> Compose f g a -> Bool #

(>) :: Compose f g a -> Compose f g a -> Bool #

(>=) :: Compose f g a -> Compose f g a -> Bool #

max :: Compose f g a -> Compose f g a -> Compose f g a #

min :: Compose f g a -> Compose f g a -> Compose f g a #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a)

In general, hash (Compose x) ≠ hash x. However, hashWithSalt satisfies its variant of this equivalence.

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Compose f g a -> Int #

hash :: Compose f g a -> Int #

Unbox (f (g a)) => Unbox (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Cosieve p f, Cosieve q g) => Cosieve (Procompose p q) (Compose f g) 
Instance details

Defined in Data.Profunctor.Composition

Methods

cosieve :: Procompose p q a b -> Compose f g a -> b #

(Sieve p f, Sieve q g) => Sieve (Procompose p q) (Compose g f) 
Instance details

Defined in Data.Profunctor.Composition

Methods

sieve :: Procompose p q a b -> a -> Compose g f b #

type Rep1 (Compose f g :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

type Rep1 (Compose f g :: k -> Type) = D1 ('MetaData "Compose" "Data.Functor.Compose" "base" 'True) (C1 ('MetaCons "Compose" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCompose") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))
newtype MVector s (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Compose f g a) = MV_Compose (MVector s (f (g a)))
type Rep (Compose f g) 
Instance details

Defined in Data.Functor.Rep

type Rep (Compose f g) = (Rep f, Rep g)
type Key (Compose f g) 
Instance details

Defined in Data.Key

type Key (Compose f g) = (Key f, Key g)
type Rep (Compose f g a)

Since: base-4.9.0.0

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)))))
newtype Vector (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Compose f g a) = V_Compose (Vector (f (g a)))

class Show2 (f :: TYPE LiftedRep -> TYPE LiftedRep -> TYPE LiftedRep) where #

Lifting of the Show class to binary type constructors.

Since: base-4.9.0.0

Minimal complete definition

liftShowsPrec2

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> f a b -> ShowS #

showsPrec function for an application of the type constructor based on showsPrec and showList functions for the argument types.

Since: base-4.9.0.0

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [f a b] -> ShowS #

showList function for an application of the type constructor based on showsPrec and showList functions for the argument types. The default implementation using standard list syntax is correct for most types.

Since: base-4.9.0.0

Instances

Instances details
Show2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Either a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Either a b] -> ShowS #

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 #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Map a b] -> ShowS #

Show2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> HashMap a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [HashMap a b] -> ShowS #

Show2 (,)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> (a, b) -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [(a, b)] -> ShowS #

Show2 (Const :: Type -> TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Const a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Const a b] -> ShowS #

Show1 f => Show2 (FreeF f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> FreeF f a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [FreeF f a b] -> ShowS #

Show2 (Tagged :: TYPE LiftedRep -> Type -> Type) 
Instance details

Defined in Data.Tagged

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Tagged a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Tagged a b] -> ShowS #

Show2 (Constant :: Type -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Constant a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Constant a b] -> ShowS #

Show a => Show2 ((,,) a)
>>> showsPrec2 0 ('x', True, 2 :: Int) ""
"('x',True,2)"

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> (a, a0, b) -> ShowS #

liftShowList2 :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [(a, a0, b)] -> ShowS #

(Show a, Show b) => Show2 ((,,,) a b)
>>> showsPrec2 0 ('x', True, 2 :: Int, 4.5 :: Double) ""
"('x',True,2,4.5)"

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> (Int -> b0 -> ShowS) -> ([b0] -> ShowS) -> Int -> (a, b, a0, b0) -> ShowS #

liftShowList2 :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> (Int -> b0 -> ShowS) -> ([b0] -> ShowS) -> [(a, b, a0, b0)] -> ShowS #

Show1 f => Show2 (Clown f :: TYPE LiftedRep -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Clown f a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Clown f a b] -> ShowS #

Show2 p => Show2 (Flip p) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Flip p a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Flip p a b] -> ShowS #

Show1 g => Show2 (Joker g :: TYPE LiftedRep -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Joker g a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Joker g a b] -> ShowS #

Show2 p => Show2 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> WrappedBifunctor p a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [WrappedBifunctor p a b] -> ShowS #

(Show2 f, Show2 g) => Show2 (Product f g) 
Instance details

Defined in Data.Bifunctor.Product

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Product f g a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Product f g a b] -> ShowS #

(Show2 f, Show2 g) => Show2 (Sum f g) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Sum f g a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Sum f g a b] -> ShowS #

(Show1 f, Show2 p) => Show2 (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Tannen f p a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Tannen f p a b] -> ShowS #

(Show2 p, Show1 f, Show1 g) => Show2 (Biff p f g) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Biff p f g a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Biff p f g a b] -> ShowS #

class Show1 (f :: TYPE LiftedRep -> TYPE LiftedRep) where #

Lifting of the Show class to unary type constructors.

Since: base-4.9.0.0

Minimal complete definition

liftShowsPrec

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> f a -> ShowS #

showsPrec function for an application of the type constructor based on showsPrec and showList functions for the argument type.

Since: base-4.9.0.0

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [f a] -> ShowS #

showList function for an application of the type constructor based on showsPrec and showList functions for the argument type. The default implementation using standard list syntax is correct for most types.

Since: base-4.9.0.0

Instances

Instances details
Show1 Complex
>>> showsPrec1 0 (2 :+ 3) ""
"2 :+ 3"

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Complex a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Complex a] -> ShowS #

Show1 Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Identity a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Identity a] -> ShowS #

Show1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Down a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Down a] -> ShowS #

Show1 SCC

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> SCC a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [SCC a] -> ShowS #

Show1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> IntMap a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [IntMap a] -> ShowS #

Show1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Seq a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Seq a] -> ShowS #

Show1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Set a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Set a] -> ShowS #

Show1 Tree

Since: containers-0.5.9

Instance details

Defined in Data.Tree

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Tree a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Tree a] -> ShowS #

Show1 Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Hashed a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Hashed a] -> ShowS #

Show1 Array

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.Array

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Array a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Array a] -> ShowS #

Show1 SmallArray

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.SmallArray

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> SmallArray a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [SmallArray a] -> ShowS #

Show1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashSet a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashSet a] -> ShowS #

Show1 Vector 
Instance details

Defined in Data.Vector

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Vector a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Vector a] -> ShowS #

Show1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> NonEmpty a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [NonEmpty a] -> ShowS #

Show1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS #

Show1 Solo

Since: base-4.15

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Solo a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Solo a] -> ShowS #

Show1 []

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> [a] -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [[a]] -> ShowS #

Show a => Show1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Either a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Either a a0] -> ShowS #

Show1 (Proxy :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Proxy a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Proxy a] -> ShowS #

Show k => Show1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Map k a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Map k a] -> ShowS #

Show1 f => Show1 (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Cofree f a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Cofree f a] -> ShowS #

Show1 f => Show1 (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Free f a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Free f a] -> ShowS #

Show1 f => Show1 (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Lift f a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Lift f a] -> ShowS #

Show1 m => Show1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> MaybeT m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [MaybeT m a] -> ShowS #

Show k => Show1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashMap k a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashMap k a] -> ShowS #

Show a => Show1 ((,) a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> (a, a0) -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [(a, a0)] -> ShowS #

Show a => Show1 (Const a :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Const a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Const a a0] -> ShowS #

Show2 p => Show1 (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Fix p a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Fix p a] -> ShowS #

Show2 p => Show1 (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Join p a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Join p a] -> ShowS #

(Show1 f, Show a) => Show1 (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> FreeF f a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [FreeF f a a0] -> ShowS #

(Show1 f, Show1 m) => Show1 (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> FreeT f m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [FreeT f m a] -> ShowS #

Show1 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Tagged s a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Tagged s a] -> ShowS #

Show1 f => Show1 (Backwards f) 
Instance details

Defined in Control.Applicative.Backwards

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Backwards f a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Backwards f a] -> ShowS #

(Show e, Show1 m) => Show1 (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> ErrorT e m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [ErrorT e m a] -> ShowS #

(Show e, Show1 m) => Show1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> ExceptT e m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [ExceptT e m a] -> ShowS #

Show1 f => Show1 (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> IdentityT f a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [IdentityT f a] -> ShowS #

(Show w, Show1 m) => Show1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> WriterT w m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [WriterT w m a] -> ShowS #

(Show w, Show1 m) => Show1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> WriterT w m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [WriterT w m a] -> ShowS #

Show a => Show1 (Constant a :: TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Constant a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Constant a a0] -> ShowS #

Show1 f => Show1 (Reverse f) 
Instance details

Defined in Data.Functor.Reverse

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Reverse f a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Reverse f a] -> ShowS #

(Show a, Show b) => Show1 ((,,) a b)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> (a, b, a0) -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [(a, b, a0)] -> ShowS #

(Show1 f, Show1 g) => Show1 (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Product f g a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Product f g a] -> ShowS #

(Show1 f, Show1 g) => Show1 (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Sum f g a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Sum f g a] -> ShowS #

(Show a, Show b, Show c) => Show1 ((,,,) a b c)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> (a, b, c, a0) -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [(a, b, c, a0)] -> ShowS #

(Show1 f, Show1 g) => Show1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Compose f g a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Compose f g a] -> ShowS #

(Show1 f, Show a) => Show1 (Clown f a :: TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Clown f a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Clown f a a0] -> ShowS #

(Show2 p, Show a) => Show1 (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Flip p a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Flip p a a0] -> ShowS #

Show1 g => Show1 (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Joker g a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Joker g a a0] -> ShowS #

(Show2 p, Show a) => Show1 (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> WrappedBifunctor p a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [WrappedBifunctor p a a0] -> ShowS #

(Show2 f, Show2 g, Show a) => Show1 (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Product f g a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Product f g a a0] -> ShowS #

(Show2 f, Show2 g, Show a) => Show1 (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Sum f g a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Sum f g a a0] -> ShowS #

(Show1 f, Show2 p, Show a) => Show1 (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Tannen f p a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Tannen f p a a0] -> ShowS #

(Show2 p, Show1 f, Show1 g, Show a) => Show1 (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Biff p f g a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Biff p f g a a0] -> ShowS #

class Read2 (f :: Type -> Type -> Type) where #

Lifting of the Read class to binary type constructors.

Both liftReadsPrec2 and liftReadPrec2 exist to match the interface provided in the Read type class, but it is recommended to implement Read2 instances using liftReadPrec2 as opposed to liftReadsPrec2, since the former is more efficient than the latter. For example:

instance Read2 T where
  liftReadPrec2     = ...
  liftReadListPrec2 = liftReadListPrec2Default

For more information, refer to the documentation for the Read class.

Since: base-4.9.0.0

Minimal complete definition

liftReadsPrec2 | liftReadPrec2

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (f a b) #

readsPrec function for an application of the type constructor based on readsPrec and readList functions for the argument types.

Since: base-4.9.0.0

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [f a b] #

readList function for an application of the type constructor based on readsPrec and readList functions for the argument types. The default implementation using standard list syntax is correct for most types.

Since: base-4.9.0.0

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (f a b) #

readPrec function for an application of the type constructor based on readPrec and readListPrec functions for the argument types.

Since: base-4.10.0.0

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [f a b] #

readListPrec function for an application of the type constructor based on readPrec and readListPrec functions for the argument types.

The default definition uses liftReadList2. Instances that define liftReadPrec2 should also define liftReadListPrec2 as liftReadListPrec2Default.

Since: base-4.10.0.0

Instances

Instances details
Read2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Either a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Either a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Either a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Either a b] #

Read2 (,)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (a, b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [(a, b)] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (a, b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [(a, b)] #

Read2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const a b] #

Read1 f => Read2 (FreeF f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (FreeF f a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [FreeF f a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (FreeF f a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [FreeF f a b] #

Read2 (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Tagged

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Tagged a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Tagged a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Tagged a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Tagged a b] #

Read2 (Constant :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Constant a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Constant a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Constant a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Constant a b] #

Read a => Read2 ((,,) a)
>>> readPrec_to_S readPrec2 0 "('x', True, 2)" :: [((Char, Bool, Int), String)]
[(('x',True,2),"")]

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a0) -> ReadS [a0] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (a, a0, b) #

liftReadList2 :: (Int -> ReadS a0) -> ReadS [a0] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [(a, a0, b)] #

liftReadPrec2 :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (a, a0, b) #

liftReadListPrec2 :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [(a, a0, b)] #

(Read a, Read b) => Read2 ((,,,) a b)
>>> readPrec_to_S readPrec2 0 "('x', True, 2, 4.5)" :: [((Char, Bool, Int, Double), String)]
[(('x',True,2,4.5),"")]

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a0) -> ReadS [a0] -> (Int -> ReadS b0) -> ReadS [b0] -> Int -> ReadS (a, b, a0, b0) #

liftReadList2 :: (Int -> ReadS a0) -> ReadS [a0] -> (Int -> ReadS b0) -> ReadS [b0] -> ReadS [(a, b, a0, b0)] #

liftReadPrec2 :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec b0 -> ReadPrec [b0] -> ReadPrec (a, b, a0, b0) #

liftReadListPrec2 :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec b0 -> ReadPrec [b0] -> ReadPrec [(a, b, a0, b0)] #

Read1 f => Read2 (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Clown f a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Clown f a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Clown f a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Clown f a b] #

Read2 p => Read2 (Flip p) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Flip p a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Flip p a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Flip p a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Flip p a b] #

Read1 g => Read2 (Joker g :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Joker g a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Joker g a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Joker g a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Joker g a b] #

Read2 p => Read2 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (WrappedBifunctor p a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [WrappedBifunctor p a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (WrappedBifunctor p a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [WrappedBifunctor p a b] #

(Read2 f, Read2 g) => Read2 (Product f g) 
Instance details

Defined in Data.Bifunctor.Product

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Product f g a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Product f g a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Product f g a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Product f g a b] #

(Read2 f, Read2 g) => Read2 (Sum f g) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Sum f g a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Sum f g a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Sum f g a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Sum f g a b] #

(Read1 f, Read2 p) => Read2 (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Tannen f p a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Tannen f p a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Tannen f p a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Tannen f p a b] #

(Read2 p, Read1 f, Read1 g) => Read2 (Biff p f g) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Biff p f g a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Biff p f g a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Biff p f g a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Biff p f g a b] #

class Read1 (f :: Type -> Type) where #

Lifting of the Read class to unary type constructors.

Both liftReadsPrec and liftReadPrec exist to match the interface provided in the Read type class, but it is recommended to implement Read1 instances using liftReadPrec as opposed to liftReadsPrec, since the former is more efficient than the latter. For example:

instance Read1 T where
  liftReadPrec     = ...
  liftReadListPrec = liftReadListPrecDefault

For more information, refer to the documentation for the Read class.

Since: base-4.9.0.0

Minimal complete definition

liftReadsPrec | liftReadPrec

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (f a) #

readsPrec function for an application of the type constructor based on readsPrec and readList functions for the argument type.

Since: base-4.9.0.0

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [f a] #

readList function for an application of the type constructor based on readsPrec and readList functions for the argument type. The default implementation using standard list syntax is correct for most types.

Since: base-4.9.0.0

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (f a) #

readPrec function for an application of the type constructor based on readPrec and readListPrec functions for the argument type.

Since: base-4.10.0.0

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [f a] #

readListPrec function for an application of the type constructor based on readPrec and readListPrec functions for the argument type.

The default definition uses liftReadList. Instances that define liftReadPrec should also define liftReadListPrec as liftReadListPrecDefault.

Since: base-4.10.0.0

Instances

Instances details
Read1 Complex
>>> readPrec_to_S readPrec1 0 "(2 % 3) :+ (3 % 4)" :: [(Complex Rational, String)]
[(2 % 3 :+ 3 % 4,"")]

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Complex a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Complex a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Complex a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Complex a] #

Read1 Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Identity a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Identity a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Identity a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Identity a] #

Read1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Down a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Down a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Down a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Down a] #

Read1 SCC

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (SCC a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [SCC a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (SCC a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [SCC a] #

Read1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (IntMap a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [IntMap a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (IntMap a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [IntMap a] #

Read1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Seq a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Seq a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Seq a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Seq a] #

Read1 Tree

Since: containers-0.5.9

Instance details

Defined in Data.Tree

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Tree a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Tree a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Tree a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Tree a] #

Read1 Array

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.Array

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Array a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Array a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Array a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Array a] #

Read1 SmallArray

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.SmallArray

Read1 Vector 
Instance details

Defined in Data.Vector

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Vector a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Vector a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Vector a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Vector a] #

Read1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (NonEmpty a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [NonEmpty a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (NonEmpty a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [NonEmpty a] #

Read1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Maybe a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Maybe a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Maybe a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Maybe a] #

Read1 Solo

Since: base-4.15

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Solo a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Solo a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Solo a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Solo a] #

Read1 []

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS [a] #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [[a]] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [a] #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [[a]] #

Read a => Read1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Either a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Either a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Either a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Either a a0] #

Read1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Proxy a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Proxy a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Proxy a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Proxy a] #

(Ord k, Read k) => Read1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Map k a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Map k a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Map k a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Map k a] #

Read1 f => Read1 (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Cofree f a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Cofree f a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Cofree f a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Cofree f a] #

Read1 f => Read1 (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Free f a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Free f a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Free f a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Free f a] #

Read1 f => Read1 (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Lift f a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Lift f a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Lift f a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Lift f a] #

Read1 m => Read1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (MaybeT m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [MaybeT m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (MaybeT m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [MaybeT m a] #

(Eq k, Hashable k, Read k) => Read1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (HashMap k a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [HashMap k a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (HashMap k a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [HashMap k a] #

Read a => Read1 ((,) a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (a, a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [(a, a0)] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (a, a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [(a, a0)] #

Read a => Read1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Const a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Const a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Const a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Const a a0] #

Read2 p => Read1 (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Fix p a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Fix p a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Fix p a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Fix p a] #

Read2 p => Read1 (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Join p a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Join p a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Join p a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Join p a] #

(Read1 f, Read a) => Read1 (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (FreeF f a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [FreeF f a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (FreeF f a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [FreeF f a a0] #

(Read1 f, Read1 m) => Read1 (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (FreeT f m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [FreeT f m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (FreeT f m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [FreeT f m a] #

Read1 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Tagged s a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Tagged s a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Tagged s a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Tagged s a] #

Read1 f => Read1 (Backwards f) 
Instance details

Defined in Control.Applicative.Backwards

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Backwards f a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Backwards f a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Backwards f a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Backwards f a] #

(Read e, Read1 m) => Read1 (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (ErrorT e m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [ErrorT e m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (ErrorT e m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [ErrorT e m a] #

(Read e, Read1 m) => Read1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (ExceptT e m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [ExceptT e m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (ExceptT e m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [ExceptT e m a] #

Read1 f => Read1 (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (IdentityT f a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [IdentityT f a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (IdentityT f a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [IdentityT f a] #

(Read w, Read1 m) => Read1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (WriterT w m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [WriterT w m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (WriterT w m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [WriterT w m a] #

(Read w, Read1 m) => Read1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (WriterT w m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [WriterT w m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (WriterT w m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [WriterT w m a] #

Read a => Read1 (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Constant a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Constant a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Constant a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Constant a a0] #

Read1 f => Read1 (Reverse f) 
Instance details

Defined in Data.Functor.Reverse

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Reverse f a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Reverse f a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Reverse f a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Reverse f a] #

(Read a, Read b) => Read1 ((,,) a b)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (a, b, a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [(a, b, a0)] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (a, b, a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [(a, b, a0)] #

(Read1 f, Read1 g) => Read1 (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Product f g a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Product f g a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Product f g a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Product f g a] #

(Read1 f, Read1 g) => Read1 (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Sum f g a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Sum f g a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Sum f g a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Sum f g a] #

(Read a, Read b, Read c) => Read1 ((,,,) a b c)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (a, b, c, a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [(a, b, c, a0)] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (a, b, c, a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [(a, b, c, a0)] #

(Read1 f, Read1 g) => Read1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Compose f g a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Compose f g a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Compose f g a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Compose f g a] #

(Read1 f, Read a) => Read1 (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Clown f a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Clown f a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Clown f a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Clown f a a0] #

(Read2 p, Read a) => Read1 (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Flip p a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Flip p a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Flip p a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Flip p a a0] #

Read1 g => Read1 (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Joker g a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Joker g a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Joker g a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Joker g a a0] #

(Read2 p, Read a) => Read1 (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (WrappedBifunctor p a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [WrappedBifunctor p a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (WrappedBifunctor p a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [WrappedBifunctor p a a0] #

(Read2 f, Read2 g, Read a) => Read1 (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Product f g a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Product f g a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Product f g a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Product f g a a0] #

(Read2 f, Read2 g, Read a) => Read1 (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Sum f g a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Sum f g a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Sum f g a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Sum f g a a0] #

(Read1 f, Read2 p, Read a) => Read1 (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Tannen f p a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Tannen f p a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Tannen f p a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Tannen f p a a0] #

(Read2 p, Read1 f, Read1 g, Read a) => Read1 (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Biff p f g a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Biff p f g a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Biff p f g a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Biff p f g a a0] #

class Eq2 f => Ord2 (f :: Type -> Type -> Type) where #

Lifting of the Ord class to binary type constructors.

Since: base-4.9.0.0

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> f a c -> f b d -> Ordering #

Lift compare functions through the type constructor.

The function will usually be applied to comparison functions, but the more general type ensures that the implementation uses them to compare elements of the first container with elements of the second.

Since: base-4.9.0.0

Instances

Instances details
Ord2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Either a c -> Either b d -> Ordering #

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 #

Ord2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> HashMap a c -> HashMap b d -> Ordering #

Ord2 (,)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> (a, c) -> (b, d) -> Ordering #

Ord2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Const a c -> Const b d -> Ordering #

Ord1 f => Ord2 (FreeF f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> FreeF f a c -> FreeF f b d -> Ordering #

Ord2 (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Tagged

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Tagged a c -> Tagged b d -> Ordering #

Ord2 (Constant :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Constant a c -> Constant b d -> Ordering #

Ord a => Ord2 ((,,) a)
>>> compare2 ('x', True, "aaa") ('x', True, "zzz")
LT

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a0 -> b -> Ordering) -> (c -> d -> Ordering) -> (a, a0, c) -> (a, b, d) -> Ordering #

(Ord a, Ord b) => Ord2 ((,,,) a b)
>>> compare2 ('x', True, "str", 2) ('x', True, "str", 3 :: Int)
LT

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a0 -> b0 -> Ordering) -> (c -> d -> Ordering) -> (a, b, a0, c) -> (a, b, b0, d) -> Ordering #

Ord1 f => Ord2 (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Clown f a c -> Clown f b d -> Ordering #

Ord2 p => Ord2 (Flip p) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Flip p a c -> Flip p b d -> Ordering #

Ord1 g => Ord2 (Joker g :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Joker g a c -> Joker g b d -> Ordering #

Ord2 p => Ord2 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> WrappedBifunctor p a c -> WrappedBifunctor p b d -> Ordering #

(Ord2 f, Ord2 g) => Ord2 (Product f g) 
Instance details

Defined in Data.Bifunctor.Product

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Product f g a c -> Product f g b d -> Ordering #

(Ord2 f, Ord2 g) => Ord2 (Sum f g) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Sum f g a c -> Sum f g b d -> Ordering #

(Ord1 f, Ord2 p) => Ord2 (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Tannen f p a c -> Tannen f p b d -> Ordering #

(Ord2 p, Ord1 f, Ord1 g) => Ord2 (Biff p f g) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Biff p f g a c -> Biff p f g b d -> Ordering #

class Eq1 f => Ord1 (f :: Type -> Type) where #

Lifting of the Ord class to unary type constructors.

Since: base-4.9.0.0

Methods

liftCompare :: (a -> b -> Ordering) -> f a -> f b -> Ordering #

Lift a compare function through the type constructor.

The function will usually be applied to a comparison function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.

Since: base-4.9.0.0

Instances

Instances details
Ord1 Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Identity a -> Identity b -> Ordering #

Ord1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Down a -> Down b -> Ordering #

Ord1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> IntMap a -> IntMap b -> Ordering #

Ord1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Seq a -> Seq b -> Ordering #

Ord1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Set a -> Set b -> Ordering #

Ord1 Tree

Since: containers-0.5.9

Instance details

Defined in Data.Tree

Methods

liftCompare :: (a -> b -> Ordering) -> Tree a -> Tree b -> Ordering #

Ord1 Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

liftCompare :: (a -> b -> Ordering) -> Hashed a -> Hashed b -> Ordering #

Ord1 Array

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.Array

Methods

liftCompare :: (a -> b -> Ordering) -> Array a -> Array b -> Ordering #

Ord1 SmallArray

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.SmallArray

Methods

liftCompare :: (a -> b -> Ordering) -> SmallArray a -> SmallArray b -> Ordering #

Ord1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashSet a -> HashSet b -> Ordering #

Ord1 Vector 
Instance details

Defined in Data.Vector

Methods

liftCompare :: (a -> b -> Ordering) -> Vector a -> Vector b -> Ordering #

Ord1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> NonEmpty a -> NonEmpty b -> Ordering #

Ord1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering #

Ord1 Solo

Since: base-4.15

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Solo a -> Solo b -> Ordering #

Ord1 []

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> [a] -> [b] -> Ordering #

Ord a => Ord1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b -> Ordering) -> Either a a0 -> Either a b -> Ordering #

Ord1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Proxy a -> Proxy b -> Ordering #

Ord k => Ord1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Map k a -> Map k b -> Ordering #

Ord1 f => Ord1 (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

liftCompare :: (a -> b -> Ordering) -> Cofree f a -> Cofree f b -> Ordering #

Ord1 f => Ord1 (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

liftCompare :: (a -> b -> Ordering) -> Free f a -> Free f b -> Ordering #

Ord1 f => Ord1 (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

liftCompare :: (a -> b -> Ordering) -> Lift f a -> Lift f b -> Ordering #

Ord1 m => Ord1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftCompare :: (a -> b -> Ordering) -> MaybeT m a -> MaybeT m b -> Ordering #

Ord k => Ord1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashMap k a -> HashMap k b -> Ordering #

Ord a => Ord1 ((,) a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b -> Ordering) -> (a, a0) -> (a, b) -> Ordering #

Ord a => Ord1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b -> Ordering) -> Const a a0 -> Const a b -> Ordering #

Ord2 p => Ord1 (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

liftCompare :: (a -> b -> Ordering) -> Fix p a -> Fix p b -> Ordering #

Ord2 p => Ord1 (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

liftCompare :: (a -> b -> Ordering) -> Join p a -> Join p b -> Ordering #

(Ord1 f, Ord a) => Ord1 (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftCompare :: (a0 -> b -> Ordering) -> FreeF f a a0 -> FreeF f a b -> Ordering #

(Ord1 f, Ord1 m) => Ord1 (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftCompare :: (a -> b -> Ordering) -> FreeT f m a -> FreeT f m b -> Ordering #

Ord1 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

liftCompare :: (a -> b -> Ordering) -> Tagged s a -> Tagged s b -> Ordering #

Ord1 f => Ord1 (Backwards f) 
Instance details

Defined in Control.Applicative.Backwards

Methods

liftCompare :: (a -> b -> Ordering) -> Backwards f a -> Backwards f b -> Ordering #

(Ord e, Ord1 m) => Ord1 (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftCompare :: (a -> b -> Ordering) -> ErrorT e m a -> ErrorT e m b -> Ordering #

(Ord e, Ord1 m) => Ord1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftCompare :: (a -> b -> Ordering) -> ExceptT e m a -> ExceptT e m b -> Ordering #

Ord1 f => Ord1 (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftCompare :: (a -> b -> Ordering) -> IdentityT f a -> IdentityT f b -> Ordering #

(Ord w, Ord1 m) => Ord1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftCompare :: (a -> b -> Ordering) -> WriterT w m a -> WriterT w m b -> Ordering #

(Ord w, Ord1 m) => Ord1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftCompare :: (a -> b -> Ordering) -> WriterT w m a -> WriterT w m b -> Ordering #

Ord a => Ord1 (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

liftCompare :: (a0 -> b -> Ordering) -> Constant a a0 -> Constant a b -> Ordering #

Ord1 f => Ord1 (Reverse f) 
Instance details

Defined in Data.Functor.Reverse

Methods

liftCompare :: (a -> b -> Ordering) -> Reverse f a -> Reverse f b -> Ordering #

(Ord a, Ord b) => Ord1 ((,,) a b)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b0 -> Ordering) -> (a, b, a0) -> (a, b, b0) -> Ordering #

(Ord1 f, Ord1 g) => Ord1 (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

liftCompare :: (a -> b -> Ordering) -> Product f g a -> Product f g b -> Ordering #

(Ord1 f, Ord1 g) => Ord1 (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

liftCompare :: (a -> b -> Ordering) -> Sum f g a -> Sum f g b -> Ordering #

(Ord a, Ord b, Ord c) => Ord1 ((,,,) a b c)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b0 -> Ordering) -> (a, b, c, a0) -> (a, b, c, b0) -> Ordering #

(Ord1 f, Ord1 g) => Ord1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftCompare :: (a -> b -> Ordering) -> Compose f g a -> Compose f g b -> Ordering #

(Ord1 f, Ord a) => Ord1 (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftCompare :: (a0 -> b -> Ordering) -> Clown f a a0 -> Clown f a b -> Ordering #

(Ord2 p, Ord a) => Ord1 (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftCompare :: (a0 -> b -> Ordering) -> Flip p a a0 -> Flip p a b -> Ordering #

Ord1 g => Ord1 (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

liftCompare :: (a0 -> b -> Ordering) -> Joker g a a0 -> Joker g a b -> Ordering #

(Ord2 p, Ord a) => Ord1 (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftCompare :: (a0 -> b -> Ordering) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b -> Ordering #

(Ord2 f, Ord2 g, Ord a) => Ord1 (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

liftCompare :: (a0 -> b -> Ordering) -> Product f g a a0 -> Product f g a b -> Ordering #

(Ord2 f, Ord2 g, Ord a) => Ord1 (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftCompare :: (a0 -> b -> Ordering) -> Sum f g a a0 -> Sum f g a b -> Ordering #

(Ord1 f, Ord2 p, Ord a) => Ord1 (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

liftCompare :: (a0 -> b -> Ordering) -> Tannen f p a a0 -> Tannen f p a b -> Ordering #

(Ord2 p, Ord1 f, Ord1 g, Ord a) => Ord1 (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

liftCompare :: (a0 -> b -> Ordering) -> Biff p f g a a0 -> Biff p f g a b -> Ordering #

class Eq2 (f :: Type -> Type -> Type) where #

Lifting of the Eq class to binary type constructors.

Since: base-4.9.0.0

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> f a c -> f b d -> Bool #

Lift equality tests through the type constructor.

The function will usually be applied to equality functions, but the more general type ensures that the implementation uses them to compare elements of the first container with elements of the second.

Since: base-4.9.0.0

Instances

Instances details
Eq2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Either a c -> Either b d -> Bool #

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 #

Eq2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> HashMap a c -> HashMap b d -> Bool #

Eq2 (,)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> (a, c) -> (b, d) -> Bool #

Eq2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Const a c -> Const b d -> Bool #

Eq1 f => Eq2 (FreeF f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> FreeF f a c -> FreeF f b d -> Bool #

Eq2 (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Tagged

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Tagged a c -> Tagged b d -> Bool #

Eq2 (Constant :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Constant a c -> Constant b d -> Bool #

Eq a => Eq2 ((,,) a)
>>> eq2 ('x', True, "str") ('x', True, "str")
True

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a0 -> b -> Bool) -> (c -> d -> Bool) -> (a, a0, c) -> (a, b, d) -> Bool #

(Eq a, Eq b) => Eq2 ((,,,) a b)
>>> eq2 ('x', True, "str", 2) ('x', True, "str", 2 :: Int)
True

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a0 -> b0 -> Bool) -> (c -> d -> Bool) -> (a, b, a0, c) -> (a, b, b0, d) -> Bool #

Eq1 f => Eq2 (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Clown f a c -> Clown f b d -> Bool #

Eq2 p => Eq2 (Flip p) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Flip p a c -> Flip p b d -> Bool #

Eq1 g => Eq2 (Joker g :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Joker g a c -> Joker g b d -> Bool #

Eq2 p => Eq2 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> WrappedBifunctor p a c -> WrappedBifunctor p b d -> Bool #

(Eq2 f, Eq2 g) => Eq2 (Product f g) 
Instance details

Defined in Data.Bifunctor.Product

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Product f g a c -> Product f g b d -> Bool #

(Eq2 f, Eq2 g) => Eq2 (Sum f g) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Sum f g a c -> Sum f g b d -> Bool #

(Eq1 f, Eq2 p) => Eq2 (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Tannen f p a c -> Tannen f p b d -> Bool #

(Eq2 p, Eq1 f, Eq1 g) => Eq2 (Biff p f g) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Biff p f g a c -> Biff p f g b d -> Bool #

class Eq1 (f :: Type -> Type) where #

Lifting of the Eq class to unary type constructors.

Since: base-4.9.0.0

Methods

liftEq :: (a -> b -> Bool) -> f a -> f b -> Bool #

Lift an equality test through the type constructor.

The function will usually be applied to an equality function, but the more general type ensures that the implementation uses it to compare elements of the first container with elements of the second.

Since: base-4.9.0.0

Instances

Instances details
Eq1 Complex
>>> eq1 (1 :+ 2) (1 :+ 2)
True
>>> eq1 (1 :+ 2) (1 :+ 3)
False

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Complex a -> Complex b -> Bool #

Eq1 Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Identity a -> Identity b -> Bool #

Eq1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Down a -> Down b -> Bool #

Eq1 SCC

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

liftEq :: (a -> b -> Bool) -> SCC a -> SCC b -> Bool #

Eq1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool #

Eq1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftEq :: (a -> b -> Bool) -> Seq a -> Seq b -> Bool #

Eq1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftEq :: (a -> b -> Bool) -> Set a -> Set b -> Bool #

Eq1 Tree

Since: containers-0.5.9

Instance details

Defined in Data.Tree

Methods

liftEq :: (a -> b -> Bool) -> Tree a -> Tree b -> Bool #

Eq1 Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

liftEq :: (a -> b -> Bool) -> Hashed a -> Hashed b -> Bool #

Eq1 Array

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.Array

Methods

liftEq :: (a -> b -> Bool) -> Array a -> Array b -> Bool #

Eq1 SmallArray

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.SmallArray

Methods

liftEq :: (a -> b -> Bool) -> SmallArray a -> SmallArray b -> Bool #

Eq1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashSet a -> HashSet b -> Bool #

Eq1 Vector 
Instance details

Defined in Data.Vector

Methods

liftEq :: (a -> b -> Bool) -> Vector a -> Vector b -> Bool #

Eq1 NonEmpty

Since: base-4.10.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> NonEmpty a -> NonEmpty b -> Bool #

Eq1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool #

Eq1 Solo

Since: base-4.15

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Solo a -> Solo b -> Bool #

Eq1 []

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> [a] -> [b] -> Bool #

Eq a => Eq1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b -> Bool) -> Either a a0 -> Either a b -> Bool #

Eq1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Proxy a -> Proxy b -> Bool #

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 #

Eq1 f => Eq1 (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

liftEq :: (a -> b -> Bool) -> Cofree f a -> Cofree f b -> Bool #

Eq1 f => Eq1 (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

liftEq :: (a -> b -> Bool) -> Free f a -> Free f b -> Bool #

Eq1 f => Eq1 (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

liftEq :: (a -> b -> Bool) -> Lift f a -> Lift f b -> Bool #

Eq1 m => Eq1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftEq :: (a -> b -> Bool) -> MaybeT m a -> MaybeT m b -> Bool #

Eq k => Eq1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashMap k a -> HashMap k b -> Bool #

Eq a => Eq1 ((,) a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b -> Bool) -> (a, a0) -> (a, b) -> Bool #

Eq a => Eq1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b -> Bool) -> Const a a0 -> Const a b -> Bool #

Eq2 p => Eq1 (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

liftEq :: (a -> b -> Bool) -> Fix p a -> Fix p b -> Bool #

Eq2 p => Eq1 (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

liftEq :: (a -> b -> Bool) -> Join p a -> Join p b -> Bool #

(Eq1 f, Eq a) => Eq1 (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftEq :: (a0 -> b -> Bool) -> FreeF f a a0 -> FreeF f a b -> Bool #

(Eq1 f, Eq1 m) => Eq1 (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftEq :: (a -> b -> Bool) -> FreeT f m a -> FreeT f m b -> Bool #

Eq1 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

liftEq :: (a -> b -> Bool) -> Tagged s a -> Tagged s b -> Bool #

Eq1 f => Eq1 (Backwards f) 
Instance details

Defined in Control.Applicative.Backwards

Methods

liftEq :: (a -> b -> Bool) -> Backwards f a -> Backwards f b -> Bool #

(Eq e, Eq1 m) => Eq1 (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftEq :: (a -> b -> Bool) -> ErrorT e m a -> ErrorT e m b -> Bool #

(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 #

Eq1 f => Eq1 (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftEq :: (a -> b -> Bool) -> IdentityT f a -> IdentityT f b -> Bool #

(Eq w, Eq1 m) => Eq1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftEq :: (a -> b -> Bool) -> WriterT w m a -> WriterT w m b -> Bool #

(Eq w, Eq1 m) => Eq1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftEq :: (a -> b -> Bool) -> WriterT w m a -> WriterT w m b -> Bool #

Eq a => Eq1 (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

liftEq :: (a0 -> b -> Bool) -> Constant a a0 -> Constant a b -> Bool #

Eq1 f => Eq1 (Reverse f) 
Instance details

Defined in Data.Functor.Reverse

Methods

liftEq :: (a -> b -> Bool) -> Reverse f a -> Reverse f b -> Bool #

(Eq a, Eq b) => Eq1 ((,,) a b)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b0 -> Bool) -> (a, b, a0) -> (a, b, b0) -> Bool #

(Eq1 f, Eq1 g) => Eq1 (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

liftEq :: (a -> b -> Bool) -> Product f g a -> Product f g b -> Bool #

(Eq1 f, Eq1 g) => Eq1 (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

liftEq :: (a -> b -> Bool) -> Sum f g a -> Sum f g b -> Bool #

(Eq a, Eq b, Eq c) => Eq1 ((,,,) a b c)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b0 -> Bool) -> (a, b, c, a0) -> (a, b, c, b0) -> Bool #

(Eq1 f, Eq1 g) => Eq1 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftEq :: (a -> b -> Bool) -> Compose f g a -> Compose f g b -> Bool #

(Eq1 f, Eq a) => Eq1 (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

liftEq :: (a0 -> b -> Bool) -> Clown f a a0 -> Clown f a b -> Bool #

(Eq2 p, Eq a) => Eq1 (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

liftEq :: (a0 -> b -> Bool) -> Flip p a a0 -> Flip p a b -> Bool #

Eq1 g => Eq1 (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

liftEq :: (a0 -> b -> Bool) -> Joker g a a0 -> Joker g a b -> Bool #

(Eq2 p, Eq a) => Eq1 (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftEq :: (a0 -> b -> Bool) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b -> Bool #

(Eq2 f, Eq2 g, Eq a) => Eq1 (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

liftEq :: (a0 -> b -> Bool) -> Product f g a a0 -> Product f g a b -> Bool #

(Eq2 f, Eq2 g, Eq a) => Eq1 (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

liftEq :: (a0 -> b -> Bool) -> Sum f g a a0 -> Sum f g a b -> Bool #

(Eq1 f, Eq2 p, Eq a) => Eq1 (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

liftEq :: (a0 -> b -> Bool) -> Tannen f p a a0 -> Tannen f p a b -> Bool #

(Eq2 p, Eq1 f, Eq1 g, Eq a) => Eq1 (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

liftEq :: (a0 -> b -> Bool) -> Biff p f g a a0 -> Biff p f g a b -> Bool #

showsUnaryWith :: (Int -> a -> ShowS) -> String -> Int -> a -> ShowS #

showsUnaryWith sp n d x produces the string representation of a unary data constructor with name n and argument x, in precedence context d.

Since: base-4.9.0.0

showsUnary1 :: (Show1 f, Show a) => String -> Int -> f a -> ShowS #

showsUnary1 n d x produces the string representation of a unary data constructor with name n and argument x, in precedence context d.

Since: base-4.9.0.0

showsUnary :: Show a => String -> Int -> a -> ShowS #

showsUnary n d x produces the string representation of a unary data constructor with name n and argument x, in precedence context d.

Since: base-4.9.0.0

showsPrec2 :: (Show2 f, Show a, Show b) => Int -> f a b -> ShowS #

Lift the standard showsPrec function through the type constructor.

Since: base-4.9.0.0

showsPrec1 :: (Show1 f, Show a) => Int -> f a -> ShowS #

Lift the standard showsPrec and showList functions through the type constructor.

Since: base-4.9.0.0

showsBinaryWith :: (Int -> a -> ShowS) -> (Int -> b -> ShowS) -> String -> Int -> a -> b -> ShowS #

showsBinaryWith sp1 sp2 n d x y produces the string representation of a binary data constructor with name n and arguments x and y, in precedence context d.

Since: base-4.9.0.0

showsBinary1 :: (Show1 f, Show1 g, Show a) => String -> Int -> f a -> g a -> ShowS #

showsBinary1 n d x y produces the string representation of a binary data constructor with name n and arguments x and y, in precedence context d.

Since: base-4.9.0.0

readsUnaryWith :: (Int -> ReadS a) -> String -> (a -> t) -> String -> ReadS t #

readsUnaryWith rp n c n' matches the name of a unary data constructor and then parses its argument using rp.

Since: base-4.9.0.0

readsUnary1 :: (Read1 f, Read a) => String -> (f a -> t) -> String -> ReadS t #

readsUnary1 n c n' matches the name of a unary data constructor and then parses its argument using readsPrec1.

Since: base-4.9.0.0

readsUnary :: Read a => String -> (a -> t) -> String -> ReadS t #

readsUnary n c n' matches the name of a unary data constructor and then parses its argument using readsPrec.

Since: base-4.9.0.0

readsPrec2 :: (Read2 f, Read a, Read b) => Int -> ReadS (f a b) #

Lift the standard readsPrec function through the type constructor.

Since: base-4.9.0.0

readsPrec1 :: (Read1 f, Read a) => Int -> ReadS (f a) #

Lift the standard readsPrec and readList functions through the type constructor.

Since: base-4.9.0.0

readsData :: (String -> ReadS a) -> Int -> ReadS a #

readsData p d is a parser for datatypes where each alternative begins with a data constructor. It parses the constructor and passes it to p. Parsers for various constructors can be constructed with readsUnary, readsUnary1 and readsBinary1, and combined with mappend from the Monoid class.

Since: base-4.9.0.0

readsBinaryWith :: (Int -> ReadS a) -> (Int -> ReadS b) -> String -> (a -> b -> t) -> String -> ReadS t #

readsBinaryWith rp1 rp2 n c n' matches the name of a binary data constructor and then parses its arguments using rp1 and rp2 respectively.

Since: base-4.9.0.0

readsBinary1 :: (Read1 f, Read1 g, Read a) => String -> (f a -> g a -> t) -> String -> ReadS t #

readsBinary1 n c n' matches the name of a binary data constructor and then parses its arguments using readsPrec1.

Since: base-4.9.0.0

readUnaryWith :: ReadPrec a -> String -> (a -> t) -> ReadPrec t #

readUnaryWith rp n c' matches the name of a unary data constructor and then parses its argument using rp.

Since: base-4.10.0.0

readPrec2 :: (Read2 f, Read a, Read b) => ReadPrec (f a b) #

Lift the standard readPrec function through the type constructor.

Since: base-4.10.0.0

readPrec1 :: (Read1 f, Read a) => ReadPrec (f a) #

Lift the standard readPrec and readListPrec functions through the type constructor.

Since: base-4.10.0.0

readData :: ReadPrec a -> ReadPrec a #

readData p is a parser for datatypes where each alternative begins with a data constructor. It parses the constructor and passes it to p. Parsers for various constructors can be constructed with readUnaryWith and readBinaryWith, and combined with (<|>) from the Alternative class.

Since: base-4.10.0.0

readBinaryWith :: ReadPrec a -> ReadPrec b -> String -> (a -> b -> t) -> ReadPrec t #

readBinaryWith rp1 rp2 n c' matches the name of a binary data constructor and then parses its arguments using rp1 and rp2 respectively.

Since: base-4.10.0.0

liftReadListPrecDefault :: Read1 f => ReadPrec a -> ReadPrec [a] -> ReadPrec [f a] #

A possible replacement definition for the liftReadListPrec method, defined using liftReadPrec.

Since: base-4.10.0.0

liftReadListPrec2Default :: Read2 f => ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [f a b] #

A possible replacement definition for the liftReadListPrec2 method, defined using liftReadPrec2.

Since: base-4.10.0.0

liftReadListDefault :: Read1 f => (Int -> ReadS a) -> ReadS [a] -> ReadS [f a] #

A possible replacement definition for the liftReadList method. This is only needed for Read1 instances where liftReadListPrec isn't defined as liftReadListPrecDefault.

Since: base-4.10.0.0

liftReadList2Default :: Read2 f => (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [f a b] #

A possible replacement definition for the liftReadList2 method. This is only needed for Read2 instances where liftReadListPrec2 isn't defined as liftReadListPrec2Default.

Since: base-4.10.0.0

eq2 :: (Eq2 f, Eq a, Eq b) => f a b -> f a b -> Bool #

Lift the standard (==) function through the type constructor.

Since: base-4.9.0.0

eq1 :: (Eq1 f, Eq a) => f a -> f a -> Bool #

Lift the standard (==) function through the type constructor.

Since: base-4.9.0.0

compare2 :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Ordering #

Lift the standard compare function through the type constructor.

Since: base-4.9.0.0

compare1 :: (Ord1 f, Ord a) => f a -> f a -> Ordering #

Lift the standard compare function through the type constructor.

Since: base-4.9.0.0

data Complex a #

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
Representable Complex 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Complex #

Methods

tabulate :: (Rep Complex -> a) -> Complex a #

index :: Complex a -> Rep Complex -> a #

MonadFix Complex

Since: base-4.15.0.0

Instance details

Defined in Data.Complex

Methods

mfix :: (a -> Complex a) -> Complex a #

MonadZip Complex

Since: base-4.15.0.0

Instance details

Defined in Data.Complex

Methods

mzip :: Complex a -> Complex b -> Complex (a, b) #

mzipWith :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

munzip :: Complex (a, b) -> (Complex a, Complex b) #

Foldable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

fold :: Monoid m => Complex m -> m #

foldMap :: Monoid m => (a -> m) -> Complex a -> m #

foldMap' :: Monoid m => (a -> m) -> Complex a -> m #

foldr :: (a -> b -> b) -> b -> Complex a -> b #

foldr' :: (a -> b -> b) -> b -> Complex a -> b #

foldl :: (b -> a -> b) -> b -> Complex a -> b #

foldl' :: (b -> a -> b) -> b -> Complex a -> b #

foldr1 :: (a -> a -> a) -> Complex a -> a #

foldl1 :: (a -> a -> a) -> Complex a -> a #

toList :: Complex a -> [a] #

null :: Complex a -> Bool #

length :: Complex a -> Int #

elem :: Eq a => a -> Complex a -> Bool #

maximum :: Ord a => Complex a -> a #

minimum :: Ord a => Complex a -> a #

sum :: Num a => Complex a -> a #

product :: Num a => Complex a -> a #

Eq1 Complex
>>> eq1 (1 :+ 2) (1 :+ 2)
True
>>> eq1 (1 :+ 2) (1 :+ 3)
False

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Complex a -> Complex b -> Bool #

Read1 Complex
>>> readPrec_to_S readPrec1 0 "(2 % 3) :+ (3 % 4)" :: [(Complex Rational, String)]
[(2 % 3 :+ 3 % 4,"")]

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Complex a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Complex a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Complex a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Complex a] #

Show1 Complex
>>> showsPrec1 0 (2 :+ 3) ""
"2 :+ 3"

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Complex a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Complex a] -> ShowS #

Traversable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

traverse :: Applicative f => (a -> f b) -> Complex a -> f (Complex b) #

sequenceA :: Applicative f => Complex (f a) -> f (Complex a) #

mapM :: Monad m => (a -> m b) -> Complex a -> m (Complex b) #

sequence :: Monad m => Complex (m a) -> m (Complex a) #

Applicative Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

pure :: a -> Complex a #

(<*>) :: Complex (a -> b) -> Complex a -> Complex b #

liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

(*>) :: Complex a -> Complex b -> Complex b #

(<*) :: Complex a -> Complex b -> Complex a #

Functor Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

fmap :: (a -> b) -> Complex a -> Complex b #

(<$) :: a -> Complex b -> Complex a #

Monad Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

(>>=) :: Complex a -> (a -> Complex b) -> Complex b #

(>>) :: Complex a -> Complex b -> Complex b #

return :: a -> Complex a #

Foldable1 Complex 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Complex m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Complex a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Complex a -> m #

toNonEmpty :: Complex a -> NonEmpty a #

maximum :: Ord a => Complex a -> a #

minimum :: Ord a => Complex a -> a #

head :: Complex a -> a #

last :: Complex a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Complex a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Complex a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Complex a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Complex a -> b #

Hashable1 Complex 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Complex a -> Int #

Invariant Complex

from Data.Complex

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Complex a -> Complex b #

Apply Complex 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Complex (a -> b) -> Complex a -> Complex b #

(.>) :: Complex a -> Complex b -> Complex b #

(<.) :: Complex a -> Complex b -> Complex a #

liftF2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

Bind Complex 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Complex a -> (a -> Complex b) -> Complex b #

join :: Complex (Complex a) -> Complex a #

Traversable1 Complex 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Complex a -> f (Complex b) #

sequence1 :: Apply f => Complex (f b) -> f (Complex b) #

Generic1 Complex 
Instance details

Defined in Data.Complex

Associated Types

type Rep1 Complex :: k -> Type #

Methods

from1 :: forall (a :: k). Complex a -> Rep1 Complex a #

to1 :: forall (a :: k). Rep1 Complex a -> Complex a #

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

Methods

basicLength :: MVector s (Complex a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Complex a) -> MVector s (Complex a) #

basicOverlaps :: MVector s (Complex a) -> MVector s (Complex a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Complex a)) #

basicInitialize :: MVector s (Complex a) -> ST s () #

basicUnsafeReplicate :: Int -> Complex a -> ST s (MVector s (Complex a)) #

basicUnsafeRead :: MVector s (Complex a) -> Int -> ST s (Complex a) #

basicUnsafeWrite :: MVector s (Complex a) -> Int -> Complex a -> ST s () #

basicClear :: MVector s (Complex a) -> ST s () #

basicSet :: MVector s (Complex a) -> Complex a -> ST s () #

basicUnsafeCopy :: MVector s (Complex a) -> MVector s (Complex a) -> ST s () #

basicUnsafeMove :: MVector s (Complex a) -> MVector s (Complex a) -> ST s () #

basicUnsafeGrow :: MVector s (Complex a) -> Int -> ST s (MVector s (Complex a)) #

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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Complex a) #

toConstr :: Complex a -> Constr #

dataTypeOf :: Complex a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Complex a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Complex a)) #

gmapT :: (forall b. Data b => b -> b) -> Complex a -> Complex a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Complex a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Complex a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Complex a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Complex a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Complex a -> m (Complex a) #

Storable a => Storable (Complex a)

Since: base-4.8.0.0

Instance details

Defined in Data.Complex

Methods

sizeOf :: Complex a -> Int #

alignment :: Complex a -> Int #

peekElemOff :: Ptr (Complex a) -> Int -> IO (Complex a) #

pokeElemOff :: Ptr (Complex a) -> Int -> Complex a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Complex a) #

pokeByteOff :: Ptr b -> Int -> Complex a -> IO () #

peek :: Ptr (Complex a) -> IO (Complex a) #

poke :: Ptr (Complex a) -> Complex a -> IO () #

RealFloat a => Floating (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

pi :: Complex a #

exp :: Complex a -> Complex a #

log :: Complex a -> Complex a #

sqrt :: Complex a -> Complex a #

(**) :: Complex a -> Complex a -> Complex a #

logBase :: Complex a -> Complex a -> Complex a #

sin :: Complex a -> Complex a #

cos :: Complex a -> Complex a #

tan :: Complex a -> Complex a #

asin :: Complex a -> Complex a #

acos :: Complex a -> Complex a #

atan :: Complex a -> Complex a #

sinh :: Complex a -> Complex a #

cosh :: Complex a -> Complex a #

tanh :: Complex a -> Complex a #

asinh :: Complex a -> Complex a #

acosh :: Complex a -> Complex a #

atanh :: Complex a -> Complex a #

log1p :: Complex a -> Complex a #

expm1 :: Complex a -> Complex a #

log1pexp :: Complex a -> Complex a #

log1mexp :: Complex a -> Complex a #

Generic (Complex a) 
Instance details

Defined in Data.Complex

Associated Types

type Rep (Complex a) :: Type -> Type #

Methods

from :: Complex a -> Rep (Complex a) x #

to :: Rep (Complex a) x -> Complex a #

RealFloat a => Num (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(+) :: Complex a -> Complex a -> Complex a #

(-) :: Complex a -> Complex a -> Complex a #

(*) :: Complex a -> Complex a -> Complex a #

negate :: Complex a -> Complex a #

abs :: Complex a -> Complex a #

signum :: Complex a -> Complex a #

fromInteger :: Integer -> Complex a #

Read a => Read (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

Methods

(/) :: Complex a -> Complex a -> Complex a #

recip :: Complex a -> Complex a #

fromRational :: Rational -> Complex a #

Show a => Show (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

showsPrec :: Int -> Complex a -> ShowS #

show :: Complex a -> String #

showList :: [Complex a] -> ShowS #

NFData a => NFData (Complex a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Complex a -> () #

Eq a => Eq (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(==) :: Complex a -> Complex a -> Bool #

(/=) :: Complex a -> Complex a -> Bool #

Hashable a => Hashable (Complex a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Complex a -> Int #

hash :: Complex a -> Int #

Prim a => Prim (Complex a)

Since: primitive-0.9.0.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox (Complex a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep Complex 
Instance details

Defined in Data.Functor.Rep

type Rep1 Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

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)

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

newtype Vector (Complex a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Complex a) = V_Complex (Vector (a, a))

realPart :: Complex a -> a #

Extracts the real part of a complex number.

polar :: RealFloat a => Complex a -> (a, a) #

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.

phase :: RealFloat a => Complex a -> a #

The phase of a complex number, in the range (-pi, pi]. If the magnitude is zero, then so is the phase.

mkPolar :: Floating a => a -> a -> Complex a #

Form a complex number from polar components of magnitude and phase.

magnitude :: RealFloat a => Complex a -> a #

The nonnegative magnitude of a complex number.

imagPart :: Complex a -> a #

Extracts the imaginary part of a complex number.

conjugate :: Num a => Complex a -> Complex a #

The conjugate of a complex number.

cis :: Floating a => a -> Complex a #

cis t is a complex value with magnitude 1 and phase t (modulo 2*pi).

type Uni = Fixed E0 #

resolution of 1, this works the same as Integer

type Pico = Fixed E12 #

resolution of 10^-12 = .000000000001

type Nano = Fixed E9 #

resolution of 10^-9 = .000000001

type Milli = Fixed E3 #

resolution of 10^-3 = .001

type Micro = Fixed E6 #

resolution of 10^-6 = .000001

class HasResolution (a :: k) where #

Methods

resolution :: p a -> Integer #

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

Methods

resolution :: p n -> Integer #

HasResolution E0

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E0 -> Integer #

HasResolution E1

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E1 -> Integer #

HasResolution E12

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

resolution :: p E12 -> Integer #

HasResolution E2

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E2 -> Integer #

HasResolution E3

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E3 -> Integer #

HasResolution E6

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

resolution :: p E6 -> Integer #

HasResolution E9

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E9 -> Integer #

HasResolution E14 
Instance details

Defined in Data.Time.Format.ISO8601

Methods

resolution :: p E14 -> Integer #

HasResolution E16 
Instance details

Defined in Data.Time.Format.ISO8601

Methods

resolution :: p E16 -> Integer #

newtype Fixed (a :: k) #

The type parameter should be an instance of HasResolution.

Constructors

MkFixed Integer 

Instances

Instances details
NFData1 (Fixed :: TYPE LiftedRep -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Fixed a -> () #

(Typeable k, Typeable a) => Data (Fixed a)

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixed a -> c (Fixed a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Fixed a) #

toConstr :: Fixed a -> Constr #

dataTypeOf :: Fixed a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Fixed a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Fixed a)) #

gmapT :: (forall b. Data b => b -> b) -> Fixed a -> Fixed a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixed a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixed a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Fixed a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixed a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixed a -> m (Fixed a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixed a -> m (Fixed a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixed a -> m (Fixed a) #

Enum (Fixed a)

Recall that, for numeric types, succ and pred typically add and subtract 1, respectively. This is not true in the case of Fixed, whose successor and predecessor functions intuitively return the "next" and "previous" values in the enumeration. The results of these functions thus depend on the resolution of the Fixed value. For example, when enumerating values of resolution 10^-3 of type Milli = Fixed E3,

  succ (0.000 :: Milli) == 1.001

and likewise

  pred (0.000 :: Milli) == -0.001

In other words, succ and pred increment and decrement a fixed-precision value by the least amount such that the value's resolution is unchanged. For example, 10^-12 is the smallest (positive) amount that can be added to a value of type Pico = Fixed E12 without changing its resolution, and so

  succ (0.000000000000 :: Pico) == 0.000000000001

and similarly

  pred (0.000000000000 :: Pico) == -0.000000000001

This is worth bearing in mind when defining Fixed arithmetic sequences. In particular, you may be forgiven for thinking the sequence

  [1..10] :: [Pico]

evaluates to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] :: [Pico].

However, this is not true. On the contrary, similarly to the above implementations of succ and pred, enumFromTo :: Pico -> Pico -> [Pico] has a "step size" of 10^-12. Hence, the list [1..10] :: [Pico] has the form

  [1.000000000000, 1.00000000001, 1.00000000002, ..., 10.000000000000]

and contains 9 * 10^12 + 1 values.

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

succ :: Fixed a -> Fixed a #

pred :: Fixed a -> Fixed a #

toEnum :: Int -> Fixed a #

fromEnum :: Fixed a -> Int #

enumFrom :: Fixed a -> [Fixed a] #

enumFromThen :: Fixed a -> Fixed a -> [Fixed a] #

enumFromTo :: Fixed a -> Fixed a -> [Fixed a] #

enumFromThenTo :: Fixed a -> Fixed a -> Fixed a -> [Fixed a] #

HasResolution a => Num (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

(+) :: Fixed a -> Fixed a -> Fixed a #

(-) :: Fixed a -> Fixed a -> Fixed a #

(*) :: Fixed a -> Fixed a -> Fixed a #

negate :: Fixed a -> Fixed a #

abs :: Fixed a -> Fixed a #

signum :: Fixed a -> Fixed a #

fromInteger :: Integer -> Fixed a #

HasResolution a => Read (Fixed a)

Since: base-4.3.0.0

Instance details

Defined in Data.Fixed

HasResolution a => Fractional (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

(/) :: Fixed a -> Fixed a -> Fixed a #

recip :: Fixed a -> Fixed a #

fromRational :: Rational -> Fixed a #

HasResolution a => Real (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

toRational :: Fixed a -> Rational #

HasResolution a => RealFrac (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

properFraction :: Integral b => Fixed a -> (b, Fixed a) #

truncate :: Integral b => Fixed a -> b #

round :: Integral b => Fixed a -> b #

ceiling :: Integral b => Fixed a -> b #

floor :: Integral b => Fixed a -> b #

HasResolution a => Show (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

showsPrec :: Int -> Fixed a -> ShowS #

show :: Fixed a -> String #

showList :: [Fixed a] -> ShowS #

NFData (Fixed a)

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Fixed a -> () #

Eq (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

(==) :: Fixed a -> Fixed a -> Bool #

(/=) :: Fixed a -> Fixed a -> Bool #

Ord (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

compare :: Fixed a -> Fixed a -> Ordering #

(<) :: Fixed a -> Fixed a -> Bool #

(<=) :: Fixed a -> Fixed a -> Bool #

(>) :: Fixed a -> Fixed a -> Bool #

(>=) :: Fixed a -> Fixed a -> Bool #

max :: Fixed a -> Fixed a -> Fixed a #

min :: Fixed a -> Fixed a -> Fixed a #

Hashable (Fixed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Fixed a -> Int #

hash :: Fixed a -> Int #

data E9 #

Instances

Instances details
HasResolution E9

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E9 -> Integer #

data E6 #

Instances

Instances details
HasResolution E6

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

resolution :: p E6 -> Integer #

data E3 #

Instances

Instances details
HasResolution E3

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E3 -> Integer #

data E2 #

Instances

Instances details
HasResolution E2

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E2 -> Integer #

data E12 #

Instances

Instances details
HasResolution E12

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

resolution :: p E12 -> Integer #

data E1 #

Instances

Instances details
HasResolution E1

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E1 -> Integer #

data E0 #

Instances

Instances details
HasResolution E0

Since: base-4.1.0.0

Instance details

Defined in Data.Fixed

Methods

resolution :: p E0 -> Integer #

type Deci = Fixed E1 #

resolution of 10^-1 = .1

type Centi = Fixed E2 #

resolution of 10^-2 = .01, useful for many monetary currencies

showFixed :: forall {k} (a :: k). HasResolution a => Bool -> Fixed a -> String #

First arg is whether to chop off trailing zeros

mod' :: Real a => a -> a -> a #

Generalisation of mod to any instance of Real

divMod' :: (Real a, Integral b) => a -> a -> (b, a) #

Generalisation of divMod to any instance of Real

div' :: (Real a, Integral b) => a -> a -> b #

Generalisation of div to any instance of Real

data Void #

Uninhabited data type

Since: base-4.8.0.0

Instances

Instances details
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 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Void #

toConstr :: Void -> Constr #

dataTypeOf :: Void -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Void) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void) #

gmapT :: (forall b. Data b => b -> b) -> Void -> Void #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r #

gmapQ :: (forall d. Data d => d -> u) -> Void -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Void -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Void -> m Void #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void #

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in Data.Void

Methods

(<>) :: Void -> Void -> Void #

sconcat :: NonEmpty Void -> Void #

stimes :: Integral b => b -> Void -> Void #

Exception Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Generic Void 
Instance details

Defined in Data.Void

Associated Types

type Rep Void :: Type -> Type #

Methods

from :: Void -> Rep Void x #

to :: Rep Void x -> Void #

Ix Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

range :: (Void, Void) -> [Void] #

index :: (Void, Void) -> Void -> Int #

unsafeIndex :: (Void, Void) -> Void -> Int #

inRange :: (Void, Void) -> Void -> Bool #

rangeSize :: (Void, Void) -> Int #

unsafeRangeSize :: (Void, Void) -> Int #

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

Methods

showsPrec :: Int -> Void -> ShowS #

show :: Void -> String #

showList :: [Void] -> ShowS #

NFData Void

Defined as rnf = absurd.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Void -> () #

Eq Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

(==) :: Void -> Void -> Bool #

(/=) :: Void -> Void -> Bool #

Ord Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

compare :: Void -> Void -> Ordering #

(<) :: Void -> Void -> Bool #

(<=) :: Void -> Void -> Bool #

(>) :: Void -> Void -> Bool #

(>=) :: Void -> Void -> Bool #

max :: Void -> Void -> Void #

min :: Void -> Void -> Void #

Hashable Void 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Void -> Int #

hash :: Void -> Int #

Lift Void

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Void -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Void -> Code m Void #

type Rep Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

type Rep Void = D1 ('MetaData "Void" "Data.Void" "base" 'False) (V1 :: Type -> Type)

vacuous :: Functor f => f Void -> f a #

If Void is uninhabited then any Functor that holds only values of type Void is holding no values. It is implemented in terms of fmap absurd.

Since: base-4.8.0.0

absurd :: Void -> a #

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

newtype WrappedMonoid m #

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.

Constructors

WrapMonoid 

Fields

Instances

Instances details
NFData1 WrappedMonoid

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> WrappedMonoid a -> () #

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

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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonoid m) #

toConstr :: WrappedMonoid m -> Constr #

dataTypeOf :: WrappedMonoid m -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonoid m)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonoid m)) #

gmapT :: (forall b. Data b => b -> b) -> WrappedMonoid m -> WrappedMonoid m #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r #

gmapQ :: (forall d. Data d => d -> u) -> WrappedMonoid m -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonoid m -> u #

gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) #

gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) #

gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) #

Monoid m => Monoid (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

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

Generic (WrappedMonoid m) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type #

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

NFData m => NFData (WrappedMonoid m)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: WrappedMonoid m -> () #

Eq m => Eq (WrappedMonoid m)

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

Hashable a => Hashable (WrappedMonoid a) 
Instance details

Defined in Data.Hashable.Class

Unbox a => Unbox (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 WrappedMonoid 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 WrappedMonoid :: k -> Type #

Methods

from1 :: forall (a :: k). WrappedMonoid a -> Rep1 WrappedMonoid a #

to1 :: forall (a :: k). Rep1 WrappedMonoid a -> WrappedMonoid a #

newtype MVector s (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep (WrappedMonoid m)

Since: base-4.9.0.0

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep1 WrappedMonoid = D1 ('MetaData "WrappedMonoid" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "WrapMonoid" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonoid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype Min a #

Constructors

Min 

Fields

Instances

Instances details
MonadFix Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Min a) -> Min a #

Foldable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Min m -> m #

foldMap :: Monoid m => (a -> m) -> Min a -> m #

foldMap' :: Monoid m => (a -> m) -> Min a -> m #

foldr :: (a -> b -> b) -> b -> Min a -> b #

foldr' :: (a -> b -> b) -> b -> Min a -> b #

foldl :: (b -> a -> b) -> b -> Min a -> b #

foldl' :: (b -> a -> b) -> b -> Min a -> b #

foldr1 :: (a -> a -> a) -> Min a -> a #

foldl1 :: (a -> a -> a) -> Min a -> a #

toList :: Min a -> [a] #

null :: Min a -> Bool #

length :: Min a -> Int #

elem :: Eq a => a -> Min a -> Bool #

maximum :: Ord a => Min a -> a #

minimum :: Ord a => Min a -> a #

sum :: Num a => Min a -> a #

product :: Num a => Min a -> a #

Traversable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) #

sequenceA :: Applicative f => Min (f a) -> f (Min a) #

mapM :: Monad m => (a -> m b) -> Min a -> m (Min b) #

sequence :: Monad m => Min (m a) -> m (Min a) #

Applicative Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Min a #

(<*>) :: Min (a -> b) -> Min a -> Min b #

liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c #

(*>) :: Min a -> Min b -> Min b #

(<*) :: Min a -> Min b -> Min a #

Functor Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Min a -> Min b #

(<$) :: a -> Min b -> Min a #

Monad Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Min a -> (a -> Min b) -> Min b #

(>>) :: Min a -> Min b -> Min b #

return :: a -> Min a #

NFData1 Min

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Min a -> () #

Foldable1 Min 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Min m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Min a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Min a -> m #

toNonEmpty :: Min a -> NonEmpty a #

maximum :: Ord a => Min a -> a #

minimum :: Ord a => Min a -> a #

head :: Min a -> a #

last :: Min a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Min a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Min a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Min a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Min a -> b #

Invariant Min

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Min a -> Min b #

Apply Min 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Min (a -> b) -> Min a -> Min b #

(.>) :: Min a -> Min b -> Min b #

(<.) :: Min a -> Min b -> Min a #

liftF2 :: (a -> b -> c) -> Min a -> Min b -> Min c #

Bind Min 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Min a -> (a -> Min b) -> Min b #

join :: Min (Min a) -> Min a #

Extend Min 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Min a -> Min (Min a) #

extended :: (Min a -> b) -> Min a -> Min b #

Traversable1 Min 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Min a -> f (Min b) #

sequence1 :: Apply f => Min (f b) -> f (Min b) #

Unbox a => Vector Vector (Min a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Min a) -> ST s (Vector (Min a)) #

basicUnsafeThaw :: Vector (Min a) -> ST s (Mutable Vector s (Min a)) #

basicLength :: Vector (Min a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Min a) -> Vector (Min a) #

basicUnsafeIndexM :: Vector (Min a) -> Int -> Box (Min a) #

basicUnsafeCopy :: Mutable Vector s (Min a) -> Vector (Min a) -> ST s () #

elemseq :: Vector (Min a) -> Min a -> b -> b #

Unbox a => MVector MVector (Min a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Min a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Min a) -> MVector s (Min a) #

basicOverlaps :: MVector s (Min a) -> MVector s (Min a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Min a)) #

basicInitialize :: MVector s (Min a) -> ST s () #

basicUnsafeReplicate :: Int -> Min a -> ST s (MVector s (Min a)) #

basicUnsafeRead :: MVector s (Min a) -> Int -> ST s (Min a) #

basicUnsafeWrite :: MVector s (Min a) -> Int -> Min a -> ST s () #

basicClear :: MVector s (Min a) -> ST s () #

basicSet :: MVector s (Min a) -> Min a -> ST s () #

basicUnsafeCopy :: MVector s (Min a) -> MVector s (Min a) -> ST s () #

basicUnsafeMove :: MVector s (Min a) -> MVector s (Min a) -> ST s () #

basicUnsafeGrow :: MVector s (Min a) -> Int -> ST s (MVector s (Min a)) #

Data a => Data (Min 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) -> Min a -> c (Min a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Min a) #

toConstr :: Min a -> Constr #

dataTypeOf :: Min a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Min a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Min a)) #

gmapT :: (forall b. Data b => b -> b) -> Min a -> Min a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Min a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Min a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Min a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Min a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Min a -> m (Min a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Min a -> m (Min a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Min a -> m (Min a) #

(Ord a, Bounded a) => Monoid (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Min a #

mappend :: Min a -> Min a -> Min a #

mconcat :: [Min a] -> Min a #

Ord a => Semigroup (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Min a -> Min a -> Min a #

sconcat :: NonEmpty (Min a) -> Min a #

stimes :: Integral b => b -> Min a -> Min a #

Bounded a => Bounded (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Min a #

maxBound :: Min a #

Enum a => Enum (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Min a -> Min a #

pred :: Min a -> Min a #

toEnum :: Int -> Min a #

fromEnum :: Min a -> Int #

enumFrom :: Min a -> [Min a] #

enumFromThen :: Min a -> Min a -> [Min a] #

enumFromTo :: Min a -> Min a -> [Min a] #

enumFromThenTo :: Min a -> Min a -> Min a -> [Min a] #

Generic (Min a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Min a) :: Type -> Type #

Methods

from :: Min a -> Rep (Min a) x #

to :: Rep (Min a) x -> Min a #

Num a => Num (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Min a -> Min a -> Min a #

(-) :: Min a -> Min a -> Min a #

(*) :: Min a -> Min a -> Min a #

negate :: Min a -> Min a #

abs :: Min a -> Min a #

signum :: Min a -> Min a #

fromInteger :: Integer -> Min a #

Read a => Read (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Min a -> ShowS #

show :: Min a -> String #

showList :: [Min a] -> ShowS #

NFData a => NFData (Min a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Min a -> () #

Eq a => Eq (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Min a -> Min a -> Bool #

(/=) :: Min a -> Min a -> Bool #

Ord a => Ord (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Min a -> Min a -> Ordering #

(<) :: Min a -> Min a -> Bool #

(<=) :: Min a -> Min a -> Bool #

(>) :: Min a -> Min a -> Bool #

(>=) :: Min a -> Min a -> Bool #

max :: Min a -> Min a -> Min a #

min :: Min a -> Min a -> Min a #

Hashable a => Hashable (Min a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Min a -> Int #

hash :: Min a -> Int #

Prim a => Prim (Min a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox (Min a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 Min 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Min :: k -> Type #

Methods

from1 :: forall (a :: k). Min a -> Rep1 Min a #

to1 :: forall (a :: k). Rep1 Min a -> Min a #

newtype MVector s (Min a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Min a) = MV_Min (MVector s a)
type Rep (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep (Min a) = D1 ('MetaData "Min" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Min" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Min a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Min a) = V_Min (Vector a)
type Rep1 Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep1 Min = D1 ('MetaData "Min" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Min" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype Max a #

Constructors

Max 

Fields

Instances

Instances details
MonadFix Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Max a) -> Max a #

Foldable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Max m -> m #

foldMap :: Monoid m => (a -> m) -> Max a -> m #

foldMap' :: Monoid m => (a -> m) -> Max a -> m #

foldr :: (a -> b -> b) -> b -> Max a -> b #

foldr' :: (a -> b -> b) -> b -> Max a -> b #

foldl :: (b -> a -> b) -> b -> Max a -> b #

foldl' :: (b -> a -> b) -> b -> Max a -> b #

foldr1 :: (a -> a -> a) -> Max a -> a #

foldl1 :: (a -> a -> a) -> Max a -> a #

toList :: Max a -> [a] #

null :: Max a -> Bool #

length :: Max a -> Int #

elem :: Eq a => a -> Max a -> Bool #

maximum :: Ord a => Max a -> a #

minimum :: Ord a => Max a -> a #

sum :: Num a => Max a -> a #

product :: Num a => Max a -> a #

Traversable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) #

sequenceA :: Applicative f => Max (f a) -> f (Max a) #

mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) #

sequence :: Monad m => Max (m a) -> m (Max a) #

Applicative Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Max a #

(<*>) :: Max (a -> b) -> Max a -> Max b #

liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c #

(*>) :: Max a -> Max b -> Max b #

(<*) :: Max a -> Max b -> Max a #

Functor Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Max a -> Max b #

(<$) :: a -> Max b -> Max a #

Monad Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Max a -> (a -> Max b) -> Max b #

(>>) :: Max a -> Max b -> Max b #

return :: a -> Max a #

NFData1 Max

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Max a -> () #

Foldable1 Max 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Max m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Max a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Max a -> m #

toNonEmpty :: Max a -> NonEmpty a #

maximum :: Ord a => Max a -> a #

minimum :: Ord a => Max a -> a #

head :: Max a -> a #

last :: Max a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Max a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Max a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Max a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Max a -> b #

Invariant Max

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Max a -> Max b #

Apply Max 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Max (a -> b) -> Max a -> Max b #

(.>) :: Max a -> Max b -> Max b #

(<.) :: Max a -> Max b -> Max a #

liftF2 :: (a -> b -> c) -> Max a -> Max b -> Max c #

Bind Max 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Max a -> (a -> Max b) -> Max b #

join :: Max (Max a) -> Max a #

Extend Max 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Max a -> Max (Max a) #

extended :: (Max a -> b) -> Max a -> Max b #

Traversable1 Max 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Max a -> f (Max b) #

sequence1 :: Apply f => Max (f b) -> f (Max b) #

Unbox a => Vector Vector (Max a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Max a) -> ST s (Vector (Max a)) #

basicUnsafeThaw :: Vector (Max a) -> ST s (Mutable Vector s (Max a)) #

basicLength :: Vector (Max a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Max a) -> Vector (Max a) #

basicUnsafeIndexM :: Vector (Max a) -> Int -> Box (Max a) #

basicUnsafeCopy :: Mutable Vector s (Max a) -> Vector (Max a) -> ST s () #

elemseq :: Vector (Max a) -> Max a -> b -> b #

Unbox a => MVector MVector (Max a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Max a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Max a) -> MVector s (Max a) #

basicOverlaps :: MVector s (Max a) -> MVector s (Max a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Max a)) #

basicInitialize :: MVector s (Max a) -> ST s () #

basicUnsafeReplicate :: Int -> Max a -> ST s (MVector s (Max a)) #

basicUnsafeRead :: MVector s (Max a) -> Int -> ST s (Max a) #

basicUnsafeWrite :: MVector s (Max a) -> Int -> Max a -> ST s () #

basicClear :: MVector s (Max a) -> ST s () #

basicSet :: MVector s (Max a) -> Max a -> ST s () #

basicUnsafeCopy :: MVector s (Max a) -> MVector s (Max a) -> ST s () #

basicUnsafeMove :: MVector s (Max a) -> MVector s (Max a) -> ST s () #

basicUnsafeGrow :: MVector s (Max a) -> Int -> ST s (MVector s (Max a)) #

Data a => Data (Max 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) -> Max a -> c (Max a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Max a) #

toConstr :: Max a -> Constr #

dataTypeOf :: Max a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Max a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Max a)) #

gmapT :: (forall b. Data b => b -> b) -> Max a -> Max a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Max a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Max a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Max a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Max a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Max a -> m (Max a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Max a -> m (Max a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Max a -> m (Max a) #

(Ord a, Bounded a) => Monoid (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

Ord a => Semigroup (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Max a -> Max a -> Max a #

sconcat :: NonEmpty (Max a) -> Max a #

stimes :: Integral b => b -> Max a -> Max a #

Bounded a => Bounded (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Max a #

maxBound :: Max a #

Enum a => Enum (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Max a -> Max a #

pred :: Max a -> Max a #

toEnum :: Int -> Max a #

fromEnum :: Max a -> Int #

enumFrom :: Max a -> [Max a] #

enumFromThen :: Max a -> Max a -> [Max a] #

enumFromTo :: Max a -> Max a -> [Max a] #

enumFromThenTo :: Max a -> Max a -> Max a -> [Max a] #

Generic (Max a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Max a) :: Type -> Type #

Methods

from :: Max a -> Rep (Max a) x #

to :: Rep (Max a) x -> Max a #

Num a => Num (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Max a -> Max a -> Max a #

(-) :: Max a -> Max a -> Max a #

(*) :: Max a -> Max a -> Max a #

negate :: Max a -> Max a #

abs :: Max a -> Max a #

signum :: Max a -> Max a #

fromInteger :: Integer -> Max a #

Read a => Read (Max 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

Methods

showsPrec :: Int -> Max a -> ShowS #

show :: Max a -> String #

showList :: [Max a] -> ShowS #

NFData a => NFData (Max a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Max a -> () #

Eq a => Eq (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Max a -> Max a -> Bool #

(/=) :: Max a -> Max a -> Bool #

Ord a => Ord (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Max a -> Max a -> Ordering #

(<) :: Max a -> Max a -> Bool #

(<=) :: Max a -> Max a -> Bool #

(>) :: Max a -> Max a -> Bool #

(>=) :: Max a -> Max a -> Bool #

max :: Max a -> Max a -> Max a #

min :: Max a -> Max a -> Max a #

Hashable a => Hashable (Max a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Max a -> Int #

hash :: Max a -> Int #

Prim a => Prim (Max a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox (Max a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 Max 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Max :: k -> Type #

Methods

from1 :: forall (a :: k). Max a -> Rep1 Max a #

to1 :: forall (a :: k). Rep1 Max a -> Max a #

newtype MVector s (Max a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Max a) = MV_Max (MVector s a)
type Rep (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep (Max a) = D1 ('MetaData "Max" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Max" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Max a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Max a) = V_Max (Vector a)
type Rep1 Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep1 Max = D1 ('MetaData "Max" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Max" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype Last a #

Constructors

Last 

Fields

Instances

Instances details
MonadFix Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> Last a) -> Last a #

Foldable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

foldMap' :: Monoid m => (a -> m) -> Last a -> m #

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Traversable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) #

sequenceA :: Applicative f => Last (f a) -> f (Last a) #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) #

sequence :: Monad m => Last (m a) -> m (Last a) #

Applicative Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Functor Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Last a -> Last b #

(<$) :: a -> Last b -> Last a #

Monad Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b #

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

NFData1 Last

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Last a -> () #

Foldable1 Last 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Last m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Last a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Last a -> m #

toNonEmpty :: Last a -> NonEmpty a #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

head :: Last a -> a #

last :: Last a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Last a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Last a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Last a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Last a -> b #

Invariant Last

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Last a -> Last b #

Alt Last 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Last a -> Last a -> Last a #

some :: Applicative Last => Last a -> Last [a] #

many :: Applicative Last => Last a -> Last [a] #

Apply Last 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Last (a -> b) -> Last a -> Last b #

(.>) :: Last a -> Last b -> Last b #

(<.) :: Last a -> Last b -> Last a #

liftF2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

Bind Last 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Last a -> (a -> Last b) -> Last b #

join :: Last (Last a) -> Last a #

Extend Last 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Last a -> Last (Last a) #

extended :: (Last a -> b) -> Last a -> Last b #

Traversable1 Last 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Last a -> f (Last b) #

sequence1 :: Apply f => Last (f b) -> f (Last b) #

Unbox a => Vector Vector (Last a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Last a) -> ST s (Vector (Last a)) #

basicUnsafeThaw :: Vector (Last a) -> ST s (Mutable Vector s (Last a)) #

basicLength :: Vector (Last a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Last a) -> Vector (Last a) #

basicUnsafeIndexM :: Vector (Last a) -> Int -> Box (Last a) #

basicUnsafeCopy :: Mutable Vector s (Last a) -> Vector (Last a) -> ST s () #

elemseq :: Vector (Last a) -> Last a -> b -> b #

Unbox a => MVector MVector (Last a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Last a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Last a) -> MVector s (Last a) #

basicOverlaps :: MVector s (Last a) -> MVector s (Last a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Last a)) #

basicInitialize :: MVector s (Last a) -> ST s () #

basicUnsafeReplicate :: Int -> Last a -> ST s (MVector s (Last a)) #

basicUnsafeRead :: MVector s (Last a) -> Int -> ST s (Last a) #

basicUnsafeWrite :: MVector s (Last a) -> Int -> Last a -> ST s () #

basicClear :: MVector s (Last a) -> ST s () #

basicSet :: MVector s (Last a) -> Last a -> ST s () #

basicUnsafeCopy :: MVector s (Last a) -> MVector s (Last a) -> ST s () #

basicUnsafeMove :: MVector s (Last a) -> MVector s (Last a) -> ST s () #

basicUnsafeGrow :: MVector s (Last a) -> Int -> ST s (MVector s (Last a)) #

Data a => Data (Last 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) -> Last a -> c (Last a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Last a) #

toConstr :: Last a -> Constr #

dataTypeOf :: Last a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Last a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Last a)) #

gmapT :: (forall b. Data b => b -> b) -> Last a -> Last a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Last a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Last a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Last a -> Last a -> Last a #

sconcat :: NonEmpty (Last a) -> Last a #

stimes :: Integral b => b -> Last a -> Last a #

Bounded a => Bounded (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Last a #

maxBound :: Last a #

Enum a => Enum (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Last a -> Last a #

pred :: Last a -> Last a #

toEnum :: Int -> Last a #

fromEnum :: Last a -> Int #

enumFrom :: Last a -> [Last a] #

enumFromThen :: Last a -> Last a -> [Last a] #

enumFromTo :: Last a -> Last a -> [Last a] #

enumFromThenTo :: Last a -> Last a -> Last a -> [Last a] #

Generic (Last a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Read a => Read (Last 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

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

NFData a => NFData (Last a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () #

Eq a => Eq (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Last a -> Last a -> Bool #

(/=) :: Last a -> Last a -> Bool #

Ord a => Ord (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Last a -> Last a -> Ordering #

(<) :: Last a -> Last a -> Bool #

(<=) :: Last a -> Last a -> Bool #

(>) :: Last a -> Last a -> Bool #

(>=) :: Last a -> Last a -> Bool #

max :: Last a -> Last a -> Last a #

min :: Last a -> Last a -> Last a #

Hashable a => Hashable (Last a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Last a -> Int #

hash :: Last a -> Int #

Prim a => Prim (Last a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox (Last a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 Last 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 Last :: k -> Type #

Methods

from1 :: forall (a :: k). Last a -> Rep1 Last a #

to1 :: forall (a :: k). Rep1 Last a -> Last a #

newtype MVector s (Last a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Last a) = MV_Last (MVector s a)
type Rep (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep (Last a) = D1 ('MetaData "Last" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Last" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Last a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Last a) = V_Last (Vector a)
type Rep1 Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep1 Last = D1 ('MetaData "Last" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "Last" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype First a #

Constructors

First 

Fields

Instances

Instances details
MonadFix First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mfix :: (a -> First a) -> First a #

Foldable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldMap' :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Traversable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) #

sequenceA :: Applicative f => First (f a) -> f (First a) #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) #

sequence :: Monad m => First (m a) -> m (First a) #

Applicative First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Functor First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

Monad First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

NFData1 First

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> First a -> () #

Foldable1 First 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => First m -> m #

foldMap1 :: Semigroup m => (a -> m) -> First a -> m #

foldMap1' :: Semigroup m => (a -> m) -> First a -> m #

toNonEmpty :: First a -> NonEmpty a #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

head :: First a -> a #

last :: First a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> First a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> First a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> First a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> First a -> b #

Invariant First

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> First a -> First b #

Alt First 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: First a -> First a -> First a #

some :: Applicative First => First a -> First [a] #

many :: Applicative First => First a -> First [a] #

Apply First 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: First (a -> b) -> First a -> First b #

(.>) :: First a -> First b -> First b #

(<.) :: First a -> First b -> First a #

liftF2 :: (a -> b -> c) -> First a -> First b -> First c #

Bind First 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: First a -> (a -> First b) -> First b #

join :: First (First a) -> First a #

Extend First 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: First a -> First (First a) #

extended :: (First a -> b) -> First a -> First b #

Traversable1 First 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> First a -> f (First b) #

sequence1 :: Apply f => First (f b) -> f (First b) #

Unbox a => Vector Vector (First a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => MVector MVector (First a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (First a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (First a) -> MVector s (First a) #

basicOverlaps :: MVector s (First a) -> MVector s (First a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (First a)) #

basicInitialize :: MVector s (First a) -> ST s () #

basicUnsafeReplicate :: Int -> First a -> ST s (MVector s (First a)) #

basicUnsafeRead :: MVector s (First a) -> Int -> ST s (First a) #

basicUnsafeWrite :: MVector s (First a) -> Int -> First a -> ST s () #

basicClear :: MVector s (First a) -> ST s () #

basicSet :: MVector s (First a) -> First a -> ST s () #

basicUnsafeCopy :: MVector s (First a) -> MVector s (First a) -> ST s () #

basicUnsafeMove :: MVector s (First a) -> MVector s (First a) -> ST s () #

basicUnsafeGrow :: MVector s (First a) -> Int -> ST s (MVector s (First a)) #

Data a => Data (First 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) -> First a -> c (First a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (First a) #

toConstr :: First a -> Constr #

dataTypeOf :: First a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (First a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (First a)) #

gmapT :: (forall b. Data b => b -> b) -> First a -> First a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r #

gmapQ :: (forall d. Data d => d -> u) -> First a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> First a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Bounded a => Bounded (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: First a #

maxBound :: First a #

Enum a => Enum (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: First a -> First a #

pred :: First a -> First a #

toEnum :: Int -> First a #

fromEnum :: First a -> Int #

enumFrom :: First a -> [First a] #

enumFromThen :: First a -> First a -> [First a] #

enumFromTo :: First a -> First a -> [First a] #

enumFromThenTo :: First a -> First a -> First a -> [First a] #

Generic (First a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Read a => Read (First 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

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

NFData a => NFData (First a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () #

Eq a => Eq (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: First a -> First a -> Bool #

(/=) :: First a -> First a -> Bool #

Ord a => Ord (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: First a -> First a -> Ordering #

(<) :: First a -> First a -> Bool #

(<=) :: First a -> First a -> Bool #

(>) :: First a -> First a -> Bool #

(>=) :: First a -> First a -> Bool #

max :: First a -> First a -> First a #

min :: First a -> First a -> First a #

Hashable a => Hashable (First a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> First a -> Int #

hash :: First a -> Int #

Prim a => Prim (First a)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Unbox a => Unbox (First a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Generic1 First 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 First :: k -> Type #

Methods

from1 :: forall (a :: k). First a -> Rep1 First a #

to1 :: forall (a :: k). Rep1 First a -> First a #

newtype MVector s (First a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (First a) = MV_First (MVector s a)
type Rep (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep (First a) = D1 ('MetaData "First" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (First a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (First a) = V_First (Vector a)
type Rep1 First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep1 First = D1 ('MetaData "First" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

type ArgMin a b = Min (Arg a b) #

>>> Min (Arg 0 ()) <> Min (Arg 1 ())
Min {getMin = Arg 0 ()}

type ArgMax a b = Max (Arg a b) #

>>> Max (Arg 0 ()) <> Max (Arg 1 ())
Max {getMax = Arg 1 ()}

data Arg a b #

Arg isn't itself a Semigroup in its own right, but it can be placed inside Min and Max to compute an arg min or arg max.

>>> minimum [ Arg (x * x) x | x <- [-10 .. 10] ]
Arg 0 0

Constructors

Arg 

Fields

  • a

    The argument used for comparisons in Eq and Ord.

  • b

    The "value" exposed via the Functor, Foldable etc. instances.

Instances

Instances details
Bifoldable Arg

Since: base-4.10.0.0

Instance details

Defined in Data.Semigroup

Methods

bifold :: Monoid m => Arg m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Arg a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Arg a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Arg a b -> c #

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 #

first :: (a -> b) -> Arg a c -> Arg b c #

second :: (b -> c) -> Arg a b -> Arg a c #

Bitraversable Arg

Since: base-4.10.0.0

Instance details

Defined in Data.Semigroup

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Arg a b -> f (Arg c d) #

Biapplicative Arg 
Instance details

Defined in Data.Biapplicative

Methods

bipure :: a -> b -> Arg a b #

(<<*>>) :: Arg (a -> b) (c -> d) -> Arg a c -> Arg b d #

biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> Arg a d -> Arg b e -> Arg c f #

(*>>) :: Arg a b -> Arg c d -> Arg c d #

(<<*) :: Arg a b -> Arg c d -> Arg a b #

NFData2 Arg

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Arg a b -> () #

Bifoldable1 Arg 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => Arg m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Arg a b -> m #

Invariant2 Arg

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Arg a b -> Arg c d #

Biapply Arg 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Arg (a -> b) (c -> d) -> Arg a c -> Arg b d #

(.>>) :: Arg a b -> Arg c d -> Arg c d #

(<<.) :: Arg a b -> Arg c d -> Arg a b #

Bitraversable1 Arg 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Arg a c -> f (Arg b d) #

bisequence1 :: Apply f => Arg (f a) (f b) -> f (Arg a b) #

(Unbox a, Unbox b) => Vector Vector (Arg a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Arg a b) -> ST s (Vector (Arg a b)) #

basicUnsafeThaw :: Vector (Arg a b) -> ST s (Mutable Vector s (Arg a b)) #

basicLength :: Vector (Arg a b) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Arg a b) -> Vector (Arg a b) #

basicUnsafeIndexM :: Vector (Arg a b) -> Int -> Box (Arg a b) #

basicUnsafeCopy :: Mutable Vector s (Arg a b) -> Vector (Arg a b) -> ST s () #

elemseq :: Vector (Arg a b) -> Arg a b -> b0 -> b0 #

(Unbox a, Unbox b) => MVector MVector (Arg a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Arg a b) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Arg a b) -> MVector s (Arg a b) #

basicOverlaps :: MVector s (Arg a b) -> MVector s (Arg a b) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Arg a b)) #

basicInitialize :: MVector s (Arg a b) -> ST s () #

basicUnsafeReplicate :: Int -> Arg a b -> ST s (MVector s (Arg a b)) #

basicUnsafeRead :: MVector s (Arg a b) -> Int -> ST s (Arg a b) #

basicUnsafeWrite :: MVector s (Arg a b) -> Int -> Arg a b -> ST s () #

basicClear :: MVector s (Arg a b) -> ST s () #

basicSet :: MVector s (Arg a b) -> Arg a b -> ST s () #

basicUnsafeCopy :: MVector s (Arg a b) -> MVector s (Arg a b) -> ST s () #

basicUnsafeMove :: MVector s (Arg a b) -> MVector s (Arg a b) -> ST s () #

basicUnsafeGrow :: MVector s (Arg a b) -> Int -> ST s (MVector s (Arg a b)) #

Foldable (Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Arg a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Arg a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Arg a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Arg a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 #

toList :: Arg a a0 -> [a0] #

null :: Arg a a0 -> Bool #

length :: Arg a a0 -> Int #

elem :: Eq a0 => a0 -> Arg a a0 -> Bool #

maximum :: Ord a0 => Arg a a0 -> a0 #

minimum :: Ord a0 => Arg a a0 -> a0 #

sum :: Num a0 => Arg a a0 -> a0 #

product :: Num a0 => Arg a a0 -> a0 #

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) #

sequenceA :: Applicative f => Arg a (f a0) -> f (Arg a a0) #

mapM :: Monad m => (a0 -> m b) -> Arg a a0 -> m (Arg a b) #

sequence :: Monad m => Arg a (m a0) -> m (Arg a a0) #

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 #

(<$) :: a0 -> Arg a b -> Arg a a0 #

Comonad (Arg e) 
Instance details

Defined in Control.Comonad

Methods

extract :: Arg e a -> a #

duplicate :: Arg e a -> Arg e (Arg e a) #

extend :: (Arg e a -> b) -> Arg e a -> Arg e b #

NFData a => NFData1 (Arg a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Arg a a0 -> () #

Invariant (Arg a)

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Arg a a0 -> Arg a b #

Generic1 (Arg a :: Type -> Type) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 (Arg a) :: k -> Type #

Methods

from1 :: forall (a0 :: k). Arg a a0 -> Rep1 (Arg a) a0 #

to1 :: forall (a0 :: k). Rep1 (Arg a) a0 -> Arg a a0 #

(Data a, Data b) => Data (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Arg a b -> c (Arg a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Arg a b) #

toConstr :: Arg a b -> Constr #

dataTypeOf :: Arg a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Arg a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Arg a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Arg a b -> Arg a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arg a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arg a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Arg a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Arg a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Arg a b -> m (Arg a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg a b -> m (Arg a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg a b -> m (Arg a b) #

Generic (Arg a b) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Arg a b) :: Type -> Type #

Methods

from :: Arg a b -> Rep (Arg a b) x #

to :: Rep (Arg a b) x -> Arg a b #

(Read a, Read b) => Read (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

readsPrec :: Int -> ReadS (Arg a b) #

readList :: ReadS [Arg a b] #

readPrec :: ReadPrec (Arg a b) #

readListPrec :: ReadPrec [Arg a b] #

(Show a, Show b) => Show (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Arg a b -> ShowS #

show :: Arg a b -> String #

showList :: [Arg a b] -> ShowS #

(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 -> () #

Eq a => Eq (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Arg a b -> Arg a b -> Bool #

(/=) :: Arg a b -> Arg a b -> Bool #

Ord a => Ord (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Arg a b -> Arg a b -> Ordering #

(<) :: Arg a b -> Arg a b -> Bool #

(<=) :: Arg a b -> Arg a b -> Bool #

(>) :: Arg a b -> Arg a b -> Bool #

(>=) :: Arg a b -> Arg a b -> Bool #

max :: Arg a b -> Arg a b -> Arg a b #

min :: Arg a b -> Arg a b -> Arg a b #

Hashable a => Hashable (Arg a b)

Note: Prior to hashable-1.3.0.0 the hash computation included the second argument of Arg which wasn't consistent with its Eq instance.

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Arg a b -> Int #

hash :: Arg a b -> Int #

(Unbox a, Unbox b) => Unbox (Arg a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Arg a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Arg a b) = MV_Arg (MVector s (a, b))
type Rep1 (Arg a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

newtype Vector (Arg a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Arg a b) = V_Arg (Vector (a, b))

mtimesDefault :: (Integral b, Monoid a) => b -> a -> a #

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 #

This lets you use a difference list of a Semigroup as a Monoid.

Example:

Expand
>>> let hello = diff "Hello, "
>>> appEndo hello "World!"
"Hello, World!"
>>> appEndo (hello <> mempty) "World!"
"Hello, World!"
>>> appEndo (mempty <> hello) "World!"
"Hello, World!"
>>> let world = diff "World"
>>> let excl = diff "!"
>>> appEndo (hello <> (world <> excl)) mempty
"Hello, World!"
>>> appEndo ((hello <> world) <> excl) mempty
"Hello, World!"

cycle1 :: Semigroup m => m -> m #

A generalization of cycle to an arbitrary Semigroup. May fail to terminate for some values in some semigroups.

type family Item l #

The Item type function returns the type of items of the structure l.

Instances

Instances details
type Item Version 
Instance details

Defined in GHC.Exts

type Item CallStack 
Instance details

Defined in GHC.Exts

type Item ByteString 
Instance details

Defined in Data.ByteString.Internal

type Item ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

type Item ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

type Item IntSet 
Instance details

Defined in Data.IntSet.Internal

type Item IntSet = Key
type Item ByteArray 
Instance details

Defined in Data.Array.Byte

type Item Text 
Instance details

Defined in Data.Text

type Item Text = Char
type Item Text 
Instance details

Defined in Data.Text.Lazy

type Item Text = Char
type Item (ZipList a) 
Instance details

Defined in GHC.Exts

type Item (ZipList a) = a
type Item (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

type Item (IntMap a) = (Key, a)
type Item (Seq a) 
Instance details

Defined in Data.Sequence.Internal

type Item (Seq a) = a
type Item (Set a) 
Instance details

Defined in Data.Set.Internal

type Item (Set a) = a
type Item (DList a) 
Instance details

Defined in Data.DList.Internal

type Item (DList a) = a
type Item (Array a) 
Instance details

Defined in Data.Primitive.Array

type Item (Array a) = a
type Item (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

type Item (PrimArray a) = a
type Item (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

type Item (SmallArray a) = a
type Item (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

type Item (HashSet a) = a
type Item (Vector a) 
Instance details

Defined in Data.Vector

type Item (Vector a) = a
type Item (Vector a) 
Instance details

Defined in Data.Vector.Primitive

type Item (Vector a) = a
type Item (Vector a) 
Instance details

Defined in Data.Vector.Storable

type Item (Vector a) = a
type Item (Vector e) 
Instance details

Defined in Data.Vector.Unboxed

type Item (Vector e) = e
type Item (NonEmpty a) 
Instance details

Defined in GHC.Exts

type Item (NonEmpty a) = a
type Item [a] 
Instance details

Defined in GHC.Exts

type Item [a] = a
type Item (Map k v) 
Instance details

Defined in Data.Map.Internal

type Item (Map k v) = (k, v)
type Item (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

type Item (HashMap k v) = (k, v)

sortWith :: Ord b => (a -> b) -> [a] -> [a] #

The sortWith function sorts a list of elements using the user supplied function to project something out of each element

data Fixity #

Fixity of constructors

Constructors

Prefix 
Infix 

Instances

Instances details
Show Fixity

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Eq Fixity

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

(==) :: Fixity -> Fixity -> Bool #

(/=) :: Fixity -> Fixity -> Bool #

data DataType #

Representation of datatypes. A package of constructor representations with names of type and module.

Instances

Instances details
Show DataType

Since: base-4.0.0.0

Instance details

Defined in Data.Data

data DataRep #

Public representation of datatypes

Instances

Instances details
Show DataRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Eq DataRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

(==) :: DataRep -> DataRep -> Bool #

(/=) :: DataRep -> DataRep -> Bool #

data ConstrRep #

Public representation of constructors

Instances

Instances details
Show ConstrRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Eq ConstrRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

data Constr #

Representation of constructors. Note that equality on constructors with different types may not work -- i.e. the constructors for False and Nothing may compare equal.

Instances

Instances details
Show Constr

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Eq Constr

Equality of constructors

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

(==) :: Constr -> Constr -> Bool #

(/=) :: Constr -> Constr -> Bool #

type ConIndex = Int #

Unique index for datatype constructors, counting from 1 in the order they are given in the program text.

tyconUQname :: String -> String #

Gets the unqualified type constructor: drop *.*.*... before name

tyconModule :: String -> String #

Gets the module of a type constructor: take *.*.*... before name

showConstr :: Constr -> String #

Gets the string for a constructor

repConstr :: DataType -> ConstrRep -> Constr #

Look up a constructor by its representation

readConstr :: DataType -> String -> Maybe Constr #

Lookup a constructor via a string

mkRealConstr :: (Real a, Show a) => DataType -> a -> Constr #

mkNoRepType :: String -> DataType #

Constructs a non-representation for a non-representable type

mkIntType :: String -> DataType #

Constructs the Int type

mkFloatType :: String -> DataType #

Constructs the Float type

mkDataType :: String -> [Constr] -> DataType #

Constructs an algebraic datatype

mkConstrTag :: DataType -> String -> Int -> [String] -> Fixity -> Constr #

Constructs a constructor

mkConstr :: DataType -> String -> [String] -> Fixity -> Constr #

Constructs a constructor

mkCharType :: String -> DataType #

Constructs the Char type

mkCharConstr :: DataType -> Char -> Constr #

Makes a constructor for Char.

maxConstrIndex :: DataType -> ConIndex #

Gets the maximum constructor index of an algebraic datatype

isNorepType :: DataType -> Bool #

Test for a non-representable type

isAlgType :: DataType -> Bool #

Test for an algebraic type

indexConstr :: DataType -> ConIndex -> Constr #

Gets the constructor for an index (algebraic datatypes only)

fromConstrM :: (Monad m, Data a) => (forall d. Data d => m d) -> Constr -> m a #

Monadic variation on fromConstrB

fromConstrB :: Data a => (forall d. Data d => d) -> Constr -> a #

Build a term and use a generic function for subterms

fromConstr :: Data a => Constr -> a #

Build a term skeleton

dataTypeRep :: DataType -> DataRep #

Gets the public presentation of a datatype

dataTypeName :: DataType -> String #

Gets the type constructor including the module

dataTypeConstrs :: DataType -> [Constr] #

Gets the constructors of an algebraic datatype

constrType :: Constr -> DataType #

Gets the datatype of a constructor

constrRep :: Constr -> ConstrRep #

Gets the public presentation of constructors

constrIndex :: Constr -> ConIndex #

Gets the index of a constructor (algebraic datatypes only)

constrFixity :: Constr -> Fixity #

Gets the fixity of a constructor

constrFields :: Constr -> [String] #

Gets the field labels of a constructor. The list of labels is returned in the same order as they were given in the original constructor declaration.

data Timeout #

An exception thrown to a thread by timeout to interrupt a timed-out computation.

Since: base-4.0

Instances

Instances details
Exception Timeout

Since: base-4.7.0.0

Instance details

Defined in System.Timeout

Show Timeout

Since: base-4.0

Instance details

Defined in System.Timeout

Eq Timeout 
Instance details

Defined in System.Timeout

Methods

(==) :: Timeout -> Timeout -> Bool #

(/=) :: Timeout -> Timeout -> Bool #

timeout :: Int -> IO a -> IO (Maybe a) #

Wrap an IO computation to time out and return Nothing in case no result is available within n microseconds (1/10^6 seconds). In case a result is available before the timeout expires, Just a is returned. A negative timeout interval means "wait indefinitely". When specifying long timeouts, be careful not to exceed maxBound :: Int.

>>> timeout 1000000 (threadDelay 1000 *> pure "finished on time")
Just "finished on time"
>>> timeout 10000 (threadDelay 100000 *> pure "finished on time")
Nothing

The design of this combinator was guided by the objective that timeout n f should behave exactly the same as f as long as f doesn't time out. This means that f has the same myThreadId it would have without the timeout wrapper. Any exceptions f might throw cancel the timeout and propagate further up. It also possible for f to receive exceptions thrown to it by another thread.

A tricky implementation detail is the question of how to abort an IO computation. This combinator relies on asynchronous exceptions internally (namely throwing the computation the Timeout exception). The technique works very well for computations executing inside of the Haskell runtime system, but it doesn't work at all for non-Haskell code. Foreign function calls, for example, cannot be timed out with this combinator simply because an arbitrary C function cannot receive asynchronous exceptions. When timeout is used to wrap an FFI call that blocks, no timeout event can be delivered until the FFI call returns, which pretty much negates the purpose of the combinator. In practice, however, this limitation is less severe than it may sound. Standard I/O functions like hGetBuf, hPutBuf, Network.Socket.accept, or hWaitForInput appear to be blocking, but they really don't because the runtime system uses scheduling mechanisms like select(2) to perform asynchronous I/O, so it is possible to interrupt standard socket I/O or file I/O using this combinator.

threadWaitWriteSTM :: Fd -> IO (STM (), IO ()) #

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

threadWaitWrite :: Fd -> IO () #

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.

threadWaitReadSTM :: Fd -> IO (STM (), IO ()) #

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

threadWaitRead :: Fd -> IO () #

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 #

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 #

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.

rtsSupportsBoundThreads :: Bool #

True if bound threads are supported. If rtsSupportsBoundThreads is False, isCurrentThreadBound will always return False and both forkOS and runInBoundThread will fail.

isCurrentThreadBound :: IO Bool #

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 #

Like forkIOWithUnmask, but the child thread is a bound thread, as with forkOS.

forkOS :: IO () -> IO ThreadId #

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.

forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId #

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

data Chan a #

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

Methods

(==) :: Chan a -> Chan a -> Bool #

(/=) :: Chan a -> Chan a -> Bool #

writeList2Chan :: Chan a -> [a] -> IO () #

Write an entire list of items to a Chan.

writeChan :: Chan a -> a -> IO () #

Write a value to a Chan.

readChan :: Chan a -> IO a #

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 MVars (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.

newChan :: IO (Chan a) #

Build and returns a new instance of Chan.

getChanContents :: Chan a -> IO [a] #

Return a lazy list representing the contents of the supplied Chan, much like hGetContents.

dupChan :: Chan a -> IO (Chan a) #

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.)

data QSem #

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.

waitQSem :: QSem -> IO () #

Wait for a unit to become available

signalQSem :: QSem -> IO () #

Signal that a unit of the QSem is available

newQSem :: Int -> IO QSem #

Build a new QSem with a supplied initial quantity. The initial quantity must be at least 0.

data QSemN #

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.

waitQSemN :: QSemN -> Int -> IO () #

Wait for the specified quantity to become available

signalQSemN :: QSemN -> Int -> IO () #

Signal that a given quantity is now available from the QSemN.

newQSemN :: Int -> IO QSemN #

Build a new QSemN with a supplied initial quantity. The initial quantity must be at least 0.

class Monad m => MonadIO (m :: Type -> Type) where #

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 #

Lift a computation from the IO monad. This allows us to run IO computations in any monadic stack, so long as it supports these kinds of operations (i.e. IO is the base monad for the stack).

Example

Expand
import Control.Monad.Trans.State -- from the "transformers" library

printState :: Show s => StateT s IO ()
printState = do
  state <- get
  liftIO $ print state

Had we omitted liftIO, we would have ended up with this error:

• Couldn't match type ‘IO’ with ‘StateT s IO’
 Expected type: StateT s IO ()
   Actual type: IO ()

The important part here is the mismatch between StateT s IO () and IO ().

Luckily, we know of a function that takes an IO a and returns an (m a): liftIO, enabling us to run the program and see the expected results:

> evalStateT printState "hello"
"hello"

> evalStateT printState 3
3

Instances

Instances details
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a #

(Functor f, MonadIO m) => MonadIO (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftIO :: IO a -> FreeT f m a #

(Error e, MonadIO m) => MonadIO (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftIO :: IO a -> ErrorT e m a #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a #

MonadIO m => MonadIO (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftIO :: IO a -> IdentityT m a #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

liftIO :: IO a -> StateT s m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftIO :: IO a -> WriterT w m a #

MonadIO m => MonadIO (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

liftIO :: IO a -> ContT r m a #

(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 #

(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 #

approxRational :: RealFrac a => a -> a -> Rational #

approxRational, applied to two real fractional numbers x and epsilon, returns the simplest rational number within epsilon of x. A rational number y is said to be simpler than another y' if

Any real interval contains a unique simplest rational; in particular, note that 0/1 is the simplest rational of all.

modifySTRef' :: STRef s a -> (a -> a) -> ST s () #

Strict version of modifySTRef

Since: base-4.6.0.0

modifySTRef :: STRef s a -> (a -> a) -> ST s () #

Mutate the contents of an STRef.

>>> :{
runST (do
    ref <- newSTRef ""
    modifySTRef ref (const "world")
    modifySTRef ref (++ "!")
    modifySTRef ref ("Hello, " ++)
    readSTRef ref )
:}
"Hello, world!"

Be warned that modifySTRef does not apply the function strictly. This means if the program calls modifySTRef many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. This is a common mistake made when using an STRef as a counter. For example, the following will leak memory and may produce a stack overflow:

>>> import Control.Monad (replicateM_)
>>> :{
print (runST (do
    ref <- newSTRef 0
    replicateM_ 1000 $ modifySTRef ref (+1)
    readSTRef ref ))
:}
1000

To avoid this problem, use modifySTRef' instead.

data Unique #

An abstract unique object. Objects of type Unique may be compared for equality and ordering and hashed into Int.

>>> :{
do x <- newUnique
   print (x == x)
   y <- newUnique
   print (x == y)
:}
True
False

Instances

Instances details
NFData Unique

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Unique -> () #

Eq Unique 
Instance details

Defined in Data.Unique

Methods

(==) :: Unique -> Unique -> Bool #

(/=) :: Unique -> Unique -> Bool #

Ord Unique 
Instance details

Defined in Data.Unique

Hashable Unique 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Unique -> Int #

hash :: Unique -> Int #

newUnique :: IO Unique #

Creates a new object of type Unique. The value returned will not compare equal to any other value of type Unique returned by previous calls to newUnique. There is no limit on the number of times newUnique may be called.

hashUnique :: Unique -> Int #

Hashes a Unique into an Int. Two Uniques may hash to the same value, although in practice this is unlikely. The Int returned makes a good hash key.

class IsLabel (x :: Symbol) a where #

Methods

fromLabel :: a #

data StableName a #

An abstract name for an object, that supports equality and hashing.

Stable names have the following property:

  • If sn1 :: StableName and sn2 :: StableName and sn1 == sn2 then sn1 and sn2 were created by calls to makeStableName on the same object.

The reverse is not necessarily true: if two stable names are not equal, then the objects they name may still be equal. Note in particular that makeStableName may return a different StableName after an object is evaluated.

Stable Names are similar to Stable Pointers (Foreign.StablePtr), but differ in the following ways:

  • There is no freeStableName operation, unlike Foreign.StablePtrs. Stable names are reclaimed by the runtime system when they are no longer needed.
  • There is no deRefStableName operation. You can't get back from a stable name to the original Haskell object. The reason for this is that the existence of a stable name for an object does not guarantee the existence of the object itself; it can still be garbage collected.

Instances

Instances details
NFData1 StableName

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> StableName a -> () #

NFData (StableName a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: StableName a -> () #

Eq (StableName a)

Since: base-2.1

Instance details

Defined in GHC.StableName

Methods

(==) :: StableName a -> StableName a -> Bool #

(/=) :: StableName a -> StableName a -> Bool #

Hashable (StableName a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> StableName a -> Int #

hash :: StableName a -> Int #

makeStableName :: a -> IO (StableName a) #

Makes a StableName for an arbitrary object. The object passed as the first argument is not evaluated by makeStableName.

hashStableName :: StableName a -> Int #

Convert a StableName to an Int. The Int returned is not necessarily unique; several StableNames may map to the same Int (in practice however, the chances of this are small, so the result of hashStableName makes a good hash key).

eqStableName :: StableName a -> StableName b -> Bool #

Equality on StableName that does not require that the types of the arguments match.

Since: base-4.7.0.0

withProgName :: String -> IO a -> IO a #

withProgName name act - while executing action act, have getProgName return name.

withArgs :: [String] -> IO a -> IO a #

withArgs args act - while executing action act, have getArgs return args.

unsetEnv :: String -> IO () #

unsetEnv name removes the specified environment variable from the environment of the current process.

Throws IOException if name is the empty string or contains an equals sign.

Since: base-4.7.0.0

setEnv :: String -> String -> IO () #

setEnv name value sets the specified environment variable to value.

Early versions of this function operated under the mistaken belief that setting an environment variable to the empty string on Windows removes that environment variable from the environment. For the sake of compatibility, it adopted that behavior on POSIX. In particular

setEnv name ""

has the same effect as

unsetEnv name

If you'd like to be able to set environment variables to blank strings, use setEnv.

Throws IOException if name is the empty string or contains an equals sign.

Since: base-4.7.0.0

lookupEnv :: String -> IO (Maybe String) #

Return the value of the environment variable var, or Nothing if there is no such value.

For POSIX users, this is equivalent to getEnv.

Since: base-4.6.0.0

getProgName :: IO String #

Computation getProgName returns the name of the program as it was invoked.

However, this is hard-to-impossible to implement on some non-Unix OSes, so instead, for maximum portability, we just return the leafname of the program as invoked. Even then there are some differences between platforms: on Windows, for example, a program invoked as foo is probably really FOO.EXE, and that is what getProgName will return.

getEnvironment :: IO [(String, String)] #

getEnvironment retrieves the entire environment as a list of (key,value) pairs.

If an environment entry does not contain an '=' character, the key is the whole entry and the value is the empty string.

getEnv :: String -> IO String #

Computation getEnv var returns the value of the environment variable var. For the inverse, the setEnv function can be used.

This computation may fail with:

getArgs :: IO [String] #

Computation getArgs returns a list of the program's command line arguments (not including the program name).

getExecutablePath :: IO FilePath #

Returns the absolute pathname of the current executable.

Note that for scripts and interactive sessions, this is the path to the interpreter (e.g. ghci.)

Since base 4.11.0.0, getExecutablePath resolves symlinks on Windows. If an executable is launched through a symlink, getExecutablePath returns the absolute path of the original executable.

Since: base-4.6.0.0

exitWith :: ExitCode -> IO a #

Computation exitWith code throws ExitCode code. Normally this terminates the program, returning code to the program's caller.

On program termination, the standard Handles stdout and stderr are flushed automatically; any other buffered Handles 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 IOException, 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.

exitSuccess :: IO a #

The computation exitSuccess is equivalent to exitWith ExitSuccess, It terminates the program successfully.

exitFailure :: IO a #

The computation exitFailure is equivalent to exitWith (ExitFailure exitfail), where exitfail is implementation-dependent.

die :: String -> IO a #

Write given error message to stderr and terminate with exitFailure.

Since: base-4.8.0.0

performMinorGC :: IO () #

Triggers an immediate minor garbage collection.

Since: base-4.7.0.0

performMajorGC :: IO () #

Triggers an immediate major garbage collection.

Since: base-4.7.0.0

performGC :: IO () #

Triggers an immediate major garbage collection.

printf :: PrintfType r => String -> r #

Format a variable number of arguments with the C-style formatting string.

>>> printf "%s, %d, %.4f" "hello" 123 pi
hello, 123, 3.1416

The return value is either String or (IO a) (which should be (IO ()), but Haskell's type system makes this hard).

The format string consists of ordinary characters and conversion specifications, which specify how to format one of the arguments to printf in the output string. A format specification is introduced by the % character; this character can be self-escaped into the format string using %%. A format specification ends with a format character that provides the primary information about how to format the value. The rest of the conversion specification is optional. In order, one may have flag characters, a width specifier, a precision specifier, and type-specific modifier characters.

Unlike C printf(3), the formatting of this printf is driven by the argument type; formatting is type specific. The types formatted by printf "out of the box" are:

printf is also extensible to support other types: see below.

A conversion specification begins with the character %, followed by zero or more of the following flags:

-      left adjust (default is right adjust)
+      always use a sign (+ or -) for signed conversions
space  leading space for positive numbers in signed conversions
0      pad with zeros rather than spaces
#      use an \"alternate form\": see below

When both flags are given, - overrides 0 and + overrides space. A negative width specifier in a * conversion is treated as positive but implies the left adjust flag.

The "alternate form" for unsigned radix conversions is as in C printf(3):

%o           prefix with a leading 0 if needed
%x           prefix with a leading 0x if nonzero
%X           prefix with a leading 0X if nonzero
%b           prefix with a leading 0b if nonzero
%[eEfFgG]    ensure that the number contains a decimal point

Any flags are followed optionally by a field width:

num    field width
*      as num, but taken from argument list

The field width is a minimum, not a maximum: it will be expanded as needed to avoid mutilating a value.

Any field width is followed optionally by a precision:

.num   precision
.      same as .0
.*     as num, but taken from argument list

Negative precision is taken as 0. The meaning of the precision depends on the conversion type.

Integral    minimum number of digits to show
RealFloat   number of digits after the decimal point
String      maximum number of characters

The precision for Integral types is accomplished by zero-padding. If both precision and zero-pad are given for an Integral field, the zero-pad is ignored.

Any precision is followed optionally for Integral types by a width modifier; the only use of this modifier being to set the implicit size of the operand for conversion of a negative operand to unsigned:

hh     Int8
h      Int16
l      Int32
ll     Int64
L      Int64

The specification ends with a format character:

c      character               Integral
d      decimal                 Integral
o      octal                   Integral
x      hexadecimal             Integral
X      hexadecimal             Integral
b      binary                  Integral
u      unsigned decimal        Integral
f      floating point          RealFloat
F      floating point          RealFloat
g      general format float    RealFloat
G      general format float    RealFloat
e      exponent format float   RealFloat
E      exponent format float   RealFloat
s      string                  String
v      default format          any type

The "%v" specifier is provided for all built-in types, and should be provided for user-defined type formatters as well. It picks a "best" representation for the given type. For the built-in types the "%v" specifier is converted as follows:

c      Char
u      other unsigned Integral
d      other signed Integral
g      RealFloat
s      String

Mismatch between the argument types and the format string, as well as any other syntactic or semantic errors in the format string, will cause an exception to be thrown at runtime.

Note that the formatting for RealFloat types is currently a bit different from that of C printf(3), conforming instead to showEFloat, showFFloat and showGFloat (and their alternate versions showFFloatAlt and showGFloatAlt). This is hard to fix: the fixed versions would format in a backward-incompatible way. In any case the Haskell behavior is generally more sensible than the C behavior. A brief summary of some key differences:

  • Haskell printf never uses the default "6-digit" precision used by C printf.
  • Haskell printf treats the "precision" specifier as indicating the number of digits after the decimal point.
  • Haskell printf prints the exponent of e-format numbers without a gratuitous plus sign, and with the minimum possible number of digits.
  • Haskell printf will place a zero after a decimal point when possible.

hPrintf :: HPrintfType r => Handle -> String -> r #

Similar to printf, except that output is via the specified Handle. The return type is restricted to (IO a).

zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () #

zipWithM_ is the extension of zipWithM which ignores the final result.

zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] #

The zipWithM function generalizes zipWith to arbitrary applicative functors.

unless :: Applicative f => Bool -> f () -> f () #

The reverse of when.

replicateM_ :: Applicative m => Int -> m a -> m () #

Like replicateM, but discards the result.

Examples

Expand
>>> replicateM_ 3 (putStrLn "a")
a
a
a

replicateM :: Applicative m => Int -> m a -> m [a] #

replicateM n act performs the action act n times, and then returns the list of results:

Examples

Expand
>>> import Control.Monad.State
>>> runState (replicateM 3 $ state $ \s -> (s, s + 1)) 1
([1,2,3],4)

mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a #

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

mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #

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 #

Repeat an action indefinitely.

Examples

Expand

A common use of forever is to process input from network sockets, Handles, 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

Note that "forever" isn't necessarily non-terminating. If the action is in a MonadPlus and short-circuits after some number of iterations. then forever actually returns mzero, effectively short-circuiting its caller.

foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m () #

Like foldM, but discards the result.

foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b #

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

filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a] #

This generalizes the list-based filter function.

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 #

Left-to-right composition of Kleisli arrows.

'(bs >=> cs) a' can be understood as the do expression

do b <- bs a
   cs b

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 #

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 -> b) -> m a -> m b infixl 4 #

Strict version of <$>.

Since: base-4.8.0.0

showVersion :: Version -> String #

Provides one possible concrete representation for Version. For a version with versionBranch = [1,2,3] and versionTags = ["tag1","tag2"], the output will be 1.2.3-tag1-tag2.

parseVersion :: ReadP Version #

A parser for versions in the format produced by showVersion.

traceStack :: String -> a -> a #

like trace, but additionally prints a call stack if one is available.

In the current GHC implementation, the call stack is only available if the program was compiled with -prof; otherwise traceStack behaves exactly like trace. Entries in the call stack correspond to SCC annotations, so it is a good idea to use -fprof-auto or -fprof-auto-calls to add SCC annotations automatically.

Since: base-4.5.0.0

traceShowM :: (Show a, Applicative f) => a -> f () #

Like traceM, but uses show on the argument to convert it to a String.

>>> :{
do
    x <- Just 3
    traceShowM x
    y <- pure 12
    traceShowM y
    pure (x*2 + y)
:}
3
12
Just 18

Since: base-4.7.0.0

traceShowId :: Show a => a -> a #

Like traceShow but returns the shown value instead of a third value.

>>> traceShowId (1+2+3, "hello" ++ "world")
(6,"helloworld")
(6,"helloworld")

Since: base-4.7.0.0

traceShow :: Show a => a -> b -> b #

Like trace, but uses show on the argument to convert it to a String.

This makes it convenient for printing the values of interesting variables or expressions inside a function. For example here we print the value of the variables x and y:

>>> let f x y = traceShow (x,y) (x + y) in f (1+2) 5
(3,5)
8

traceMarkerIO :: String -> IO () #

The traceMarkerIO function emits a marker to the eventlog, if eventlog profiling is available and enabled at runtime.

Compared to traceMarker, traceMarkerIO sequences the event with respect to other IO actions.

Since: base-4.7.0.0

traceMarker :: String -> a -> a #

The traceMarker function emits a marker to the eventlog, if eventlog profiling is available and enabled at runtime. The String is the name of the marker. The name is just used in the profiling tools to help you keep clear which marker is which.

This function is suitable for use in pure code. In an IO context use traceMarkerIO instead.

Note that when using GHC's SMP runtime, it is possible (but rare) to get duplicate events emitted if two CPUs simultaneously evaluate the same thunk that uses traceMarker.

Since: base-4.7.0.0

traceM :: Applicative f => String -> f () #

Like trace but returning unit in an arbitrary Applicative context. Allows for convenient use in do-notation.

Note that the application of traceM is not an action in the Applicative context, as traceIO is in the IO type. While the fresh bindings in the following example will force the traceM expressions to be reduced every time the do-block is executed, traceM "not crashed" would only be reduced once, and the message would only be printed once. If your monad is in MonadIO, liftIO . traceIO may be a better option.

>>> :{
do
    x <- Just 3
    traceM ("x: " ++ show x)
    y <- pure 12
    traceM ("y: " ++ show y)
    pure (x*2 + y)
:}
x: 3
y: 12
Just 18

Since: base-4.7.0.0

traceId :: String -> String #

Like trace but returns the message instead of a third value.

>>> traceId "hello"
hello
"hello"

Since: base-4.7.0.0

traceIO :: String -> IO () #

The traceIO function outputs the trace message from the IO monad. This sequences the output with respect to other IO actions.

Since: base-4.5.0.0

traceEventIO :: String -> IO () #

The traceEventIO function emits a message to the eventlog, if eventlog profiling is available and enabled at runtime.

Compared to traceEvent, traceEventIO sequences the event with respect to other IO actions.

Since: base-4.5.0.0

traceEvent :: String -> a -> a #

The traceEvent function behaves like trace with the difference that the message is emitted to the eventlog, if eventlog profiling is available and enabled at runtime.

It is suitable for use in pure code. In an IO context use traceEventIO instead.

Note that when using GHC's SMP runtime, it is possible (but rare) to get duplicate events emitted if two CPUs simultaneously evaluate the same thunk that uses traceEvent.

Since: base-4.5.0.0

putTraceMsg :: String -> IO () #

 

flushEventLog :: IO () #

Immediately flush the event log, if enabled.

Since: base-4.15.0.0

isSubsequenceOf :: Eq a => [a] -> [a] -> Bool #

The isSubsequenceOf function takes two lists and returns True if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively.

isSubsequenceOf x y is equivalent to elem x (subsequences y).

Examples

Expand
>>> isSubsequenceOf "GHC" "The Glorious Haskell Compiler"
True
>>> isSubsequenceOf ['a','d'..'z'] ['a'..'z']
True
>>> isSubsequenceOf [1..10] [10,9..0]
False

Since: base-4.8.0.0

mapAccumR :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b) #

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.

Examples

Expand

Basic usage:

>>> mapAccumR (\a b -> (a + b, a)) 0 [1..10]
(55,[54,52,49,45,40,34,27,19,10,0])
>>> mapAccumR (\a b -> (a <> show b, a)) "0" [1..5]
("054321",["05432","0543","054","05","0"])

mapAccumL :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b) #

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.

Examples

Expand

Basic usage:

>>> mapAccumL (\a b -> (a + b, a)) 0 [1..10]
(55,[0,1,3,6,10,15,21,28,36,45])
>>> mapAccumL (\a b -> (a <> show b, a)) "0" [1..5]
("012345",["0","01","012","0123","01234"])

forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) #

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) #

for is traverse with its arguments flipped. For a version that ignores the results see for_.

foldMapDefault :: (Traversable t, Monoid m) => (a -> m) -> t a -> m #

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 #

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)

newtype ZipList a #

Lists, but with an Applicative functor based on zipping.

Constructors

ZipList 

Fields

Instances

Instances details
Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Methods

fold :: Monoid m => ZipList m -> m #

foldMap :: Monoid m => (a -> m) -> ZipList a -> m #

foldMap' :: Monoid m => (a -> m) -> ZipList a -> m #

foldr :: (a -> b -> b) -> b -> ZipList a -> b #

foldr' :: (a -> b -> b) -> b -> ZipList a -> b #

foldl :: (b -> a -> b) -> b -> ZipList a -> b #

foldl' :: (b -> a -> b) -> b -> ZipList a -> b #

foldr1 :: (a -> a -> a) -> ZipList a -> a #

foldl1 :: (a -> a -> a) -> ZipList a -> a #

toList :: ZipList a -> [a] #

null :: ZipList a -> Bool #

length :: ZipList a -> Int #

elem :: Eq a => a -> ZipList a -> Bool #

maximum :: Ord a => ZipList a -> a #

minimum :: Ord a => ZipList a -> a #

sum :: Num a => ZipList a -> a #

product :: Num a => ZipList a -> a #

Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) #

sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) #

mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) #

sequence :: Monad m => ZipList (m a) -> m (ZipList a) #

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Methods

empty :: ZipList a #

(<|>) :: ZipList a -> ZipList a -> ZipList a #

some :: ZipList a -> ZipList [a] #

many :: ZipList a -> ZipList [a] #

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

Methods

pure :: a -> ZipList a #

(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

(*>) :: ZipList a -> ZipList b -> ZipList b #

(<*) :: ZipList a -> ZipList b -> ZipList a #

Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> ZipList a -> ZipList b #

(<$) :: a -> ZipList b -> ZipList a #

NFData1 ZipList

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> ZipList a -> () #

Invariant ZipList

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ZipList a -> ZipList b #

Adjustable ZipList 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key ZipList -> ZipList a -> ZipList a #

replace :: Key ZipList -> a -> ZipList a -> ZipList a #

FoldableWithKey ZipList 
Instance details

Defined in Data.Key

Methods

toKeyedList :: ZipList a -> [(Key ZipList, a)] #

foldMapWithKey :: Monoid m => (Key ZipList -> a -> m) -> ZipList a -> m #

foldrWithKey :: (Key ZipList -> a -> b -> b) -> b -> ZipList a -> b #

foldlWithKey :: (b -> Key ZipList -> a -> b) -> b -> ZipList a -> b #

Indexable ZipList 
Instance details

Defined in Data.Key

Methods

index :: ZipList a -> Key ZipList -> a #

Keyed ZipList 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key ZipList -> a -> b) -> ZipList a -> ZipList b #

Lookup ZipList 
Instance details

Defined in Data.Key

Methods

lookup :: Key ZipList -> ZipList a -> Maybe a #

TraversableWithKey ZipList 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key ZipList -> a -> f b) -> ZipList a -> f (ZipList b) #

mapWithKeyM :: Monad m => (Key ZipList -> a -> m b) -> ZipList a -> m (ZipList b) #

Zip ZipList 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

zip :: ZipList a -> ZipList b -> ZipList (a, b) #

zap :: ZipList (a -> b) -> ZipList a -> ZipList b #

ZipWithKey ZipList 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key ZipList -> a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

zapWithKey :: ZipList (Key ZipList -> a -> b) -> ZipList a -> ZipList b #

Selective ZipList 
Instance details

Defined in Control.Selective

Methods

select :: ZipList (Either a b) -> ZipList (a -> b) -> ZipList b #

Apply ZipList 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

(.>) :: ZipList a -> ZipList b -> ZipList b #

(<.) :: ZipList a -> ZipList b -> ZipList a #

liftF2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

Generic1 ZipList 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 ZipList :: k -> Type #

Methods

from1 :: forall (a :: k). ZipList a -> Rep1 ZipList a #

to1 :: forall (a :: k). Rep1 ZipList a -> ZipList a #

Data a => Data (ZipList a)

Since: base-4.14.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZipList a -> c (ZipList a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ZipList a) #

toConstr :: ZipList a -> Constr #

dataTypeOf :: ZipList a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ZipList a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ZipList a)) #

gmapT :: (forall b. Data b => b -> b) -> ZipList a -> ZipList a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r #

gmapQ :: (forall d. Data d => d -> u) -> ZipList a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ZipList a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) #

IsList (ZipList a)

Since: base-4.15.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item (ZipList a) #

Methods

fromList :: [Item (ZipList a)] -> ZipList a #

fromListN :: Int -> [Item (ZipList a)] -> ZipList a #

toList :: ZipList a -> [Item (ZipList a)] #

Generic (ZipList a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (ZipList a) :: Type -> Type #

Methods

from :: ZipList a -> Rep (ZipList a) x #

to :: Rep (ZipList a) x -> ZipList a #

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

Methods

showsPrec :: Int -> ZipList a -> ShowS #

show :: ZipList a -> String #

showList :: [ZipList a] -> ShowS #

NFData a => NFData (ZipList a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ZipList a -> () #

Eq a => Eq (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(==) :: ZipList a -> ZipList a -> Bool #

(/=) :: ZipList a -> ZipList a -> Bool #

Ord a => Ord (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

compare :: ZipList a -> ZipList a -> Ordering #

(<) :: ZipList a -> ZipList a -> Bool #

(<=) :: ZipList a -> ZipList a -> Bool #

(>) :: ZipList a -> ZipList a -> Bool #

(>=) :: ZipList a -> ZipList a -> Bool #

max :: ZipList a -> ZipList a -> ZipList a #

min :: ZipList a -> ZipList a -> ZipList a #

type Key ZipList 
Instance details

Defined in Data.Key

type Key ZipList = Int
type Rep1 ZipList

Since: base-4.7.0.0

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 [])))
type Item (ZipList a) 
Instance details

Defined in GHC.Exts

type Item (ZipList a) = a
type Rep (ZipList a)

Since: base-4.7.0.0

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])))

newtype WrappedMonad (m :: Type -> Type) a #

Constructors

WrapMonad 

Fields

Instances

Instances details
Generic1 (WrappedMonad m :: Type -> Type) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedMonad m) :: k -> Type #

Methods

from1 :: forall (a :: k). WrappedMonad m a -> Rep1 (WrappedMonad m) a #

to1 :: forall (a :: k). Rep1 (WrappedMonad m) a -> WrappedMonad m a #

MonadPlus m => Alternative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedMonad m a #

(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a #

some :: WrappedMonad m a -> WrappedMonad m [a] #

many :: WrappedMonad m a -> WrappedMonad m [a] #

Monad m => Applicative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

Monad m => Functor (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

(<$) :: a -> WrappedMonad m b -> WrappedMonad m a #

Monad m => Monad (WrappedMonad m)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #

(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

return :: a -> WrappedMonad m a #

Monad m => Invariant (WrappedMonad m)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedMonad m a -> WrappedMonad m b #

MonadPlus m => Alt (WrappedMonad m) 
Instance details

Defined in Data.Functor.Alt

Monad m => Apply (WrappedMonad m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

(.>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<.) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

liftF2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

Monad m => Bind (WrappedMonad m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #

join :: WrappedMonad m (WrappedMonad m a) -> WrappedMonad m a #

MonadPlus m => Plus (WrappedMonad m) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: WrappedMonad m a #

(Typeable m, Typeable a, Data (m a)) => Data (WrappedMonad m a)

Since: base-4.14.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonad m a -> c (WrappedMonad m a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonad m a) #

toConstr :: WrappedMonad m a -> Constr #

dataTypeOf :: WrappedMonad m a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonad m a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonad m a)) #

gmapT :: (forall b. Data b => b -> b) -> WrappedMonad m a -> WrappedMonad m a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r #

gmapQ :: (forall d. Data d => d -> u) -> WrappedMonad m a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonad m a -> u #

gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) #

gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) #

gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) #

Generic (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedMonad m a) :: Type -> Type #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a #

type Rep1 (WrappedMonad m :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

type Rep1 (WrappedMonad m :: Type -> Type) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m)))
type Rep (WrappedMonad m a)

Since: base-4.7.0.0

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))))

newtype WrappedArrow (a :: Type -> Type -> Type) b c #

Constructors

WrapArrow 

Fields

Instances

Instances details
Generic1 (WrappedArrow a b :: Type -> Type) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedArrow a b) :: k -> Type #

Methods

from1 :: forall (a0 :: k). WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0 #

to1 :: forall (a0 :: k). Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0 #

Arrow arr => Invariant2 (WrappedArrow arr)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedArrow arr a b -> WrappedArrow arr c d #

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Arrow a => Applicative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Arrow a => Functor (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Arrow arr => Invariant (WrappedArrow arr a)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> WrappedArrow arr a a0 -> WrappedArrow arr a b #

ArrowPlus a => Alt (WrappedArrow a b) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: Applicative (WrappedArrow a b) => WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: Applicative (WrappedArrow a b) => WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Arrow a => Apply (WrappedArrow a b) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

(.>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<.) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

liftF2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

ArrowPlus a => Plus (WrappedArrow a b) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: WrappedArrow a b a0 #

(Typeable a, Typeable b, Typeable c, Data (a b c)) => Data (WrappedArrow a b c)

Since: base-4.14.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c0 (d -> b0) -> d -> c0 b0) -> (forall g. g -> c0 g) -> WrappedArrow a b c -> c0 (WrappedArrow a b c) #

gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (WrappedArrow a b c) #

toConstr :: WrappedArrow a b c -> Constr #

dataTypeOf :: WrappedArrow a b c -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (WrappedArrow a b c)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (WrappedArrow a b c)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> WrappedArrow a b c -> WrappedArrow a b c #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r #

gmapQ :: (forall d. Data d => d -> u) -> WrappedArrow a b c -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedArrow a b c -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) #

Generic (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedArrow a b c) :: Type -> Type #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c #

type Rep1 (WrappedArrow a b :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

type Rep1 (WrappedArrow a b :: Type -> Type) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (a b))))
type Rep (WrappedArrow a b c)

Since: base-4.7.0.0

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))))

optional :: Alternative f => f a -> f (Maybe a) #

One or none.

It is useful for modelling any computation that is allowed to fail.

Examples

Expand

Using the Alternative instance of Control.Monad.Except, the following functions:

>>> import Control.Monad.Except
>>> canFail = throwError "it failed" :: Except String Int
>>> final = return 42                :: Except String Int

Can be combined by allowing the first function to fail:

>>> runExcept $ canFail *> final
Left "it failed"
>>> runExcept $ optional canFail *> final
Right 42

newtype Kleisli (m :: Type -> Type) a b #

Kleisli arrows of a monad.

Constructors

Kleisli 

Fields

Instances

Instances details
Monad m => Category (Kleisli m :: Type -> Type -> TYPE LiftedRep)

Since: base-3.0

Instance details

Defined in Control.Arrow

Methods

id :: forall (a :: k). Kleisli m a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Kleisli m b c -> Kleisli m a b -> Kleisli m a c #

Bind m => Semigroupoid (Kleisli m :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Kleisli m j k1 -> Kleisli m i j -> Kleisli m i k1 #

(Bind m, Monad m) => Ob (Kleisli m :: Type -> Type -> TYPE LiftedRep) (a :: Type) 
Instance details

Defined in Data.Semigroupoid.Ob

Methods

semiid :: Kleisli m a a #

Generic1 (Kleisli m a :: Type -> TYPE LiftedRep) 
Instance details

Defined in Control.Arrow

Associated Types

type Rep1 (Kleisli m a) :: k -> Type #

Methods

from1 :: forall (a0 :: k). Kleisli m a a0 -> Rep1 (Kleisli m a) a0 #

to1 :: forall (a0 :: k). Rep1 (Kleisli m a) a0 -> Kleisli m a a0 #

Monad m => Arrow (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

arr :: (b -> c) -> Kleisli m b c #

first :: Kleisli m b c -> Kleisli m (b, d) (c, d) #

second :: Kleisli m b c -> Kleisli m (d, b) (d, c) #

(***) :: Kleisli m b c -> Kleisli m b' c' -> Kleisli m (b, b') (c, c') #

(&&&) :: Kleisli m b c -> Kleisli m b c' -> Kleisli m b (c, c') #

Monad m => ArrowApply (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

app :: Kleisli m (Kleisli m b c, b) c #

Monad m => ArrowChoice (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

left :: Kleisli m b c -> Kleisli m (Either b d) (Either c d) #

right :: Kleisli m b c -> Kleisli m (Either d b) (Either d c) #

(+++) :: Kleisli m b c -> Kleisli m b' c' -> Kleisli m (Either b b') (Either c c') #

(|||) :: Kleisli m b d -> Kleisli m c d -> Kleisli m (Either b c) d #

MonadFix m => ArrowLoop (Kleisli m)

Beware that for many monads (those for which the >>= operation is strict) this instance will not satisfy the right-tightening law required by the ArrowLoop class.

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

loop :: Kleisli m (b, d) (c, d) -> Kleisli m b c #

MonadPlus m => ArrowPlus (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(<+>) :: Kleisli m b c -> Kleisli m b c -> Kleisli m b c #

MonadPlus m => ArrowZero (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

zeroArrow :: Kleisli m b c #

Invariant m => Invariant2 (Kleisli m)

from Control.Arrow

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Kleisli m a b -> Kleisli m c d #

Monad m => Choice (Kleisli m) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Kleisli m a b -> Kleisli m (Either a c) (Either b c) #

right' :: Kleisli m a b -> Kleisli m (Either c a) (Either c b) #

(Distributive f, Monad f) => Closed (Kleisli f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Kleisli f a b -> Kleisli f (x -> a) (x -> b) #

(Monad m, Distributive m) => Mapping (Kleisli m) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f => Kleisli m a b -> Kleisli m (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Kleisli m a b -> Kleisli m s t #

(Monad m, Functor m) => Representable (Kleisli m) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Rep (Kleisli m) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Kleisli m) c) -> Kleisli m d c #

MonadFix m => Costrong (Kleisli m) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Kleisli m (a, d) (b, d) -> Kleisli m a b #

unsecond :: Kleisli m (d, a) (d, b) -> Kleisli m a b #

Monad m => Strong (Kleisli m) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Kleisli m a b -> Kleisli m (a, c) (b, c) #

second' :: Kleisli m a b -> Kleisli m (c, a) (c, b) #

Monad m => Traversing (Kleisli m) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => Kleisli m a b -> Kleisli m (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Kleisli m a b -> Kleisli m s t #

Monad m => Profunctor (Kleisli m) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Kleisli m b c -> Kleisli m a d #

lmap :: (a -> b) -> Kleisli m b c -> Kleisli m a c #

rmap :: (b -> c) -> Kleisli m a b -> Kleisli m a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Kleisli m a b -> Kleisli m a c #

(.#) :: forall a b c q. Coercible b a => Kleisli m b c -> q a b -> Kleisli m a c #

(Monad m, Functor m) => Sieve (Kleisli m) m 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: Kleisli m a b -> a -> m b #

Alternative m => Alternative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: Kleisli m a a0 #

(<|>) :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

some :: Kleisli m a a0 -> Kleisli m a [a0] #

many :: Kleisli m a a0 -> Kleisli m a [a0] #

Applicative m => Applicative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> Kleisli m a a0 #

(<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b #

liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c #

(*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #

(<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 #

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 #

(<$) :: a0 -> Kleisli m a b -> Kleisli m a a0 #

Monad m => Monad (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

(>>=) :: Kleisli m a a0 -> (a0 -> Kleisli m a b) -> Kleisli m a b #

(>>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #

return :: a0 -> Kleisli m a a0 #

MonadPlus m => MonadPlus (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: Kleisli m a a0 #

mplus :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

Invariant m => Invariant (Kleisli m a)

from Control.Arrow

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Kleisli m a a0 -> Kleisli m a b #

Generic (Kleisli m a b) 
Instance details

Defined in Control.Arrow

Associated Types

type Rep (Kleisli m a b) :: Type -> Type #

Methods

from :: Kleisli m a b -> Rep (Kleisli m a b) x #

to :: Rep (Kleisli m a b) x -> Kleisli m a b #

type Rep1 (Kleisli m a :: Type -> TYPE LiftedRep)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

type Rep1 (Kleisli m a :: Type -> TYPE LiftedRep) = D1 ('MetaData "Kleisli" "Control.Arrow" "base" 'True) (C1 ('MetaCons "Kleisli" 'PrefixI 'True) (S1 ('MetaSel ('Just "runKleisli") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ((FUN 'Many a :: TYPE LiftedRep -> Type) :.: Rec1 m)))
type Rep (Kleisli m) 
Instance details

Defined in Data.Profunctor.Rep

type Rep (Kleisli m) = m
type Rep (Kleisli m a b)

Since: base-4.14.0.0

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))))

class Arrow a => ArrowZero (a :: TYPE LiftedRep -> TYPE LiftedRep -> Type) where #

Methods

zeroArrow :: a b c #

Instances

Instances details
MonadPlus m => ArrowZero (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

zeroArrow :: Kleisli m b c #

ArrowZero p => ArrowZero (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

zeroArrow :: Closure p b c #

ArrowZero p => ArrowZero (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

zeroArrow :: Tambara p b c #

Alternative f => ArrowZero (Static f) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

zeroArrow :: Static f b c #

ArrowZero p => ArrowZero (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

zeroArrow :: WrappedProfunctor p b c #

ArrowZero p => ArrowZero (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

zeroArrow :: WrappedArrow p b c #

(ArrowZero p, ArrowZero q) => ArrowZero (Product p q) 
Instance details

Defined in Data.Bifunctor.Product

Methods

zeroArrow :: Product p q b c #

(Applicative f, ArrowZero p) => ArrowZero (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

zeroArrow :: Tannen f p b c #

(Applicative f, ArrowZero p) => ArrowZero (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

zeroArrow :: Cayley f p b c #

class ArrowZero a => ArrowPlus (a :: TYPE LiftedRep -> TYPE LiftedRep -> Type) where #

A monoid on arrows.

Methods

(<+>) :: a b c -> a b c -> a b c infixr 5 #

An associative operation with identity zeroArrow.

Instances

Instances details
MonadPlus m => ArrowPlus (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(<+>) :: Kleisli m b c -> Kleisli m b c -> Kleisli m b c #

ArrowPlus p => ArrowPlus (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

(<+>) :: Closure p b c -> Closure p b c -> Closure p b c #

ArrowPlus p => ArrowPlus (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

(<+>) :: Tambara p b c -> Tambara p b c -> Tambara p b c #

Alternative f => ArrowPlus (Static f) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

(<+>) :: Static f b c -> Static f b c -> Static f b c #

ArrowPlus p => ArrowPlus (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

(<+>) :: WrappedProfunctor p b c -> WrappedProfunctor p b c -> WrappedProfunctor p b c #

(ArrowPlus p, ArrowPlus q) => ArrowPlus (Product p q) 
Instance details

Defined in Data.Bifunctor.Product

Methods

(<+>) :: Product p q b c -> Product p q b c -> Product p q b c #

(Applicative f, ArrowPlus p) => ArrowPlus (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

(<+>) :: Tannen f p b c -> Tannen f p b c -> Tannen f p b c #

(Applicative f, ArrowPlus p) => ArrowPlus (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

(<+>) :: Cayley f p b c -> Cayley f p b c -> Cayley f p b c #

newtype ArrowMonad (a :: Type -> Type -> Type) b #

The ArrowApply class is equivalent to Monad: any monad gives rise to a Kleisli arrow, and any instance of ArrowApply defines a monad.

Constructors

ArrowMonad (a () b) 

Instances

Instances details
ArrowPlus a => Alternative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: ArrowMonad a a0 #

(<|>) :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

some :: ArrowMonad a a0 -> ArrowMonad a [a0] #

many :: ArrowMonad a a0 -> ArrowMonad a [a0] #

Arrow a => Applicative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> ArrowMonad a a0 #

(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c #

(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Arrow a => Functor (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

(<$) :: a0 -> ArrowMonad a b -> ArrowMonad a a0 #

ArrowApply a => Monad (ArrowMonad a)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b #

(>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

return :: a0 -> ArrowMonad a a0 #

(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: ArrowMonad a a0 #

mplus :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

Arrow a => Invariant (ArrowMonad a)

from Control.Arrow

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> ArrowMonad a a0 -> ArrowMonad a b #

ArrowChoice a => Selective (ArrowMonad a) 
Instance details

Defined in Control.Selective

Methods

select :: ArrowMonad a (Either a0 b) -> ArrowMonad a (a0 -> b) -> ArrowMonad a b #

class Arrow a => ArrowLoop (a :: TYPE LiftedRep -> TYPE LiftedRep -> Type) where #

The loop operator expresses computations in which an output value is fed back as input, although the computation occurs only once. It underlies the rec value recursion construct in arrow notation. loop should satisfy the following laws:

extension
loop (arr f) = arr (\ b -> fst (fix (\ (c,d) -> f (b,d))))
left tightening
loop (first h >>> f) = h >>> loop f
right tightening
loop (f >>> first h) = loop f >>> h
sliding
loop (f >>> arr (id *** k)) = loop (arr (id *** k) >>> f)
vanishing
loop (loop f) = loop (arr unassoc >>> f >>> arr assoc)
superposing
second (loop f) = loop (arr assoc >>> second f >>> arr unassoc)

where

assoc ((a,b),c) = (a,(b,c))
unassoc (a,(b,c)) = ((a,b),c)

Methods

loop :: a (b, d) (c, d) -> a b c #

Instances

Instances details
MonadFix m => ArrowLoop (Kleisli m)

Beware that for many monads (those for which the >>= operation is strict) this instance will not satisfy the right-tightening law required by the ArrowLoop class.

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

loop :: Kleisli m (b, d) (c, d) -> Kleisli m b c #

ArrowLoop p => ArrowLoop (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

loop :: Closure p (b, d) (c, d) -> Closure p b c #

ArrowLoop p => ArrowLoop (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

loop :: Tambara p (b, d) (c, d) -> Tambara p b c #

ComonadApply w => ArrowLoop (Cokleisli w) 
Instance details

Defined in Control.Comonad

Methods

loop :: Cokleisli w (b, d) (c, d) -> Cokleisli w b c #

ArrowLoop (->)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

loop :: ((b, d) -> (c, d)) -> b -> c #

ArrowLoop p => ArrowLoop (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

loop :: WrappedProfunctor p (b, d) (c, d) -> WrappedProfunctor p b c #

ArrowLoop p => ArrowLoop (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

loop :: WrappedArrow p (b, d) (c, d) -> WrappedArrow p b c #

(ArrowLoop p, ArrowLoop q) => ArrowLoop (Product p q) 
Instance details

Defined in Data.Bifunctor.Product

Methods

loop :: Product p q (b, d) (c, d) -> Product p q b c #

(Applicative f, ArrowLoop p) => ArrowLoop (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

loop :: Tannen f p (b, d) (c, d) -> Tannen f p b c #

(Applicative f, ArrowLoop p) => ArrowLoop (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

loop :: Cayley f p (b, d) (c, d) -> Cayley f p b c #

class Arrow a => ArrowChoice (a :: TYPE LiftedRep -> TYPE LiftedRep -> Type) where #

Choice, for arrows that support it. This class underlies the if and case constructs in arrow notation.

Instances should satisfy the following laws:

where

assocsum (Left (Left x)) = Left x
assocsum (Left (Right y)) = Right (Left y)
assocsum (Right z) = Right (Right z)

The other combinators have sensible default definitions, which may be overridden for efficiency.

Minimal complete definition

(left | (+++))

Methods

left :: a b c -> a (Either b d) (Either c d) #

Feed marked inputs through the argument arrow, passing the rest through unchanged to the output.

right :: a b c -> a (Either d b) (Either d c) #

A mirror image of left.

The default definition may be overridden with a more efficient version if desired.

(+++) :: a b c -> a b' c' -> a (Either b b') (Either c c') infixr 2 #

Split the input between the two argument arrows, retagging and merging their outputs. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

(|||) :: a b d -> a c d -> a (Either b c) d infixr 2 #

Fanin: Split the input between the two argument arrows and merge their outputs.

The default definition may be overridden with a more efficient version if desired.

Instances

Instances details
Monad m => ArrowChoice (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

left :: Kleisli m b c -> Kleisli m (Either b d) (Either c d) #

right :: Kleisli m b c -> Kleisli m (Either d b) (Either d c) #

(+++) :: Kleisli m b c -> Kleisli m b' c' -> Kleisli m (Either b b') (Either c c') #

(|||) :: Kleisli m b d -> Kleisli m c d -> Kleisli m (Either b c) d #

ArrowChoice p => ArrowChoice (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

left :: Tambara p b c -> Tambara p (Either b d) (Either c d) #

right :: Tambara p b c -> Tambara p (Either d b) (Either d c) #

(+++) :: Tambara p b c -> Tambara p b' c' -> Tambara p (Either b b') (Either c c') #

(|||) :: Tambara p b d -> Tambara p c d -> Tambara p (Either b c) d #

Applicative f => ArrowChoice (Static f) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

left :: Static f b c -> Static f (Either b d) (Either c d) #

right :: Static f b c -> Static f (Either d b) (Either d c) #

(+++) :: Static f b c -> Static f b' c' -> Static f (Either b b') (Either c c') #

(|||) :: Static f b d -> Static f c d -> Static f (Either b c) d #

Comonad w => ArrowChoice (Cokleisli w) 
Instance details

Defined in Control.Comonad

Methods

left :: Cokleisli w b c -> Cokleisli w (Either b d) (Either c d) #

right :: Cokleisli w b c -> Cokleisli w (Either d b) (Either d c) #

(+++) :: Cokleisli w b c -> Cokleisli w b' c' -> Cokleisli w (Either b b') (Either c c') #

(|||) :: Cokleisli w b d -> Cokleisli w c d -> Cokleisli w (Either b c) d #

ArrowChoice (->)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

left :: (b -> c) -> Either b d -> Either c d #

right :: (b -> c) -> Either d b -> Either d c #

(+++) :: (b -> c) -> (b' -> c') -> Either b b' -> Either c c' #

(|||) :: (b -> d) -> (c -> d) -> Either b c -> d #

ArrowChoice p => ArrowChoice (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

ArrowChoice p => ArrowChoice (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

left :: WrappedArrow p b c -> WrappedArrow p (Either b d) (Either c d) #

right :: WrappedArrow p b c -> WrappedArrow p (Either d b) (Either d c) #

(+++) :: WrappedArrow p b c -> WrappedArrow p b' c' -> WrappedArrow p (Either b b') (Either c c') #

(|||) :: WrappedArrow p b d -> WrappedArrow p c d -> WrappedArrow p (Either b c) d #

(ArrowChoice p, ArrowChoice q) => ArrowChoice (Product p q) 
Instance details

Defined in Data.Bifunctor.Product

Methods

left :: Product p q b c -> Product p q (Either b d) (Either c d) #

right :: Product p q b c -> Product p q (Either d b) (Either d c) #

(+++) :: Product p q b c -> Product p q b' c' -> Product p q (Either b b') (Either c c') #

(|||) :: Product p q b d -> Product p q c d -> Product p q (Either b c) d #

(Applicative f, ArrowChoice p) => ArrowChoice (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

left :: Tannen f p b c -> Tannen f p (Either b d) (Either c d) #

right :: Tannen f p b c -> Tannen f p (Either d b) (Either d c) #

(+++) :: Tannen f p b c -> Tannen f p b' c' -> Tannen f p (Either b b') (Either c c') #

(|||) :: Tannen f p b d -> Tannen f p c d -> Tannen f p (Either b c) d #

(Applicative f, ArrowChoice p) => ArrowChoice (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

left :: Cayley f p b c -> Cayley f p (Either b d) (Either c d) #

right :: Cayley f p b c -> Cayley f p (Either d b) (Either d c) #

(+++) :: Cayley f p b c -> Cayley f p b' c' -> Cayley f p (Either b b') (Either c c') #

(|||) :: Cayley f p b d -> Cayley f p c d -> Cayley f p (Either b c) d #

class Arrow a => ArrowApply (a :: TYPE LiftedRep -> TYPE LiftedRep -> Type) where #

Some arrows allow application of arrow inputs to other inputs. Instances should satisfy the following laws:

Such arrows are equivalent to monads (see ArrowMonad).

Methods

app :: a (a b c, b) c #

Instances

Instances details
Monad m => ArrowApply (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

app :: Kleisli m (Kleisli m b c, b) c #

ArrowApply p => ArrowApply (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

app :: Tambara p (Tambara p b c, b) c #

Comonad w => ArrowApply (Cokleisli w) 
Instance details

Defined in Control.Comonad

Methods

app :: Cokleisli w (Cokleisli w b c, b) c #

ArrowApply (->)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

app :: (b -> c, b) -> c #

ArrowApply p => ArrowApply (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

app :: WrappedArrow p (WrappedArrow p b c, b) c #

class Category a => Arrow (a :: TYPE LiftedRep -> TYPE LiftedRep -> Type) where #

The basic arrow class.

Instances should satisfy the following laws:

where

assoc ((a,b),c) = (a,(b,c))

The other combinators have sensible default definitions, which may be overridden for efficiency.

Minimal complete definition

arr, (first | (***))

Methods

arr :: (b -> c) -> a b c #

Lift a function to an arrow.

(***) :: a b c -> a b' c' -> a (b, b') (c, c') infixr 3 #

Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

(&&&) :: a b c -> a b c' -> a b (c, c') infixr 3 #

Fanout: send the input to both argument arrows and combine their output.

The default definition may be overridden with a more efficient version if desired.

Instances

Instances details
Monad m => Arrow (Kleisli m)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

arr :: (b -> c) -> Kleisli m b c #

first :: Kleisli m b c -> Kleisli m (b, d) (c, d) #

second :: Kleisli m b c -> Kleisli m (d, b) (d, c) #

(***) :: Kleisli m b c -> Kleisli m b' c' -> Kleisli m (b, b') (c, c') #

(&&&) :: Kleisli m b c -> Kleisli m b c' -> Kleisli m b (c, c') #

Arrow p => Arrow (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

arr :: (b -> c) -> Closure p b c #

first :: Closure p b c -> Closure p (b, d) (c, d) #

second :: Closure p b c -> Closure p (d, b) (d, c) #

(***) :: Closure p b c -> Closure p b' c' -> Closure p (b, b') (c, c') #

(&&&) :: Closure p b c -> Closure p b c' -> Closure p b (c, c') #

Arrow p => Arrow (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

arr :: (b -> c) -> Tambara p b c #

first :: Tambara p b c -> Tambara p (b, d) (c, d) #

second :: Tambara p b c -> Tambara p (d, b) (d, c) #

(***) :: Tambara p b c -> Tambara p b' c' -> Tambara p (b, b') (c, c') #

(&&&) :: Tambara p b c -> Tambara p b c' -> Tambara p b (c, c') #

Applicative f => Arrow (Static f) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

arr :: (b -> c) -> Static f b c #

first :: Static f b c -> Static f (b, d) (c, d) #

second :: Static f b c -> Static f (d, b) (d, c) #

(***) :: Static f b c -> Static f b' c' -> Static f (b, b') (c, c') #

(&&&) :: Static f b c -> Static f b c' -> Static f b (c, c') #

Comonad w => Arrow (Cokleisli w) 
Instance details

Defined in Control.Comonad

Methods

arr :: (b -> c) -> Cokleisli w b c #

first :: Cokleisli w b c -> Cokleisli w (b, d) (c, d) #

second :: Cokleisli w b c -> Cokleisli w (d, b) (d, c) #

(***) :: Cokleisli w b c -> Cokleisli w b' c' -> Cokleisli w (b, b') (c, c') #

(&&&) :: Cokleisli w b c -> Cokleisli w b c' -> Cokleisli w b (c, c') #

Arrow (->)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

arr :: (b -> c) -> b -> c #

first :: (b -> c) -> (b, d) -> (c, d) #

second :: (b -> c) -> (d, b) -> (d, c) #

(***) :: (b -> c) -> (b' -> c') -> (b, b') -> (c, c') #

(&&&) :: (b -> c) -> (b -> c') -> b -> (c, c') #

Arrow p => Arrow (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

arr :: (b -> c) -> WrappedProfunctor p b c #

first :: WrappedProfunctor p b c -> WrappedProfunctor p (b, d) (c, d) #

second :: WrappedProfunctor p b c -> WrappedProfunctor p (d, b) (d, c) #

(***) :: WrappedProfunctor p b c -> WrappedProfunctor p b' c' -> WrappedProfunctor p (b, b') (c, c') #

(&&&) :: WrappedProfunctor p b c -> WrappedProfunctor p b c' -> WrappedProfunctor p b (c, c') #

Arrow p => Arrow (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

arr :: (b -> c) -> WrappedArrow p b c #

first :: WrappedArrow p b c -> WrappedArrow p (b, d) (c, d) #

second :: WrappedArrow p b c -> WrappedArrow p (d, b) (d, c) #

(***) :: WrappedArrow p b c -> WrappedArrow p b' c' -> WrappedArrow p (b, b') (c, c') #

(&&&) :: WrappedArrow p b c -> WrappedArrow p b c' -> WrappedArrow p b (c, c') #

(Arrow p, Arrow q) => Arrow (Product p q) 
Instance details

Defined in Data.Bifunctor.Product

Methods

arr :: (b -> c) -> Product p q b c #

first :: Product p q b c -> Product p q (b, d) (c, d) #

second :: Product p q b c -> Product p q (d, b) (d, c) #

(***) :: Product p q b c -> Product p q b' c' -> Product p q (b, b') (c, c') #

(&&&) :: Product p q b c -> Product p q b c' -> Product p q b (c, c') #

(Applicative f, Arrow p) => Arrow (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

arr :: (b -> c) -> Tannen f p b c #

first :: Tannen f p b c -> Tannen f p (b, d) (c, d) #

second :: Tannen f p b c -> Tannen f p (d, b) (d, c) #

(***) :: Tannen f p b c -> Tannen f p b' c' -> Tannen f p (b, b') (c, c') #

(&&&) :: Tannen f p b c -> Tannen f p b c' -> Tannen f p b (c, c') #

(Applicative f, Arrow p) => Arrow (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

arr :: (b -> c) -> Cayley f p b c #

first :: Cayley f p b c -> Cayley f p (b, d) (c, d) #

second :: Cayley f p b c -> Cayley f p (d, b) (d, c) #

(***) :: Cayley f p b c -> Cayley f p b' c' -> Cayley f p (b, b') (c, c') #

(&&&) :: Cayley f p b c -> Cayley f p b c' -> Cayley f p b (c, c') #

returnA :: Arrow a => a b b #

The identity arrow, which plays the role of return in arrow notation.

leftApp :: ArrowApply a => a b c -> a (Either b d) (Either c d) #

Any instance of ArrowApply can be made into an instance of ArrowChoice by defining left = leftApp.

(^>>) :: Arrow a => (b -> c) -> a c d -> a b d infixr 1 #

Precomposition with a pure function.

(^<<) :: Arrow a => (c -> d) -> a b c -> a b d infixr 1 #

Postcomposition with a pure function (right-to-left variant).

(>>^) :: Arrow a => a b c -> (c -> d) -> a b d infixr 1 #

Postcomposition with a pure function.

(<<^) :: Arrow a => a c d -> (b -> c) -> a b d infixr 1 #

Precomposition with a pure function (right-to-left variant).

newtype Identity a #

Identity functor and monad. (a non-strict monad)

Since: base-4.8.0.0

Constructors

Identity 

Fields

Instances

Instances details
Representable Identity 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Identity #

Methods

tabulate :: (Rep Identity -> a) -> Identity a #

index :: Identity a -> Rep Identity -> a #

MonadFix Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mfix :: (a -> Identity a) -> Identity a #

MonadZip Identity

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: Identity a -> Identity b -> Identity (a, b) #

mzipWith :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

munzip :: Identity (a, b) -> (Identity a, Identity b) #

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fold :: Monoid m => Identity m -> m #

foldMap :: Monoid m => (a -> m) -> Identity a -> m #

foldMap' :: Monoid m => (a -> m) -> Identity a -> m #

foldr :: (a -> b -> b) -> b -> Identity a -> b #

foldr' :: (a -> b -> b) -> b -> Identity a -> b #

foldl :: (b -> a -> b) -> b -> Identity a -> b #

foldl' :: (b -> a -> b) -> b -> Identity a -> b #

foldr1 :: (a -> a -> a) -> Identity a -> a #

foldl1 :: (a -> a -> a) -> Identity a -> a #

toList :: Identity a -> [a] #

null :: Identity a -> Bool #

length :: Identity a -> Int #

elem :: Eq a => a -> Identity a -> Bool #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

sum :: Num a => Identity a -> a #

product :: Num a => Identity a -> a #

Eq1 Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Identity a -> Identity b -> Bool #

Ord1 Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Identity a -> Identity b -> Ordering #

Read1 Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Identity a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Identity a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Identity a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Identity a] #

Show1 Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Identity a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Identity a] -> ShowS #

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) #

sequenceA :: Applicative f => Identity (f a) -> f (Identity a) #

mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) #

sequence :: Monad m => Identity (m a) -> m (Identity a) #

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

pure :: a -> Identity a #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b #

liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

(*>) :: Identity a -> Identity b -> Identity b #

(<*) :: Identity a -> Identity b -> Identity a #

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fmap :: (a -> b) -> Identity a -> Identity b #

(<$) :: a -> Identity b -> Identity a #

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(>>=) :: Identity a -> (a -> Identity b) -> Identity b #

(>>) :: Identity a -> Identity b -> Identity b #

return :: a -> Identity a #

Comonad Identity 
Instance details

Defined in Control.Comonad

Methods

extract :: Identity a -> a #

duplicate :: Identity a -> Identity (Identity a) #

extend :: (Identity a -> b) -> Identity a -> Identity b #

ComonadApply Identity 
Instance details

Defined in Control.Comonad

Methods

(<@>) :: Identity (a -> b) -> Identity a -> Identity b #

(@>) :: Identity a -> Identity b -> Identity b #

(<@) :: Identity a -> Identity b -> Identity a #

NFData1 Identity

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Identity a -> () #

Foldable1 Identity 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Identity m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Identity a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Identity a -> m #

toNonEmpty :: Identity a -> NonEmpty a #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

head :: Identity a -> a #

last :: Identity a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Identity a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Identity a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Identity a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Identity a -> b #

Hashable1 Identity 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Identity a -> Int #

Invariant Identity

from Data.Functor.Identity

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Identity a -> Identity b #

Adjustable Identity 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key Identity -> Identity a -> Identity a #

replace :: Key Identity -> a -> Identity a -> Identity a #

FoldableWithKey Identity 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Identity a -> [(Key Identity, a)] #

foldMapWithKey :: Monoid m => (Key Identity -> a -> m) -> Identity a -> m #

foldrWithKey :: (Key Identity -> a -> b -> b) -> b -> Identity a -> b #

foldlWithKey :: (b -> Key Identity -> a -> b) -> b -> Identity a -> b #

FoldableWithKey1 Identity 
Instance details

Defined in Data.Key

Methods

foldMapWithKey1 :: Semigroup m => (Key Identity -> a -> m) -> Identity a -> m #

Indexable Identity 
Instance details

Defined in Data.Key

Methods

index :: Identity a -> Key Identity -> a #

Keyed Identity 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key Identity -> a -> b) -> Identity a -> Identity b #

Lookup Identity 
Instance details

Defined in Data.Key

Methods

lookup :: Key Identity -> Identity a -> Maybe a #

TraversableWithKey Identity 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key Identity -> a -> f b) -> Identity a -> f (Identity b) #

mapWithKeyM :: Monad m => (Key Identity -> a -> m b) -> Identity a -> m (Identity b) #

TraversableWithKey1 Identity 
Instance details

Defined in Data.Key

Methods

traverseWithKey1 :: Apply f => (Key Identity -> a -> f b) -> Identity a -> f (Identity b) #

Zip Identity 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

zip :: Identity a -> Identity b -> Identity (a, b) #

zap :: Identity (a -> b) -> Identity a -> Identity b #

ZipWithKey Identity 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key Identity -> a -> b -> c) -> Identity a -> Identity b -> Identity c #

zapWithKey :: Identity (Key Identity -> a -> b) -> Identity a -> Identity b #

Selective Identity 
Instance details

Defined in Control.Selective

Methods

select :: Identity (Either a b) -> Identity (a -> b) -> Identity b #

Alt Identity

Choose the first option every time. While 'choose the last option' every time is also valid, this instance satisfies more laws.

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Alt

Apply Identity 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Identity (a -> b) -> Identity a -> Identity b #

(.>) :: Identity a -> Identity b -> Identity b #

(<.) :: Identity a -> Identity b -> Identity a #

liftF2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

Bind Identity 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Identity a -> (a -> Identity b) -> Identity b #

join :: Identity (Identity a) -> Identity a #

Extend Identity 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Identity a -> Identity (Identity a) #

extended :: (Identity a -> b) -> Identity a -> Identity b #

Traversable1 Identity 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Identity a -> f (Identity b) #

sequence1 :: Apply f => Identity (f b) -> f (Identity b) #

Generic1 Identity 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep1 Identity :: k -> Type #

Methods

from1 :: forall (a :: k). Identity a -> Rep1 Identity a #

to1 :: forall (a :: k). Rep1 Identity a -> Identity a #

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

Data a => Data (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Identity a -> c (Identity a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Identity a) #

toConstr :: Identity a -> Constr #

dataTypeOf :: Identity a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Identity a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Identity a)) #

gmapT :: (forall b. Data b => b -> b) -> Identity a -> Identity a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Identity a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Identity a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Identity a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Identity a -> m (Identity a) #

IsString a => IsString (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Identity a #

Storable a => Storable (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

sizeOf :: Identity a -> Int #

alignment :: Identity a -> Int #

peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) #

pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Identity a) #

pokeByteOff :: Ptr b -> Int -> Identity a -> IO () #

peek :: Ptr (Identity a) -> IO (Identity a) #

poke :: Ptr (Identity a) -> Identity a -> IO () #

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

mconcat :: [Identity a] -> Identity a #

Semigroup a => Semigroup (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(<>) :: Identity a -> Identity a -> Identity a #

sconcat :: NonEmpty (Identity a) -> Identity a #

stimes :: Integral b => b -> Identity a -> Identity a #

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

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

Floating a => Floating (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

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type #

Methods

from :: Identity a -> Rep (Identity a) x #

to :: Rep (Identity a) x -> Identity a #

Ix a => Ix (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

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

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

Real a => Real (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

toRational :: Identity a -> Rational #

RealFrac a => RealFrac (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

properFraction :: Integral b => Identity a -> (b, Identity a) #

truncate :: Integral b => Identity a -> b #

round :: Integral b => Identity a -> b #

ceiling :: Integral b => Identity a -> b #

floor :: Integral b => Identity a -> b #

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

Methods

showsPrec :: Int -> Identity a -> ShowS #

show :: Identity a -> String #

showList :: [Identity a] -> ShowS #

NFData a => NFData (Identity a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Identity a -> () #

Eq a => Eq (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(==) :: Identity a -> Identity a -> Bool #

(/=) :: Identity a -> Identity a -> Bool #

Ord a => Ord (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

compare :: Identity a -> Identity a -> Ordering #

(<) :: Identity a -> Identity a -> Bool #

(<=) :: Identity a -> Identity a -> Bool #

(>) :: Identity a -> Identity a -> Bool #

(>=) :: Identity a -> Identity a -> Bool #

max :: Identity a -> Identity a -> Identity a #

min :: Identity a -> Identity a -> Identity a #

Abelian a => Abelian (Identity a) 
Instance details

Defined in Data.Group

Cyclic a => Cyclic (Identity a) 
Instance details

Defined in Data.Group

Methods

generator :: Identity a #

Group a => Group (Identity a)

Identity lifts groups pointwise (at only one point).

Instance details

Defined in Data.Group

Methods

invert :: Identity a -> Identity a #

(~~) :: Identity a -> Identity a -> Identity a #

pow :: Integral x => Identity a -> x -> Identity a #

Hashable a => Hashable (Identity a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Identity a -> Int #

hash :: Identity a -> Int #

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

Cosieve (->) Identity 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: (a -> b) -> Identity a -> b #

Sieve (->) Identity 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: (a -> b) -> a -> Identity b #

type Rep Identity 
Instance details

Defined in Data.Functor.Rep

type Rep Identity = ()
type Key Identity 
Instance details

Defined in Data.Key

type Key Identity = ()
type Rep1 Identity

Since: base-4.8.0.0

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))
newtype MVector s (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Identity a) = MV_Identity (MVector s a)
type Rep (Identity a)

Since: base-4.8.0.0

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

newtype Vector (Identity a) = V_Identity (Vector a)

writeFile :: FilePath -> String -> IO () #

The computation writeFile file str function writes the string str, to the file file.

readLn :: Read a => IO a #

The readLn function combines getLine and readIO.

readIO :: Read a => String -> IO a #

The readIO function is similar to read except that it signals parse failure to the IO monad instead of terminating the program.

readFile :: FilePath -> IO String #

The readFile function reads a file and returns the contents of the file as a string. The file is read lazily, on demand, as with getContents.

putStrLn :: String -> IO () #

The same as putStr, but adds a newline character.

putStr :: String -> IO () #

Write a string to the standard output device (same as hPutStr stdout).

putChar :: Char -> IO () #

Write a character to the standard output device (same as hPutChar stdout).

interact :: (String -> String) -> IO () #

The interact function takes a function of type String->String 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.

getLine :: IO String #

Read a line from the standard input device (same as hGetLine stdin).

getContents :: IO String #

The getContents operation returns all user input as a single string, which is read lazily as it is needed (same as hGetContents stdin).

getChar :: IO Char #

Read a character from the standard input device (same as hGetChar stdin).

appendFile :: FilePath -> String -> IO () #

The computation appendFile file str function appends the string str, to the file file.

Note that writeFile and appendFile write a literal string to a file. To write a value of any printable type, as with print, use the show function to convert the value to a string first.

main = appendFile "squares" (show [(x,x*x) | x <- [0,0.1..2]])

hClose :: Handle -> IO () #

Computation hClose hdl makes handle hdl closed. Before the computation finishes, if hdl is writable its buffer is flushed as for hFlush. Performing hClose on a handle that has already been closed has no effect; doing so is not an error. All other operations on a closed handle will fail. If hClose fails for any reason, any further operations (apart from hClose) on the handle will still fail as if hdl had been successfully closed.

hClose is an interruptible operation in the sense described in Control.Exception. If hClose is interrupted by an asynchronous exception in the process of flushing its buffers, then the I/O device (e.g., file) will be closed anyway.

threadDelay :: Int -> IO () #

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.

registerDelay :: Int -> IO (TVar Bool) #

Switch the value of returned TVar from initial value False to True after a given number of microseconds. The caveats associated with threadDelay also apply.

closeFdWith #

Arguments

:: (Fd -> IO ())

Low-level action that performs the real close.

-> Fd

File descriptor to close.

-> IO () 

Close a file descriptor in a concurrency-safe way (GHC only). If you are using threadWaitRead or threadWaitWrite to perform blocking I/O, you must use this function to close file descriptors, or blocked threads may not be woken.

Any threads that are blocked on the file descriptor via threadWaitRead or threadWaitWrite will be unblocked by having IO exceptions thrown.

type Signal = CInt #

withMVarMasked :: MVar a -> (a -> IO b) -> IO b #

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 #

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 #

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.

modifyMVar_ :: MVar a -> (a -> IO a) -> IO () #

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.

modifyMVarMasked_ :: MVar a -> (a -> IO a) -> IO () #

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, b)) -> IO b #

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 #

A slight variation on modifyMVar_ that allows a value to be returned (b) in addition to the modified value of the MVar.

mkWeakMVar :: MVar a -> IO () -> IO (Weak (MVar a)) #

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

addMVarFinalizer :: MVar a -> IO () -> IO () #

unsafeFixIO :: (a -> IO a) -> IO a #

A slightly faster version of fixIO that may not be safe to use with multiple threads. The unsafety arises when used like this:

 unsafeFixIO $ \r -> do
    forkIO (print r)
    return (...)

In this case, the child thread will receive a NonTermination exception instead of waiting for the value of r to be computed.

Since: base-4.5.0.0

data Handler a #

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

Methods

fmap :: (a -> b) -> Handler a -> Handler b #

(<$) :: a -> Handler b -> Handler a #

Invariant Handler

from Control.Exception

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Handler a -> Handler b #

catches :: IO a -> [Handler a] -> IO a #

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)]

allowInterrupt :: IO () #

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

fixST :: (a -> ST s a) -> ST s a #

Allow the result of an ST computation to be used (lazily) inside the computation.

Note that if f is strict, fixST f = _|_.

userErrorType :: IOErrorType #

I/O error that is programmer-defined.

tryIOError :: IO a -> IO (Either IOError a) #

The construct tryIOError comp exposes IO errors which occur within a computation, and which are not fully handled.

Non-I/O exceptions are not caught by this variant; to catch all exceptions, use try from Control.Exception.

Since: base-4.4.0.0

resourceVanishedErrorType :: IOErrorType #

I/O error where the operation failed because the resource vanished. This happens when, for example, attempting to write to a closed socket or attempting to write to a named pipe that was deleted.

Since: base-4.14.0.0

permissionErrorType :: IOErrorType #

I/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.

modifyIOError :: (IOError -> IOError) -> IO a -> IO a #

Catch any IOException that occurs in the computation and throw a modified version.

mkIOError :: IOErrorType -> String -> Maybe Handle -> Maybe FilePath -> IOError #

Construct an IOException of the given type where the second argument describes the error location and the third and fourth argument contain the file handle and file path of the file involved in the error if applicable.

isUserErrorType :: IOErrorType -> Bool #

I/O error that is programmer-defined.

isUserError :: IOError -> Bool #

A programmer-defined error value constructed using userError.

isResourceVanishedErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the resource vanished. See resourceVanishedErrorType.

Since: base-4.14.0.0

isResourceVanishedError :: IOError -> Bool #

An error indicating that the operation failed because the resource vanished. See resourceVanishedErrorType.

Since: base-4.14.0.0

isPermissionErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.

isPermissionError :: IOError -> Bool #

An error indicating that an IO operation failed because the user does not have sufficient operating system privilege to perform that operation.

isIllegalOperationErrorType :: IOErrorType -> Bool #

I/O error where the operation is not possible.

isIllegalOperation :: IOError -> Bool #

An error indicating that an IO operation failed because the operation was not possible. Any computation which returns an IO result may fail with isIllegalOperation. In some cases, an implementation will not be able to distinguish between the possible error causes. In this case it should fail with isIllegalOperation.

isFullErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the device is full.

isFullError :: IOError -> Bool #

An error indicating that an IO operation failed because the device is full.

isEOFErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the end of file has been reached.

isEOFError :: IOError -> Bool #

An error indicating that an IO operation failed because the end of file has been reached.

isDoesNotExistErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because one of its arguments does not exist.

isDoesNotExistError :: IOError -> Bool #

An error indicating that an IO operation failed because one of its arguments does not exist.

isAlreadyInUseErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.

isAlreadyInUseError :: IOError -> Bool #

An error indicating that an IO operation failed because one of its arguments is a single-use resource, which is already being used (for example, opening the same file twice for writing might give this error).

isAlreadyExistsErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because one of its arguments already exists.

isAlreadyExistsError :: IOError -> Bool #

An error indicating that an IO operation failed because one of its arguments already exists.

illegalOperationErrorType :: IOErrorType #

I/O error where the operation is not possible.

fullErrorType :: IOErrorType #

I/O error where the operation failed because the device is full.

eofErrorType :: IOErrorType #

I/O error where the operation failed because the end of file has been reached.

doesNotExistErrorType :: IOErrorType #

I/O error where the operation failed because one of its arguments does not exist.

catchIOError :: IO a -> (IOError -> IO a) -> IO a #

The catchIOError function establishes a handler that receives any IOException raised in the action protected by catchIOError. An IOException is caught by the most recent handler established by one of the exception handling functions. These handlers are not selective: all IOExceptions are caught. Exception propagation must be explicitly provided in a handler by re-raising any unwanted exceptions. For example, in

f = catchIOError g (\e -> if IO.isEOFError e then return [] else ioError e)

the function f returns [] when an end-of-file exception (cf. isEOFError) occurs in g; otherwise, the exception is propagated to the next outer handler.

When an exception propagates outside the main program, the Haskell system prints the associated IOException value and exits the program.

Non-I/O exceptions are not caught by this variant; to catch all exceptions, use catch from Control.Exception.

Since: base-4.4.0.0

annotateIOError :: IOError -> String -> Maybe Handle -> Maybe FilePath -> IOError #

Adds a location description and maybe a file path and file handle to an IOException. If any of the file handle or file path is not given the corresponding value in the IOException remains unaltered.

alreadyInUseErrorType :: IOErrorType #

I/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.

alreadyExistsErrorType :: IOErrorType #

I/O error where the operation failed because one of its arguments already exists.

newtype TypeError #

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

Constructors

TypeError String 

Instances

Instances details
Exception TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Show TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

newtype RecUpdError #

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.

Constructors

RecUpdError String 

Instances

Instances details
Exception RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

newtype RecSelError #

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.

Constructors

RecSelError String 

Instances

Instances details
Exception RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

newtype RecConError #

An uninitialised record field was used. The String gives information about the source location where the record was constructed.

Constructors

RecConError String 

Instances

Instances details
Exception RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

newtype PatternMatchFail #

A pattern match failed. The String gives information about the source location of the pattern.

Constructors

PatternMatchFail String 

data NonTermination #

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 

newtype NoMethodError #

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.

Constructors

NoMethodError String 

Instances

Instances details
Exception NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

data NestedAtomically #

Thrown when the program attempts to call atomically, from the stm package, inside another call to atomically.

Constructors

NestedAtomically 

tryJust :: Exception e => (e -> Maybe b) -> IO a -> IO (Either b a) #

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) #

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 then it will be propagated up to the next enclosing exception handler.

 try a = catch (Right `liftM` a) (return . Left)

onException :: IO a -> IO b -> IO a #

Like finally, but only performs the final action if there was an exception raised by the computation.

mapException :: (Exception e1, Exception e2) => (e1 -> e2) -> a -> a #

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 #

A version of catchJust with the arguments swapped around (see handle).

handle :: Exception e => (e -> IO a) -> IO a -> IO a #

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)) $
     ...

finally #

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.

catchJust #

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.

bracket_ :: IO a -> IO b -> IO c -> IO c #

A variant of bracket where the return value from the first computation is not required.

bracketOnError #

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 #

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

Bracket wraps the release action with mask, which is sufficient to ensure that the release action executes to completion when it does not invoke any interruptible actions, even in the presence of asynchronous exceptions. For example, hClose is uninterruptible when it is not racing other uses of the handle. Similarly, closing a socket (from "network" package) is also uninterruptible under similar conditions. An example of an interruptible action is killThread. Completion of interruptible release actions can be ensured by wrapping them in in uninterruptibleMask_, but this risks making the program non-responsive to Control-C, or timeouts. Another option is to run the release action asynchronously in its own thread:

void $ uninterruptibleMask_ $ forkIO $ do { ... }

The resource will be released as soon as possible, but the thread that invoked bracket will not block in an uninterruptible state.

data ThreadStatus #

The current status of a thread

Constructors

ThreadRunning

the thread is currently runnable or running

ThreadFinished

the thread has finished

ThreadBlocked BlockReason

the thread is blocked on some resource

ThreadDied

the thread received an uncaught exception

Instances

Instances details
Show ThreadStatus

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

Ord ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

data ThreadId #

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 ThreadIds. 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.

Constructors

ThreadId ThreadId# 

Instances

Instances details
Show ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

NFData ThreadId

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ThreadId -> () #

Eq ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Ord ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Hashable ThreadId 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> ThreadId -> Int #

hash :: ThreadId -> Int #

data TVar a #

Shared memory locations that support atomic memory transactions.

Constructors

TVar (TVar# RealWorld a) 

Instances

Instances details
Eq (TVar a)

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(==) :: TVar a -> TVar a -> Bool #

(/=) :: TVar a -> TVar a -> Bool #

newtype STM a #

A monad supporting atomic memory transactions.

Constructors

STM (State# RealWorld -> (# State# RealWorld, a #)) 

Instances

Instances details
Alternative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

empty :: STM a #

(<|>) :: STM a -> STM a -> STM a #

some :: STM a -> STM [a] #

many :: STM a -> STM [a] #

Applicative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

pure :: a -> STM a #

(<*>) :: STM (a -> b) -> STM a -> STM b #

liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c #

(*>) :: STM a -> STM b -> STM b #

(<*) :: STM a -> STM b -> STM a #

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

fmap :: (a -> b) -> STM a -> STM b #

(<$) :: a -> STM b -> STM a #

Monad STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(>>=) :: STM a -> (a -> STM b) -> STM b #

(>>) :: STM a -> STM b -> STM b #

return :: a -> STM a #

MonadPlus STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

mzero :: STM a #

mplus :: STM a -> STM a -> STM a #

Invariant STM

from the stm package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> STM a -> STM b #

Selective STM 
Instance details

Defined in Control.Selective

Methods

select :: STM (Either a b) -> STM (a -> b) -> STM b #

MArray TArray e STM 
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

getBounds :: Ix i => TArray i e -> STM (i, i) #

getNumElements :: Ix i => TArray i e -> STM Int

newArray :: Ix i => (i, i) -> e -> STM (TArray i e) #

newArray_ :: Ix i => (i, i) -> STM (TArray i e) #

unsafeNewArray_ :: Ix i => (i, i) -> STM (TArray i e)

unsafeRead :: Ix i => TArray i e -> Int -> STM e

unsafeWrite :: Ix i => TArray i e -> Int -> e -> STM ()

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) #

Methods

freezeGen :: MutableGen (TGen g) STM -> STM (TGen g) #

thawGen :: TGen g -> STM (MutableGen (TGen g) STM) #

RandomGen g => StatefulGen (TGenM g) STM

Since: random-1.2.1

Instance details

Defined in System.Random.Stateful

RandomGen r => RandomGenM (TGenM r) r STM 
Instance details

Defined in System.Random.Stateful

Methods

applyRandomGenM :: (r -> (a, r)) -> TGenM r -> STM a #

type MutableGen (TGen g) STM 
Instance details

Defined in System.Random.Stateful

type MutableGen (TGen g) STM = TGenM g

data PrimMVar #

data BlockReason #

Constructors

BlockedOnMVar

blocked on MVar

BlockedOnBlackHole

blocked on a computation in progress by another thread

BlockedOnException

blocked in throwTo

BlockedOnSTM

blocked in retry in an STM transaction

BlockedOnForeignCall

currently in a foreign call

BlockedOnOther

blocked on some other resource. Without -threaded, I/O and threadDelay show up as BlockedOnOther, with -threaded they show up as BlockedOnMVar.

Instances

Instances details
Show BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Eq BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Ord BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

yield :: IO () #

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.

writeTVar :: TVar a -> a -> STM () #

Write the supplied value into a TVar.

unsafeIOToSTM :: IO a -> STM a #

Unsafely performs IO in the STM monad. Beware: this is a highly dangerous thing to do.

  • The STM implementation will often run transactions multiple times, so you need to be prepared for this if your IO has any side effects.
  • The STM implementation will abort transactions that are known to be invalid and need to be restarted. This may happen in the middle of unsafeIOToSTM, so make sure you don't acquire any resources that need releasing (exception handlers are ignored when aborting the transaction). That includes doing any IO using Handles, for example. Getting this wrong will probably lead to random deadlocks.
  • The transaction may have seen an inconsistent view of memory when the IO runs. Invariants that you expect to be true throughout your program may not be true inside a transaction, due to the way transactions are implemented. Normally this wouldn't be visible to the programmer, but using unsafeIOToSTM can expose it.

throwTo :: Exception e => ThreadId -> e -> IO () #

throwTo raises an arbitrary exception in the target thread (GHC only).

Exception delivery synchronizes between the source and target thread: throwTo does not return until the exception has been raised in the target thread. The calling thread can thus be certain that the target thread has received the exception. Exception delivery is also atomic with respect to other exceptions. Atomicity is a useful property to have when dealing with race conditions: e.g. if there are two threads that can kill each other, it is guaranteed that only one of the threads will get to kill the other.

Whatever work the target thread was doing when the exception was raised is not lost: the computation is suspended until required by another thread.

If the target thread is currently making a foreign call, then the exception will not be raised (and hence throwTo will not return) until the call has completed. This is the case regardless of whether the call is inside a mask or not. However, in GHC a foreign call can be annotated as interruptible, in which case a throwTo will cause the RTS to attempt to cause the call to return; see the GHC documentation for more details.

Important note: the behaviour of throwTo differs from that described in the paper "Asynchronous exceptions in Haskell" (http://research.microsoft.com/~simonpj/Papers/asynch-exns.htm). In the paper, throwTo is non-blocking; but the library implementation adopts a more synchronous design in which throwTo does not return until the exception is received by the target thread. The trade-off is discussed in Section 9 of the paper. Like any blocking operation, throwTo is therefore interruptible (see Section 5.3 of the paper). Unlike other interruptible operations, however, throwTo is always interruptible, even if it does not actually block.

There is no guarantee that the exception will be delivered promptly, although the runtime will endeavour to ensure that arbitrary delays don't occur. In GHC, an exception can only be raised when a thread reaches a safe point, where a safe point is where memory allocation occurs. Some loops do not perform any memory allocation inside the loop and therefore cannot be interrupted by a throwTo.

If the target of throwTo is the calling thread, then the behaviour is the same as throwIO, except that the exception is thrown as an asynchronous exception. This means that if there is an enclosing pure computation, which would be the case if the current IO operation is inside unsafePerformIO or unsafeInterleaveIO, that computation is not permanently replaced by the exception, but is suspended as if it had received an asynchronous exception.

Note that if throwTo is called with the current thread as the target, the exception will be thrown even if the thread is currently inside mask or uninterruptibleMask.

throwSTM :: Exception e => e -> STM a #

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.

threadCapability :: ThreadId -> IO (Int, Bool) #

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

setNumCapabilities :: Int -> IO () #

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

setAllocationCounter :: Int64 -> IO () #

Every thread has an allocation counter that tracks how much memory has been allocated by the thread. The counter is initialized to zero, and setAllocationCounter sets the current value. The allocation counter counts *down*, so in the absence of a call to setAllocationCounter its value is the negation of the number of bytes of memory allocated by the thread.

There are two things that you can do with this counter:

Allocation accounting is accurate only to about 4Kbytes.

Since: base-4.8.0.0

runSparks :: IO () #

Internal function used by the RTS to run sparks.

retry :: STM a #

Retry execution of the current memory transaction because it has seen values in TVars which mean that it should not continue (e.g. the TVars represent a shared buffer that is now empty). The implementation may block the thread until one of the TVars that it has read from has been updated. (GHC only)

readTVarIO :: TVar a -> IO a #

Return the current value stored in a TVar. This is equivalent to

 readTVarIO = atomically . readTVar

but works much faster, because it doesn't perform a complete transaction, it just reads the current value of the TVar.

readTVar :: TVar a -> STM a #

Return the current value stored in a TVar.

pseq :: a -> b -> b infixr 0 #

par :: a -> b -> b infixr 0 #

numSparks :: IO Int #

Returns the number of sparks currently in the local spark pool

numCapabilities :: Int #

the value passed to the +RTS -N flag. This is the number of Haskell threads that can run truly simultaneously at any given time, and is typically set to the number of physical processor cores on the machine.

Strictly speaking it is better to use getNumCapabilities, because the number of capabilities might vary at runtime.

newTVarIO :: a -> IO (TVar a) #

IO version of newTVar. This is useful for creating top-level TVars using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

newTVar :: a -> STM (TVar a) #

Create a new TVar holding a value supplied

newStablePtrPrimMVar :: MVar () -> IO (StablePtr PrimMVar) #

Make a StablePtr that can be passed to the C function hs_try_putmvar(). The RTS wants a StablePtr to the underlying MVar#, but a StablePtr# can only refer to lifted types, so we have to cheat by coercing.

myThreadId :: IO ThreadId #

Returns the ThreadId of the calling thread (GHC only).

mkWeakThreadId :: ThreadId -> IO (Weak ThreadId) #

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

labelThread :: ThreadId -> String -> IO () #

labelThread stores a string as identifier for this thread. This identifier will be used in the debugging output to make distinction of different threads easier (otherwise you only have the thread state object's address in the heap). It also emits an event to the RTS eventlog.

Other applications like the graphical Concurrent Haskell Debugger (http://www.informatik.uni-kiel.de/~fhu/chd/) may choose to overload labelThread for their purposes as well.

killThread :: ThreadId -> IO () #

killThread raises the ThreadKilled exception in the given thread (GHC only).

killThread tid = throwTo tid ThreadKilled

getNumProcessors :: IO Int #

Returns the number of CPUs that the machine has

Since: base-4.5.0.0

getNumCapabilities :: IO Int #

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

getAllocationCounter :: IO Int64 #

Return the current value of the allocation counter for the current thread.

Since: base-4.8.0.0

forkOnWithUnmask :: Int -> ((forall a. IO a -> IO a) -> IO ()) -> IO ThreadId #

Like forkIOWithUnmask, but the child thread is pinned to the given CPU, as with forkOn.

Since: base-4.4.0.0

forkOn :: Int -> IO () -> IO ThreadId #

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

forkIOWithUnmask :: ((forall a. IO a -> IO a) -> IO ()) -> IO ThreadId #

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

forkIO :: IO () -> IO ThreadId #

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.

enableAllocationLimit :: IO () #

Enables the allocation counter to be treated as a limit for the current thread. When the allocation limit is enabled, if the allocation counter counts down below zero, the thread will be sent the AllocationLimitExceeded asynchronous exception. When this happens, the counter is reinitialised (by default to 100K, but tunable with the +RTS -xq option) so that it can handle the exception and perform any necessary clean up. If it exhausts this additional allowance, another AllocationLimitExceeded exception is sent, and so forth. Like other asynchronous exceptions, the AllocationLimitExceeded exception is deferred while the thread is inside mask or an exception handler in catch.

Note that memory allocation is unrelated to live memory, also known as heap residency. A thread can allocate a large amount of memory and retain anything between none and all of it. It is better to think of the allocation limit as a limit on CPU time, rather than a limit on memory.

Compared to using timeouts, allocation limits don't count time spent blocked or in foreign calls.

Since: base-4.8.0.0

disableAllocationLimit :: IO () #

Disable allocation limit processing for the current thread.

Since: base-4.8.0.0

catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a #

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.

atomically :: STM a -> IO a #

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.

data Dynamic where #

A value of type Dynamic is an object encapsulated together with its type.

A Dynamic may only represent a monomorphic value; an attempt to create a value of type Dynamic from a polymorphically-typed expression will result in an ambiguity error (see toDyn).

Showing a value of type Dynamic returns a pretty-printed representation of the object's type; useful for debugging.

Constructors

Dynamic :: forall a. TypeRep a -> a -> Dynamic 

Instances

Instances details
Exception Dynamic

Since: base-4.0.0.0

Instance details

Defined in Data.Dynamic

Show Dynamic

Since: base-2.1

Instance details

Defined in Data.Dynamic

fromDynamic #

Arguments

:: Typeable a 
=> Dynamic

the dynamically-typed object

-> Maybe a

returns: Just a, if the dynamically-typed object has the correct type (and a is its value), or Nothing otherwise.

Converts a Dynamic object back into an ordinary Haskell value of the correct type. See also fromDyn.

fromDyn #

Arguments

:: Typeable a 
=> Dynamic

the dynamically-typed object

-> a

a default value

-> a

returns: the value of the first argument, if it has the correct type, otherwise the value of the second argument.

Converts a Dynamic object back into an ordinary Haskell value of the correct type. See also fromDynamic.

data SomeAsyncException #

Superclass for asynchronous exceptions.

Since: base-4.7.0.0

Constructors

Exception e => SomeAsyncException e 

data FixIOException #

The exception thrown when an infinite cycle is detected in fixIO.

Since: base-4.11.0.0

Constructors

FixIOException 

Instances

Instances details
Exception FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Show FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

data ExitCode #

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
Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type #

Methods

from :: ExitCode -> Rep ExitCode x #

to :: Rep ExitCode x -> ExitCode #

Read ExitCode 
Instance details

Defined in GHC.IO.Exception

Show ExitCode 
Instance details

Defined in GHC.IO.Exception

NFData ExitCode

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ExitCode -> () #

Eq ExitCode 
Instance details

Defined in GHC.IO.Exception

Ord ExitCode 
Instance details

Defined in GHC.IO.Exception

type Rep ExitCode 
Instance details

Defined in GHC.IO.Exception

type Rep ExitCode = D1 ('MetaData "ExitCode" "GHC.IO.Exception" "base" 'False) (C1 ('MetaCons "ExitSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExitFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data Deadlock #

There are no runnable threads, so the program is deadlocked. The Deadlock exception is raised in the main thread only.

Constructors

Deadlock 

Instances

Instances details
Exception Deadlock

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

newtype CompactionFailed #

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

Constructors

CompactionFailed String 

Instances

Instances details
Exception CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Show CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

data BlockedIndefinitelyOnSTM #

The thread is waiting to retry an STM transaction, but there are no other references to any TVars involved, so it can't ever continue.

data BlockedIndefinitelyOnMVar #

The thread is blocked on an MVar, but there are no other references to the MVar so it can't ever continue.

data AsyncException #

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).

newtype AssertionFailed #

assert was applied to False.

Constructors

AssertionFailed String 

Instances

Instances details
Exception AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

data ArrayException #

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 AllocationLimitExceeded #

This thread has exceeded its allocation limit. See setAllocationCounter and enableAllocationLimit.

Since: base-4.8.0.0

ioError :: IOError -> IO a #

Raise an IOException in the IO monad.

asyncExceptionToException :: Exception e => e -> SomeException #

Since: base-4.7.0.0

modifyIORef' :: IORef a -> (a -> a) -> IO () #

Strict version of modifyIORef

Since: base-4.6.0.0

modifyIORef :: IORef a -> (a -> a) -> IO () #

Mutate the contents of an IORef.

Be warned that modifyIORef does not apply the function strictly. This means if the program calls modifyIORef many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. This is a common mistake made when using an IORef as a counter. For example, the following will likely produce a stack overflow:

ref <- newIORef 0
replicateM_ 1000000 $ modifyIORef ref (+1)
readIORef ref >>= print

To avoid this problem, use modifyIORef' instead.

mkWeakIORef :: IORef a -> IO () -> IO (Weak (IORef a)) #

Make a Weak pointer to an IORef, using the second argument as a finalizer to run when IORef is garbage-collected

atomicWriteIORef :: IORef a -> a -> IO () #

Variant of writeIORef with the "barrier to reordering" property that atomicModifyIORef has.

Since: base-4.6.0.0

atomicModifyIORef :: IORef a -> (a -> (a, b)) -> IO b #

Atomically modifies the contents of an IORef.

This function is useful for using IORef in a safe way in a multithreaded program. If you only have one IORef, then using atomicModifyIORef to access and modify it will prevent race conditions.

Extending the atomicity to multiple IORefs is problematic, so it is recommended that if you need to do anything more complicated then using MVar instead is a good idea.

atomicModifyIORef does not apply the function strictly. This is important to know even if all you are doing is replacing the value. For example, this will leak memory:

ref <- newIORef '1'
forever $ atomicModifyIORef ref (\_ -> ('2', ()))

Use atomicModifyIORef' or atomicWriteIORef to avoid this problem.

newForeignPtrEnv :: FinalizerEnvPtr env a -> Ptr env -> Ptr a -> IO (ForeignPtr a) #

This variant of newForeignPtr adds a finalizer that expects an environment in addition to the finalized pointer. The environment that will be passed to the finalizer is fixed by the second argument to newForeignPtrEnv.

newForeignPtr :: FinalizerPtr a -> Ptr a -> IO (ForeignPtr a) #

Turns a plain memory reference into a foreign pointer, and associates a finalizer with the reference. The finalizer will be executed after the last reference to the foreign object is dropped. There is no guarantee of promptness, however the finalizer will be executed before the program exits.

mallocForeignPtrArray0 :: Storable a => Int -> IO (ForeignPtr a) #

This function is similar to mallocArray0, but yields a memory area that has a finalizer attached that releases the memory area. As with mallocForeignPtr, it is not guaranteed that the block of memory was allocated by malloc.

mallocForeignPtrArray :: Storable a => Int -> IO (ForeignPtr a) #

This function is similar to mallocArray, but yields a memory area that has a finalizer attached that releases the memory area. As with mallocForeignPtr, it is not guaranteed that the block of memory was allocated by malloc.

type FinalizerPtr a = FunPtr (Ptr a -> IO ()) #

A finalizer is represented as a pointer to a foreign function that, at finalisation time, gets as an argument a plain pointer variant of the foreign pointer that the finalizer is associated with.

Note that the foreign function must use the ccall calling convention.

type FinalizerEnvPtr env a = FunPtr (Ptr env -> Ptr a -> IO ()) #

withForeignPtr :: ForeignPtr a -> (Ptr a -> IO b) -> IO b #

This is a way to look at the pointer living inside a foreign object. This function takes a function which is applied to that pointer. The resulting IO action is then executed. The foreign object is kept alive at least during the whole action, even if it is not used directly inside. Note that it is not safe to return the pointer from the action and use it after the action completes. All uses of the pointer should be inside the withForeignPtr bracket. The reason for this unsafeness is the same as for unsafeForeignPtrToPtr below: the finalizer may run earlier than expected, because the compiler can only track usage of the ForeignPtr object, not a Ptr object made from it.

This function is normally used for marshalling data to or from the object pointed to by the ForeignPtr, using the operations from the Storable class.

touchForeignPtr :: ForeignPtr a -> IO () #

This function ensures that the foreign object in question is alive at the given place in the sequence of IO actions. However, this comes with a significant caveat: the contract above does not hold if GHC can demonstrate that the code preceeding touchForeignPtr diverges (e.g. by looping infinitely or throwing an exception). For this reason, you are strongly advised to use instead withForeignPtr where possible.

Also, note that this function should not be used to express dependencies between finalizers on ForeignPtrs. For example, if the finalizer for a ForeignPtr F1 calls touchForeignPtr on a second ForeignPtr F2, then the only guarantee is that the finalizer for F2 is never started before the finalizer for F1. They might be started together if for example both F1 and F2 are otherwise unreachable, and in that case the scheduler might end up running the finalizer for F2 first.

In general, it is not recommended to use finalizers on separate objects with ordering constraints between them. To express the ordering robustly requires explicit synchronisation using MVars between the finalizers, but even then the runtime sometimes runs multiple finalizers sequentially in a single thread (for performance reasons), so synchronisation between finalizers could result in artificial deadlock. Another alternative is to use explicit reference counting.

plusForeignPtr :: ForeignPtr a -> Int -> ForeignPtr b #

Advances the given address by the given offset in bytes.

The new ForeignPtr shares the finalizer of the original, equivalent from a finalization standpoint to just creating another reference to the original. That is, the finalizer will not be called before the new ForeignPtr is unreachable, nor will it be called an additional time due to this call, and the finalizer will be called with the same address that it would have had this call not happened, *not* the new address.

Since: base-4.10.0.0

newForeignPtr_ :: Ptr a -> IO (ForeignPtr a) #

Turns a plain memory reference into a foreign pointer that may be associated with finalizers by using addForeignPtrFinalizer.

mallocForeignPtrBytes :: Int -> IO (ForeignPtr a) #

This function is similar to mallocForeignPtr, except that the size of the memory required is given explicitly as a number of bytes.

mallocForeignPtr :: Storable a => IO (ForeignPtr a) #

Allocate some memory and return a ForeignPtr to it. The memory will be released automatically when the ForeignPtr is discarded.

mallocForeignPtr is equivalent to

   do { p <- malloc; newForeignPtr finalizerFree p }

although it may be implemented differently internally: you may not assume that the memory returned by mallocForeignPtr has been allocated with malloc.

GHC notes: mallocForeignPtr has a heavily optimised implementation in GHC. It uses pinned memory in the garbage collected heap, so the ForeignPtr does not require a finalizer to free the memory. Use of mallocForeignPtr and associated functions is strongly recommended in preference to newForeignPtr with a finalizer.

finalizeForeignPtr :: ForeignPtr a -> IO () #

Causes the finalizers associated with a foreign pointer to be run immediately. The foreign pointer must not be used again after this function is called. If the foreign pointer does not support finalizers, this is a no-op.

castForeignPtr :: ForeignPtr a -> ForeignPtr b #

This function casts a ForeignPtr parameterised by one type into another type.

addForeignPtrFinalizerEnv :: FinalizerEnvPtr env a -> Ptr env -> ForeignPtr a -> IO () #

Like addForeignPtrFinalizer but the finalizer is passed an additional environment parameter.

addForeignPtrFinalizer :: FinalizerPtr a -> ForeignPtr a -> IO () #

This function adds a finalizer to the given foreign object. The finalizer will run before all other finalizers for the same object which have already been registered.

data IORef a #

A mutable variable in the IO monad

Instances

Instances details
NFData1 IORef

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> IORef a -> () #

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 -> () #

Eq (IORef a)

Pointer equality.

Since: base-4.0.0.0

Instance details

Defined in GHC.IORef

Methods

(==) :: IORef a -> IORef a -> Bool #

(/=) :: IORef a -> IORef a -> Bool #

writeIORef :: IORef a -> a -> IO () #

Write a new value into an IORef

readIORef :: IORef a -> IO a #

Read the value of an IORef

newIORef :: a -> IO (IORef a) #

Build a new IORef

atomicModifyIORef' :: IORef a -> (a -> (a, b)) -> IO b #

Strict version of atomicModifyIORef. This forces both the value stored in the IORef and the value returned. The new value is installed in the IORef before the returned value is forced. So

atomicModifyIORef' ref (x -> (x+1, undefined))

will increment the IORef and then throw an exception in the calling thread.

Since: base-4.6.0.0

data MaskingState #

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

Instances

Instances details
Show MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

NFData MaskingState

Since: deepseq-1.4.4.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MaskingState -> () #

Eq MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

type FilePath = String #

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.

uninterruptibleMask_ :: IO a -> IO a #

Like uninterruptibleMask, but does not pass a restore action to the argument.

uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

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.

throwIO :: Exception e => e -> IO a #

A variant of throw that can only be used within the IO monad.

Although throwIO has a type that is an instance of the type of throw, the two functions are subtly different:

throw e   `seq` x  ===> throw e
throwIO e `seq` x  ===> x

The first example will cause the exception e to be raised, whereas the second one won't. In fact, throwIO will only cause an exception to be raised when it is used within the IO monad. The throwIO variant should be used in preference to throw to raise an exception within the IO monad because it guarantees ordering with respect to other IO operations, whereas throw does not.

stToIO :: ST RealWorld a -> IO a #

Embed a strict state thread in an IO action. The RealWorld parameter indicates that the internal state used by the ST computation is a special one supplied by the IO monad, and thus distinct from those used by invocations of runST.

mask_ :: IO a -> IO a #

Like mask, but does not pass a restore action to the argument.

mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

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.

interruptible :: IO a -> IO a #

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

getMaskingState :: IO MaskingState #

Returns the MaskingState for the current thread.

evaluate :: a -> IO a #

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.

catch #

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 propagated further up. If you call it again, you might get the opposite behaviour. This is ok, because catch is an IO computation.

data IOException #

Exceptions that occur in the IO monad. An IOException records a more specific error type, a descriptive string and maybe the handle that was used when the error was flagged.

Instances

Instances details
Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Error IOException 
Instance details

Defined in Control.Monad.Trans.Error

MonadError IOException IO 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: IOException -> IO a #

catchError :: IO a -> (IOException -> IO a) -> IO a #

type IOError = IOException #

The Haskell 2010 type for exceptions in the IO monad. Any I/O operation may raise an IOException instead of returning a result. For a more general type of exception, including also those that arise in pure code, see Exception.

In Haskell 2010, this is an opaque type.

userError :: String -> IOError #

Construct an IOException value with a string describing the error. The fail method of the IO instance of the Monad class raises a userError, thus:

instance Monad IO where
  ...
  fail s = ioError (userError s)

data ErrorCall #

This is thrown when the user calls error. The first String is the argument given to error, second String is the location.

Bundled Patterns

pattern ErrorCall :: String -> ErrorCall 

Instances

Instances details
Exception ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Show ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Eq ErrorCall

Since: base-4.7.0.0

Instance details

Defined in GHC.Exception

Ord ErrorCall

Since: base-4.7.0.0

Instance details

Defined in GHC.Exception

throw :: forall (r :: RuntimeRep) (a :: TYPE r) e. Exception e => e -> a #

Throw an exception. Exceptions may be thrown from purely functional code, but may only be caught within the IO monad.

class (Typeable e, Show e) => Exception e where #

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 #

fromException :: SomeException -> Maybe e #

displayException :: e -> String #

Render this exception value in a human-friendly manner.

Default implementation: show.

Since: base-4.8.0.0

Instances

Instances details
Exception NestedAtomically

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 NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception PatternMatchFail

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 RecSelError

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 TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Exception Dynamic

Since: base-4.0.0.0

Instance details

Defined in Data.Dynamic

Exception Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

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 AllocationLimitExceeded

Since: base-4.8.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 AssertionFailed

Since: base-4.1.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 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 CompactionFailed

Since: base-4.10.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 ExitCode

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 IOException

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 FileLockingNotSupported 
Instance details

Defined in GHC.IO.Handle.Lock.Common

Exception Timeout

Since: base-4.7.0.0

Instance details

Defined in System.Timeout

Exception UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

type TypeRep = SomeTypeRep #

A quantified type representation.

typeRepTyCon :: TypeRep -> TyCon #

Observe the type constructor of a quantified type representation.

typeRepFingerprint :: TypeRep -> Fingerprint #

Takes a value of type a and returns a concrete representation of that type.

Since: base-4.7.0.0

typeRepArgs :: TypeRep -> [TypeRep] #

Observe the argument types of a type representation

typeRep :: forall {k} proxy (a :: k). Typeable a => proxy a -> TypeRep #

Takes a value of type a and returns a concrete representation of that type.

Since: base-4.7.0.0

typeOf7 :: Typeable t => t a b c d e f g -> TypeRep #

typeOf6 :: Typeable t => t a b c d e f -> TypeRep #

typeOf5 :: Typeable t => t a b c d e -> TypeRep #

typeOf4 :: Typeable t => t a b c d -> TypeRep #

typeOf3 :: Typeable t => t a b c -> TypeRep #

typeOf2 :: Typeable t => t a b -> TypeRep #

typeOf1 :: Typeable t => t a -> TypeRep #

typeOf :: Typeable a => a -> TypeRep #

Observe a type representation for the type of a value.

splitTyConApp :: TypeRep -> (TyCon, [TypeRep]) #

Splits a type constructor application. Note that if the type constructor is polymorphic, this will not return the kinds that were used.

showsTypeRep :: TypeRep -> ShowS #

Show a type representation

rnfTypeRep :: TypeRep -> () #

Force a TypeRep to normal form.

mkFunTy :: TypeRep -> TypeRep -> TypeRep #

Build a function type.

gcast2 :: forall {k1} {k2} {k3} c (t :: k2 -> k3 -> k1) (t' :: k2 -> k3 -> k1) (a :: k2) (b :: k3). (Typeable t, Typeable t') => c (t a b) -> Maybe (c (t' a b)) #

Cast over k1 -> k2 -> k3

gcast1 :: forall {k1} {k2} c (t :: k2 -> k1) (t' :: k2 -> k1) (a :: k2). (Typeable t, Typeable t') => c (t a) -> Maybe (c (t' a)) #

Cast over k1 -> k2

gcast :: forall {k} (a :: k) (b :: k) c. (Typeable a, Typeable b) => c a -> Maybe (c b) #

A flexible variation parameterised in a type constructor

funResultTy :: TypeRep -> TypeRep -> Maybe TypeRep #

Applies a type to a function type. Returns: Just u if the first argument represents a function of type t -> u and the second argument represents a function of type t. Otherwise, returns Nothing.

eqT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => Maybe (a :~: b) #

Extract a witness of equality of two types

Since: base-4.7.0.0

cast :: (Typeable a, Typeable b) => a -> Maybe b #

The type-safe cast operation

rnfTyCon :: TyCon -> () #

newtype Const a (b :: k) #

The Const functor.

Constructors

Const 

Fields

Instances

Instances details
Semigroupoid (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Const j k1 -> Const i j -> Const i k1 #

Generic1 (Const a :: k -> Type) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep1 (Const a) :: k -> Type #

Methods

from1 :: forall (a0 :: k0). Const a a0 -> Rep1 (Const a) a0 #

to1 :: forall (a0 :: k0). Rep1 (Const a) a0 -> Const a a0 #

Unbox a => Vector Vector (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Const a b) -> ST s (Vector (Const a b)) #

basicUnsafeThaw :: Vector (Const a b) -> ST s (Mutable Vector s (Const a b)) #

basicLength :: Vector (Const a b) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Const a b) -> Vector (Const a b) #

basicUnsafeIndexM :: Vector (Const a b) -> Int -> Box (Const a b) #

basicUnsafeCopy :: Mutable Vector s (Const a b) -> Vector (Const a b) -> ST s () #

elemseq :: Vector (Const a b) -> Const a b -> b0 -> b0 #

Unbox a => MVector MVector (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Const a b) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Const a b) -> MVector s (Const a b) #

basicOverlaps :: MVector s (Const a b) -> MVector s (Const a b) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Const a b)) #

basicInitialize :: MVector s (Const a b) -> ST s () #

basicUnsafeReplicate :: Int -> Const a b -> ST s (MVector s (Const a b)) #

basicUnsafeRead :: MVector s (Const a b) -> Int -> ST s (Const a b) #

basicUnsafeWrite :: MVector s (Const a b) -> Int -> Const a b -> ST s () #

basicClear :: MVector s (Const a b) -> ST s () #

basicSet :: MVector s (Const a b) -> Const a b -> ST s () #

basicUnsafeCopy :: MVector s (Const a b) -> MVector s (Const a b) -> ST s () #

basicUnsafeMove :: MVector s (Const a b) -> MVector s (Const a b) -> ST s () #

basicUnsafeGrow :: MVector s (Const a b) -> Int -> ST s (MVector s (Const a b)) #

Bifoldable (Const :: Type -> TYPE LiftedRep -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => Const m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Const a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Const a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Const a b -> c #

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 #

first :: (a -> b) -> Const a c -> Const b c #

second :: (b -> c) -> Const a b -> Const a c #

Bitraversable (Const :: Type -> Type -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d) #

Eq2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Const a c -> Const b d -> Bool #

Ord2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Const a c -> Const b d -> Ordering #

Read2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const a b] #

Show2 (Const :: Type -> TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Const a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Const a b] -> ShowS #

Biapplicative (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Biapplicative

Methods

bipure :: a -> b -> Const a b #

(<<*>>) :: Const (a -> b) (c -> d) -> Const a c -> Const b d #

biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> Const a d -> Const b e -> Const c f #

(*>>) :: Const a b -> Const c d -> Const c d #

(<<*) :: Const a b -> Const c d -> Const a b #

NFData2 (Const :: Type -> Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Const a b -> () #

Bifoldable1 (Const :: Type -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => Const m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Const a b -> m #

Hashable2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Const a b -> Int #

Invariant2 (Const :: Type -> Type -> Type)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Const a b -> Const c d #

Biapply (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Const (a -> b) (c -> d) -> Const a c -> Const b d #

(.>>) :: Const a b -> Const c d -> Const c d #

(<<.) :: Const a b -> Const c d -> Const a b #

Bitraversable1 (Const :: Type -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Const a c -> f (Const b d) #

bisequence1 :: Apply f => Const (f a) (f b) -> f (Const a b) #

Foldable (Const m :: TYPE LiftedRep -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Functor.Const

Methods

fold :: Monoid m0 => Const m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 #

foldr :: (a -> b -> b) -> b -> Const m a -> b #

foldr' :: (a -> b -> b) -> b -> Const m a -> b #

foldl :: (b -> a -> b) -> b -> Const m a -> b #

foldl' :: (b -> a -> b) -> b -> Const m a -> b #

foldr1 :: (a -> a -> a) -> Const m a -> a #

foldl1 :: (a -> a -> a) -> Const m a -> a #

toList :: Const m a -> [a] #

null :: Const m a -> Bool #

length :: Const m a -> Int #

elem :: Eq a => a -> Const m a -> Bool #

maximum :: Ord a => Const m a -> a #

minimum :: Ord a => Const m a -> a #

sum :: Num a => Const m a -> a #

product :: Num a => Const m a -> a #

Eq a => Eq1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b -> Bool) -> Const a a0 -> Const a b -> Bool #

Ord a => Ord1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b -> Ordering) -> Const a a0 -> Const a b -> Ordering #

Read a => Read1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Const a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Const a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Const a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Const a a0] #

Show a => Show1 (Const a :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Const a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Const a a0] -> ShowS #

Contravariant (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a0) -> Const a a0 -> Const a a' #

(>$) :: b -> Const a b -> Const a a0 #

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) #

sequenceA :: Applicative f => Const m (f a) -> f (Const m a) #

mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 (Const m b) #

sequence :: Monad m0 => Const m (m0 a) -> m0 (Const m a) #

Monoid m => Applicative (Const m :: Type -> Type)

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

(*>) :: Const m a -> Const m b -> Const m b #

(<*) :: Const m a -> Const m b -> Const m a #

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 #

(<$) :: a -> Const m b -> Const m a #

Monoid m => Divisible (Const m :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Const m b -> Const m c -> Const m a #

conquer :: Const m a #

NFData a => NFData1 (Const a :: TYPE LiftedRep -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Const a a0 -> () #

Hashable a => Hashable1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Const a a0 -> Int #

Invariant (Const a :: Type -> Type)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Const a a0 -> Const a b #

Adjustable (Const e :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key (Const e) -> Const e a -> Const e a #

replace :: Key (Const e) -> a -> Const e a -> Const e a #

FoldableWithKey (Const e :: TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Const e a -> [(Key (Const e), a)] #

foldMapWithKey :: Monoid m => (Key (Const e) -> a -> m) -> Const e a -> m #

foldrWithKey :: (Key (Const e) -> a -> b -> b) -> b -> Const e a -> b #

foldlWithKey :: (b -> Key (Const e) -> a -> b) -> b -> Const e a -> b #

Indexable (Const e :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

index :: Const e a -> Key (Const e) -> a #

Keyed (Const e :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key (Const e) -> a -> b) -> Const e a -> Const e b #

Lookup (Const e :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

lookup :: Key (Const e) -> Const e a -> Maybe a #

TraversableWithKey (Const e :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key (Const e) -> a -> f b) -> Const e a -> f (Const e b) #

mapWithKeyM :: Monad m => (Key (Const e) -> a -> m b) -> Const e a -> m (Const e b) #

Semigroup m => Apply (Const m :: Type -> Type)

A Const m is not Applicative unless its m is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Const m (a -> b) -> Const m a -> Const m b #

(.>) :: Const m a -> Const m b -> Const m b #

(<.) :: Const m a -> Const m b -> Const m a #

liftF2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

Sieve (Forget r :: Type -> Type -> TYPE LiftedRep) (Const r :: Type -> Type) 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: Forget r a b -> a -> Const r b #

(Typeable k, Data a, Typeable b) => Data (Const a b)

Since: base-4.10.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Const a b -> c (Const a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const a b) #

toConstr :: Const a b -> Constr #

dataTypeOf :: Const a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Const a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Const a b -> Const a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Const a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Const a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #

IsString a => IsString (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Const a b #

Storable a => Storable (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

sizeOf :: Const a b -> Int #

alignment :: Const a b -> Int #

peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) #

pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () #

peekByteOff :: Ptr b0 -> Int -> IO (Const a b) #

pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () #

peek :: Ptr (Const a b) -> IO (Const a b) #

poke :: Ptr (Const a b) -> Const a b -> IO () #

Monoid a => Monoid (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: Const a b #

mappend :: Const a b -> Const a b -> Const a b #

mconcat :: [Const a b] -> Const a b #

Semigroup a => Semigroup (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(<>) :: Const a b -> Const a b -> Const a b #

sconcat :: NonEmpty (Const a b) -> Const a b #

stimes :: Integral b0 => b0 -> Const a b -> Const a b #

Bits a => Bits (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(.&.) :: Const a b -> Const a b -> Const a b #

(.|.) :: Const a b -> Const a b -> Const a b #

xor :: Const a b -> Const a b -> Const a b #

complement :: Const a b -> Const a b #

shift :: Const a b -> Int -> Const a b #

rotate :: Const a b -> Int -> Const a b #

zeroBits :: Const a b #

bit :: Int -> Const a b #

setBit :: Const a b -> Int -> Const a b #

clearBit :: Const a b -> Int -> Const a b #

complementBit :: Const a b -> Int -> Const a b #

testBit :: Const a b -> Int -> Bool #

bitSizeMaybe :: Const a b -> Maybe Int #

bitSize :: Const a b -> Int #

isSigned :: Const a b -> Bool #

shiftL :: Const a b -> Int -> Const a b #

unsafeShiftL :: Const a b -> Int -> Const a b #

shiftR :: Const a b -> Int -> Const a b #

unsafeShiftR :: Const a b -> Int -> Const a b #

rotateL :: Const a b -> Int -> Const a b #

rotateR :: Const a b -> Int -> Const a b #

popCount :: Const a b -> Int #

FiniteBits a => FiniteBits (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Bounded a => Bounded (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

minBound :: Const a b #

maxBound :: Const a b #

Enum a => Enum (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

succ :: Const a b -> Const a b #

pred :: Const a b -> Const a b #

toEnum :: Int -> Const a b #

fromEnum :: Const a b -> Int #

enumFrom :: Const a b -> [Const a b] #

enumFromThen :: Const a b -> Const a b -> [Const a b] #

enumFromTo :: Const a b -> Const a b -> [Const a b] #

enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] #

Floating a => Floating (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

pi :: Const a b #

exp :: Const a b -> Const a b #

log :: Const a b -> Const a b #

sqrt :: Const a b -> Const a b #

(**) :: Const a b -> Const a b -> Const a b #

logBase :: Const a b -> Const a b -> Const a b #

sin :: Const a b -> Const a b #

cos :: Const a b -> Const a b #

tan :: Const a b -> Const a b #

asin :: Const a b -> Const a b #

acos :: Const a b -> Const a b #

atan :: Const a b -> Const a b #

sinh :: Const a b -> Const a b #

cosh :: Const a b -> Const a b #

tanh :: Const a b -> Const a b #

asinh :: Const a b -> Const a b #

acosh :: Const a b -> Const a b #

atanh :: Const a b -> Const a b #

log1p :: Const a b -> Const a b #

expm1 :: Const a b -> Const a b #

log1pexp :: Const a b -> Const a b #

log1mexp :: Const a b -> Const a b #

RealFloat a => RealFloat (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

floatRadix :: Const a b -> Integer #

floatDigits :: Const a b -> Int #

floatRange :: Const a b -> (Int, Int) #

decodeFloat :: Const a b -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Const a b #

exponent :: Const a b -> Int #

significand :: Const a b -> Const a b #

scaleFloat :: Int -> Const a b -> Const a b #

isNaN :: Const a b -> Bool #

isInfinite :: Const a b -> Bool #

isDenormalized :: Const a b -> Bool #

isNegativeZero :: Const a b -> Bool #

isIEEE :: Const a b -> Bool #

atan2 :: Const a b -> Const a b -> Const a b #

Generic (Const a b) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep (Const a b) :: Type -> Type #

Methods

from :: Const a b -> Rep (Const a b) x #

to :: Rep (Const a b) x -> Const a b #

Ix a => Ix (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

range :: (Const a b, Const a b) -> [Const a b] #

index :: (Const a b, Const a b) -> Const a b -> Int #

unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int #

inRange :: (Const a b, Const a b) -> Const a b -> Bool #

rangeSize :: (Const a b, Const a b) -> Int #

unsafeRangeSize :: (Const a b, Const a b) -> Int #

Num a => Num (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(+) :: Const a b -> Const a b -> Const a b #

(-) :: Const a b -> Const a b -> Const a b #

(*) :: Const a b -> Const a b -> Const a b #

negate :: Const a b -> Const a b #

abs :: Const a b -> Const a b #

signum :: Const a b -> Const a b #

fromInteger :: Integer -> Const a b #

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

Fractional a => Fractional (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(/) :: Const a b -> Const a b -> Const a b #

recip :: Const a b -> Const a b #

fromRational :: Rational -> Const a b #

Integral a => Integral (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

quot :: Const a b -> Const a b -> Const a b #

rem :: Const a b -> Const a b -> Const a b #

div :: Const a b -> Const a b -> Const a b #

mod :: Const a b -> Const a b -> Const a b #

quotRem :: Const a b -> Const a b -> (Const a b, Const a b) #

divMod :: Const a b -> Const a b -> (Const a b, Const a b) #

toInteger :: Const a b -> Integer #

Real a => Real (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

toRational :: Const a b -> Rational #

RealFrac a => RealFrac (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

properFraction :: Integral b0 => Const a b -> (b0, Const a b) #

truncate :: Integral b0 => Const a b -> b0 #

round :: Integral b0 => Const a b -> b0 #

ceiling :: Integral b0 => Const a b -> b0 #

floor :: Integral b0 => Const a b -> b0 #

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

Methods

showsPrec :: Int -> Const a b -> ShowS #

show :: Const a b -> String #

showList :: [Const a b] -> ShowS #

NFData a => NFData (Const a b)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Const a b -> () #

Eq a => Eq (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(==) :: Const a b -> Const a b -> Bool #

(/=) :: Const a b -> Const a b -> Bool #

Ord a => Ord (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

compare :: Const a b -> Const a b -> Ordering #

(<) :: Const a b -> Const a b -> Bool #

(<=) :: Const a b -> Const a b -> Bool #

(>) :: Const a b -> Const a b -> Bool #

(>=) :: Const a b -> Const a b -> Bool #

max :: Const a b -> Const a b -> Const a b #

min :: Const a b -> Const a b -> Const a b #

Abelian a => Abelian (Const a x) 
Instance details

Defined in Data.Group

Cyclic a => Cyclic (Const a x) 
Instance details

Defined in Data.Group

Methods

generator :: Const a x #

Group a => Group (Const a x)

Const lifts groups into a functor.

Instance details

Defined in Data.Group

Methods

invert :: Const a x -> Const a x #

(~~) :: Const a x -> Const a x -> Const a x #

pow :: Integral x0 => Const a x -> x0 -> Const a x #

Hashable a => Hashable (Const a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Const a b -> Int #

hash :: Const a b -> Int #

Prim a => Prim (Const a b)

Since: primitive-0.6.5.0

Instance details

Defined in Data.Primitive.Types

Methods

sizeOfType# :: Proxy (Const a b) -> Int# #

sizeOf# :: Const a b -> Int# #

alignmentOfType# :: Proxy (Const a b) -> Int# #

alignment# :: Const a b -> Int# #

indexByteArray# :: ByteArray# -> Int# -> Const a b #

readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Const a b #) #

writeByteArray# :: MutableByteArray# s -> Int# -> Const a b -> State# s -> State# s #

setByteArray# :: MutableByteArray# s -> Int# -> Int# -> Const a b -> State# s -> State# s #

indexOffAddr# :: Addr# -> Int# -> Const a b #

readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, Const a b #) #

writeOffAddr# :: Addr# -> Int# -> Const a b -> State# s -> State# s #

setOffAddr# :: Addr# -> Int# -> Int# -> Const a b -> State# s -> State# s #

Unbox a => Unbox (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 (Const a :: k -> Type)

Since: base-4.9.0.0

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

newtype MVector s (Const a b) = MV_Const (MVector s a)
type Key (Const e :: Type -> Type) 
Instance details

Defined in Data.Key

type Key (Const e :: Type -> Type) = Void
type Rep (Const a b)

Since: base-4.9.0.0

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

newtype Vector (Const a b) = V_Const (Vector a)

traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () #

Map each element of a structure to an Applicative action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see traverse.

traverse_ is just like mapM_, but generalised to Applicative actions.

Examples

Expand

Basic usage:

>>> traverse_ print ["Hello", "world", "!"]
"Hello"
"world"
"!"

sequence_ :: (Foldable t, Monad m) => t (m a) -> m () #

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.

sequence_ is just like sequenceA_, but specialised to monadic actions.

sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f () #

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.

sequenceA_ is just like sequence_, but generalised to Applicative actions.

Examples

Expand

Basic usage:

>>> sequenceA_ [print "Hello", print "world", print "!"]
"Hello"
"world"
"!"

or :: Foldable t => t Bool -> Bool #

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.

Examples

Expand

Basic usage:

>>> or []
False
>>> or [True]
True
>>> or [False]
False
>>> or [True, True, False]
True
>>> or (True : repeat False) -- Infinite list [True,False,False,False,...
True
>>> or (repeat False)
* Hangs forever *

notElem :: (Foldable t, Eq a) => a -> t a -> Bool infix 4 #

notElem is the negation of elem.

Examples

Expand

Basic usage:

>>> 3 `notElem` []
True
>>> 3 `notElem` [1,2]
True
>>> 3 `notElem` [1,2,3,4,5]
False

For infinite structures, notElem terminates if the value exists at a finite distance from the left side of the structure:

>>> 3 `notElem` [1..]
False
>>> 3 `notElem` ([4..] ++ [3])
* Hangs forever *

msum :: (Foldable t, MonadPlus m) => t (m a) -> m a #

The sum of a collection of actions, generalizing concat.

msum is just like asum, but specialised to MonadPlus.

minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a #

The least element of a non-empty structure with respect to the given comparison function.

Examples

Expand

Basic usage:

>>> minimumBy (compare `on` length) ["Hello", "World", "!", "Longest", "bar"]
"!"

WARNING: This function is partial for possibly-empty structures like lists.

maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a #

The largest element of a non-empty structure with respect to the given comparison function.

Examples

Expand

Basic usage:

>>> maximumBy (compare `on` length) ["Hello", "World", "!", "Longest", "bar"]
"Longest"

WARNING: This function is partial for possibly-empty structures like lists.

mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () #

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.

mapM_ is just like traverse_, but specialised to monadic actions.

for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f () #

for_ is traverse_ with its arguments flipped. For a version that doesn't ignore the results see for. This is forM_ generalised to Applicative actions.

for_ is just like forM_, but generalised to Applicative actions.

Examples

Expand

Basic usage:

>>> for_ [1..4] print
1
2
3
4

forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m () #

forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM.

forM_ is just like for_, but specialised to monadic actions.

foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b #

Right-to-left monadic fold over the elements of a structure.

Given a structure t with elements (a, b, c, ..., x, y), the result of a fold with an operator function f is equivalent to:

foldrM f z t = do
    yy <- f y z
    xx <- f x yy
    ...
    bb <- f b cc
    aa <- f a bb
    return aa -- Just @return z@ when the structure is empty

For a Monad m, given two functions f1 :: a -> m b and f2 :: b -> m c, their Kleisli composition (f1 >=> f2) :: a -> m c is defined by:

(f1 >=> f2) a = f1 a >>= f2

Another way of thinking about foldrM is that it amounts to an application to z of a Kleisli composition:

foldrM f z t = f y >=> f x >=> ... >=> f b >=> f a $ z

The monadic effects of foldrM are sequenced from right to left, and e.g. folds of infinite lists will diverge.

If at some step the bind operator (>>=) short-circuits (as with, e.g., mzero in a MonadPlus), the evaluated effects will be from a tail of the element sequence. If you want to evaluate the monadic effects in left-to-right order, or perhaps be able to short-circuit after an initial sequence of elements, you'll need to use foldlM instead.

If the monadic effects don't short-circuit, the outermost application of f is to the leftmost element a, so that, ignoring effects, the result looks like a right fold:

a `f` (b `f` (c `f` (... (x `f` (y `f` z))))).

Examples

Expand

Basic usage:

>>> let f i acc = do { print i ; return $ i : acc }
>>> foldrM f [] [0..3]
3
2
1
0
[0,1,2,3]

foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b #

Left-to-right monadic fold over the elements of a structure.

Given a structure t with elements (a, b, ..., w, x, y), the result of a fold with an operator function f is equivalent to:

foldlM f z t = do
    aa <- f z a
    bb <- f aa b
    ...
    xx <- f ww x
    yy <- f xx y
    return yy -- Just @return z@ when the structure is empty

For a Monad m, given two functions f1 :: a -> m b and f2 :: b -> m c, their Kleisli composition (f1 >=> f2) :: a -> m c is defined by:

(f1 >=> f2) a = f1 a >>= f2

Another way of thinking about foldlM is that it amounts to an application to z of a Kleisli composition:

foldlM f z t =
    flip f a >=> flip f b >=> ... >=> flip f x >=> flip f y $ z

The monadic effects of foldlM are sequenced from left to right.

If at some step the bind operator (>>=) short-circuits (as with, e.g., mzero in a MonadPlus), the evaluated effects will be from an initial segment of the element sequence. If you want to evaluate the monadic effects in right-to-left order, or perhaps be able to short-circuit after processing a tail of the sequence of elements, you'll need to use foldrM instead.

If the monadic effects don't short-circuit, the outermost application of f is to the rightmost element y, so that, ignoring effects, the result looks like a left fold:

((((z `f` a) `f` b) ... `f` w) `f` x) `f` y

Examples

Expand

Basic usage:

>>> let f a e = do { print e ; return $ e : a }
>>> foldlM f [] [0..3]
0
1
2
3
[3,2,1,0]

find :: Foldable t => (a -> Bool) -> t a -> Maybe a #

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.

Examples

Expand

Basic usage:

>>> find (> 42) [0, 5..]
Just 45
>>> find (> 12) [1..7]
Nothing

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] #

Map a function over all the elements of a container and concatenate the resulting lists.

Examples

Expand

Basic usage:

>>> concatMap (take 3) [[1..], [10..], [100..], [1000..]]
[1,2,3,10,11,12,100,101,102,1000,1001,1002]
>>> concatMap (take 3) (Just [1..])
[1,2,3]

concat :: Foldable t => t [a] -> [a] #

The concatenation of all the elements of a container of lists.

Examples

Expand

Basic usage:

>>> concat (Just [1, 2, 3])
[1,2,3]
>>> concat (Left 42)
[]
>>> concat [[1, 2, 3], [4, 5], [6], []]
[1,2,3,4,5,6]

asum :: (Foldable t, Alternative f) => t (f a) -> f a #

The sum of a collection of actions, generalizing concat.

asum is just like msum, but generalised to Alternative.

Examples

Expand

Basic usage:

>>> asum [Just "Hello", Nothing, Just "World"]
Just "Hello"

any :: Foldable t => (a -> Bool) -> t a -> Bool #

Determines whether any element of the structure satisfies the predicate.

Examples

Expand

Basic usage:

>>> any (> 3) []
False
>>> any (> 3) [1,2]
False
>>> any (> 3) [1,2,3,4,5]
True
>>> any (> 3) [1..]
True
>>> any (> 3) [0, -1..]
* Hangs forever *

and :: Foldable t => t Bool -> Bool #

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.

Examples

Expand

Basic usage:

>>> and []
True
>>> and [True]
True
>>> and [False]
False
>>> and [True, True, False]
False
>>> and (False : repeat True) -- Infinite list [False,True,True,True,...
False
>>> and (repeat True)
* Hangs forever *

all :: Foldable t => (a -> Bool) -> t a -> Bool #

Determines whether all elements of the structure satisfy the predicate.

Examples

Expand

Basic usage:

>>> all (> 3) []
True
>>> all (> 3) [1,2]
False
>>> all (> 3) [1,2,3,4,5]
False
>>> all (> 3) [1..]
False
>>> all (> 3) [4..]
* Hangs forever *

zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] #

The zipWith7 function takes a function which combines seven elements, as well as seven lists and returns a list of their point-wise combination, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] #

The zipWith6 function takes a function which combines six elements, as well as six lists and returns a list of their point-wise combination, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zipWith5 :: (a -> b -> c -> d -> e -> f) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] #

The zipWith5 function takes a function which combines five elements, as well as five lists and returns a list of their point-wise combination, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zipWith4 :: (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] #

The zipWith4 function takes a function which combines four elements, as well as four lists and returns a list of their point-wise combination, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip7 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)] #

The zip7 function takes seven lists and returns a list of seven-tuples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip6 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)] #

The zip6 function takes six lists and returns a list of six-tuples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)] #

The zip5 function takes five lists and returns a list of five-tuples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)] #

The zip4 function takes four lists and returns a list of quadruples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

words :: String -> [String] #

words breaks a string up into a list of words, which were delimited by white space.

>>> words "Lorem ipsum\ndolor"
["Lorem","ipsum","dolor"]

unzip7 :: [(a, b, c, d, e, f, g)] -> ([a], [b], [c], [d], [e], [f], [g]) #

The unzip7 function takes a list of seven-tuples and returns seven lists, analogous to unzip.

unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f]) #

The unzip6 function takes a list of six-tuples and returns six lists, analogous to unzip.

unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e]) #

The unzip5 function takes a list of five-tuples and returns five lists, analogous to unzip.

unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d]) #

The unzip4 function takes a list of quadruples and returns four lists, analogous to unzip.

unwords :: [String] -> String #

unwords is an inverse operation to words. It joins words with separating spaces.

>>> unwords ["Lorem", "ipsum", "dolor"]
"Lorem ipsum dolor"

unlines :: [String] -> String #

unlines is an inverse operation to lines. It joins lines, after appending a terminating newline to each.

>>> unlines ["Hello", "World", "!"]
"Hello\nWorld\n!\n"

unionBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #

The unionBy function is the non-overloaded version of union.

union :: Eq a => [a] -> [a] -> [a] #

The union function returns the list union of the two lists. For example,

>>> "dog" `union` "cow"
"dogcw"

Duplicates, and elements of the first list, are removed from the the second list, but if the first list contains duplicates, so will the result. It is a special case of unionBy, which allows the programmer to supply their own equality test.

unfoldr :: (b -> Maybe (a, b)) -> b -> [a] #

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]

transpose :: [[a]] -> [[a]] #

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]]

tails :: [a] -> [[a]] #

\(\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 _|_ = _|_ : _|_

subsequences :: [a] -> [[a]] #

The subsequences function returns the list of all subsequences of the argument.

>>> subsequences "abc"
["","a","b","ab","c","ac","bc","abc"]

stripPrefix :: Eq a => [a] -> [a] -> Maybe [a] #

\(\mathcal{O}(\min(m,n))\). The stripPrefix function drops the given prefix from a list. It returns Nothing if the list did not start with the prefix given, or Just the list after the prefix, if it does.

>>> stripPrefix "foo" "foobar"
Just "bar"
>>> stripPrefix "foo" "foo"
Just ""
>>> stripPrefix "foo" "barfoo"
Nothing
>>> stripPrefix "foo" "barfoobaz"
Nothing

sortOn :: Ord b => (a -> b) -> [a] -> [a] #

Sort a list by comparing the results of a key function applied to each element. sortOn f is equivalent to sortBy (comparing f), but has the performance advantage of only evaluating f once for each element in the input list. This is called the decorate-sort-undecorate paradigm, or Schwartzian transform.

Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.

>>> sortOn fst [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]

Since: base-4.8.0.0

sortBy :: (a -> a -> Ordering) -> [a] -> [a] #

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] #

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]

singleton :: a -> [a] #

Produce singleton list.

>>> singleton True
[True]

Since: base-4.15.0.0

permutations :: [a] -> [[a]] #

The permutations function returns the list of all permutations of the argument.

>>> permutations "abc"
["abc","bac","cba","bca","cab","acb"]

partition :: (a -> Bool) -> [a] -> ([a], [a]) #

The partition function takes a predicate and a list, and returns the pair of lists of elements which do and do not satisfy the predicate, respectively; i.e.,

partition p xs == (filter p xs, filter (not . p) xs)
>>> partition (`elem` "aeiou") "Hello World!"
("eoo","Hll Wrld!")

nubBy :: (a -> a -> Bool) -> [a] -> [a] #

The nubBy function behaves just like nub, except it uses a user-supplied equality predicate instead of the overloaded == function.

>>> nubBy (\x y -> mod x 3 == mod y 3) [1,2,4,5,6]
[1,2,6]

nub :: Eq a => [a] -> [a] #

\(\mathcal{O}(n^2)\). The nub function removes duplicate elements from a list. In particular, it keeps only the first occurrence of each element. (The name nub means `essence'.) It is a special case of nubBy, which allows the programmer to supply their own equality test.

>>> nub [1,2,3,4,3,2,1,2,4,3,5]
[1,2,3,4,5]

lines :: String -> [String] #

lines breaks a string up into a list of strings at newline characters. The resulting strings do not contain newlines.

Note that after splitting the string at newline characters, the last part of the string is considered a line even if it doesn't end with a newline. For example,

>>> lines ""
[]
>>> lines "\n"
[""]
>>> lines "one"
["one"]
>>> lines "one\n"
["one"]
>>> lines "one\n\n"
["one",""]
>>> lines "one\ntwo"
["one","two"]
>>> lines "one\ntwo\n"
["one","two"]

Thus lines s contains at least as many elements as newlines in s.

isSuffixOf :: Eq a => [a] -> [a] -> Bool #

The isSuffixOf function takes two lists and returns True iff the first list is a suffix of the second. The second list must be finite.

>>> "ld!" `isSuffixOf` "Hello World!"
True
>>> "World" `isSuffixOf` "Hello World!"
False

isPrefixOf :: Eq a => [a] -> [a] -> Bool #

\(\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

isInfixOf :: Eq a => [a] -> [a] -> Bool #

The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second.

>>> isInfixOf "Haskell" "I really like Haskell."
True
>>> isInfixOf "Ial" "I really like Haskell."
False

intersperse :: a -> [a] -> [a] #

\(\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"

intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #

The intersectBy function is the non-overloaded version of intersect.

intersect :: Eq a => [a] -> [a] -> [a] #

The intersect function takes the list intersection of two lists. For example,

>>> [1,2,3,4] `intersect` [2,4,6,8]
[2,4]

If the first list contains duplicates, so will the result.

>>> [1,2,2,3,4] `intersect` [6,4,4,2]
[2,2,4]

It is a special case of intersectBy, which allows the programmer to supply their own equality test. If the element is found in both the first and the second list, the element from the first list will be used.

intercalate :: [a] -> [[a]] -> [a] #

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"

insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a] #

\(\mathcal{O}(n)\). The non-overloaded version of insert.

insert :: Ord a => a -> [a] -> [a] #

\(\mathcal{O}(n)\). The insert function takes an element and a list and inserts the element into the list at the first position where it is less than or equal to the next element. In particular, if the list is sorted before the call, the result will also be sorted. It is a special case of insertBy, which allows the programmer to supply their own comparison function.

>>> insert 4 [1,2,3,5,6,7]
[1,2,3,4,5,6,7]

inits :: [a] -> [[a]] #

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]] #

The groupBy function is the non-overloaded version of group.

group :: Eq a => [a] -> [[a]] #

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.

genericTake :: Integral i => i -> [a] -> [a] #

The genericTake function is an overloaded version of take, which accepts any Integral value as the number of elements to take.

genericSplitAt :: Integral i => i -> [a] -> ([a], [a]) #

The genericSplitAt function is an overloaded version of splitAt, which accepts any Integral value as the position at which to split.

genericReplicate :: Integral i => i -> a -> [a] #

The genericReplicate function is an overloaded version of replicate, which accepts any Integral value as the number of repetitions to make.

genericLength :: Num i => [a] -> i #

\(\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

genericIndex :: Integral i => [a] -> i -> a #

The genericIndex function is an overloaded version of !!, which accepts any Integral value as the index.

genericDrop :: Integral i => i -> [a] -> [a] #

The genericDrop function is an overloaded version of drop, which accepts any Integral value as the number of elements to drop.

findIndices :: (a -> Bool) -> [a] -> [Int] #

The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order.

>>> findIndices (`elem` "aeiou") "Hello World!"
[1,4,7]

findIndex :: (a -> Bool) -> [a] -> Maybe Int #

The findIndex function takes a predicate and a list and returns the index of the first element in the list satisfying the predicate, or Nothing if there is no such element.

>>> findIndex isSpace "Hello World!"
Just 5

elemIndices :: Eq a => a -> [a] -> [Int] #

The elemIndices function extends elemIndex, by returning the indices of all elements equal to the query element, in ascending order.

>>> elemIndices 'o' "Hello World"
[4,7]

elemIndex :: Eq a => a -> [a] -> Maybe Int #

The elemIndex function returns the index of the first element in the given list which is equal (by ==) to the query element, or Nothing if there is no such element.

>>> elemIndex 4 [0..]
Just 4

dropWhileEnd :: (a -> Bool) -> [a] -> [a] #

The dropWhileEnd function drops the largest suffix of a list in which the given predicate holds for all elements. For example:

>>> dropWhileEnd isSpace "foo\n"
"foo"
>>> dropWhileEnd isSpace "foo bar"
"foo bar"
dropWhileEnd isSpace ("foo\n" ++ undefined) == "foo" ++ undefined

Since: base-4.5.0.0

deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #

The deleteFirstsBy function takes a predicate and two lists and returns the first list with the first occurrence of each element of the second list removed.

deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a] #

\(\mathcal{O}(n)\). The deleteBy function behaves like delete, but takes a user-supplied equality predicate.

>>> deleteBy (<=) 4 [1..10]
[1,2,3,5,6,7,8,9,10]

delete :: Eq a => a -> [a] -> [a] #

\(\mathcal{O}(n)\). delete x removes the first occurrence of x from its list argument. For example,

>>> delete 'a' "banana"
"bnana"

It is a special case of deleteBy, which allows the programmer to supply their own equality test.

(\\) :: Eq a => [a] -> [a] -> [a] infix 5 #

The \\ function is list difference (non-associative). In the result of xs \\ ys, the first occurrence of each element of ys in turn (if any) has been removed from xs. Thus

(xs ++ ys) \\ xs == ys.
>>> "Hello World!" \\ "ell W"
"Hoorld!"

It is a special case of deleteFirstsBy, which allows the programmer to supply their own equality test.

newtype Ap (f :: k -> Type) (a :: k) #

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) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 (Ap f) :: k -> Type #

Methods

from1 :: forall (a :: k0). Ap f a -> Rep1 (Ap f) a #

to1 :: forall (a :: k0). Rep1 (Ap f) a -> Ap f a #

MonadFail f => MonadFail (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fail :: String -> Ap f a #

MonadFix f => MonadFix (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Ap f a) -> Ap f a #

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 #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m #

foldMap' :: Monoid m => (a -> m) -> Ap f a -> m #

foldr :: (a -> b -> b) -> b -> Ap f a -> b #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b #

foldl :: (b -> a -> b) -> b -> Ap f a -> b #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b #

foldr1 :: (a -> a -> a) -> Ap f a -> a #

foldl1 :: (a -> a -> a) -> Ap f a -> a #

toList :: Ap f a -> [a] #

null :: Ap f a -> Bool #

length :: Ap f a -> Int #

elem :: Eq a => a -> Ap f a -> Bool #

maximum :: Ord a => Ap f a -> a #

minimum :: Ord a => Ap f a -> a #

sum :: Num a => Ap f a -> a #

product :: Num a => Ap f a -> a #

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) #

sequenceA :: Applicative f0 => Ap f (f0 a) -> f0 (Ap f a) #

mapM :: Monad m => (a -> m b) -> Ap f a -> m (Ap f b) #

sequence :: Monad m => Ap f (m a) -> m (Ap f a) #

Alternative f => Alternative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

empty :: Ap f a #

(<|>) :: Ap f a -> Ap f a -> Ap f a #

some :: Ap f a -> Ap f [a] #

many :: Ap f a -> Ap f [a] #

Applicative f => Applicative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #

(*>) :: Ap f a -> Ap f b -> Ap f b #

(<*) :: Ap f a -> Ap f b -> Ap f a #

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 #

(<$) :: a -> Ap f b -> Ap f a #

Monad f => Monad (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b #

(>>) :: Ap f a -> Ap f b -> Ap f b #

return :: a -> Ap f a #

MonadPlus f => MonadPlus (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mzero :: Ap f a #

mplus :: Ap f a -> Ap f a -> Ap f a #

Foldable1 f => Foldable1 (Ap f) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Ap f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Ap f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Ap f a -> m #

toNonEmpty :: Ap f a -> NonEmpty a #

maximum :: Ord a => Ap f a -> a #

minimum :: Ord a => Ap f a -> a #

head :: Ap f a -> a #

last :: Ap f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Ap f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Ap f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Ap f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Ap f a -> b #

(Data (f a), Data a, Typeable f) => Data (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ap f a -> c (Ap f a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ap f a) #

toConstr :: Ap f a -> Constr #

dataTypeOf :: Ap f a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ap f a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ap f a)) #

gmapT :: (forall b. Data b => b -> b) -> Ap f a -> Ap f a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ap f a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ap f a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ap f a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ap f a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ap f a -> m (Ap f a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ap f a -> m (Ap f a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ap f a -> m (Ap f a) #

(Applicative f, Monoid a) => Monoid (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mempty :: Ap f a #

mappend :: Ap f a -> Ap f a -> Ap f a #

mconcat :: [Ap f a] -> Ap f a #

(Applicative f, Semigroup a) => Semigroup (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Ap f a -> Ap f a -> Ap f a #

sconcat :: NonEmpty (Ap f a) -> Ap f a #

stimes :: Integral b => b -> Ap f a -> Ap f a #

(Applicative f, Bounded a) => Bounded (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

minBound :: Ap f a #

maxBound :: Ap f a #

Enum (f a) => Enum (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

succ :: Ap f a -> Ap f a #

pred :: Ap f a -> Ap f a #

toEnum :: Int -> Ap f a #

fromEnum :: Ap f a -> Int #

enumFrom :: Ap f a -> [Ap f a] #

enumFromThen :: Ap f a -> Ap f a -> [Ap f a] #

enumFromTo :: Ap f a -> Ap f a -> [Ap f a] #

enumFromThenTo :: Ap f a -> Ap f a -> Ap f a -> [Ap f a] #

Generic (Ap f a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type #

Methods

from :: Ap f a -> Rep (Ap f a) x #

to :: Rep (Ap f a) x -> Ap f a #

(Applicative f, Num a) => Num (Ap f a)

Note that even if the underlying Num and Applicative instances are lawful, for most Applicatives, this instance will not be lawful. If you use this instance with the list Applicative, the following customary laws will not hold:

Commutativity:

>>> Ap [10,20] + Ap [1,2]
Ap {getAp = [11,12,21,22]}
>>> Ap [1,2] + Ap [10,20]
Ap {getAp = [11,21,12,22]}

Additive inverse:

>>> Ap [] + negate (Ap [])
Ap {getAp = []}
>>> fromInteger 0 :: Ap [] Int
Ap {getAp = [0]}

Distributivity:

>>> Ap [1,2] * (3 + 4)
Ap {getAp = [7,14]}
>>> (Ap [1,2] * 3) + (Ap [1,2] * 4)
Ap {getAp = [7,11,10,14]}

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(+) :: Ap f a -> Ap f a -> Ap f a #

(-) :: Ap f a -> Ap f a -> Ap f a #

(*) :: Ap f a -> Ap f a -> Ap f a #

negate :: Ap f a -> Ap f a #

abs :: Ap f a -> Ap f a #

signum :: Ap f a -> Ap f a #

fromInteger :: Integer -> Ap f a #

Read (f a) => Read (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

readsPrec :: Int -> ReadS (Ap f a) #

readList :: ReadS [Ap f a] #

readPrec :: ReadPrec (Ap f a) #

readListPrec :: ReadPrec [Ap f a] #

Show (f a) => Show (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Ap f a -> ShowS #

show :: Ap f a -> String #

showList :: [Ap f a] -> ShowS #

Eq (f a) => Eq (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(==) :: Ap f a -> Ap f a -> Bool #

(/=) :: Ap f a -> Ap f a -> Bool #

Ord (f a) => Ord (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

compare :: Ap f a -> Ap f a -> Ordering #

(<) :: Ap f a -> Ap f a -> Bool #

(<=) :: Ap f a -> Ap f a -> Bool #

(>) :: Ap f a -> Ap f a -> Bool #

(>=) :: Ap f a -> Ap f a -> Bool #

max :: Ap f a -> Ap f a -> Ap f a #

min :: Ap f a -> Ap f a -> Ap f a #

type Rep1 (Ap f :: k -> Type)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

type Rep1 (Ap f :: k -> Type) = D1 ('MetaData "Ap" "Data.Monoid" "base" 'True) (C1 ('MetaCons "Ap" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f)))
type Rep (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

type Rep (Ap f a) = D1 ('MetaData "Ap" "Data.Monoid" "base" 'True) (C1 ('MetaCons "Ap" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a))))

newtype Sum a #

Monoid under addition.

>>> getSum (Sum 1 <> Sum 2 <> mempty)
3

Constructors

Sum 

Fields

Instances

Instances details
Representable Sum 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Sum #

Methods

tabulate :: (Rep Sum -> a) -> Sum a #

index :: Sum a -> Rep Sum -> a #

MonadFix Sum

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Sum a) -> Sum a #

MonadZip Sum

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: Sum a -> Sum b -> Sum (a, b) #

mzipWith :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

munzip :: Sum (a, b) -> (Sum a, Sum b) #

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Sum m -> m #

foldMap :: Monoid m => (a -> m) -> Sum a -> m #

foldMap' :: Monoid m => (a -> m) -> Sum a -> m #

foldr :: (a -> b -> b) -> b -> Sum a -> b #

foldr' :: (a -> b -> b) -> b -> Sum a -> b #

foldl :: (b -> a -> b) -> b -> Sum a -> b #

foldl' :: (b -> a -> b) -> b -> Sum a -> b #

foldr1 :: (a -> a -> a) -> Sum a -> a #

foldl1 :: (a -> a -> a) -> Sum a -> a #

toList :: Sum a -> [a] #

null :: Sum a -> Bool #

length :: Sum a -> Int #

elem :: Eq a => a -> Sum a -> Bool #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

sum :: Num a => Sum a -> a #

product :: Num a => Sum a -> a #

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) #

sequenceA :: Applicative f => Sum (f a) -> f (Sum a) #

mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) #

sequence :: Monad m => Sum (m a) -> m (Sum a) #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Sum a #

(<*>) :: Sum (a -> b) -> Sum a -> Sum b #

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

(*>) :: Sum a -> Sum b -> Sum b #

(<*) :: Sum a -> Sum b -> Sum a #

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Sum a -> Sum b #

(<$) :: a -> Sum b -> Sum a #

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Sum a -> (a -> Sum b) -> Sum b #

(>>) :: Sum a -> Sum b -> Sum b #

return :: a -> Sum a #

NFData1 Sum

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Sum a -> () #

Foldable1 Sum 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Sum m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Sum a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Sum a -> m #

toNonEmpty :: Sum a -> NonEmpty a #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

head :: Sum a -> a #

last :: Sum a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Sum a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Sum a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Sum a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Sum a -> b #

Invariant Sum

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Sum a -> Sum b #

Apply Sum 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Sum (a -> b) -> Sum a -> Sum b #

(.>) :: Sum a -> Sum b -> Sum b #

(<.) :: Sum a -> Sum b -> Sum a #

liftF2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

Bind Sum 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Sum a -> (a -> Sum b) -> Sum b #

join :: Sum (Sum a) -> Sum a #

Extend Sum 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Sum a -> Sum (Sum a) #

extended :: (Sum a -> b) -> Sum a -> Sum b #

Traversable1 Sum 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Sum a -> f (Sum b) #

sequence1 :: Apply f => Sum (f b) -> f (Sum b) #

Unbox a => Vector Vector (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Sum a) -> ST s (Vector (Sum a)) #

basicUnsafeThaw :: Vector (Sum a) -> ST s (Mutable Vector s (Sum a)) #

basicLength :: Vector (Sum a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Sum a) -> Vector (Sum a) #

basicUnsafeIndexM :: Vector (Sum a) -> Int -> Box (Sum a) #

basicUnsafeCopy :: Mutable Vector s (Sum a) -> Vector (Sum a) -> ST s () #

elemseq :: Vector (Sum a) -> Sum a -> b -> b #

Unbox a => MVector MVector (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Sum a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Sum a) -> MVector s (Sum a) #

basicOverlaps :: MVector s (Sum a) -> MVector s (Sum a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Sum a)) #

basicInitialize :: MVector s (Sum a) -> ST s () #

basicUnsafeReplicate :: Int -> Sum a -> ST s (MVector s (Sum a)) #

basicUnsafeRead :: MVector s (Sum a) -> Int -> ST s (Sum a) #

basicUnsafeWrite :: MVector s (Sum a) -> Int -> Sum a -> ST s () #

basicClear :: MVector s (Sum a) -> ST s () #

basicSet :: MVector s (Sum a) -> Sum a -> ST s () #

basicUnsafeCopy :: MVector s (Sum a) -> MVector s (Sum a) -> ST s () #

basicUnsafeMove :: MVector s (Sum a) -> MVector s (Sum a) -> ST s () #

basicUnsafeGrow :: MVector s (Sum a) -> Int -> ST s (MVector s (Sum a)) #

Data a => Data (Sum a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Sum a -> c (Sum a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sum a) #

toConstr :: Sum a -> Constr #

dataTypeOf :: Sum a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Sum a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sum a)) #

gmapT :: (forall b. Data b => b -> b) -> Sum a -> Sum a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sum a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sum a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Sum a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Sum a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) #

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a #

mappend :: Sum a -> Sum a -> Sum a #

mconcat :: [Sum a] -> Sum a #

Num a => Semigroup (Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Sum a -> Sum a -> Sum a #

sconcat :: NonEmpty (Sum a) -> Sum a #

stimes :: Integral b => b -> Sum a -> Sum a #

Bounded a => Bounded (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Sum a #

maxBound :: Sum a #

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type #

Methods

from :: Sum a -> Rep (Sum a) x #

to :: Rep (Sum a) x -> Sum a #

Num a => Num (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Sum a -> Sum a -> Sum a #

(-) :: Sum a -> Sum a -> Sum a #

(*) :: Sum a -> Sum a -> Sum a #

negate :: Sum a -> Sum a #

abs :: Sum a -> Sum a #

signum :: Sum a -> Sum a #

fromInteger :: Integer -> Sum a #

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

Methods

showsPrec :: Int -> Sum a -> ShowS #

show :: Sum a -> String #

showList :: [Sum a] -> ShowS #

NFData a => NFData (Sum a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum a -> () #

Eq a => Eq (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Sum a -> Sum a -> Bool #

(/=) :: Sum a -> Sum a -> Bool #

Ord a => Ord (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Sum a -> Sum a -> Ordering #

(<) :: Sum a -> Sum a -> Bool #

(<=) :: Sum a -> Sum a -> Bool #

(>) :: Sum a -> Sum a -> Bool #

(>=) :: Sum a -> Sum a -> Bool #

max :: Sum a -> Sum a -> Sum a #

min :: Sum a -> Sum a -> Sum a #

Num a => Abelian (Sum a) 
Instance details

Defined in Data.Group

Integral a => Cyclic (Sum a) 
Instance details

Defined in Data.Group

Methods

generator :: Sum a #

Num a => Group (Sum a) 
Instance details

Defined in Data.Group

Methods

invert :: Sum a -> Sum a #

(~~) :: Sum a -> Sum a -> Sum a #

pow :: Integral x => Sum a -> x -> Sum a #

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 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Sum :: k -> Type #

Methods

from1 :: forall (a :: k). Sum a -> Rep1 Sum a #

to1 :: forall (a :: k). Rep1 Sum a -> Sum a #

type Rep Sum 
Instance details

Defined in Data.Functor.Rep

type Rep Sum = ()
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)

Since: base-4.7.0.0

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

newtype Vector (Sum a) = V_Sum (Vector a)
type Rep1 Sum

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Sum = D1 ('MetaData "Sum" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Sum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype Product a #

Monoid under multiplication.

>>> getProduct (Product 3 <> Product 4 <> mempty)
12

Constructors

Product 

Fields

Instances

Instances details
Representable Product 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Product #

Methods

tabulate :: (Rep Product -> a) -> Product a #

index :: Product a -> Rep Product -> a #

MonadFix Product

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Product a) -> Product a #

MonadZip Product

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: Product a -> Product b -> Product (a, b) #

mzipWith :: (a -> b -> c) -> Product a -> Product b -> Product c #

munzip :: Product (a, b) -> (Product a, Product b) #

Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Product m -> m #

foldMap :: Monoid m => (a -> m) -> Product a -> m #

foldMap' :: Monoid m => (a -> m) -> Product a -> m #

foldr :: (a -> b -> b) -> b -> Product a -> b #

foldr' :: (a -> b -> b) -> b -> Product a -> b #

foldl :: (b -> a -> b) -> b -> Product a -> b #

foldl' :: (b -> a -> b) -> b -> Product a -> b #

foldr1 :: (a -> a -> a) -> Product a -> a #

foldl1 :: (a -> a -> a) -> Product a -> a #

toList :: Product a -> [a] #

null :: Product a -> Bool #

length :: Product a -> Int #

elem :: Eq a => a -> Product a -> Bool #

maximum :: Ord a => Product a -> a #

minimum :: Ord a => Product a -> a #

sum :: Num a => Product a -> a #

product :: Num a => Product a -> a #

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) #

sequenceA :: Applicative f => Product (f a) -> f (Product a) #

mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) #

sequence :: Monad m => Product (m a) -> m (Product a) #

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Product a #

(<*>) :: Product (a -> b) -> Product a -> Product b #

liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c #

(*>) :: Product a -> Product b -> Product b #

(<*) :: Product a -> Product b -> Product a #

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Product a -> Product b #

(<$) :: a -> Product b -> Product a #

Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Product a -> (a -> Product b) -> Product b #

(>>) :: Product a -> Product b -> Product b #

return :: a -> Product a #

NFData1 Product

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Product a -> () #

Foldable1 Product 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Product m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Product a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Product a -> m #

toNonEmpty :: Product a -> NonEmpty a #

maximum :: Ord a => Product a -> a #

minimum :: Ord a => Product a -> a #

head :: Product a -> a #

last :: Product a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Product a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Product a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Product a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Product a -> b #

Invariant Product

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Product a -> Product b #

Apply Product 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Product (a -> b) -> Product a -> Product b #

(.>) :: Product a -> Product b -> Product b #

(<.) :: Product a -> Product b -> Product a #

liftF2 :: (a -> b -> c) -> Product a -> Product b -> Product c #

Bind Product 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Product a -> (a -> Product b) -> Product b #

join :: Product (Product a) -> Product a #

Extend Product 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Product a -> Product (Product a) #

extended :: (Product a -> b) -> Product a -> Product b #

Traversable1 Product 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Product a -> f (Product b) #

sequence1 :: Apply f => Product (f b) -> f (Product b) #

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

Methods

basicLength :: MVector s (Product a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Product a) -> MVector s (Product a) #

basicOverlaps :: MVector s (Product a) -> MVector s (Product a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Product a)) #

basicInitialize :: MVector s (Product a) -> ST s () #

basicUnsafeReplicate :: Int -> Product a -> ST s (MVector s (Product a)) #

basicUnsafeRead :: MVector s (Product a) -> Int -> ST s (Product a) #

basicUnsafeWrite :: MVector s (Product a) -> Int -> Product a -> ST s () #

basicClear :: MVector s (Product a) -> ST s () #

basicSet :: MVector s (Product a) -> Product a -> ST s () #

basicUnsafeCopy :: MVector s (Product a) -> MVector s (Product a) -> ST s () #

basicUnsafeMove :: MVector s (Product a) -> MVector s (Product a) -> ST s () #

basicUnsafeGrow :: MVector s (Product a) -> Int -> ST s (MVector s (Product a)) #

Data a => Data (Product a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Product a -> c (Product a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Product a) #

toConstr :: Product a -> Constr #

dataTypeOf :: Product a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Product a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Product a)) #

gmapT :: (forall b. Data b => b -> b) -> Product a -> Product a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Product a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Product a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Product a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Product a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) #

Num a => Monoid (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Product a #

mappend :: Product a -> Product a -> Product a #

mconcat :: [Product a] -> Product a #

Num a => Semigroup (Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Product a -> Product a -> Product a #

sconcat :: NonEmpty (Product a) -> Product a #

stimes :: Integral b => b -> Product a -> Product a #

Bounded a => Bounded (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic (Product a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type #

Methods

from :: Product a -> Rep (Product a) x #

to :: Rep (Product a) x -> Product a #

Num a => Num (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Product a -> Product a -> Product a #

(-) :: Product a -> Product a -> Product a #

(*) :: Product a -> Product a -> Product a #

negate :: Product a -> Product a #

abs :: Product a -> Product a #

signum :: Product a -> Product a #

fromInteger :: Integer -> Product a #

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

Methods

showsPrec :: Int -> Product a -> ShowS #

show :: Product a -> String #

showList :: [Product a] -> ShowS #

NFData a => NFData (Product a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Product a -> () #

Eq a => Eq (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Product a -> Product a -> Bool #

(/=) :: Product a -> Product a -> Bool #

Ord a => Ord (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Product a -> Product a -> Ordering #

(<) :: Product a -> Product a -> Bool #

(<=) :: Product a -> Product a -> Bool #

(>) :: Product a -> Product a -> Bool #

(>=) :: Product a -> Product a -> Bool #

max :: Product a -> Product a -> Product a #

min :: Product a -> Product a -> Product a #

Fractional a => Abelian (Product a) 
Instance details

Defined in Data.Group

Fractional a => Group (Product a) 
Instance details

Defined in Data.Group

Methods

invert :: Product a -> Product a #

(~~) :: Product a -> Product a -> Product a #

pow :: Integral x => Product a -> x -> Product a #

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 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Product :: k -> Type #

Methods

from1 :: forall (a :: k). Product a -> Rep1 Product a #

to1 :: forall (a :: k). Rep1 Product a -> Product a #

type Rep Product 
Instance details

Defined in Data.Functor.Rep

type Rep Product = ()
newtype MVector s (Product a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Product a) = MV_Product (MVector s a)
type Rep (Product a)

Since: base-4.7.0.0

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

newtype Vector (Product a) = V_Product (Vector a)
type Rep1 Product

Since: base-4.7.0.0

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 Endo a #

The monoid of endomorphisms under composition.

>>> let computation = Endo ("Hello, " ++) <> Endo (++ "!")
>>> appEndo computation "Haskell"
"Hello, Haskell!"

Constructors

Endo 

Fields

Instances

Instances details
Invariant Endo

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Endo a -> Endo b #

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a #

mappend :: Endo a -> Endo a -> Endo a #

mconcat :: [Endo a] -> Endo a #

Semigroup (Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Endo a -> Endo a -> Endo a #

sconcat :: NonEmpty (Endo a) -> Endo a #

stimes :: Integral b => b -> Endo a -> Endo a #

Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type #

Methods

from :: Endo a -> Rep (Endo a) x #

to :: Rep (Endo a) x -> Endo a #

type Rep (Endo a)

Since: base-4.7.0.0

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 Dual a #

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
Representable Dual 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Dual #

Methods

tabulate :: (Rep Dual -> a) -> Dual a #

index :: Dual a -> Rep Dual -> a #

MonadFix Dual

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Dual a) -> Dual a #

MonadZip Dual

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: Dual a -> Dual b -> Dual (a, b) #

mzipWith :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

munzip :: Dual (a, b) -> (Dual a, Dual b) #

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Dual m -> m #

foldMap :: Monoid m => (a -> m) -> Dual a -> m #

foldMap' :: Monoid m => (a -> m) -> Dual a -> m #

foldr :: (a -> b -> b) -> b -> Dual a -> b #

foldr' :: (a -> b -> b) -> b -> Dual a -> b #

foldl :: (b -> a -> b) -> b -> Dual a -> b #

foldl' :: (b -> a -> b) -> b -> Dual a -> b #

foldr1 :: (a -> a -> a) -> Dual a -> a #

foldl1 :: (a -> a -> a) -> Dual a -> a #

toList :: Dual a -> [a] #

null :: Dual a -> Bool #

length :: Dual a -> Int #

elem :: Eq a => a -> Dual a -> Bool #

maximum :: Ord a => Dual a -> a #

minimum :: Ord a => Dual a -> a #

sum :: Num a => Dual a -> a #

product :: Num a => Dual a -> a #

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) #

sequenceA :: Applicative f => Dual (f a) -> f (Dual a) #

mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) #

sequence :: Monad m => Dual (m a) -> m (Dual a) #

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Dual a #

(<*>) :: Dual (a -> b) -> Dual a -> Dual b #

liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

(*>) :: Dual a -> Dual b -> Dual b #

(<*) :: Dual a -> Dual b -> Dual a #

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Dual a -> Dual b #

(<$) :: a -> Dual b -> Dual a #

Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Dual a -> (a -> Dual b) -> Dual b #

(>>) :: Dual a -> Dual b -> Dual b #

return :: a -> Dual a #

NFData1 Dual

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Dual a -> () #

Foldable1 Dual 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Dual m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Dual a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Dual a -> m #

toNonEmpty :: Dual a -> NonEmpty a #

maximum :: Ord a => Dual a -> a #

minimum :: Ord a => Dual a -> a #

head :: Dual a -> a #

last :: Dual a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Dual a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Dual a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Dual a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Dual a -> b #

Invariant Dual

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Dual a -> Dual b #

Apply Dual 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Dual (a -> b) -> Dual a -> Dual b #

(.>) :: Dual a -> Dual b -> Dual b #

(<.) :: Dual a -> Dual b -> Dual a #

liftF2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

Bind Dual 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Dual a -> (a -> Dual b) -> Dual b #

join :: Dual (Dual a) -> Dual a #

Extend Dual 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Dual a -> Dual (Dual a) #

extended :: (Dual a -> b) -> Dual a -> Dual b #

Traversable1 Dual 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Dual a -> f (Dual b) #

sequence1 :: Apply f => Dual (f b) -> f (Dual b) #

Unbox a => Vector Vector (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Dual a) -> ST s (Vector (Dual a)) #

basicUnsafeThaw :: Vector (Dual a) -> ST s (Mutable Vector s (Dual a)) #

basicLength :: Vector (Dual a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Dual a) -> Vector (Dual a) #

basicUnsafeIndexM :: Vector (Dual a) -> Int -> Box (Dual a) #

basicUnsafeCopy :: Mutable Vector s (Dual a) -> Vector (Dual a) -> ST s () #

elemseq :: Vector (Dual a) -> Dual a -> b -> b #

Unbox a => MVector MVector (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Dual a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Dual a) -> MVector s (Dual a) #

basicOverlaps :: MVector s (Dual a) -> MVector s (Dual a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Dual a)) #

basicInitialize :: MVector s (Dual a) -> ST s () #

basicUnsafeReplicate :: Int -> Dual a -> ST s (MVector s (Dual a)) #

basicUnsafeRead :: MVector s (Dual a) -> Int -> ST s (Dual a) #

basicUnsafeWrite :: MVector s (Dual a) -> Int -> Dual a -> ST s () #

basicClear :: MVector s (Dual a) -> ST s () #

basicSet :: MVector s (Dual a) -> Dual a -> ST s () #

basicUnsafeCopy :: MVector s (Dual a) -> MVector s (Dual a) -> ST s () #

basicUnsafeMove :: MVector s (Dual a) -> MVector s (Dual a) -> ST s () #

basicUnsafeGrow :: MVector s (Dual a) -> Int -> ST s (MVector s (Dual a)) #

Data a => Data (Dual a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Dual a -> c (Dual a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Dual a) #

toConstr :: Dual a -> Constr #

dataTypeOf :: Dual a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Dual a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Dual a)) #

gmapT :: (forall b. Data b => b -> b) -> Dual a -> Dual a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Dual a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Dual a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Dual a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Dual a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Dual a -> m (Dual a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Dual a -> m (Dual a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Dual a -> m (Dual a) #

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a #

mappend :: Dual a -> Dual a -> Dual a #

mconcat :: [Dual a] -> Dual a #

Semigroup a => Semigroup (Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Dual a -> Dual a -> Dual a #

sconcat :: NonEmpty (Dual a) -> Dual a #

stimes :: Integral b => b -> Dual a -> Dual a #

Bounded a => Bounded (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Dual a #

maxBound :: Dual a #

Generic (Dual a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type #

Methods

from :: Dual a -> Rep (Dual a) x #

to :: Rep (Dual a) x -> Dual a #

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

Methods

showsPrec :: Int -> Dual a -> ShowS #

show :: Dual a -> String #

showList :: [Dual a] -> ShowS #

NFData a => NFData (Dual a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Dual a -> () #

Eq a => Eq (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Dual a -> Dual a -> Bool #

(/=) :: Dual a -> Dual a -> Bool #

Ord a => Ord (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Dual a -> Dual a -> Ordering #

(<) :: Dual a -> Dual a -> Bool #

(<=) :: Dual a -> Dual a -> Bool #

(>) :: Dual a -> Dual a -> Bool #

(>=) :: Dual a -> Dual a -> Bool #

max :: Dual a -> Dual a -> Dual a #

min :: Dual a -> Dual a -> Dual a #

Abelian a => Abelian (Dual a) 
Instance details

Defined in Data.Group

Group a => Group (Dual a) 
Instance details

Defined in Data.Group

Methods

invert :: Dual a -> Dual a #

(~~) :: Dual a -> Dual a -> Dual a #

pow :: Integral x => Dual a -> x -> Dual a #

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 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Dual :: k -> Type #

Methods

from1 :: forall (a :: k). Dual a -> Rep1 Dual a #

to1 :: forall (a :: k). Rep1 Dual a -> Dual a #

type Rep Dual 
Instance details

Defined in Data.Functor.Rep

type Rep Dual = ()
newtype MVector s (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Dual a) = MV_Dual (MVector s a)
type Rep (Dual a)

Since: base-4.7.0.0

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

newtype Vector (Dual a) = V_Dual (Vector a)
type Rep1 Dual

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Dual = D1 ('MetaData "Dual" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Dual" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

newtype Any #

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 

Fields

Instances

Instances details
Data Any

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Any -> c Any #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Any #

toConstr :: Any -> Constr #

dataTypeOf :: Any -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Any) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Any) #

gmapT :: (forall b. Data b => b -> b) -> Any -> Any #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Any -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Any -> r #

gmapQ :: (forall d. Data d => d -> u) -> Any -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Any -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Any -> m Any #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Any -> m Any #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Any -> m Any #

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Any #

mappend :: Any -> Any -> Any #

mconcat :: [Any] -> Any #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Any -> Any -> Any #

sconcat :: NonEmpty Any -> Any #

stimes :: Integral b => b -> Any -> Any #

Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Any #

maxBound :: Any #

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type #

Methods

from :: Any -> Rep Any x #

to :: Rep Any x -> Any #

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

Methods

showsPrec :: Int -> Any -> ShowS #

show :: Any -> String #

showList :: [Any] -> ShowS #

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () #

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Any -> Any -> Bool #

(/=) :: Any -> Any -> Bool #

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Any -> Any -> Ordering #

(<) :: Any -> Any -> Bool #

(<=) :: Any -> Any -> Bool #

(>) :: Any -> Any -> Bool #

(>=) :: Any -> Any -> Bool #

max :: Any -> Any -> Any #

min :: Any -> Any -> Any #

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

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep Any = D1 ('MetaData "Any" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Any" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAny") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
newtype Vector Any 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Any = V_Any (Vector Bool)
newtype MVector s Any 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Any = MV_Any (MVector s Bool)

getAlt :: Alt f a -> f a #

newtype All #

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 

Fields

Instances

Instances details
Data All

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> All -> c All #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c All #

toConstr :: All -> Constr #

dataTypeOf :: All -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c All) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c All) #

gmapT :: (forall b. Data b => b -> b) -> All -> All #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> All -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> All -> r #

gmapQ :: (forall d. Data d => d -> u) -> All -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> All -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> All -> m All #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> All -> m All #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> All -> m All #

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: All #

mappend :: All -> All -> All #

mconcat :: [All] -> All #

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: All -> All -> All #

sconcat :: NonEmpty All -> All #

stimes :: Integral b => b -> All -> All #

Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: All #

maxBound :: All #

Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type #

Methods

from :: All -> Rep All x #

to :: Rep All x -> All #

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

Methods

showsPrec :: Int -> All -> ShowS #

show :: All -> String #

showList :: [All] -> ShowS #

NFData All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () #

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: All -> All -> Bool #

(/=) :: All -> All -> Bool #

Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: All -> All -> Ordering #

(<) :: All -> All -> Bool #

(<=) :: All -> All -> Bool #

(>) :: All -> All -> Bool #

(>=) :: All -> All -> Bool #

max :: All -> All -> All #

min :: All -> All -> All #

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

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep All = D1 ('MetaData "All" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "All" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAll") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
newtype Vector All 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector All = V_All (Vector Bool)
newtype MVector s All 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s All = MV_All (MVector s Bool)

stimesMonoid :: (Integral b, Monoid a) => b -> a -> a #

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 #

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 Down a #

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.

>>> compare True False
GT
>>> compare (Down True) (Down False)
LT

If a has a Bounded instance then the wrapped instance also respects the reversed ordering by exchanging the values of minBound and maxBound.

>>> minBound :: Int
-9223372036854775808
>>> minBound :: Down Int
Down 9223372036854775807

All other instances of Down a behave as they do for a.

Since: base-4.6.0.0

Constructors

Down 

Fields

Instances

Instances details
MonadFix Down

Since: base-4.12.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Down a) -> Down a #

MonadZip Down

Since: base-4.12.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: Down a -> Down b -> Down (a, b) #

mzipWith :: (a -> b -> c) -> Down a -> Down b -> Down c #

munzip :: Down (a, b) -> (Down a, Down b) #

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Down m -> m #

foldMap :: Monoid m => (a -> m) -> Down a -> m #

foldMap' :: Monoid m => (a -> m) -> Down a -> m #

foldr :: (a -> b -> b) -> b -> Down a -> b #

foldr' :: (a -> b -> b) -> b -> Down a -> b #

foldl :: (b -> a -> b) -> b -> Down a -> b #

foldl' :: (b -> a -> b) -> b -> Down a -> b #

foldr1 :: (a -> a -> a) -> Down a -> a #

foldl1 :: (a -> a -> a) -> Down a -> a #

toList :: Down a -> [a] #

null :: Down a -> Bool #

length :: Down a -> Int #

elem :: Eq a => a -> Down a -> Bool #

maximum :: Ord a => Down a -> a #

minimum :: Ord a => Down a -> a #

sum :: Num a => Down a -> a #

product :: Num a => Down a -> a #

Eq1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Down a -> Down b -> Bool #

Ord1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Down a -> Down b -> Ordering #

Read1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Down a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Down a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Down a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Down a] #

Show1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Down a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Down a] -> ShowS #

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Down a -> f (Down b) #

sequenceA :: Applicative f => Down (f a) -> f (Down a) #

mapM :: Monad m => (a -> m b) -> Down a -> m (Down b) #

sequence :: Monad m => Down (m a) -> m (Down a) #

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

pure :: a -> Down a #

(<*>) :: Down (a -> b) -> Down a -> Down b #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

(*>) :: Down a -> Down b -> Down b #

(<*) :: Down a -> Down b -> Down a #

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

fmap :: (a -> b) -> Down a -> Down b #

(<$) :: a -> Down b -> Down a #

Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(>>=) :: Down a -> (a -> Down b) -> Down b #

(>>) :: Down a -> Down b -> Down b #

return :: a -> Down a #

NFData1 Down

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Down a -> () #

Foldable1 Down 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Down m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Down a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Down a -> m #

toNonEmpty :: Down a -> NonEmpty a #

maximum :: Ord a => Down a -> a #

minimum :: Ord a => Down a -> a #

head :: Down a -> a #

last :: Down a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Down a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Down a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Down a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Down a -> b #

Apply Down 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Down (a -> b) -> Down a -> Down b #

(.>) :: Down a -> Down b -> Down b #

(<.) :: Down a -> Down b -> Down a #

liftF2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

Bind Down 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Down a -> (a -> Down b) -> Down b #

join :: Down (Down a) -> Down a #

Generic1 Down 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Down :: k -> Type #

Methods

from1 :: forall (a :: k). Down a -> Rep1 Down a #

to1 :: forall (a :: k). Rep1 Down a -> Down a #

Unbox a => Vector Vector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Down a) -> ST s (Vector (Down a)) #

basicUnsafeThaw :: Vector (Down a) -> ST s (Mutable Vector s (Down a)) #

basicLength :: Vector (Down a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Down a) -> Vector (Down a) #

basicUnsafeIndexM :: Vector (Down a) -> Int -> Box (Down a) #

basicUnsafeCopy :: Mutable Vector s (Down a) -> Vector (Down a) -> ST s () #

elemseq :: Vector (Down a) -> Down a -> b -> b #

Unbox a => MVector MVector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Down a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Down a) -> MVector s (Down a) #

basicOverlaps :: MVector s (Down a) -> MVector s (Down a) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (Down a)) #

basicInitialize :: MVector s (Down a) -> ST s () #

basicUnsafeReplicate :: Int -> Down a -> ST s (MVector s (Down a)) #

basicUnsafeRead :: MVector s (Down a) -> Int -> ST s (Down a) #

basicUnsafeWrite :: MVector s (Down a) -> Int -> Down a -> ST s () #

basicClear :: MVector s (Down a) -> ST s () #

basicSet :: MVector s (Down a) -> Down a -> ST s () #

basicUnsafeCopy :: MVector s (Down a) -> MVector s (Down a) -> ST s () #

basicUnsafeMove :: MVector s (Down a) -> MVector s (Down a) -> ST s () #

basicUnsafeGrow :: MVector s (Down a) -> Int -> ST s (MVector s (Down a)) #

Data a => Data (Down a)

Since: base-4.12.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Down a -> c (Down a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Down a) #

toConstr :: Down a -> Constr #

dataTypeOf :: Down a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Down a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Down a)) #

gmapT :: (forall b. Data b => b -> b) -> Down a -> Down a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Down a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Down a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) #

Storable a => Storable (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

sizeOf :: Down a -> Int #

alignment :: Down a -> Int #

peekElemOff :: Ptr (Down a) -> Int -> IO (Down a) #

pokeElemOff :: Ptr (Down a) -> Int -> Down a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Down a) #

pokeByteOff :: Ptr b -> Int -> Down a -> IO () #

peek :: Ptr (Down a) -> IO (Down a) #

poke :: Ptr (Down a) -> Down a -> IO () #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a #

mappend :: Down a -> Down a -> Down a #

mconcat :: [Down a] -> Down a #

Semigroup a => Semigroup (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(<>) :: Down a -> Down a -> Down a #

sconcat :: NonEmpty (Down a) -> Down a #

stimes :: Integral b => b -> Down a -> Down a #

Bits a => Bits (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(.&.) :: Down a -> Down a -> Down a #

(.|.) :: Down a -> Down a -> Down a #

xor :: Down a -> Down a -> Down a #

complement :: Down a -> Down a #

shift :: Down a -> Int -> Down a #

rotate :: Down a -> Int -> Down a #

zeroBits :: Down a #

bit :: Int -> Down a #

setBit :: Down a -> Int -> Down a #

clearBit :: Down a -> Int -> Down a #

complementBit :: Down a -> Int -> Down a #

testBit :: Down a -> Int -> Bool #

bitSizeMaybe :: Down a -> Maybe Int #

bitSize :: Down a -> Int #

isSigned :: Down a -> Bool #

shiftL :: Down a -> Int -> Down a #

unsafeShiftL :: Down a -> Int -> Down a #

shiftR :: Down a -> Int -> Down a #

unsafeShiftR :: Down a -> Int -> Down a #

rotateL :: Down a -> Int -> Down a #

rotateR :: Down a -> Int -> Down a #

popCount :: Down a -> Int #

FiniteBits a => FiniteBits (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Bounded a => Bounded (Down a)

Swaps minBound and maxBound of the underlying type.

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

minBound :: Down a #

maxBound :: Down a #

Floating a => Floating (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

pi :: Down a #

exp :: Down a -> Down a #

log :: Down a -> Down a #

sqrt :: Down a -> Down a #

(**) :: Down a -> Down a -> Down a #

logBase :: Down a -> Down a -> Down a #

sin :: Down a -> Down a #

cos :: Down a -> Down a #

tan :: Down a -> Down a #

asin :: Down a -> Down a #

acos :: Down a -> Down a #

atan :: Down a -> Down a #

sinh :: Down a -> Down a #

cosh :: Down a -> Down a #

tanh :: Down a -> Down a #

asinh :: Down a -> Down a #

acosh :: Down a -> Down a #

atanh :: Down a -> Down a #

log1p :: Down a -> Down a #

expm1 :: Down a -> Down a #

log1pexp :: Down a -> Down a #

log1mexp :: Down a -> Down a #

RealFloat a => RealFloat (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type #

Methods

from :: Down a -> Rep (Down a) x #

to :: Rep (Down a) x -> Down a #

Ix a => Ix (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

range :: (Down a, Down a) -> [Down a] #

index :: (Down a, Down a) -> Down a -> Int #

unsafeIndex :: (Down a, Down a) -> Down a -> Int #

inRange :: (Down a, Down a) -> Down a -> Bool #

rangeSize :: (Down a, Down a) -> Int #

unsafeRangeSize :: (Down a, Down a) -> Int #

Num a => Num (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(+) :: Down a -> Down a -> Down a #

(-) :: Down a -> Down a -> Down a #

(*) :: Down a -> Down a -> Down a #

negate :: Down a -> Down a #

abs :: Down a -> Down a #

signum :: Down a -> Down a #

fromInteger :: Integer -> Down a #

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

Fractional a => Fractional (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(/) :: Down a -> Down a -> Down a #

recip :: Down a -> Down a #

fromRational :: Rational -> Down a #

Real a => Real (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

toRational :: Down a -> Rational #

RealFrac a => RealFrac (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

properFraction :: Integral b => Down a -> (b, Down a) #

truncate :: Integral b => Down a -> b #

round :: Integral b => Down a -> b #

ceiling :: Integral b => Down a -> b #

floor :: Integral b => Down a -> b #

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

Methods

showsPrec :: Int -> Down a -> ShowS #

show :: Down a -> String #

showList :: [Down a] -> ShowS #

NFData a => NFData (Down a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Down a -> () #

Eq a => Eq (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

(==) :: Down a -> Down a -> Bool #

(/=) :: Down a -> Down a -> Bool #

Ord a => Ord (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

compare :: Down a -> Down a -> Ordering #

(<) :: Down a -> Down a -> Bool #

(<=) :: Down a -> Down a -> Bool #

(>) :: Down a -> Down a -> Bool #

(>=) :: Down a -> Down a -> Bool #

max :: Down a -> Down a -> Down a #

min :: Down a -> Down a -> Down a #

Abelian a => Abelian (Down a) 
Instance details

Defined in Data.Group

Cyclic a => Cyclic (Down a) 
Instance details

Defined in Data.Group

Methods

generator :: Down a #

Group a => Group (Down a) 
Instance details

Defined in Data.Group

Methods

invert :: Down a -> Down a #

(~~) :: Down a -> Down a -> Down a #

pow :: Integral x => Down a -> x -> Down a #

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

type Rep1 Down

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

type Rep1 Down = D1 ('MetaData "Down" "Data.Ord" "base" 'True) (C1 ('MetaCons "Down" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Down a) = MV_Down (MVector s a)
type Rep (Down a)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

type Rep (Down a) = D1 ('MetaData "Down" "Data.Ord" "base" 'True) (C1 ('MetaCons "Down" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Down a) = V_Down (Vector a)

comparing :: Ord a => (b -> a) -> b -> b -> Ordering #

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) ...

clamp :: Ord a => (a, a) -> a -> a #

clamp (low, high) a = min high (max a low)

Function for ensursing the value a is within the inclusive bounds given by low and high. If it is, a is returned unchanged. The result is otherwise low if a <= low, or high if high <= a.

When clamp is used at Double and Float, it has NaN propagating semantics in its second argument. That is, clamp (l,h) NaN = NaN, but clamp (NaN, NaN) x = x.

>>> clamp (0, 10) 2
2
>>> clamp ('a', 'm') 'x'
'm'

newtype WordPtr #

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.

Constructors

WordPtr Word 

Instances

Instances details
Data WordPtr

Since: base-4.11.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WordPtr -> c WordPtr #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WordPtr #

toConstr :: WordPtr -> Constr #

dataTypeOf :: WordPtr -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WordPtr) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WordPtr) #

gmapT :: (forall b. Data b => b -> b) -> WordPtr -> WordPtr #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WordPtr -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WordPtr -> r #

gmapQ :: (forall d. Data d => d -> u) -> WordPtr -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WordPtr -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> WordPtr -> m WordPtr #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WordPtr -> m WordPtr #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WordPtr -> m WordPtr #

Storable WordPtr 
Instance details

Defined in Foreign.Ptr

Bits WordPtr 
Instance details

Defined in Foreign.Ptr

FiniteBits WordPtr 
Instance details

Defined in Foreign.Ptr

Bounded WordPtr 
Instance details

Defined in Foreign.Ptr

Enum WordPtr 
Instance details

Defined in Foreign.Ptr

Ix WordPtr 
Instance details

Defined in Foreign.Ptr

Num WordPtr 
Instance details

Defined in Foreign.Ptr

Read WordPtr 
Instance details

Defined in Foreign.Ptr

Integral WordPtr 
Instance details

Defined in Foreign.Ptr

Real WordPtr 
Instance details

Defined in Foreign.Ptr

Show WordPtr 
Instance details

Defined in Foreign.Ptr

Eq WordPtr 
Instance details

Defined in Foreign.Ptr

Methods

(==) :: WordPtr -> WordPtr -> Bool #

(/=) :: WordPtr -> WordPtr -> Bool #

Ord WordPtr 
Instance details

Defined in Foreign.Ptr

Hashable WordPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> WordPtr -> Int #

hash :: WordPtr -> Int #

Prim WordPtr

Since: primitive-0.7.1.0

Instance details

Defined in Data.Primitive.Types

newtype IntPtr #

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.

Constructors

IntPtr Int 

Instances

Instances details
Data IntPtr

Since: base-4.11.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntPtr -> c IntPtr #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntPtr #

toConstr :: IntPtr -> Constr #

dataTypeOf :: IntPtr -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntPtr) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntPtr) #

gmapT :: (forall b. Data b => b -> b) -> IntPtr -> IntPtr #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntPtr -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntPtr -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntPtr -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntPtr -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntPtr -> m IntPtr #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntPtr -> m IntPtr #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntPtr -> m IntPtr #

Storable IntPtr 
Instance details

Defined in Foreign.Ptr

Bits IntPtr 
Instance details

Defined in Foreign.Ptr

FiniteBits IntPtr 
Instance details

Defined in Foreign.Ptr

Bounded IntPtr 
Instance details

Defined in Foreign.Ptr

Enum IntPtr 
Instance details

Defined in Foreign.Ptr

Ix IntPtr 
Instance details

Defined in Foreign.Ptr

Num IntPtr 
Instance details

Defined in Foreign.Ptr

Read IntPtr 
Instance details

Defined in Foreign.Ptr

Integral IntPtr 
Instance details

Defined in Foreign.Ptr

Real IntPtr 
Instance details

Defined in Foreign.Ptr

Show IntPtr 
Instance details

Defined in Foreign.Ptr

Eq IntPtr 
Instance details

Defined in Foreign.Ptr

Methods

(==) :: IntPtr -> IntPtr -> Bool #

(/=) :: IntPtr -> IntPtr -> Bool #

Ord IntPtr 
Instance details

Defined in Foreign.Ptr

Hashable IntPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntPtr -> Int #

hash :: IntPtr -> Int #

Prim IntPtr

Since: primitive-0.7.1.0

Instance details

Defined in Data.Primitive.Types

wordPtrToPtr :: WordPtr -> Ptr a #

casts a WordPtr to a Ptr

ptrToWordPtr :: Ptr a -> WordPtr #

casts a Ptr to a WordPtr

ptrToIntPtr :: Ptr a -> IntPtr #

casts a Ptr to an IntPtr

intPtrToPtr :: IntPtr -> Ptr a #

casts an IntPtr to a Ptr

freeHaskellFunPtr :: FunPtr a -> IO () #

Release the storage associated with the given FunPtr, which must have been obtained from a wrapper stub. This should be called whenever the return value from a foreign import wrapper function is no longer required; otherwise, the storage it uses will leak.

class Storable a where #

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.

Minimal complete definition

sizeOf, alignment, (peek | peekElemOff | peekByteOff), (poke | pokeElemOff | pokeByteOff)

Methods

sizeOf :: a -> Int #

Computes the storage requirements (in bytes) of the argument. The value of the argument is not used.

alignment :: a -> Int #

Computes the alignment constraint of the argument. An alignment constraint x is fulfilled by any address divisible by x. The alignment must be a power of two if this instance is to be used with alloca or allocaArray. The value of the argument is not used.

peekElemOff :: Ptr a -> Int -> IO a #

Read a value from a memory area regarded as an array of values of the same kind. The first argument specifies the start address of the array and the second the index into the array (the first element of the array has index 0). The following equality holds,

peekElemOff addr idx = IOExts.fixIO $ \result ->
  peek (addr `plusPtr` (idx * sizeOf result))

Note that this is only a specification, not necessarily the concrete implementation of the function.

pokeElemOff :: Ptr a -> Int -> a -> IO () #

Write a value to a memory area regarded as an array of values of the same kind. The following equality holds:

pokeElemOff addr idx x = 
  poke (addr `plusPtr` (idx * sizeOf x)) x

peekByteOff :: Ptr b -> Int -> IO a #

Read a value from a memory location given by a base address and offset. The following equality holds:

peekByteOff addr off = peek (addr `plusPtr` off)

pokeByteOff :: Ptr b -> Int -> a -> IO () #

Write a value to a memory location given by a base address and offset. The following equality holds:

pokeByteOff addr off x = poke (addr `plusPtr` off) x

peek :: Ptr a -> IO a #

Read a value from the given memory location.

Note that the peek and poke functions might require properly aligned addresses to function correctly. This is architecture dependent; thus, portable code should ensure that when peeking or poking values of some type a, the alignment constraint for a, as given by the function alignment is fulfilled.

poke :: Ptr a -> a -> IO () #

Write the given value to the given memory location. Alignment restrictions might apply; see peek.

Instances

Instances details
Storable CBool 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CBool -> Int #

alignment :: CBool -> Int #

peekElemOff :: Ptr CBool -> Int -> IO CBool #

pokeElemOff :: Ptr CBool -> Int -> CBool -> IO () #

peekByteOff :: Ptr b -> Int -> IO CBool #

pokeByteOff :: Ptr b -> Int -> CBool -> IO () #

peek :: Ptr CBool -> IO CBool #

poke :: Ptr CBool -> CBool -> IO () #

Storable CChar 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CChar -> Int #

alignment :: CChar -> Int #

peekElemOff :: Ptr CChar -> Int -> IO CChar #

pokeElemOff :: Ptr CChar -> Int -> CChar -> IO () #

peekByteOff :: Ptr b -> Int -> IO CChar #

pokeByteOff :: Ptr b -> Int -> CChar -> IO () #

peek :: Ptr CChar -> IO CChar #

poke :: Ptr CChar -> CChar -> IO () #

Storable CClock 
Instance details

Defined in Foreign.C.Types

Storable CDouble 
Instance details

Defined in Foreign.C.Types

Storable CFloat 
Instance details

Defined in Foreign.C.Types

Storable CInt 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CInt -> Int #

alignment :: CInt -> Int #

peekElemOff :: Ptr CInt -> Int -> IO CInt #

pokeElemOff :: Ptr CInt -> Int -> CInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CInt #

pokeByteOff :: Ptr b -> Int -> CInt -> IO () #

peek :: Ptr CInt -> IO CInt #

poke :: Ptr CInt -> CInt -> IO () #

Storable CIntMax 
Instance details

Defined in Foreign.C.Types

Storable CIntPtr 
Instance details

Defined in Foreign.C.Types

Storable CLLong 
Instance details

Defined in Foreign.C.Types

Storable CLong 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CLong -> Int #

alignment :: CLong -> Int #

peekElemOff :: Ptr CLong -> Int -> IO CLong #

pokeElemOff :: Ptr CLong -> Int -> CLong -> IO () #

peekByteOff :: Ptr b -> Int -> IO CLong #

pokeByteOff :: Ptr b -> Int -> CLong -> IO () #

peek :: Ptr CLong -> IO CLong #

poke :: Ptr CLong -> CLong -> IO () #

Storable CPtrdiff 
Instance details

Defined in Foreign.C.Types

Storable CSChar 
Instance details

Defined in Foreign.C.Types

Storable CSUSeconds 
Instance details

Defined in Foreign.C.Types

Storable CShort 
Instance details

Defined in Foreign.C.Types

Storable CSigAtomic 
Instance details

Defined in Foreign.C.Types

Storable CSize 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CSize -> Int #

alignment :: CSize -> Int #

peekElemOff :: Ptr CSize -> Int -> IO CSize #

pokeElemOff :: Ptr CSize -> Int -> CSize -> IO () #

peekByteOff :: Ptr b -> Int -> IO CSize #

pokeByteOff :: Ptr b -> Int -> CSize -> IO () #

peek :: Ptr CSize -> IO CSize #

poke :: Ptr CSize -> CSize -> IO () #

Storable CTime 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CTime -> Int #

alignment :: CTime -> Int #

peekElemOff :: Ptr CTime -> Int -> IO CTime #

pokeElemOff :: Ptr CTime -> Int -> CTime -> IO () #

peekByteOff :: Ptr b -> Int -> IO CTime #

pokeByteOff :: Ptr b -> Int -> CTime -> IO () #

peek :: Ptr CTime -> IO CTime #

poke :: Ptr CTime -> CTime -> IO () #

Storable CUChar 
Instance details

Defined in Foreign.C.Types

Storable CUInt 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CUInt -> Int #

alignment :: CUInt -> Int #

peekElemOff :: Ptr CUInt -> Int -> IO CUInt #

pokeElemOff :: Ptr CUInt -> Int -> CUInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CUInt #

pokeByteOff :: Ptr b -> Int -> CUInt -> IO () #

peek :: Ptr CUInt -> IO CUInt #

poke :: Ptr CUInt -> CUInt -> IO () #

Storable CUIntMax 
Instance details

Defined in Foreign.C.Types

Storable CUIntPtr 
Instance details

Defined in Foreign.C.Types

Storable CULLong 
Instance details

Defined in Foreign.C.Types

Storable CULong 
Instance details

Defined in Foreign.C.Types

Storable CUSeconds 
Instance details

Defined in Foreign.C.Types

Storable CUShort 
Instance details

Defined in Foreign.C.Types

Storable CWchar 
Instance details

Defined in Foreign.C.Types

Storable IntPtr 
Instance details

Defined in Foreign.Ptr

Storable WordPtr 
Instance details

Defined in Foreign.Ptr

Storable Fingerprint

Since: base-4.4.0.0

Instance details

Defined in Foreign.Storable

Storable Int16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int16 -> Int #

alignment :: Int16 -> Int #

peekElemOff :: Ptr Int16 -> Int -> IO Int16 #

pokeElemOff :: Ptr Int16 -> Int -> Int16 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int16 #

pokeByteOff :: Ptr b -> Int -> Int16 -> IO () #

peek :: Ptr Int16 -> IO Int16 #

poke :: Ptr Int16 -> Int16 -> IO () #

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int32 -> Int #

alignment :: Int32 -> Int #

peekElemOff :: Ptr Int32 -> Int -> IO Int32 #

pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int32 #

pokeByteOff :: Ptr b -> Int -> Int32 -> IO () #

peek :: Ptr Int32 -> IO Int32 #

poke :: Ptr Int32 -> Int32 -> IO () #

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int64 -> Int #

alignment :: Int64 -> Int #

peekElemOff :: Ptr Int64 -> Int -> IO Int64 #

pokeElemOff :: Ptr Int64 -> Int -> Int64 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int64 #

pokeByteOff :: Ptr b -> Int -> Int64 -> IO () #

peek :: Ptr Int64 -> IO Int64 #

poke :: Ptr Int64 -> Int64 -> IO () #

Storable Int8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int8 -> Int #

alignment :: Int8 -> Int #

peekElemOff :: Ptr Int8 -> Int -> IO Int8 #

pokeElemOff :: Ptr Int8 -> Int -> Int8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int8 #

pokeByteOff :: Ptr b -> Int -> Int8 -> IO () #

peek :: Ptr Int8 -> IO Int8 #

poke :: Ptr Int8 -> Int8 -> IO () #

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 Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word8 -> Int #

alignment :: Word8 -> Int #

peekElemOff :: Ptr Word8 -> Int -> IO Word8 #

pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word8 #

pokeByteOff :: Ptr b -> Int -> Word8 -> IO () #

peek :: Ptr Word8 -> IO Word8 #

poke :: Ptr Word8 -> Word8 -> IO () #

Storable CBlkCnt 
Instance details

Defined in System.Posix.Types

Storable CBlkSize 
Instance details

Defined in System.Posix.Types

Storable CCc 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CCc -> Int #

alignment :: CCc -> Int #

peekElemOff :: Ptr CCc -> Int -> IO CCc #

pokeElemOff :: Ptr CCc -> Int -> CCc -> IO () #

peekByteOff :: Ptr b -> Int -> IO CCc #

pokeByteOff :: Ptr b -> Int -> CCc -> IO () #

peek :: Ptr CCc -> IO CCc #

poke :: Ptr CCc -> CCc -> IO () #

Storable CClockId 
Instance details

Defined in System.Posix.Types

Storable CDev 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CDev -> Int #

alignment :: CDev -> Int #

peekElemOff :: Ptr CDev -> Int -> IO CDev #

pokeElemOff :: Ptr CDev -> Int -> CDev -> IO () #

peekByteOff :: Ptr b -> Int -> IO CDev #

pokeByteOff :: Ptr b -> Int -> CDev -> IO () #

peek :: Ptr CDev -> IO CDev #

poke :: Ptr CDev -> CDev -> IO () #

Storable CFsBlkCnt 
Instance details

Defined in System.Posix.Types

Storable CFsFilCnt 
Instance details

Defined in System.Posix.Types

Storable CGid 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CGid -> Int #

alignment :: CGid -> Int #

peekElemOff :: Ptr CGid -> Int -> IO CGid #

pokeElemOff :: Ptr CGid -> Int -> CGid -> IO () #

peekByteOff :: Ptr b -> Int -> IO CGid #

pokeByteOff :: Ptr b -> Int -> CGid -> IO () #

peek :: Ptr CGid -> IO CGid #

poke :: Ptr CGid -> CGid -> IO () #

Storable CId 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CId -> Int #

alignment :: CId -> Int #

peekElemOff :: Ptr CId -> Int -> IO CId #

pokeElemOff :: Ptr CId -> Int -> CId -> IO () #

peekByteOff :: Ptr b -> Int -> IO CId #

pokeByteOff :: Ptr b -> Int -> CId -> IO () #

peek :: Ptr CId -> IO CId #

poke :: Ptr CId -> CId -> IO () #

Storable CIno 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CIno -> Int #

alignment :: CIno -> Int #

peekElemOff :: Ptr CIno -> Int -> IO CIno #

pokeElemOff :: Ptr CIno -> Int -> CIno -> IO () #

peekByteOff :: Ptr b -> Int -> IO CIno #

pokeByteOff :: Ptr b -> Int -> CIno -> IO () #

peek :: Ptr CIno -> IO CIno #

poke :: Ptr CIno -> CIno -> IO () #

Storable CKey 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CKey -> Int #

alignment :: CKey -> Int #

peekElemOff :: Ptr CKey -> Int -> IO CKey #

pokeElemOff :: Ptr CKey -> Int -> CKey -> IO () #

peekByteOff :: Ptr b -> Int -> IO CKey #

pokeByteOff :: Ptr b -> Int -> CKey -> IO () #

peek :: Ptr CKey -> IO CKey #

poke :: Ptr CKey -> CKey -> IO () #

Storable CMode 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CMode -> Int #

alignment :: CMode -> Int #

peekElemOff :: Ptr CMode -> Int -> IO CMode #

pokeElemOff :: Ptr CMode -> Int -> CMode -> IO () #

peekByteOff :: Ptr b -> Int -> IO CMode #

pokeByteOff :: Ptr b -> Int -> CMode -> IO () #

peek :: Ptr CMode -> IO CMode #

poke :: Ptr CMode -> CMode -> IO () #

Storable CNfds 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CNfds -> Int #

alignment :: CNfds -> Int #

peekElemOff :: Ptr CNfds -> Int -> IO CNfds #

pokeElemOff :: Ptr CNfds -> Int -> CNfds -> IO () #

peekByteOff :: Ptr b -> Int -> IO CNfds #

pokeByteOff :: Ptr b -> Int -> CNfds -> IO () #

peek :: Ptr CNfds -> IO CNfds #

poke :: Ptr CNfds -> CNfds -> IO () #

Storable CNlink 
Instance details

Defined in System.Posix.Types

Storable COff 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: COff -> Int #

alignment :: COff -> Int #

peekElemOff :: Ptr COff -> Int -> IO COff #

pokeElemOff :: Ptr COff -> Int -> COff -> IO () #

peekByteOff :: Ptr b -> Int -> IO COff #

pokeByteOff :: Ptr b -> Int -> COff -> IO () #

peek :: Ptr COff -> IO COff #

poke :: Ptr COff -> COff -> IO () #

Storable CPid 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CPid -> Int #

alignment :: CPid -> Int #

peekElemOff :: Ptr CPid -> Int -> IO CPid #

pokeElemOff :: Ptr CPid -> Int -> CPid -> IO () #

peekByteOff :: Ptr b -> Int -> IO CPid #

pokeByteOff :: Ptr b -> Int -> CPid -> IO () #

peek :: Ptr CPid -> IO CPid #

poke :: Ptr CPid -> CPid -> IO () #

Storable CRLim 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CRLim -> Int #

alignment :: CRLim -> Int #

peekElemOff :: Ptr CRLim -> Int -> IO CRLim #

pokeElemOff :: Ptr CRLim -> Int -> CRLim -> IO () #

peekByteOff :: Ptr b -> Int -> IO CRLim #

pokeByteOff :: Ptr b -> Int -> CRLim -> IO () #

peek :: Ptr CRLim -> IO CRLim #

poke :: Ptr CRLim -> CRLim -> IO () #

Storable CSocklen 
Instance details

Defined in System.Posix.Types

Storable CSpeed 
Instance details

Defined in System.Posix.Types

Storable CSsize 
Instance details

Defined in System.Posix.Types

Storable CTcflag 
Instance details

Defined in System.Posix.Types

Storable CTimer 
Instance details

Defined in System.Posix.Types

Storable CUid 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: CUid -> Int #

alignment :: CUid -> Int #

peekElemOff :: Ptr CUid -> Int -> IO CUid #

pokeElemOff :: Ptr CUid -> Int -> CUid -> IO () #

peekByteOff :: Ptr b -> Int -> IO CUid #

pokeByteOff :: Ptr b -> Int -> CUid -> IO () #

peek :: Ptr CUid -> IO CUid #

poke :: Ptr CUid -> CUid -> IO () #

Storable Fd 
Instance details

Defined in System.Posix.Types

Methods

sizeOf :: Fd -> Int #

alignment :: Fd -> Int #

peekElemOff :: Ptr Fd -> Int -> IO Fd #

pokeElemOff :: Ptr Fd -> Int -> Fd -> IO () #

peekByteOff :: Ptr b -> Int -> IO Fd #

pokeByteOff :: Ptr b -> Int -> Fd -> IO () #

peek :: Ptr Fd -> IO Fd #

poke :: Ptr Fd -> Fd -> IO () #

Storable CodePoint 
Instance details

Defined in Data.Text.Encoding

Methods

sizeOf :: CodePoint -> Int #

alignment :: CodePoint -> Int #

peekElemOff :: Ptr CodePoint -> Int -> IO CodePoint #

pokeElemOff :: Ptr CodePoint -> Int -> CodePoint -> IO () #

peekByteOff :: Ptr b -> Int -> IO CodePoint #

pokeByteOff :: Ptr b -> Int -> CodePoint -> IO () #

peek :: Ptr CodePoint -> IO CodePoint #

poke :: Ptr CodePoint -> CodePoint -> IO () #

Storable DecoderState 
Instance details

Defined in Data.Text.Encoding

Methods

sizeOf :: DecoderState -> Int #

alignment :: DecoderState -> Int #

peekElemOff :: Ptr DecoderState -> Int -> IO DecoderState #

pokeElemOff :: Ptr DecoderState -> Int -> DecoderState -> IO () #

peekByteOff :: Ptr b -> Int -> IO DecoderState #

pokeByteOff :: Ptr b -> Int -> DecoderState -> IO () #

peek :: Ptr DecoderState -> IO DecoderState #

poke :: Ptr DecoderState -> DecoderState -> IO () #

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

Methods

sizeOf :: UUID -> Int #

alignment :: UUID -> Int #

peekElemOff :: Ptr UUID -> Int -> IO UUID #

pokeElemOff :: Ptr UUID -> Int -> UUID -> IO () #

peekByteOff :: Ptr b -> Int -> IO UUID #

pokeByteOff :: Ptr b -> Int -> UUID -> IO () #

peek :: Ptr UUID -> IO UUID #

poke :: Ptr UUID -> UUID -> IO () #

Storable ()

Since: base-4.9.0.0

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: () -> Int #

alignment :: () -> Int #

peekElemOff :: Ptr () -> Int -> IO () #

pokeElemOff :: Ptr () -> Int -> () -> IO () #

peekByteOff :: Ptr b -> Int -> IO () #

pokeByteOff :: Ptr b -> Int -> () -> IO () #

peek :: Ptr () -> IO () #

poke :: Ptr () -> () -> IO () #

Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Bool -> Int #

alignment :: Bool -> Int #

peekElemOff :: Ptr Bool -> Int -> IO Bool #

pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () #

peekByteOff :: Ptr b -> Int -> IO Bool #

pokeByteOff :: Ptr b -> Int -> Bool -> IO () #

peek :: Ptr Bool -> IO Bool #

poke :: Ptr Bool -> Bool -> IO () #

Storable Char

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Char -> Int #

alignment :: Char -> Int #

peekElemOff :: Ptr Char -> Int -> IO Char #

pokeElemOff :: Ptr Char -> Int -> Char -> IO () #

peekByteOff :: Ptr b -> Int -> IO Char #

pokeByteOff :: Ptr b -> Int -> Char -> IO () #

peek :: Ptr Char -> IO Char #

poke :: Ptr Char -> Char -> IO () #

Storable Double

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Float

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Float -> Int #

alignment :: Float -> Int #

peekElemOff :: Ptr Float -> Int -> IO Float #

pokeElemOff :: Ptr Float -> Int -> Float -> IO () #

peekByteOff :: Ptr b -> Int -> IO Float #

pokeByteOff :: Ptr b -> Int -> Float -> IO () #

peek :: Ptr Float -> IO Float #

poke :: Ptr Float -> Float -> IO () #

Storable Int

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int -> Int #

alignment :: Int -> Int #

peekElemOff :: Ptr Int -> Int -> IO Int #

pokeElemOff :: Ptr Int -> Int -> Int -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int #

pokeByteOff :: Ptr b -> Int -> Int -> IO () #

peek :: Ptr Int -> IO Int #

poke :: Ptr Int -> Int -> IO () #

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word -> Int #

alignment :: Word -> Int #

peekElemOff :: Ptr Word -> Int -> IO Word #

pokeElemOff :: Ptr Word -> Int -> Word -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word #

pokeByteOff :: Ptr b -> Int -> Word -> IO () #

peek :: Ptr Word -> IO Word #

poke :: Ptr Word -> Word -> IO () #

Storable a => Storable (Complex a)

Since: base-4.8.0.0

Instance details

Defined in Data.Complex

Methods

sizeOf :: Complex a -> Int #

alignment :: Complex a -> Int #

peekElemOff :: Ptr (Complex a) -> Int -> IO (Complex a) #

pokeElemOff :: Ptr (Complex a) -> Int -> Complex a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Complex a) #

pokeByteOff :: Ptr b -> Int -> Complex a -> IO () #

peek :: Ptr (Complex a) -> IO (Complex a) #

poke :: Ptr (Complex a) -> Complex a -> IO () #

Storable a => Storable (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

sizeOf :: Identity a -> Int #

alignment :: Identity a -> Int #

peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) #

pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Identity a) #

pokeByteOff :: Ptr b -> Int -> Identity a -> IO () #

peek :: Ptr (Identity a) -> IO (Identity a) #

poke :: Ptr (Identity a) -> Identity a -> IO () #

Storable a => Storable (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

sizeOf :: Down a -> Int #

alignment :: Down a -> Int #

peekElemOff :: Ptr (Down a) -> Int -> IO (Down a) #

pokeElemOff :: Ptr (Down a) -> Int -> Down a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Down a) #

pokeByteOff :: Ptr b -> Int -> Down a -> IO () #

peek :: Ptr (Down a) -> IO (Down a) #

poke :: Ptr (Down a) -> Down a -> IO () #

Storable (FunPtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: FunPtr a -> Int #

alignment :: FunPtr a -> Int #

peekElemOff :: Ptr (FunPtr a) -> Int -> IO (FunPtr a) #

pokeElemOff :: Ptr (FunPtr a) -> Int -> FunPtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (FunPtr a) #

pokeByteOff :: Ptr b -> Int -> FunPtr a -> IO () #

peek :: Ptr (FunPtr a) -> IO (FunPtr a) #

poke :: Ptr (FunPtr a) -> FunPtr a -> IO () #

Storable (Ptr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ptr a -> Int #

alignment :: Ptr a -> Int #

peekElemOff :: Ptr (Ptr a) -> Int -> IO (Ptr a) #

pokeElemOff :: Ptr (Ptr a) -> Int -> Ptr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ptr a) #

pokeByteOff :: Ptr b -> Int -> Ptr a -> IO () #

peek :: Ptr (Ptr a) -> IO (Ptr a) #

poke :: Ptr (Ptr a) -> Ptr a -> IO () #

(Storable a, Integral a) => Storable (Ratio a)

Since: base-4.8.0.0

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ratio a -> Int #

alignment :: Ratio a -> Int #

peekElemOff :: Ptr (Ratio a) -> Int -> IO (Ratio a) #

pokeElemOff :: Ptr (Ratio a) -> Int -> Ratio a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ratio a) #

pokeByteOff :: Ptr b -> Int -> Ratio a -> IO () #

peek :: Ptr (Ratio a) -> IO (Ratio a) #

poke :: Ptr (Ratio a) -> Ratio a -> IO () #

Storable (StablePtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: StablePtr a -> Int #

alignment :: StablePtr a -> Int #

peekElemOff :: Ptr (StablePtr a) -> Int -> IO (StablePtr a) #

pokeElemOff :: Ptr (StablePtr a) -> Int -> StablePtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (StablePtr a) #

pokeByteOff :: Ptr b -> Int -> StablePtr a -> IO () #

peek :: Ptr (StablePtr a) -> IO (StablePtr a) #

poke :: Ptr (StablePtr a) -> StablePtr a -> IO () #

Prim a => Storable (PrimStorable a) 
Instance details

Defined in Data.Primitive.Types

Storable g => Storable (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

sizeOf :: StateGen g -> Int #

alignment :: StateGen g -> Int #

peekElemOff :: Ptr (StateGen g) -> Int -> IO (StateGen g) #

pokeElemOff :: Ptr (StateGen g) -> Int -> StateGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (StateGen g) #

pokeByteOff :: Ptr b -> Int -> StateGen g -> IO () #

peek :: Ptr (StateGen g) -> IO (StateGen g) #

poke :: Ptr (StateGen g) -> StateGen g -> IO () #

Storable g => Storable (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

sizeOf :: AtomicGen g -> Int #

alignment :: AtomicGen g -> Int #

peekElemOff :: Ptr (AtomicGen g) -> Int -> IO (AtomicGen g) #

pokeElemOff :: Ptr (AtomicGen g) -> Int -> AtomicGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (AtomicGen g) #

pokeByteOff :: Ptr b -> Int -> AtomicGen g -> IO () #

peek :: Ptr (AtomicGen g) -> IO (AtomicGen g) #

poke :: Ptr (AtomicGen g) -> AtomicGen g -> IO () #

Storable g => Storable (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

sizeOf :: IOGen g -> Int #

alignment :: IOGen g -> Int #

peekElemOff :: Ptr (IOGen g) -> Int -> IO (IOGen g) #

pokeElemOff :: Ptr (IOGen g) -> Int -> IOGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (IOGen g) #

pokeByteOff :: Ptr b -> Int -> IOGen g -> IO () #

peek :: Ptr (IOGen g) -> IO (IOGen g) #

poke :: Ptr (IOGen g) -> IOGen g -> IO () #

Storable g => Storable (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

sizeOf :: STGen g -> Int #

alignment :: STGen g -> Int #

peekElemOff :: Ptr (STGen g) -> Int -> IO (STGen g) #

pokeElemOff :: Ptr (STGen g) -> Int -> STGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (STGen g) #

pokeByteOff :: Ptr b -> Int -> STGen g -> IO () #

peek :: Ptr (STGen g) -> IO (STGen g) #

poke :: Ptr (STGen g) -> STGen g -> IO () #

Storable g => Storable (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

sizeOf :: TGen g -> Int #

alignment :: TGen g -> Int #

peekElemOff :: Ptr (TGen g) -> Int -> IO (TGen g) #

pokeElemOff :: Ptr (TGen g) -> Int -> TGen g -> IO () #

peekByteOff :: Ptr b -> Int -> IO (TGen g) #

pokeByteOff :: Ptr b -> Int -> TGen g -> IO () #

peek :: Ptr (TGen g) -> IO (TGen g) #

poke :: Ptr (TGen g) -> TGen g -> IO () #

Storable a => Storable (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

sizeOf :: Const a b -> Int #

alignment :: Const a b -> Int #

peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) #

pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () #

peekByteOff :: Ptr b0 -> Int -> IO (Const a b) #

pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () #

peek :: Ptr (Const a b) -> IO (Const a b) #

poke :: Ptr (Const a b) -> Const a b -> IO () #

Storable a => Storable (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

sizeOf :: Tagged s a -> Int #

alignment :: Tagged s a -> Int #

peekElemOff :: Ptr (Tagged s a) -> Int -> IO (Tagged s a) #

pokeElemOff :: Ptr (Tagged s a) -> Int -> Tagged s a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Tagged s a) #

pokeByteOff :: Ptr b -> Int -> Tagged s a -> IO () #

peek :: Ptr (Tagged s a) -> IO (Tagged s a) #

poke :: Ptr (Tagged s a) -> Tagged s a -> IO () #

freeStablePtr :: StablePtr a -> IO () #

Dissolve the association between the stable pointer and the Haskell value. Afterwards, if the stable pointer is passed to deRefStablePtr or freeStablePtr, the behaviour is undefined. However, the stable pointer may still be passed to castStablePtrToPtr, but the Ptr () value returned by castStablePtrToPtr, in this case, is undefined (in particular, it may be nullPtr). Nevertheless, the call to castStablePtrToPtr is guaranteed not to diverge.

deRefStablePtr :: StablePtr a -> IO a #

Obtain the Haskell value referenced by a stable pointer, i.e., the same value that was passed to the corresponding call to newStablePtr. If the argument to deRefStablePtr has already been freed using freeStablePtr, the behaviour of deRefStablePtr is undefined.

castStablePtrToPtr :: StablePtr a -> Ptr () #

Coerce a stable pointer to an address. No guarantees are made about the resulting value, except that the original stable pointer can be recovered by castPtrToStablePtr. In particular, the address may not refer to an accessible memory location and any attempt to pass it to the member functions of the class Storable leads to undefined behaviour.

castPtrToStablePtr :: Ptr () -> StablePtr a #

The inverse of castStablePtrToPtr, i.e., we have the identity

sp == castPtrToStablePtr (castStablePtrToPtr sp)

for any stable pointer sp on which freeStablePtr has not been executed yet. Moreover, castPtrToStablePtr may only be applied to pointers that have been produced by castStablePtrToPtr.

unsafeCoerceUnlifted :: forall (a :: UnliftedType) (b :: UnliftedType). a -> b #

unsafeCoerceAddr :: forall (a :: TYPE 'AddrRep) (b :: TYPE 'AddrRep). a -> b #

unsafeCoerce :: a -> b #

Coerce a value from one type to another, bypassing the type-checker.

There are several legitimate ways to use unsafeCoerce:

  1. To coerce e.g. Int to HValue, put it in a list of HValue, and then later coerce it back to Int before using it.
  2. To produce e.g. (a+b) :~: (b+a) from unsafeCoerce Refl. Here the two sides really are the same type -- so nothing unsafe is happening -- but GHC is not clever enough to see it.
  3. In Data.Typeable we have
       eqTypeRep :: forall k1 k2 (a :: k1) (b :: k2).
                    TypeRep a -> TypeRep b -> Maybe (a :~~: b)
       eqTypeRep a b
         | sameTypeRep a b = Just (unsafeCoerce HRefl)
         | otherwise       = Nothing
     

Here again, the unsafeCoerce HRefl is safe, because the two types really are the same -- but the proof of that relies on the complex, trusted implementation of Typeable.

  1. The "reflection trick", which takes advantage of the fact that in class C a where { op :: ty }, we can safely coerce between C a and ty (which have different kinds!) because it's really just a newtype. Note: there is no guarantee, at all that this behavior will be supported into perpetuity.

newtype Xor a #

Monoid under bitwise XOR.

>>> getXor (Xor 0xab <> Xor 0x12) :: Word8
185

Since: base-4.16

Constructors

Xor 

Fields

Instances

Instances details
Bits a => Monoid (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

mempty :: Xor a #

mappend :: Xor a -> Xor a -> Xor a #

mconcat :: [Xor a] -> Xor a #

Bits a => Semigroup (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(<>) :: Xor a -> Xor a -> Xor a #

sconcat :: NonEmpty (Xor a) -> Xor a #

stimes :: Integral b => b -> Xor a -> Xor a #

Bits a => Bits (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(.&.) :: Xor a -> Xor a -> Xor a #

(.|.) :: Xor a -> Xor a -> Xor a #

xor :: Xor a -> Xor a -> Xor a #

complement :: Xor a -> Xor a #

shift :: Xor a -> Int -> Xor a #

rotate :: Xor a -> Int -> Xor a #

zeroBits :: Xor a #

bit :: Int -> Xor a #

setBit :: Xor a -> Int -> Xor a #

clearBit :: Xor a -> Int -> Xor a #

complementBit :: Xor a -> Int -> Xor a #

testBit :: Xor a -> Int -> Bool #

bitSizeMaybe :: Xor a -> Maybe Int #

bitSize :: Xor a -> Int #

isSigned :: Xor a -> Bool #

shiftL :: Xor a -> Int -> Xor a #

unsafeShiftL :: Xor a -> Int -> Xor a #

shiftR :: Xor a -> Int -> Xor a #

unsafeShiftR :: Xor a -> Int -> Xor a #

rotateL :: Xor a -> Int -> Xor a #

rotateR :: Xor a -> Int -> Xor a #

popCount :: Xor a -> Int #

FiniteBits a => FiniteBits (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Bounded a => Bounded (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

minBound :: Xor a #

maxBound :: Xor a #

Enum a => Enum (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

succ :: Xor a -> Xor a #

pred :: Xor a -> Xor a #

toEnum :: Int -> Xor a #

fromEnum :: Xor a -> Int #

enumFrom :: Xor a -> [Xor a] #

enumFromThen :: Xor a -> Xor a -> [Xor a] #

enumFromTo :: Xor a -> Xor a -> [Xor a] #

enumFromThenTo :: Xor a -> Xor a -> Xor a -> [Xor a] #

Read a => Read (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Show a => Show (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

showsPrec :: Int -> Xor a -> ShowS #

show :: Xor a -> String #

showList :: [Xor a] -> ShowS #

Eq a => Eq (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(==) :: Xor a -> Xor a -> Bool #

(/=) :: Xor a -> Xor a -> Bool #

newtype Ior a #

Monoid under bitwise inclusive OR.

>>> getIor (Ior 0xab <> Ior 0x12) :: Word8
187

Since: base-4.16

Constructors

Ior 

Fields

Instances

Instances details
Bits a => Monoid (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

mempty :: Ior a #

mappend :: Ior a -> Ior a -> Ior a #

mconcat :: [Ior a] -> Ior a #

Bits a => Semigroup (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(<>) :: Ior a -> Ior a -> Ior a #

sconcat :: NonEmpty (Ior a) -> Ior a #

stimes :: Integral b => b -> Ior a -> Ior a #

Bits a => Bits (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(.&.) :: Ior a -> Ior a -> Ior a #

(.|.) :: Ior a -> Ior a -> Ior a #

xor :: Ior a -> Ior a -> Ior a #

complement :: Ior a -> Ior a #

shift :: Ior a -> Int -> Ior a #

rotate :: Ior a -> Int -> Ior a #

zeroBits :: Ior a #

bit :: Int -> Ior a #

setBit :: Ior a -> Int -> Ior a #

clearBit :: Ior a -> Int -> Ior a #

complementBit :: Ior a -> Int -> Ior a #

testBit :: Ior a -> Int -> Bool #

bitSizeMaybe :: Ior a -> Maybe Int #

bitSize :: Ior a -> Int #

isSigned :: Ior a -> Bool #

shiftL :: Ior a -> Int -> Ior a #

unsafeShiftL :: Ior a -> Int -> Ior a #

shiftR :: Ior a -> Int -> Ior a #

unsafeShiftR :: Ior a -> Int -> Ior a #

rotateL :: Ior a -> Int -> Ior a #

rotateR :: Ior a -> Int -> Ior a #

popCount :: Ior a -> Int #

FiniteBits a => FiniteBits (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Bounded a => Bounded (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

minBound :: Ior a #

maxBound :: Ior a #

Enum a => Enum (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

succ :: Ior a -> Ior a #

pred :: Ior a -> Ior a #

toEnum :: Int -> Ior a #

fromEnum :: Ior a -> Int #

enumFrom :: Ior a -> [Ior a] #

enumFromThen :: Ior a -> Ior a -> [Ior a] #

enumFromTo :: Ior a -> Ior a -> [Ior a] #

enumFromThenTo :: Ior a -> Ior a -> Ior a -> [Ior a] #

Read a => Read (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Show a => Show (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

showsPrec :: Int -> Ior a -> ShowS #

show :: Ior a -> String #

showList :: [Ior a] -> ShowS #

Eq a => Eq (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(==) :: Ior a -> Ior a -> Bool #

(/=) :: Ior a -> Ior a -> Bool #

newtype Iff a #

Monoid under bitwise 'equality'; defined as 1 if the corresponding bits match, and 0 otherwise.

>>> getIff (Iff 0xab <> Iff 0x12) :: Word8
70

Since: base-4.16

Constructors

Iff 

Fields

Instances

Instances details
FiniteBits a => Monoid (Iff a)

This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

mempty :: Iff a #

mappend :: Iff a -> Iff a -> Iff a #

mconcat :: [Iff a] -> Iff a #

FiniteBits a => Semigroup (Iff a)

This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(<>) :: Iff a -> Iff a -> Iff a #

sconcat :: NonEmpty (Iff a) -> Iff a #

stimes :: Integral b => b -> Iff a -> Iff a #

Bits a => Bits (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(.&.) :: Iff a -> Iff a -> Iff a #

(.|.) :: Iff a -> Iff a -> Iff a #

xor :: Iff a -> Iff a -> Iff a #

complement :: Iff a -> Iff a #

shift :: Iff a -> Int -> Iff a #

rotate :: Iff a -> Int -> Iff a #

zeroBits :: Iff a #

bit :: Int -> Iff a #

setBit :: Iff a -> Int -> Iff a #

clearBit :: Iff a -> Int -> Iff a #

complementBit :: Iff a -> Int -> Iff a #

testBit :: Iff a -> Int -> Bool #

bitSizeMaybe :: Iff a -> Maybe Int #

bitSize :: Iff a -> Int #

isSigned :: Iff a -> Bool #

shiftL :: Iff a -> Int -> Iff a #

unsafeShiftL :: Iff a -> Int -> Iff a #

shiftR :: Iff a -> Int -> Iff a #

unsafeShiftR :: Iff a -> Int -> Iff a #

rotateL :: Iff a -> Int -> Iff a #

rotateR :: Iff a -> Int -> Iff a #

popCount :: Iff a -> Int #

FiniteBits a => FiniteBits (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Bounded a => Bounded (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

minBound :: Iff a #

maxBound :: Iff a #

Enum a => Enum (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

succ :: Iff a -> Iff a #

pred :: Iff a -> Iff a #

toEnum :: Int -> Iff a #

fromEnum :: Iff a -> Int #

enumFrom :: Iff a -> [Iff a] #

enumFromThen :: Iff a -> Iff a -> [Iff a] #

enumFromTo :: Iff a -> Iff a -> [Iff a] #

enumFromThenTo :: Iff a -> Iff a -> Iff a -> [Iff a] #

Read a => Read (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Show a => Show (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

showsPrec :: Int -> Iff a -> ShowS #

show :: Iff a -> String #

showList :: [Iff a] -> ShowS #

Eq a => Eq (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(==) :: Iff a -> Iff a -> Bool #

(/=) :: Iff a -> Iff a -> Bool #

newtype And a #

Monoid under bitwise AND.

>>> getAnd (And 0xab <> And 0x12) :: Word8
2

Since: base-4.16

Constructors

And 

Fields

Instances

Instances details
FiniteBits a => Monoid (And a)

This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

mempty :: And a #

mappend :: And a -> And a -> And a #

mconcat :: [And a] -> And a #

Bits a => Semigroup (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(<>) :: And a -> And a -> And a #

sconcat :: NonEmpty (And a) -> And a #

stimes :: Integral b => b -> And a -> And a #

Bits a => Bits (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(.&.) :: And a -> And a -> And a #

(.|.) :: And a -> And a -> And a #

xor :: And a -> And a -> And a #

complement :: And a -> And a #

shift :: And a -> Int -> And a #

rotate :: And a -> Int -> And a #

zeroBits :: And a #

bit :: Int -> And a #

setBit :: And a -> Int -> And a #

clearBit :: And a -> Int -> And a #

complementBit :: And a -> Int -> And a #

testBit :: And a -> Int -> Bool #

bitSizeMaybe :: And a -> Maybe Int #

bitSize :: And a -> Int #

isSigned :: And a -> Bool #

shiftL :: And a -> Int -> And a #

unsafeShiftL :: And a -> Int -> And a #

shiftR :: And a -> Int -> And a #

unsafeShiftR :: And a -> Int -> And a #

rotateL :: And a -> Int -> And a #

rotateR :: And a -> Int -> And a #

popCount :: And a -> Int #

FiniteBits a => FiniteBits (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Bounded a => Bounded (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

minBound :: And a #

maxBound :: And a #

Enum a => Enum (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

succ :: And a -> And a #

pred :: And a -> And a #

toEnum :: Int -> And a #

fromEnum :: And a -> Int #

enumFrom :: And a -> [And a] #

enumFromThen :: And a -> And a -> [And a] #

enumFromTo :: And a -> And a -> [And a] #

enumFromThenTo :: And a -> And a -> And a -> [And a] #

Read a => Read (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Show a => Show (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

showsPrec :: Int -> And a -> ShowS #

show :: And a -> String #

showList :: [And a] -> ShowS #

Eq a => Eq (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(==) :: And a -> And a -> Bool #

(/=) :: And a -> And a -> Bool #

oneBits :: FiniteBits a => a #

A more concise version of complement zeroBits.

>>> complement (zeroBits :: Word) == (oneBits :: Word)
True
>>> complement (oneBits :: Word) == (zeroBits :: Word)
True

Note

The constraint on oneBits is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.

Since: base-4.16

isSeparator :: Char -> Bool #

Selects Unicode space and separator characters.

This function returns True if its argument has one of the following GeneralCategorys, 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 "Separator".

Examples

Expand

Basic usage:

>>> isSeparator 'a'
False
>>> isSeparator '6'
False
>>> isSeparator ' '
True

Warning: newlines and tab characters are not considered separators.

>>> isSeparator '\n'
False
>>> isSeparator '\t'
False

But some more exotic characters are (like HTML's &nbsp;):

>>> isSeparator '\160'
True

isNumber :: Char -> Bool #

Selects Unicode numeric characters, including digits from various scripts, Roman numerals, et cetera.

This function returns True if its argument has one of the following GeneralCategorys, 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 "Number".

Examples

Expand

Basic usage:

>>> isNumber 'a'
False
>>> isNumber '%'
False
>>> isNumber '3'
True

ASCII '0' through '9' are all numbers:

>>> and $ map isNumber ['0'..'9']
True

Unicode Roman numerals are "numbers" as well:

>>> isNumber 'Ⅸ'
True

isMark :: Char -> Bool #

Selects Unicode mark characters, for example accents and the like, which combine with preceding characters.

This function returns True if its argument has one of the following GeneralCategorys, 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 "Mark".

Examples

Expand

Basic usage:

>>> isMark 'a'
False
>>> isMark '0'
False

Combining marks such as accent characters usually need to follow another character before they become printable:

>>> map isMark "ò"
[False,True]

Puns are not necessarily supported:

>>> isMark '✓'
False

isLetter :: Char -> Bool #

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 GeneralCategorys, 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 #

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'

reads :: Read a => ReadS a #

equivalent to readsPrec with a precedence of 0.

readMaybe :: Read a => String -> Maybe a #

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 #

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

read :: Read a => String -> a #

The read function reads input from a string, which must be completely consumed by the input process. read fails with an error if the parse is unsuccessful, and it is therefore discouraged from being used in real applications. Use readMaybe or readEither for safe alternatives.

>>> read "123" :: Int
123
>>> read "hello" :: Int
*** Exception: Prelude.read: no parse

rights :: [Either a b] -> [b] #

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]

partitionEithers :: [Either a b] -> ([a], [b]) #

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

lefts :: [Either a b] -> [a] #

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"]

isRight :: Either a b -> Bool #

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 #

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

fromRight :: b -> Either a b -> b #

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 #

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

data Proxy (t :: k) #

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) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type #

Methods

from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a #

to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a #

Representable (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Proxy #

Methods

tabulate :: (Rep Proxy -> a) -> Proxy a #

index :: Proxy a -> Rep Proxy -> a #

MonadZip (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: Proxy a -> Proxy b -> Proxy (a, b) #

mzipWith :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

munzip :: Proxy (a, b) -> (Proxy a, Proxy b) #

Foldable (Proxy :: TYPE LiftedRep -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Proxy m -> m #

foldMap :: Monoid m => (a -> m) -> Proxy a -> m #

foldMap' :: Monoid m => (a -> m) -> Proxy a -> m #

foldr :: (a -> b -> b) -> b -> Proxy a -> b #

foldr' :: (a -> b -> b) -> b -> Proxy a -> b #

foldl :: (b -> a -> b) -> b -> Proxy a -> b #

foldl' :: (b -> a -> b) -> b -> Proxy a -> b #

foldr1 :: (a -> a -> a) -> Proxy a -> a #

foldl1 :: (a -> a -> a) -> Proxy a -> a #

toList :: Proxy a -> [a] #

null :: Proxy a -> Bool #

length :: Proxy a -> Int #

elem :: Eq a => a -> Proxy a -> Bool #

maximum :: Ord a => Proxy a -> a #

minimum :: Ord a => Proxy a -> a #

sum :: Num a => Proxy a -> a #

product :: Num a => Proxy a -> a #

Eq1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Proxy a -> Proxy b -> Bool #

Ord1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Proxy a -> Proxy b -> Ordering #

Read1 (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Proxy a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Proxy a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Proxy a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Proxy a] #

Show1 (Proxy :: TYPE LiftedRep -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Proxy a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Proxy a] -> ShowS #

Contravariant (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Proxy a -> Proxy a' #

(>$) :: b -> Proxy b -> Proxy a #

Traversable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Proxy a -> f (Proxy b) #

sequenceA :: Applicative f => Proxy (f a) -> f (Proxy a) #

mapM :: Monad m => (a -> m b) -> Proxy a -> m (Proxy b) #

sequence :: Monad m => Proxy (m a) -> m (Proxy a) #

Alternative (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

empty :: Proxy a #

(<|>) :: Proxy a -> Proxy a -> Proxy a #

some :: Proxy a -> Proxy [a] #

many :: Proxy a -> Proxy [a] #

Applicative (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

pure :: a -> Proxy a #

(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b #

liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

(*>) :: Proxy a -> Proxy b -> Proxy b #

(<*) :: Proxy a -> Proxy b -> Proxy a #

Functor (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

fmap :: (a -> b) -> Proxy a -> Proxy b #

(<$) :: a -> Proxy b -> Proxy a #

Monad (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b #

(>>) :: Proxy a -> Proxy b -> Proxy b #

return :: a -> Proxy a #

MonadPlus (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

mzero :: Proxy a #

mplus :: Proxy a -> Proxy a -> Proxy a #

Decidable (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Proxy a #

choose :: (a -> Either b c) -> Proxy b -> Proxy c -> Proxy a #

Divisible (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Proxy b -> Proxy c -> Proxy a #

conquer :: Proxy a #

NFData1 (Proxy :: TYPE LiftedRep -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Proxy a -> () #

Hashable1 (Proxy :: Type -> Type) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Proxy a -> Int #

Invariant (Proxy :: Type -> Type)

from Data.Proxy

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Proxy a -> Proxy b #

Adjustable (Proxy :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key Proxy -> Proxy a -> Proxy a #

replace :: Key Proxy -> a -> Proxy a -> Proxy a #

FoldableWithKey (Proxy :: TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Proxy a -> [(Key Proxy, a)] #

foldMapWithKey :: Monoid m => (Key Proxy -> a -> m) -> Proxy a -> m #

foldrWithKey :: (Key Proxy -> a -> b -> b) -> b -> Proxy a -> b #

foldlWithKey :: (b -> Key Proxy -> a -> b) -> b -> Proxy a -> b #

Indexable (Proxy :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

index :: Proxy a -> Key Proxy -> a #

Keyed (Proxy :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key Proxy -> a -> b) -> Proxy a -> Proxy b #

Lookup (Proxy :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

lookup :: Key Proxy -> Proxy a -> Maybe a #

TraversableWithKey (Proxy :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key Proxy -> a -> f b) -> Proxy a -> f (Proxy b) #

mapWithKeyM :: Monad m => (Key Proxy -> a -> m b) -> Proxy a -> m (Proxy b) #

Zip (Proxy :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

zip :: Proxy a -> Proxy b -> Proxy (a, b) #

zap :: Proxy (a -> b) -> Proxy a -> Proxy b #

ZipWithKey (Proxy :: Type -> Type) 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key Proxy -> a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

zapWithKey :: Proxy (Key Proxy -> a -> b) -> Proxy a -> Proxy b #

Selective (Proxy :: Type -> Type) 
Instance details

Defined in Control.Selective

Methods

select :: Proxy (Either a b) -> Proxy (a -> b) -> Proxy b #

Alt (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Proxy a -> Proxy a -> Proxy a #

some :: Applicative Proxy => Proxy a -> Proxy [a] #

many :: Applicative Proxy => Proxy a -> Proxy [a] #

Apply (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Proxy (a -> b) -> Proxy a -> Proxy b #

(.>) :: Proxy a -> Proxy b -> Proxy b #

(<.) :: Proxy a -> Proxy b -> Proxy a #

liftF2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

Bind (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Proxy a -> (a -> Proxy b) -> Proxy b #

join :: Proxy (Proxy a) -> Proxy a #

Extend (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Proxy a -> Proxy (Proxy a) #

extended :: (Proxy a -> b) -> Proxy a -> Proxy b #

Plus (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Proxy a #

Cosieve (Tagged :: Type -> Type -> Type) (Proxy :: Type -> Type) 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: Tagged a b -> Proxy a -> b #

Data t => Data (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Proxy t -> c (Proxy t) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Proxy t) #

toConstr :: Proxy t -> Constr #

dataTypeOf :: Proxy t -> DataType #

dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Proxy t)) #

dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Proxy t)) #

gmapT :: (forall b. Data b => b -> b) -> Proxy t -> Proxy t #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r #

gmapQ :: (forall d. Data d => d -> u) -> Proxy t -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Proxy t -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s #

mappend :: Proxy s -> Proxy s -> Proxy s #

mconcat :: [Proxy s] -> Proxy s #

Semigroup (Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

(<>) :: Proxy s -> Proxy s -> Proxy s #

sconcat :: NonEmpty (Proxy s) -> Proxy s #

stimes :: Integral b => b -> Proxy s -> Proxy s #

Bounded (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

minBound :: Proxy t #

maxBound :: Proxy t #

Enum (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

succ :: Proxy s -> Proxy s #

pred :: Proxy s -> Proxy s #

toEnum :: Int -> Proxy s #

fromEnum :: Proxy s -> Int #

enumFrom :: Proxy s -> [Proxy s] #

enumFromThen :: Proxy s -> Proxy s -> [Proxy s] #

enumFromTo :: Proxy s -> Proxy s -> [Proxy s] #

enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] #

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type #

Methods

from :: Proxy t -> Rep (Proxy t) x #

to :: Rep (Proxy t) x -> Proxy t #

Ix (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

range :: (Proxy s, Proxy s) -> [Proxy s] #

index :: (Proxy s, Proxy s) -> Proxy s -> Int #

unsafeIndex :: (Proxy s, Proxy s) -> Proxy s -> Int #

inRange :: (Proxy s, Proxy s) -> Proxy s -> Bool #

rangeSize :: (Proxy s, Proxy s) -> Int #

unsafeRangeSize :: (Proxy s, Proxy s) -> Int #

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

Methods

showsPrec :: Int -> Proxy s -> ShowS #

show :: Proxy s -> String #

showList :: [Proxy s] -> ShowS #

NFData (Proxy a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Proxy a -> () #

Eq (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(==) :: Proxy s -> Proxy s -> Bool #

(/=) :: Proxy s -> Proxy s -> Bool #

Ord (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

compare :: Proxy s -> Proxy s -> Ordering #

(<) :: Proxy s -> Proxy s -> Bool #

(<=) :: Proxy s -> Proxy s -> Bool #

(>) :: Proxy s -> Proxy s -> Bool #

(>=) :: Proxy s -> Proxy s -> Bool #

max :: Proxy s -> Proxy s -> Proxy s #

min :: Proxy s -> Proxy s -> Proxy s #

Abelian (Proxy x) 
Instance details

Defined in Data.Group

Cyclic (Proxy x) 
Instance details

Defined in Data.Group

Methods

generator :: Proxy x #

Group (Proxy x)

Trivial group, Functor style.

Instance details

Defined in Data.Group

Methods

invert :: Proxy x -> Proxy x #

(~~) :: Proxy x -> Proxy x -> Proxy x #

pow :: Integral x0 => Proxy x -> x0 -> Proxy x #

Hashable (Proxy a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Proxy a -> Int #

hash :: Proxy a -> Int #

type Rep1 (Proxy :: k -> Type)

Since: base-4.6.0.0

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 :: Type -> Type) 
Instance details

Defined in Data.Functor.Rep

type Rep (Proxy :: Type -> Type) = Void
type Key (Proxy :: Type -> Type) 
Instance details

Defined in Data.Key

type Key (Proxy :: Type -> Type) = Void
type Rep (Proxy t)

Since: base-4.6.0.0

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))

data KProxy t #

A concrete, promotable proxy type, for use at the kind level. There are no instances for this because it is intended at the kind level only

Constructors

KProxy 

asProxyTypeOf :: a -> proxy a -> a #

asProxyTypeOf 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 tag of the second.

>>> import Data.Word
>>> :type asProxyTypeOf 123 (Proxy :: Proxy Word8)
asProxyTypeOf 123 (Proxy :: Proxy Word8) :: Word8

Note the lower-case proxy in the definition. This allows any type constructor with just one argument to be passed to the function, for example we could also write

>>> import Data.Word
>>> :type asProxyTypeOf 123 (Just (undefined :: Word8))
asProxyTypeOf 123 (Just (undefined :: Word8)) :: Word8

class Category (cat :: k -> k -> Type) where #

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

Methods

id :: forall (a :: k). cat a a #

the identity morphism

(.) :: forall (b :: k) (c :: k) (a :: k). cat b c -> cat a b -> cat a c infixr 9 #

morphism composition

Instances

Instances details
Category Op 
Instance details

Defined in Data.Functor.Contravariant

Methods

id :: forall (a :: k). Op a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Op b c -> Op a b -> Op a c #

Monad m => Category (Kleisli m :: Type -> Type -> TYPE LiftedRep)

Since: base-3.0

Instance details

Defined in Control.Arrow

Methods

id :: forall (a :: k). Kleisli m a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Kleisli m b c -> Kleisli m a b -> Kleisli m a c #

(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 #

(.) :: forall (b :: k) (c :: k) (a :: k). WhenMissing f b c -> WhenMissing f a b -> WhenMissing f a c #

Category p => Category (TambaraSum p :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Choice

Methods

id :: forall (a :: k). TambaraSum p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). TambaraSum p b c -> TambaraSum p a b -> TambaraSum p a c #

Category p => Category (Closure p :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Closed

Methods

id :: forall (a :: k). Closure p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Closure p b c -> Closure p a b -> Closure p a c #

Category p => Category (Tambara p :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Strong

Methods

id :: forall (a :: k). Tambara p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Tambara p b c -> Tambara p a b -> Tambara p a c #

(Category p, Profunctor p) => Category (Coyoneda p :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

id :: forall (a :: k). Coyoneda p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Coyoneda p b c -> Coyoneda p a b -> Coyoneda p a c #

(Category p, Profunctor p) => Category (Yoneda p :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

id :: forall (a :: k). Yoneda p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Yoneda p b c -> Yoneda p a b -> Yoneda p a c #

Applicative f => Category (Static f :: Type -> Type -> Type) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

id :: forall (a :: k). Static f a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Static f b c -> Static f a b -> Static f a c #

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 #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Coercion b c -> Coercion a b -> Coercion a c #

Category ((:~:) :: k -> k -> Type)

Since: base-4.7.0.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k0). a :~: a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). (b :~: c) -> (a :~: b) -> a :~: c #

Comonad w => Category (Cokleisli w :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Control.Comonad

Methods

id :: forall (a :: k). Cokleisli w a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Cokleisli w b c -> Cokleisli w a b -> Cokleisli w a c #

(Monad f, Applicative f) => Category (WhenMatched f x :: Type -> Type -> TYPE LiftedRep)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

id :: forall (a :: k). WhenMatched f x a a #

(.) :: forall (b :: k) (c :: k) (a :: k). WhenMatched f x b c -> WhenMatched f x a b -> WhenMatched f x a c #

(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 #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). WhenMissing f k b c -> WhenMissing f k a b -> WhenMissing f k a c #

Monad f => Category (Star f :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

id :: forall (a :: k). Star f a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Star f b c -> Star f a b -> Star f a c #

Category (->)

Since: base-3.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k). a -> a #

(.) :: forall (b :: k) (c :: k) (a :: k). (b -> c) -> (a -> b) -> a -> c #

Category ((:~~:) :: k -> k -> Type)

Since: base-4.10.0.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k0). a :~~: a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). (b :~~: c) -> (a :~~: b) -> a :~~: c #

Category k2 => Category (Iso k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Isomorphism

Methods

id :: forall (a :: k). Iso k2 a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Iso k2 b c -> Iso k2 a b -> Iso k2 a c #

(Monad f, Applicative f) => Category (WhenMatched f k x :: Type -> Type -> TYPE LiftedRep)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

id :: forall (a :: k0). WhenMatched f k x a a #

(.) :: 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 #

Category p => Category (WrappedProfunctor p :: k -> k -> Type) 
Instance details

Defined in Data.Functor.Invariant

Methods

id :: forall (a :: k0). WrappedProfunctor p a a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). WrappedProfunctor p b c -> WrappedProfunctor p a b -> WrappedProfunctor p a c #

Category p => Category (WrappedArrow p :: k -> k -> Type) 
Instance details

Defined in Data.Profunctor.Types

Methods

id :: forall (a :: k0). WrappedArrow p a a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). WrappedArrow p b c -> WrappedArrow p a b -> WrappedArrow p a c #

Monoid m => Category (Semi m :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

id :: forall (a :: k0). Semi m a a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Semi m b c -> Semi m a b -> Semi m a c #

Category k2 => Category (WrappedCategory k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

id :: forall (a :: k). WrappedCategory k2 a a #

(.) :: forall (b :: k) (c :: k) (a :: k). WrappedCategory k2 b c -> WrappedCategory k2 a b -> WrappedCategory k2 a c #

Category k2 => Category (Dual k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Semigroupoid.Dual

Methods

id :: forall (a :: k). Dual k2 a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Dual k2 b c -> Dual k2 a b -> Dual k2 a c #

Category (Codensity p :: k2 -> k2 -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Ran

Methods

id :: forall (a :: k). Codensity p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Codensity p b c -> Codensity p a b -> Codensity p a c #

(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 #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Product p q b c -> Product p q a b -> Product p q a c #

(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 #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Tannen f p b c -> Tannen f p a b -> Tannen f p a c #

(Applicative f, Category p) => Category (Cayley f p :: k -> k -> Type) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

id :: forall (a :: k0). Cayley f p a a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Cayley f p b c -> Cayley f p a b -> Cayley f p a c #

p ~ q => Category (Rift p q :: k1 -> k1 -> TYPE LiftedRep)

Rift p p forms a Monad in the Profunctor 2-category, which is isomorphic to a Haskell Category instance.

Instance details

Defined in Data.Profunctor.Composition

Methods

id :: forall (a :: k). Rift p q a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Rift p q b c -> Rift p q a b -> Rift p q a c #

p ~ q => Category (Ran p q :: k2 -> k2 -> TYPE LiftedRep)

Ran p p forms a Monad in the Profunctor 2-category, which is isomorphic to a Haskell Category instance.

Instance details

Defined in Data.Profunctor.Ran

Methods

id :: forall (a :: k). Ran p q a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Ran p q b c -> Ran p q a b -> Ran p q a c #

(>>>) :: forall {k} cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c infixr 1 #

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 #

Right-to-left composition

data (a :: k1) :~~: (b :: k2) where infix 4 #

Kind heterogeneous propositional equality. Like :~:, a :~~: b is inhabited by a terminating value if and only if a is the same type as b.

Since: base-4.10.0.0

Constructors

HRefl :: forall {k1} (a :: k1). a :~~: a 

Instances

Instances details
Category ((:~~:) :: k -> k -> Type)

Since: base-4.10.0.0

Instance details

Defined in Control.Category

Methods

id :: forall (a :: k0). a :~~: a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). (b :~~: c) -> (a :~~: b) -> a :~~: c #

Groupoid ((:~~:) :: k -> k -> Type) 
Instance details

Defined in Data.Groupoid

Methods

inv :: forall (a :: k0) (b :: k0). (a :~~: b) -> b :~~: a #

Semigroupoid ((:~~:) :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k0) (k1 :: k0) (i :: k0). (j :~~: k1) -> (i :~~: j) -> i :~~: k1 #

TestCoercion ((:~~:) a :: k -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Coercion

Methods

testCoercion :: forall (a0 :: k0) (b :: k0). (a :~~: a0) -> (a :~~: b) -> Maybe (Coercion a0 b) #

TestEquality ((:~~:) a :: k -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

testEquality :: forall (a0 :: k0) (b :: k0). (a :~~: a0) -> (a :~~: b) -> Maybe (a0 :~: b) #

NFData2 ((:~~:) :: Type -> Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a :~~: b) -> () #

NFData1 ((:~~:) a :: TYPE LiftedRep -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> (a :~~: a0) -> () #

(Typeable i, Typeable j, Typeable a, Typeable b, a ~~ b) => Data (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> (a :~~: b) -> c (a :~~: b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a :~~: b) #

toConstr :: (a :~~: b) -> Constr #

dataTypeOf :: (a :~~: b) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a :~~: b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a :~~: b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a :~~: b) -> a :~~: b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a :~~: b) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a :~~: b) -> r #

gmapQ :: (forall d. Data d => d -> u) -> (a :~~: b) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a :~~: b) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a :~~: b) -> m (a :~~: b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~~: b) -> m (a :~~: b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~~: b) -> m (a :~~: b) #

a ~~ b => Bounded (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound :: a :~~: b #

maxBound :: a :~~: b #

a ~~ b => Enum (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

succ :: (a :~~: b) -> a :~~: b #

pred :: (a :~~: b) -> a :~~: b #

toEnum :: Int -> a :~~: b #

fromEnum :: (a :~~: b) -> Int #

enumFrom :: (a :~~: b) -> [a :~~: b] #

enumFromThen :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] #

enumFromTo :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] #

enumFromThenTo :: (a :~~: b) -> (a :~~: b) -> (a :~~: b) -> [a :~~: b] #

a ~~ b => Read (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

readsPrec :: Int -> ReadS (a :~~: b) #

readList :: ReadS [a :~~: b] #

readPrec :: ReadPrec (a :~~: b) #

readListPrec :: ReadPrec [a :~~: b] #

Show (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

showsPrec :: Int -> (a :~~: b) -> ShowS #

show :: (a :~~: b) -> String #

showList :: [a :~~: b] -> ShowS #

NFData (a :~~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~~: b) -> () #

Eq (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

(==) :: (a :~~: b) -> (a :~~: b) -> Bool #

(/=) :: (a :~~: b) -> (a :~~: b) -> Bool #

Ord (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

compare :: (a :~~: b) -> (a :~~: b) -> Ordering #

(<) :: (a :~~: b) -> (a :~~: b) -> Bool #

(<=) :: (a :~~: b) -> (a :~~: b) -> Bool #

(>) :: (a :~~: b) -> (a :~~: b) -> Bool #

(>=) :: (a :~~: b) -> (a :~~: b) -> Bool #

max :: (a :~~: b) -> (a :~~: b) -> a :~~: b #

min :: (a :~~: b) -> (a :~~: b) -> a :~~: b #

data (a :: k) :~: (b :: k) where infix 4 #

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 #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). (b :~: c) -> (a :~: b) -> a :~: c #

Groupoid ((:~:) :: k -> k -> Type) 
Instance details

Defined in Data.Groupoid

Methods

inv :: forall (a :: k0) (b :: k0). (a :~: b) -> b :~: a #

Semigroupoid ((:~:) :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k0) (k1 :: k0) (i :: k0). (j :~: k1) -> (i :~: j) -> i :~: k1 #

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) #

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) #

NFData2 ((:~:) :: Type -> Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a :~: b) -> () #

NFData1 ((:~:) a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> (a :~: a0) -> () #

(a ~ b, Data a) => Data (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> (a :~: b) -> c (a :~: b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a :~: b) #

toConstr :: (a :~: b) -> Constr #

dataTypeOf :: (a :~: b) -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a :~: b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a :~: b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a :~: b) -> a :~: b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r #

gmapQ :: (forall d. Data d => d -> u) -> (a :~: b) -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> (a :~: b) -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) #

a ~ b => Bounded (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound :: a :~: b #

maxBound :: a :~: b #

a ~ b => Enum (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

succ :: (a :~: b) -> a :~: b #

pred :: (a :~: b) -> a :~: b #

toEnum :: Int -> a :~: b #

fromEnum :: (a :~: b) -> Int #

enumFrom :: (a :~: b) -> [a :~: b] #

enumFromThen :: (a :~: b) -> (a :~: b) -> [a :~: b] #

enumFromTo :: (a :~: b) -> (a :~: b) -> [a :~: b] #

enumFromThenTo :: (a :~: b) -> (a :~: b) -> (a :~: b) -> [a :~: b] #

a ~ b => Read (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

readsPrec :: Int -> ReadS (a :~: b) #

readList :: ReadS [a :~: b] #

readPrec :: ReadPrec (a :~: b) #

readListPrec :: ReadPrec [a :~: b] #

Show (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

showsPrec :: Int -> (a :~: b) -> ShowS #

show :: (a :~: b) -> String #

showList :: [a :~: b] -> ShowS #

NFData (a :~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~: b) -> () #

Eq (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

(==) :: (a :~: b) -> (a :~: b) -> Bool #

(/=) :: (a :~: b) -> (a :~: b) -> Bool #

Ord (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

compare :: (a :~: b) -> (a :~: b) -> Ordering #

(<) :: (a :~: b) -> (a :~: b) -> Bool #

(<=) :: (a :~: b) -> (a :~: b) -> Bool #

(>) :: (a :~: b) -> (a :~: b) -> Bool #

(>=) :: (a :~: b) -> (a :~: b) -> Bool #

max :: (a :~: b) -> (a :~: b) -> a :~: b #

min :: (a :~: b) -> (a :~: b) -> a :~: b #

plusPtr :: Ptr a -> Int -> Ptr b #

Advances the given address by the given offset in bytes.

nullPtr :: Ptr a #

The constant nullPtr contains a distinguished value of Ptr that is not associated with a valid memory location.

nullFunPtr :: FunPtr a #

The constant nullFunPtr contains a distinguished value of FunPtr that is not associated with a valid memory location.

minusPtr :: Ptr a -> Ptr b -> Int #

Computes the offset required to get from the second to the first argument. We have

p2 == p1 `plusPtr` (p2 `minusPtr` p1)

castPtrToFunPtr :: Ptr a -> FunPtr b #

Casts a Ptr to a FunPtr.

Note: this is valid only on architectures where data and function pointers range over the same set of addresses, and should only be used for bindings to external libraries whose interface already relies on this assumption.

castPtr :: Ptr a -> Ptr b #

The castPtr function casts a pointer from one type to another.

castFunPtrToPtr :: FunPtr a -> Ptr b #

Casts a FunPtr to a Ptr.

Note: this is valid only on architectures where data and function pointers range over the same set of addresses, and should only be used for bindings to external libraries whose interface already relies on this assumption.

castFunPtr :: FunPtr a -> FunPtr b #

Casts a FunPtr to a FunPtr of a different type.

alignPtr :: Ptr a -> Int -> Ptr a #

Given an arbitrary address and an alignment constraint, alignPtr yields the next higher address that fulfills the alignment constraint. An alignment constraint x is fulfilled by any address divisible by x. This operation is idempotent.

showOct :: (Integral a, Show a) => a -> ShowS #

Show non-negative Integral numbers in base 8.

showIntAtBase :: (Integral a, Show a) => a -> (Int -> Char) -> a -> ShowS #

Shows a non-negative Integral number using the base specified by the first argument, and the character representation specified by the second.

showInt :: Integral a => a -> ShowS #

Show non-negative Integral numbers in base 10.

showHex :: (Integral a, Show a) => a -> ShowS #

Show non-negative Integral numbers in base 16.

showHFloat :: RealFloat a => a -> ShowS #

Show a floating-point value in the hexadecimal format, similar to the %a specifier in C's printf.

>>> showHFloat (212.21 :: Double) ""
"0x1.a86b851eb851fp7"
>>> showHFloat (-12.76 :: Float) ""
"-0x1.9851ecp3"
>>> showHFloat (-0 :: Double) ""
"-0x0p+0"

showGFloatAlt :: RealFloat a => Maybe Int -> a -> ShowS #

Show a signed RealFloat value using standard decimal notation for arguments whose absolute value lies between 0.1 and 9,999,999, and scientific notation otherwise.

This behaves as showFFloat, except that a decimal point is always guaranteed, even if not needed.

Since: base-4.7.0.0

showGFloat :: RealFloat a => Maybe Int -> a -> ShowS #

Show a signed RealFloat value using standard decimal notation for arguments whose absolute value lies between 0.1 and 9,999,999, and scientific notation otherwise.

In the call showGFloat digs val, if digs is Nothing, the value is shown to full precision; if digs is Just d, then at most d digits after the decimal point are shown.

showFFloatAlt :: RealFloat a => Maybe Int -> a -> ShowS #

Show a signed RealFloat value using standard decimal notation (e.g. 245000, 0.0015).

This behaves as showFFloat, except that a decimal point is always guaranteed, even if not needed.

Since: base-4.7.0.0

showFFloat :: RealFloat a => Maybe Int -> a -> ShowS #

Show a signed RealFloat value using standard decimal notation (e.g. 245000, 0.0015).

In the call showFFloat digs val, if digs is Nothing, the value is shown to full precision; if digs is Just d, then at most d digits after the decimal point are shown.

showEFloat :: RealFloat a => Maybe Int -> a -> ShowS #

Show a signed RealFloat value using scientific (exponential) notation (e.g. 2.45e2, 1.5e-3).

In the call showEFloat digs val, if digs is Nothing, the value is shown to full precision; if digs is Just d, then at most d digits after the decimal point are shown.

showBin :: (Integral a, Show a) => a -> ShowS #

Show non-negative Integral numbers in base 2.

readSigned :: Real a => ReadS a -> ReadS a #

Reads a signed Real value, given a reader for an unsigned value.

readOct :: (Eq a, Num a) => ReadS a #

Read an unsigned number in octal notation.

>>> readOct "0644"
[(420,"")]

readInt #

Arguments

:: Num a 
=> a

the base

-> (Char -> Bool)

a predicate distinguishing valid digits in this base

-> (Char -> Int)

a function converting a valid digit character to an Int

-> ReadS a 

Reads an unsigned Integral value in an arbitrary base.

readHex :: (Eq a, Num a) => ReadS a #

Read an unsigned number in hexadecimal notation. Both upper or lower case letters are allowed.

>>> readHex "deadbeef"
[(3735928559,"")]

readFloat :: RealFrac a => ReadS a #

Reads an unsigned RealFrac value, expressed in decimal scientific notation.

readDec :: (Eq a, Num a) => ReadS a #

Read an unsigned number in decimal notation.

>>> readDec "0644"
[(644,"")]

readBin :: (Eq a, Num a) => ReadS a #

Read an unsigned number in binary notation.

>>> readBin "10011"
[(19,"")]

readParen :: Bool -> ReadS a -> ReadS a #

readParen True p parses what p parses, but surrounded with parentheses.

readParen False p parses what p parses, but optionally surrounded with parentheses.

readLitChar :: ReadS Char #

Read a string representation of a character, using Haskell source-language escape conventions, and convert it to the character that it encodes. For example:

readLitChar "\\nHello"  =  [('\n', "Hello")]

lexLitChar :: ReadS String #

Read a string representation of a character, using Haskell source-language escape conventions. For example:

lexLitChar  "\\nHello"  =  [("\\n", "Hello")]

lexDigits :: ReadS String #

Reads a non-empty string of decimal digits.

lex :: ReadS String #

The lex function reads a single lexeme from the input, discarding initial white space, and returning the characters that constitute the lexeme. If the input string contains only white space, lex returns a single successful `lexeme' consisting of the empty string. (Thus lex "" = [("","")].) If there is no legal lexeme at the beginning of the input string, lex fails (i.e. returns []).

This lexer is not completely faithful to the Haskell lexical syntax in the following respects:

  • Qualified names are not handled properly
  • Octal and hexadecimal numerics are not recognized as a single token
  • Comments are not treated properly

data ReadPrec a #

Instances

Instances details
MonadFail ReadPrec

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

fail :: String -> ReadPrec a #

Alternative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

empty :: ReadPrec a #

(<|>) :: ReadPrec a -> ReadPrec a -> ReadPrec a #

some :: ReadPrec a -> ReadPrec [a] #

many :: ReadPrec a -> ReadPrec [a] #

Applicative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

pure :: a -> ReadPrec a #

(<*>) :: ReadPrec (a -> b) -> ReadPrec a -> ReadPrec b #

liftA2 :: (a -> b -> c) -> ReadPrec a -> ReadPrec b -> ReadPrec c #

(*>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

(<*) :: ReadPrec a -> ReadPrec b -> ReadPrec a #

Functor ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

fmap :: (a -> b) -> ReadPrec a -> ReadPrec b #

(<$) :: a -> ReadPrec b -> ReadPrec a #

Monad ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

(>>=) :: ReadPrec a -> (a -> ReadPrec b) -> ReadPrec b #

(>>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

return :: a -> ReadPrec a #

MonadPlus ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

mzero :: ReadPrec a #

mplus :: ReadPrec a -> ReadPrec a -> ReadPrec a #

Invariant ReadPrec 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ReadPrec a -> ReadPrec b #

type ReadS a = String -> [(a, String)] #

A parser for a type a, represented as a function that takes a String and returns a list of possible parses as (a,String) pairs.

Note that this kind of backtracking parser is very inefficient; reading a large structure may be quite slow (cf ReadP).

data ReadP a #

Instances

Instances details
MonadFail ReadP

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> ReadP a #

Alternative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: ReadP a #

(<|>) :: ReadP a -> ReadP a -> ReadP a #

some :: ReadP a -> ReadP [a] #

many :: ReadP a -> ReadP [a] #

Applicative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> ReadP a #

(<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b #

liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c #

(*>) :: ReadP a -> ReadP b -> ReadP b #

(<*) :: ReadP a -> ReadP b -> ReadP a #

Functor ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> ReadP a -> ReadP b #

(<$) :: a -> ReadP b -> ReadP a #

Monad ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

(>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b #

(>>) :: ReadP a -> ReadP b -> ReadP b #

return :: a -> ReadP a #

MonadPlus ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: ReadP a #

mplus :: ReadP a -> ReadP a -> ReadP a #

Invariant ReadP 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ReadP a -> ReadP b #

readS_to_P :: ReadS a -> ReadP a #

Converts a Haskell ReadS-style function into a parser. Warning: This introduces local backtracking in the resulting parser, and therefore a possible inefficiency.

readP_to_S :: ReadP a -> ReadS a #

Converts a parser into a Haskell ReadS-style function. This is the main way in which you can "run" a ReadP parser: the expanded type is readP_to_S :: ReadP a -> String -> [(a,String)]

showFloat :: RealFloat a => a -> ShowS #

Show a signed RealFloat value to full precision using standard decimal notation for arguments whose absolute value lies between 0.1 and 9,999,999, and scientific notation otherwise.

fromRat :: RealFloat a => Rational -> a #

Converts a Rational value into any type in class RealFloat.

floatToDigits :: RealFloat a => Integer -> a -> ([Int], Int) #

floatToDigits takes a base and a non-negative RealFloat number, and returns a list of digits and an exponent. In particular, if x>=0, and

floatToDigits base x = ([d1,d2,...,dn], e)

then

  1. n >= 1
  2. x = 0.d1d2...dn * (base**e)
  3. 0 <= di <= base-1

byteSwap64 :: Word64 -> Word64 #

Reverse order of bytes in Word64.

Since: base-4.7.0.0

byteSwap32 :: Word32 -> Word32 #

Reverse order of bytes in Word32.

Since: base-4.7.0.0

byteSwap16 :: Word16 -> Word16 #

Reverse order of bytes in Word16.

Since: base-4.7.0.0

bitReverse8 :: Word8 -> Word8 #

Reverse the order of the bits in a Word8.

Since: base-4.14.0.0

bitReverse64 :: Word64 -> Word64 #

Reverse the order of the bits in a Word64.

Since: base-4.14.0.0

bitReverse32 :: Word32 -> Word32 #

Reverse the order of the bits in a Word32.

Since: base-4.14.0.0

bitReverse16 :: Word16 -> Word16 #

Reverse the order of the bits in a Word16.

Since: base-4.14.0.0

data GeneralCategory #

Unicode General Categories (column 2 of the UnicodeData table) in the order they are listed in the Unicode standard (the Unicode Character Database, in particular).

Examples

Expand

Basic usage:

>>> :t OtherLetter
OtherLetter :: GeneralCategory

Eq instance:

>>> UppercaseLetter == UppercaseLetter
True
>>> UppercaseLetter == LowercaseLetter
False

Ord instance:

>>> NonSpacingMark <= MathSymbol
True

Enum instance:

>>> enumFromTo ModifierLetter SpacingCombiningMark
[ModifierLetter,OtherLetter,NonSpacingMark,SpacingCombiningMark]

Read instance:

>>> read "DashPunctuation" :: GeneralCategory
DashPunctuation
>>> read "17" :: GeneralCategory
*** Exception: Prelude.read: no parse

Show instance:

>>> show EnclosingMark
"EnclosingMark"

Bounded instance:

>>> minBound :: GeneralCategory
UppercaseLetter
>>> maxBound :: GeneralCategory
NotAssigned

Ix instance:

>>> import Data.Ix ( index )
>>> index (OtherLetter,Control) FinalQuote
12
>>> index (OtherLetter,Control) Format
*** Exception: Error in array index

Constructors

UppercaseLetter

Lu: Letter, Uppercase

LowercaseLetter

Ll: Letter, Lowercase

TitlecaseLetter

Lt: Letter, Titlecase

ModifierLetter

Lm: Letter, Modifier

OtherLetter

Lo: Letter, Other

NonSpacingMark

Mn: Mark, Non-Spacing

SpacingCombiningMark

Mc: Mark, Spacing Combining

EnclosingMark

Me: Mark, Enclosing

DecimalNumber

Nd: Number, Decimal

LetterNumber

Nl: Number, Letter

OtherNumber

No: Number, Other

ConnectorPunctuation

Pc: Punctuation, Connector

DashPunctuation

Pd: Punctuation, Dash

OpenPunctuation

Ps: Punctuation, Open

ClosePunctuation

Pe: Punctuation, Close

InitialQuote

Pi: Punctuation, Initial quote

FinalQuote

Pf: Punctuation, Final quote

OtherPunctuation

Po: Punctuation, Other

MathSymbol

Sm: Symbol, Math

CurrencySymbol

Sc: Symbol, Currency

ModifierSymbol

Sk: Symbol, Modifier

OtherSymbol

So: Symbol, Other

Space

Zs: Separator, Space

LineSeparator

Zl: Separator, Line

ParagraphSeparator

Zp: Separator, Paragraph

Control

Cc: Other, Control

Format

Cf: Other, Format

Surrogate

Cs: Other, Surrogate

PrivateUse

Co: Other, Private Use

NotAssigned

Cn: Other, Not Assigned

Instances

Instances details
Bounded GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Enum GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Generic GeneralCategory 
Instance details

Defined in GHC.Generics

Associated Types

type Rep GeneralCategory :: Type -> Type #

Ix GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Read GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Read

Show GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Eq GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Ord GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

type Rep GeneralCategory

Since: base-4.15.0.0

Instance details

Defined in GHC.Generics

type Rep GeneralCategory = D1 ('MetaData "GeneralCategory" "GHC.Unicode" "base" 'False) ((((C1 ('MetaCons "UppercaseLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LowercaseLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TitlecaseLetter" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ModifierLetter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherLetter" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NonSpacingMark" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SpacingCombiningMark" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "EnclosingMark" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DecimalNumber" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LetterNumber" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherNumber" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ConnectorPunctuation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DashPunctuation" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OpenPunctuation" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ClosePunctuation" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "InitialQuote" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FinalQuote" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherPunctuation" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MathSymbol" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CurrencySymbol" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ModifierSymbol" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OtherSymbol" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Space" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LineSeparator" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ParagraphSeparator" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Control" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Format" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Surrogate" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PrivateUse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAssigned" 'PrefixI 'False) (U1 :: Type -> Type))))))

toUpper :: Char -> Char #

Convert a letter to the corresponding upper-case letter, if any. Any other character is returned unchanged.

toTitle :: Char -> Char #

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.

toLower :: Char -> Char #

Convert a letter to the corresponding lower-case letter, if any. Any other character is returned unchanged.

isUpper :: Char -> Bool #

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.

isSymbol :: Char -> Bool #

Selects Unicode symbol characters, including mathematical and currency symbols.

This function returns True if its argument has one of the following GeneralCategorys, 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 "Symbol".

Examples

Expand

Basic usage:

>>> isSymbol 'a'
False
>>> isSymbol '6'
False
>>> isSymbol '='
True

The definition of "math symbol" may be a little counter-intuitive depending on one's background:

>>> isSymbol '+'
True
>>> isSymbol '-'
False

isSpace :: Char -> Bool #

Returns True for any Unicode space character, and the control characters \t, \n, \r, \f, \v.

isPunctuation :: Char -> Bool #

Selects Unicode punctuation characters, including various kinds of connectors, brackets and quotes.

This function returns True if its argument has one of the following GeneralCategorys, 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 "Punctuation".

Examples

Expand

Basic usage:

>>> isPunctuation 'a'
False
>>> isPunctuation '7'
False
>>> isPunctuation '♥'
False
>>> isPunctuation '"'
True
>>> isPunctuation '?'
True
>>> isPunctuation '—'
True

isPrint :: Char -> Bool #

Selects printable Unicode characters (letters, numbers, marks, punctuation, symbols and spaces).

isOctDigit :: Char -> Bool #

Selects ASCII octal digits, i.e. '0'..'7'.

isLower :: Char -> Bool #

Selects lower-case alphabetic Unicode characters (letters).

isLatin1 :: Char -> Bool #

Selects the first 256 characters of the Unicode character set, corresponding to the ISO 8859-1 (Latin-1) character set.

isHexDigit :: Char -> Bool #

Selects ASCII hexadecimal digits, i.e. '0'..'9', 'a'..'f', 'A'..'F'.

isDigit :: Char -> Bool #

Selects ASCII digits, i.e. '0'..'9'.

isControl :: Char -> Bool #

Selects control characters, which are the non-printing characters of the Latin-1 subset of Unicode.

isAsciiUpper :: Char -> Bool #

Selects ASCII upper-case letters, i.e. characters satisfying both isAscii and isUpper.

isAsciiLower :: Char -> Bool #

Selects ASCII lower-case letters, i.e. characters satisfying both isAscii and isLower.

isAscii :: Char -> Bool #

Selects the first 128 characters of the Unicode character set, corresponding to the ASCII character set.

isAlphaNum :: Char -> Bool #

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.

isAlpha :: Char -> Bool #

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.

generalCategory :: Char -> GeneralCategory #

The Unicode general category of the character. This relies on the Enum instance of GeneralCategory, which must remain in the same order as the categories are presented in the Unicode standard.

Examples

Expand

Basic usage:

>>> generalCategory 'a'
LowercaseLetter
>>> generalCategory 'A'
UppercaseLetter
>>> generalCategory '0'
DecimalNumber
>>> generalCategory '%'
OtherPunctuation
>>> generalCategory '♥'
OtherSymbol
>>> generalCategory '\31'
Control
>>> generalCategory ' '
Space

class Bits b => FiniteBits b where #

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 #

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 #

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 #

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 CBool 
Instance details

Defined in Foreign.C.Types

FiniteBits CChar 
Instance details

Defined in Foreign.C.Types

FiniteBits CInt 
Instance details

Defined in Foreign.C.Types

FiniteBits CIntMax 
Instance details

Defined in Foreign.C.Types

FiniteBits CIntPtr 
Instance details

Defined in Foreign.C.Types

FiniteBits CLLong 
Instance details

Defined in Foreign.C.Types

FiniteBits CLong 
Instance details

Defined in Foreign.C.Types

FiniteBits CPtrdiff 
Instance details

Defined in Foreign.C.Types

FiniteBits CSChar 
Instance details

Defined in Foreign.C.Types

FiniteBits CShort 
Instance details

Defined in Foreign.C.Types

FiniteBits CSigAtomic 
Instance details

Defined in Foreign.C.Types

FiniteBits CSize 
Instance details

Defined in Foreign.C.Types

FiniteBits CUChar 
Instance details

Defined in Foreign.C.Types

FiniteBits CUInt 
Instance details

Defined in Foreign.C.Types

FiniteBits CUIntMax 
Instance details

Defined in Foreign.C.Types

FiniteBits CUIntPtr 
Instance details

Defined in Foreign.C.Types

FiniteBits CULLong 
Instance details

Defined in Foreign.C.Types

FiniteBits CULong 
Instance details

Defined in Foreign.C.Types

FiniteBits CUShort 
Instance details

Defined in Foreign.C.Types

FiniteBits CWchar 
Instance details

Defined in Foreign.C.Types

FiniteBits IntPtr 
Instance details

Defined in Foreign.Ptr

FiniteBits WordPtr 
Instance details

Defined in Foreign.Ptr

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 Int8

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

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 Word8

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

FiniteBits CBlkCnt 
Instance details

Defined in System.Posix.Types

FiniteBits CBlkSize 
Instance details

Defined in System.Posix.Types

FiniteBits CClockId 
Instance details

Defined in System.Posix.Types

FiniteBits CDev 
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 CGid 
Instance details

Defined in System.Posix.Types

FiniteBits CId 
Instance details

Defined in System.Posix.Types

FiniteBits CIno 
Instance details

Defined in System.Posix.Types

FiniteBits CKey 
Instance details

Defined in System.Posix.Types

FiniteBits CMode 
Instance details

Defined in System.Posix.Types

FiniteBits CNfds 
Instance details

Defined in System.Posix.Types

FiniteBits CNlink 
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 CRLim 
Instance details

Defined in System.Posix.Types

FiniteBits CSocklen 
Instance details

Defined in System.Posix.Types

FiniteBits CSsize 
Instance details

Defined in System.Posix.Types

FiniteBits CTcflag 
Instance details

Defined in System.Posix.Types

FiniteBits CUid 
Instance details

Defined in System.Posix.Types

FiniteBits Fd 
Instance details

Defined in System.Posix.Types

FiniteBits Bool

Since: base-4.7.0.0

Instance details

Defined in GHC.Bits

FiniteBits Int

Since: base-4.6.0.0

Instance details

Defined in GHC.Bits

FiniteBits Word

Since: base-4.6.0.0

Instance details

Defined in GHC.Bits

FiniteBits a => FiniteBits (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

FiniteBits a => FiniteBits (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

FiniteBits a => FiniteBits (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

FiniteBits a => FiniteBits (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

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

class Eq a => Bits a where #

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 #

Bitwise "and"

(.|.) :: a -> a -> a infixl 5 #

Bitwise "or"

xor :: a -> a -> a infixl 6 #

Bitwise "xor"

complement :: a -> a #

Reverse all the bits in the argument

shift :: a -> Int -> a infixl 8 #

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 #

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 #

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 #

bit i is a value with the ith 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 #

x `setBit` i is the same as x .|. bit i

clearBit :: a -> Int -> a #

x `clearBit` i is the same as x .&. complement (bit i)

complementBit :: a -> Int -> a #

x `complementBit` i is the same as x `xor` bit i

testBit :: a -> Int -> Bool #

x `testBit` i is the same as x .&. bit n /= 0

In other words it returns True if the bit at offset @n is set.

Can be implemented using testBitDefault if a is also an instance of Num.

bitSizeMaybe :: a -> Maybe Int #

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 #

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 #

Return True if the argument is a signed type. The actual value of the argument is ignored

shiftL :: a -> Int -> a infixl 8 #

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.

unsafeShiftL :: a -> Int -> a #

Shift the argument left by the specified number of bits. The result is undefined for negative shift amounts and shift amounts greater or equal to the bitSize.

Defaults to shiftL unless defined explicitly by an instance.

Since: base-4.5.0.0

shiftR :: a -> Int -> a infixl 8 #

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.

unsafeShiftR :: a -> Int -> a #

Shift the first argument right by the specified number of bits, which must be non-negative and smaller than the number of bits in the type.

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.

Defaults to shiftR unless defined explicitly by an instance.

Since: base-4.5.0.0

rotateL :: a -> Int -> a infixl 8 #

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 #

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 #

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 CBool 
Instance details

Defined in Foreign.C.Types

Bits CChar 
Instance details

Defined in Foreign.C.Types

Bits CInt 
Instance details

Defined in Foreign.C.Types

Bits CIntMax 
Instance details

Defined in Foreign.C.Types

Bits CIntPtr 
Instance details

Defined in Foreign.C.Types

Bits CLLong 
Instance details

Defined in Foreign.C.Types

Bits CLong 
Instance details

Defined in Foreign.C.Types

Bits CPtrdiff 
Instance details

Defined in Foreign.C.Types

Bits CSChar 
Instance details

Defined in Foreign.C.Types

Bits CShort 
Instance details

Defined in Foreign.C.Types

Bits CSigAtomic 
Instance details

Defined in Foreign.C.Types

Bits CSize 
Instance details

Defined in Foreign.C.Types

Bits CUChar 
Instance details

Defined in Foreign.C.Types

Bits CUInt 
Instance details

Defined in Foreign.C.Types

Bits CUIntMax 
Instance details

Defined in Foreign.C.Types

Bits CUIntPtr 
Instance details

Defined in Foreign.C.Types

Bits CULLong 
Instance details

Defined in Foreign.C.Types

Bits CULong 
Instance details

Defined in Foreign.C.Types

Bits CUShort 
Instance details

Defined in Foreign.C.Types

Bits CWchar 
Instance details

Defined in Foreign.C.Types

Bits IntPtr 
Instance details

Defined in Foreign.Ptr

Bits WordPtr 
Instance details

Defined in Foreign.Ptr

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 Int8

Since: base-2.1

Instance details

Defined in GHC.Int

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Bits CBlkCnt 
Instance details

Defined in System.Posix.Types

Bits CBlkSize 
Instance details

Defined in System.Posix.Types

Bits CClockId 
Instance details

Defined in System.Posix.Types

Bits CDev 
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 CGid 
Instance details

Defined in System.Posix.Types

Bits CId 
Instance details

Defined in System.Posix.Types

Methods

(.&.) :: CId -> CId -> CId #

(.|.) :: CId -> CId -> CId #

xor :: CId -> CId -> CId #

complement :: CId -> CId #

shift :: CId -> Int -> CId #

rotate :: CId -> Int -> CId #

zeroBits :: CId #

bit :: Int -> CId #

setBit :: CId -> Int -> CId #

clearBit :: CId -> Int -> CId #

complementBit :: CId -> Int -> CId #

testBit :: CId -> Int -> Bool #

bitSizeMaybe :: CId -> Maybe Int #

bitSize :: CId -> Int #

isSigned :: CId -> Bool #

shiftL :: CId -> Int -> CId #

unsafeShiftL :: CId -> Int -> CId #

shiftR :: CId -> Int -> CId #

unsafeShiftR :: CId -> Int -> CId #

rotateL :: CId -> Int -> CId #

rotateR :: CId -> Int -> CId #

popCount :: CId -> Int #

Bits CIno 
Instance details

Defined in System.Posix.Types

Bits CKey 
Instance details

Defined in System.Posix.Types

Bits CMode 
Instance details

Defined in System.Posix.Types

Bits CNfds 
Instance details

Defined in System.Posix.Types

Bits CNlink 
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 CRLim 
Instance details

Defined in System.Posix.Types

Bits CSocklen 
Instance details

Defined in System.Posix.Types

Bits CSsize 
Instance details

Defined in System.Posix.Types

Bits CTcflag 
Instance details

Defined in System.Posix.Types

Bits CUid 
Instance details

Defined in System.Posix.Types

Bits Fd 
Instance details

Defined in System.Posix.Types

Methods

(.&.) :: Fd -> Fd -> Fd #

(.|.) :: Fd -> Fd -> Fd #

xor :: Fd -> Fd -> Fd #

complement :: Fd -> Fd #

shift :: Fd -> Int -> Fd #

rotate :: Fd -> Int -> Fd #

zeroBits :: Fd #

bit :: Int -> Fd #

setBit :: Fd -> Int -> Fd #

clearBit :: Fd -> Int -> Fd #

complementBit :: Fd -> Int -> Fd #

testBit :: Fd -> Int -> Bool #

bitSizeMaybe :: Fd -> Maybe Int #

bitSize :: Fd -> Int #

isSigned :: Fd -> Bool #

shiftL :: Fd -> Int -> Fd #

unsafeShiftL :: Fd -> Int -> Fd #

shiftR :: Fd -> Int -> Fd #

unsafeShiftR :: Fd -> Int -> Fd #

rotateL :: Fd -> Int -> Fd #

rotateR :: Fd -> Int -> Fd #

popCount :: Fd -> Int #

Bits Integer

Since: base-2.1

Instance details

Defined in GHC.Bits

Bits Natural

Since: base-4.8.0

Instance details

Defined in GHC.Bits

Bits Bool

Interpret Bool as 1-bit bit-field

Since: base-4.7.0.0

Instance details

Defined in GHC.Bits

Bits Int

Since: base-2.1

Instance details

Defined in GHC.Bits

Methods

(.&.) :: Int -> Int -> Int #

(.|.) :: Int -> Int -> Int #

xor :: Int -> Int -> Int #

complement :: Int -> Int #

shift :: Int -> Int -> Int #

rotate :: Int -> Int -> Int #

zeroBits :: Int #

bit :: Int -> Int #

setBit :: Int -> Int -> Int #

clearBit :: Int -> Int -> Int #

complementBit :: Int -> Int -> Int #

testBit :: Int -> Int -> Bool #

bitSizeMaybe :: Int -> Maybe Int #

bitSize :: Int -> Int #

isSigned :: Int -> Bool #

shiftL :: Int -> Int -> Int #

unsafeShiftL :: Int -> Int -> Int #

shiftR :: Int -> Int -> Int #

unsafeShiftR :: Int -> Int -> Int #

rotateL :: Int -> Int -> Int #

rotateR :: Int -> Int -> Int #

popCount :: Int -> Int #

Bits Word

Since: base-2.1

Instance details

Defined in GHC.Bits

Bits a => Bits (And a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(.&.) :: And a -> And a -> And a #

(.|.) :: And a -> And a -> And a #

xor :: And a -> And a -> And a #

complement :: And a -> And a #

shift :: And a -> Int -> And a #

rotate :: And a -> Int -> And a #

zeroBits :: And a #

bit :: Int -> And a #

setBit :: And a -> Int -> And a #

clearBit :: And a -> Int -> And a #

complementBit :: And a -> Int -> And a #

testBit :: And a -> Int -> Bool #

bitSizeMaybe :: And a -> Maybe Int #

bitSize :: And a -> Int #

isSigned :: And a -> Bool #

shiftL :: And a -> Int -> And a #

unsafeShiftL :: And a -> Int -> And a #

shiftR :: And a -> Int -> And a #

unsafeShiftR :: And a -> Int -> And a #

rotateL :: And a -> Int -> And a #

rotateR :: And a -> Int -> And a #

popCount :: And a -> Int #

Bits a => Bits (Iff a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(.&.) :: Iff a -> Iff a -> Iff a #

(.|.) :: Iff a -> Iff a -> Iff a #

xor :: Iff a -> Iff a -> Iff a #

complement :: Iff a -> Iff a #

shift :: Iff a -> Int -> Iff a #

rotate :: Iff a -> Int -> Iff a #

zeroBits :: Iff a #

bit :: Int -> Iff a #

setBit :: Iff a -> Int -> Iff a #

clearBit :: Iff a -> Int -> Iff a #

complementBit :: Iff a -> Int -> Iff a #

testBit :: Iff a -> Int -> Bool #

bitSizeMaybe :: Iff a -> Maybe Int #

bitSize :: Iff a -> Int #

isSigned :: Iff a -> Bool #

shiftL :: Iff a -> Int -> Iff a #

unsafeShiftL :: Iff a -> Int -> Iff a #

shiftR :: Iff a -> Int -> Iff a #

unsafeShiftR :: Iff a -> Int -> Iff a #

rotateL :: Iff a -> Int -> Iff a #

rotateR :: Iff a -> Int -> Iff a #

popCount :: Iff a -> Int #

Bits a => Bits (Ior a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(.&.) :: Ior a -> Ior a -> Ior a #

(.|.) :: Ior a -> Ior a -> Ior a #

xor :: Ior a -> Ior a -> Ior a #

complement :: Ior a -> Ior a #

shift :: Ior a -> Int -> Ior a #

rotate :: Ior a -> Int -> Ior a #

zeroBits :: Ior a #

bit :: Int -> Ior a #

setBit :: Ior a -> Int -> Ior a #

clearBit :: Ior a -> Int -> Ior a #

complementBit :: Ior a -> Int -> Ior a #

testBit :: Ior a -> Int -> Bool #

bitSizeMaybe :: Ior a -> Maybe Int #

bitSize :: Ior a -> Int #

isSigned :: Ior a -> Bool #

shiftL :: Ior a -> Int -> Ior a #

unsafeShiftL :: Ior a -> Int -> Ior a #

shiftR :: Ior a -> Int -> Ior a #

unsafeShiftR :: Ior a -> Int -> Ior a #

rotateL :: Ior a -> Int -> Ior a #

rotateR :: Ior a -> Int -> Ior a #

popCount :: Ior a -> Int #

Bits a => Bits (Xor a)

Since: base-4.16

Instance details

Defined in Data.Bits

Methods

(.&.) :: Xor a -> Xor a -> Xor a #

(.|.) :: Xor a -> Xor a -> Xor a #

xor :: Xor a -> Xor a -> Xor a #

complement :: Xor a -> Xor a #

shift :: Xor a -> Int -> Xor a #

rotate :: Xor a -> Int -> Xor a #

zeroBits :: Xor a #

bit :: Int -> Xor a #

setBit :: Xor a -> Int -> Xor a #

clearBit :: Xor a -> Int -> Xor a #

complementBit :: Xor a -> Int -> Xor a #

testBit :: Xor a -> Int -> Bool #

bitSizeMaybe :: Xor a -> Maybe Int #

bitSize :: Xor a -> Int #

isSigned :: Xor a -> Bool #

shiftL :: Xor a -> Int -> Xor a #

unsafeShiftL :: Xor a -> Int -> Xor a #

shiftR :: Xor a -> Int -> Xor a #

unsafeShiftR :: Xor a -> Int -> Xor a #

rotateL :: Xor a -> Int -> Xor a #

rotateR :: Xor a -> Int -> Xor a #

popCount :: Xor a -> Int #

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

Methods

(.&.) :: Down a -> Down a -> Down a #

(.|.) :: Down a -> Down a -> Down a #

xor :: Down a -> Down a -> Down a #

complement :: Down a -> Down a #

shift :: Down a -> Int -> Down a #

rotate :: Down a -> Int -> Down a #

zeroBits :: Down a #

bit :: Int -> Down a #

setBit :: Down a -> Int -> Down a #

clearBit :: Down a -> Int -> Down a #

complementBit :: Down a -> Int -> Down a #

testBit :: Down a -> Int -> Bool #

bitSizeMaybe :: Down a -> Maybe Int #

bitSize :: Down a -> Int #

isSigned :: Down a -> Bool #

shiftL :: Down a -> Int -> Down a #

unsafeShiftL :: Down a -> Int -> Down a #

shiftR :: Down a -> Int -> Down a #

unsafeShiftR :: Down a -> Int -> Down a #

rotateL :: Down a -> Int -> Down a #

rotateR :: Down a -> Int -> Down a #

popCount :: Down a -> Int #

Bits a => Bits (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(.&.) :: Const a b -> Const a b -> Const a b #

(.|.) :: Const a b -> Const a b -> Const a b #

xor :: Const a b -> Const a b -> Const a b #

complement :: Const a b -> Const a b #

shift :: Const a b -> Int -> Const a b #

rotate :: Const a b -> Int -> Const a b #

zeroBits :: Const a b #

bit :: Int -> Const a b #

setBit :: Const a b -> Int -> Const a b #

clearBit :: Const a b -> Int -> Const a b #

complementBit :: Const a b -> Int -> Const a b #

testBit :: Const a b -> Int -> Bool #

bitSizeMaybe :: Const a b -> Maybe Int #

bitSize :: Const a b -> Int #

isSigned :: Const a b -> Bool #

shiftL :: Const a b -> Int -> Const a b #

unsafeShiftL :: Const a b -> Int -> Const a b #

shiftR :: Const a b -> Int -> Const a b #

unsafeShiftR :: Const a b -> Int -> Const a b #

rotateL :: Const a b -> Int -> Const a b #

rotateR :: Const a b -> Int -> Const a b #

popCount :: Const a b -> Int #

Bits a => Bits (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(.&.) :: Tagged s a -> Tagged s a -> Tagged s a #

(.|.) :: Tagged s a -> Tagged s a -> Tagged s a #

xor :: Tagged s a -> Tagged s a -> Tagged s a #

complement :: Tagged s a -> Tagged s a #

shift :: Tagged s a -> Int -> Tagged s a #

rotate :: Tagged s a -> Int -> Tagged s a #

zeroBits :: Tagged s a #

bit :: Int -> Tagged s a #

setBit :: Tagged s a -> Int -> Tagged s a #

clearBit :: Tagged s a -> Int -> Tagged s a #

complementBit :: Tagged s a -> Int -> Tagged s a #

testBit :: Tagged s a -> Int -> Bool #

bitSizeMaybe :: Tagged s a -> Maybe Int #

bitSize :: Tagged s a -> Int #

isSigned :: Tagged s a -> Bool #

shiftL :: Tagged s a -> Int -> Tagged s a #

unsafeShiftL :: Tagged s a -> Int -> Tagged s a #

shiftR :: Tagged s a -> Int -> Tagged s a #

unsafeShiftR :: Tagged s a -> Int -> Tagged s a #

rotateL :: Tagged s a -> Int -> Tagged s a #

rotateR :: Tagged s a -> Int -> Tagged s a #

popCount :: Tagged s a -> Int #

toIntegralSized :: (Integral a, Integral b, Bits a, Bits b) => a -> Maybe b #

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

testBitDefault :: (Bits a, Num a) => a -> Int -> Bool #

Default implementation for testBit.

Note that: testBitDefault x i = (x .&. bit i) /= 0

Since: base-4.6.0.0

popCountDefault :: (Bits a, Num a) => a -> Int #

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

bitDefault :: (Bits a, Num a) => Int -> a #

Default implementation for bit.

Note that: bitDefault i = 1 shiftL i

Since: base-4.6.0.0

showSigned #

Arguments

:: Real a 
=> (a -> ShowS)

a function that can show unsigned values

-> Int

the precedence of the enclosing context

-> a

the value to show

-> ShowS 

Converts a possibly-negative Real value to a string.

odd :: Integral a => a -> Bool #

numerator :: Ratio a -> a #

Extract the numerator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.

lcm :: Integral a => a -> a -> a #

lcm x y is the smallest positive integer that both x and y divide.

gcd :: Integral a => a -> a -> a #

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.

even :: Integral a => a -> Bool #

denominator :: Ratio a -> a #

Extract the denominator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.

(^^) :: (Fractional a, Integral b) => a -> b -> a infixr 8 #

raise a number to an integral power

(^) :: (Num a, Integral b) => a -> b -> a infixr 8 #

raise a number to a non-negative integral power

(%) :: Integral a => a -> a -> Ratio a infixl 7 #

Forms the ratio of two integral numbers.

chr :: Int -> Char #

The toEnum method restricted to the type Char.

data STRef s a #

a value of type STRef s a is a mutable variable in state thread s, containing a value of type a

>>> :{
runST (do
    ref <- newSTRef "hello"
    x <- readSTRef ref
    writeSTRef ref (x ++ "world")
    readSTRef ref )
:}
"helloworld"

Instances

Instances details
NFData2 STRef

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> STRef a b -> () #

NFData1 (STRef s)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> STRef s a -> () #

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 -> () #

Eq (STRef s a)

Pointer equality.

Since: base-2.1

Instance details

Defined in GHC.STRef

Methods

(==) :: STRef s a -> STRef s a -> Bool #

(/=) :: STRef s a -> STRef s a -> Bool #

writeSTRef :: STRef s a -> a -> ST s () #

Write a new value into an STRef

readSTRef :: STRef s a -> ST s a #

Read the value of an STRef

newSTRef :: a -> ST s (STRef s a) #

Build a new STRef in the current state thread

runST :: (forall s. ST s a) -> a #

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.

type ShowS = String -> String #

The shows functions return a function that prepends the output String to an existing String. This allows constant-time concatenation of results using function composition.

shows :: Show a => a -> ShowS #

equivalent to showsPrec with a precedence of 0.

showString :: String -> ShowS #

utility function converting a String to a show function that simply prepends the string unchanged.

showParen :: Bool -> ShowS -> ShowS #

utility function that surrounds the inner show function with parentheses when the Bool parameter is True.

showLitChar :: Char -> ShowS #

Convert a character to a string using only printable characters, using Haskell source-language escape conventions. For example:

showLitChar '\n' s  =  "\\n" ++ s

showChar :: Char -> ShowS #

utility function converting a Char to a show function that simply prepends the character unchanged.

intToDigit :: Int -> Char #

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.

zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #

The zipWith3 function takes a function which combines three elements, as well as three lists and returns a list of the function applied to corresponding elements, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zipWith3 (,,) xs ys zs == zip3 xs ys zs
zipWith3 f [x1,x2,x3..] [y1,y2,y3..] [z1,z2,z3..] == [f x1 y1 z1, f x2 y2 z2, f x3 y3 z3..]

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] #

\(\mathcal{O}(\min(m,n))\). zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function.

zipWith (,) xs ys == zip xs ys
zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]

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:

>>> let f = undefined
>>> zipWith f [] undefined
[]

zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] #

zip3 takes three lists and returns a list of triples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

unzip3 :: [(a, b, c)] -> ([a], [b], [c]) #

The unzip3 function takes a list of triples and returns three lists, analogous to unzip.

>>> unzip3 []
([],[],[])
>>> unzip3 [(1, 'a', True), (2, 'b', False)]
([1,2],"ab",[True,False])

unzip :: [(a, b)] -> ([a], [b]) #

unzip transforms a list of pairs into a list of first components and a list of second components.

>>> unzip []
([],[])
>>> unzip [(1, 'a'), (2, 'b')]
([1,2],"ab")

uncons :: [a] -> Maybe (a, [a]) #

\(\mathcal{O}(1)\). Decompose a list into its head and tail.

  • If the list is empty, returns Nothing.
  • If the list is non-empty, returns Just (x, xs), where x is the head of the list and xs its tail.
>>> uncons []
Nothing
>>> uncons [1]
Just (1,[])
>>> uncons [1, 2, 3]
Just (1,[2,3])

Since: base-4.8.0.0

takeWhile :: (a -> Bool) -> [a] -> [a] #

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]
[]

take :: Int -> [a] -> [a] #

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.

tail :: [a] -> [a] #

\(\mathcal{O}(1)\). Extract the elements after the head of a list, which must be non-empty.

>>> tail [1, 2, 3]
[2,3]
>>> tail [1]
[]
>>> tail []
*** Exception: Prelude.tail: empty list

splitAt :: Int -> [a] -> ([a], [a]) #

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.

span :: (a -> Bool) -> [a] -> ([a], [a]) #

span, 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 satisfy p and second element is the remainder of the list:

>>> span (< 3) [1,2,3,4,1,2,3,4]
([1,2],[3,4,1,2,3,4])
>>> span (< 9) [1,2,3]
([1,2,3],[])
>>> span (< 0) [1,2,3]
([],[1,2,3])

span p xs is equivalent to (takeWhile p xs, dropWhile p xs)

scanr1 :: (a -> a -> a) -> [a] -> [a] #

\(\mathcal{O}(n)\). scanr1 is a variant of scanr that has no starting value argument.

>>> scanr1 (+) [1..4]
[10,9,7,4]
>>> scanr1 (+) []
[]
>>> scanr1 (-) [1..4]
[-2,3,-1,4]
>>> scanr1 (&&) [True, False, True, True]
[False,False,True,True]
>>> scanr1 (||) [True, True, False, False]
[True,True,False,False]
>>> force $ scanr1 (+) [1..]
*** Exception: stack overflow

scanr :: (a -> b -> b) -> b -> [a] -> [b] #

\(\mathcal{O}(n)\). scanr is the right-to-left dual of scanl. Note that the order of parameters on the accumulating function are reversed compared to scanl. Also note that

head (scanr f z xs) == foldr f z xs.
>>> scanr (+) 0 [1..4]
[10,9,7,4,0]
>>> scanr (+) 42 []
[42]
>>> scanr (-) 100 [1..4]
[98,-97,99,-96,100]
>>> scanr (\nextChar reversedString -> nextChar : reversedString) "foo" ['a', 'b', 'c', 'd']
["abcdfoo","bcdfoo","cdfoo","dfoo","foo"]
>>> force $ scanr (+) 0 [1..]
*** Exception: stack overflow

scanl1 :: (a -> a -> a) -> [a] -> [a] #

\(\mathcal{O}(n)\). scanl1 is a variant of scanl that has no starting value argument:

scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]
>>> scanl1 (+) [1..4]
[1,3,6,10]
>>> scanl1 (+) []
[]
>>> scanl1 (-) [1..4]
[1,-1,-4,-8]
>>> scanl1 (&&) [True, False, True, True]
[True,False,False,False]
>>> scanl1 (||) [False, False, True, True]
[False,False,True,True]
>>> scanl1 (+) [1..]
* Hangs forever *

scanl' :: (b -> a -> b) -> b -> [a] -> [b] #

\(\mathcal{O}(n)\). A strict version of scanl.

scanl :: (b -> a -> b) -> b -> [a] -> [b] #

\(\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
>>> scanl (+) 0 [1..4]
[0,1,3,6,10]
>>> scanl (+) 42 []
[42]
>>> scanl (-) 100 [1..4]
[100,99,97,94,90]
>>> scanl (\reversedString nextChar -> nextChar : reversedString) "foo" ['a', 'b', 'c', 'd']
["foo","afoo","bafoo","cbafoo","dcbafoo"]
>>> scanl (+) 0 [1..]
* Hangs forever *

reverse :: [a] -> [a] #

reverse xs returns the elements of xs in reverse order. xs must be finite.

>>> reverse []
[]
>>> reverse [42]
[42]
>>> reverse [2,5,7]
[7,5,2]
>>> reverse [1..]
* Hangs forever *

replicate :: Int -> a -> [a] #

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.

>>> replicate 0 True
[]
>>> replicate (-1) True
[]
>>> replicate 4 True
[True,True,True,True]

repeat :: a -> [a] #

repeat x is an infinite list, with x the value of every element.

>>> take 20 $ repeat 17
[17,17,17,17,17,17,17,17,17...

lookup :: Eq a => a -> [(a, b)] -> Maybe b #

\(\mathcal{O}(n)\). lookup key assocs looks up a key in an association list.

>>> lookup 2 []
Nothing
>>> lookup 2 [(1, "first")]
Nothing
>>> lookup 2 [(1, "first"), (2, "second"), (3, "third")]
Just "second"

last :: [a] -> a #

\(\mathcal{O}(n)\). Extract the last element of a list, which must be finite and non-empty.

>>> last [1, 2, 3]
3
>>> last [1..]
* Hangs forever *
>>> last []
*** Exception: Prelude.last: empty list

iterate' :: (a -> a) -> a -> [a] #

iterate' is the strict version of iterate.

It forces the result of each application of the function to weak head normal form (WHNF) before proceeding.

iterate :: (a -> a) -> a -> [a] #

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.

>>> take 10 $ iterate not True
[True,False,True,False...
>>> take 10 $ iterate (+3) 42
[42,45,48,51,54,57,60,63...

init :: [a] -> [a] #

\(\mathcal{O}(n)\). Return all the elements of a list except the last one. The list must be non-empty.

>>> init [1, 2, 3]
[1,2]
>>> init [1]
[]
>>> init []
*** Exception: Prelude.init: empty list

head :: [a] -> a #

\(\mathcal{O}(1)\). Extract the first element of a list, which must be non-empty.

>>> head [1, 2, 3]
1
>>> head [1..]
1
>>> head []
*** Exception: Prelude.head: empty list

foldl1' :: (a -> a -> a) -> [a] -> a #

A strict version of foldl1.

dropWhile :: (a -> Bool) -> [a] -> [a] #

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]

drop :: Int -> [a] -> [a] #

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.

cycle :: [a] -> [a] #

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.

>>> cycle []
*** Exception: Prelude.cycle: empty list
>>> take 20 $ cycle [42]
[42,42,42,42,42,42,42,42,42,42...
>>> take 20 $ cycle [2, 5, 7]
[2,5,7,2,5,7,2,5,7,2,5,7...

break :: (a -> Bool) -> [a] -> ([a], [a]) #

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).

(!!) :: [a] -> Int -> a infixl 9 #

List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type.

>>> ['a', 'b', 'c'] !! 0
'a'
>>> ['a', 'b', 'c'] !! 2
'c'
>>> ['a', 'b', 'c'] !! 3
*** Exception: Prelude.!!: index too large
>>> ['a', 'b', 'c'] !! (-1)
*** Exception: Prelude.!!: negative index

maybeToList :: Maybe a -> [a] #

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

maybe :: b -> (a -> b) -> Maybe a -> b #

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
""

mapMaybe :: (a -> Maybe b) -> [a] -> [b] #

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]

listToMaybe :: [a] -> Maybe a #

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]

isNothing :: Maybe a -> Bool #

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 #

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

fromMaybe :: a -> Maybe a -> a #

The fromMaybe function takes a default value and a Maybe value. If the Maybe is Nothing, it returns the default value; 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

fromJust :: HasCallStack => Maybe a -> a #

The fromJust function extracts the element out of a Just and throws an error if its argument is Nothing.

Examples

Expand

Basic usage:

>>> fromJust (Just 1)
1
>>> 2 * (fromJust (Just 10))
20
>>> 2 * (fromJust Nothing)
*** Exception: Maybe.fromJust: Nothing
...

catMaybes :: [Maybe a] -> [a] #

The catMaybes function takes a list of Maybes 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]

bool :: a -> a -> Bool -> a #

Case analysis for the Bool type. bool x y p evaluates to x when p is False, and evaluates to y when p is True.

This is equivalent to if p then y else x; that is, one can think of it as an if-then-else construct with its arguments reordered.

Examples

Expand

Basic usage:

>>> bool "foo" "bar" True
"bar"
>>> bool "foo" "bar" False
"foo"

Confirm that bool x y p and if p then y else x are equivalent:

>>> let p = True; x = "bar"; y = "foo"
>>> bool x y p == if p then y else x
True
>>> let p = False
>>> bool x y p == if p then y else x
True

Since: base-4.7.0.0

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c infixl 0 #

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 #

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.

(&) :: a -> (a -> b) -> b infixl 1 #

& 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

void :: Functor f => f a -> f () #

void value discards or ignores the result of evaluation, such as the return value of an IO action.

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 -> (a -> b) -> f b infixl 1 #

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

(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #

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)

($>) :: Functor f => f a -> b -> f b infixl 4 #

Flipped version of <$.

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

uncurry :: (a -> b -> c) -> (a, b) -> c #

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]

swap :: (a, b) -> (b, a) #

Swap the components of a pair.

curry :: ((a, b) -> c) -> a -> b -> c #

curry converts an uncurried function to a curried function.

Examples

Expand
>>> curry fst 1 2
1

data Version #

A Version represents the version of a software entity.

An instance of Eq is provided, which implements exact equality modulo reordering of the tags in the versionTags field.

An instance of Ord is also provided, which gives lexicographic ordering on the versionBranch fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). This is expected to be sufficient for many uses, but note that you may need to use a more specific ordering for your versioning scheme. For example, some versioning schemes may include pre-releases which have tags "pre1", "pre2", and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for date tags in the versionTags field and compare those. The bottom line is, don't always assume that compare and other Ord operations are the right thing for every Version.

Similarly, concrete representations of versions may differ. One possible concrete representation is provided (see showVersion and parseVersion), but depending on the application a different concrete representation may be more appropriate.

Constructors

Version 

Fields

  • versionBranch :: [Int]

    The numeric branch for this version. This reflects the fact that most software versions are tree-structured; there is a main trunk which is tagged with versions at various points (1,2,3...), and the first branch off the trunk after version 3 is 3.1, the second branch off the trunk after version 3 is 3.2, and so on. The tree can be branched arbitrarily, just by adding more digits.

    We represent the branch as a list of Int, so version 3.2.1 becomes [3,2,1]. Lexicographic ordering (i.e. the default instance of Ord for [Int]) gives the natural ordering of branches.

  • versionTags :: [String]

    A version can be tagged with an arbitrary list of strings. The interpretation of the list of tags is entirely dependent on the entity that this version applies to.

Instances

Instances details
Data Version

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Version -> c Version #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Version #

toConstr :: Version -> Constr #

dataTypeOf :: Version -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Version) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Version) #

gmapT :: (forall b. Data b => b -> b) -> Version -> Version #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Version -> r #

gmapQ :: (forall d. Data d => d -> u) -> Version -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Version -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Version -> m Version #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Version -> m Version #

IsList Version

Since: base-4.8.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item Version #

Generic Version 
Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Read Version

Since: base-2.1

Instance details

Defined in Data.Version

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

NFData Version

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Version -> () #

Eq Version

Since: base-2.1

Instance details

Defined in Data.Version

Methods

(==) :: Version -> Version -> Bool #

(/=) :: Version -> Version -> Bool #

Ord Version

Since: base-2.1

Instance details

Defined in Data.Version

Hashable Version 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Version -> Int #

hash :: Version -> Int #

type Item Version 
Instance details

Defined in GHC.Exts

type Rep Version

Since: base-4.9.0.0

Instance details

Defined in Data.Version

type Rep Version = D1 ('MetaData "Version" "Data.Version" "base" 'False) (C1 ('MetaCons "Version" 'PrefixI 'True) (S1 ('MetaSel ('Just "versionBranch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]) :*: S1 ('MetaSel ('Just "versionTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])))

makeVersion :: [Int] -> Version #

Construct tag-less Version

Since: base-4.8.0.0

unsafePerformIO :: IO a -> a #

This is the "back door" into the IO monad, allowing IO computation to be performed at any time. For this to be safe, the IO computation should be free of side effects and independent of its environment.

If the I/O computation wrapped in unsafePerformIO performs side effects, then the relative order in which those side effects take place (relative to the main I/O trunk, or other calls to unsafePerformIO) is indeterminate. Furthermore, when using unsafePerformIO to cause side-effects, you should take the following precautions to ensure the side effects are performed as many times as you expect them to be. Note that these precautions are necessary for GHC, but may not be sufficient, and other compilers may require different precautions:

  • Use {-# NOINLINE foo #-} as a pragma on any function foo that calls unsafePerformIO. If the call is inlined, the I/O may be performed more than once.
  • Use the compiler flag -fno-cse to prevent common sub-expression elimination being performed on the module, which might combine two side effects that were meant to be separate. A good example is using multiple global variables (like test in the example below).
  • Make sure that the either you switch off let-floating (-fno-full-laziness), or that the call to unsafePerformIO cannot float outside a lambda. For example, if you say: f x = unsafePerformIO (newIORef []) you may get only one reference cell shared between all calls to f. Better would be f x = unsafePerformIO (newIORef [x]) because now it can't float outside the lambda.

It is less well known that unsafePerformIO is not type safe. For example:

    test :: IORef [a]
    test = unsafePerformIO $ newIORef []

    main = do
            writeIORef test [42]
            bang <- readIORef test
            print (bang :: [Char])

This program will core dump. This problem with polymorphic references is well known in the ML community, and does not arise with normal monadic use of references. There is no easy way to make it impossible once you use unsafePerformIO. Indeed, it is possible to write coerce :: a -> b with the help of unsafePerformIO. So be careful!

unsafeInterleaveIO :: IO a -> IO a #

unsafeInterleaveIO allows an IO computation to be deferred lazily. When passed a value of type IO a, the IO will only be performed when the value of the a is demanded. This is used to implement lazy file reading, see hGetContents.

unsafeDupablePerformIO :: IO a -> a #

This version of unsafePerformIO is more efficient because it omits the check that the IO is only being performed by a single thread. Hence, when you use unsafeDupablePerformIO, there is a possibility that the IO action may be performed multiple times (on a multiprocessor), and you should therefore ensure that it gives the same results each time. It may even happen that one of the duplicated IO actions is only run partially, and then interrupted in the middle without an exception being raised. Therefore, functions like bracket cannot be used safely within unsafeDupablePerformIO.

Since: base-4.4.0.0

data MVar a #

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 -> () #

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 -> () #

Eq (MVar a)

Since: base-4.1.0.0

Instance details

Defined in GHC.MVar

Methods

(==) :: MVar a -> MVar a -> Bool #

(/=) :: MVar a -> MVar a -> Bool #

tryTakeMVar :: MVar a -> IO (Maybe a) #

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.

tryReadMVar :: MVar a -> IO (Maybe a) #

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 #

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.

takeMVar :: MVar a -> IO a #

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 MVars.

readMVar :: MVar a -> IO a #

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

putMVar :: MVar a -> a -> IO () #

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 MVars.

newMVar :: a -> IO (MVar a) #

Create an MVar which contains the supplied value.

newEmptyMVar :: IO (MVar a) #

Create an MVar which is initially empty.

isEmptyMVar :: MVar a -> IO Bool #

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.

subtract :: Num a => a -> a -> a #

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.

class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where #

Monads that also support choice and failure.

Minimal complete definition

Nothing

Methods

mzero :: m a #

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 #

An associative operation. The default definition is

mplus = (<|>)

Instances

Instances details
MonadPlus STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

mzero :: STM a #

mplus :: STM a -> STM a -> STM a #

MonadPlus P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: P a #

mplus :: P a -> P a -> P a #

MonadPlus ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: ReadP a #

mplus :: ReadP a -> ReadP a -> ReadP a #

MonadPlus ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

mzero :: ReadPrec a #

mplus :: ReadPrec a -> ReadPrec a -> ReadPrec a #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a #

mplus :: Seq a -> Seq a -> Seq a #

MonadPlus DList 
Instance details

Defined in Data.DList.Internal

Methods

mzero :: DList a #

mplus :: DList a -> DList a -> DList a #

MonadPlus IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a #

mplus :: IO a -> IO a -> IO a #

MonadPlus Array 
Instance details

Defined in Data.Primitive.Array

Methods

mzero :: Array a #

mplus :: Array a -> Array a -> Array a #

MonadPlus SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

MonadPlus Vector 
Instance details

Defined in Data.Vector

Methods

mzero :: Vector a #

mplus :: Vector a -> Vector a -> Vector a #

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

MonadPlus []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: [a] #

mplus :: [a] -> [a] -> [a] #

(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: ArrowMonad a a0 #

mplus :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

MonadPlus (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

mzero :: Proxy a #

mplus :: Proxy a -> Proxy a -> Proxy a #

MonadPlus (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: U1 a #

mplus :: U1 a -> U1 a -> U1 a #

MonadPlus v => MonadPlus (Free v)

This violates the MonadPlus laws, handle with care.

Instance details

Defined in Control.Monad.Free

Methods

mzero :: Free v a #

mplus :: Free v a -> Free v a -> Free v a #

Monad m => MonadPlus (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzero :: MaybeT m a #

mplus :: MaybeT m a -> MaybeT m a -> MaybeT m a #

MonadPlus m => MonadPlus (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: Kleisli m a a0 #

mplus :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

MonadPlus f => MonadPlus (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mzero :: Ap f a #

mplus :: Ap f a -> Ap f a -> Ap f a #

MonadPlus f => MonadPlus (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mzero :: Alt f a #

mplus :: Alt f a -> Alt f a -> Alt f a #

MonadPlus f => MonadPlus (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: Rec1 f a #

mplus :: Rec1 f a -> Rec1 f a -> Rec1 f a #

(Functor f, MonadPlus m) => MonadPlus (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

mzero :: FreeT f m a #

mplus :: FreeT f m a -> FreeT f m a -> FreeT f m a #

MonadPlus m => MonadPlus (WrappedFunctor m) 
Instance details

Defined in Data.Functor.Invariant

(Monad m, Error e) => MonadPlus (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

mzero :: ErrorT e m a #

mplus :: ErrorT e m a -> ErrorT e m a -> ErrorT e m a #

(Monad m, Monoid e) => MonadPlus (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mzero :: ExceptT e m a #

mplus :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

MonadPlus m => MonadPlus (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mzero :: IdentityT m a #

mplus :: IdentityT m a -> IdentityT m a -> IdentityT m a #

MonadPlus m => MonadPlus (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzero :: ReaderT r m a #

mplus :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

MonadPlus m => MonadPlus (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

mzero :: StateT s m a #

mplus :: StateT s m a -> StateT s m a -> StateT s m a #

MonadPlus m => MonadPlus (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

mzero :: StateT s m a #

mplus :: StateT s m a -> StateT s m a -> StateT s m a #

(Monoid w, MonadPlus m) => MonadPlus (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

(Monoid w, MonadPlus m) => MonadPlus (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

MonadPlus m => MonadPlus (Reverse m)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

mzero :: Reverse m a #

mplus :: Reverse m a -> Reverse m a -> Reverse m a #

(MonadPlus f, MonadPlus g) => MonadPlus (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

mzero :: Product f g a #

mplus :: Product f g a -> Product f g a -> Product f g a #

(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: (f :*: g) a #

mplus :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

MonadPlus f => MonadPlus (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

mzero :: Star f a a0 #

mplus :: Star f a a0 -> Star f a a0 -> Star f a a0 #

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 #

mplus :: M1 i c f a -> M1 i c f a -> M1 i c f a #

(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 #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

(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 #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

class Applicative f => Alternative (f :: Type -> Type) where #

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 #

The identity of <|>

(<|>) :: f a -> f a -> f a infixl 3 #

An associative binary operation

some :: f a -> f [a] #

One or more.

many :: f a -> f [a] #

Zero or more.

Instances

Instances details
Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Methods

empty :: ZipList a #

(<|>) :: ZipList a -> ZipList a -> ZipList a #

some :: ZipList a -> ZipList [a] #

many :: ZipList a -> ZipList [a] #

Alternative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

empty :: STM a #

(<|>) :: STM a -> STM a -> STM a #

some :: STM a -> STM [a] #

many :: STM a -> STM [a] #

Alternative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: P a #

(<|>) :: P a -> P a -> P a #

some :: P a -> P [a] #

many :: P a -> P [a] #

Alternative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: ReadP a #

(<|>) :: ReadP a -> ReadP a -> ReadP a #

some :: ReadP a -> ReadP [a] #

many :: ReadP a -> ReadP [a] #

Alternative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

empty :: ReadPrec a #

(<|>) :: ReadPrec a -> ReadPrec a -> ReadPrec a #

some :: ReadPrec a -> ReadPrec [a] #

many :: ReadPrec a -> ReadPrec [a] #

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a #

(<|>) :: Seq a -> Seq a -> Seq a #

some :: Seq a -> Seq [a] #

many :: Seq a -> Seq [a] #

Alternative DList 
Instance details

Defined in Data.DList.Internal

Methods

empty :: DList a #

(<|>) :: DList a -> DList a -> DList a #

some :: DList a -> DList [a] #

many :: DList a -> DList [a] #

Alternative IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

Alternative Array 
Instance details

Defined in Data.Primitive.Array

Methods

empty :: Array a #

(<|>) :: Array a -> Array a -> Array a #

some :: Array a -> Array [a] #

many :: Array a -> Array [a] #

Alternative SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Alternative Vector 
Instance details

Defined in Data.Vector

Methods

empty :: Vector a #

(<|>) :: Vector a -> Vector a -> Vector a #

some :: Vector a -> Vector [a] #

many :: Vector a -> Vector [a] #

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

Alternative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: [a] #

(<|>) :: [a] -> [a] -> [a] #

some :: [a] -> [[a]] #

many :: [a] -> [[a]] #

MonadPlus m => Alternative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedMonad m a #

(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a #

some :: WrappedMonad m a -> WrappedMonad m [a] #

many :: WrappedMonad m a -> WrappedMonad m [a] #

ArrowPlus a => Alternative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: ArrowMonad a a0 #

(<|>) :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

some :: ArrowMonad a a0 -> ArrowMonad a [a0] #

many :: ArrowMonad a a0 -> ArrowMonad a [a0] #

Alternative (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

empty :: Proxy a #

(<|>) :: Proxy a -> Proxy a -> Proxy a #

some :: Proxy a -> Proxy [a] #

many :: Proxy a -> Proxy [a] #

Alternative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: U1 a #

(<|>) :: U1 a -> U1 a -> U1 a #

some :: U1 a -> U1 [a] #

many :: U1 a -> U1 [a] #

(Semigroup e, Monoid e) => Alternative (Validation e) 
Instance details

Defined in Data.Either.Validation

Methods

empty :: Validation e a #

(<|>) :: Validation e a -> Validation e a -> Validation e a #

some :: Validation e a -> Validation e [a] #

many :: Validation e a -> Validation e [a] #

Alternative v => Alternative (Free v)

This violates the Alternative laws, handle with care.

Instance details

Defined in Control.Monad.Free

Methods

empty :: Free v a #

(<|>) :: Free v a -> Free v a -> Free v a #

some :: Free v a -> Free v [a] #

many :: Free v a -> Free v [a] #

Alternative f => Alternative (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Bind.Class

Alternative f => Alternative (Lift f)

A combination is Pure only either part is.

Instance details

Defined in Control.Applicative.Lift

Methods

empty :: Lift f a #

(<|>) :: Lift f a -> Lift f a -> Lift f a #

some :: Lift f a -> Lift f [a] #

many :: Lift f a -> Lift f [a] #

(Functor m, Monad m) => Alternative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

empty :: MaybeT m a #

(<|>) :: MaybeT m a -> MaybeT m a -> MaybeT m a #

some :: MaybeT m a -> MaybeT m [a] #

many :: MaybeT m a -> MaybeT m [a] #

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Alternative m => Alternative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: Kleisli m a a0 #

(<|>) :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

some :: Kleisli m a a0 -> Kleisli m a [a0] #

many :: Kleisli m a a0 -> Kleisli m a [a0] #

Alternative f => Alternative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

empty :: Ap f a #

(<|>) :: Ap f a -> Ap f a -> Ap f a #

some :: Ap f a -> Ap f [a] #

many :: Ap f a -> Ap f [a] #

Alternative f => Alternative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

empty :: Alt f a #

(<|>) :: Alt f a -> Alt f a -> Alt f a #

some :: Alt f a -> Alt f [a] #

many :: Alt f a -> Alt f [a] #

Alternative f => Alternative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: Rec1 f a #

(<|>) :: Rec1 f a -> Rec1 f a -> Rec1 f a #

some :: Rec1 f a -> Rec1 f [a] #

many :: Rec1 f a -> Rec1 f [a] #

(Functor f, MonadPlus m) => Alternative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

empty :: FreeT f m a #

(<|>) :: FreeT f m a -> FreeT f m a -> FreeT f m a #

some :: FreeT f m a -> FreeT f m [a] #

many :: FreeT f m a -> FreeT f m [a] #

Alternative f => Alternative (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

(Profunctor p, ArrowPlus p) => Alternative (Closure p a) 
Instance details

Defined in Data.Profunctor.Closed

Methods

empty :: Closure p a a0 #

(<|>) :: Closure p a a0 -> Closure p a a0 -> Closure p a a0 #

some :: Closure p a a0 -> Closure p a [a0] #

many :: Closure p a a0 -> Closure p a [a0] #

(Profunctor p, ArrowPlus p) => Alternative (Tambara p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

empty :: Tambara p a a0 #

(<|>) :: Tambara p a a0 -> Tambara p a a0 -> Tambara p a a0 #

some :: Tambara p a a0 -> Tambara p a [a0] #

many :: Tambara p a a0 -> Tambara p a [a0] #

(Selective f, Monoid e) => Alternative (ComposeEither f e) 
Instance details

Defined in Control.Selective

Methods

empty :: ComposeEither f e a #

(<|>) :: ComposeEither f e a -> ComposeEither f e a -> ComposeEither f e a #

some :: ComposeEither f e a -> ComposeEither f e [a] #

many :: ComposeEither f e a -> ComposeEither f e [a] #

Alternative f => Alternative (Backwards f)

Try alternatives in the same order as f.

Instance details

Defined in Control.Applicative.Backwards

Methods

empty :: Backwards f a #

(<|>) :: Backwards f a -> Backwards f a -> Backwards f a #

some :: Backwards f a -> Backwards f [a] #

many :: Backwards f a -> Backwards f [a] #

(Functor m, Monad m, Error e) => Alternative (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

empty :: ErrorT e m a #

(<|>) :: ErrorT e m a -> ErrorT e m a -> ErrorT e m a #

some :: ErrorT e m a -> ErrorT e m [a] #

many :: ErrorT e m a -> ErrorT e m [a] #

(Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

empty :: ExceptT e m a #

(<|>) :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

some :: ExceptT e m a -> ExceptT e m [a] #

many :: ExceptT e m a -> ExceptT e m [a] #

Alternative m => Alternative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

empty :: IdentityT m a #

(<|>) :: IdentityT m a -> IdentityT m a -> IdentityT m a #

some :: IdentityT m a -> IdentityT m [a] #

many :: IdentityT m a -> IdentityT m [a] #

Alternative m => Alternative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a #

(<|>) :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

some :: ReaderT r m a -> ReaderT r m [a] #

many :: ReaderT r m a -> ReaderT r m [a] #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

empty :: StateT s m a #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a #

some :: StateT s m a -> StateT s m [a] #

many :: StateT s m a -> StateT s m [a] #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

empty :: StateT s m a #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a #

some :: StateT s m a -> StateT s m [a] #

many :: StateT s m a -> StateT s m [a] #

(Monoid w, Alternative m) => Alternative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

(Monoid w, Alternative m) => Alternative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

Alternative f => Alternative (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

empty :: Reverse f a #

(<|>) :: Reverse f a -> Reverse f a -> Reverse f a #

some :: Reverse f a -> Reverse f [a] #

many :: Reverse f a -> Reverse f [a] #

(Alternative f, Alternative g) => Alternative (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

empty :: Product f g a #

(<|>) :: Product f g a -> Product f g a -> Product f g a #

some :: Product f g a -> Product f g [a] #

many :: Product f g a -> Product f g [a] #

(Alternative f, Alternative g) => Alternative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :*: g) a #

(<|>) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

some :: (f :*: g) a -> (f :*: g) [a] #

many :: (f :*: g) a -> (f :*: g) [a] #

Alternative f => Alternative (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

empty :: Star f a a0 #

(<|>) :: Star f a a0 -> Star f a a0 -> Star f a a0 #

some :: Star f a a0 -> Star f a [a0] #

many :: Star f a a0 -> Star f a [a0] #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Compose f g a -> Compose f g [a] #

many :: Compose f g a -> Compose f g [a] #

(Alternative f, Applicative g) => Alternative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :.: g) a #

(<|>) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a #

some :: (f :.: g) a -> (f :.: g) [a] #

many :: (f :.: g) a -> (f :.: g) [a] #

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 #

(<|>) :: M1 i c f a -> M1 i c f a -> M1 i c f a #

some :: M1 i c f a -> M1 i c f [a] #

many :: M1 i c f a -> M1 i c f [a] #

(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 #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

some :: RWST r w s m a -> RWST r w s m [a] #

many :: RWST r w s m a -> RWST r w s m [a] #

(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 #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

some :: RWST r w s m a -> RWST r w s m [a] #

many :: RWST r w s m a -> RWST r w s m [a] #

when :: Applicative f => Bool -> f () -> f () #

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.

until :: (a -> Bool) -> (a -> a) -> a -> a #

until p f yields the result of applying f until p holds.

ord :: Char -> Int #

The fromEnum method restricted to the type Char.

liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r #

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 #

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 #

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 #

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

liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d #

Lift a ternary function to actions.

liftA :: Applicative f => (a -> b) -> f a -> f b #

Lift a function to actions. Equivalent to Functor's fmap but implemented using only Applicative's methods: `liftA f a = pure f * a`

As such this function may be used to implement a Functor instance from an Applicative one.

flip :: (a -> b -> c) -> b -> a -> c #

flip f takes its (first) two arguments in the reverse order of f.

>>> flip (++) "hello" "world"
"worldhello"

const :: a -> b -> a #

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]

asTypeOf :: a -> a -> a #

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.

ap :: Monad m => m (a -> b) -> m a -> m b #

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

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 #

Same as >>=, but with the arguments interchanged.

(<**>) :: Applicative f => f a -> f (a -> b) -> f b infixl 4 #

A variant of <*> with the arguments reversed.

($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 #

Strict (call-by-value) application operator. It takes a function and an argument, evaluates the argument to weak head normal form (WHNF), then calls the function with that value.

undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a #

A special case of error. It is expected that compilers will recognize this and insert error messages which are more appropriate to the context in which undefined appears.

errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a #

A variant of error that does not produce a stack trace.

Since: base-4.9.0.0

error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a #

error stops execution and displays an error message.

stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a #

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 #

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 

Instances

Instances details
Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

(&&) :: Bool -> Bool -> Bool infixr 3 #

Boolean "and", lazy in the second argument

not :: Bool -> Bool #

Boolean "not"

(||) :: Bool -> Bool -> Bool infixr 2 #

Boolean "or", lazy in the second argument

newtype WrappedBifunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1) #

Make a Functor over the second argument of a Bifunctor.

Constructors

WrapBifunctor 

Fields

Instances

Instances details
Generic1 (WrappedBifunctor p a :: k1 -> Type) 
Instance details

Defined in Data.Bifunctor.Wrapped

Associated Types

type Rep1 (WrappedBifunctor p a) :: k -> Type #

Methods

from1 :: forall (a0 :: k). WrappedBifunctor p a a0 -> Rep1 (WrappedBifunctor p a) a0 #

to1 :: forall (a0 :: k). Rep1 (WrappedBifunctor p a) a0 -> WrappedBifunctor p a a0 #

Bifoldable p => Bifoldable (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bifold :: Monoid m => WrappedBifunctor p m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> WrappedBifunctor p a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> WrappedBifunctor p a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> WrappedBifunctor p a b -> c #

Bifunctor p => Bifunctor (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bimap :: (a -> b) -> (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d #

first :: (a -> b) -> WrappedBifunctor p a c -> WrappedBifunctor p b c #

second :: (b -> c) -> WrappedBifunctor p a b -> WrappedBifunctor p a c #

Bitraversable p => Bitraversable (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> WrappedBifunctor p a b -> f (WrappedBifunctor p c d) #

Eq2 p => Eq2 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> WrappedBifunctor p a c -> WrappedBifunctor p b d -> Bool #

Ord2 p => Ord2 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> WrappedBifunctor p a c -> WrappedBifunctor p b d -> Ordering #

Read2 p => Read2 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (WrappedBifunctor p a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [WrappedBifunctor p a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (WrappedBifunctor p a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [WrappedBifunctor p a b] #

Show2 p => Show2 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> WrappedBifunctor p a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [WrappedBifunctor p a b] -> ShowS #

Biapplicative p => Biapplicative (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bipure :: a -> b -> WrappedBifunctor p a b #

(<<*>>) :: WrappedBifunctor p (a -> b) (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d #

biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> WrappedBifunctor p a d -> WrappedBifunctor p b e -> WrappedBifunctor p c f #

(*>>) :: WrappedBifunctor p a b -> WrappedBifunctor p c d -> WrappedBifunctor p c d #

(<<*) :: WrappedBifunctor p a b -> WrappedBifunctor p c d -> WrappedBifunctor p a b #

Bifoldable1 p => Bifoldable1 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bifold1 :: Semigroup m => WrappedBifunctor p m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> WrappedBifunctor p a b -> m #

Bifunctor p => Invariant2 (WrappedBifunctor p)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedBifunctor p a b -> WrappedBifunctor p c d #

Biapply p => Biapply (WrappedBifunctor p) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: WrappedBifunctor p (a -> b) (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d #

(.>>) :: WrappedBifunctor p a b -> WrappedBifunctor p c d -> WrappedBifunctor p c d #

(<<.) :: WrappedBifunctor p a b -> WrappedBifunctor p c d -> WrappedBifunctor p a b #

Bitraversable1 p => Bitraversable1 (WrappedBifunctor p) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> WrappedBifunctor p a c -> f (WrappedBifunctor p b d) #

bisequence1 :: Apply f => WrappedBifunctor p (f a) (f b) -> f (WrappedBifunctor p a b) #

Bifoldable p => Foldable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

fold :: Monoid m => WrappedBifunctor p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 #

toList :: WrappedBifunctor p a a0 -> [a0] #

null :: WrappedBifunctor p a a0 -> Bool #

length :: WrappedBifunctor p a a0 -> Int #

elem :: Eq a0 => a0 -> WrappedBifunctor p a a0 -> Bool #

maximum :: Ord a0 => WrappedBifunctor p a a0 -> a0 #

minimum :: Ord a0 => WrappedBifunctor p a a0 -> a0 #

sum :: Num a0 => WrappedBifunctor p a a0 -> a0 #

product :: Num a0 => WrappedBifunctor p a a0 -> a0 #

(Eq2 p, Eq a) => Eq1 (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftEq :: (a0 -> b -> Bool) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b -> Bool #

(Ord2 p, Ord a) => Ord1 (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftCompare :: (a0 -> b -> Ordering) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b -> Ordering #

(Read2 p, Read a) => Read1 (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (WrappedBifunctor p a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [WrappedBifunctor p a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (WrappedBifunctor p a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [WrappedBifunctor p a a0] #

(Show2 p, Show a) => Show1 (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> WrappedBifunctor p a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [WrappedBifunctor p a a0] -> ShowS #

Bitraversable p => Traversable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

traverse :: Applicative f => (a0 -> f b) -> WrappedBifunctor p a a0 -> f (WrappedBifunctor p a b) #

sequenceA :: Applicative f => WrappedBifunctor p a (f a0) -> f (WrappedBifunctor p a a0) #

mapM :: Monad m => (a0 -> m b) -> WrappedBifunctor p a a0 -> m (WrappedBifunctor p a b) #

sequence :: Monad m => WrappedBifunctor p a (m a0) -> m (WrappedBifunctor p a a0) #

Bifunctor p => Functor (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

fmap :: (a0 -> b) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b #

(<$) :: a0 -> WrappedBifunctor p a b -> WrappedBifunctor p a a0 #

Bifunctor p => Invariant (WrappedBifunctor p a)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b #

Generic (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Associated Types

type Rep (WrappedBifunctor p a b) :: Type -> Type #

Methods

from :: WrappedBifunctor p a b -> Rep (WrappedBifunctor p a b) x #

to :: Rep (WrappedBifunctor p a b) x -> WrappedBifunctor p a b #

Read (p a b) => Read (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Show (p a b) => Show (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Eq (p a b) => Eq (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

(==) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

(/=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

Ord (p a b) => Ord (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

type Rep1 (WrappedBifunctor p a :: k1 -> Type) 
Instance details

Defined in Data.Bifunctor.Wrapped

type Rep1 (WrappedBifunctor p a :: k1 -> Type) = D1 ('MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.6.1-K0IKjcNRvddhW5s3mU858" 'True) (C1 ('MetaCons "WrapBifunctor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapBifunctor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (p a))))
type Rep (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

type Rep (WrappedBifunctor p a b) = D1 ('MetaData "WrappedBifunctor" "Data.Bifunctor.Wrapped" "bifunctors-5.6.1-K0IKjcNRvddhW5s3mU858" 'True) (C1 ('MetaCons "WrapBifunctor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapBifunctor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (p a b))))

(<<$>>) :: (a -> b) -> a -> b infixl 4 #

data ShortByteString #

A compact representation of a Word8 vector.

It has a lower memory overhead than a ByteString and does not contribute to heap fragmentation. It can be converted to or from a ByteString (at the cost of copying the string data). It supports very few other operations.

It is suitable for use as an internal representation for code that needs to keep many short strings in memory, but it should not be used as an interchange type. That is, it should not generally be used in public APIs. The ByteString type is usually more suitable for use in interfaces; it is more flexible and it supports a wide range of operations.

Instances

Instances details
Data ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ShortByteString -> c ShortByteString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ShortByteString #

toConstr :: ShortByteString -> Constr #

dataTypeOf :: ShortByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ShortByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ShortByteString) #

gmapT :: (forall b. Data b => b -> b) -> ShortByteString -> ShortByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ShortByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ShortByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ShortByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ShortByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ShortByteString -> m ShortByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ShortByteString -> m ShortByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ShortByteString -> m ShortByteString #

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

Monoid ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

IsList ShortByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Short.Internal

Associated Types

type Item ShortByteString #

Read ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Show ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

NFData ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Methods

rnf :: ShortByteString -> () #

Eq ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Ord ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Hashable ShortByteString 
Instance details

Defined in Data.Hashable.Class

Lift ShortByteString

Since: bytestring-0.11.2.0

Instance details

Defined in Data.ByteString.Short.Internal

Methods

lift :: Quote m => ShortByteString -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => ShortByteString -> Code m ShortByteString #

type Item ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

data ByteString #

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
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 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString #

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal

IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Internal

Associated Types

type Item ByteString #

Read ByteString 
Instance details

Defined in Data.ByteString.Internal

Show ByteString 
Instance details

Defined in Data.ByteString.Internal

NFData ByteString 
Instance details

Defined in Data.ByteString.Internal

Methods

rnf :: ByteString -> () #

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Lift ByteString

Since: bytestring-0.11.2.0

Instance details

Defined in Data.ByteString.Internal

Methods

lift :: Quote m => ByteString -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => ByteString -> Code m ByteString #

type Item ByteString 
Instance details

Defined in Data.ByteString.Internal

liftW3 :: ComonadApply w => (a -> b -> c -> d) -> w a -> w b -> w c -> w d #

Lift a ternary function into a Comonad with zipping

liftW2 :: ComonadApply w => (a -> b -> c) -> w a -> w b -> w c #

Lift a binary function into a Comonad with zipping

(<@@>) :: ComonadApply w => w a -> w (a -> b) -> w b infixl 4 #

A variant of <@> with the arguments reversed.

(=>=) :: Comonad w => (w a -> b) -> (w b -> c) -> w a -> c infixr 1 #

Left-to-right Cokleisli composition

(=<=) :: Comonad w => (w b -> c) -> (w a -> b) -> w a -> c infixr 1 #

Right-to-left Cokleisli composition

(<<=) :: Comonad w => (w a -> b) -> w a -> w b infixr 1 #

extend in operator form

(=>>) :: Comonad w => w a -> (w a -> b) -> w b infixl 1 #

extend with the arguments swapped. Dual to >>= for a Monad.

kfix :: ComonadApply w => w (w a -> a) -> w a #

Comonadic fixed point à la Kenneth Foner:

This is the evaluate function from his "Getting a Quick Fix on Comonads" talk.

cfix :: Comonad w => (w a -> a) -> w a #

Comonadic fixed point à la Dominic Orchard

wfix :: Comonad w => w (w a -> a) -> a #

Comonadic fixed point à la David Menendez

liftW :: Comonad w => (a -> b) -> w a -> w b #

A suitable default definition for fmap for a Comonad. Promotes a function to a comonad.

You can only safely use liftW to define fmap if your Comonad defines extend, not just duplicate, since defining extend in terms of duplicate uses fmap!

fmap f = liftW f = extend (f . extract)

class Functor w => Comonad (w :: Type -> Type) where #

There are two ways to define a comonad:

I. Provide definitions for extract and extend satisfying these laws:

extend extract      = id
extract . extend f  = f
extend f . extend g = extend (f . extend g)

In this case, you may simply set fmap = liftW.

These laws are directly analogous to the laws for monads and perhaps can be made clearer by viewing them as laws stating that Cokleisli composition must be associative, and has extract for a unit:

f =>= extract   = f
extract =>= f   = f
(f =>= g) =>= h = f =>= (g =>= h)

II. Alternately, you may choose to provide definitions for fmap, extract, and duplicate satisfying these laws:

extract . duplicate      = id
fmap extract . duplicate = id
duplicate . duplicate    = fmap duplicate . duplicate

In this case you may not rely on the ability to define fmap in terms of liftW.

You may of course, choose to define both duplicate and extend. In that case you must also satisfy these laws:

extend f  = fmap f . duplicate
duplicate = extend id
fmap f    = extend (f . extract)

These are the default definitions of extend and duplicate and the definition of liftW respectively.

Minimal complete definition

extract, (duplicate | extend)

Methods

extract :: w a -> a #

extract . fmap f = f . extract

duplicate :: w a -> w (w a) #

extend :: (w a -> b) -> w a -> w b #

Instances

Instances details
Comonad Identity 
Instance details

Defined in Control.Comonad

Methods

extract :: Identity a -> a #

duplicate :: Identity a -> Identity (Identity a) #

extend :: (Identity a -> b) -> Identity a -> Identity b #

Comonad Tree 
Instance details

Defined in Control.Comonad

Methods

extract :: Tree a -> a #

duplicate :: Tree a -> Tree (Tree a) #

extend :: (Tree a -> b) -> Tree a -> Tree b #

Comonad NonEmpty 
Instance details

Defined in Control.Comonad

Methods

extract :: NonEmpty a -> a #

duplicate :: NonEmpty a -> NonEmpty (NonEmpty a) #

extend :: (NonEmpty a -> b) -> NonEmpty a -> NonEmpty b #

(Representable f, Monoid (Rep f)) => Comonad (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

extract :: Co f a -> a #

duplicate :: Co f a -> Co f (Co f a) #

extend :: (Co f a -> b) -> Co f a -> Co f b #

Comonad (Arg e) 
Instance details

Defined in Control.Comonad

Methods

extract :: Arg e a -> a #

duplicate :: Arg e a -> Arg e (Arg e a) #

extend :: (Arg e a -> b) -> Arg e a -> Arg e b #

Functor f => Comonad (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

extract :: Cofree f a -> a #

duplicate :: Cofree f a -> Cofree f (Cofree f a) #

extend :: (Cofree f a -> b) -> Cofree f a -> Cofree f b #

Comonad f => Comonad (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

extract :: MaybeApply f a -> a #

duplicate :: MaybeApply f a -> MaybeApply f (MaybeApply f a) #

extend :: (MaybeApply f a -> b) -> MaybeApply f a -> MaybeApply f b #

Comonad ((,) e) 
Instance details

Defined in Control.Comonad

Methods

extract :: (e, a) -> a #

duplicate :: (e, a) -> (e, (e, a)) #

extend :: ((e, a) -> b) -> (e, a) -> (e, b) #

(Comonad f, Comonad g) => Comonad (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

extract :: Day f g a -> a #

duplicate :: Day f g a -> Day f g (Day f g a) #

extend :: (Day f g a -> b) -> Day f g a -> Day f g b #

(Comonad f, Monoid a) => Comonad (Static f a) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

extract :: Static f a a0 -> a0 #

duplicate :: Static f a a0 -> Static f a (Static f a a0) #

extend :: (Static f a a0 -> b) -> Static f a a0 -> Static f a b #

Comonad (Tagged s) 
Instance details

Defined in Control.Comonad

Methods

extract :: Tagged s a -> a #

duplicate :: Tagged s a -> Tagged s (Tagged s a) #

extend :: (Tagged s a -> b) -> Tagged s a -> Tagged s b #

Comonad w => Comonad (IdentityT w) 
Instance details

Defined in Control.Comonad

Methods

extract :: IdentityT w a -> a #

duplicate :: IdentityT w a -> IdentityT w (IdentityT w a) #

extend :: (IdentityT w a -> b) -> IdentityT w a -> IdentityT w b #

(Comonad f, Comonad g) => Comonad (Sum f g) 
Instance details

Defined in Control.Comonad

Methods

extract :: Sum f g a -> a #

duplicate :: Sum f g a -> Sum f g (Sum f g a) #

extend :: (Sum f g a -> b) -> Sum f g a -> Sum f g b #

Monoid m => Comonad ((->) m) 
Instance details

Defined in Control.Comonad

Methods

extract :: (m -> a) -> a #

duplicate :: (m -> a) -> m -> (m -> a) #

extend :: ((m -> a) -> b) -> (m -> a) -> m -> b #

class Comonad w => ComonadApply (w :: Type -> Type) where #

ComonadApply is to Comonad like Applicative is to Monad.

Mathematically, it is a strong lax symmetric semi-monoidal comonad on the category Hask of Haskell types. That it to say that w is a strong lax symmetric semi-monoidal functor on Hask, where both extract and duplicate are symmetric monoidal natural transformations.

Laws:

(.) <$> u <@> v <@> w = u <@> (v <@> w)
extract (p <@> q) = extract p (extract q)
duplicate (p <@> q) = (<@>) <$> duplicate p <@> duplicate q

If our type is both a ComonadApply and Applicative we further require

(<*>) = (<@>)

Finally, if you choose to define (<@) and (@>), the results of your definitions should match the following laws:

a @> b = const id <$> a <@> b
a <@ b = const <$> a <@> b

Minimal complete definition

Nothing

Methods

(<@>) :: w (a -> b) -> w a -> w b infixl 4 #

(@>) :: w a -> w b -> w b infixl 4 #

(<@) :: w a -> w b -> w a infixl 4 #

Instances

Instances details
ComonadApply Identity 
Instance details

Defined in Control.Comonad

Methods

(<@>) :: Identity (a -> b) -> Identity a -> Identity b #

(@>) :: Identity a -> Identity b -> Identity b #

(<@) :: Identity a -> Identity b -> Identity a #

ComonadApply Tree 
Instance details

Defined in Control.Comonad

Methods

(<@>) :: Tree (a -> b) -> Tree a -> Tree b #

(@>) :: Tree a -> Tree b -> Tree b #

(<@) :: Tree a -> Tree b -> Tree a #

ComonadApply NonEmpty 
Instance details

Defined in Control.Comonad

Methods

(<@>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

(@>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<@) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

ComonadApply f => ComonadApply (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

(<@>) :: Cofree f (a -> b) -> Cofree f a -> Cofree f b #

(@>) :: Cofree f a -> Cofree f b -> Cofree f b #

(<@) :: Cofree f a -> Cofree f b -> Cofree f a #

Semigroup m => ComonadApply ((,) m) 
Instance details

Defined in Control.Comonad

Methods

(<@>) :: (m, a -> b) -> (m, a) -> (m, b) #

(@>) :: (m, a) -> (m, b) -> (m, b) #

(<@) :: (m, a) -> (m, b) -> (m, a) #

(ComonadApply f, ComonadApply g) => ComonadApply (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

(<@>) :: Day f g (a -> b) -> Day f g a -> Day f g b #

(@>) :: Day f g a -> Day f g b -> Day f g b #

(<@) :: Day f g a -> Day f g b -> Day f g a #

ComonadApply w => ComonadApply (IdentityT w) 
Instance details

Defined in Control.Comonad

Methods

(<@>) :: IdentityT w (a -> b) -> IdentityT w a -> IdentityT w b #

(@>) :: IdentityT w a -> IdentityT w b -> IdentityT w b #

(<@) :: IdentityT w a -> IdentityT w b -> IdentityT w a #

Monoid m => ComonadApply ((->) m) 
Instance details

Defined in Control.Comonad

Methods

(<@>) :: (m -> (a -> b)) -> (m -> a) -> m -> b #

(@>) :: (m -> a) -> (m -> b) -> m -> b #

(<@) :: (m -> a) -> (m -> b) -> m -> a #

newtype Cokleisli (w :: k -> Type) (a :: k) b #

The Cokleisli Arrows of a given Comonad

Constructors

Cokleisli 

Fields

Instances

Instances details
Comonad w => Category (Cokleisli w :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Control.Comonad

Methods

id :: forall (a :: k). Cokleisli w a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Cokleisli w b c -> Cokleisli w a b -> Cokleisli w a c #

Extend w => Semigroupoid (Cokleisli w :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Cokleisli w j k1 -> Cokleisli w i j -> Cokleisli w i k1 #

(Extend w, Comonad w) => Ob (Cokleisli w :: Type -> Type -> TYPE LiftedRep) (a :: Type) 
Instance details

Defined in Data.Semigroupoid.Ob

Methods

semiid :: Cokleisli w a a #

Comonad w => Arrow (Cokleisli w) 
Instance details

Defined in Control.Comonad

Methods

arr :: (b -> c) -> Cokleisli w b c #

first :: Cokleisli w b c -> Cokleisli w (b, d) (c, d) #

second :: Cokleisli w b c -> Cokleisli w (d, b) (d, c) #

(***) :: Cokleisli w b c -> Cokleisli w b' c' -> Cokleisli w (b, b') (c, c') #

(&&&) :: Cokleisli w b c -> Cokleisli w b c' -> Cokleisli w b (c, c') #

Comonad w => ArrowApply (Cokleisli w) 
Instance details

Defined in Control.Comonad

Methods

app :: Cokleisli w (Cokleisli w b c, b) c #

Comonad w => ArrowChoice (Cokleisli w) 
Instance details

Defined in Control.Comonad

Methods

left :: Cokleisli w b c -> Cokleisli w (Either b d) (Either c d) #

right :: Cokleisli w b c -> Cokleisli w (Either d b) (Either d c) #

(+++) :: Cokleisli w b c -> Cokleisli w b' c' -> Cokleisli w (Either b b') (Either c c') #

(|||) :: Cokleisli w b d -> Cokleisli w c d -> Cokleisli w (Either b c) d #

ComonadApply w => ArrowLoop (Cokleisli w) 
Instance details

Defined in Control.Comonad

Methods

loop :: Cokleisli w (b, d) (c, d) -> Cokleisli w b c #

Invariant w => Invariant2 (Cokleisli w)

from the comonad package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cokleisli w a b -> Cokleisli w c d #

Comonad w => Choice (Cokleisli w)

extract approximates costrength

Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Cokleisli w a b -> Cokleisli w (Either a c) (Either b c) #

right' :: Cokleisli w a b -> Cokleisli w (Either c a) (Either c b) #

Functor f => Closed (Cokleisli f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Cokleisli f a b -> Cokleisli f (x -> a) (x -> b) #

Functor w => Corepresentable (Cokleisli w) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Corep (Cokleisli w) :: Type -> Type #

Methods

cotabulate :: (Corep (Cokleisli w) d -> c) -> Cokleisli w d c #

Functor f => Costrong (Cokleisli f) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Cokleisli f (a, d) (b, d) -> Cokleisli f a b #

unsecond :: Cokleisli f (d, a) (d, b) -> Cokleisli f a b #

Functor w => Profunctor (Cokleisli w) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Cokleisli w b c -> Cokleisli w a d #

lmap :: (a -> b) -> Cokleisli w b c -> Cokleisli w a c #

rmap :: (b -> c) -> Cokleisli w a b -> Cokleisli w a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Cokleisli w a b -> Cokleisli w a c #

(.#) :: forall a b c q. Coercible b a => Cokleisli w b c -> q a b -> Cokleisli w a c #

Functor w => Cosieve (Cokleisli w) w 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: Cokleisli w a b -> w a -> b #

Applicative (Cokleisli w a) 
Instance details

Defined in Control.Comonad

Methods

pure :: a0 -> Cokleisli w a a0 #

(<*>) :: Cokleisli w a (a0 -> b) -> Cokleisli w a a0 -> Cokleisli w a b #

liftA2 :: (a0 -> b -> c) -> Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a c #

(*>) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a b #

(<*) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a a0 #

Functor (Cokleisli w a) 
Instance details

Defined in Control.Comonad

Methods

fmap :: (a0 -> b) -> Cokleisli w a a0 -> Cokleisli w a b #

(<$) :: a0 -> Cokleisli w a b -> Cokleisli w a a0 #

Monad (Cokleisli w a) 
Instance details

Defined in Control.Comonad

Methods

(>>=) :: Cokleisli w a a0 -> (a0 -> Cokleisli w a b) -> Cokleisli w a b #

(>>) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a b #

return :: a0 -> Cokleisli w a a0 #

Invariant (Cokleisli w a)

from the comonad package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Cokleisli w a a0 -> Cokleisli w a b #

Apply (Cokleisli w a) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Cokleisli w a (a0 -> b) -> Cokleisli w a a0 -> Cokleisli w a b #

(.>) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a b #

(<.) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a a0 #

liftF2 :: (a0 -> b -> c) -> Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a c #

type Corep (Cokleisli w) 
Instance details

Defined in Data.Profunctor.Rep

type Corep (Cokleisli w) = w

data IntMap a #

A map of integers to values a.

Instances

Instances details
Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

fold :: Monoid m => IntMap m -> m #

foldMap :: Monoid m => (a -> m) -> IntMap a -> m #

foldMap' :: Monoid m => (a -> m) -> IntMap a -> m #

foldr :: (a -> b -> b) -> b -> IntMap a -> b #

foldr' :: (a -> b -> b) -> b -> IntMap a -> b #

foldl :: (b -> a -> b) -> b -> IntMap a -> b #

foldl' :: (b -> a -> b) -> b -> IntMap a -> b #

foldr1 :: (a -> a -> a) -> IntMap a -> a #

foldl1 :: (a -> a -> a) -> IntMap a -> a #

toList :: IntMap a -> [a] #

null :: IntMap a -> Bool #

length :: IntMap a -> Int #

elem :: Eq a => a -> IntMap a -> Bool #

maximum :: Ord a => IntMap a -> a #

minimum :: Ord a => IntMap a -> a #

sum :: Num a => IntMap a -> a #

product :: Num a => IntMap a -> a #

Eq1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool #

Ord1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> IntMap a -> IntMap b -> Ordering #

Read1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (IntMap a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [IntMap a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (IntMap a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [IntMap a] #

Show1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> IntMap a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [IntMap a] -> ShowS #

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> IntMap a -> f (IntMap b) #

sequenceA :: Applicative f => IntMap (f a) -> f (IntMap a) #

mapM :: Monad m => (a -> m b) -> IntMap a -> m (IntMap b) #

sequence :: Monad m => IntMap (m a) -> m (IntMap a) #

Functor IntMap 
Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> IntMap a -> IntMap b #

(<$) :: a -> IntMap b -> IntMap a #

Hashable1 IntMap

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> IntMap a -> Int #

Invariant IntMap

from the containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> IntMap a -> IntMap b #

Adjustable IntMap 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key IntMap -> IntMap a -> IntMap a #

replace :: Key IntMap -> a -> IntMap a -> IntMap a #

FoldableWithKey IntMap 
Instance details

Defined in Data.Key

Methods

toKeyedList :: IntMap a -> [(Key IntMap, a)] #

foldMapWithKey :: Monoid m => (Key IntMap -> a -> m) -> IntMap a -> m #

foldrWithKey :: (Key IntMap -> a -> b -> b) -> b -> IntMap a -> b #

foldlWithKey :: (b -> Key IntMap -> a -> b) -> b -> IntMap a -> b #

Indexable IntMap 
Instance details

Defined in Data.Key

Methods

index :: IntMap a -> Key IntMap -> a #

Keyed IntMap 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key IntMap -> a -> b) -> IntMap a -> IntMap b #

Lookup IntMap 
Instance details

Defined in Data.Key

Methods

lookup :: Key IntMap -> IntMap a -> Maybe a #

TraversableWithKey IntMap 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key IntMap -> a -> f b) -> IntMap a -> f (IntMap b) #

mapWithKeyM :: Monad m => (Key IntMap -> a -> m b) -> IntMap a -> m (IntMap b) #

Zip IntMap 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c #

zip :: IntMap a -> IntMap b -> IntMap (a, b) #

zap :: IntMap (a -> b) -> IntMap a -> IntMap b #

ZipWithKey IntMap 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key IntMap -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c #

zapWithKey :: IntMap (Key IntMap -> a -> b) -> IntMap a -> IntMap b #

Alt IntMap 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: IntMap a -> IntMap a -> IntMap a #

some :: Applicative IntMap => IntMap a -> IntMap [a] #

many :: Applicative IntMap => IntMap a -> IntMap [a] #

Apply IntMap

An IntMap is not Applicative, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: IntMap (a -> b) -> IntMap a -> IntMap b #

(.>) :: IntMap a -> IntMap b -> IntMap b #

(<.) :: IntMap a -> IntMap b -> IntMap a #

liftF2 :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c #

Bind IntMap

An IntMap is not a Monad, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: IntMap a -> (a -> IntMap b) -> IntMap b #

join :: IntMap (IntMap a) -> IntMap a #

Plus IntMap 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: IntMap a #

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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IntMap a) #

toConstr :: IntMap a -> Constr #

dataTypeOf :: IntMap a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IntMap a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IntMap a)) #

gmapT :: (forall b. Data b => b -> b) -> IntMap a -> IntMap a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntMap a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntMap a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

Monoid (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

mempty :: IntMap a #

mappend :: IntMap a -> IntMap a -> IntMap a #

mconcat :: [IntMap a] -> IntMap a #

Semigroup (IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Methods

(<>) :: IntMap a -> IntMap a -> IntMap a #

sconcat :: NonEmpty (IntMap a) -> IntMap a #

stimes :: Integral b => b -> IntMap a -> IntMap a #

IsList (IntMap a)

Since: containers-0.5.6.2

Instance details

Defined in Data.IntMap.Internal

Associated Types

type Item (IntMap a) #

Methods

fromList :: [Item (IntMap a)] -> IntMap a #

fromListN :: Int -> [Item (IntMap a)] -> IntMap a #

toList :: IntMap a -> [Item (IntMap a)] #

Read e => Read (IntMap e) 
Instance details

Defined in Data.IntMap.Internal

Show a => Show (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

showsPrec :: Int -> IntMap a -> ShowS #

show :: IntMap a -> String #

showList :: [IntMap a] -> ShowS #

NFData a => NFData (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

rnf :: IntMap a -> () #

Eq a => Eq (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

(==) :: IntMap a -> IntMap a -> Bool #

(/=) :: IntMap a -> IntMap a -> Bool #

Ord a => Ord (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

compare :: IntMap a -> IntMap a -> Ordering #

(<) :: IntMap a -> IntMap a -> Bool #

(<=) :: IntMap a -> IntMap a -> Bool #

(>) :: IntMap a -> IntMap a -> Bool #

(>=) :: IntMap a -> IntMap a -> Bool #

max :: IntMap a -> IntMap a -> IntMap a #

min :: IntMap a -> IntMap a -> IntMap a #

Hashable v => Hashable (IntMap v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntMap v -> Int #

hash :: IntMap v -> Int #

type Key IntMap 
Instance details

Defined in Data.Key

type Key IntMap = Int
type Item (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

type Item (IntMap a) = (Key, a)

data IntSet #

A set of integers.

Instances

Instances details
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 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntSet #

toConstr :: IntSet -> Constr #

dataTypeOf :: IntSet -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntSet) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntSet) #

gmapT :: (forall b. Data b => b -> b) -> IntSet -> IntSet #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntSet -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntSet -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

IsList IntSet

Since: containers-0.5.6.2

Instance details

Defined in Data.IntSet.Internal

Associated Types

type Item IntSet #

Read IntSet 
Instance details

Defined in Data.IntSet.Internal

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

NFData IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

rnf :: IntSet -> () #

Eq IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

(==) :: IntSet -> IntSet -> Bool #

(/=) :: IntSet -> IntSet -> Bool #

Ord IntSet 
Instance details

Defined in Data.IntSet.Internal

Hashable IntSet

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntSet -> Int #

hash :: IntSet -> Int #

type Item IntSet 
Instance details

Defined in Data.IntSet.Internal

type Item IntSet = Key

data Map k a #

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 #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Map a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Map a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Map a b -> c #

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 #

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 #

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 #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Map a b] -> ShowS #

Hashable2 Map

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Map a b -> Int #

Foldable (Map k)

Folds in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m #

foldMap :: Monoid m => (a -> m) -> Map k a -> m #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m #

foldr :: (a -> b -> b) -> b -> Map k a -> b #

foldr' :: (a -> b -> b) -> b -> Map k a -> b #

foldl :: (b -> a -> b) -> b -> Map k a -> b #

foldl' :: (b -> a -> b) -> b -> Map k a -> b #

foldr1 :: (a -> a -> a) -> Map k a -> a #

foldl1 :: (a -> a -> a) -> Map k a -> a #

toList :: Map k a -> [a] #

null :: Map k a -> Bool #

length :: Map k a -> Int #

elem :: Eq a => a -> Map k a -> Bool #

maximum :: Ord a => Map k a -> a #

minimum :: Ord a => Map k a -> a #

sum :: Num a => Map k a -> a #

product :: Num a => Map k a -> a #

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 #

Ord k => Ord1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Map k a -> Map k b -> Ordering #

(Ord k, Read k) => Read1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Map k a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Map k a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Map k a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Map k a] #

Show k => Show1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Map k a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Map k a] -> ShowS #

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) #

sequenceA :: Applicative f => Map k (f a) -> f (Map k a) #

mapM :: Monad m => (a -> m b) -> Map k a -> m (Map k b) #

sequence :: Monad m => Map k (m a) -> m (Map k a) #

Functor (Map k) 
Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> Map k a -> Map k b #

(<$) :: a -> Map k b -> Map k a #

Hashable k => Hashable1 (Map k)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Map k a -> Int #

Invariant (Map k)

from the containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Map k a -> Map k b #

Ord k => Adjustable (Map k) 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key (Map k) -> Map k a -> Map k a #

replace :: Key (Map k) -> a -> Map k a -> Map k a #

FoldableWithKey (Map k) 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Map k a -> [(Key (Map k), a)] #

foldMapWithKey :: Monoid m => (Key (Map k) -> a -> m) -> Map k a -> m #

foldrWithKey :: (Key (Map k) -> a -> b -> b) -> b -> Map k a -> b #

foldlWithKey :: (b -> Key (Map k) -> a -> b) -> b -> Map k a -> b #

Ord k => Indexable (Map k) 
Instance details

Defined in Data.Key

Methods

index :: Map k a -> Key (Map k) -> a #

Keyed (Map k) 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key (Map k) -> a -> b) -> Map k a -> Map k b #

Ord k => Lookup (Map k) 
Instance details

Defined in Data.Key

Methods

lookup :: Key (Map k) -> Map k a -> Maybe a #

TraversableWithKey (Map k) 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key (Map k) -> a -> f b) -> Map k a -> f (Map k b) #

mapWithKeyM :: Monad m => (Key (Map k) -> a -> m b) -> Map k a -> m (Map k b) #

Ord k => Zip (Map k) 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Map k a -> Map k b -> Map k c #

zip :: Map k a -> Map k b -> Map k (a, b) #

zap :: Map k (a -> b) -> Map k a -> Map k b #

Ord k => ZipWithKey (Map k) 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key (Map k) -> a -> b -> c) -> Map k a -> Map k b -> Map k c #

zapWithKey :: Map k (Key (Map k) -> a -> b) -> Map k a -> Map k b #

Ord k => Alt (Map k) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Map k a -> Map k a -> Map k a #

some :: Applicative (Map k) => Map k a -> Map k [a] #

many :: Applicative (Map k) => Map k a -> Map k [a] #

Ord k => Apply (Map k)

A 'Map k' is not Applicative, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Map k (a -> b) -> Map k a -> Map k b #

(.>) :: Map k a -> Map k b -> Map k b #

(<.) :: Map k a -> Map k b -> Map k a #

liftF2 :: (a -> b -> c) -> Map k a -> Map k b -> Map k c #

Ord k => Bind (Map k)

A 'Map k' is not a Monad, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Map k a -> (a -> Map k b) -> Map k b #

join :: Map k (Map k a) -> Map k a #

Ord k => Plus (Map k) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Map k a #

(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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k a) #

toConstr :: Map k a -> Constr #

dataTypeOf :: Map k a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k a)) #

gmapT :: (forall b. Data b => b -> b) -> Map k a -> Map k a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Map k a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

Ord k => Monoid (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

mempty :: Map k v #

mappend :: Map k v -> Map k v -> Map k v #

mconcat :: [Map k v] -> Map k v #

Ord k => Semigroup (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

(<>) :: Map k v -> Map k v -> Map k v #

sconcat :: NonEmpty (Map k v) -> Map k v #

stimes :: Integral b => b -> Map k v -> Map k v #

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) #

Methods

fromList :: [Item (Map k v)] -> Map k v #

fromListN :: Int -> [Item (Map k v)] -> Map k v #

toList :: Map k v -> [Item (Map k v)] #

(Ord k, Read k, Read e) => Read (Map k e) 
Instance details

Defined in Data.Map.Internal

Methods

readsPrec :: Int -> ReadS (Map k e) #

readList :: ReadS [Map k e] #

readPrec :: ReadPrec (Map k e) #

readListPrec :: ReadPrec [Map k e] #

(Show k, Show a) => Show (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

showsPrec :: Int -> Map k a -> ShowS #

show :: Map k a -> String #

showList :: [Map k a] -> ShowS #

(NFData k, NFData a) => NFData (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

rnf :: Map k a -> () #

(Eq k, Eq a) => Eq (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

(==) :: Map k a -> Map k a -> Bool #

(/=) :: Map k a -> Map k a -> Bool #

(Ord k, Ord v) => Ord (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

compare :: Map k v -> Map k v -> Ordering #

(<) :: Map k v -> Map k v -> Bool #

(<=) :: Map k v -> Map k v -> Bool #

(>) :: Map k v -> Map k v -> Bool #

(>=) :: Map k v -> Map k v -> Bool #

max :: Map k v -> Map k v -> Map k v #

min :: Map k v -> Map k v -> Map k v #

(Hashable k, Hashable v) => Hashable (Map k v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Map k v -> Int #

hash :: Map k v -> Int #

type Key (Map k) 
Instance details

Defined in Data.Key

type Key (Map k) = k
type Item (Map k v) 
Instance details

Defined in Data.Map.Internal

type Item (Map k v) = (k, v)

data Seq a #

General-purpose finite sequences.

Instances

Instances details
MonadFix Seq

Since: containers-0.5.11

Instance details

Defined in Data.Sequence.Internal

Methods

mfix :: (a -> Seq a) -> Seq a #

MonadZip Seq
 mzipWith = zipWith
 munzip = unzip
Instance details

Defined in Data.Sequence.Internal

Methods

mzip :: Seq a -> Seq b -> Seq (a, b) #

mzipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

munzip :: Seq (a, b) -> (Seq a, Seq b) #

Foldable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Seq m -> m #

foldMap :: Monoid m => (a -> m) -> Seq a -> m #

foldMap' :: Monoid m => (a -> m) -> Seq a -> m #

foldr :: (a -> b -> b) -> b -> Seq a -> b #

foldr' :: (a -> b -> b) -> b -> Seq a -> b #

foldl :: (b -> a -> b) -> b -> Seq a -> b #

foldl' :: (b -> a -> b) -> b -> Seq a -> b #

foldr1 :: (a -> a -> a) -> Seq a -> a #

foldl1 :: (a -> a -> a) -> Seq a -> a #

toList :: Seq a -> [a] #

null :: Seq a -> Bool #

length :: Seq a -> Int #

elem :: Eq a => a -> Seq a -> Bool #

maximum :: Ord a => Seq a -> a #

minimum :: Ord a => Seq a -> a #

sum :: Num a => Seq a -> a #

product :: Num a => Seq a -> a #

Eq1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftEq :: (a -> b -> Bool) -> Seq a -> Seq b -> Bool #

Ord1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Seq a -> Seq b -> Ordering #

Read1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Seq a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Seq a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Seq a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Seq a] #

Show1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Seq a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Seq a] -> ShowS #

Traversable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Seq a -> f (Seq b) #

sequenceA :: Applicative f => Seq (f a) -> f (Seq a) #

mapM :: Monad m => (a -> m b) -> Seq a -> m (Seq b) #

sequence :: Monad m => Seq (m a) -> m (Seq a) #

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a #

(<|>) :: Seq a -> Seq a -> Seq a #

some :: Seq a -> Seq [a] #

many :: Seq a -> Seq [a] #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

(*>) :: Seq a -> Seq b -> Seq b #

(<*) :: Seq a -> Seq b -> Seq a #

Functor Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b #

(<$) :: a -> Seq b -> Seq a #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

(>>=) :: Seq a -> (a -> Seq b) -> Seq b #

(>>) :: Seq a -> Seq b -> Seq b #

return :: a -> Seq a #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a #

mplus :: Seq a -> Seq a -> Seq a #

UnzipWith Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b)

Hashable1 Seq

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Seq a -> Int #

Invariant Seq

from the containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Seq a -> Seq b #

Adjustable Seq 
Instance details

Defined in Data.Key

Methods

adjust :: (a -> a) -> Key Seq -> Seq a -> Seq a #

replace :: Key Seq -> a -> Seq a -> Seq a #

FoldableWithKey Seq 
Instance details

Defined in Data.Key

Methods

toKeyedList :: Seq a -> [(Key Seq, a)] #

foldMapWithKey :: Monoid m => (Key Seq -> a -> m) -> Seq a -> m #

foldrWithKey :: (Key Seq -> a -> b -> b) -> b -> Seq a -> b #

foldlWithKey :: (b -> Key Seq -> a -> b) -> b -> Seq a -> b #

Indexable Seq 
Instance details

Defined in Data.Key

Methods

index :: Seq a -> Key Seq -> a #

Keyed Seq 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key Seq -> a -> b) -> Seq a -> Seq b #

Lookup Seq 
Instance details

Defined in Data.Key

Methods

lookup :: Key Seq -> Seq a -> Maybe a #

TraversableWithKey Seq 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key Seq -> a -> f b) -> Seq a -> f (Seq b) #

mapWithKeyM :: Monad m => (Key Seq -> a -> m b) -> Seq a -> m (Seq b) #

Zip Seq 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

zip :: Seq a -> Seq b -> Seq (a, b) #

zap :: Seq (a -> b) -> Seq a -> Seq b #

ZipWithKey Seq 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key Seq -> a -> b -> c) -> Seq a -> Seq b -> Seq c #

zapWithKey :: Seq (Key Seq -> a -> b) -> Seq a -> Seq b #

Alt Seq 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Seq a -> Seq a -> Seq a #

some :: Applicative Seq => Seq a -> Seq [a] #

many :: Applicative Seq => Seq a -> Seq [a] #

Apply Seq 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Seq (a -> b) -> Seq a -> Seq b #

(.>) :: Seq a -> Seq b -> Seq b #

(<.) :: Seq a -> Seq b -> Seq a #

liftF2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

Bind Seq 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Seq a -> (a -> Seq b) -> Seq b #

join :: Seq (Seq a) -> Seq a #

Extend Seq 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Seq a -> Seq (Seq a) #

extended :: (Seq a -> b) -> Seq a -> Seq b #

Plus Seq 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Seq a #

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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) #

toConstr :: Seq a -> Constr #

dataTypeOf :: Seq a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) #

gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

a ~ Char => IsString (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

fromString :: String -> Seq a #

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a #

mappend :: Seq a -> Seq a -> Seq a #

mconcat :: [Seq a] -> Seq a #

Semigroup (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

(<>) :: Seq a -> Seq a -> Seq a #

sconcat :: NonEmpty (Seq a) -> Seq a #

stimes :: Integral b => b -> Seq a -> Seq a #

IsList (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Item (Seq a) #

Methods

fromList :: [Item (Seq a)] -> Seq a #

fromListN :: Int -> [Item (Seq a)] -> Seq a #

toList :: Seq a -> [Item (Seq a)] #

Read a => Read (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS #

show :: Seq a -> String #

showList :: [Seq a] -> ShowS #

NFData a => NFData (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () #

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: Seq a -> Seq a -> Bool #

(/=) :: Seq a -> Seq a -> Bool #

Ord a => Ord (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: Seq a -> Seq a -> Ordering #

(<) :: Seq a -> Seq a -> Bool #

(<=) :: Seq a -> Seq a -> Bool #

(>) :: Seq a -> Seq a -> Bool #

(>=) :: Seq a -> Seq a -> Bool #

max :: Seq a -> Seq a -> Seq a #

min :: Seq a -> Seq a -> Seq a #

Hashable v => Hashable (Seq v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Seq v -> Int #

hash :: Seq v -> Int #

type Key Seq 
Instance details

Defined in Data.Key

type Key Seq = Int
type Item (Seq a) 
Instance details

Defined in Data.Sequence.Internal

type Item (Seq a) = a

data Set a #

A set of values a.

Instances

Instances details
Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Methods

fold :: Monoid m => Set m -> m #

foldMap :: Monoid m => (a -> m) -> Set a -> m #

foldMap' :: Monoid m => (a -> m) -> Set a -> m #

foldr :: (a -> b -> b) -> b -> Set a -> b #

foldr' :: (a -> b -> b) -> b -> Set a -> b #

foldl :: (b -> a -> b) -> b -> Set a -> b #

foldl' :: (b -> a -> b) -> b -> Set a -> b #

foldr1 :: (a -> a -> a) -> Set a -> a #

foldl1 :: (a -> a -> a) -> Set a -> a #

toList :: Set a -> [a] #

null :: Set a -> Bool #

length :: Set a -> Int #

elem :: Eq a => a -> Set a -> Bool #

maximum :: Ord a => Set a -> a #

minimum :: Ord a => Set a -> a #

sum :: Num a => Set a -> a #

product :: Num a => Set a -> a #

Eq1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftEq :: (a -> b -> Bool) -> Set a -> Set b -> Bool #

Ord1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Set a -> Set b -> Ordering #

Show1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Set a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Set a] -> ShowS #

Hashable1 Set

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Set a -> Int #

(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) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Set a) #

toConstr :: Set a -> Constr #

dataTypeOf :: Set a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Set a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Set a)) #

gmapT :: (forall b. Data b => b -> b) -> Set a -> Set a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Set a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Set a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

Ord a => Monoid (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: Set a #

mappend :: Set a -> Set a -> Set a #

mconcat :: [Set a] -> Set a #

Ord a => Semigroup (Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Methods

(<>) :: Set a -> Set a -> Set a #

sconcat :: NonEmpty (Set a) -> Set a #

stimes :: Integral b => b -> Set a -> Set a #

Ord a => IsList (Set a)

Since: containers-0.5.6.2

Instance details

Defined in Data.Set.Internal

Associated Types

type Item (Set a) #

Methods

fromList :: [Item (Set a)] -> Set a #

fromListN :: Int -> [Item (Set a)] -> Set a #

toList :: Set a -> [Item (Set a)] #

(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

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

NFData a => NFData (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

rnf :: Set a -> () #

Eq a => Eq (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

(==) :: Set a -> Set a -> Bool #

(/=) :: Set a -> Set a -> Bool #

Ord a => Ord (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

compare :: Set a -> Set a -> Ordering #

(<) :: Set a -> Set a -> Bool #

(<=) :: Set a -> Set a -> Bool #

(>) :: Set a -> Set a -> Bool #

(>=) :: Set a -> Set a -> Bool #

max :: Set a -> Set a -> Set a #

min :: Set a -> Set a -> Set a #

Hashable v => Hashable (Set v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Set v -> Int #

hash :: Set v -> Int #

type Item (Set a) 
Instance details

Defined in Data.Set.Internal

type Item (Set a) = a

chosen :: Decidable f => f b -> f c -> f (Either b c) #

liftD :: Divisible f => (a -> b) -> f b -> f a #

This is the divisible analogue of liftA. It gives a viable default definition for contramap in terms of the members of Divisible.

liftD f = divide ((,) () . f) conquer

conquered :: Divisible f => f () #

Redundant, but provided for symmetry.

conquered = conquer

divided :: Divisible f => f a -> f b -> f (a, b) #

class Contravariant f => Divisible (f :: Type -> Type) where #

A Divisible contravariant functor is the contravariant analogue of Applicative.

Continuing the intuition that Contravariant functors consume input, a Divisible contravariant functor also has the ability to be composed "beside" another contravariant functor.

Serializers provide a good example of Divisible contravariant functors. To begin let's start with the type of serializers for specific types:

newtype Serializer a = Serializer { runSerializer :: a -> ByteString }

This is a contravariant functor:

instance Contravariant Serializer where
  contramap f s = Serializer (runSerializer s . f)

That is, given a serializer for a (s :: Serializer a), and a way to turn bs into as (a mapping f :: b -> a), we have a serializer for b: contramap f s :: Serializer b.

Divisible gives us a way to combine two serializers that focus on different parts of a structure. If we postulate the existance of two primitive serializers - string :: Serializer String and int :: Serializer Int, we would like to be able to combine these into a serializer for pairs of Strings and Ints. How can we do this? Simply run both serializers and combine their output!

data StringAndInt = StringAndInt String Int

stringAndInt :: Serializer StringAndInt
stringAndInt = Serializer $ \(StringAndInt s i) ->
  let sBytes = runSerializer string s
      iBytes = runSerializer int i
  in sBytes <> iBytes

divide is a generalization by also taking a contramap like function to split any a into a pair. This conveniently allows you to target fields of a record, for instance, by extracting the values under two fields and combining them into a tuple.

To complete the example, here is how to write stringAndInt using a Divisible instance:

instance Divisible Serializer where
  conquer = Serializer (const mempty)

  divide toBC bSerializer cSerializer = Serializer $ \a ->
    case toBC a of
      (b, c) ->
        let bBytes = runSerializer bSerializer b
            cBytes = runSerializer cSerializer c
        in bBytes <> cBytes

stringAndInt :: Serializer StringAndInt
stringAndInt =
  divide (\(StringAndInt s i) -> (s, i)) string int

Methods

divide :: (a -> (b, c)) -> f b -> f c -> f a #

conquer :: f a #

Conquer acts as an identity for combining Divisible functors.

Instances

Instances details
Divisible SettableStateVar 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Divisible Comparison 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Comparison b -> Comparison c -> Comparison a #

conquer :: Comparison a #

Divisible Equivalence 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Equivalence b -> Equivalence c -> Equivalence a #

conquer :: Equivalence a #

Divisible Predicate 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Predicate b -> Predicate c -> Predicate a #

conquer :: Predicate a #

Monoid r => Divisible (Op r) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Op r b -> Op r c -> Op r a #

conquer :: Op r a #

Divisible (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Proxy b -> Proxy c -> Proxy a #

conquer :: Proxy a #

Divisible (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> U1 b -> U1 c -> U1 a #

conquer :: U1 a #

Divisible m => Divisible (ListT m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> ListT m b -> ListT m c -> ListT m a #

conquer :: ListT m a #

Divisible m => Divisible (MaybeT m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> MaybeT m b -> MaybeT m c -> MaybeT m a #

conquer :: MaybeT m a #

Monoid m => Divisible (Const m :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Const m b -> Const m c -> Const m a #

conquer :: Const m a #

Divisible f => Divisible (Alt f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Alt f b -> Alt f c -> Alt f a #

conquer :: Alt f a #

Divisible f => Divisible (Rec1 f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Rec1 f b -> Rec1 f c -> Rec1 f a #

conquer :: Rec1 f a #

(Divisible f, Applicative g) => Divisible (ComposeCF f g) 
Instance details

Defined in Data.Functor.Contravariant.Compose

Methods

divide :: (a -> (b, c)) -> ComposeCF f g b -> ComposeCF f g c -> ComposeCF f g a #

conquer :: ComposeCF f g a #

(Applicative f, Divisible g) => Divisible (ComposeFC f g) 
Instance details

Defined in Data.Functor.Contravariant.Compose

Methods

divide :: (a -> (b, c)) -> ComposeFC f g b -> ComposeFC f g c -> ComposeFC f g a #

conquer :: ComposeFC f g a #

Divisible f => Divisible (WrappedContravariant f) 
Instance details

Defined in Data.Functor.Invariant

Divisible f => Divisible (Backwards f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Backwards f b -> Backwards f c -> Backwards f a #

conquer :: Backwards f a #

Divisible m => Divisible (ErrorT e m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> ErrorT e m b -> ErrorT e m c -> ErrorT e m a #

conquer :: ErrorT e m a #

Divisible m => Divisible (ExceptT e m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> ExceptT e m b -> ExceptT e m c -> ExceptT e m a #

conquer :: ExceptT e m a #

Divisible f => Divisible (IdentityT f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> IdentityT f b -> IdentityT f c -> IdentityT f a #

conquer :: IdentityT f a #

Divisible m => Divisible (ReaderT r m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> ReaderT r m b -> ReaderT r m c -> ReaderT r m a #

conquer :: ReaderT r m a #

Divisible m => Divisible (StateT s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> StateT s m b -> StateT s m c -> StateT s m a #

conquer :: StateT s m a #

Divisible m => Divisible (StateT s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> StateT s m b -> StateT s m c -> StateT s m a #

conquer :: StateT s m a #

Divisible m => Divisible (WriterT w m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> WriterT w m b -> WriterT w m c -> WriterT w m a #

conquer :: WriterT w m a #

Divisible m => Divisible (WriterT w m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> WriterT w m b -> WriterT w m c -> WriterT w m a #

conquer :: WriterT w m a #

Monoid m => Divisible (Constant m :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Constant m b -> Constant m c -> Constant m a #

conquer :: Constant m a #

Divisible f => Divisible (Reverse f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Reverse f b -> Reverse f c -> Reverse f a #

conquer :: Reverse f a #

(Divisible f, Divisible g) => Divisible (Product f g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Product f g b -> Product f g c -> Product f g a #

conquer :: Product f g a #

(Divisible f, Divisible g) => Divisible (f :*: g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> (f :*: g) b -> (f :*: g) c -> (f :*: g) a #

conquer :: (f :*: g) a #

(Applicative f, Divisible g) => Divisible (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> Compose f g b -> Compose f g c -> Compose f g a #

conquer :: Compose f g a #

(Applicative f, Divisible g) => Divisible (f :.: g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> (f :.: g) b -> (f :.: g) c -> (f :.: g) a #

conquer :: (f :.: g) a #

Divisible f => Divisible (M1 i c f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c0)) -> M1 i c f b -> M1 i c f c0 -> M1 i c f a #

conquer :: M1 i c f a #

Divisible m => Divisible (RWST r w s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> RWST r w s m b -> RWST r w s m c -> RWST r w s m a #

conquer :: RWST r w s m a #

Divisible m => Divisible (RWST r w s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> RWST r w s m b -> RWST r w s m c -> RWST r w s m a #

conquer :: RWST r w s m a #

class Divisible f => Decidable (f :: Type -> Type) where #

A Decidable contravariant functor is the contravariant analogue of Alternative.

Noting the superclass constraint that f must also be Divisible, a Decidable functor has the ability to "fan out" input, under the intuition that contravariant functors consume input.

In the discussion for Divisible, an example was demonstrated with Serializers, that turn as into ByteStrings. Divisible allowed us to serialize the product of multiple values by concatenation. By making our Serializer also Decidable- we now have the ability to serialize the sum of multiple values - for example different constructors in an ADT.

Consider serializing arbitrary identifiers that can be either Strings or Ints:

data Identifier = StringId String | IntId Int

We know we have serializers for Strings and Ints, but how do we combine them into a Serializer for Identifier? Essentially, our Serializer needs to scrutinise the incoming value and choose how to serialize it:

identifier :: Serializer Identifier
identifier = Serializer $ \identifier ->
  case identifier of
    StringId s -> runSerializer string s
    IntId i -> runSerializer int i

It is exactly this notion of choice that Decidable encodes. Hence if we add an instance of Decidable for Serializer...

instance Decidable Serializer where
  lose f = Serializer $ \a -> absurd (f a)
  choose split l r = Serializer $ \a ->
    either (runSerializer l) (runSerializer r) (split a)

Then our identifier Serializer is

identifier :: Serializer Identifier
identifier = choose toEither string int where
  toEither (StringId s) = Left s
  toEither (IntId i) = Right i

Methods

lose :: (a -> Void) -> f a #

Acts as identity to choose.

choose :: (a -> Either b c) -> f b -> f c -> f a #

Instances

Instances details
Decidable SettableStateVar 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> SettableStateVar a #

choose :: (a -> Either b c) -> SettableStateVar b -> SettableStateVar c -> SettableStateVar a #

Decidable Comparison 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Comparison a #

choose :: (a -> Either b c) -> Comparison b -> Comparison c -> Comparison a #

Decidable Equivalence 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Equivalence a #

choose :: (a -> Either b c) -> Equivalence b -> Equivalence c -> Equivalence a #

Decidable Predicate 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Predicate a #

choose :: (a -> Either b c) -> Predicate b -> Predicate c -> Predicate a #

Monoid r => Decidable (Op r) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Op r a #

choose :: (a -> Either b c) -> Op r b -> Op r c -> Op r a #

Decidable (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Proxy a #

choose :: (a -> Either b c) -> Proxy b -> Proxy c -> Proxy a #

Decidable (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> U1 a #

choose :: (a -> Either b c) -> U1 b -> U1 c -> U1 a #

Divisible m => Decidable (ListT m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> ListT m a #

choose :: (a -> Either b c) -> ListT m b -> ListT m c -> ListT m a #

Divisible m => Decidable (MaybeT m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> MaybeT m a #

choose :: (a -> Either b c) -> MaybeT m b -> MaybeT m c -> MaybeT m a #

Decidable f => Decidable (Alt f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Alt f a #

choose :: (a -> Either b c) -> Alt f b -> Alt f c -> Alt f a #

Decidable f => Decidable (Rec1 f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Rec1 f a #

choose :: (a -> Either b c) -> Rec1 f b -> Rec1 f c -> Rec1 f a #

(Applicative f, Decidable g) => Decidable (ComposeFC f g) 
Instance details

Defined in Data.Functor.Contravariant.Compose

Methods

lose :: (a -> Void) -> ComposeFC f g a #

choose :: (a -> Either b c) -> ComposeFC f g b -> ComposeFC f g c -> ComposeFC f g a #

Decidable f => Decidable (WrappedContravariant f) 
Instance details

Defined in Data.Functor.Invariant

Decidable f => Decidable (Backwards f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Backwards f a #

choose :: (a -> Either b c) -> Backwards f b -> Backwards f c -> Backwards f a #

Decidable f => Decidable (IdentityT f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> IdentityT f a #

choose :: (a -> Either b c) -> IdentityT f b -> IdentityT f c -> IdentityT f a #

Decidable m => Decidable (ReaderT r m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> ReaderT r m a #

choose :: (a -> Either b c) -> ReaderT r m b -> ReaderT r m c -> ReaderT r m a #

Decidable m => Decidable (StateT s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> StateT s m a #

choose :: (a -> Either b c) -> StateT s m b -> StateT s m c -> StateT s m a #

Decidable m => Decidable (StateT s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> StateT s m a #

choose :: (a -> Either b c) -> StateT s m b -> StateT s m c -> StateT s m a #

Decidable m => Decidable (WriterT w m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> WriterT w m a #

choose :: (a -> Either b c) -> WriterT w m b -> WriterT w m c -> WriterT w m a #

Decidable m => Decidable (WriterT w m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> WriterT w m a #

choose :: (a -> Either b c) -> WriterT w m b -> WriterT w m c -> WriterT w m a #

Decidable f => Decidable (Reverse f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Reverse f a #

choose :: (a -> Either b c) -> Reverse f b -> Reverse f c -> Reverse f a #

(Decidable f, Decidable g) => Decidable (Product f g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Product f g a #

choose :: (a -> Either b c) -> Product f g b -> Product f g c -> Product f g a #

(Decidable f, Decidable g) => Decidable (f :*: g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> (f :*: g) a #

choose :: (a -> Either b c) -> (f :*: g) b -> (f :*: g) c -> (f :*: g) a #

(Applicative f, Decidable g) => Decidable (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> Compose f g a #

choose :: (a -> Either b c) -> Compose f g b -> Compose f g c -> Compose f g a #

(Applicative f, Decidable g) => Decidable (f :.: g) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> (f :.: g) a #

choose :: (a -> Either b c) -> (f :.: g) b -> (f :.: g) c -> (f :.: g) a #

Decidable f => Decidable (M1 i c f) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> M1 i c f a #

choose :: (a -> Either b c0) -> M1 i c f b -> M1 i c f c0 -> M1 i c f a #

Decidable m => Decidable (RWST r w s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> RWST r w s m a #

choose :: (a -> Either b c) -> RWST r w s m b -> RWST r w s m c -> RWST r w s m a #

Decidable m => Decidable (RWST r w s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> RWST r w s m a #

choose :: (a -> Either b c) -> RWST r w s m b -> RWST r w s m c -> RWST r w s m a #

class NFData2 (p :: Type -> Type -> Type) where #

A class of bifunctors that can be fully evaluated.

Since: deepseq-1.4.3.0

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> p a b -> () #

liftRnf2 should reduce its argument to normal form (that is, fully evaluate all sub-components), given functions to reduce a and b arguments respectively, and then return ().

Note: Unlike for the unary liftRnf, there is currently no support for generically deriving liftRnf2.

Instances

Instances details
NFData2 Either

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Either a b -> () #

NFData2 Arg

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Arg a b -> () #

NFData2 Array

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Array a b -> () #

NFData2 STRef

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> STRef a b -> () #

NFData2 HashMap

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> HashMap a b -> () #

NFData2 Leaf

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Leaf a b -> () #

NFData2 (,)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a, b) -> () #

NFData2 (Const :: Type -> Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Const a b -> () #

NFData2 ((:~:) :: Type -> Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a :~: b) -> () #

NFData a1 => NFData2 ((,,) a1)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a1, a, b) -> () #

NFData2 ((:~~:) :: Type -> Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a :~~: b) -> () #

(NFData a1, NFData a2) => NFData2 ((,,,) a1 a2)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a1, a2, a, b) -> () #

(NFData a1, NFData a2, NFData a3) => NFData2 ((,,,,) a1 a2 a3)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a1, a2, a3, a, b) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4) => NFData2 ((,,,,,) a1 a2 a3 a4)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a1, a2, a3, a4, a, b) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5) => NFData2 ((,,,,,,) a1 a2 a3 a4 a5)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a1, a2, a3, a4, a5, a, b) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6) => NFData2 ((,,,,,,,) a1 a2 a3 a4 a5 a6)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a1, a2, a3, a4, a5, a6, a, b) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7) => NFData2 ((,,,,,,,,) a1 a2 a3 a4 a5 a6 a7)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a1, a2, a3, a4, a5, a6, a7, a, b) -> () #

class NFData1 (f :: TYPE LiftedRep -> TYPE LiftedRep) where #

A class of functors that can be fully evaluated.

Since: deepseq-1.4.3.0

Minimal complete definition

Nothing

Methods

liftRnf :: (a -> ()) -> f a -> () #

liftRnf should reduce its argument to normal form (that is, fully evaluate all sub-components), given an argument to reduce a arguments, and then return ().

See rnf for the generic deriving.

Instances

Instances details
NFData1 ZipList

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> ZipList a -> () #

NFData1 Identity

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Identity a -> () #

NFData1 First

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> First a -> () #

NFData1 Last

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Last a -> () #

NFData1 Down

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Down a -> () #

NFData1 First

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> First a -> () #

NFData1 Last

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Last a -> () #

NFData1 Max

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Max a -> () #

NFData1 Min

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Min a -> () #

NFData1 WrappedMonoid

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> WrappedMonoid a -> () #

NFData1 Dual

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Dual a -> () #

NFData1 Product

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Product a -> () #

NFData1 Sum

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Sum a -> () #

NFData1 IORef

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> IORef a -> () #

NFData1 MVar

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> MVar a -> () #

NFData1 FunPtr

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> FunPtr a -> () #

NFData1 Ptr

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Ptr a -> () #

NFData1 Ratio

Available on base >=4.9

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Ratio a -> () #

NFData1 StableName

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> StableName a -> () #

NFData1 Array 
Instance details

Defined in Data.Primitive.Array

Methods

liftRnf :: (a -> ()) -> Array a -> () #

NFData1 SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

liftRnf :: (a -> ()) -> SmallArray a -> () #

NFData1 HashSet

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashSet.Internal

Methods

liftRnf :: (a -> ()) -> HashSet a -> () #

NFData1 Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector

Methods

liftRnf :: (a -> ()) -> Vector a -> () #

NFData1 Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector.Primitive

Methods

liftRnf :: (a -> ()) -> Vector a -> () #

NFData1 Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector.Storable

Methods

liftRnf :: (a -> ()) -> Vector a -> () #

NFData1 Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector.Unboxed.Base

Methods

liftRnf :: (a -> ()) -> Vector a -> () #

NFData1 NonEmpty

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> NonEmpty a -> () #

NFData1 Maybe

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Maybe a -> () #

NFData1 []

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> [a] -> () #

NFData a => NFData1 (Either a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Either a a0 -> () #

NFData1 (Fixed :: TYPE LiftedRep -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Fixed a -> () #

NFData1 (Proxy :: TYPE LiftedRep -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Proxy a -> () #

NFData a => NFData1 (Arg a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Arg a a0 -> () #

NFData a => NFData1 (Array a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Array a a0 -> () #

NFData1 (STRef s)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> STRef s a -> () #

NFData k => NFData1 (HashMap k)

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf :: (a -> ()) -> HashMap k a -> () #

NFData k => NFData1 (Leaf k)

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf :: (a -> ()) -> Leaf k a -> () #

NFData1 (MVector s) 
Instance details

Defined in Data.Vector.Primitive.Mutable

Methods

liftRnf :: (a -> ()) -> MVector s a -> () #

NFData1 (MVector s) 
Instance details

Defined in Data.Vector.Storable.Mutable

Methods

liftRnf :: (a -> ()) -> MVector s a -> () #

NFData1 (MVector s)

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector.Unboxed.Base

Methods

liftRnf :: (a -> ()) -> MVector s a -> () #

NFData a => NFData1 ((,) a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> (a, a0) -> () #

NFData a => NFData1 (Const a :: TYPE LiftedRep -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Const a a0 -> () #

NFData1 ((:~:) a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> (a :~: a0) -> () #

(NFData a1, NFData a2) => NFData1 ((,,) a1 a2)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> (a1, a2, a) -> () #

(NFData1 f, NFData1 g) => NFData1 (Product f g)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Product f g a -> () #

(NFData1 f, NFData1 g) => NFData1 (Sum f g)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Sum f g a -> () #

NFData1 ((:~~:) a :: TYPE LiftedRep -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> (a :~~: a0) -> () #

(NFData a1, NFData a2, NFData a3) => NFData1 ((,,,) a1 a2 a3)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> (a1, a2, a3, a) -> () #

(NFData1 f, NFData1 g) => NFData1 (Compose f g)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Compose f g a -> () #

(NFData a1, NFData a2, NFData a3, NFData a4) => NFData1 ((,,,,) a1 a2 a3 a4)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> (a1, a2, a3, a4, a) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5) => NFData1 ((,,,,,) a1 a2 a3 a4 a5)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> (a1, a2, a3, a4, a5, a) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6) => NFData1 ((,,,,,,) a1 a2 a3 a4 a5 a6)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> (a1, a2, a3, a4, a5, a6, a) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7) => NFData1 ((,,,,,,,) a1 a2 a3 a4 a5 a6 a7)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> (a1, a2, a3, a4, a5, a6, a7, a) -> () #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8) => NFData1 ((,,,,,,,,) a1 a2 a3 a4 a5 a6 a7 a8)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> (a1, a2, a3, a4, a5, a6, a7, a8, a) -> () #

class NFData a where #

A class of types that can be fully evaluated.

Since: deepseq-1.1.0.0

Minimal complete definition

Nothing

Methods

rnf :: a -> () #

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 All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () #

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () #

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

Methods

rnf :: TypeRep -> () #

NFData Unique

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Unique -> () #

NFData Version

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Version -> () #

NFData Void

Defined as rnf = absurd.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Void -> () #

NFData CBool

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CBool -> () #

NFData CChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CChar -> () #

NFData CClock

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CClock -> () #

NFData CDouble

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CDouble -> () #

NFData CFile

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CFile -> () #

NFData CFloat

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CFloat -> () #

NFData CFpos

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CFpos -> () #

NFData CInt

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CInt -> () #

NFData CIntMax

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CIntMax -> () #

NFData CIntPtr

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CIntPtr -> () #

NFData CJmpBuf

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CJmpBuf -> () #

NFData CLLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CLLong -> () #

NFData CLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CLong -> () #

NFData CPtrdiff

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CPtrdiff -> () #

NFData CSChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSChar -> () #

NFData CSUSeconds

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSUSeconds -> () #

NFData CShort

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CShort -> () #

NFData CSigAtomic

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSigAtomic -> () #

NFData CSize

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSize -> () #

NFData CTime

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CTime -> () #

NFData CUChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUChar -> () #

NFData CUInt

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUInt -> () #

NFData CUIntMax

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUIntMax -> () #

NFData CUIntPtr

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUIntPtr -> () #

NFData CULLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CULLong -> () #

NFData CULong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CULong -> () #

NFData CUSeconds

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUSeconds -> () #

NFData CUShort

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUShort -> () #

NFData CWchar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CWchar -> () #

NFData ThreadId

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ThreadId -> () #

NFData Fingerprint

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Fingerprint -> () #

NFData MaskingState

Since: deepseq-1.4.4.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MaskingState -> () #

NFData ExitCode

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ExitCode -> () #

NFData Int16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int16 -> () #

NFData Int32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int32 -> () #

NFData Int64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int64 -> () #

NFData Int8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int8 -> () #

NFData CallStack

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CallStack -> () #

NFData SrcLoc

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: SrcLoc -> () #

NFData Word16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word16 -> () #

NFData Word32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word32 -> () #

NFData Word64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word64 -> () #

NFData Word8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word8 -> () #

NFData ByteString 
Instance details

Defined in Data.ByteString.Internal

Methods

rnf :: ByteString -> () #

NFData ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

rnf :: ByteString -> () #

NFData ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Methods

rnf :: ShortByteString -> () #

NFData IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

rnf :: IntSet -> () #

NFData ByteArray 
Instance details

Defined in Data.Array.Byte

Methods

rnf :: ByteArray -> () #

NFData Ordering 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ordering -> () #

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

Methods

rnf :: TyCon -> () #

NFData TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: TextDetails -> () #

NFData Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

rnf :: Doc -> () #

NFData StdGen 
Instance details

Defined in System.Random.Internal

Methods

rnf :: StdGen -> () #

NFData Scientific 
Instance details

Defined in Data.Scientific

Methods

rnf :: Scientific -> () #

NFData UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

Methods

rnf :: UnicodeException -> () #

NFData CalendarDiffDays 
Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Methods

rnf :: CalendarDiffDays -> () #

NFData Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

rnf :: Day -> () #

NFData DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Methods

rnf :: DayOfWeek -> () #

NFData AbsoluteTime 
Instance details

Defined in Data.Time.Clock.Internal.AbsoluteTime

Methods

rnf :: AbsoluteTime -> () #

NFData DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

rnf :: DiffTime -> () #

NFData NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Methods

rnf :: NominalDiffTime -> () #

NFData SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

Methods

rnf :: SystemTime -> () #

NFData UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

rnf :: UTCTime -> () #

NFData UniversalTime 
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Methods

rnf :: UniversalTime -> () #

NFData CalendarDiffTime 
Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

Methods

rnf :: CalendarDiffTime -> () #

NFData LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Methods

rnf :: LocalTime -> () #

NFData TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Methods

rnf :: TimeOfDay -> () #

NFData TimeZone 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

Methods

rnf :: TimeZone -> () #

NFData ZonedTime 
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Methods

rnf :: ZonedTime -> () #

NFData UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

rnf :: UUID -> () #

NFData Integer 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Integer -> () #

NFData Natural

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Natural -> () #

NFData () 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: () -> () #

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Bool -> () #

NFData Char 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Char -> () #

NFData Double 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Double -> () #

NFData Float 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Float -> () #

NFData Int 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () #

NFData Word 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word -> () #

NFData a => NFData (ZipList a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ZipList a -> () #

NFData a => NFData (Complex a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Complex a -> () #

NFData a => NFData (Identity a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Identity a -> () #

NFData a => NFData (First a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () #

NFData a => NFData (Last a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () #

NFData a => NFData (Down a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Down a -> () #

NFData a => NFData (First a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () #

NFData a => NFData (Last a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () #

NFData a => NFData (Max a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Max a -> () #

NFData a => NFData (Min a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Min a -> () #

NFData m => NFData (WrappedMonoid m)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: WrappedMonoid m -> () #

NFData a => NFData (Dual a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Dual a -> () #

NFData a => NFData (Product a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Product a -> () #

NFData a => NFData (Sum a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum a -> () #

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 -> () #

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 -> () #

NFData (FunPtr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: FunPtr a -> () #

NFData (Ptr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ptr a -> () #

NFData a => NFData (Ratio a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ratio a -> () #

NFData (StableName a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: StableName a -> () #

NFData a => NFData (SCC a) 
Instance details

Defined in Data.Graph

Methods

rnf :: SCC a -> () #

NFData a => NFData (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

rnf :: IntMap a -> () #

NFData a => NFData (Digit a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Digit a -> () #

NFData a => NFData (Elem a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Elem a -> () #

NFData a => NFData (FingerTree a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: FingerTree a -> () #

NFData a => NFData (Node a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Node a -> () #

NFData a => NFData (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () #

NFData a => NFData (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

rnf :: Set a -> () #

NFData a => NFData (Tree a) 
Instance details

Defined in Data.Tree

Methods

rnf :: Tree a -> () #

NFData (MutableByteArray s) 
Instance details

Defined in Data.Array.Byte

Methods

rnf :: MutableByteArray s -> () #

NFData a => NFData (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

rnf :: DList a -> () #

NFData a => NFData (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

rnf :: Hashed a -> () #

NFData a => NFData (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: AnnotDetails a -> () #

NFData a => NFData (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: Doc a -> () #

NFData a => NFData (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

rnf :: Array a -> () #

NFData (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

rnf :: PrimArray a -> () #

NFData a => NFData (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

rnf :: SmallArray a -> () #

NFData g => NFData (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

rnf :: StateGen g -> () #

NFData g => NFData (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: AtomicGen g -> () #

NFData g => NFData (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: IOGen g -> () #

NFData g => NFData (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: STGen g -> () #

NFData g => NFData (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: TGen g -> () #

NFData a => NFData (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

rnf :: HashSet a -> () #

NFData a => NFData (Vector a) 
Instance details

Defined in Data.Vector

Methods

rnf :: Vector a -> () #

NFData (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

rnf :: Vector a -> () #

NFData (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

rnf :: Vector a -> () #

NFData (Vector a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

rnf :: Vector a -> () #

NFData a => NFData (NonEmpty a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: NonEmpty a -> () #

NFData a => NFData (Maybe a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () #

NFData a => NFData [a] 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: [a] -> () #

(NFData a, NFData b) => NFData (Either a b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Either a b -> () #

NFData (Fixed a)

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Fixed a -> () #

NFData (Proxy a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Proxy a -> () #

(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 -> () #

(NFData a, NFData b) => NFData (Array a b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Array a b -> () #

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 -> () #

(NFData k, NFData a) => NFData (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

rnf :: Map k a -> () #

NFData (MutablePrimArray s a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

rnf :: MutablePrimArray s a -> () #

(NFData k, NFData v) => NFData (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: HashMap k v -> () #

(NFData k, NFData v) => NFData (Leaf k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: Leaf k v -> () #

NFData (MVector s a) 
Instance details

Defined in Data.Vector.Primitive.Mutable

Methods

rnf :: MVector s a -> () #

NFData (MVector s a) 
Instance details

Defined in Data.Vector.Storable.Mutable

Methods

rnf :: MVector s a -> () #

NFData (MVector s a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

rnf :: MVector s a -> () #

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) -> () #

(NFData a, NFData b) => NFData (a, b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a, b) -> () #

NFData a => NFData (Const a b)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Const a b -> () #

NFData (a :~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~: b) -> () #

NFData b => NFData (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

rnf :: Tagged s b -> () #

(NFData a1, NFData a2, NFData a3) => NFData (a1, a2, a3) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3) -> () #

(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 -> () #

(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 -> () #

NFData (a :~~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~~: b) -> () #

(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) -> () #

(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 -> () #

(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) -> () #

(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) -> () #

(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) -> () #

(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) -> () #

(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) -> () #

rwhnf :: a -> () #

Reduce to weak head normal form

Equivalent to \x -> seq x ().

Useful for defining NFData for types for which NF=WHNF holds.

data T = C1 | C2 | C3
instance NFData T where rnf = rwhnf

Since: deepseq-1.4.3.0

rnf2 :: (NFData2 p, NFData a, NFData b) => p a b -> () #

Lift the standard rnf function through the type constructor.

Since: deepseq-1.4.3.0

rnf1 :: (NFData1 f, NFData a) => f a -> () #

Lift the standard rnf function through the type constructor.

Since: deepseq-1.4.3.0

force :: NFData a => a -> a #

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

deepseq :: NFData a => a -> b -> b #

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

(<$!!>) :: (Monad m, NFData b) => (a -> b) -> m a -> m b infixl 4 #

Deeply strict version of <$>.

Since: deepseq-1.4.3.0

($!!) :: NFData a => (a -> b) -> a -> b infixr 0 #

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

data DList a #

A difference list is an abstraction representing a list that supports \(\mathcal{O}\)(1) append and snoc operations, making it useful for replacing frequent applications of ++ such as logging and pretty printing (esp. if those uses of ++ are left-nested).

Instances

Instances details
MonadFail DList 
Instance details

Defined in Data.DList.Internal

Methods

fail :: String -> DList a #

Foldable DList 
Instance details

Defined in Data.DList.Internal

Methods

fold :: Monoid m => DList m -> m #

foldMap :: Monoid m => (a -> m) -> DList a -> m #

foldMap' :: Monoid m => (a -> m) -> DList a -> m #

foldr :: (a -> b -> b) -> b -> DList a -> b #

foldr' :: (a -> b -> b) -> b -> DList a -> b #

foldl :: (b -> a -> b) -> b -> DList a -> b #

foldl' :: (b -> a -> b) -> b -> DList a -> b #

foldr1 :: (a -> a -> a) -> DList a -> a #

foldl1 :: (a -> a -> a) -> DList a -> a #

toList :: DList a -> [a] #

null :: DList a -> Bool #

length :: DList a -> Int #

elem :: Eq a => a -> DList a -> Bool #

maximum :: Ord a => DList a -> a #

minimum :: Ord a => DList a -> a #

sum :: Num a => DList a -> a #

product :: Num a => DList a -> a #

Traversable DList 
Instance details

Defined in Data.DList.Internal

Methods

traverse :: Applicative f => (a -> f b) -> DList a -> f (DList b) #

sequenceA :: Applicative f => DList (f a) -> f (DList a) #

mapM :: Monad m => (a -> m b) -> DList a -> m (DList b) #

sequence :: Monad m => DList (m a) -> m (DList a) #

Alternative DList 
Instance details

Defined in Data.DList.Internal

Methods

empty :: DList a #

(<|>) :: DList a -> DList a -> DList a #

some :: DList a -> DList [a] #

many :: DList a -> DList [a] #

Applicative DList 
Instance details

Defined in Data.DList.Internal

Methods

pure :: a -> DList a #

(<*>) :: DList (a -> b) -> DList a -> DList b #

liftA2 :: (a -> b -> c) -> DList a -> DList b -> DList c #

(*>) :: DList a -> DList b -> DList b #

(<*) :: DList a -> DList b -> DList a #

Functor DList 
Instance details

Defined in Data.DList.Internal

Methods

fmap :: (a -> b) -> DList a -> DList b #

(<$) :: a -> DList b -> DList a #

Monad DList 
Instance details

Defined in Data.DList.Internal

Methods

(>>=) :: DList a -> (a -> DList b) -> DList b #

(>>) :: DList a -> DList b -> DList b #

return :: a -> DList a #

MonadPlus DList 
Instance details

Defined in Data.DList.Internal

Methods

mzero :: DList a #

mplus :: DList a -> DList a -> DList a #

a ~ Char => IsString (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

fromString :: String -> DList a #

Monoid (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

mempty :: DList a #

mappend :: DList a -> DList a -> DList a #

mconcat :: [DList a] -> DList a #

Semigroup (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

(<>) :: DList a -> DList a -> DList a #

sconcat :: NonEmpty (DList a) -> DList a #

stimes :: Integral b => b -> DList a -> DList a #

IsList (DList a) 
Instance details

Defined in Data.DList.Internal

Associated Types

type Item (DList a) #

Methods

fromList :: [Item (DList a)] -> DList a #

fromListN :: Int -> [Item (DList a)] -> DList a #

toList :: DList a -> [Item (DList a)] #

Read a => Read (DList a) 
Instance details

Defined in Data.DList.Internal

Show a => Show (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

showsPrec :: Int -> DList a -> ShowS #

show :: DList a -> String #

showList :: [DList a] -> ShowS #

NFData a => NFData (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

rnf :: DList a -> () #

Eq a => Eq (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

(==) :: DList a -> DList a -> Bool #

(/=) :: DList a -> DList a -> Bool #

Ord a => Ord (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

compare :: DList a -> DList a -> Ordering #

(<) :: DList a -> DList a -> Bool #

(<=) :: DList a -> DList a -> Bool #

(>) :: DList a -> DList a -> Bool #

(>=) :: DList a -> DList a -> Bool #

max :: DList a -> DList a -> DList a #

min :: DList a -> DList a -> DList a #

type Item (DList a) 
Instance details

Defined in Data.DList.Internal

type Item (DList a) = a

swapEither :: Either e a -> Either a e #

Swap the Left and Right sides of an Either.

>>> swapEither (Right 3)
Left 3
>>> swapEither (Left "error")
Right "error"

eitherToError :: MonadError e m => Either e a -> m a #

Generalize Either e as MonadError e m.

If the argument has form Left e, an error is produced in the monad via throwError. Otherwise, the Right a part is forwarded.

maybeToRight :: b -> Maybe a -> Either b a #

Maybe produce a Right, otherwise produce a Left.

>>> maybeToRight "default" (Just 12)
Right 12
>>> maybeToRight "default" Nothing
Left "default"

maybeToLeft :: b -> Maybe a -> Either a b #

Maybe produce a Left, otherwise produce a Right.

>>> maybeToLeft "default" (Just 12)
Left 12
>>> maybeToLeft "default" Nothing
Right "default"

rightToMaybe :: Either a b -> Maybe b #

Maybe get the Right side of an Either.

rightToMaybeeither (const Nothing) Just

Using Control.Lens:

rightToMaybe ≡ preview _Right
rightToMaybe x ≡ x^?_Right
>>> rightToMaybe (Left 12)
Nothing
>>> rightToMaybe (Right 12)
Just 12

leftToMaybe :: Either a b -> Maybe a #

Maybe get the Left side of an Either.

leftToMaybeeither Just (const Nothing)

Using Control.Lens:

leftToMaybe ≡ preview _Left
leftToMaybe x ≡ x^?_Left
>>> leftToMaybe (Left 12)
Just 12
>>> leftToMaybe (Right 12)
Nothing

unlessRight :: Applicative m => Either a b -> (a -> m ()) -> m () #

A synonym of whenLeft.

unlessLeft :: Applicative m => Either a b -> (b -> m ()) -> m () #

A synonym of whenRight.

whenRight :: Applicative m => Either a b -> (b -> m ()) -> m () #

The whenRight function takes an Either value and a function which returns a monad. The monad is only executed when the given argument takes the form Right _, otherwise it does nothing.

Using Data.Foldable:

whenRightforM_

Using Control.Lens:

whenRight ≡ forOf_ _Right
>>> whenRight (Right 12) print
12

whenLeft :: Applicative m => Either a b -> (a -> m ()) -> m () #

The whenLeft function takes an Either value and a function which returns a monad. The monad is only executed when the given argument takes the form Left _, otherwise it does nothing.

Using Control.Lens:

whenLeft ≡ forOf_ _Left
>>> whenLeft (Left 12) print
12

mapBoth :: (a -> c) -> (b -> d) -> Either a b -> Either c d #

The mapBoth function takes two functions and applies the first if iff the value takes the form Left _ and the second if the value takes the form Right _.

Using Data.Bifunctor:

mapBoth = bimap

Using Control.Arrow:

mapBoth = (+++)
>>> mapBoth (*2) (*3) (Left 4)
Left 8
>>> mapBoth (*2) (*3) (Right 4)
Right 12

fromRight' :: Either a b -> b #

Extracts the element out of a Right and throws an error if its argument take the form Left _.

Using Control.Lens:

fromRight' x ≡ x^?!_Right
>>> fromRight' (Right 12)
12

fromLeft' :: Either a b -> a #

Extracts the element out of a Left and throws an error if its argument take the form Right _.

Using Control.Lens:

fromLeft' x ≡ x^?!_Left
>>> fromLeft' (Left 12)
12

newtype MaybeT (m :: Type -> Type) a #

The parameterizable maybe monad, obtained by composing an arbitrary monad with the Maybe monad.

Computations are actions that may produce a value or exit.

The return function yields a computation that produces that value, while >>= sequences two subcomputations, exiting if either computation does.

Constructors

MaybeT (m (Maybe a)) 

Instances

Instances details
MonadTrans MaybeT 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

lift :: Monad m => m a -> MaybeT m a #

MonadRWS r w s m => MonadRWS r w s (MaybeT m) 
Instance details

Defined in Control.Monad.RWS.Class

MonadError e m => MonadError e (MaybeT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> MaybeT m a #

catchError :: MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a #

MonadReader r m => MonadReader r (MaybeT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: MaybeT m r #

local :: (r -> r) -> MaybeT m a -> MaybeT m a #

reader :: (r -> a) -> MaybeT m a #

MonadState s m => MonadState s (MaybeT m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: MaybeT m s #

put :: s -> MaybeT m () #

state :: (s -> (a, s)) -> MaybeT m a #

MonadWriter w m => MonadWriter w (MaybeT m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> MaybeT m a #

tell :: w -> MaybeT m () #

listen :: MaybeT m a -> MaybeT m (a, w) #

pass :: MaybeT m (a, w -> w) -> MaybeT m a #

Monad m => MonadFail (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fail :: String -> MaybeT m a #

MonadFix m => MonadFix (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mfix :: (a -> MaybeT m a) -> MaybeT m a #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a #

MonadZip m => MonadZip (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzip :: MaybeT m a -> MaybeT m b -> MaybeT m (a, b) #

mzipWith :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

munzip :: MaybeT m (a, b) -> (MaybeT m a, MaybeT m b) #

Foldable f => Foldable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fold :: Monoid m => MaybeT f m -> m #

foldMap :: Monoid m => (a -> m) -> MaybeT f a -> m #

foldMap' :: Monoid m => (a -> m) -> MaybeT f a -> m #

foldr :: (a -> b -> b) -> b -> MaybeT f a -> b #

foldr' :: (a -> b -> b) -> b -> MaybeT f a -> b #

foldl :: (b -> a -> b) -> b -> MaybeT f a -> b #

foldl' :: (b -> a -> b) -> b -> MaybeT f a -> b #

foldr1 :: (a -> a -> a) -> MaybeT f a -> a #

foldl1 :: (a -> a -> a) -> MaybeT f a -> a #

toList :: MaybeT f a -> [a] #

null :: MaybeT f a -> Bool #

length :: MaybeT f a -> Int #

elem :: Eq a => a -> MaybeT f a -> Bool #

maximum :: Ord a => MaybeT f a -> a #

minimum :: Ord a => MaybeT f a -> a #

sum :: Num a => MaybeT f a -> a #

product :: Num a => MaybeT f a -> a #

Eq1 m => Eq1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftEq :: (a -> b -> Bool) -> MaybeT m a -> MaybeT m b -> Bool #

Ord1 m => Ord1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftCompare :: (a -> b -> Ordering) -> MaybeT m a -> MaybeT m b -> Ordering #

Read1 m => Read1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (MaybeT m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [MaybeT m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (MaybeT m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [MaybeT m a] #

Show1 m => Show1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> MaybeT m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [MaybeT m a] -> ShowS #

Contravariant m => Contravariant (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

contramap :: (a' -> a) -> MaybeT m a -> MaybeT m a' #

(>$) :: b -> MaybeT m b -> MaybeT m a #

Traversable f => Traversable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

traverse :: Applicative f0 => (a -> f0 b) -> MaybeT f a -> f0 (MaybeT f b) #

sequenceA :: Applicative f0 => MaybeT f (f0 a) -> f0 (MaybeT f a) #

mapM :: Monad m => (a -> m b) -> MaybeT f a -> m (MaybeT f b) #

sequence :: Monad m => MaybeT f (m a) -> m (MaybeT f a) #

(Functor m, Monad m) => Alternative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

empty :: MaybeT m a #

(<|>) :: MaybeT m a -> MaybeT m a -> MaybeT m a #

some :: MaybeT m a -> MaybeT m [a] #

many :: MaybeT m a -> MaybeT m [a] #

(Functor m, Monad m) => Applicative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

pure :: a -> MaybeT m a #

(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #

liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a #

Functor m => Functor (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fmap :: (a -> b) -> MaybeT m a -> MaybeT m b #

(<$) :: a -> MaybeT m b -> MaybeT m a #

Monad m => Monad (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #

(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

return :: a -> MaybeT m a #

Monad m => MonadPlus (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzero :: MaybeT m a #

mplus :: MaybeT m a -> MaybeT m a -> MaybeT m a #

Divisible m => Decidable (MaybeT m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> MaybeT m a #

choose :: (a -> Either b c) -> MaybeT m b -> MaybeT m c -> MaybeT m a #

Divisible m => Divisible (MaybeT m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> MaybeT m b -> MaybeT m c -> MaybeT m a #

conquer :: MaybeT m a #

Invariant m => Invariant (MaybeT m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> MaybeT m a -> MaybeT m b #

MonadCont m => MonadCont (MaybeT m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> MaybeT m b) -> MaybeT m a) -> MaybeT m a #

PrimMonad m => PrimMonad (MaybeT m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (MaybeT m) #

Methods

primitive :: (State# (PrimState (MaybeT m)) -> (# State# (PrimState (MaybeT m)), a #)) -> MaybeT m a #

Monad m => Selective (MaybeT m) 
Instance details

Defined in Control.Selective

Methods

select :: MaybeT m (Either a b) -> MaybeT m (a -> b) -> MaybeT m b #

(Functor f, Monad f) => Alt (MaybeT f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: MaybeT f a -> MaybeT f a -> MaybeT f a #

some :: Applicative (MaybeT f) => MaybeT f a -> MaybeT f [a] #

many :: Applicative (MaybeT f) => MaybeT f a -> MaybeT f [a] #

(Functor m, Monad m) => Apply (MaybeT m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #

(.>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

(<.) :: MaybeT m a -> MaybeT m b -> MaybeT m a #

liftF2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

(Functor m, Monad m) => Bind (MaybeT m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #

join :: MaybeT m (MaybeT m a) -> MaybeT m a #

(Functor f, Monad f) => Plus (MaybeT f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: MaybeT f a #

(Read1 m, Read a) => Read (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

(Show1 m, Show a) => Show (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

showsPrec :: Int -> MaybeT m a -> ShowS #

show :: MaybeT m a -> String #

showList :: [MaybeT m a] -> ShowS #

(Eq1 m, Eq a) => Eq (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(==) :: MaybeT m a -> MaybeT m a -> Bool #

(/=) :: MaybeT m a -> MaybeT m a -> Bool #

(Ord1 m, Ord a) => Ord (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

compare :: MaybeT m a -> MaybeT m a -> Ordering #

(<) :: MaybeT m a -> MaybeT m a -> Bool #

(<=) :: MaybeT m a -> MaybeT m a -> Bool #

(>) :: MaybeT m a -> MaybeT m a -> Bool #

(>=) :: MaybeT m a -> MaybeT m a -> Bool #

max :: MaybeT m a -> MaybeT m a -> MaybeT m a #

min :: MaybeT m a -> MaybeT m a -> MaybeT m a #

type Rep1 (MaybeT m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep1 (MaybeT m :: Type -> Type) = D1 ('MetaData "MaybeT" "Control.Monad.Trans.Maybe" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "MaybeT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runMaybeT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (m :.: Rec1 Maybe)))
type PrimState (MaybeT m) 
Instance details

Defined in Control.Monad.Primitive

type Rep (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep (MaybeT m a) = D1 ('MetaData "MaybeT" "Control.Monad.Trans.Maybe" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "MaybeT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runMaybeT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (Maybe a)))))

newtype ExceptT e (m :: Type -> Type) a #

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
MonadRWS r w s m => MonadRWS r w s (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.RWS.Class

Monad m => MonadError e (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ExceptT e m a #

catchError :: ExceptT e m a -> (e -> ExceptT e m a) -> ExceptT e m a #

MonadReader r m => MonadReader r (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ExceptT e m r #

local :: (r -> r) -> ExceptT e m a -> ExceptT e m a #

reader :: (r -> a) -> ExceptT e m a #

MonadState s m => MonadState s (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.State.Class

Methods

get :: ExceptT e m s #

put :: s -> ExceptT e m () #

state :: (s -> (a, s)) -> ExceptT e m a #

MonadWriter w m => MonadWriter w (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> ExceptT e m a #

tell :: w -> ExceptT e m () #

listen :: ExceptT e m a -> ExceptT e m (a, w) #

pass :: ExceptT e m (a, w -> w) -> ExceptT e m a #

MonadTrans (ExceptT e) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

lift :: Monad m => m a -> ExceptT e m a #

MonadFail m => MonadFail (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fail :: String -> ExceptT e m a #

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 #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a #

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) #

mzipWith :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c #

munzip :: ExceptT e m (a, b) -> (ExceptT e m a, ExceptT e m b) #

Foldable f => Foldable (ExceptT e f) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fold :: Monoid m => ExceptT e f m -> m #

foldMap :: Monoid m => (a -> m) -> ExceptT e f a -> m #

foldMap' :: Monoid m => (a -> m) -> ExceptT e f a -> m #

foldr :: (a -> b -> b) -> b -> ExceptT e f a -> b #

foldr' :: (a -> b -> b) -> b -> ExceptT e f a -> b #

foldl :: (b -> a -> b) -> b -> ExceptT e f a -> b #

foldl' :: (b -> a -> b) -> b -> ExceptT e f a -> b #

foldr1 :: (a -> a -> a) -> ExceptT e f a -> a #

foldl1 :: (a -> a -> a) -> ExceptT e f a -> a #

toList :: ExceptT e f a -> [a] #

null :: ExceptT e f a -> Bool #

length :: ExceptT e f a -> Int #

elem :: Eq a => a -> ExceptT e f a -> Bool #

maximum :: Ord a => ExceptT e f a -> a #

minimum :: Ord a => ExceptT e f a -> a #

sum :: Num a => ExceptT e f a -> a #

product :: Num a => ExceptT e f a -> a #

(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 #

(Ord e, Ord1 m) => Ord1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftCompare :: (a -> b -> Ordering) -> ExceptT e m a -> ExceptT e m b -> Ordering #

(Read e, Read1 m) => Read1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (ExceptT e m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [ExceptT e m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (ExceptT e m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [ExceptT e m a] #

(Show e, Show1 m) => Show1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> ExceptT e m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [ExceptT e m a] -> ShowS #

Contravariant m => Contravariant (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

contramap :: (a' -> a) -> ExceptT e m a -> ExceptT e m a' #

(>$) :: b -> ExceptT e m b -> ExceptT e m a #

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) #

sequenceA :: Applicative f0 => ExceptT e f (f0 a) -> f0 (ExceptT e f a) #

mapM :: Monad m => (a -> m b) -> ExceptT e f a -> m (ExceptT e f b) #

sequence :: Monad m => ExceptT e f (m a) -> m (ExceptT e f a) #

(Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

empty :: ExceptT e m a #

(<|>) :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

some :: ExceptT e m a -> ExceptT e m [a] #

many :: ExceptT e m a -> ExceptT e m [a] #

(Functor m, Monad m) => Applicative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

pure :: a -> ExceptT e m a #

(<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b #

liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c #

(*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

(<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a #

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 #

(<$) :: a -> ExceptT e m b -> ExceptT e m a #

Monad m => Monad (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

(>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b #

(>>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

return :: a -> ExceptT e m a #

(Monad m, Monoid e) => MonadPlus (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mzero :: ExceptT e m a #

mplus :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

Divisible m => Divisible (ExceptT e m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> ExceptT e m b -> ExceptT e m c -> ExceptT e m a #

conquer :: ExceptT e m a #

Invariant m => Invariant (ExceptT e m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ExceptT e m a -> ExceptT e m b #

MonadCont m => MonadCont (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> ExceptT e m b) -> ExceptT e m a) -> ExceptT e m a #

PrimMonad m => PrimMonad (ExceptT e m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ExceptT e m) #

Methods

primitive :: (State# (PrimState (ExceptT e m)) -> (# State# (PrimState (ExceptT e m)), a #)) -> ExceptT e m a #

(Functor f, Monad f, Semigroup e) => Alt (ExceptT e f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: ExceptT e f a -> ExceptT e f a -> ExceptT e f a #

some :: Applicative (ExceptT e f) => ExceptT e f a -> ExceptT e f [a] #

many :: Applicative (ExceptT e f) => ExceptT e f a -> ExceptT e f [a] #

(Functor m, Monad m) => Apply (ExceptT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b #

(.>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

(<.) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a #

liftF2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c #

(Functor m, Monad m) => Bind (ExceptT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b #

join :: ExceptT e m (ExceptT e m a) -> ExceptT e m a #

(Functor f, Monad f, Semigroup e, Monoid e) => Plus (ExceptT e f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: ExceptT e f a #

(Read e, Read1 m, Read a) => Read (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

readsPrec :: Int -> ReadS (ExceptT e m a) #

readList :: ReadS [ExceptT e m a] #

readPrec :: ReadPrec (ExceptT e m a) #

readListPrec :: ReadPrec [ExceptT e m a] #

(Show e, Show1 m, Show a) => Show (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

showsPrec :: Int -> ExceptT e m a -> ShowS #

show :: ExceptT e m a -> String #

showList :: [ExceptT e m a] -> ShowS #

(Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

(==) :: ExceptT e m a -> ExceptT e m a -> Bool #

(/=) :: ExceptT e m a -> ExceptT e m a -> Bool #

(Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

compare :: ExceptT e m a -> ExceptT e m a -> Ordering #

(<) :: ExceptT e m a -> ExceptT e m a -> Bool #

(<=) :: ExceptT e m a -> ExceptT e m a -> Bool #

(>) :: ExceptT e m a -> ExceptT e m a -> Bool #

(>=) :: ExceptT e m a -> ExceptT e m a -> Bool #

max :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

min :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

type Rep1 (ExceptT e m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep1 (ExceptT e m :: Type -> Type) = D1 ('MetaData "ExceptT" "Control.Monad.Trans.Except" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "ExceptT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (m :.: Rec1 (Either e))))
type PrimState (ExceptT e m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ExceptT e m) = PrimState m
type Rep (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep (ExceptT e m a) = D1 ('MetaData "ExceptT" "Control.Monad.Trans.Except" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "ExceptT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (Either e a)))))

foldlM1 :: (Foldable1 t, Monad m) => (a -> a -> m a) -> t a -> m a #

Monadic fold over the elements of a non-empty structure, associating to the left, i.e. from left to right.

foldrM1 :: (Foldable1 t, Monad m) => (a -> a -> m a) -> t a -> m a #

Monadic fold over the elements of a non-empty structure, associating to the right, i.e. from right to left.

intercalate1 :: (Foldable1 t, Semigroup m) => m -> t m -> m #

Insert an m between each pair of t m.

>>> intercalate1 ", " $ "hello" :| ["how", "are", "you"]
"hello, how, are, you"
>>> intercalate1 ", " $ "hello" :| []
"hello"
>>> intercalate1 mempty $ "I" :| ["Am", "Fine", "You?"]
"IAmFineYou?"

class Foldable t => Foldable1 (t :: TYPE LiftedRep -> Type) where #

Non-empty data structures that can be folded.

Minimal complete definition

foldMap1 | foldrMap1

Methods

fold1 :: Semigroup m => t m -> m #

Combine the elements of a structure using a semigroup.

foldMap1 :: Semigroup m => (a -> m) -> t a -> m #

Map each element of the structure to a semigroup, and combine the results.

>>> foldMap1 Sum (1 :| [2, 3, 4])
Sum {getSum = 10}

toNonEmpty :: t a -> NonEmpty a #

List of elements of a structure, from left to right.

>>> toNonEmpty (Identity 2)
2 :| []

Instances

Instances details
Foldable1 Complex 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Complex m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Complex a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Complex a -> m #

toNonEmpty :: Complex a -> NonEmpty a #

maximum :: Ord a => Complex a -> a #

minimum :: Ord a => Complex a -> a #

head :: Complex a -> a #

last :: Complex a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Complex a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Complex a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Complex a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Complex a -> b #

Foldable1 Identity 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Identity m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Identity a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Identity a -> m #

toNonEmpty :: Identity a -> NonEmpty a #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

head :: Identity a -> a #

last :: Identity a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Identity a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Identity a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Identity a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Identity a -> b #

Foldable1 Down 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Down m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Down a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Down a -> m #

toNonEmpty :: Down a -> NonEmpty a #

maximum :: Ord a => Down a -> a #

minimum :: Ord a => Down a -> a #

head :: Down a -> a #

last :: Down a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Down a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Down a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Down a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Down a -> b #

Foldable1 First 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => First m -> m #

foldMap1 :: Semigroup m => (a -> m) -> First a -> m #

foldMap1' :: Semigroup m => (a -> m) -> First a -> m #

toNonEmpty :: First a -> NonEmpty a #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

head :: First a -> a #

last :: First a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> First a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> First a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> First a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> First a -> b #

Foldable1 Last 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Last m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Last a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Last a -> m #

toNonEmpty :: Last a -> NonEmpty a #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

head :: Last a -> a #

last :: Last a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Last a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Last a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Last a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Last a -> b #

Foldable1 Max 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Max m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Max a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Max a -> m #

toNonEmpty :: Max a -> NonEmpty a #

maximum :: Ord a => Max a -> a #

minimum :: Ord a => Max a -> a #

head :: Max a -> a #

last :: Max a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Max a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Max a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Max a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Max a -> b #

Foldable1 Min 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Min m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Min a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Min a -> m #

toNonEmpty :: Min a -> NonEmpty a #

maximum :: Ord a => Min a -> a #

minimum :: Ord a => Min a -> a #

head :: Min a -> a #

last :: Min a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Min a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Min a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Min a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Min a -> b #

Foldable1 Dual 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Dual m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Dual a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Dual a -> m #

toNonEmpty :: Dual a -> NonEmpty a #

maximum :: Ord a => Dual a -> a #

minimum :: Ord a => Dual a -> a #

head :: Dual a -> a #

last :: Dual a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Dual a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Dual a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Dual a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Dual a -> b #

Foldable1 Product 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Product m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Product a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Product a -> m #

toNonEmpty :: Product a -> NonEmpty a #

maximum :: Ord a => Product a -> a #

minimum :: Ord a => Product a -> a #

head :: Product a -> a #

last :: Product a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Product a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Product a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Product a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Product a -> b #

Foldable1 Sum 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Sum m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Sum a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Sum a -> m #

toNonEmpty :: Sum a -> NonEmpty a #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

head :: Sum a -> a #

last :: Sum a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Sum a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Sum a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Sum a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Sum a -> b #

Foldable1 Par1 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Par1 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Par1 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Par1 a -> m #

toNonEmpty :: Par1 a -> NonEmpty a #

maximum :: Ord a => Par1 a -> a #

minimum :: Ord a => Par1 a -> a #

head :: Par1 a -> a #

last :: Par1 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Par1 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Par1 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Par1 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Par1 a -> b #

Foldable1 Tree 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Tree m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Tree a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Tree a -> m #

toNonEmpty :: Tree a -> NonEmpty a #

maximum :: Ord a => Tree a -> a #

minimum :: Ord a => Tree a -> a #

head :: Tree a -> a #

last :: Tree a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Tree a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Tree a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Tree a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Tree a -> b #

Foldable1 NonEmpty 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => NonEmpty m -> m #

foldMap1 :: Semigroup m => (a -> m) -> NonEmpty a -> m #

foldMap1' :: Semigroup m => (a -> m) -> NonEmpty a -> m #

toNonEmpty :: NonEmpty a -> NonEmpty a #

maximum :: Ord a => NonEmpty a -> a #

minimum :: Ord a => NonEmpty a -> a #

head :: NonEmpty a -> a #

last :: NonEmpty a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> NonEmpty a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> NonEmpty a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> NonEmpty a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> NonEmpty a -> b #

Foldable1 Solo 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Solo m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Solo a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Solo a -> m #

toNonEmpty :: Solo a -> NonEmpty a #

maximum :: Ord a => Solo a -> a #

minimum :: Ord a => Solo a -> a #

head :: Solo a -> a #

last :: Solo a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Solo a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Solo a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Solo a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Solo a -> b #

Foldable1 (V1 :: TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => V1 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V1 a -> m #

foldMap1' :: Semigroup m => (a -> m) -> V1 a -> m #

toNonEmpty :: V1 a -> NonEmpty a #

maximum :: Ord a => V1 a -> a #

minimum :: Ord a => V1 a -> a #

head :: V1 a -> a #

last :: V1 a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> V1 a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> V1 a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> V1 a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> V1 a -> b #

Foldable1 f => Foldable1 (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

fold1 :: Semigroup m => Cofree f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Cofree f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Cofree f a -> m #

toNonEmpty :: Cofree f a -> NonEmpty a #

maximum :: Ord a => Cofree f a -> a #

minimum :: Ord a => Cofree f a -> a #

head :: Cofree f a -> a #

last :: Cofree f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Cofree f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Cofree f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Cofree f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Cofree f a -> b #

Foldable1 f => Foldable1 (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

fold1 :: Semigroup m => Free f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Free f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Free f a -> m #

toNonEmpty :: Free f a -> NonEmpty a #

maximum :: Ord a => Free f a -> a #

minimum :: Ord a => Free f a -> a #

head :: Free f a -> a #

last :: Free f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Free f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Free f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Free f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Free f a -> b #

Foldable1 f => Foldable1 (Lift f) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Lift f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Lift f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Lift f a -> m #

toNonEmpty :: Lift f a -> NonEmpty a #

maximum :: Ord a => Lift f a -> a #

minimum :: Ord a => Lift f a -> a #

head :: Lift f a -> a #

last :: Lift f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Lift f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Lift f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Lift f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Lift f a -> b #

Foldable1 ((,) a) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => (a, m) -> m #

foldMap1 :: Semigroup m => (a0 -> m) -> (a, a0) -> m #

foldMap1' :: Semigroup m => (a0 -> m) -> (a, a0) -> m #

toNonEmpty :: (a, a0) -> NonEmpty a0 #

maximum :: Ord a0 => (a, a0) -> a0 #

minimum :: Ord a0 => (a, a0) -> a0 #

head :: (a, a0) -> a0 #

last :: (a, a0) -> a0 #

foldrMap1 :: (a0 -> b) -> (a0 -> b -> b) -> (a, a0) -> b #

foldlMap1' :: (a0 -> b) -> (b -> a0 -> b) -> (a, a0) -> b #

foldlMap1 :: (a0 -> b) -> (b -> a0 -> b) -> (a, a0) -> b #

foldrMap1' :: (a0 -> b) -> (a0 -> b -> b) -> (a, a0) -> b #

Foldable1 f => Foldable1 (Ap f) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Ap f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Ap f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Ap f a -> m #

toNonEmpty :: Ap f a -> NonEmpty a #

maximum :: Ord a => Ap f a -> a #

minimum :: Ord a => Ap f a -> a #

head :: Ap f a -> a #

last :: Ap f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Ap f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Ap f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Ap f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Ap f a -> b #

Foldable1 f => Foldable1 (Alt f) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Alt f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Alt f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Alt f a -> m #

toNonEmpty :: Alt f a -> NonEmpty a #

maximum :: Ord a => Alt f a -> a #

minimum :: Ord a => Alt f a -> a #

head :: Alt f a -> a #

last :: Alt f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Alt f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Alt f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Alt f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Alt f a -> b #

Foldable1 f => Foldable1 (Rec1 f) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Rec1 f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Rec1 f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Rec1 f a -> m #

toNonEmpty :: Rec1 f a -> NonEmpty a #

maximum :: Ord a => Rec1 f a -> a #

minimum :: Ord a => Rec1 f a -> a #

head :: Rec1 f a -> a #

last :: Rec1 f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Rec1 f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Rec1 f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Rec1 f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Rec1 f a -> b #

Bifoldable1 p => Foldable1 (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

fold1 :: Semigroup m => Join p m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Join p a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Join p a -> m #

toNonEmpty :: Join p a -> NonEmpty a #

maximum :: Ord a => Join p a -> a #

minimum :: Ord a => Join p a -> a #

head :: Join p a -> a #

last :: Join p a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Join p a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Join p a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Join p a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Join p a -> b #

Foldable1 (Tagged b) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Tagged b m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Tagged b a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Tagged b a -> m #

toNonEmpty :: Tagged b a -> NonEmpty a #

maximum :: Ord a => Tagged b a -> a #

minimum :: Ord a => Tagged b a -> a #

head :: Tagged b a -> a #

last :: Tagged b a -> a #

foldrMap1 :: (a -> b0) -> (a -> b0 -> b0) -> Tagged b a -> b0 #

foldlMap1' :: (a -> b0) -> (b0 -> a -> b0) -> Tagged b a -> b0 #

foldlMap1 :: (a -> b0) -> (b0 -> a -> b0) -> Tagged b a -> b0 #

foldrMap1' :: (a -> b0) -> (a -> b0 -> b0) -> Tagged b a -> b0 #

Foldable1 f => Foldable1 (Backwards f) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Backwards f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Backwards f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Backwards f a -> m #

toNonEmpty :: Backwards f a -> NonEmpty a #

maximum :: Ord a => Backwards f a -> a #

minimum :: Ord a => Backwards f a -> a #

head :: Backwards f a -> a #

last :: Backwards f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Backwards f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Backwards f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Backwards f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Backwards f a -> b #

Foldable1 f => Foldable1 (IdentityT f) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => IdentityT f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> IdentityT f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> IdentityT f a -> m #

toNonEmpty :: IdentityT f a -> NonEmpty a #

maximum :: Ord a => IdentityT f a -> a #

minimum :: Ord a => IdentityT f a -> a #

head :: IdentityT f a -> a #

last :: IdentityT f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> IdentityT f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> IdentityT f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> IdentityT f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> IdentityT f a -> b #

Foldable1 f => Foldable1 (Reverse f) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Reverse f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Reverse f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Reverse f a -> m #

toNonEmpty :: Reverse f a -> NonEmpty a #

maximum :: Ord a => Reverse f a -> a #

minimum :: Ord a => Reverse f a -> a #

head :: Reverse f a -> a #

last :: Reverse f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Reverse f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Reverse f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Reverse f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Reverse f a -> b #

(Foldable1 f, Foldable1 g) => Foldable1 (Product f g)

It would be enough for either half of a product to be Foldable1. Other could be Foldable.

Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Product f g m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Product f g a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Product f g a -> m #

toNonEmpty :: Product f g a -> NonEmpty a #

maximum :: Ord a => Product f g a -> a #

minimum :: Ord a => Product f g a -> a #

head :: Product f g a -> a #

last :: Product f g a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Product f g a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Product f g a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Product f g a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Product f g a -> b #

(Foldable1 f, Foldable1 g) => Foldable1 (Sum f g) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Sum f g m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Sum f g a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Sum f g a -> m #

toNonEmpty :: Sum f g a -> NonEmpty a #

maximum :: Ord a => Sum f g a -> a #

minimum :: Ord a => Sum f g a -> a #

head :: Sum f g a -> a #

last :: Sum f g a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Sum f g a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Sum f g a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Sum f g a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Sum f g a -> b #

(Foldable1 f, Foldable1 g) => Foldable1 (f :*: g) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => (f :*: g) m -> m #

foldMap1 :: Semigroup m => (a -> m) -> (f :*: g) a -> m #

foldMap1' :: Semigroup m => (a -> m) -> (f :*: g) a -> m #

toNonEmpty :: (f :*: g) a -> NonEmpty a #

maximum :: Ord a => (f :*: g) a -> a #

minimum :: Ord a => (f :*: g) a -> a #

head :: (f :*: g) a -> a #

last :: (f :*: g) a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> (f :*: g) a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> (f :*: g) a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> (f :*: g) a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> (f :*: g) a -> b #

(Foldable1 f, Foldable1 g) => Foldable1 (f :+: g) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => (f :+: g) m -> m #

foldMap1 :: Semigroup m => (a -> m) -> (f :+: g) a -> m #

foldMap1' :: Semigroup m => (a -> m) -> (f :+: g) a -> m #

toNonEmpty :: (f :+: g) a -> NonEmpty a #

maximum :: Ord a => (f :+: g) a -> a #

minimum :: Ord a => (f :+: g) a -> a #

head :: (f :+: g) a -> a #

last :: (f :+: g) a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> (f :+: g) a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> (f :+: g) a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> (f :+: g) a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> (f :+: g) a -> b #

(Foldable1 f, Foldable1 g) => Foldable1 (Compose f g) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => Compose f g m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Compose f g a -> m #

foldMap1' :: Semigroup m => (a -> m) -> Compose f g a -> m #

toNonEmpty :: Compose f g a -> NonEmpty a #

maximum :: Ord a => Compose f g a -> a #

minimum :: Ord a => Compose f g a -> a #

head :: Compose f g a -> a #

last :: Compose f g a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> Compose f g a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> Compose f g a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> Compose f g a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> Compose f g a -> b #

(Foldable1 f, Foldable1 g) => Foldable1 (f :.: g) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => (f :.: g) m -> m #

foldMap1 :: Semigroup m => (a -> m) -> (f :.: g) a -> m #

foldMap1' :: Semigroup m => (a -> m) -> (f :.: g) a -> m #

toNonEmpty :: (f :.: g) a -> NonEmpty a #

maximum :: Ord a => (f :.: g) a -> a #

minimum :: Ord a => (f :.: g) a -> a #

head :: (f :.: g) a -> a #

last :: (f :.: g) a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> (f :.: g) a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> (f :.: g) a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> (f :.: g) a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> (f :.: g) a -> b #

Foldable1 f => Foldable1 (M1 i c f) 
Instance details

Defined in Data.Foldable1

Methods

fold1 :: Semigroup m => M1 i c f m -> m #

foldMap1 :: Semigroup m => (a -> m) -> M1 i c f a -> m #

foldMap1' :: Semigroup m => (a -> m) -> M1 i c f a -> m #

toNonEmpty :: M1 i c f a -> NonEmpty a #

maximum :: Ord a => M1 i c f a -> a #

minimum :: Ord a => M1 i c f a -> a #

head :: M1 i c f a -> a #

last :: M1 i c f a -> a #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> M1 i c f a -> b #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> M1 i c f a -> b #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> M1 i c f a -> b #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> M1 i c f a -> b #

Foldable1 g => Foldable1 (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

fold1 :: Semigroup m => Joker g a m -> m #

foldMap1 :: Semigroup m => (a0 -> m) -> Joker g a a0 -> m #

foldMap1' :: Semigroup m => (a0 -> m) -> Joker g a a0 -> m #

toNonEmpty :: Joker g a a0 -> NonEmpty a0 #

maximum :: Ord a0 => Joker g a a0 -> a0 #

minimum :: Ord a0 => Joker g a a0 -> a0 #

head :: Joker g a a0 -> a0 #

last :: Joker g a a0 -> a0 #

foldrMap1 :: (a0 -> b) -> (a0 -> b -> b) -> Joker g a a0 -> b #

foldlMap1' :: (a0 -> b) -> (b -> a0 -> b) -> Joker g a a0 -> b #

foldlMap1 :: (a0 -> b) -> (b -> a0 -> b) -> Joker g a a0 -> b #

foldrMap1' :: (a0 -> b) -> (a0 -> b -> b) -> Joker g a a0 -> b #

class Bifoldable t => Bifoldable1 (t :: TYPE LiftedRep -> TYPE LiftedRep -> Type) where #

Minimal complete definition

bifoldMap1

Methods

bifold1 :: Semigroup m => t m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> t a b -> m #

Instances

Instances details
Bifoldable1 Either 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => Either m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Either a b -> m #

Bifoldable1 Arg 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => Arg m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Arg a b -> m #

Bifoldable1 (,) 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => (m, m) -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> (a, b) -> m #

Bifoldable1 (Const :: Type -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => Const m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Const a b -> m #

Bifoldable1 (Tagged :: TYPE LiftedRep -> Type -> Type) 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => Tagged m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Tagged a b -> m #

Bifoldable1 ((,,) x) 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => (x, m, m) -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> (x, a, b) -> m #

Bifoldable1 ((,,,) x y) 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => (x, y, m, m) -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> (x, y, a, b) -> m #

Foldable1 f => Bifoldable1 (Clown f :: TYPE LiftedRep -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

bifold1 :: Semigroup m => Clown f m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Clown f a b -> m #

Bifoldable1 p => Bifoldable1 (Flip p) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bifold1 :: Semigroup m => Flip p m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Flip p a b -> m #

Foldable1 g => Bifoldable1 (Joker g :: TYPE LiftedRep -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

bifold1 :: Semigroup m => Joker g m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Joker g a b -> m #

Bifoldable1 p => Bifoldable1 (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bifold1 :: Semigroup m => WrappedBifunctor p m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> WrappedBifunctor p a b -> m #

Bifoldable1 ((,,,,) x y z) 
Instance details

Defined in Data.Bifoldable1

Methods

bifold1 :: Semigroup m => (x, y, z, m, m) -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> (x, y, z, a, b) -> m #

(Bifoldable1 f, Bifoldable1 g) => Bifoldable1 (Product f g) 
Instance details

Defined in Data.Bifunctor.Product

Methods

bifold1 :: Semigroup m => Product f g m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Product f g a b -> m #

(Foldable1 f, Bifoldable1 p) => Bifoldable1 (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

bifold1 :: Semigroup m => Tannen f p m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Tannen f p a b -> m #

(Bifoldable1 p, Foldable1 f, Foldable1 g) => Bifoldable1 (Biff p f g) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

bifold1 :: Semigroup m => Biff p f g m m -> m #

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Biff p f g a b -> m #

generated' :: (Eq a, Cyclic a) => [a] #

Lazily generate all elements of a Cyclic group using its generator.

Note: Fuses, terminates if the underlying group is finite.

generated :: Cyclic a => [a] #

Generate all elements of a Cyclic group using its generator.

Note: Fuses, does not terminate even for finite groups.

class Monoid m => Group m where #

A Group is a Monoid plus a function, invert, such that:

a <> invert a == mempty
invert a <> a == mempty

Minimal complete definition

invert

Methods

invert :: m -> m #

(~~) :: m -> m -> m infixl 7 #

Group subtraction: x ~~ y == x <> invert y

pow :: Integral x => m -> x -> m #

pow a n == a <> a <> ... <> a
 (n lots of a)

If n is negative, the result is inverted.

Instances

Instances details
Group () 
Instance details

Defined in Data.Group

Methods

invert :: () -> () #

(~~) :: () -> () -> () #

pow :: Integral x => () -> x -> () #

Group a => Group (Identity a)

Identity lifts groups pointwise (at only one point).

Instance details

Defined in Data.Group

Methods

invert :: Identity a -> Identity a #

(~~) :: Identity a -> Identity a -> Identity a #

pow :: Integral x => Identity a -> x -> Identity a #

Group a => Group (Down a) 
Instance details

Defined in Data.Group

Methods

invert :: Down a -> Down a #

(~~) :: Down a -> Down a -> Down a #

pow :: Integral x => Down a -> x -> Down a #

Group a => Group (Dual a) 
Instance details

Defined in Data.Group

Methods

invert :: Dual a -> Dual a #

(~~) :: Dual a -> Dual a -> Dual a #

pow :: Integral x => Dual a -> x -> Dual a #

Fractional a => Group (Product a) 
Instance details

Defined in Data.Group

Methods

invert :: Product a -> Product a #

(~~) :: Product a -> Product a -> Product a #

pow :: Integral x => Product a -> x -> Product a #

Num a => Group (Sum a) 
Instance details

Defined in Data.Group

Methods

invert :: Sum a -> Sum a #

(~~) :: Sum a -> Sum a -> Sum a #

pow :: Integral x => Sum a -> x -> Sum a #

Group a => Group (Op a b) 
Instance details

Defined in Data.Group

Methods

invert :: Op a b -> Op a b #

(~~) :: Op a b -> Op a b -> Op a b #

pow :: Integral x => Op a b -> x -> Op a b #

Group (Proxy x)

Trivial group, Functor style.

Instance details

Defined in Data.Group

Methods

invert :: Proxy x -> Proxy x #

(~~) :: Proxy x -> Proxy x -> Proxy x #

pow :: Integral x0 => Proxy x -> x0 -> Proxy x #

Group b => Group (a -> b) 
Instance details

Defined in Data.Group

Methods

invert :: (a -> b) -> a -> b #

(~~) :: (a -> b) -> (a -> b) -> a -> b #

pow :: Integral x => (a -> b) -> x -> a -> b #

(Group a, Group b) => Group (a, b) 
Instance details

Defined in Data.Group

Methods

invert :: (a, b) -> (a, b) #

(~~) :: (a, b) -> (a, b) -> (a, b) #

pow :: Integral x => (a, b) -> x -> (a, b) #

Group a => Group (Const a x)

Const lifts groups into a functor.

Instance details

Defined in Data.Group

Methods

invert :: Const a x -> Const a x #

(~~) :: Const a x -> Const a x -> Const a x #

pow :: Integral x0 => Const a x -> x0 -> Const a x #

(Group a, Group b, Group c) => Group (a, b, c) 
Instance details

Defined in Data.Group

Methods

invert :: (a, b, c) -> (a, b, c) #

(~~) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

pow :: Integral x => (a, b, c) -> x -> (a, b, c) #

(Group (f a), Group (g a)) => Group ((f :*: g) a)

Product of groups, Functor style.

Instance details

Defined in Data.Group

Methods

invert :: (f :*: g) a -> (f :*: g) a #

(~~) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

pow :: Integral x => (f :*: g) a -> x -> (f :*: g) a #

(Group a, Group b, Group c, Group d) => Group (a, b, c, d) 
Instance details

Defined in Data.Group

Methods

invert :: (a, b, c, d) -> (a, b, c, d) #

(~~) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

pow :: Integral x => (a, b, c, d) -> x -> (a, b, c, d) #

Group (f (g a)) => Group ((f :.: g) a) 
Instance details

Defined in Data.Group

Methods

invert :: (f :.: g) a -> (f :.: g) a #

(~~) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a #

pow :: Integral x => (f :.: g) a -> x -> (f :.: g) a #

(Group a, Group b, Group c, Group d, Group e) => Group (a, b, c, d, e) 
Instance details

Defined in Data.Group

Methods

invert :: (a, b, c, d, e) -> (a, b, c, d, e) #

(~~) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

pow :: Integral x => (a, b, c, d, e) -> x -> (a, b, c, d, e) #

class Group g => Abelian g #

An Abelian group is a Group that follows the rule:

a <> b == b <> a

Instances

Instances details
Abelian () 
Instance details

Defined in Data.Group

Abelian a => Abelian (Identity a) 
Instance details

Defined in Data.Group

Abelian a => Abelian (Down a) 
Instance details

Defined in Data.Group

Abelian a => Abelian (Dual a) 
Instance details

Defined in Data.Group

Fractional a => Abelian (Product a) 
Instance details

Defined in Data.Group

Num a => Abelian (Sum a) 
Instance details

Defined in Data.Group

Abelian a => Abelian (Op a b) 
Instance details

Defined in Data.Group

Abelian (Proxy x) 
Instance details

Defined in Data.Group

Abelian b => Abelian (a -> b) 
Instance details

Defined in Data.Group

(Abelian a, Abelian b) => Abelian (a, b) 
Instance details

Defined in Data.Group

Abelian a => Abelian (Const a x) 
Instance details

Defined in Data.Group

(Abelian a, Abelian b, Abelian c) => Abelian (a, b, c) 
Instance details

Defined in Data.Group

(Abelian (f a), Abelian (g a)) => Abelian ((f :*: g) a) 
Instance details

Defined in Data.Group

(Abelian a, Abelian b, Abelian c, Abelian d) => Abelian (a, b, c, d) 
Instance details

Defined in Data.Group

Abelian (f (g a)) => Abelian ((f :.: g) a) 
Instance details

Defined in Data.Group

(Abelian a, Abelian b, Abelian c, Abelian d, Abelian e) => Abelian (a, b, c, d, e) 
Instance details

Defined in Data.Group

class Group a => Cyclic a where #

A Group G is Cyclic if there exists an element x of G such that for all y in G, there exists an n, such that

y = pow x n

Methods

generator :: a #

The generator of the Cyclic group.

Instances

Instances details
Cyclic () 
Instance details

Defined in Data.Group

Methods

generator :: () #

Cyclic a => Cyclic (Identity a) 
Instance details

Defined in Data.Group

Methods

generator :: Identity a #

Cyclic a => Cyclic (Down a) 
Instance details

Defined in Data.Group

Methods

generator :: Down a #

Integral a => Cyclic (Sum a) 
Instance details

Defined in Data.Group

Methods

generator :: Sum a #

Cyclic (Proxy x) 
Instance details

Defined in Data.Group

Methods

generator :: Proxy x #

Cyclic a => Cyclic (Const a x) 
Instance details

Defined in Data.Group

Methods

generator :: Const a x #

traverseHashed :: (Hashable b, Functor f) => (a -> f b) -> Hashed a -> f (Hashed b) #

mapHashed :: Hashable b => (a -> b) -> Hashed a -> Hashed b #

Hashed cannot be Functor

hashedHash :: Hashed a -> Int #

hash has Eq requirement.

Since: hashable-1.4.0.0

unhashed :: Hashed a -> a #

Unwrap hashed value.

hashed :: Hashable a => a -> Hashed a #

Wrap a hashable value, caching the hash function result.

hashByteArray #

Arguments

:: ByteArray#

data to hash

-> Int

offset, in bytes

-> Int

length, in bytes

-> Int

hash value

Compute a hash value for the content of this ByteArray#, beginning at the specified offset, using specified number of bytes.

hashPtr #

Arguments

:: Ptr a

pointer to the data to hash

-> Int

length, in bytes

-> IO Int

hash value

Compute a hash value for the content of this pointer.

hashUsing #

Arguments

:: Hashable b 
=> (a -> b)

Transformation function.

-> Int

Salt.

-> a

Value to transform.

-> Int 

Transform a value into a Hashable value, then hash the transformed value using the given salt.

This is a useful shorthand in cases where a type can easily be mapped to another type that is already an instance of Hashable. Example:

data Foo = Foo | Bar
         deriving (Enum)

instance Hashable Foo where
    hashWithSalt = hashUsing fromEnum

Since: hashable-1.2.0.0

defaultHash :: Hashable a => a -> Int #

Default implementation of hash based on hashWithSalt.

Since: hashable-1.4.3.0

defaultHashWithSalt :: Hashable a => Int -> a -> Int #

Since we support a generic implementation of hashWithSalt we cannot also provide a default implementation for that method for the non-generic instance use case. Instead we provide defaultHashWith.

Since: hashable-1.4.3.0

class Eq a => Hashable a where #

The class of types that can be converted to a hash value.

Minimal implementation: hashWithSalt.

Note: the hash is not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.

If you are looking for Hashable instance in time package, check time-compat

Minimal complete definition

Nothing

Methods

hashWithSalt :: Int -> a -> Int infixl 0 #

Return a hash value for the argument, using the given salt.

The general contract of hashWithSalt is:

  • If two values are equal according to the == method, then applying the hashWithSalt method on each of the two values must produce the same integer result if the same salt is used in each case.
  • It is not required that if two values are unequal according to the == method, then applying the hashWithSalt method on each of the two values must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal values may improve the performance of hashing-based data structures.
  • This method can be used to compute different hash values for the same input by providing a different salt in each application of the method. This implies that any instance that defines hashWithSalt must make use of the salt in its implementation.
  • hashWithSalt may return negative Int values.

hash :: a -> Int #

Like hashWithSalt, but no salt is used. The default implementation uses hashWithSalt with some default salt. Instances might want to implement this method to provide a more efficient implementation than the default implementation.

Instances

Instances details
Hashable SomeTypeRep 
Instance details

Defined in Data.Hashable.Class

Hashable Unique 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Unique -> Int #

hash :: Unique -> Int #

Hashable Version 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Version -> Int #

hash :: Version -> Int #

Hashable Void 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Void -> Int #

hash :: Void -> Int #

Hashable IntPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntPtr -> Int #

hash :: IntPtr -> Int #

Hashable WordPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> WordPtr -> Int #

hash :: WordPtr -> Int #

Hashable ThreadId 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> ThreadId -> Int #

hash :: ThreadId -> Int #

Hashable Fingerprint

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Hashable Int16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int16 -> Int #

hash :: Int16 -> Int #

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int #

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int #

hash :: Int64 -> Int #

Hashable Int8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int8 -> Int #

hash :: Int8 -> Int #

Hashable Word16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word16 -> Int #

hash :: Word16 -> Int #

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int #

hash :: Word32 -> Int #

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int #

hash :: Word64 -> Int #

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int #

hash :: Word8 -> Int #

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Hashable ShortByteString 
Instance details

Defined in Data.Hashable.Class

Hashable IntSet

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntSet -> Int #

hash :: IntSet -> Int #

Hashable ByteArray

This instance was available since 1.4.1.0 only for GHC-9.4+

Since: hashable-1.4.2.0

Instance details

Defined in Data.Hashable.Class

Hashable BigNat 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> BigNat -> Int #

hash :: BigNat -> Int #

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ordering -> Int #

hash :: Ordering -> Int #

Hashable Scientific

A hash can be safely calculated from a Scientific. No magnitude 10^e is calculated so there's no risk of a blowup in space or time when hashing scientific numbers coming from untrusted sources.

>>> import Data.Hashable (hash)
>>> let x = scientific 1 2
>>> let y = scientific 100 0
>>> (x == y, hash x == hash y)
(True,True)
Instance details

Defined in Data.Scientific

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

Hashable UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

hashWithSalt :: Int -> UUID -> Int #

hash :: UUID -> Int #

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int #

hash :: Integer -> Int #

Hashable Natural 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Natural -> Int #

hash :: Natural -> Int #

Hashable () 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> () -> Int #

hash :: () -> Int #

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int #

hash :: Bool -> Int #

Hashable Char 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Char -> Int #

hash :: Char -> Int #

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

Methods

hashWithSalt :: Int -> Double -> Int #

hash :: Double -> Int #

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

Methods

hashWithSalt :: Int -> Float -> Int #

hash :: Float -> Int #

Hashable Int 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int -> Int #

hash :: Int -> Int #

Hashable Word 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word -> Int #

hash :: Word -> Int #

Hashable a => Hashable (Complex a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Complex a -> Int #

hash :: Complex a -> Int #

Hashable a => Hashable (Identity a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Identity a -> Int #

hash :: Identity a -> Int #

Hashable a => Hashable (First a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> First a -> Int #

hash :: First a -> Int #

Hashable a => Hashable (Last a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Last a -> Int #

hash :: Last a -> Int #

Hashable a => Hashable (Max a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Max a -> Int #

hash :: Max a -> Int #

Hashable a => Hashable (Min a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Min a -> Int #

hash :: Min a -> Int #

Hashable a => Hashable (WrappedMonoid a) 
Instance details

Defined in Data.Hashable.Class

Hashable (FunPtr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> FunPtr a -> Int #

hash :: FunPtr a -> Int #

Hashable (Ptr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ptr a -> Int #

hash :: Ptr a -> Int #

Hashable a => Hashable (Ratio a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ratio a -> Int #

hash :: Ratio a -> Int #

Hashable (StableName a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> StableName a -> Int #

hash :: StableName a -> Int #

Hashable v => Hashable (IntMap v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntMap v -> Int #

hash :: IntMap v -> Int #

Hashable v => Hashable (Seq v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Seq v -> Int #

hash :: Seq v -> Int #

Hashable v => Hashable (Set v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Set v -> Int #

hash :: Set v -> Int #

Hashable v => Hashable (Tree v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Tree v -> Int #

hash :: Tree v -> Int #

Eq a => Hashable (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Hashed a -> Int #

hash :: Hashed a -> Int #

Hashable a => Hashable (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

hashWithSalt :: Int -> HashSet a -> Int #

hash :: HashSet a -> Int #

Hashable a => Hashable (NonEmpty a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> NonEmpty a -> Int #

hash :: NonEmpty a -> Int #

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int #

Hashable a => Hashable (a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a) -> Int #

hash :: (a) -> Int #

Hashable a => Hashable [a] 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> [a] -> Int #

hash :: [a] -> Int #

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int #

Hashable (Fixed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Fixed a -> Int #

hash :: Fixed a -> Int #

Hashable (Proxy a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Proxy a -> Int #

hash :: Proxy a -> Int #

Hashable a => Hashable (Arg a b)

Note: Prior to hashable-1.3.0.0 the hash computation included the second argument of Arg which wasn't consistent with its Eq instance.

Since: hashable-1.3.0.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Arg a b -> Int #

hash :: Arg a b -> Int #

Hashable (TypeRep a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> TypeRep a -> Int #

hash :: TypeRep a -> Int #

(Hashable k, Hashable v) => Hashable (Map k v)

Since: hashable-1.3.4.0

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Map k v -> Int #

hash :: Map k v -> Int #

(Hashable k, Hashable v) => Hashable (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

hashWithSalt :: Int -> HashMap k v -> Int #

hash :: HashMap k v -> Int #

(Hashable a1, Hashable a2) => Hashable (a1, a2) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2) -> Int #

hash :: (a1, a2) -> Int #

Hashable a => Hashable (Const a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Const a b -> Int #

hash :: Const a b -> Int #

(Hashable a1, Hashable a2, Hashable a3) => Hashable (a1, a2, a3) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3) -> Int #

hash :: (a1, a2, a3) -> Int #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Product f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Product f g a -> Int #

hash :: Product f g a -> Int #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Sum f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Sum f g a -> Int #

hash :: Sum f g a -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4) => Hashable (a1, a2, a3, a4) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4) -> Int #

hash :: (a1, a2, a3, a4) -> Int #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a)

In general, hash (Compose x) ≠ hash x. However, hashWithSalt satisfies its variant of this equivalence.

Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Compose f g a -> Int #

hash :: Compose f g a -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5) => Hashable (a1, a2, a3, a4, a5) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5) -> Int #

hash :: (a1, a2, a3, a4, a5) -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable (a1, a2, a3, a4, a5, a6) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6) -> Int #

hash :: (a1, a2, a3, a4, a5, a6) -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6, Hashable a7) => Hashable (a1, a2, a3, a4, a5, a6, a7) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6, a7) -> Int #

hash :: (a1, a2, a3, a4, a5, a6, a7) -> Int #

data Hashed a #

A hashable value along with the result of the hash function.

Instances

Instances details
Foldable Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

fold :: Monoid m => Hashed m -> m #

foldMap :: Monoid m => (a -> m) -> Hashed a -> m #

foldMap' :: Monoid m => (a -> m) -> Hashed a -> m #

foldr :: (a -> b -> b) -> b -> Hashed a -> b #

foldr' :: (a -> b -> b) -> b -> Hashed a -> b #

foldl :: (b -> a -> b) -> b -> Hashed a -> b #

foldl' :: (b -> a -> b) -> b -> Hashed a -> b #

foldr1 :: (a -> a -> a) -> Hashed a -> a #

foldl1 :: (a -> a -> a) -> Hashed a -> a #

toList :: Hashed a -> [a] #

null :: Hashed a -> Bool #

length :: Hashed a -> Int #

elem :: Eq a => a -> Hashed a -> Bool #

maximum :: Ord a => Hashed a -> a #

minimum :: Ord a => Hashed a -> a #

sum :: Num a => Hashed a -> a #

product :: Num a => Hashed a -> a #

Eq1 Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

liftEq :: (a -> b -> Bool) -> Hashed a -> Hashed b -> Bool #

Ord1 Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

liftCompare :: (a -> b -> Ordering) -> Hashed a -> Hashed b -> Ordering #

Show1 Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Hashed a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Hashed a] -> ShowS #

Hashable1 Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Hashed a -> Int #

(IsString a, Hashable a) => IsString (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

fromString :: String -> Hashed a #

Show a => Show (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

showsPrec :: Int -> Hashed a -> ShowS #

show :: Hashed a -> String #

showList :: [Hashed a] -> ShowS #

NFData a => NFData (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

rnf :: Hashed a -> () #

Eq a => Eq (Hashed a)

Uses precomputed hash to detect inequality faster

Instance details

Defined in Data.Hashable.Class

Methods

(==) :: Hashed a -> Hashed a -> Bool #

(/=) :: Hashed a -> Hashed a -> Bool #

Ord a => Ord (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

compare :: Hashed a -> Hashed a -> Ordering #

(<) :: Hashed a -> Hashed a -> Bool #

(<=) :: Hashed a -> Hashed a -> Bool #

(>) :: Hashed a -> Hashed a -> Bool #

(>=) :: Hashed a -> Hashed a -> Bool #

max :: Hashed a -> Hashed a -> Hashed a #

min :: Hashed a -> Hashed a -> Hashed a #

Eq a => Hashable (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Hashed a -> Int #

hash :: Hashed a -> Int #

hashByteArrayWithSalt #

Arguments

:: ByteArray#

data to hash

-> Int

offset, in bytes

-> Int

length, in bytes

-> Salt

salt

-> Salt

hash value

Compute a hash value for the content of this ByteArray#, using an initial salt.

This function can for example be used to hash non-contiguous segments of memory as if they were one contiguous segment, by using the output of one hash as the salt for the next.

hashPtrWithSalt #

Arguments

:: Ptr a

pointer to the data to hash

-> Int

length, in bytes

-> Salt

salt

-> IO Salt

hash value

Compute a hash value for the content of this pointer, using an initial salt.

This function can for example be used to hash non-contiguous segments of memory as if they were one contiguous segment, by using the output of one hash as the salt for the next.

class Profunctor (p :: Type -> Type -> Type) where #

Formally, the class Profunctor represents a profunctor from Hask -> Hask.

Intuitively it is a bifunctor where the first argument is contravariant and the second argument is covariant.

You can define a Profunctor by either defining dimap or by defining both lmap and rmap.

If you supply dimap, you should ensure that:

dimap id idid

If you supply lmap and rmap, ensure:

lmap idid
rmap idid

If you supply both, you should also ensure:

dimap f g ≡ lmap f . rmap g

These ensure by parametricity:

dimap (f . g) (h . i) ≡ dimap g h . dimap f i
lmap (f . g) ≡ lmap g . lmap f
rmap (f . g) ≡ rmap f . rmap g

Minimal complete definition

dimap | lmap, rmap

Methods

dimap :: (a -> b) -> (c -> d) -> p b c -> p a d #

Map over both arguments at the same time.

dimap f g ≡ lmap f . rmap g

lmap :: (a -> b) -> p b c -> p a c #

Map the first argument contravariantly.

lmap f ≡ dimap f id

rmap :: (b -> c) -> p a b -> p a c #

Map the second argument covariantly.

rmapdimap id

(#.) :: forall a b c q. Coercible c b => q b c -> p a b -> p a c infixr 9 #

Strictly map the second argument argument covariantly with a function that is assumed operationally to be a cast, such as a newtype constructor.

Note: This operation is explicitly unsafe since an implementation may choose to use unsafeCoerce to implement this combinator and it has no way to validate that your function meets the requirements.

If you implement this combinator with unsafeCoerce, then you are taking upon yourself the obligation that you don't use GADT-like tricks to distinguish values.

If you import Data.Profunctor.Unsafe you are taking upon yourself the obligation that you will only call this with a first argument that is operationally identity.

The semantics of this function with respect to bottoms should match the default definition:

(#.) ≡ \_ -> \p -> p `seq` rmap coerce p

(.#) :: forall a b c q. Coercible b a => p b c -> q a b -> p a c infixl 8 #

Strictly map the first argument argument contravariantly with a function that is assumed operationally to be a cast, such as a newtype constructor.

Note: This operation is explicitly unsafe since an implementation may choose to use unsafeCoerce to implement this combinator and it has no way to validate that your function meets the requirements.

If you implement this combinator with unsafeCoerce, then you are taking upon yourself the obligation that you don't use GADT-like tricks to distinguish values.

If you import Data.Profunctor.Unsafe you are taking upon yourself the obligation that you will only call this with a second argument that is operationally identity.

(.#) ≡ \p -> p `seq` \f -> lmap coerce p

Instances

Instances details
Monad m => Profunctor (Kleisli m) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Kleisli m b c -> Kleisli m a d #

lmap :: (a -> b) -> Kleisli m b c -> Kleisli m a c #

rmap :: (b -> c) -> Kleisli m a b -> Kleisli m a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Kleisli m a b -> Kleisli m a c #

(.#) :: forall a b c q. Coercible b a => Kleisli m b c -> q a b -> Kleisli m a c #

Profunctor (CopastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (a -> b) -> (c -> d) -> CopastroSum p b c -> CopastroSum p a d #

lmap :: (a -> b) -> CopastroSum p b c -> CopastroSum p a c #

rmap :: (b -> c) -> CopastroSum p a b -> CopastroSum p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> CopastroSum p a b -> CopastroSum p a c #

(.#) :: forall a b c q. Coercible b a => CopastroSum p b c -> q a b -> CopastroSum p a c #

Profunctor (CotambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (a -> b) -> (c -> d) -> CotambaraSum p b c -> CotambaraSum p a d #

lmap :: (a -> b) -> CotambaraSum p b c -> CotambaraSum p a c #

rmap :: (b -> c) -> CotambaraSum p a b -> CotambaraSum p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> CotambaraSum p a b -> CotambaraSum p a c #

(.#) :: forall a b c q. Coercible b a => CotambaraSum p b c -> q a b -> CotambaraSum p a c #

Profunctor (PastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (a -> b) -> (c -> d) -> PastroSum p b c -> PastroSum p a d #

lmap :: (a -> b) -> PastroSum p b c -> PastroSum p a c #

rmap :: (b -> c) -> PastroSum p a b -> PastroSum p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> PastroSum p a b -> PastroSum p a c #

(.#) :: forall a b c q. Coercible b a => PastroSum p b c -> q a b -> PastroSum p a c #

Profunctor p => Profunctor (TambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (a -> b) -> (c -> d) -> TambaraSum p b c -> TambaraSum p a d #

lmap :: (a -> b) -> TambaraSum p b c -> TambaraSum p a c #

rmap :: (b -> c) -> TambaraSum p a b -> TambaraSum p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> TambaraSum p a b -> TambaraSum p a c #

(.#) :: forall a b c q. Coercible b a => TambaraSum p b c -> q a b -> TambaraSum p a c #

Profunctor p => Profunctor (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

dimap :: (a -> b) -> (c -> d) -> Closure p b c -> Closure p a d #

lmap :: (a -> b) -> Closure p b c -> Closure p a c #

rmap :: (b -> c) -> Closure p a b -> Closure p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Closure p a b -> Closure p a c #

(.#) :: forall a b c q. Coercible b a => Closure p b c -> q a b -> Closure p a c #

Profunctor (Environment p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

dimap :: (a -> b) -> (c -> d) -> Environment p b c -> Environment p a d #

lmap :: (a -> b) -> Environment p b c -> Environment p a c #

rmap :: (b -> c) -> Environment p a b -> Environment p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Environment p a b -> Environment p a c #

(.#) :: forall a b c q. Coercible b a => Environment p b c -> q a b -> Environment p a c #

Profunctor p => Profunctor (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

dimap :: (a -> b) -> (c -> d) -> CofreeMapping p b c -> CofreeMapping p a d #

lmap :: (a -> b) -> CofreeMapping p b c -> CofreeMapping p a c #

rmap :: (b -> c) -> CofreeMapping p a b -> CofreeMapping p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> CofreeMapping p a b -> CofreeMapping p a c #

(.#) :: forall a b c q. Coercible b a => CofreeMapping p b c -> q a b -> CofreeMapping p a c #

Profunctor (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

dimap :: (a -> b) -> (c -> d) -> FreeMapping p b c -> FreeMapping p a d #

lmap :: (a -> b) -> FreeMapping p b c -> FreeMapping p a c #

rmap :: (b -> c) -> FreeMapping p a b -> FreeMapping p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> FreeMapping p a b -> FreeMapping p a c #

(.#) :: forall a b c q. Coercible b a => FreeMapping p b c -> q a b -> FreeMapping p a c #

Profunctor (Copastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (a -> b) -> (c -> d) -> Copastro p b c -> Copastro p a d #

lmap :: (a -> b) -> Copastro p b c -> Copastro p a c #

rmap :: (b -> c) -> Copastro p a b -> Copastro p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Copastro p a b -> Copastro p a c #

(.#) :: forall a b c q. Coercible b a => Copastro p b c -> q a b -> Copastro p a c #

Profunctor (Cotambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (a -> b) -> (c -> d) -> Cotambara p b c -> Cotambara p a d #

lmap :: (a -> b) -> Cotambara p b c -> Cotambara p a c #

rmap :: (b -> c) -> Cotambara p a b -> Cotambara p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Cotambara p a b -> Cotambara p a c #

(.#) :: forall a b c q. Coercible b a => Cotambara p b c -> q a b -> Cotambara p a c #

Profunctor (Pastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (a -> b) -> (c -> d) -> Pastro p b c -> Pastro p a d #

lmap :: (a -> b) -> Pastro p b c -> Pastro p a c #

rmap :: (b -> c) -> Pastro p a b -> Pastro p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Pastro p a b -> Pastro p a c #

(.#) :: forall a b c q. Coercible b a => Pastro p b c -> q a b -> Pastro p a c #

Profunctor p => Profunctor (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (a -> b) -> (c -> d) -> Tambara p b c -> Tambara p a d #

lmap :: (a -> b) -> Tambara p b c -> Tambara p a c #

rmap :: (b -> c) -> Tambara p a b -> Tambara p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Tambara p a b -> Tambara p a c #

(.#) :: forall a b c q. Coercible b a => Tambara p b c -> q a b -> Tambara p a c #

Profunctor (Baz t) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

dimap :: (a -> b) -> (c -> d) -> Baz t b c -> Baz t a d #

lmap :: (a -> b) -> Baz t b c -> Baz t a c #

rmap :: (b -> c) -> Baz t a b -> Baz t a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Baz t a b -> Baz t a c #

(.#) :: forall a b c q. Coercible b a => Baz t b c -> q a b -> Baz t a c #

Profunctor (Bazaar a) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

dimap :: (a0 -> b) -> (c -> d) -> Bazaar a b c -> Bazaar a a0 d #

lmap :: (a0 -> b) -> Bazaar a b c -> Bazaar a a0 c #

rmap :: (b -> c) -> Bazaar a a0 b -> Bazaar a a0 c #

(#.) :: forall a0 b c q. Coercible c b => q b c -> Bazaar a a0 b -> Bazaar a a0 c #

(.#) :: forall a0 b c q. Coercible b a0 => Bazaar a b c -> q a0 b -> Bazaar a a0 c #

Profunctor p => Profunctor (CofreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

dimap :: (a -> b) -> (c -> d) -> CofreeTraversing p b c -> CofreeTraversing p a d #

lmap :: (a -> b) -> CofreeTraversing p b c -> CofreeTraversing p a c #

rmap :: (b -> c) -> CofreeTraversing p a b -> CofreeTraversing p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> CofreeTraversing p a b -> CofreeTraversing p a c #

(.#) :: forall a b c q. Coercible b a => CofreeTraversing p b c -> q a b -> CofreeTraversing p a c #

Profunctor (FreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

dimap :: (a -> b) -> (c -> d) -> FreeTraversing p b c -> FreeTraversing p a d #

lmap :: (a -> b) -> FreeTraversing p b c -> FreeTraversing p a c #

rmap :: (b -> c) -> FreeTraversing p a b -> FreeTraversing p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> FreeTraversing p a b -> FreeTraversing p a c #

(.#) :: forall a b c q. Coercible b a => FreeTraversing p b c -> q a b -> FreeTraversing p a c #

Profunctor (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

dimap :: (a -> b) -> (c -> d) -> Coyoneda p b c -> Coyoneda p a d #

lmap :: (a -> b) -> Coyoneda p b c -> Coyoneda p a c #

rmap :: (b -> c) -> Coyoneda p a b -> Coyoneda p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Coyoneda p a b -> Coyoneda p a c #

(.#) :: forall a b c q. Coercible b a => Coyoneda p b c -> q a b -> Coyoneda p a c #

Profunctor (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

dimap :: (a -> b) -> (c -> d) -> Yoneda p b c -> Yoneda p a d #

lmap :: (a -> b) -> Yoneda p b c -> Yoneda p a c #

rmap :: (b -> c) -> Yoneda p a b -> Yoneda p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Yoneda p a b -> Yoneda p a c #

(.#) :: forall a b c q. Coercible b a => Yoneda p b c -> q a b -> Yoneda p a c #

Profunctor (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Tagged b c -> Tagged a d #

lmap :: (a -> b) -> Tagged b c -> Tagged a c #

rmap :: (b -> c) -> Tagged a b -> Tagged a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Tagged a b -> Tagged a c #

(.#) :: forall a b c q. Coercible b a => Tagged b c -> q a b -> Tagged a c #

Functor w => Profunctor (Cokleisli w) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Cokleisli w b c -> Cokleisli w a d #

lmap :: (a -> b) -> Cokleisli w b c -> Cokleisli w a c #

rmap :: (b -> c) -> Cokleisli w a b -> Cokleisli w a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Cokleisli w a b -> Cokleisli w a c #

(.#) :: forall a b c q. Coercible b a => Cokleisli w b c -> q a b -> Cokleisli w a c #

Functor f => Profunctor (Costar f) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (a -> b) -> (c -> d) -> Costar f b c -> Costar f a d #

lmap :: (a -> b) -> Costar f b c -> Costar f a c #

rmap :: (b -> c) -> Costar f a b -> Costar f a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Costar f a b -> Costar f a c #

(.#) :: forall a b c q. Coercible b a => Costar f b c -> q a b -> Costar f a c #

Profunctor (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (a -> b) -> (c -> d) -> Forget r b c -> Forget r a d #

lmap :: (a -> b) -> Forget r b c -> Forget r a c #

rmap :: (b -> c) -> Forget r a b -> Forget r a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Forget r a b -> Forget r a c #

(.#) :: forall a b c q. Coercible b a => Forget r b c -> q a b -> Forget r a c #

Functor f => Profunctor (Star f) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (a -> b) -> (c -> d) -> Star f b c -> Star f a d #

lmap :: (a -> b) -> Star f b c -> Star f a c #

rmap :: (b -> c) -> Star f a b -> Star f a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Star f a b -> Star f a c #

(.#) :: forall a b c q. Coercible b a => Star f b c -> q a b -> Star f a c #

Profunctor (->) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> (b -> c) -> a -> d #

lmap :: (a -> b) -> (b -> c) -> a -> c #

rmap :: (b -> c) -> (a -> b) -> a -> c #

(#.) :: forall a b c q. Coercible c b => q b c -> (a -> b) -> a -> c #

(.#) :: forall a b c q. Coercible b a => (b -> c) -> q a b -> a -> c #

Contravariant f => Profunctor (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Clown f b c -> Clown f a d #

lmap :: (a -> b) -> Clown f b c -> Clown f a c #

rmap :: (b -> c) -> Clown f a b -> Clown f a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Clown f a b -> Clown f a c #

(.#) :: forall a b c q. Coercible b a => Clown f b c -> q a b -> Clown f a c #

Functor f => Profunctor (Joker f :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Joker f b c -> Joker f a d #

lmap :: (a -> b) -> Joker f b c -> Joker f a c #

rmap :: (b -> c) -> Joker f a b -> Joker f a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Joker f a b -> Joker f a c #

(.#) :: forall a b c q. Coercible b a => Joker f b c -> q a b -> Joker f a c #

Profunctor p => Profunctor (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

dimap :: (a -> b) -> (c -> d) -> WrappedProfunctor p b c -> WrappedProfunctor p a d #

lmap :: (a -> b) -> WrappedProfunctor p b c -> WrappedProfunctor p a c #

rmap :: (b -> c) -> WrappedProfunctor p a b -> WrappedProfunctor p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> WrappedProfunctor p a b -> WrappedProfunctor p a c #

(.#) :: forall a b c q. Coercible b a => WrappedProfunctor p b c -> q a b -> WrappedProfunctor p a c #

Profunctor p => Profunctor (Codensity p) 
Instance details

Defined in Data.Profunctor.Ran

Methods

dimap :: (a -> b) -> (c -> d) -> Codensity p b c -> Codensity p a d #

lmap :: (a -> b) -> Codensity p b c -> Codensity p a c #

rmap :: (b -> c) -> Codensity p a b -> Codensity p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Codensity p a b -> Codensity p a c #

(.#) :: forall a b c q. Coercible b a => Codensity p b c -> q a b -> Codensity p a c #

Arrow p => Profunctor (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (a -> b) -> (c -> d) -> WrappedArrow p b c -> WrappedArrow p a d #

lmap :: (a -> b) -> WrappedArrow p b c -> WrappedArrow p a c #

rmap :: (b -> c) -> WrappedArrow p a b -> WrappedArrow p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> WrappedArrow p a b -> WrappedArrow p a c #

(.#) :: forall a b c q. Coercible b a => WrappedArrow p b c -> q a b -> WrappedArrow p a c #

(Profunctor p, Profunctor q) => Profunctor (Product p q) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Product p q b c -> Product p q a d #

lmap :: (a -> b) -> Product p q b c -> Product p q a c #

rmap :: (b -> c) -> Product p q a b -> Product p q a c #

(#.) :: forall a b c q0. Coercible c b => q0 b c -> Product p q a b -> Product p q a c #

(.#) :: forall a b c q0. Coercible b a => Product p q b c -> q0 a b -> Product p q a c #

(Profunctor p, Profunctor q) => Profunctor (Sum p q) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Sum p q b c -> Sum p q a d #

lmap :: (a -> b) -> Sum p q b c -> Sum p q a c #

rmap :: (b -> c) -> Sum p q a b -> Sum p q a c #

(#.) :: forall a b c q0. Coercible c b => q0 b c -> Sum p q a b -> Sum p q a c #

(.#) :: forall a b c q0. Coercible b a => Sum p q b c -> q0 a b -> Sum p q a c #

(Functor f, Profunctor p) => Profunctor (Tannen f p) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Tannen f p b c -> Tannen f p a d #

lmap :: (a -> b) -> Tannen f p b c -> Tannen f p a c #

rmap :: (b -> c) -> Tannen f p a b -> Tannen f p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Tannen f p a b -> Tannen f p a c #

(.#) :: forall a b c q. Coercible b a => Tannen f p b c -> q a b -> Tannen f p a c #

(Functor f, Profunctor p) => Profunctor (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

dimap :: (a -> b) -> (c -> d) -> Cayley f p b c -> Cayley f p a d #

lmap :: (a -> b) -> Cayley f p b c -> Cayley f p a c #

rmap :: (b -> c) -> Cayley f p a b -> Cayley f p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Cayley f p a b -> Cayley f p a c #

(.#) :: forall a b c q. Coercible b a => Cayley f p b c -> q a b -> Cayley f p a c #

(Profunctor p, Profunctor q) => Profunctor (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

dimap :: (a -> b) -> (c -> d) -> Procompose p q b c -> Procompose p q a d #

lmap :: (a -> b) -> Procompose p q b c -> Procompose p q a c #

rmap :: (b -> c) -> Procompose p q a b -> Procompose p q a c #

(#.) :: forall a b c q0. Coercible c b => q0 b c -> Procompose p q a b -> Procompose p q a c #

(.#) :: forall a b c q0. Coercible b a => Procompose p q b c -> q0 a b -> Procompose p q a c #

(Profunctor p, Profunctor q) => Profunctor (Rift p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

dimap :: (a -> b) -> (c -> d) -> Rift p q b c -> Rift p q a d #

lmap :: (a -> b) -> Rift p q b c -> Rift p q a c #

rmap :: (b -> c) -> Rift p q a b -> Rift p q a c #

(#.) :: forall a b c q0. Coercible c b => q0 b c -> Rift p q a b -> Rift p q a c #

(.#) :: forall a b c q0. Coercible b a => Rift p q b c -> q0 a b -> Rift p q a c #

(Profunctor p, Profunctor q) => Profunctor (Ran p q) 
Instance details

Defined in Data.Profunctor.Ran

Methods

dimap :: (a -> b) -> (c -> d) -> Ran p q b c -> Ran p q a d #

lmap :: (a -> b) -> Ran p q b c -> Ran p q a c #

rmap :: (b -> c) -> Ran p q a b -> Ran p q a c #

(#.) :: forall a b c q0. Coercible c b => q0 b c -> Ran p q a b -> Ran p q a c #

(.#) :: forall a b c q0. Coercible b a => Ran p q b c -> q0 a b -> Ran p q a c #

(Profunctor p, Functor f, Functor g) => Profunctor (Biff p f g) 
Instance details

Defined in Data.Profunctor.Unsafe

Methods

dimap :: (a -> b) -> (c -> d) -> Biff p f g b c -> Biff p f g a d #

lmap :: (a -> b) -> Biff p f g b c -> Biff p f g a c #

rmap :: (b -> c) -> Biff p f g a b -> Biff p f g a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Biff p f g a b -> Biff p f g a c #

(.#) :: forall a b c q. Coercible b a => Biff p f g b c -> q a b -> Biff p f g a c #

genericInvmap :: (Generic1 f, Invariant (Rep1 f)) => (a -> b) -> (b -> a) -> f a -> f b #

A generic implementation of invmap.

invmap2Profunctor :: Profunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d #

Every Profunctor is also an Invariant2 functor.

invmap2Bifunctor :: Bifunctor f => (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d #

Every Bifunctor is also an Invariant2 functor.

invmapArrow :: Arrow arr => (a -> b) -> (b -> a) -> arr a a -> arr b b #

An Arrow with the same input and output types can be seen as an Invariant functor.

invmapProfunctor :: Profunctor p => (a -> b) -> (b -> a) -> p a a -> p b b #

A Profunctor with the same input and output types can be seen as an Invariant functor.

invmapContravariant :: Contravariant f => (a -> b) -> (b -> a) -> f a -> f b #

Every Contravariant functor is also an Invariant functor.

invmapFunctor :: Functor f => (a -> b) -> (b -> a) -> f a -> f b #

Every Functor is also an Invariant functor.

class Invariant (f :: Type -> TYPE LiftedRep) where #

Any * -> * type parametric in the argument permits an instance of Invariant.

Instances should satisfy the following laws:

invmap id id = id
invmap f2 f2' . invmap f1 f1' = invmap (f2 . f1) (f1' . f2')

Minimal complete definition

Nothing

Methods

invmap :: (a -> b) -> (b -> a) -> f a -> f b #

Instances

Instances details
Invariant SettableStateVar

from the StateVar package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> SettableStateVar a -> SettableStateVar b #

Invariant StateVar

from the StateVar package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> StateVar a -> StateVar b #

Invariant ZipList

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ZipList a -> ZipList b #

Invariant Handler

from Control.Exception

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Handler a -> Handler b #

Invariant Complex

from Data.Complex

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Complex a -> Complex b #

Invariant Comparison

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Comparison a -> Comparison b #

Invariant Equivalence

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Equivalence a -> Equivalence b #

Invariant Predicate

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Predicate a -> Predicate b #

Invariant Identity

from Data.Functor.Identity

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Identity a -> Identity b #

Invariant First

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> First a -> First b #

Invariant Last

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Last a -> Last b #

Invariant First

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> First a -> First b #

Invariant Last

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Last a -> Last b #

Invariant Max

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Max a -> Max b #

Invariant Min

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Min a -> Min b #

Invariant Dual

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Dual a -> Dual b #

Invariant Endo

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Endo a -> Endo b #

Invariant Product

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Product a -> Product b #

Invariant Sum

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Sum a -> Sum b #

Invariant STM

from the stm package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> STM a -> STM b #

Invariant Par1

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Par1 a -> Par1 b #

Invariant ArgDescr

from System.Console.GetOpt

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ArgDescr a -> ArgDescr b #

Invariant ArgOrder

from System.Console.GetOpt

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ArgOrder a -> ArgOrder b #

Invariant OptDescr

from System.Console.GetOpt

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> OptDescr a -> OptDescr b #

Invariant ReadP 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ReadP a -> ReadP b #

Invariant ReadPrec 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ReadPrec a -> ReadPrec b #

Invariant IntMap

from the containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> IntMap a -> IntMap b #

Invariant Seq

from the containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Seq a -> Seq b #

Invariant ViewL

from the containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ViewL a -> ViewL b #

Invariant ViewR

from the containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ViewR a -> ViewR b #

Invariant Tree

from the containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Tree a -> Tree b #

Invariant IO 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> IO a -> IO b #

Invariant NonEmpty

from Data.List.NonEmpty

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> NonEmpty a -> NonEmpty b #

Invariant Maybe 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Maybe a -> Maybe b #

Invariant [] 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> [a] -> [b] #

Monad m => Invariant (WrappedMonad m)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedMonad m a -> WrappedMonad m b #

Arrow a => Invariant (ArrowMonad a)

from Control.Arrow

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> ArrowMonad a a0 -> ArrowMonad a b #

Invariant (ST s) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ST s a -> ST s b #

Invariant (Either a) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Either a a0 -> Either a b #

Invariant (Op a)

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Op a a0 -> Op a b #

Invariant (Proxy :: Type -> Type)

from Data.Proxy

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Proxy a -> Proxy b #

Invariant (Arg a)

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Arg a a0 -> Arg a b #

Invariant (Array i)

from the array package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Array i a -> Array i b #

Invariant (U1 :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> U1 a -> U1 b #

Invariant (UAddr :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UAddr a -> UAddr b #

Invariant (UChar :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UChar a -> UChar b #

Invariant (UDouble :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UDouble a -> UDouble b #

Invariant (UFloat :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UFloat a -> UFloat b #

Invariant (UInt :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UInt a -> UInt b #

Invariant (UWord :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> UWord a -> UWord b #

Invariant (V1 :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> V1 a -> V1 b #

Invariant (ST s) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ST s a -> ST s b #

Invariant (Map k)

from the containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Map k a -> Map k b #

Invariant f => Invariant (Lift f)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Lift f a -> Lift f b #

Invariant m => Invariant (ListT m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ListT m a -> ListT m b #

Invariant m => Invariant (MaybeT m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> MaybeT m a -> MaybeT m b #

Invariant (HashMap k)

from the unordered-containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> HashMap k a -> HashMap k b #

Invariant ((,) a) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> (a, a0) -> (a, b) #

Arrow arr => Invariant (WrappedArrow arr a)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> WrappedArrow arr a a0 -> WrappedArrow arr a b #

Invariant m => Invariant (Kleisli m a)

from Control.Arrow

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Kleisli m a a0 -> Kleisli m a b #

Invariant (Const a :: Type -> Type)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Const a a0 -> Const a b #

Invariant f => Invariant (Alt f)

from Data.Monoid

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Alt f a -> Alt f b #

Invariant f => Invariant (Rec1 f)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Rec1 f a -> Rec1 f b #

Invariant2 p => Invariant (Fix p)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Fix p a -> Fix p b #

Invariant2 p => Invariant (Join p)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Join p a -> Join p b #

(Invariant f, Invariant g) => Invariant (Compose f g)

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Compose f g a -> Compose f g b #

(Invariant f, Invariant g) => Invariant (ComposeCF f g)

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ComposeCF f g a -> ComposeCF f g b #

(Invariant f, Invariant g) => Invariant (ComposeFC f g)

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ComposeFC f g a -> ComposeFC f g b #

Arrow c => Invariant (InvariantArrow c) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> InvariantArrow c a -> InvariantArrow c b #

Profunctor p => Invariant (InvariantProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> InvariantProfunctor p a -> InvariantProfunctor p b #

Contravariant f => Invariant (WrappedContravariant f) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedContravariant f a -> WrappedContravariant f b #

Functor f => Invariant (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedFunctor f a -> WrappedFunctor f b #

Invariant (CopastroSum p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> CopastroSum p a a0 -> CopastroSum p a b #

Invariant (CotambaraSum p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> CotambaraSum p a a0 -> CotambaraSum p a b #

Invariant (PastroSum p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> PastroSum p a a0 -> PastroSum p a b #

Invariant2 p => Invariant (TambaraSum p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> TambaraSum p a a0 -> TambaraSum p a b #

Invariant2 p => Invariant (Closure p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Closure p a a0 -> Closure p a b #

Invariant (Environment p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Environment p a a0 -> Environment p a b #

Invariant (FreeMapping p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> FreeMapping p a a0 -> FreeMapping p a b #

Invariant2 p => Invariant (Coprep p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Coprep p a -> Coprep p b #

Invariant2 p => Invariant (Prep p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Prep p a -> Prep p b #

Invariant (Copastro p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Copastro p a a0 -> Copastro p a b #

Invariant (Cotambara p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Cotambara p a a0 -> Cotambara p a b #

Invariant (Pastro p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Pastro p a a0 -> Pastro p a b #

Invariant2 p => Invariant (Tambara p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Tambara p a a0 -> Tambara p a b #

Invariant (FreeTraversing p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> FreeTraversing p a a0 -> FreeTraversing p a b #

Invariant (Coyoneda p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Coyoneda p a a0 -> Coyoneda p a b #

Invariant (Yoneda p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Yoneda p a a0 -> Yoneda p a b #

Invariant (Tagged s)

from the tagged package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Tagged s a -> Tagged s b #

Invariant f => Invariant (Backwards f)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Backwards f a -> Backwards f b #

Invariant m => Invariant (ErrorT e m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ErrorT e m a -> ErrorT e m b #

Invariant m => Invariant (ExceptT e m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ExceptT e m a -> ExceptT e m b #

Invariant m => Invariant (IdentityT m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> IdentityT m a -> IdentityT m b #

Invariant m => Invariant (ReaderT r m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ReaderT r m a -> ReaderT r m b #

Invariant m => Invariant (StateT s m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> StateT s m a -> StateT s m b #

Invariant m => Invariant (StateT s m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> StateT s m a -> StateT s m b #

Invariant m => Invariant (WriterT w m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> WriterT w m a -> WriterT w m b #

Invariant m => Invariant (WriterT w m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> WriterT w m a -> WriterT w m b #

Invariant (Constant a :: Type -> Type)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Constant a a0 -> Constant a b #

Invariant f => Invariant (Reverse f)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Reverse f a -> Reverse f b #

Invariant ((,,) a b) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b0) -> (b0 -> a0) -> (a, b, a0) -> (a, b, b0) #

(Invariant f, Invariant g) => Invariant (Product f g)

from Data.Functor.Product

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Product f g a -> Product f g b #

(Invariant f, Invariant g) => Invariant (Sum f g)

from Data.Functor.Sum

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Sum f g a -> Sum f g b #

(Invariant l, Invariant r) => Invariant (l :*: r)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> (l :*: r) a -> (l :*: r) b #

(Invariant l, Invariant r) => Invariant (l :+: r)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> (l :+: r) a -> (l :+: r) b #

Invariant (K1 i c :: Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> K1 i c a -> K1 i c b #

Invariant (Cokleisli w a)

from the comonad package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Cokleisli w a a0 -> Cokleisli w a b #

Invariant (Costar f a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Costar f a a0 -> Costar f a b #

Invariant (Forget r a :: Type -> TYPE LiftedRep)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Forget r a a0 -> Forget r a b #

Invariant f => Invariant (Star f a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Star f a a0 -> Star f a b #

Invariant (ContT r m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ContT r m a -> ContT r m b #

Invariant ((,,,) a b c) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b0) -> (b0 -> a0) -> (a, b, c, a0) -> (a, b, c, b0) #

Invariant ((->) a) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> (a -> a0) -> a -> b #

(Invariant f, Invariant g) => Invariant (Compose f g)

from Data.Functor.Compose

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Compose f g a -> Compose f g b #

(Invariant f, Invariant g) => Invariant (f :.: g)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> (f :.: g) a -> (f :.: g) b #

Invariant f => Invariant (M1 i t f)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> M1 i t f a -> M1 i t f b #

Invariant (Clown f a :: Type -> Type)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Clown f a a0 -> Clown f a b #

Invariant2 p => Invariant (Flip p a)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Flip p a a0 -> Flip p a b #

Invariant g => Invariant (Joker g a)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Joker g a a0 -> Joker g a b #

Bifunctor p => Invariant (WrappedBifunctor p a)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b #

Profunctor p => Invariant (WrappedProfunctor p a) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> WrappedProfunctor p a a0 -> WrappedProfunctor p a b #

Invariant2 p => Invariant (Codensity p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Codensity p a a0 -> Codensity p a b #

Arrow arr => Invariant (WrappedArrow arr a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> WrappedArrow arr a a0 -> WrappedArrow arr a b #

Invariant m => Invariant (RWST r w s m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> RWST r w s m a -> RWST r w s m b #

Invariant m => Invariant (RWST r w s m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> RWST r w s m a -> RWST r w s m b #

Invariant ((,,,,) a b c d) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b0) -> (b0 -> a0) -> (a, b, c, d, a0) -> (a, b, c, d, b0) #

(Invariant f, Invariant2 p) => Invariant (Tannen f p a)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Tannen f p a a0 -> Tannen f p a b #

Invariant2 p => Invariant (Procompose p q a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Procompose p q a a0 -> Procompose p q a b #

Invariant2 p => Invariant (Rift p q a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Rift p q a a0 -> Rift p q a b #

Invariant2 q => Invariant (Ran p q a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Ran p q a a0 -> Ran p q a b #

(Invariant2 p, Invariant g) => Invariant (Biff p f g a)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Biff p f g a a0 -> Biff p f g a b #

newtype WrappedFunctor (f :: k -> Type) (a :: k) #

Wrap a Functor to be used as a member of Invariant.

Constructors

WrapFunctor 

Fields

Instances

Instances details
Foldable f => Foldable (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

fold :: Monoid m => WrappedFunctor f m -> m #

foldMap :: Monoid m => (a -> m) -> WrappedFunctor f a -> m #

foldMap' :: Monoid m => (a -> m) -> WrappedFunctor f a -> m #

foldr :: (a -> b -> b) -> b -> WrappedFunctor f a -> b #

foldr' :: (a -> b -> b) -> b -> WrappedFunctor f a -> b #

foldl :: (b -> a -> b) -> b -> WrappedFunctor f a -> b #

foldl' :: (b -> a -> b) -> b -> WrappedFunctor f a -> b #

foldr1 :: (a -> a -> a) -> WrappedFunctor f a -> a #

foldl1 :: (a -> a -> a) -> WrappedFunctor f a -> a #

toList :: WrappedFunctor f a -> [a] #

null :: WrappedFunctor f a -> Bool #

length :: WrappedFunctor f a -> Int #

elem :: Eq a => a -> WrappedFunctor f a -> Bool #

maximum :: Ord a => WrappedFunctor f a -> a #

minimum :: Ord a => WrappedFunctor f a -> a #

sum :: Num a => WrappedFunctor f a -> a #

product :: Num a => WrappedFunctor f a -> a #

Traversable f => Traversable (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

traverse :: Applicative f0 => (a -> f0 b) -> WrappedFunctor f a -> f0 (WrappedFunctor f b) #

sequenceA :: Applicative f0 => WrappedFunctor f (f0 a) -> f0 (WrappedFunctor f a) #

mapM :: Monad m => (a -> m b) -> WrappedFunctor f a -> m (WrappedFunctor f b) #

sequence :: Monad m => WrappedFunctor f (m a) -> m (WrappedFunctor f a) #

Alternative f => Alternative (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Applicative f => Applicative (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

pure :: a -> WrappedFunctor f a #

(<*>) :: WrappedFunctor f (a -> b) -> WrappedFunctor f a -> WrappedFunctor f b #

liftA2 :: (a -> b -> c) -> WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f c #

(*>) :: WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f b #

(<*) :: WrappedFunctor f a -> WrappedFunctor f b -> WrappedFunctor f a #

Functor f => Functor (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

fmap :: (a -> b) -> WrappedFunctor f a -> WrappedFunctor f b #

(<$) :: a -> WrappedFunctor f b -> WrappedFunctor f a #

Monad m => Monad (WrappedFunctor m) 
Instance details

Defined in Data.Functor.Invariant

Methods

(>>=) :: WrappedFunctor m a -> (a -> WrappedFunctor m b) -> WrappedFunctor m b #

(>>) :: WrappedFunctor m a -> WrappedFunctor m b -> WrappedFunctor m b #

return :: a -> WrappedFunctor m a #

MonadPlus m => MonadPlus (WrappedFunctor m) 
Instance details

Defined in Data.Functor.Invariant

Functor f => Invariant (WrappedFunctor f) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedFunctor f a -> WrappedFunctor f b #

Read (f a) => Read (WrappedFunctor f a) 
Instance details

Defined in Data.Functor.Invariant

Show (f a) => Show (WrappedFunctor f a) 
Instance details

Defined in Data.Functor.Invariant

Eq (f a) => Eq (WrappedFunctor f a) 
Instance details

Defined in Data.Functor.Invariant

Ord (f a) => Ord (WrappedFunctor f a) 
Instance details

Defined in Data.Functor.Invariant

newtype WrappedContravariant (f :: k -> Type) (a :: k) #

Wrap a Contravariant functor to be used as a member of Invariant.

Constructors

WrapContravariant 

Fields

Instances

Instances details
Contravariant f => Contravariant (WrappedContravariant f) 
Instance details

Defined in Data.Functor.Invariant

Decidable f => Decidable (WrappedContravariant f) 
Instance details

Defined in Data.Functor.Invariant

Divisible f => Divisible (WrappedContravariant f) 
Instance details

Defined in Data.Functor.Invariant

Contravariant f => Invariant (WrappedContravariant f) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> WrappedContravariant f a -> WrappedContravariant f b #

Read (f a) => Read (WrappedContravariant f a) 
Instance details

Defined in Data.Functor.Invariant

Show (f a) => Show (WrappedContravariant f a) 
Instance details

Defined in Data.Functor.Invariant

Eq (f a) => Eq (WrappedContravariant f a) 
Instance details

Defined in Data.Functor.Invariant

Ord (f a) => Ord (WrappedContravariant f a) 
Instance details

Defined in Data.Functor.Invariant

class Invariant2 (f :: Type -> Type -> Type) where #

Any * -> * -> * type parametric in both arguments permits an instance of Invariant2.

Instances should satisfy the following laws:

invmap2 id id id id = id
invmap2 f2 f2' g2 g2' . invmap2 f1 f1' g1 g1' =
  invmap2 (f2 . f1) (f1' . f2') (g2 . g1) (g1' . g2')

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> f a b -> f c d #

Instances

Instances details
Invariant2 Either 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Either a b -> Either c d #

Invariant2 Op

from the contravariant package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Op a b -> Op c d #

Invariant2 Arg

from Data.Semigroup

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Arg a b -> Arg c d #

Invariant2 (,) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a, b) -> (c, d) #

Arrow arr => Invariant2 (WrappedArrow arr)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedArrow arr a b -> WrappedArrow arr c d #

Invariant m => Invariant2 (Kleisli m)

from Control.Arrow

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Kleisli m a b -> Kleisli m c d #

Invariant2 (Const :: Type -> Type -> Type)

from Control.Applicative

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Const a b -> Const c d #

Invariant2 (CopastroSum p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CopastroSum p a b -> CopastroSum p c d #

Invariant2 (CotambaraSum p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CotambaraSum p a b -> CotambaraSum p c d #

Invariant2 (PastroSum p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> PastroSum p a b -> PastroSum p c d #

Invariant2 p => Invariant2 (TambaraSum p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> TambaraSum p a b -> TambaraSum p c d #

Invariant2 p => Invariant2 (Closure p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Closure p a b -> Closure p c d #

Invariant2 (Environment p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Environment p a b -> Environment p c d #

Invariant2 p => Invariant2 (CofreeMapping p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CofreeMapping p a b -> CofreeMapping p c d #

Invariant2 (FreeMapping p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> FreeMapping p a b -> FreeMapping p c d #

Invariant2 (Copastro p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Copastro p a b -> Copastro p c d #

Invariant2 (Cotambara p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cotambara p a b -> Cotambara p c d #

Invariant2 (Pastro p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Pastro p a b -> Pastro p c d #

Invariant2 p => Invariant2 (Tambara p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Tambara p a b -> Tambara p c d #

Invariant2 p => Invariant2 (CofreeTraversing p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CofreeTraversing p a b -> CofreeTraversing p c d #

Invariant2 (FreeTraversing p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> FreeTraversing p a b -> FreeTraversing p c d #

Invariant2 (Coyoneda p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Coyoneda p a b -> Coyoneda p c d #

Invariant2 (Yoneda p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Yoneda p a b -> Yoneda p c d #

Invariant2 (Tagged :: Type -> Type -> Type)

from the tagged package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Tagged a b -> Tagged c d #

Invariant2 (Constant :: Type -> Type -> Type)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Constant a b -> Constant c d #

Invariant2 ((,,) a) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a0 -> c) -> (c -> a0) -> (b -> d) -> (d -> b) -> (a, a0, b) -> (a, c, d) #

Invariant2 (K1 i :: Type -> Type -> Type)

from GHC.Generics

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> K1 i a b -> K1 i c d #

Invariant w => Invariant2 (Cokleisli w)

from the comonad package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cokleisli w a b -> Cokleisli w c d #

Invariant f => Invariant2 (Costar f)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Costar f a b -> Costar f c d #

Invariant2 (Forget r :: Type -> Type -> TYPE LiftedRep)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Forget r a b -> Forget r c d #

Invariant f => Invariant2 (Star f)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Star f a b -> Star f c d #

Invariant2 ((,,,) a b) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a0 -> c) -> (c -> a0) -> (b0 -> d) -> (d -> b0) -> (a, b, a0, b0) -> (a, b, c, d) #

Invariant2 (->) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> (a -> b) -> c -> d #

Invariant f => Invariant2 (Clown f :: Type -> Type -> Type)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Clown f a b -> Clown f c d #

Invariant2 p => Invariant2 (Flip p)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Flip p a b -> Flip p c d #

Invariant g => Invariant2 (Joker g :: Type -> Type -> Type)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Joker g a b -> Joker g c d #

Bifunctor p => Invariant2 (WrappedBifunctor p)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedBifunctor p a b -> WrappedBifunctor p c d #

Profunctor p => Invariant2 (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedProfunctor p a b -> WrappedProfunctor p c d #

Invariant2 p => Invariant2 (Codensity p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Codensity p a b -> Codensity p c d #

Arrow arr => Invariant2 (WrappedArrow arr)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedArrow arr a b -> WrappedArrow arr c d #

Invariant2 ((,,,,) a b c) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a0 -> c0) -> (c0 -> a0) -> (b0 -> d) -> (d -> b0) -> (a, b, c, a0, b0) -> (a, b, c, c0, d) #

(Invariant2 f, Invariant2 g) => Invariant2 (Product f g)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Product f g a b -> Product f g c d #

(Invariant2 p, Invariant2 q) => Invariant2 (Sum p q)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Sum p q a b -> Sum p q c d #

(Invariant f, Invariant2 p) => Invariant2 (Tannen f p)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Tannen f p a b -> Tannen f p c d #

(Invariant f, Invariant2 p) => Invariant2 (Cayley f p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cayley f p a b -> Cayley f p c d #

(Invariant2 p, Invariant2 q) => Invariant2 (Procompose p q)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Procompose p q a b -> Procompose p q c d #

(Invariant2 p, Invariant2 q) => Invariant2 (Rift p q)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Rift p q a b -> Rift p q c d #

(Invariant2 p, Invariant2 q) => Invariant2 (Ran p q)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Ran p q a b -> Ran p q c d #

(Invariant2 p, Invariant f, Invariant g) => Invariant2 (Biff p f g)

from the bifunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Biff p f g a b -> Biff p f g c d #

newtype WrappedProfunctor (p :: k -> k1 -> Type) (a :: k) (b :: k1) #

Wrap a Profunctor to be used as a member of Invariant2.

Constructors

WrapProfunctor 

Fields

Instances

Instances details
ProfunctorFunctor (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Invariant

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> WrappedProfunctor p :-> WrappedProfunctor q #

Category p => Category (WrappedProfunctor p :: k -> k -> Type) 
Instance details

Defined in Data.Functor.Invariant

Methods

id :: forall (a :: k0). WrappedProfunctor p a a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). WrappedProfunctor p b c -> WrappedProfunctor p a b -> WrappedProfunctor p a c #

ProfunctorComonad (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Invariant

ProfunctorMonad (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Invariant

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> WrappedProfunctor p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => WrappedProfunctor (WrappedProfunctor p) :-> WrappedProfunctor p #

Arrow p => Arrow (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

arr :: (b -> c) -> WrappedProfunctor p b c #

first :: WrappedProfunctor p b c -> WrappedProfunctor p (b, d) (c, d) #

second :: WrappedProfunctor p b c -> WrappedProfunctor p (d, b) (d, c) #

(***) :: WrappedProfunctor p b c -> WrappedProfunctor p b' c' -> WrappedProfunctor p (b, b') (c, c') #

(&&&) :: WrappedProfunctor p b c -> WrappedProfunctor p b c' -> WrappedProfunctor p b (c, c') #

ArrowChoice p => ArrowChoice (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

ArrowLoop p => ArrowLoop (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

loop :: WrappedProfunctor p (b, d) (c, d) -> WrappedProfunctor p b c #

ArrowPlus p => ArrowPlus (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

(<+>) :: WrappedProfunctor p b c -> WrappedProfunctor p b c -> WrappedProfunctor p b c #

ArrowZero p => ArrowZero (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

zeroArrow :: WrappedProfunctor p b c #

Profunctor p => Invariant2 (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> WrappedProfunctor p a b -> WrappedProfunctor p c d #

Choice p => Choice (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Cochoice p => Cochoice (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Closed p => Closed (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

closed :: WrappedProfunctor p a b -> WrappedProfunctor p (x -> a) (x -> b) #

Mapping p => Mapping (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

map' :: Functor f => WrappedProfunctor p a b -> WrappedProfunctor p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> WrappedProfunctor p a b -> WrappedProfunctor p s t #

Costrong p => Costrong (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

unfirst :: WrappedProfunctor p (a, d) (b, d) -> WrappedProfunctor p a b #

unsecond :: WrappedProfunctor p (d, a) (d, b) -> WrappedProfunctor p a b #

Strong p => Strong (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

first' :: WrappedProfunctor p a b -> WrappedProfunctor p (a, c) (b, c) #

second' :: WrappedProfunctor p a b -> WrappedProfunctor p (c, a) (c, b) #

Traversing p => Traversing (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

traverse' :: Traversable f => WrappedProfunctor p a b -> WrappedProfunctor p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> WrappedProfunctor p a b -> WrappedProfunctor p s t #

Profunctor p => Profunctor (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

dimap :: (a -> b) -> (c -> d) -> WrappedProfunctor p b c -> WrappedProfunctor p a d #

lmap :: (a -> b) -> WrappedProfunctor p b c -> WrappedProfunctor p a c #

rmap :: (b -> c) -> WrappedProfunctor p a b -> WrappedProfunctor p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> WrappedProfunctor p a b -> WrappedProfunctor p a c #

(.#) :: forall a b c q. Coercible b a => WrappedProfunctor p b c -> q a b -> WrappedProfunctor p a c #

Profunctor p => Invariant (WrappedProfunctor p a) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> WrappedProfunctor p a a0 -> WrappedProfunctor p a b #

Read (p a b) => Read (WrappedProfunctor p a b) 
Instance details

Defined in Data.Functor.Invariant

Show (p a b) => Show (WrappedProfunctor p a b) 
Instance details

Defined in Data.Functor.Invariant

Eq (p a b) => Eq (WrappedProfunctor p a b) 
Instance details

Defined in Data.Functor.Invariant

Ord (p a b) => Ord (WrappedProfunctor p a b) 
Instance details

Defined in Data.Functor.Invariant

newtype InvariantProfunctor (p :: k -> k -> Type) (a :: k) #

A Profunctor with the same input and output types can be seen as an Invariant functor.

Constructors

InvariantProfunctor (p a a) 

Instances

Instances details
Profunctor p => Invariant (InvariantProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> InvariantProfunctor p a -> InvariantProfunctor p b #

newtype InvariantArrow (c :: k -> k -> Type) (a :: k) #

An Arrow with the same input and output types can be seen as an Invariant functor.

Constructors

InvariantArrow (c a a) 

Instances

Instances details
Arrow c => Invariant (InvariantArrow c) 
Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> InvariantArrow c a -> InvariantArrow c b #

class MonadTrans (t :: (Type -> Type) -> Type -> Type) where #

The class of monad transformers. Instances should satisfy the following laws, which state that lift is a monad transformation:

Methods

lift :: Monad m => m a -> t m a #

Lift a computation from the argument monad to the constructed monad.

Instances

Instances details
MonadTrans Free

This is not a true monad transformer. It is only a monad transformer "up to retract".

Instance details

Defined in Control.Monad.Free

Methods

lift :: Monad m => m a -> Free m a #

MonadTrans MaybeT 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

lift :: Monad m => m a -> MaybeT m a #

Functor f => MonadTrans (FreeT f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

lift :: Monad m => m a -> FreeT f m a #

MonadTrans (ErrorT e) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

lift :: Monad m => m a -> ErrorT e m a #

MonadTrans (ExceptT e) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

lift :: Monad m => m a -> ExceptT e m a #

MonadTrans (IdentityT :: (Type -> Type) -> Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

lift :: Monad m => m a -> IdentityT m a #

MonadTrans (ReaderT r) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

lift :: Monad m => m a -> ReaderT r m a #

MonadTrans (StateT s) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

lift :: Monad m => m a -> StateT s m a #

MonadTrans (StateT s) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

lift :: Monad m => m a -> StateT s m a #

Monoid w => MonadTrans (WriterT w) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

lift :: Monad m => m a -> WriterT w m a #

Monoid w => MonadTrans (WriterT w) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

lift :: Monad m => m a -> WriterT w m a #

MonadTrans (ContT r) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

lift :: Monad m => m a -> ContT r m a #

Monoid w => MonadTrans (RWST r w s) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

lift :: Monad m => m a -> RWST r w s m a #

Monoid w => MonadTrans (RWST r w s) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

lift :: Monad m => m a -> RWST r w s m a #

class (Monoid w, Monad m) => MonadWriter w (m :: Type -> Type) | m -> w where #

Minimal complete definition

(writer | tell), listen, pass

Methods

writer :: (a, w) -> m a #

writer (a,w) embeds a simple writer action.

tell :: w -> m () #

tell w is an action that produces the output w.

listen :: m a -> m (a, w) #

listen m is an action that executes the action m and adds its output to the value of the computation.

pass :: m (a, w -> w) -> m a #

pass m is an action that executes the action m, which returns a value and a function, and returns the value, applying the function to the output.

Instances

Instances details
MonadWriter e m => MonadWriter e (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

writer :: (a, e) -> Free m a #

tell :: e -> Free m () #

listen :: Free m a -> Free m (a, e) #

pass :: Free m (a, e -> e) -> Free m a #

MonadWriter w m => MonadWriter w (MaybeT m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> MaybeT m a #

tell :: w -> MaybeT m () #

listen :: MaybeT m a -> MaybeT m (a, w) #

pass :: MaybeT m (a, w -> w) -> MaybeT m a #

Monoid w => MonadWriter w ((,) w)

NOTE: This instance is only defined for base >= 4.9.0.

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> (w, a) #

tell :: w -> (w, ()) #

listen :: (w, a) -> (w, (a, w)) #

pass :: (w, (a, w -> w)) -> (w, a) #

(Functor f, MonadWriter w m) => MonadWriter w (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

writer :: (a, w) -> FreeT f m a #

tell :: w -> FreeT f m () #

listen :: FreeT f m a -> FreeT f m (a, w) #

pass :: FreeT f m (a, w -> w) -> FreeT f m a #

(Error e, MonadWriter w m) => MonadWriter w (ErrorT e m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> ErrorT e m a #

tell :: w -> ErrorT e m () #

listen :: ErrorT e m a -> ErrorT e m (a, w) #

pass :: ErrorT e m (a, w -> w) -> ErrorT e m a #

MonadWriter w m => MonadWriter w (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> ExceptT e m a #

tell :: w -> ExceptT e m () #

listen :: ExceptT e m a -> ExceptT e m (a, w) #

pass :: ExceptT e m (a, w -> w) -> ExceptT e m a #

MonadWriter w m => MonadWriter w (IdentityT m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> IdentityT m a #

tell :: w -> IdentityT m () #

listen :: IdentityT m a -> IdentityT m (a, w) #

pass :: IdentityT m (a, w -> w) -> IdentityT m a #

MonadWriter w m => MonadWriter w (ReaderT r m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> ReaderT r m a #

tell :: w -> ReaderT r m () #

listen :: ReaderT r m a -> ReaderT r m (a, w) #

pass :: ReaderT r m (a, w -> w) -> ReaderT r m a #

MonadWriter w m => MonadWriter w (StateT s m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> StateT s m a #

tell :: w -> StateT s m () #

listen :: StateT s m a -> StateT s m (a, w) #

pass :: StateT s m (a, w -> w) -> StateT s m a #

MonadWriter w m => MonadWriter w (StateT s m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> StateT s m a #

tell :: w -> StateT s m () #

listen :: StateT s m a -> StateT s m (a, w) #

pass :: StateT s m (a, w -> w) -> StateT s m a #

(Monoid w, Monad m) => MonadWriter w (WriterT w m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> WriterT w m a #

tell :: w -> WriterT w m () #

listen :: WriterT w m a -> WriterT w m (a, w) #

pass :: WriterT w m (a, w -> w) -> WriterT w m a #

(Monoid w, Monad m) => MonadWriter w (WriterT w m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> WriterT w m a #

tell :: w -> WriterT w m () #

listen :: WriterT w m a -> WriterT w m (a, w) #

pass :: WriterT w m (a, w -> w) -> WriterT w m a #

(Monoid w, Monad m) => MonadWriter w (RWST r w s m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> RWST r w s m a #

tell :: w -> RWST r w s m () #

listen :: RWST r w s m a -> RWST r w s m (a, w) #

pass :: RWST r w s m (a, w -> w) -> RWST r w s m a #

(Monoid w, Monad m) => MonadWriter w (RWST r w s m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> RWST r w s m a #

tell :: w -> RWST r w s m () #

listen :: RWST r w s m a -> RWST r w s m (a, w) #

pass :: RWST r w s m (a, w -> w) -> RWST r w s m a #

listens :: MonadWriter w m => (w -> b) -> m a -> m (a, b) #

listens f m is an action that executes the action m and adds the result of applying f to the output to the value of the computation.

censor :: MonadWriter w m => (w -> w) -> m a -> m a #

censor f m is an action that executes the action m and applies the function f to its output, leaving the return value unchanged.

modify' :: MonadState s m => (s -> s) -> m () #

A variant of modify in which the computation is strict in the new state.

Since: mtl-2.2

modify :: MonadState s m => (s -> s) -> m () #

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.

gets :: MonadState s m => (s -> a) -> m a #

Gets specific component of the state, using a projection function supplied.

asks #

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 => MonadError e (m :: Type -> Type) | m -> e where #

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 #

Is used within a monadic computation to begin exception processing.

catchError :: m a -> (e -> m a) -> m a #

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 IOException IO 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: IOException -> IO a #

catchError :: IO a -> (IOException -> IO a) -> IO a #

MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: () -> Maybe a #

catchError :: Maybe a -> (() -> Maybe a) -> Maybe a #

MonadError e (Either e) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> Either e a #

catchError :: Either e a -> (e -> Either e a) -> Either e a #

MonadError e m => MonadError e (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

throwError :: e -> Free m a #

catchError :: Free m a -> (e -> Free m a) -> Free m a #

MonadError e m => MonadError e (ListT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ListT m a #

catchError :: ListT m a -> (e -> ListT m a) -> ListT m a #

MonadError e m => MonadError e (MaybeT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> MaybeT m a #

catchError :: MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a #

(Functor f, MonadError e m) => MonadError e (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

throwError :: e -> FreeT f m a #

catchError :: FreeT f m a -> (e -> FreeT f m a) -> FreeT f m a #

(Monad m, Error e) => MonadError e (ErrorT e m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ErrorT e m a #

catchError :: ErrorT e m a -> (e -> ErrorT e m a) -> ErrorT e m a #

Monad m => MonadError e (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ExceptT e m a #

catchError :: ExceptT e m a -> (e -> ExceptT e m a) -> ExceptT e m a #

MonadError e m => MonadError e (IdentityT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> IdentityT m a #

catchError :: IdentityT m a -> (e -> IdentityT m a) -> IdentityT m a #

MonadError e m => MonadError e (ReaderT r m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ReaderT r m a #

catchError :: ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

MonadError e m => MonadError e (StateT s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> StateT s m a #

catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a #

MonadError e m => MonadError e (StateT s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> StateT s m a #

catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a #

(Monoid w, MonadError e m) => MonadError e (WriterT w m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> WriterT w m a #

catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a #

(Monoid w, MonadError e m) => MonadError e (WriterT w m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> WriterT w m a #

catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a #

(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 #

catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a #

(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 #

catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a #

liftEither :: MonadError e m => Either e a -> m a #

Lifts an Either e into any MonadError e.

do { val <- liftEither =<< action1; action2 }

where action1 returns an Either to represent errors.

Since: mtl-2.2.2

class Monad m => MonadCont (m :: Type -> Type) where #

Methods

callCC :: ((a -> m b) -> m a) -> m a #

callCC (call-with-current-continuation) calls a function with the current continuation as its argument. Provides an escape continuation mechanism for use with Continuation monads. Escape continuations allow to abort the current computation and return a value immediately. They achieve a similar effect to throwError and catchError within an Error monad. Advantage of this function over calling return is that it makes the continuation explicit, allowing more flexibility and better control (see examples in Control.Monad.Cont).

The standard idiom used with callCC is to provide a lambda-expression to name the continuation. Then calling the named continuation anywhere within its scope will escape from the computation, even if it is many layers deep within nested computations.

Instances

Instances details
MonadCont m => MonadCont (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

callCC :: ((a -> Free m b) -> Free m a) -> Free m a #

MonadCont m => MonadCont (ListT m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> ListT m b) -> ListT m a) -> ListT m a #

MonadCont m => MonadCont (MaybeT m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> MaybeT m b) -> MaybeT m a) -> MaybeT m a #

(Functor f, MonadCont m) => MonadCont (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

callCC :: ((a -> FreeT f m b) -> FreeT f m a) -> FreeT f m a #

(Error e, MonadCont m) => MonadCont (ErrorT e m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> ErrorT e m b) -> ErrorT e m a) -> ErrorT e m a #

MonadCont m => MonadCont (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> ExceptT e m b) -> ExceptT e m a) -> ExceptT e m a #

MonadCont m => MonadCont (IdentityT m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> IdentityT m b) -> IdentityT m a) -> IdentityT m a #

MonadCont m => MonadCont (ReaderT r m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> ReaderT r m b) -> ReaderT r m a) -> ReaderT r m a #

MonadCont m => MonadCont (StateT s m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> StateT s m b) -> StateT s m a) -> StateT s m a #

MonadCont m => MonadCont (StateT s m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> StateT s m b) -> StateT s m a) -> StateT s m a #

(Monoid w, MonadCont m) => MonadCont (WriterT w m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> WriterT w m b) -> WriterT w m a) -> WriterT w m a #

(Monoid w, MonadCont m) => MonadCont (WriterT w m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> WriterT w m b) -> WriterT w m a) -> WriterT w m a #

MonadCont (ContT r m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> ContT r m b) -> ContT r m a) -> ContT r m a #

(Monoid w, MonadCont m) => MonadCont (RWST r w s m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> RWST r w s m b) -> RWST r w s m a) -> RWST r w s m a #

(Monoid w, MonadCont m) => MonadCont (RWST r w s m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> RWST r w s m b) -> RWST r w s m a) -> RWST r w s m a #

cont :: ((a -> r) -> r) -> Cont r a #

Construct a continuation-passing computation from a function. (The inverse of runCont)

mapCont :: (r -> r) -> Cont r a -> Cont r a #

Apply a function to transform the result of a continuation-passing computation.

mapContT :: forall {k} m (r :: k) a. (m r -> m r) -> ContT r m a -> ContT r m a #

Apply a function to transform the result of a continuation-passing computation. This has a more restricted type than the map operations for other monad transformers, because ContT does not define a functor in the category of monads.

runCont #

Arguments

:: Cont r a

continuation computation (Cont).

-> (a -> r)

the final continuation, which produces the final result (often id).

-> r 

The result of running a CPS computation with a given final continuation. (The inverse of cont)

withCont :: ((b -> r) -> a -> r) -> Cont r a -> Cont r b #

Apply a function to transform the continuation passed to a CPS computation.

withContT :: forall {k} b m (r :: k) a. ((b -> m r) -> a -> m r) -> ContT r m a -> ContT r m b #

Apply a function to transform the continuation passed to a CPS computation.

type Cont r = ContT r Identity #

Continuation monad. Cont r a is a CPS ("continuation-passing style") computation that produces an intermediate result of type a within a CPS computation whose final result type is r.

The return function simply creates a continuation which passes the value on.

The >>= operator adds the bound function into the continuation chain.

newtype ContT (r :: k) (m :: k -> Type) a #

The continuation monad transformer. Can be used to add continuation handling to any type constructor: the Monad instance and most of the operations do not require m to be a monad.

ContT is not a functor on the category of monads, and many operations cannot be lifted through it.

Constructors

ContT 

Fields

Instances

Instances details
MonadReader r' m => MonadReader r' (ContT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ContT r m r' #

local :: (r' -> r') -> ContT r m a -> ContT r m a #

reader :: (r' -> a) -> ContT r m a #

MonadState s m => MonadState s (ContT r m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: ContT r m s #

put :: s -> ContT r m () #

state :: (s -> (a, s)) -> ContT r m a #

BindTrans (ContT r) 
Instance details

Defined in Data.Functor.Bind.Trans

Methods

liftB :: Bind b => b a -> ContT r b a #

MonadTrans (ContT r) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

lift :: Monad m => m a -> ContT r m a #

MonadFail m => MonadFail (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

fail :: String -> ContT r m a #

MonadIO m => MonadIO (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

liftIO :: IO a -> ContT r m a #

Applicative (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

pure :: a -> ContT r m a #

(<*>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b #

liftA2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c #

(*>) :: ContT r m a -> ContT r m b -> ContT r m b #

(<*) :: ContT r m a -> ContT r m b -> ContT r m a #

Functor (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

fmap :: (a -> b) -> ContT r m a -> ContT r m b #

(<$) :: a -> ContT r m b -> ContT r m a #

Monad (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

(>>=) :: ContT r m a -> (a -> ContT r m b) -> ContT r m b #

(>>) :: ContT r m a -> ContT r m b -> ContT r m b #

return :: a -> ContT r m a #

Invariant (ContT r m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ContT r m a -> ContT r m b #

MonadCont (ContT r m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> ContT r m b) -> ContT r m a) -> ContT r m a #

PrimMonad m => PrimMonad (ContT r m)

Since: primitive-0.6.3.0

Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ContT r m) #

Methods

primitive :: (State# (PrimState (ContT r m)) -> (# State# (PrimState (ContT r m)), a #)) -> ContT r m a #

Selective (ContT r m) 
Instance details

Defined in Control.Selective

Methods

select :: ContT r m (Either a b) -> ContT r m (a -> b) -> ContT r m b #

Apply (ContT r m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b #

(.>) :: ContT r m a -> ContT r m b -> ContT r m b #

(<.) :: ContT r m a -> ContT r m b -> ContT r m a #

liftF2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c #

Bind (ContT r m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ContT r m a -> (a -> ContT r m b) -> ContT r m b #

join :: ContT r m (ContT r m a) -> ContT r m a #

type PrimState (ContT r m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ContT r m) = PrimState m
type Rep (ContT r m a) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep (ContT r m a) = D1 ('MetaData "ContT" "Control.Monad.Trans.Cont" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "ContT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runContT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ((a -> m r) -> m r))))

mapExcept :: (Either e a -> Either e' b) -> Except e a -> Except e' b #

Map the unwrapped computation using the given function.

mapExceptT :: (m (Either e a) -> n (Either e' b)) -> ExceptT e m a -> ExceptT e' n b #

Map the unwrapped computation using the given function.

runExcept :: Except e a -> Either e a #

Extractor for computations in the exception monad. (The inverse of except).

runExceptT :: ExceptT e m a -> m (Either e a) #

The inverse of ExceptT.

withExcept :: (e -> e') -> Except e a -> Except e' a #

Transform any exceptions thrown by the computation using the given function (a specialization of withExceptT).

withExceptT :: forall (m :: Type -> Type) e e' a. Functor m => (e -> e') -> ExceptT e m a -> ExceptT e' m a #

Transform any exceptions thrown by the computation using the given function.

type Except e = ExceptT e Identity #

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.

mapReader :: (a -> b) -> Reader r a -> Reader r b #

Transform the value returned by a Reader.

mapReaderT :: (m a -> n b) -> ReaderT r m a -> ReaderT r n b #

Transform the computation inside a ReaderT.

runReader #

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.)

withReader #

Arguments

:: (r' -> r)

The function to modify the environment.

-> Reader r a

Computation to run in the modified environment.

-> Reader r' a 

Execute a computation in a modified environment (a specialization of withReaderT).

withReaderT #

Arguments

:: forall r' r (m :: Type -> Type) a. (r' -> r)

The function to modify the environment.

-> ReaderT r m a

Computation to run in the modified environment.

-> ReaderT r' m a 

Execute a computation in a modified environment (a more general version of local).

type Reader r = ReaderT r Identity #

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.

newtype ReaderT r (m :: Type -> Type) a #

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
MonadError e m => MonadError e (ReaderT r m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ReaderT r m a #

catchError :: ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

Monad m => MonadReader r (ReaderT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ReaderT r m r #

local :: (r -> r) -> ReaderT r m a -> ReaderT r m a #

reader :: (r -> a) -> ReaderT r m a #

MonadState s m => MonadState s (ReaderT r m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: ReaderT r m s #

put :: s -> ReaderT r m () #

state :: (s -> (a, s)) -> ReaderT r m a #

MonadWriter w m => MonadWriter w (ReaderT r m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> ReaderT r m a #

tell :: w -> ReaderT r m () #

listen :: ReaderT r m a -> ReaderT r m (a, w) #

pass :: ReaderT r m (a, w -> w) -> ReaderT r m a #

BindTrans (ReaderT e) 
Instance details

Defined in Data.Functor.Bind.Trans

Methods

liftB :: Bind b => b a -> ReaderT e b a #

MonadTrans (ReaderT r) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

lift :: Monad m => m a -> ReaderT r m a #

Representable m => Representable (ReaderT e m) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (ReaderT e m) #

Methods

tabulate :: (Rep (ReaderT e m) -> a) -> ReaderT e m a #

index :: ReaderT e m a -> Rep (ReaderT e m) -> a #

MonadFail m => MonadFail (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fail :: String -> ReaderT r m a #

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 #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a #

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) #

mzipWith :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

munzip :: ReaderT r m (a, b) -> (ReaderT r m a, ReaderT r m b) #

Contravariant m => Contravariant (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

contramap :: (a' -> a) -> ReaderT r m a -> ReaderT r m a' #

(>$) :: b -> ReaderT r m b -> ReaderT r m a #

Alternative m => Alternative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a #

(<|>) :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

some :: ReaderT r m a -> ReaderT r m [a] #

many :: ReaderT r m a -> ReaderT r m [a] #

Applicative m => Applicative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a #

(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b #

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

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 #

(<$) :: a -> ReaderT r m b -> ReaderT r m a #

Monad m => Monad (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b #

(>>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

return :: a -> ReaderT r m a #

MonadPlus m => MonadPlus (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzero :: ReaderT r m a #

mplus :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

Decidable m => Decidable (ReaderT r m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> ReaderT r m a #

choose :: (a -> Either b c) -> ReaderT r m b -> ReaderT r m c -> ReaderT r m a #

Divisible m => Divisible (ReaderT r m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> ReaderT r m b -> ReaderT r m c -> ReaderT r m a #

conquer :: ReaderT r m a #

Invariant m => Invariant (ReaderT r m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> ReaderT r m a -> ReaderT r m b #

Indexable m => Indexable (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

index :: ReaderT e m a -> Key (ReaderT e m) -> a #

Keyed m => Keyed (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key (ReaderT e m) -> a -> b) -> ReaderT e m a -> ReaderT e m b #

Lookup m => Lookup (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

lookup :: Key (ReaderT e m) -> ReaderT e m a -> Maybe a #

Zip m => Zip (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> ReaderT e m a -> ReaderT e m b -> ReaderT e m c #

zip :: ReaderT e m a -> ReaderT e m b -> ReaderT e m (a, b) #

zap :: ReaderT e m (a -> b) -> ReaderT e m a -> ReaderT e m b #

ZipWithKey m => ZipWithKey (ReaderT e m) 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key (ReaderT e m) -> a -> b -> c) -> ReaderT e m a -> ReaderT e m b -> ReaderT e m c #

zapWithKey :: ReaderT e m (Key (ReaderT e m) -> a -> b) -> ReaderT e m a -> ReaderT e m b #

MonadCont m => MonadCont (ReaderT r m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> ReaderT r m b) -> ReaderT r m a) -> ReaderT r m a #

PrimMonad m => PrimMonad (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ReaderT r m) #

Methods

primitive :: (State# (PrimState (ReaderT r m)) -> (# State# (PrimState (ReaderT r m)), a #)) -> ReaderT r m a #

Selective f => Selective (ReaderT env f) 
Instance details

Defined in Control.Selective

Methods

select :: ReaderT env f (Either a b) -> ReaderT env f (a -> b) -> ReaderT env f b #

Alt f => Alt (ReaderT e f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: ReaderT e f a -> ReaderT e f a -> ReaderT e f a #

some :: Applicative (ReaderT e f) => ReaderT e f a -> ReaderT e f [a] #

many :: Applicative (ReaderT e f) => ReaderT e f a -> ReaderT e f [a] #

Apply m => Apply (ReaderT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ReaderT e m (a -> b) -> ReaderT e m a -> ReaderT e m b #

(.>) :: ReaderT e m a -> ReaderT e m b -> ReaderT e m b #

(<.) :: ReaderT e m a -> ReaderT e m b -> ReaderT e m a #

liftF2 :: (a -> b -> c) -> ReaderT e m a -> ReaderT e m b -> ReaderT e m c #

Bind m => Bind (ReaderT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ReaderT e m a -> (a -> ReaderT e m b) -> ReaderT e m b #

join :: ReaderT e m (ReaderT e m a) -> ReaderT e m a #

Plus f => Plus (ReaderT e f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: ReaderT e f a #

type Rep1 (ReaderT r m :: Type -> TYPE LiftedRep) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep1 (ReaderT r m :: Type -> TYPE LiftedRep) = D1 ('MetaData "ReaderT" "Control.Monad.Trans.Reader" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "ReaderT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runReaderT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ((FUN 'Many r :: TYPE LiftedRep -> Type) :.: Rec1 m)))
type Rep (ReaderT e m) 
Instance details

Defined in Data.Functor.Rep

type Rep (ReaderT e m) = (e, Rep m)
type Key (ReaderT e m) 
Instance details

Defined in Data.Key

type Key (ReaderT e m) = (e, Key m)
type PrimState (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ReaderT r m) = PrimState m
type Rep (ReaderT r m a) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep (ReaderT r m a) = D1 ('MetaData "ReaderT" "Control.Monad.Trans.Reader" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "ReaderT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runReaderT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (r -> m a))))

evalState #

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.

evalStateT :: Monad m => StateT s m a -> s -> m a #

Evaluate a state computation with the given initial state and return the final value, discarding the final state.

execState #

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.

execStateT :: Monad m => StateT s m a -> s -> m s #

Evaluate a state computation with the given initial state and return the final state, discarding the final value.

mapState :: ((a, s) -> (b, s)) -> State s a -> State s b #

Map both the return value and final state of a computation using the given function.

mapStateT :: (m (a, s) -> n (b, s)) -> StateT s m a -> StateT s n b #

Map both the return value and final state of a computation using the given function.

runState #

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.)

withState :: (s -> s) -> State s a -> State s a #

withState f m executes action m on a state modified by applying f.

withStateT :: forall s (m :: Type -> Type) a. (s -> s) -> StateT s m a -> StateT s m a #

withStateT f m executes action m on a state modified by applying f.

type State s = StateT s Identity #

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.

newtype StateT s (m :: Type -> Type) a #

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
MonadError e m => MonadError e (StateT s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> StateT s m a #

catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a #

MonadReader r m => MonadReader r (StateT s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: StateT s m r #

local :: (r -> r) -> StateT s m a -> StateT s m a #

reader :: (r -> a) -> StateT s m a #

Monad m => MonadState s (StateT s m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: StateT s m s #

put :: s -> StateT s m () #

state :: (s -> (a, s)) -> StateT s m a #

MonadWriter w m => MonadWriter w (StateT s m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> StateT s m a #

tell :: w -> StateT s m () #

listen :: StateT s m a -> StateT s m (a, w) #

pass :: StateT s m (a, w -> w) -> StateT s m a #

BindTrans (StateT s) 
Instance details

Defined in Data.Functor.Bind.Trans

Methods

liftB :: Bind b => b a -> StateT s b a #

MonadTrans (StateT s) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

lift :: Monad m => m a -> StateT s m a #

MonadFail m => MonadFail (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

fail :: String -> StateT s m a #

MonadFix m => MonadFix (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

mfix :: (a -> StateT s m a) -> StateT s m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a #

Contravariant m => Contravariant (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

contramap :: (a' -> a) -> StateT s m a -> StateT s m a' #

(>$) :: b -> StateT s m b -> StateT s m a #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

empty :: StateT s m a #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a #

some :: StateT s m a -> StateT s m [a] #

many :: StateT s m a -> StateT s m [a] #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

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 #

(<$) :: a -> StateT s m b -> StateT s m a #

Monad m => Monad (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

(>>) :: StateT s m a -> StateT s m b -> StateT s m b #

return :: a -> StateT s m a #

MonadPlus m => MonadPlus (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

mzero :: StateT s m a #

mplus :: StateT s m a -> StateT s m a -> StateT s m a #

Decidable m => Decidable (StateT s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> StateT s m a #

choose :: (a -> Either b c) -> StateT s m b -> StateT s m c -> StateT s m a #

Divisible m => Divisible (StateT s m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> StateT s m b -> StateT s m c -> StateT s m a #

conquer :: StateT s m a #

Invariant m => Invariant (StateT s m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> StateT s m a -> StateT s m b #

MonadCont m => MonadCont (StateT s m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> StateT s m b) -> StateT s m a) -> StateT s m a #

PrimMonad m => PrimMonad (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (StateT s m) #

Methods

primitive :: (State# (PrimState (StateT s m)) -> (# State# (PrimState (StateT s m)), a #)) -> StateT s m a #

Monad m => Selective (StateT s m) 
Instance details

Defined in Control.Selective

Methods

select :: StateT s m (Either a b) -> StateT s m (a -> b) -> StateT s m b #

Alt f => Alt (StateT e f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: StateT e f a -> StateT e f a -> StateT e f a #

some :: Applicative (StateT e f) => StateT e f a -> StateT e f [a] #

many :: Applicative (StateT e f) => StateT e f a -> StateT e f [a] #

Bind m => Apply (StateT s m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

(.>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<.) :: StateT s m a -> StateT s m b -> StateT s m a #

liftF2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

Bind m => Bind (StateT s m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

join :: StateT s m (StateT s m a) -> StateT s m a #

Plus f => Plus (StateT e f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: StateT e f a #

type PrimState (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (StateT s m) = PrimState m
type Rep (StateT s m a) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep (StateT s m a) = D1 ('MetaData "StateT" "Control.Monad.Trans.State.Strict" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "StateT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runStateT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (s -> m (a, s)))))
type Rep (StateT s m a) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep (StateT s m a) = D1 ('MetaData "StateT" "Control.Monad.Trans.State.Strict" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "StateT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runStateT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (s -> m (a, s)))))

execWriter :: Writer w a -> w #

Extract the output from a writer computation.

execWriterT :: Monad m => WriterT w m a -> m w #

Extract the output from a writer computation.

mapWriter :: ((a, w) -> (b, w')) -> Writer w a -> Writer w' b #

Map both the return value and output of a computation using the given function.

mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n b #

Map both the return value and output of a computation using the given function.

runWriter :: Writer w a -> (a, w) #

Unwrap a writer computation as a (result, output) pair. (The inverse of writer.)

type Writer w = WriterT w Identity #

A writer monad parameterized by the type w of output to accumulate.

The return function produces the output mempty, while >>= combines the outputs of the subcomputations using mappend.

newtype WriterT w (m :: Type -> Type) a #

A writer monad parameterized by:

  • w - the output to accumulate.
  • m - The inner monad.

The return function produces the output mempty, while >>= combines the outputs of the subcomputations using mappend.

Constructors

WriterT (m (a, w)) 

Instances

Instances details
(Monoid w, MonadError e m) => MonadError e (WriterT w m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> WriterT w m a #

catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: WriterT w m r #

local :: (r -> r) -> WriterT w m a -> WriterT w m a #

reader :: (r -> a) -> WriterT w m a #

(Monoid w, MonadState s m) => MonadState s (WriterT w m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: WriterT w m s #

put :: s -> WriterT w m () #

state :: (s -> (a, s)) -> WriterT w m a #

(Monoid w, Monad m) => MonadWriter w (WriterT w m) 
Instance details

Defined in Control.Monad.Writer.Class

Methods

writer :: (a, w) -> WriterT w m a #

tell :: w -> WriterT w m () #

listen :: WriterT w m a -> WriterT w m (a, w) #

pass :: WriterT w m (a, w -> w) -> WriterT w m a #

Monoid w => BindTrans (WriterT w) 
Instance details

Defined in Data.Functor.Bind.Trans

Methods

liftB :: Bind b => b a -> WriterT w b a #

Monoid w => MonadTrans (WriterT w) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

lift :: Monad m => m a -> WriterT w m a #

(Monoid w, MonadFail m) => MonadFail (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

fail :: String -> WriterT w m a #

(Monoid w, MonadFix m) => MonadFix (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

mfix :: (a -> WriterT w m a) -> WriterT w m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, MonadZip m) => MonadZip (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

mzip :: WriterT w m a -> WriterT w m b -> WriterT w m (a, b) #

mzipWith :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

munzip :: WriterT w m (a, b) -> (WriterT w m a, WriterT w m b) #

Foldable f => Foldable (WriterT w f) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

fold :: Monoid m => WriterT w f m -> m #

foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldr :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldl :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldr1 :: (a -> a -> a) -> WriterT w f a -> a #

foldl1 :: (a -> a -> a) -> WriterT w f a -> a #

toList :: WriterT w f a -> [a] #

null :: WriterT w f a -> Bool #

length :: WriterT w f a -> Int #

elem :: Eq a => a -> WriterT w f a -> Bool #

maximum :: Ord a => WriterT w f a -> a #

minimum :: Ord a => WriterT w f a -> a #

sum :: Num a => WriterT w f a -> a #

product :: Num a => WriterT w f a -> a #

(Eq w, Eq1 m) => Eq1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftEq :: (a -> b -> Bool) -> WriterT w m a -> WriterT w m b -> Bool #

(Ord w, Ord1 m) => Ord1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftCompare :: (a -> b -> Ordering) -> WriterT w m a -> WriterT w m b -> Ordering #

(Read w, Read1 m) => Read1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (WriterT w m a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [WriterT w m a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (WriterT w m a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [WriterT w m a] #

(Show w, Show1 m) => Show1 (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> WriterT w m a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [WriterT w m a] -> ShowS #

Contravariant m => Contravariant (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

contramap :: (a' -> a) -> WriterT w m a -> WriterT w m a' #

(>$) :: b -> WriterT w m b -> WriterT w m a #

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) #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 (WriterT w f a) #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m (WriterT w f b) #

sequence :: Monad m => WriterT w f (m a) -> m (WriterT w f a) #

(Monoid w, Alternative m) => Alternative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

(Monoid w, Applicative m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

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 #

(<$) :: a -> WriterT w m b -> WriterT w m a #

(Monoid w, Monad m) => Monad (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

return :: a -> WriterT w m a #

(Monoid w, MonadPlus m) => MonadPlus (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

Decidable m => Decidable (WriterT w m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

lose :: (a -> Void) -> WriterT w m a #

choose :: (a -> Either b c) -> WriterT w m b -> WriterT w m c -> WriterT w m a #

Divisible m => Divisible (WriterT w m) 
Instance details

Defined in Data.Functor.Contravariant.Divisible

Methods

divide :: (a -> (b, c)) -> WriterT w m b -> WriterT w m c -> WriterT w m a #

conquer :: WriterT w m a #

Invariant m => Invariant (WriterT w m)

from the transformers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> WriterT w m a -> WriterT w m b #

(Monoid w, MonadCont m) => MonadCont (WriterT w m) 
Instance details

Defined in Control.Monad.Cont.Class

Methods

callCC :: ((a -> WriterT w m b) -> WriterT w m a) -> WriterT w m a #

(Monoid w, PrimMonad m) => PrimMonad (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (WriterT w m) #

Methods

primitive :: (State# (PrimState (WriterT w m)) -> (# State# (PrimState (WriterT w m)), a #)) -> WriterT w m a #

(Monoid w, Selective f) => Selective (WriterT w f) 
Instance details

Defined in Control.Selective

Methods

select :: WriterT w f (Either a b) -> WriterT w f (a -> b) -> WriterT w f b #

Alt f => Alt (WriterT w f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: WriterT w f a -> WriterT w f a -> WriterT w f a #

some :: Applicative (WriterT w f) => WriterT w f a -> WriterT w f [a] #

many :: Applicative (WriterT w f) => WriterT w f a -> WriterT w f [a] #

(Apply m, Semigroup w) => Apply (WriterT w m)

A WriterT w m is not Applicative unless its w is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

(.>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<.) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

liftF2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(Bind m, Semigroup w) => Bind (WriterT w m)

A WriterT w m is not a Monad unless its w is a Monoid, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

join :: WriterT w m (WriterT w m a) -> WriterT w m a #

Plus f => Plus (WriterT w f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: WriterT w f a #

(Read w, Read1 m, Read a) => Read (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

readsPrec :: Int -> ReadS (WriterT w m a) #

readList :: ReadS [WriterT w m a] #

readPrec :: ReadPrec (WriterT w m a) #

readListPrec :: ReadPrec [WriterT w m a] #

(Show w, Show1 m, Show a) => Show (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

showsPrec :: Int -> WriterT w m a -> ShowS #

show :: WriterT w m a -> String #

showList :: [WriterT w m a] -> ShowS #

(Eq w, Eq1 m, Eq a) => Eq (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

(==) :: WriterT w m a -> WriterT w m a -> Bool #

(/=) :: WriterT w m a -> WriterT w m a -> Bool #

(Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

compare :: WriterT w m a -> WriterT w m a -> Ordering #

(<) :: WriterT w m a -> WriterT w m a -> Bool #

(<=) :: WriterT w m a -> WriterT w m a -> Bool #

(>) :: WriterT w m a -> WriterT w m a -> Bool #

(>=) :: WriterT w m a -> WriterT w m a -> Bool #

max :: WriterT w m a -> WriterT w m a -> WriterT w m a #

min :: WriterT w m a -> WriterT w m a -> WriterT w m a #

type PrimState (WriterT w m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (WriterT w m) = PrimState m
type Rep (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep (WriterT w m a) = D1 ('MetaData "WriterT" "Control.Monad.Trans.Writer.Strict" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "WriterT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runWriterT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (a, w)))))
type Rep (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Instances

type Rep (WriterT w m a) = D1 ('MetaData "WriterT" "Control.Monad.Trans.Writer.Strict" "transformers-0.5.6.2" 'True) (C1 ('MetaCons "WriterT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runWriterT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (a, w)))))

newtype Yoneda (p :: Type -> Type -> Type) a b #

This is the cofree profunctor given a data constructor of kind * -> * -> *

Constructors

Yoneda 

Fields

  • runYoneda :: forall x y. (x -> a) -> (b -> y) -> p x y
     

Instances

Instances details
ProfunctorComonad Yoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> Yoneda (Yoneda p) #

ProfunctorMonad Yoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Yoneda p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda (Yoneda p) :-> Yoneda p #

ProfunctorFunctor Yoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Yoneda p :-> Yoneda q #

(Category p, Profunctor p) => Category (Yoneda p :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

id :: forall (a :: k). Yoneda p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Yoneda p b c -> Yoneda p a b -> Yoneda p a c #

Invariant2 (Yoneda p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Yoneda p a b -> Yoneda p c d #

Choice p => Choice (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

left' :: Yoneda p a b -> Yoneda p (Either a c) (Either b c) #

right' :: Yoneda p a b -> Yoneda p (Either c a) (Either c b) #

Cochoice p => Cochoice (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unleft :: Yoneda p (Either a d) (Either b d) -> Yoneda p a b #

unright :: Yoneda p (Either d a) (Either d b) -> Yoneda p a b #

Closed p => Closed (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

closed :: Yoneda p a b -> Yoneda p (x -> a) (x -> b) #

Mapping p => Mapping (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

map' :: Functor f => Yoneda p a b -> Yoneda p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Yoneda p a b -> Yoneda p s t #

Costrong p => Costrong (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unfirst :: Yoneda p (a, d) (b, d) -> Yoneda p a b #

unsecond :: Yoneda p (d, a) (d, b) -> Yoneda p a b #

Strong p => Strong (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

first' :: Yoneda p a b -> Yoneda p (a, c) (b, c) #

second' :: Yoneda p a b -> Yoneda p (c, a) (c, b) #

Traversing p => Traversing (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

traverse' :: Traversable f => Yoneda p a b -> Yoneda p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Yoneda p a b -> Yoneda p s t #

Profunctor (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

dimap :: (a -> b) -> (c -> d) -> Yoneda p b c -> Yoneda p a d #

lmap :: (a -> b) -> Yoneda p b c -> Yoneda p a c #

rmap :: (b -> c) -> Yoneda p a b -> Yoneda p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Yoneda p a b -> Yoneda p a c #

(.#) :: forall a b c q. Coercible b a => Yoneda p b c -> q a b -> Yoneda p a c #

Functor (Yoneda p a) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

fmap :: (a0 -> b) -> Yoneda p a a0 -> Yoneda p a b #

(<$) :: a0 -> Yoneda p a b -> Yoneda p a a0 #

Invariant (Yoneda p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Yoneda p a a0 -> Yoneda p a b #

data Coyoneda (p :: Type -> Type -> Type) a b where #

Constructors

Coyoneda :: forall a x y b (p :: Type -> Type -> Type). (a -> x) -> (y -> b) -> p x y -> Coyoneda p a b 

Instances

Instances details
ProfunctorComonad Coyoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> Coyoneda (Coyoneda p) #

ProfunctorMonad Coyoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Coyoneda p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda (Coyoneda p) :-> Coyoneda p #

ProfunctorFunctor Coyoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Coyoneda p :-> Coyoneda q #

(Category p, Profunctor p) => Category (Coyoneda p :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

id :: forall (a :: k). Coyoneda p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Coyoneda p b c -> Coyoneda p a b -> Coyoneda p a c #

Invariant2 (Coyoneda p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Coyoneda p a b -> Coyoneda p c d #

Choice p => Choice (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

left' :: Coyoneda p a b -> Coyoneda p (Either a c) (Either b c) #

right' :: Coyoneda p a b -> Coyoneda p (Either c a) (Either c b) #

Cochoice p => Cochoice (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unleft :: Coyoneda p (Either a d) (Either b d) -> Coyoneda p a b #

unright :: Coyoneda p (Either d a) (Either d b) -> Coyoneda p a b #

Closed p => Closed (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

closed :: Coyoneda p a b -> Coyoneda p (x -> a) (x -> b) #

Mapping p => Mapping (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

map' :: Functor f => Coyoneda p a b -> Coyoneda p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Coyoneda p a b -> Coyoneda p s t #

Costrong p => Costrong (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unfirst :: Coyoneda p (a, d) (b, d) -> Coyoneda p a b #

unsecond :: Coyoneda p (d, a) (d, b) -> Coyoneda p a b #

Strong p => Strong (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

first' :: Coyoneda p a b -> Coyoneda p (a, c) (b, c) #

second' :: Coyoneda p a b -> Coyoneda p (c, a) (c, b) #

Traversing p => Traversing (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

traverse' :: Traversable f => Coyoneda p a b -> Coyoneda p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Coyoneda p a b -> Coyoneda p s t #

Profunctor (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

dimap :: (a -> b) -> (c -> d) -> Coyoneda p b c -> Coyoneda p a d #

lmap :: (a -> b) -> Coyoneda p b c -> Coyoneda p a c #

rmap :: (b -> c) -> Coyoneda p a b -> Coyoneda p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Coyoneda p a b -> Coyoneda p a c #

(.#) :: forall a b c q. Coercible b a => Coyoneda p b c -> q a b -> Coyoneda p a c #

Functor (Coyoneda p a) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

fmap :: (a0 -> b) -> Coyoneda p a a0 -> Coyoneda p a b #

(<$) :: a0 -> Coyoneda p a b -> Coyoneda p a a0 #

Invariant (Coyoneda p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Coyoneda p a a0 -> Coyoneda p a b #

mapCayley :: forall {k1} {k2} {k3} f g (p :: k2 -> k3 -> k1) (x :: k2) (y :: k3). (forall (a :: k1). f a -> g a) -> Cayley f p x y -> Cayley g p x y #

newtype Cayley (f :: k -> Type) (p :: k1 -> k2 -> k) (a :: k1) (b :: k2) #

Static arrows. Lifted by Applicative.

Cayley has a polymorphic kind since 5.6.

Constructors

Cayley 

Fields

Instances

Instances details
Functor f => ProfunctorFunctor (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Cayley f p :-> Cayley f q #

(Applicative f, Category p) => Category (Cayley f p :: k -> k -> Type) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

id :: forall (a :: k0). Cayley f p a a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Cayley f p b c -> Cayley f p a b -> Cayley f p a c #

Comonad f => ProfunctorComonad (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type)

Cayley transforms Comonads in Hask into comonads on Prof

Instance details

Defined in Data.Profunctor.Cayley

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> Cayley f (Cayley f p) #

(Functor f, Monad f) => ProfunctorMonad (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type)

Cayley transforms Monads in Hask into monads on Prof

Instance details

Defined in Data.Profunctor.Cayley

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Cayley f p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f (Cayley f p) :-> Cayley f p #

(Applicative f, Arrow p) => Arrow (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

arr :: (b -> c) -> Cayley f p b c #

first :: Cayley f p b c -> Cayley f p (b, d) (c, d) #

second :: Cayley f p b c -> Cayley f p (d, b) (d, c) #

(***) :: Cayley f p b c -> Cayley f p b' c' -> Cayley f p (b, b') (c, c') #

(&&&) :: Cayley f p b c -> Cayley f p b c' -> Cayley f p b (c, c') #

(Applicative f, ArrowChoice p) => ArrowChoice (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

left :: Cayley f p b c -> Cayley f p (Either b d) (Either c d) #

right :: Cayley f p b c -> Cayley f p (Either d b) (Either d c) #

(+++) :: Cayley f p b c -> Cayley f p b' c' -> Cayley f p (Either b b') (Either c c') #

(|||) :: Cayley f p b d -> Cayley f p c d -> Cayley f p (Either b c) d #

(Applicative f, ArrowLoop p) => ArrowLoop (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

loop :: Cayley f p (b, d) (c, d) -> Cayley f p b c #

(Applicative f, ArrowPlus p) => ArrowPlus (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

(<+>) :: Cayley f p b c -> Cayley f p b c -> Cayley f p b c #

(Applicative f, ArrowZero p) => ArrowZero (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

zeroArrow :: Cayley f p b c #

(Invariant f, Invariant2 p) => Invariant2 (Cayley f p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cayley f p a b -> Cayley f p c d #

(Functor f, Choice p) => Choice (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

left' :: Cayley f p a b -> Cayley f p (Either a c) (Either b c) #

right' :: Cayley f p a b -> Cayley f p (Either c a) (Either c b) #

(Functor f, Cochoice p) => Cochoice (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

unleft :: Cayley f p (Either a d) (Either b d) -> Cayley f p a b #

unright :: Cayley f p (Either d a) (Either d b) -> Cayley f p a b #

(Functor f, Closed p) => Closed (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

closed :: Cayley f p a b -> Cayley f p (x -> a) (x -> b) #

(Functor f, Mapping p) => Mapping (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

map' :: Functor f0 => Cayley f p a b -> Cayley f p (f0 a) (f0 b) #

roam :: ((a -> b) -> s -> t) -> Cayley f p a b -> Cayley f p s t #

(Functor f, Costrong p) => Costrong (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

unfirst :: Cayley f p (a, d) (b, d) -> Cayley f p a b #

unsecond :: Cayley f p (d, a) (d, b) -> Cayley f p a b #

(Functor f, Strong p) => Strong (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

first' :: Cayley f p a b -> Cayley f p (a, c) (b, c) #

second' :: Cayley f p a b -> Cayley f p (c, a) (c, b) #

(Functor f, Traversing p) => Traversing (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

traverse' :: Traversable f0 => Cayley f p a b -> Cayley f p (f0 a) (f0 b) #

wander :: (forall (f0 :: Type -> Type). Applicative f0 => (a -> f0 b) -> s -> f0 t) -> Cayley f p a b -> Cayley f p s t #

(Functor f, Profunctor p) => Profunctor (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

dimap :: (a -> b) -> (c -> d) -> Cayley f p b c -> Cayley f p a d #

lmap :: (a -> b) -> Cayley f p b c -> Cayley f p a c #

rmap :: (b -> c) -> Cayley f p a b -> Cayley f p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Cayley f p a b -> Cayley f p a c #

(.#) :: forall a b c q. Coercible b a => Cayley f p b c -> q a b -> Cayley f p a c #

decomposeCodensity :: forall {k2} {k1} p (a :: k2) (b :: k1). Procompose (Codensity p) p a b -> p a b #

uncurryRan :: forall {k1} {k2} {k3} (p :: k1 -> k2 -> Type) (q :: k3 -> k1 -> Type) (r :: k3 -> k2 -> Type). (p :-> Ran q r) -> Procompose p q :-> r #

curryRan :: forall {k1} {k2} {k3} (p :: k1 -> k2 -> Type) (q :: k3 -> k1 -> Type) (r :: k3 -> k2 -> Type). (Procompose p q :-> r) -> p :-> Ran q r #

precomposeRan :: forall {k} (q :: Type -> Type -> Type) (p :: TYPE LiftedRep -> k -> Type). Profunctor q => Procompose q (Ran p (->)) :-> Ran p q #

decomposeRan :: forall {k1} {k2} {k3} (q :: k1 -> k2 -> Type) (p :: k1 -> k3 -> Type). Procompose (Ran q p) q :-> p #

The 2-morphism that defines a right Kan extension.

Note: When q is left adjoint to Ran q (->) then decomposeRan is the counit of the adjunction.

newtype Ran (p :: k -> k1 -> Type) (q :: k -> k2 -> Type) (a :: k1) (b :: k2) #

This represents the right Kan extension of a Profunctor q along a Profunctor p in a limited version of the 2-category of Profunctors where the only object is the category Hask, 1-morphisms are profunctors composed and compose with Profunctor composition, and 2-morphisms are just natural transformations.

Ran has a polymorphic kind since 5.6.

Constructors

Ran 

Fields

  • runRan :: forall (x :: k). p x a -> q x b
     

Instances

Instances details
ProfunctorFunctor (Ran p :: (Type -> Type -> Type) -> k -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Ran

Methods

promap :: forall (p0 :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p0 => (p0 :-> q) -> Ran p p0 :-> Ran p q #

p ~ q => Category (Ran p q :: k2 -> k2 -> TYPE LiftedRep)

Ran p p forms a Monad in the Profunctor 2-category, which is isomorphic to a Haskell Category instance.

Instance details

Defined in Data.Profunctor.Ran

Methods

id :: forall (a :: k). Ran p q a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Ran p q b c -> Ran p q a b -> Ran p q a c #

Category p => ProfunctorComonad (Ran p :: (Type -> Type -> Type) -> Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Ran

Methods

proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Ran p p0 :-> p0 #

produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Ran p p0 :-> Ran p (Ran p p0) #

(Invariant2 p, Invariant2 q) => Invariant2 (Ran p q)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Ran p q a b -> Ran p q c d #

(Profunctor p, Profunctor q) => Profunctor (Ran p q) 
Instance details

Defined in Data.Profunctor.Ran

Methods

dimap :: (a -> b) -> (c -> d) -> Ran p q b c -> Ran p q a d #

lmap :: (a -> b) -> Ran p q b c -> Ran p q a c #

rmap :: (b -> c) -> Ran p q a b -> Ran p q a c #

(#.) :: forall a b c q0. Coercible c b => q0 b c -> Ran p q a b -> Ran p q a c #

(.#) :: forall a b c q0. Coercible b a => Ran p q b c -> q0 a b -> Ran p q a c #

Profunctor q => Functor (Ran p q a) 
Instance details

Defined in Data.Profunctor.Ran

Methods

fmap :: (a0 -> b) -> Ran p q a a0 -> Ran p q a b #

(<$) :: a0 -> Ran p q a b -> Ran p q a a0 #

Invariant2 q => Invariant (Ran p q a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Ran p q a a0 -> Ran p q a b #

newtype Codensity (p :: k -> k1 -> Type) (a :: k1) (b :: k1) #

This represents the right Kan extension of a Profunctor p along itself. This provides a generalization of the "difference list" trick to profunctors.

Codensity has a polymorphic kind since 5.6.

Constructors

Codensity 

Fields

Instances

Instances details
Category (Codensity p :: k2 -> k2 -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Ran

Methods

id :: forall (a :: k). Codensity p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Codensity p b c -> Codensity p a b -> Codensity p a c #

Invariant2 p => Invariant2 (Codensity p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Codensity p a b -> Codensity p c d #

Profunctor p => Profunctor (Codensity p) 
Instance details

Defined in Data.Profunctor.Ran

Methods

dimap :: (a -> b) -> (c -> d) -> Codensity p b c -> Codensity p a d #

lmap :: (a -> b) -> Codensity p b c -> Codensity p a c #

rmap :: (b -> c) -> Codensity p a b -> Codensity p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Codensity p a b -> Codensity p a c #

(.#) :: forall a b c q. Coercible b a => Codensity p b c -> q a b -> Codensity p a c #

Profunctor p => Functor (Codensity p a) 
Instance details

Defined in Data.Profunctor.Ran

Methods

fmap :: (a0 -> b) -> Codensity p a a0 -> Codensity p a b #

(<$) :: a0 -> Codensity p a b -> Codensity p a a0 #

Invariant2 p => Invariant (Codensity p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Codensity p a a0 -> Codensity p a b #

mu :: forall {k1} (p :: k1 -> k1 -> Type). Category p => Procompose p p :-> p #

eta :: forall (p :: Type -> Type -> Type). (Profunctor p, Category p) => (->) :-> p #

a Category that is also a Profunctor is a Monoid in Prof

decomposeRift :: forall {k1} {k2} {k3} (p :: k1 -> k2 -> Type) (q :: k3 -> k2 -> Type). Procompose p (Rift p q) :-> q #

The 2-morphism that defines a left Kan lift.

Note: When p is right adjoint to Rift p (->) then decomposeRift is the counit of the adjunction.

cokleislis :: forall {k1} {k2} (f :: Type -> Type) (g :: k1 -> Type) (d :: k1) c (f' :: Type -> Type) (g' :: k2 -> Type) (d' :: k2) c'. Functor f => Iso (Procompose (Cokleisli f) (Cokleisli g) d c) (Procompose (Cokleisli f') (Cokleisli g') d' c') (Cokleisli (Compose f g) d c) (Cokleisli (Compose f' g') d' c') #

This is a variant on costars that uses Cokleisli instead of Costar.

cokleislis :: Functor f => Iso' (Procompose (Cokleisli f) (Cokleisli g) d c) (Cokleisli (Compose g f) d c)

kleislis :: forall (g :: Type -> Type) (f :: Type -> Type) d c (f' :: Type -> Type) (g' :: Type -> Type) d' c'. Monad g => Iso (Procompose (Kleisli f) (Kleisli g) d c) (Procompose (Kleisli f') (Kleisli g') d' c') (Kleisli (Compose g f) d c) (Kleisli (Compose g' f') d' c') #

This is a variant on stars that uses Kleisli instead of Star.

kleislis :: Monad f => Iso' (Procompose (Kleisli f) (Kleisli g) d c) (Kleisli (Compose f g) d c)

costars :: forall {k1} {k2} (f :: Type -> Type) (g :: k1 -> Type) (d :: k1) c (f' :: Type -> Type) (g' :: k2 -> Type) (d' :: k2) c'. Functor f => Iso (Procompose (Costar f) (Costar g) d c) (Procompose (Costar f') (Costar g') d' c') (Costar (Compose f g) d c) (Costar (Compose f' g') d' c') #

Profunctor composition generalizes Functor composition in two ways.

This is the second, which shows that exists b. (f a -> b, g b -> c) is isomorphic to g (f a) -> c.

costars :: Functor f => Iso' (Procompose (Costar f) (Costar g) d c) (Costar (Compose g f) d c)

stars :: forall {k1} {k2} (g :: Type -> Type) (f :: k1 -> Type) d (c :: k1) (f' :: k2 -> Type) (g' :: Type -> Type) d' (c' :: k2). Functor g => Iso (Procompose (Star f) (Star g) d c) (Procompose (Star f') (Star g') d' c') (Star (Compose g f) d c) (Star (Compose g' f') d' c') #

Profunctor composition generalizes Functor composition in two ways.

This is the first, which shows that exists b. (a -> f b, b -> g c) is isomorphic to a -> f (g c).

stars :: Functor f => Iso' (Procompose (Star f) (Star g) d c) (Star (Compose f g) d c)

assoc :: forall {k1} {k2} {k3} {k4} {k5} {k6} (p :: k1 -> k2 -> Type) (q :: k3 -> k1 -> Type) (r :: k4 -> k3 -> Type) (a :: k4) (b :: k2) (x :: k5 -> k2 -> Type) (y :: k6 -> k5 -> Type) (z :: k4 -> k6 -> Type). Iso (Procompose p (Procompose q r) a b) (Procompose x (Procompose y z) a b) (Procompose (Procompose p q) r a b) (Procompose (Procompose x y) z a b) #

The associator for Profunctor composition.

This provides an Iso for the lens package that witnesses the isomorphism between Procompose p (Procompose q r) a b and Procompose (Procompose p q) r a b, which arises because Prof is only a bicategory, rather than a strict 2-category.

idr :: forall {k} (q :: Type -> Type -> Type) d c (r :: Type -> k -> Type) d' (c' :: k). Profunctor q => Iso (Procompose q (->) d c) (Procompose r (->) d' c') (q d c) (r d' c') #

(->) functions as a lax identity for Profunctor composition.

This provides an Iso for the lens package that witnesses the isomorphism between Procompose q (->) d c and q d c, which is the right identity law.

idr :: Profunctor q => Iso' (Procompose q (->) d c) (q d c)

idl :: forall {k} (q :: Type -> Type -> Type) d c (r :: k -> Type -> Type) (d' :: k) c'. Profunctor q => Iso (Procompose (->) q d c) (Procompose (->) r d' c') (q d c) (r d' c') #

(->) functions as a lax identity for Profunctor composition.

This provides an Iso for the lens package that witnesses the isomorphism between Procompose (->) q d c and q d c, which is the left identity law.

idl :: Profunctor q => Iso' (Procompose (->) q d c) (q d c)

procomposed :: forall {k} p (a :: k) (b :: k). Category p => Procompose p p a b -> p a b #

data Procompose (p :: k -> k1 -> Type) (q :: k2 -> k -> Type) (d :: k2) (c :: k1) where #

Procompose p q is the Profunctor composition of the Profunctors p and q.

For a good explanation of Profunctor composition in Haskell see Dan Piponi's article:

http://blog.sigfpe.com/2011/07/profunctors-in-haskell.html

Procompose has a polymorphic kind since 5.6.

Constructors

Procompose :: forall {k} {k1} {k2} (p :: k -> k1 -> Type) (x :: k) (c :: k1) (q :: k2 -> k -> Type) (d :: k2). p x c -> q d x -> Procompose p q d c 

Instances

Instances details
ProfunctorFunctor (Procompose p :: (Type -> Type -> Type) -> Type -> k1 -> Type) 
Instance details

Defined in Data.Profunctor.Composition

Methods

promap :: forall (p0 :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p0 => (p0 :-> q) -> Procompose p p0 :-> Procompose p q #

Category p => ProfunctorMonad (Procompose p :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Composition

Methods

proreturn :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => p0 :-> Procompose p p0 #

projoin :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Procompose p (Procompose p p0) :-> Procompose p p0 #

ProfunctorAdjunction (Procompose p :: (Type -> Type -> Type) -> Type -> Type -> Type) (Rift p :: (Type -> Type -> Type) -> Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Composition

Methods

unit :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => p0 :-> Rift p (Procompose p p0) #

counit :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Procompose p (Rift p p0) :-> p0 #

(Invariant2 p, Invariant2 q) => Invariant2 (Procompose p q)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Procompose p q a b -> Procompose p q c d #

(Choice p, Choice q) => Choice (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

left' :: Procompose p q a b -> Procompose p q (Either a c) (Either b c) #

right' :: Procompose p q a b -> Procompose p q (Either c a) (Either c b) #

(Closed p, Closed q) => Closed (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

closed :: Procompose p q a b -> Procompose p q (x -> a) (x -> b) #

(Mapping p, Mapping q) => Mapping (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

map' :: Functor f => Procompose p q a b -> Procompose p q (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Procompose p q a b -> Procompose p q s t #

(Corepresentable p, Corepresentable q) => Corepresentable (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Associated Types

type Corep (Procompose p q) :: Type -> Type #

Methods

cotabulate :: (Corep (Procompose p q) d -> c) -> Procompose p q d c #

(Representable p, Representable q) => Representable (Procompose p q)

The composition of two Representable Profunctors is Representable by the composition of their representations.

Instance details

Defined in Data.Profunctor.Composition

Associated Types

type Rep (Procompose p q) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Procompose p q) c) -> Procompose p q d c #

(Corepresentable p, Corepresentable q) => Costrong (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

unfirst :: Procompose p q (a, d) (b, d) -> Procompose p q a b #

unsecond :: Procompose p q (d, a) (d, b) -> Procompose p q a b #

(Strong p, Strong q) => Strong (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

first' :: Procompose p q a b -> Procompose p q (a, c) (b, c) #

second' :: Procompose p q a b -> Procompose p q (c, a) (c, b) #

(Traversing p, Traversing q) => Traversing (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

traverse' :: Traversable f => Procompose p q a b -> Procompose p q (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Procompose p q a b -> Procompose p q s t #

(Profunctor p, Profunctor q) => Profunctor (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

dimap :: (a -> b) -> (c -> d) -> Procompose p q b c -> Procompose p q a d #

lmap :: (a -> b) -> Procompose p q b c -> Procompose p q a c #

rmap :: (b -> c) -> Procompose p q a b -> Procompose p q a c #

(#.) :: forall a b c q0. Coercible c b => q0 b c -> Procompose p q a b -> Procompose p q a c #

(.#) :: forall a b c q0. Coercible b a => Procompose p q b c -> q0 a b -> Procompose p q a c #

(Cosieve p f, Cosieve q g) => Cosieve (Procompose p q) (Compose f g) 
Instance details

Defined in Data.Profunctor.Composition

Methods

cosieve :: Procompose p q a b -> Compose f g a -> b #

(Sieve p f, Sieve q g) => Sieve (Procompose p q) (Compose g f) 
Instance details

Defined in Data.Profunctor.Composition

Methods

sieve :: Procompose p q a b -> a -> Compose g f b #

Profunctor p => Functor (Procompose p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Procompose p q a a0 -> Procompose p q a b #

(<$) :: a0 -> Procompose p q a b -> Procompose p q a a0 #

Invariant2 p => Invariant (Procompose p q a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Procompose p q a a0 -> Procompose p q a b #

type Corep (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

type Corep (Procompose p q) = Compose (Corep p) (Corep q)
type Rep (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

type Rep (Procompose p q) = Compose (Rep q) (Rep p)

newtype Rift (p :: k -> k1 -> Type) (q :: k2 -> k1 -> Type) (a :: k2) (b :: k) #

This represents the right Kan lift of a Profunctor q along a Profunctor p in a limited version of the 2-category of Profunctors where the only object is the category Hask, 1-morphisms are profunctors composed and compose with Profunctor composition, and 2-morphisms are just natural transformations.

Rift has a polymorphic kind since 5.6.

Constructors

Rift 

Fields

  • runRift :: forall (x :: k1). p b x -> q a x
     

Instances

Instances details
ProfunctorFunctor (Rift p :: (Type -> Type -> Type) -> Type -> k1 -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Composition

Methods

promap :: forall (p0 :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p0 => (p0 :-> q) -> Rift p p0 :-> Rift p q #

p ~ q => Category (Rift p q :: k1 -> k1 -> TYPE LiftedRep)

Rift p p forms a Monad in the Profunctor 2-category, which is isomorphic to a Haskell Category instance.

Instance details

Defined in Data.Profunctor.Composition

Methods

id :: forall (a :: k). Rift p q a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Rift p q b c -> Rift p q a b -> Rift p q a c #

Category p => ProfunctorComonad (Rift p :: (Type -> Type -> Type) -> Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Composition

Methods

proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Rift p p0 :-> p0 #

produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Rift p p0 :-> Rift p (Rift p p0) #

ProfunctorAdjunction (Procompose p :: (Type -> Type -> Type) -> Type -> Type -> Type) (Rift p :: (Type -> Type -> Type) -> Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Composition

Methods

unit :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => p0 :-> Rift p (Procompose p p0) #

counit :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Procompose p (Rift p p0) :-> p0 #

(Invariant2 p, Invariant2 q) => Invariant2 (Rift p q)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Rift p q a b -> Rift p q c d #

(Profunctor p, Profunctor q) => Profunctor (Rift p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

dimap :: (a -> b) -> (c -> d) -> Rift p q b c -> Rift p q a d #

lmap :: (a -> b) -> Rift p q b c -> Rift p q a c #

rmap :: (b -> c) -> Rift p q a b -> Rift p q a c #

(#.) :: forall a b c q0. Coercible c b => q0 b c -> Rift p q a b -> Rift p q a c #

(.#) :: forall a b c q0. Coercible b a => Rift p q b c -> q0 a b -> Rift p q a c #

Profunctor p => Functor (Rift p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Rift p q a a0 -> Rift p q a b #

(<$) :: a0 -> Rift p q a b -> Rift p q a a0 #

Invariant2 p => Invariant (Rift p q a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Rift p q a a0 -> Rift p q a b #

coprepCounit :: forall {k} f (a :: k). f a -> Coprep (Costar f) a #

coprepUnit :: forall {k} (p :: k -> Type -> Type). p :-> Costar (Coprep p) #

uncoprepAdj :: forall {k} (p :: k -> Type -> Type) f (a :: k). (p :-> Costar f) -> f a -> Coprep p a #

coprepAdj :: forall {k} f (p :: k -> Type -> Type). (forall (a :: k). f a -> Coprep p a) -> p :-> Costar f #

Coprep -| Costar :: [Hask, Hask]^op -> Prof

Like all adjunctions this gives rise to a monad and a comonad.

This gives rise to a monad on Prof (Costar.Coprep) and a comonad on [Hask, Hask]^op given by (Coprep.Costar) which is a monad in [Hask,Hask]

prepCounit :: forall {k} f (a :: k). Prep (Star f) a -> f a #

prepUnit :: forall {k} (p :: Type -> k -> Type). p :-> Star (Prep p) #

unprepAdj :: forall {k} (p :: Type -> k -> Type) g (a :: k). (p :-> Star g) -> Prep p a -> g a #

prepAdj :: forall {k1} (p :: Type -> k1 -> Type) g. (forall (a :: k1). Prep p a -> g a) -> p :-> Star g #

cotabulated :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) d c d' c'. (Corepresentable p, Corepresentable q) => Iso (Corep p d -> c) (Corep q d' -> c') (p d c) (q d' c') #

cotabulate and cosieve form two halves of an isomorphism.

This can be used with the combinators from the lens package.

cotabulated :: Corep f p => Iso' (f d -> c) (p d c)

closedCorep :: Corepresentable p => p a b -> p (x -> a) (x -> b) #

Default definition for closed given that p is Corepresentable

unsecondCorep :: Corepresentable p => p (d, a) (d, b) -> p a b #

Default definition for unsecond given that p is Corepresentable.

unfirstCorep :: Corepresentable p => p (a, d) (b, d) -> p a b #

Default definition for unfirst given that p is Corepresentable.

tabulated :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type) d c d' c'. (Representable p, Representable q) => Iso (d -> Rep p c) (d' -> Rep q c') (p d c) (q d' c') #

tabulate and sieve form two halves of an isomorphism.

This can be used with the combinators from the lens package.

tabulated :: Representable p => Iso' (d -> Rep p c) (p d c)

secondRep :: Representable p => p a b -> p (c, a) (c, b) #

Default definition for second' given that p is Representable.

firstRep :: Representable p => p a b -> p (a, c) (b, c) #

Default definition for first' given that p is Representable.

type family Rep (p :: Type -> Type -> Type) :: Type -> Type #

Instances

Instances details
type Rep (Kleisli m) 
Instance details

Defined in Data.Profunctor.Rep

type Rep (Kleisli m) = m
type Rep (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Rep

type Rep (Forget r :: Type -> Type -> TYPE LiftedRep) = Const r :: Type -> Type
type Rep (Star f) 
Instance details

Defined in Data.Profunctor.Rep

type Rep (Star f) = f
type Rep (->) 
Instance details

Defined in Data.Profunctor.Rep

type Rep (->) = Identity
type Rep (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

type Rep (Procompose p q) = Compose (Rep q) (Rep p)

class (Sieve p (Rep p), Strong p) => Representable (p :: Type -> Type -> Type) where #

A Profunctor p is Representable if there exists a Functor f such that p d c is isomorphic to d -> f c.

Associated Types

type Rep (p :: Type -> Type -> Type) :: Type -> Type #

Methods

tabulate :: (d -> Rep p c) -> p d c #

Instances

Instances details
(Monad m, Functor m) => Representable (Kleisli m) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Rep (Kleisli m) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Kleisli m) c) -> Kleisli m d c #

Representable (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Rep (Forget r) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Forget r) c) -> Forget r d c #

Functor f => Representable (Star f) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Rep (Star f) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Star f) c) -> Star f d c #

Representable (->) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Rep (->) :: Type -> Type #

Methods

tabulate :: (d -> Rep (->) c) -> d -> c #

(Representable p, Representable q) => Representable (Procompose p q)

The composition of two Representable Profunctors is Representable by the composition of their representations.

Instance details

Defined in Data.Profunctor.Composition

Associated Types

type Rep (Procompose p q) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Procompose p q) c) -> Procompose p q d c #

type family Corep (p :: Type -> Type -> Type) :: Type -> Type #

Instances

Instances details
type Corep (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Rep

type Corep (Tagged :: Type -> Type -> Type) = Proxy :: Type -> Type
type Corep (Cokleisli w) 
Instance details

Defined in Data.Profunctor.Rep

type Corep (Cokleisli w) = w
type Corep (Costar f) 
Instance details

Defined in Data.Profunctor.Rep

type Corep (Costar f) = f
type Corep (->) 
Instance details

Defined in Data.Profunctor.Rep

type Corep (->) = Identity
type Corep (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

type Corep (Procompose p q) = Compose (Corep p) (Corep q)

class (Cosieve p (Corep p), Costrong p) => Corepresentable (p :: Type -> Type -> Type) where #

A Profunctor p is Corepresentable if there exists a Functor f such that p d c is isomorphic to f d -> c.

Associated Types

type Corep (p :: Type -> Type -> Type) :: Type -> Type #

Methods

cotabulate :: (Corep p d -> c) -> p d c #

Instances

Instances details
Corepresentable (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Corep Tagged :: Type -> Type #

Methods

cotabulate :: (Corep Tagged d -> c) -> Tagged d c #

Functor w => Corepresentable (Cokleisli w) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Corep (Cokleisli w) :: Type -> Type #

Methods

cotabulate :: (Corep (Cokleisli w) d -> c) -> Cokleisli w d c #

Functor f => Corepresentable (Costar f) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Corep (Costar f) :: Type -> Type #

Methods

cotabulate :: (Corep (Costar f) d -> c) -> Costar f d c #

Corepresentable (->) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Corep (->) :: Type -> Type #

Methods

cotabulate :: (Corep (->) d -> c) -> d -> c #

(Corepresentable p, Corepresentable q) => Corepresentable (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Associated Types

type Corep (Procompose p q) :: Type -> Type #

Methods

cotabulate :: (Corep (Procompose p q) d -> c) -> Procompose p q d c #

data Prep (p :: Type -> k -> Type) (a :: k) where #

Prep -| Star :: [Hask, Hask] -> Prof

This gives rise to a monad in Prof, (Star.Prep), and a comonad in [Hask,Hask] (Prep.Star)

Prep has a polymorphic kind since 5.6.

Constructors

Prep :: forall {k} x (p :: Type -> k -> Type) (a :: k). x -> p x a -> Prep p a 

Instances

Instances details
(Applicative (Rep p), Representable p) => Applicative (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

pure :: a -> Prep p a #

(<*>) :: Prep p (a -> b) -> Prep p a -> Prep p b #

liftA2 :: (a -> b -> c) -> Prep p a -> Prep p b -> Prep p c #

(*>) :: Prep p a -> Prep p b -> Prep p b #

(<*) :: Prep p a -> Prep p b -> Prep p a #

Profunctor p => Functor (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

fmap :: (a -> b) -> Prep p a -> Prep p b #

(<$) :: a -> Prep p b -> Prep p a #

(Monad (Rep p), Representable p) => Monad (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

(>>=) :: Prep p a -> (a -> Prep p b) -> Prep p b #

(>>) :: Prep p a -> Prep p b -> Prep p b #

return :: a -> Prep p a #

Invariant2 p => Invariant (Prep p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Prep p a -> Prep p b #

newtype Coprep (p :: k -> Type -> Type) (a :: k) #

Prep has a polymorphic kind since 5.6.

Constructors

Coprep 

Fields

Instances

Instances details
Profunctor p => Functor (Coprep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

fmap :: (a -> b) -> Coprep p a -> Coprep p b #

(<$) :: a -> Coprep p b -> Coprep p a #

Invariant2 p => Invariant (Coprep p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> Coprep p a -> Coprep p b #

class (Profunctor p, Functor f) => Sieve (p :: Type -> Type -> Type) (f :: Type -> Type) | p -> f where #

A Profunctor p is a Sieve on f if it is a subprofunctor of Star f.

That is to say it is a subset of Hom(-,f=) closed under lmap and rmap.

Alternately, you can view it as a sieve in the comma category Hask/f.

Methods

sieve :: p a b -> a -> f b #

Instances

Instances details
(Monad m, Functor m) => Sieve (Kleisli m) m 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: Kleisli m a b -> a -> m b #

Functor f => Sieve (Star f) f 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: Star f a b -> a -> f b #

Sieve (->) Identity 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: (a -> b) -> a -> Identity b #

Sieve (Forget r :: Type -> Type -> TYPE LiftedRep) (Const r :: Type -> Type) 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: Forget r a b -> a -> Const r b #

(Sieve p f, Sieve q g) => Sieve (Procompose p q) (Compose g f) 
Instance details

Defined in Data.Profunctor.Composition

Methods

sieve :: Procompose p q a b -> a -> Compose g f b #

class (Profunctor p, Functor f) => Cosieve (p :: Type -> Type -> Type) (f :: Type -> Type) | p -> f where #

A Profunctor p is a Cosieve on f if it is a subprofunctor of Costar f.

That is to say it is a subset of Hom(f-,=) closed under lmap and rmap.

Alternately, you can view it as a cosieve in the comma category f/Hask.

Methods

cosieve :: p a b -> f a -> b #

Instances

Instances details
Cosieve (Tagged :: Type -> Type -> Type) (Proxy :: Type -> Type) 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: Tagged a b -> Proxy a -> b #

Functor w => Cosieve (Cokleisli w) w 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: Cokleisli w a b -> w a -> b #

Functor f => Cosieve (Costar f) f 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: Costar f a b -> f a -> b #

Cosieve (->) Identity 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: (a -> b) -> Identity a -> b #

(Cosieve p f, Cosieve q g) => Cosieve (Procompose p q) (Compose f g) 
Instance details

Defined in Data.Profunctor.Composition

Methods

cosieve :: Procompose p q a b -> Compose f g a -> b #

closedMapping :: Mapping p => p a b -> p (x -> a) (x -> b) #

traverseMapping :: (Mapping p, Functor f) => p a b -> p (f a) (f b) #

wanderMapping :: Mapping p => (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> p a b -> p s t #

class (Traversing p, Closed p) => Mapping (p :: Type -> Type -> Type) where #

Minimal complete definition

Nothing

Methods

map' :: Functor f => p a b -> p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> p a b -> p s t #

Instances

Instances details
(Monad m, Distributive m) => Mapping (Kleisli m) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f => Kleisli m a b -> Kleisli m (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Kleisli m a b -> Kleisli m s t #

Profunctor p => Mapping (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f => CofreeMapping p a b -> CofreeMapping p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> CofreeMapping p a b -> CofreeMapping p s t #

Mapping (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f => FreeMapping p a b -> FreeMapping p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> FreeMapping p a b -> FreeMapping p s t #

Mapping p => Mapping (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

map' :: Functor f => Coyoneda p a b -> Coyoneda p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Coyoneda p a b -> Coyoneda p s t #

Mapping p => Mapping (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

map' :: Functor f => Yoneda p a b -> Yoneda p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Yoneda p a b -> Yoneda p s t #

(Applicative m, Distributive m) => Mapping (Star m) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f => Star m a b -> Star m (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Star m a b -> Star m s t #

Mapping (->) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f => (a -> b) -> f a -> f b #

roam :: ((a -> b) -> s -> t) -> (a -> b) -> s -> t #

Mapping p => Mapping (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

map' :: Functor f => WrappedProfunctor p a b -> WrappedProfunctor p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> WrappedProfunctor p a b -> WrappedProfunctor p s t #

(Functor f, Mapping p) => Mapping (Tannen f p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f0 => Tannen f p a b -> Tannen f p (f0 a) (f0 b) #

roam :: ((a -> b) -> s -> t) -> Tannen f p a b -> Tannen f p s t #

(Functor f, Mapping p) => Mapping (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

map' :: Functor f0 => Cayley f p a b -> Cayley f p (f0 a) (f0 b) #

roam :: ((a -> b) -> s -> t) -> Cayley f p a b -> Cayley f p s t #

(Mapping p, Mapping q) => Mapping (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

map' :: Functor f => Procompose p q a b -> Procompose p q (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Procompose p q a b -> Procompose p q s t #

newtype CofreeMapping (p :: Type -> Type -> Type) a b #

Constructors

CofreeMapping 

Fields

Instances

Instances details
ProfunctorComonad CofreeMapping 
Instance details

Defined in Data.Profunctor.Mapping

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeMapping p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeMapping p :-> CofreeMapping (CofreeMapping p) #

ProfunctorFunctor CofreeMapping 
Instance details

Defined in Data.Profunctor.Mapping

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CofreeMapping p :-> CofreeMapping q #

Invariant2 p => Invariant2 (CofreeMapping p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CofreeMapping p a b -> CofreeMapping p c d #

Profunctor p => Choice (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

left' :: CofreeMapping p a b -> CofreeMapping p (Either a c) (Either b c) #

right' :: CofreeMapping p a b -> CofreeMapping p (Either c a) (Either c b) #

Profunctor p => Closed (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

closed :: CofreeMapping p a b -> CofreeMapping p (x -> a) (x -> b) #

Profunctor p => Mapping (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f => CofreeMapping p a b -> CofreeMapping p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> CofreeMapping p a b -> CofreeMapping p s t #

Profunctor p => Strong (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

first' :: CofreeMapping p a b -> CofreeMapping p (a, c) (b, c) #

second' :: CofreeMapping p a b -> CofreeMapping p (c, a) (c, b) #

Profunctor p => Traversing (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

traverse' :: Traversable f => CofreeMapping p a b -> CofreeMapping p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> CofreeMapping p a b -> CofreeMapping p s t #

Profunctor p => Profunctor (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

dimap :: (a -> b) -> (c -> d) -> CofreeMapping p b c -> CofreeMapping p a d #

lmap :: (a -> b) -> CofreeMapping p b c -> CofreeMapping p a c #

rmap :: (b -> c) -> CofreeMapping p a b -> CofreeMapping p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> CofreeMapping p a b -> CofreeMapping p a c #

(.#) :: forall a b c q. Coercible b a => CofreeMapping p b c -> q a b -> CofreeMapping p a c #

data FreeMapping (p :: Type -> Type -> Type) a b where #

FreeMapping -| CofreeMapping

Constructors

FreeMapping :: forall (f :: Type -> Type) y b (p :: Type -> Type -> Type) x a. Functor f => (f y -> b) -> p x y -> (a -> f x) -> FreeMapping p a b 

Instances

Instances details
ProfunctorMonad FreeMapping 
Instance details

Defined in Data.Profunctor.Mapping

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> FreeMapping p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => FreeMapping (FreeMapping p) :-> FreeMapping p #

ProfunctorFunctor FreeMapping 
Instance details

Defined in Data.Profunctor.Mapping

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> FreeMapping p :-> FreeMapping q #

Invariant2 (FreeMapping p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> FreeMapping p a b -> FreeMapping p c d #

Choice (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

left' :: FreeMapping p a b -> FreeMapping p (Either a c) (Either b c) #

right' :: FreeMapping p a b -> FreeMapping p (Either c a) (Either c b) #

Closed (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

closed :: FreeMapping p a b -> FreeMapping p (x -> a) (x -> b) #

Mapping (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f => FreeMapping p a b -> FreeMapping p (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> FreeMapping p a b -> FreeMapping p s t #

Strong (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

first' :: FreeMapping p a b -> FreeMapping p (a, c) (b, c) #

second' :: FreeMapping p a b -> FreeMapping p (c, a) (c, b) #

Traversing (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

traverse' :: Traversable f => FreeMapping p a b -> FreeMapping p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> FreeMapping p a b -> FreeMapping p s t #

Profunctor (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

dimap :: (a -> b) -> (c -> d) -> FreeMapping p b c -> FreeMapping p a d #

lmap :: (a -> b) -> FreeMapping p b c -> FreeMapping p a c #

rmap :: (b -> c) -> FreeMapping p a b -> FreeMapping p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> FreeMapping p a b -> FreeMapping p a c #

(.#) :: forall a b c q. Coercible b a => FreeMapping p b c -> q a b -> FreeMapping p a c #

Functor (FreeMapping p a) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

fmap :: (a0 -> b) -> FreeMapping p a a0 -> FreeMapping p a b #

(<$) :: a0 -> FreeMapping p a b -> FreeMapping p a a0 #

Invariant (FreeMapping p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> FreeMapping p a a0 -> FreeMapping p a b #

rightTraversing :: Traversing p => p a b -> p (Either c a) (Either c b) #

leftTraversing :: Traversing p => p a b -> p (Either a c) (Either b c) #

rmapWandering :: Traversing p => (b -> c) -> p a b -> p a c #

rmapWandering is the same as the default produced from dimapWandering.

lmapWandering :: Traversing p => (a -> b) -> p b c -> p a c #

lmapWandering may be a more efficient implementation of lmap than the default produced from dimapWandering.

dimapWandering :: Traversing p => (a' -> a) -> (b -> b') -> p a b -> p a' b' #

A definition of dimap for Traversing instances that define an explicit wander.

secondTraversing :: Traversing p => p a b -> p (c, a) (c, b) #

firstTraversing :: Traversing p => p a b -> p (a, c) (b, c) #

class (Choice p, Strong p) => Traversing (p :: Type -> Type -> Type) where #

Note: Definitions in terms of wander are much more efficient!

Minimal complete definition

wander | traverse'

Methods

traverse' :: Traversable f => p a b -> p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> p a b -> p s t #

This combinator is mutually defined in terms of traverse'

Instances

Instances details
Monad m => Traversing (Kleisli m) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => Kleisli m a b -> Kleisli m (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Kleisli m a b -> Kleisli m s t #

Profunctor p => Traversing (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

traverse' :: Traversable f => CofreeMapping p a b -> CofreeMapping p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> CofreeMapping p a b -> CofreeMapping p s t #

Traversing (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

traverse' :: Traversable f => FreeMapping p a b -> FreeMapping p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> FreeMapping p a b -> FreeMapping p s t #

Profunctor p => Traversing (CofreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => CofreeTraversing p a b -> CofreeTraversing p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> CofreeTraversing p a b -> CofreeTraversing p s t #

Traversing (FreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => FreeTraversing p a b -> FreeTraversing p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> FreeTraversing p a b -> FreeTraversing p s t #

Traversing p => Traversing (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

traverse' :: Traversable f => Coyoneda p a b -> Coyoneda p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Coyoneda p a b -> Coyoneda p s t #

Traversing p => Traversing (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

traverse' :: Traversable f => Yoneda p a b -> Yoneda p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Yoneda p a b -> Yoneda p s t #

Monoid m => Traversing (Forget m :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => Forget m a b -> Forget m (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Forget m a b -> Forget m s t #

Applicative m => Traversing (Star m) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => Star m a b -> Star m (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Star m a b -> Star m s t #

Traversing (->) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => (a -> b) -> f a -> f b #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> (a -> b) -> s -> t #

Traversing p => Traversing (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

traverse' :: Traversable f => WrappedProfunctor p a b -> WrappedProfunctor p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> WrappedProfunctor p a b -> WrappedProfunctor p s t #

(Functor f, Traversing p) => Traversing (Tannen f p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f0 => Tannen f p a b -> Tannen f p (f0 a) (f0 b) #

wander :: (forall (f0 :: Type -> Type). Applicative f0 => (a -> f0 b) -> s -> f0 t) -> Tannen f p a b -> Tannen f p s t #

(Functor f, Traversing p) => Traversing (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

traverse' :: Traversable f0 => Cayley f p a b -> Cayley f p (f0 a) (f0 b) #

wander :: (forall (f0 :: Type -> Type). Applicative f0 => (a -> f0 b) -> s -> f0 t) -> Cayley f p a b -> Cayley f p s t #

(Traversing p, Traversing q) => Traversing (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

traverse' :: Traversable f => Procompose p q a b -> Procompose p q (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Procompose p q a b -> Procompose p q s t #

newtype CofreeTraversing (p :: Type -> Type -> Type) a b #

Constructors

CofreeTraversing 

Fields

Instances

Instances details
ProfunctorComonad CofreeTraversing 
Instance details

Defined in Data.Profunctor.Traversing

ProfunctorFunctor CofreeTraversing 
Instance details

Defined in Data.Profunctor.Traversing

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CofreeTraversing p :-> CofreeTraversing q #

Invariant2 p => Invariant2 (CofreeTraversing p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CofreeTraversing p a b -> CofreeTraversing p c d #

Profunctor p => Choice (CofreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

left' :: CofreeTraversing p a b -> CofreeTraversing p (Either a c) (Either b c) #

right' :: CofreeTraversing p a b -> CofreeTraversing p (Either c a) (Either c b) #

Profunctor p => Strong (CofreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

first' :: CofreeTraversing p a b -> CofreeTraversing p (a, c) (b, c) #

second' :: CofreeTraversing p a b -> CofreeTraversing p (c, a) (c, b) #

Profunctor p => Traversing (CofreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => CofreeTraversing p a b -> CofreeTraversing p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> CofreeTraversing p a b -> CofreeTraversing p s t #

Profunctor p => Profunctor (CofreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

dimap :: (a -> b) -> (c -> d) -> CofreeTraversing p b c -> CofreeTraversing p a d #

lmap :: (a -> b) -> CofreeTraversing p b c -> CofreeTraversing p a c #

rmap :: (b -> c) -> CofreeTraversing p a b -> CofreeTraversing p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> CofreeTraversing p a b -> CofreeTraversing p a c #

(.#) :: forall a b c q. Coercible b a => CofreeTraversing p b c -> q a b -> CofreeTraversing p a c #

data FreeTraversing (p :: Type -> Type -> Type) a b where #

FreeTraversing -| CofreeTraversing

Constructors

FreeTraversing :: forall (f :: Type -> Type) y b (p :: Type -> Type -> Type) x a. Traversable f => (f y -> b) -> p x y -> (a -> f x) -> FreeTraversing p a b 

Instances

Instances details
ProfunctorMonad FreeTraversing 
Instance details

Defined in Data.Profunctor.Traversing

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> FreeTraversing p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => FreeTraversing (FreeTraversing p) :-> FreeTraversing p #

ProfunctorFunctor FreeTraversing 
Instance details

Defined in Data.Profunctor.Traversing

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> FreeTraversing p :-> FreeTraversing q #

Invariant2 (FreeTraversing p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> FreeTraversing p a b -> FreeTraversing p c d #

Choice (FreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

left' :: FreeTraversing p a b -> FreeTraversing p (Either a c) (Either b c) #

right' :: FreeTraversing p a b -> FreeTraversing p (Either c a) (Either c b) #

Strong (FreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

first' :: FreeTraversing p a b -> FreeTraversing p (a, c) (b, c) #

second' :: FreeTraversing p a b -> FreeTraversing p (c, a) (c, b) #

Traversing (FreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => FreeTraversing p a b -> FreeTraversing p (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> FreeTraversing p a b -> FreeTraversing p s t #

Profunctor (FreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

dimap :: (a -> b) -> (c -> d) -> FreeTraversing p b c -> FreeTraversing p a d #

lmap :: (a -> b) -> FreeTraversing p b c -> FreeTraversing p a c #

rmap :: (b -> c) -> FreeTraversing p a b -> FreeTraversing p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> FreeTraversing p a b -> FreeTraversing p a c #

(.#) :: forall a b c q. Coercible b a => FreeTraversing p b c -> q a b -> FreeTraversing p a c #

Functor (FreeTraversing p a) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

fmap :: (a0 -> b) -> FreeTraversing p a a0 -> FreeTraversing p a b #

(<$) :: a0 -> FreeTraversing p a b -> FreeTraversing p a a0 #

Invariant (FreeTraversing p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> FreeTraversing p a a0 -> FreeTraversing p a b #

cotambaraSum :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Cochoice p => (p :-> q) -> p :-> CotambaraSum q #

untambaraSum :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> TambaraSum q) -> p :-> q #

tambaraSum :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Choice p => (p :-> q) -> p :-> TambaraSum q #

class Profunctor p => Choice (p :: Type -> Type -> Type) where #

The generalization of Costar of Functor that is strong with respect to Either.

Note: This is also a notion of strength, except with regards to another monoidal structure that we can choose to equip Hask with: the cocartesian coproduct.

Minimal complete definition

left' | right'

Methods

left' :: p a b -> p (Either a c) (Either b c) #

Laws:

left'dimap swapE swapE . right' where
  swapE :: Either a b -> Either b a
  swapE = either Right Left
rmap Leftlmap Left . left'
lmap (right f) . left'rmap (right f) . left'
left' . left'dimap assocE unassocE . left' where
  assocE :: Either (Either a b) c -> Either a (Either b c)
  assocE (Left (Left a)) = Left a
  assocE (Left (Right b)) = Right (Left b)
  assocE (Right c) = Right (Right c)
  unassocE :: Either a (Either b c) -> Either (Either a b) c
  unassocE (Left a) = Left (Left a)
  unassocE (Right (Left b)) = Left (Right b)
  unassocE (Right (Right c)) = Right c

right' :: p a b -> p (Either c a) (Either c b) #

Laws:

right'dimap swapE swapE . left' where
  swapE :: Either a b -> Either b a
  swapE = either Right Left
rmap Rightlmap Right . right'
lmap (left f) . right'rmap (left f) . right'
right' . right'dimap unassocE assocE . right' where
  assocE :: Either (Either a b) c -> Either a (Either b c)
  assocE (Left (Left a)) = Left a
  assocE (Left (Right b)) = Right (Left b)
  assocE (Right c) = Right (Right c)
  unassocE :: Either a (Either b c) -> Either (Either a b) c
  unassocE (Left a) = Left (Left a)
  unassocE (Right (Left b)) = Left (Right b)
  unassocE (Right (Right c)) = Right c

Instances

Instances details
Monad m => Choice (Kleisli m) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Kleisli m a b -> Kleisli m (Either a c) (Either b c) #

right' :: Kleisli m a b -> Kleisli m (Either c a) (Either c b) #

Choice (PastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: PastroSum p a b -> PastroSum p (Either a c) (Either b c) #

right' :: PastroSum p a b -> PastroSum p (Either c a) (Either c b) #

Profunctor p => Choice (TambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: TambaraSum p a b -> TambaraSum p (Either a c) (Either b c) #

right' :: TambaraSum p a b -> TambaraSum p (Either c a) (Either c b) #

Profunctor p => Choice (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

left' :: CofreeMapping p a b -> CofreeMapping p (Either a c) (Either b c) #

right' :: CofreeMapping p a b -> CofreeMapping p (Either c a) (Either c b) #

Choice (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

left' :: FreeMapping p a b -> FreeMapping p (Either a c) (Either b c) #

right' :: FreeMapping p a b -> FreeMapping p (Either c a) (Either c b) #

Choice p => Choice (Tambara p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Tambara p a b -> Tambara p (Either a c) (Either b c) #

right' :: Tambara p a b -> Tambara p (Either c a) (Either c b) #

Profunctor p => Choice (CofreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

left' :: CofreeTraversing p a b -> CofreeTraversing p (Either a c) (Either b c) #

right' :: CofreeTraversing p a b -> CofreeTraversing p (Either c a) (Either c b) #

Choice (FreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

left' :: FreeTraversing p a b -> FreeTraversing p (Either a c) (Either b c) #

right' :: FreeTraversing p a b -> FreeTraversing p (Either c a) (Either c b) #

Choice p => Choice (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

left' :: Coyoneda p a b -> Coyoneda p (Either a c) (Either b c) #

right' :: Coyoneda p a b -> Coyoneda p (Either c a) (Either c b) #

Choice p => Choice (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

left' :: Yoneda p a b -> Yoneda p (Either a c) (Either b c) #

right' :: Yoneda p a b -> Yoneda p (Either c a) (Either c b) #

Choice (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Tagged a b -> Tagged (Either a c) (Either b c) #

right' :: Tagged a b -> Tagged (Either c a) (Either c b) #

Comonad w => Choice (Cokleisli w)

extract approximates costrength

Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Cokleisli w a b -> Cokleisli w (Either a c) (Either b c) #

right' :: Cokleisli w a b -> Cokleisli w (Either c a) (Either c b) #

Monoid r => Choice (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Forget r a b -> Forget r (Either a c) (Either b c) #

right' :: Forget r a b -> Forget r (Either c a) (Either c b) #

Applicative f => Choice (Star f) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Star f a b -> Star f (Either a c) (Either b c) #

right' :: Star f a b -> Star f (Either c a) (Either c b) #

Choice (->) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: (a -> b) -> Either a c -> Either b c #

right' :: (a -> b) -> Either c a -> Either c b #

Functor f => Choice (Joker f :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Joker f a b -> Joker f (Either a c) (Either b c) #

right' :: Joker f a b -> Joker f (Either c a) (Either c b) #

Choice p => Choice (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

ArrowChoice p => Choice (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: WrappedArrow p a b -> WrappedArrow p (Either a c) (Either b c) #

right' :: WrappedArrow p a b -> WrappedArrow p (Either c a) (Either c b) #

(Choice p, Choice q) => Choice (Product p q) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Product p q a b -> Product p q (Either a c) (Either b c) #

right' :: Product p q a b -> Product p q (Either c a) (Either c b) #

(Choice p, Choice q) => Choice (Sum p q) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Sum p q a b -> Sum p q (Either a c) (Either b c) #

right' :: Sum p q a b -> Sum p q (Either c a) (Either c b) #

(Functor f, Choice p) => Choice (Tannen f p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Tannen f p a b -> Tannen f p (Either a c) (Either b c) #

right' :: Tannen f p a b -> Tannen f p (Either c a) (Either c b) #

(Functor f, Choice p) => Choice (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

left' :: Cayley f p a b -> Cayley f p (Either a c) (Either b c) #

right' :: Cayley f p a b -> Cayley f p (Either c a) (Either c b) #

(Choice p, Choice q) => Choice (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

left' :: Procompose p q a b -> Procompose p q (Either a c) (Either b c) #

right' :: Procompose p q a b -> Procompose p q (Either c a) (Either c b) #

newtype TambaraSum (p :: Type -> Type -> Type) a b #

TambaraSum is cofreely adjoins strength with respect to Either.

Note: this is not dual to Tambara. It is Tambara with respect to a different tensor.

Constructors

TambaraSum 

Fields

Instances

Instances details
ProfunctorComonad TambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => TambaraSum p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => TambaraSum p :-> TambaraSum (TambaraSum p) #

ProfunctorAdjunction PastroSum TambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> TambaraSum (PastroSum p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => PastroSum (TambaraSum p) :-> p #

ProfunctorFunctor TambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> TambaraSum p :-> TambaraSum q #

Category p => Category (TambaraSum p :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Choice

Methods

id :: forall (a :: k). TambaraSum p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). TambaraSum p b c -> TambaraSum p a b -> TambaraSum p a c #

Invariant2 p => Invariant2 (TambaraSum p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> TambaraSum p a b -> TambaraSum p c d #

Profunctor p => Choice (TambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: TambaraSum p a b -> TambaraSum p (Either a c) (Either b c) #

right' :: TambaraSum p a b -> TambaraSum p (Either c a) (Either c b) #

Profunctor p => Profunctor (TambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (a -> b) -> (c -> d) -> TambaraSum p b c -> TambaraSum p a d #

lmap :: (a -> b) -> TambaraSum p b c -> TambaraSum p a c #

rmap :: (b -> c) -> TambaraSum p a b -> TambaraSum p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> TambaraSum p a b -> TambaraSum p a c #

(.#) :: forall a b c q. Coercible b a => TambaraSum p b c -> q a b -> TambaraSum p a c #

Profunctor p => Functor (TambaraSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> TambaraSum p a a0 -> TambaraSum p a b #

(<$) :: a0 -> TambaraSum p a b -> TambaraSum p a a0 #

Invariant2 p => Invariant (TambaraSum p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> TambaraSum p a a0 -> TambaraSum p a b #

data PastroSum (p :: Type -> Type -> Type) a b where #

PastroSum -| TambaraSum

PastroSum freely constructs strength with respect to Either.

Constructors

PastroSum :: forall y z b (p :: Type -> Type -> Type) x a. (Either y z -> b) -> p x y -> (a -> Either x z) -> PastroSum p a b 

Instances

Instances details
ProfunctorMonad PastroSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> PastroSum p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => PastroSum (PastroSum p) :-> PastroSum p #

ProfunctorAdjunction PastroSum TambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> TambaraSum (PastroSum p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => PastroSum (TambaraSum p) :-> p #

ProfunctorFunctor PastroSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> PastroSum p :-> PastroSum q #

Invariant2 (PastroSum p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> PastroSum p a b -> PastroSum p c d #

Choice (PastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: PastroSum p a b -> PastroSum p (Either a c) (Either b c) #

right' :: PastroSum p a b -> PastroSum p (Either c a) (Either c b) #

Profunctor (PastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (a -> b) -> (c -> d) -> PastroSum p b c -> PastroSum p a d #

lmap :: (a -> b) -> PastroSum p b c -> PastroSum p a c #

rmap :: (b -> c) -> PastroSum p a b -> PastroSum p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> PastroSum p a b -> PastroSum p a c #

(.#) :: forall a b c q. Coercible b a => PastroSum p b c -> q a b -> PastroSum p a c #

Functor (PastroSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> PastroSum p a a0 -> PastroSum p a b #

(<$) :: a0 -> PastroSum p a b -> PastroSum p a a0 #

Invariant (PastroSum p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> PastroSum p a a0 -> PastroSum p a b #

class Profunctor p => Cochoice (p :: Type -> Type -> Type) where #

Minimal complete definition

unleft | unright

Methods

unleft :: p (Either a d) (Either b d) -> p a b #

Laws:

unleftunright . dimap swapE swapE where
  swapE :: Either a b -> Either b a
  swapE = either Right Left
rmap (either id absurd) ≡ unleft . lmap (either id absurd)
unfirst . rmap (second f) ≡ unfirst . lmap (second f)
unleft . unleftunleft . dimap assocE unassocE where
  assocE :: Either (Either a b) c -> Either a (Either b c)
  assocE (Left (Left a)) = Left a
  assocE (Left (Right b)) = Right (Left b)
  assocE (Right c) = Right (Right c)
  unassocE :: Either a (Either b c) -> Either (Either a b) c
  unassocE (Left a) = Left (Left a)
  unassocE (Right (Left b)) = Left (Right b)
  unassocE (Right (Right c)) = Right c

unright :: p (Either d a) (Either d b) -> p a b #

Laws:

unrightunleft . dimap swapE swapE where
  swapE :: Either a b -> Either b a
  swapE = either Right Left
rmap (either absurd id) ≡ unright . lmap (either absurd id)
unsecond . rmap (first f) ≡ unsecond . lmap (first f)
unright . unrightunright . dimap unassocE assocE where
  assocE :: Either (Either a b) c -> Either a (Either b c)
  assocE (Left (Left a)) = Left a
  assocE (Left (Right b)) = Right (Left b)
  assocE (Right c) = Right (Right c)
  unassocE :: Either a (Either b c) -> Either (Either a b) c
  unassocE (Left a) = Left (Left a)
  unassocE (Right (Left b)) = Left (Right b)
  unassocE (Right (Right c)) = Right c

Instances

Instances details
Cochoice (CopastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: CopastroSum p (Either a d) (Either b d) -> CopastroSum p a b #

unright :: CopastroSum p (Either d a) (Either d b) -> CopastroSum p a b #

Cochoice (CotambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: CotambaraSum p (Either a d) (Either b d) -> CotambaraSum p a b #

unright :: CotambaraSum p (Either d a) (Either d b) -> CotambaraSum p a b #

Cochoice p => Cochoice (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unleft :: Coyoneda p (Either a d) (Either b d) -> Coyoneda p a b #

unright :: Coyoneda p (Either d a) (Either d b) -> Coyoneda p a b #

Cochoice p => Cochoice (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unleft :: Yoneda p (Either a d) (Either b d) -> Yoneda p a b #

unright :: Yoneda p (Either d a) (Either d b) -> Yoneda p a b #

Applicative f => Cochoice (Costar f) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Costar f (Either a d) (Either b d) -> Costar f a b #

unright :: Costar f (Either d a) (Either d b) -> Costar f a b #

Cochoice (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Forget r (Either a d) (Either b d) -> Forget r a b #

unright :: Forget r (Either d a) (Either d b) -> Forget r a b #

Traversable f => Cochoice (Star f) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Star f (Either a d) (Either b d) -> Star f a b #

unright :: Star f (Either d a) (Either d b) -> Star f a b #

Cochoice (->) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: (Either a d -> Either b d) -> a -> b #

unright :: (Either d a -> Either d b) -> a -> b #

Cochoice p => Cochoice (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

(Cochoice p, Cochoice q) => Cochoice (Product p q) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Product p q (Either a d) (Either b d) -> Product p q a b #

unright :: Product p q (Either d a) (Either d b) -> Product p q a b #

(Cochoice p, Cochoice q) => Cochoice (Sum p q) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Sum p q (Either a d) (Either b d) -> Sum p q a b #

unright :: Sum p q (Either d a) (Either d b) -> Sum p q a b #

(Functor f, Cochoice p) => Cochoice (Tannen f p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Tannen f p (Either a d) (Either b d) -> Tannen f p a b #

unright :: Tannen f p (Either d a) (Either d b) -> Tannen f p a b #

(Functor f, Cochoice p) => Cochoice (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

unleft :: Cayley f p (Either a d) (Either b d) -> Cayley f p a b #

unright :: Cayley f p (Either d a) (Either d b) -> Cayley f p a b #

data CotambaraSum (q :: Type -> Type -> Type) a b where #

CotambaraSum cofreely constructs costrength with respect to Either (aka Choice)

Constructors

CotambaraSum :: forall (r :: Type -> Type -> Type) (q :: Type -> Type -> Type) a b. Cochoice r => (r :-> q) -> r a b -> CotambaraSum q a b 

Instances

Instances details
ProfunctorComonad CotambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CotambaraSum p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CotambaraSum p :-> CotambaraSum (CotambaraSum p) #

ProfunctorAdjunction CopastroSum CotambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> CotambaraSum (CopastroSum p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => CopastroSum (CotambaraSum p) :-> p #

ProfunctorFunctor CotambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CotambaraSum p :-> CotambaraSum q #

Invariant2 (CotambaraSum p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CotambaraSum p a b -> CotambaraSum p c d #

Cochoice (CotambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: CotambaraSum p (Either a d) (Either b d) -> CotambaraSum p a b #

unright :: CotambaraSum p (Either d a) (Either d b) -> CotambaraSum p a b #

Profunctor (CotambaraSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (a -> b) -> (c -> d) -> CotambaraSum p b c -> CotambaraSum p a d #

lmap :: (a -> b) -> CotambaraSum p b c -> CotambaraSum p a c #

rmap :: (b -> c) -> CotambaraSum p a b -> CotambaraSum p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> CotambaraSum p a b -> CotambaraSum p a c #

(.#) :: forall a b c q. Coercible b a => CotambaraSum p b c -> q a b -> CotambaraSum p a c #

Functor (CotambaraSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> CotambaraSum p a a0 -> CotambaraSum p a b #

(<$) :: a0 -> CotambaraSum p a b -> CotambaraSum p a a0 #

Invariant (CotambaraSum p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> CotambaraSum p a a0 -> CotambaraSum p a b #

newtype CopastroSum (p :: Type -> Type -> Type) a b #

CopastroSum -| CotambaraSum

CopastroSum freely constructs costrength with respect to Either (aka Choice)

Constructors

CopastroSum 

Fields

Instances

Instances details
ProfunctorMonad CopastroSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> CopastroSum p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => CopastroSum (CopastroSum p) :-> CopastroSum p #

ProfunctorAdjunction CopastroSum CotambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> CotambaraSum (CopastroSum p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => CopastroSum (CotambaraSum p) :-> p #

ProfunctorFunctor CopastroSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CopastroSum p :-> CopastroSum q #

Invariant2 (CopastroSum p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> CopastroSum p a b -> CopastroSum p c d #

Cochoice (CopastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: CopastroSum p (Either a d) (Either b d) -> CopastroSum p a b #

unright :: CopastroSum p (Either d a) (Either d b) -> CopastroSum p a b #

Profunctor (CopastroSum p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

dimap :: (a -> b) -> (c -> d) -> CopastroSum p b c -> CopastroSum p a d #

lmap :: (a -> b) -> CopastroSum p b c -> CopastroSum p a c #

rmap :: (b -> c) -> CopastroSum p a b -> CopastroSum p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> CopastroSum p a b -> CopastroSum p a c #

(.#) :: forall a b c q. Coercible b a => CopastroSum p b c -> q a b -> CopastroSum p a c #

Functor (CopastroSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> CopastroSum p a a0 -> CopastroSum p a b #

(<$) :: a0 -> CopastroSum p a b -> CopastroSum p a a0 #

Invariant (CopastroSum p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> CopastroSum p a a0 -> CopastroSum p a b #

unclose :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Closure q) -> p :-> q #

close :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Closed p => (p :-> q) -> p :-> Closure q #

curry' :: Closed p => p (a, b) c -> p a (b -> c) #

class Profunctor p => Closed (p :: Type -> Type -> Type) where #

A strong profunctor allows the monoidal structure to pass through.

A closed profunctor allows the closed structure to pass through.

Methods

closed :: p a b -> p (x -> a) (x -> b) #

Instances

Instances details
(Distributive f, Monad f) => Closed (Kleisli f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Kleisli f a b -> Kleisli f (x -> a) (x -> b) #

Profunctor p => Closed (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Closure p a b -> Closure p (x -> a) (x -> b) #

Closed (Environment p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Environment p a b -> Environment p (x -> a) (x -> b) #

Profunctor p => Closed (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

closed :: CofreeMapping p a b -> CofreeMapping p (x -> a) (x -> b) #

Closed (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

closed :: FreeMapping p a b -> FreeMapping p (x -> a) (x -> b) #

Closed p => Closed (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

closed :: Coyoneda p a b -> Coyoneda p (x -> a) (x -> b) #

Closed p => Closed (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

closed :: Yoneda p a b -> Yoneda p (x -> a) (x -> b) #

Closed (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Tagged a b -> Tagged (x -> a) (x -> b) #

Functor f => Closed (Cokleisli f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Cokleisli f a b -> Cokleisli f (x -> a) (x -> b) #

Functor f => Closed (Costar f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Costar f a b -> Costar f (x -> a) (x -> b) #

Distributive f => Closed (Star f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Star f a b -> Star f (x -> a) (x -> b) #

Closed (->) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: (a -> b) -> (x -> a) -> (x -> b) #

Closed p => Closed (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

closed :: WrappedProfunctor p a b -> WrappedProfunctor p (x -> a) (x -> b) #

(Closed p, Closed q) => Closed (Product p q) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Product p q a b -> Product p q (x -> a) (x -> b) #

(Closed p, Closed q) => Closed (Sum p q) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Sum p q a b -> Sum p q (x -> a) (x -> b) #

(Functor f, Closed p) => Closed (Tannen f p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Tannen f p a b -> Tannen f p (x -> a) (x -> b) #

(Functor f, Closed p) => Closed (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

closed :: Cayley f p a b -> Cayley f p (x -> a) (x -> b) #

(Closed p, Closed q) => Closed (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

closed :: Procompose p q a b -> Procompose p q (x -> a) (x -> b) #

newtype Closure (p :: Type -> Type -> Type) a b #

Closure adjoins a Closed structure to any Profunctor.

Analogous to Tambara for Strong.

Constructors

Closure 

Fields

Instances

Instances details
ProfunctorComonad Closure 
Instance details

Defined in Data.Profunctor.Closed

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> Closure (Closure p) #

ProfunctorAdjunction Environment Closure 
Instance details

Defined in Data.Profunctor.Closed

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Closure (Environment p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Environment (Closure p) :-> p #

ProfunctorFunctor Closure 
Instance details

Defined in Data.Profunctor.Closed

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Closure p :-> Closure q #

Category p => Category (Closure p :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Closed

Methods

id :: forall (a :: k). Closure p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Closure p b c -> Closure p a b -> Closure p a c #

Arrow p => Arrow (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

arr :: (b -> c) -> Closure p b c #

first :: Closure p b c -> Closure p (b, d) (c, d) #

second :: Closure p b c -> Closure p (d, b) (d, c) #

(***) :: Closure p b c -> Closure p b' c' -> Closure p (b, b') (c, c') #

(&&&) :: Closure p b c -> Closure p b c' -> Closure p b (c, c') #

ArrowLoop p => ArrowLoop (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

loop :: Closure p (b, d) (c, d) -> Closure p b c #

ArrowPlus p => ArrowPlus (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

(<+>) :: Closure p b c -> Closure p b c -> Closure p b c #

ArrowZero p => ArrowZero (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

zeroArrow :: Closure p b c #

Invariant2 p => Invariant2 (Closure p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Closure p a b -> Closure p c d #

Profunctor p => Closed (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Closure p a b -> Closure p (x -> a) (x -> b) #

Strong p => Strong (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

first' :: Closure p a b -> Closure p (a, c) (b, c) #

second' :: Closure p a b -> Closure p (c, a) (c, b) #

Profunctor p => Profunctor (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

dimap :: (a -> b) -> (c -> d) -> Closure p b c -> Closure p a d #

lmap :: (a -> b) -> Closure p b c -> Closure p a c #

rmap :: (b -> c) -> Closure p a b -> Closure p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Closure p a b -> Closure p a c #

(.#) :: forall a b c q. Coercible b a => Closure p b c -> q a b -> Closure p a c #

(Profunctor p, ArrowPlus p) => Alternative (Closure p a) 
Instance details

Defined in Data.Profunctor.Closed

Methods

empty :: Closure p a a0 #

(<|>) :: Closure p a a0 -> Closure p a a0 -> Closure p a a0 #

some :: Closure p a a0 -> Closure p a [a0] #

many :: Closure p a a0 -> Closure p a [a0] #

(Profunctor p, Arrow p) => Applicative (Closure p a) 
Instance details

Defined in Data.Profunctor.Closed

Methods

pure :: a0 -> Closure p a a0 #

(<*>) :: Closure p a (a0 -> b) -> Closure p a a0 -> Closure p a b #

liftA2 :: (a0 -> b -> c) -> Closure p a a0 -> Closure p a b -> Closure p a c #

(*>) :: Closure p a a0 -> Closure p a b -> Closure p a b #

(<*) :: Closure p a a0 -> Closure p a b -> Closure p a a0 #

Profunctor p => Functor (Closure p a) 
Instance details

Defined in Data.Profunctor.Closed

Methods

fmap :: (a0 -> b) -> Closure p a a0 -> Closure p a b #

(<$) :: a0 -> Closure p a b -> Closure p a a0 #

Invariant2 p => Invariant (Closure p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Closure p a a0 -> Closure p a b #

(Profunctor p, Arrow p, Semigroup b, Monoid b) => Monoid (Closure p a b) 
Instance details

Defined in Data.Profunctor.Closed

Methods

mempty :: Closure p a b #

mappend :: Closure p a b -> Closure p a b -> Closure p a b #

mconcat :: [Closure p a b] -> Closure p a b #

(Profunctor p, Arrow p, Semigroup b) => Semigroup (Closure p a b) 
Instance details

Defined in Data.Profunctor.Closed

Methods

(<>) :: Closure p a b -> Closure p a b -> Closure p a b #

sconcat :: NonEmpty (Closure p a b) -> Closure p a b #

stimes :: Integral b0 => b0 -> Closure p a b -> Closure p a b #

data Environment (p :: Type -> Type -> Type) a b where #

Constructors

Environment :: forall z y b (p :: Type -> Type -> Type) x a. ((z -> y) -> b) -> p x y -> (a -> z -> x) -> Environment p a b 

Instances

Instances details
ProfunctorMonad Environment 
Instance details

Defined in Data.Profunctor.Closed

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Environment p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Environment (Environment p) :-> Environment p #

ProfunctorAdjunction Environment Closure 
Instance details

Defined in Data.Profunctor.Closed

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Closure (Environment p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Environment (Closure p) :-> p #

ProfunctorFunctor Environment 
Instance details

Defined in Data.Profunctor.Closed

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Environment p :-> Environment q #

Invariant2 (Environment p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Environment p a b -> Environment p c d #

Closed (Environment p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Environment p a b -> Environment p (x -> a) (x -> b) #

Profunctor (Environment p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

dimap :: (a -> b) -> (c -> d) -> Environment p b c -> Environment p a d #

lmap :: (a -> b) -> Environment p b c -> Environment p a c #

rmap :: (b -> c) -> Environment p a b -> Environment p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Environment p a b -> Environment p a c #

(.#) :: forall a b c q. Coercible b a => Environment p b c -> q a b -> Environment p a c #

Functor (Environment p a) 
Instance details

Defined in Data.Profunctor.Closed

Methods

fmap :: (a0 -> b) -> Environment p a a0 -> Environment p a b #

(<$) :: a0 -> Environment p a b -> Environment p a a0 #

Invariant (Environment p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Environment p a a0 -> Environment p a b #

uncotambara :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Cotambara q) -> p :-> q #

cotambara :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Costrong p => (p :-> q) -> p :-> Cotambara q #

unpastro :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). (Pastro p :-> q) -> p :-> q #

pastro (unpastro f) ≡ f
unpastro (pastro f) ≡ f

pastro :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Strong q => (p :-> q) -> Pastro p :-> q #

pastro (unpastro f) ≡ f
unpastro (pastro f) ≡ f

untambara :: forall (q :: Type -> Type -> Type) (p :: Type -> Type -> Type). Profunctor q => (p :-> Tambara q) -> p :-> q #

tambara (untambara f) ≡ f
untambara (tambara f) ≡ f

tambara :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Strong p => (p :-> q) -> p :-> Tambara q #

tambara (untambara f) ≡ f
untambara (tambara f) ≡ f

strong :: Strong p => (a -> b -> c) -> p a b -> p a c #

uncurry' :: Strong p => p a (b -> c) -> p (a, b) c #

class Profunctor p => Strong (p :: Type -> Type -> Type) where #

Generalizing Star of a strong Functor

Note: Every Functor in Haskell is strong with respect to (,).

This describes profunctor strength with respect to the product structure of Hask.

http://www.riec.tohoku.ac.jp/~asada/papers/arrStrMnd.pdf

Minimal complete definition

first' | second'

Methods

first' :: p a b -> p (a, c) (b, c) #

Laws:

first'dimap swap swap . second'
lmap fstrmap fst . first'
lmap (second' f) . first'rmap (second' f) . first'
first' . first'dimap assoc unassoc . first' where
  assoc ((a,b),c) = (a,(b,c))
  unassoc (a,(b,c)) = ((a,b),c)

second' :: p a b -> p (c, a) (c, b) #

Laws:

second'dimap swap swap . first'
lmap sndrmap snd . second'
lmap (first' f) . second'rmap (first' f) . second'
second' . second'dimap unassoc assoc . second' where
  assoc ((a,b),c) = (a,(b,c))
  unassoc (a,(b,c)) = ((a,b),c)

Instances

Instances details
Monad m => Strong (Kleisli m) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Kleisli m a b -> Kleisli m (a, c) (b, c) #

second' :: Kleisli m a b -> Kleisli m (c, a) (c, b) #

Strong p => Strong (Closure p) 
Instance details

Defined in Data.Profunctor.Closed

Methods

first' :: Closure p a b -> Closure p (a, c) (b, c) #

second' :: Closure p a b -> Closure p (c, a) (c, b) #

Profunctor p => Strong (CofreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

first' :: CofreeMapping p a b -> CofreeMapping p (a, c) (b, c) #

second' :: CofreeMapping p a b -> CofreeMapping p (c, a) (c, b) #

Strong (FreeMapping p) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

first' :: FreeMapping p a b -> FreeMapping p (a, c) (b, c) #

second' :: FreeMapping p a b -> FreeMapping p (c, a) (c, b) #

Strong (Pastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Pastro p a b -> Pastro p (a, c) (b, c) #

second' :: Pastro p a b -> Pastro p (c, a) (c, b) #

Profunctor p => Strong (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Tambara p a b -> Tambara p (a, c) (b, c) #

second' :: Tambara p a b -> Tambara p (c, a) (c, b) #

Profunctor p => Strong (CofreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

first' :: CofreeTraversing p a b -> CofreeTraversing p (a, c) (b, c) #

second' :: CofreeTraversing p a b -> CofreeTraversing p (c, a) (c, b) #

Strong (FreeTraversing p) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

first' :: FreeTraversing p a b -> FreeTraversing p (a, c) (b, c) #

second' :: FreeTraversing p a b -> FreeTraversing p (c, a) (c, b) #

Strong p => Strong (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

first' :: Coyoneda p a b -> Coyoneda p (a, c) (b, c) #

second' :: Coyoneda p a b -> Coyoneda p (c, a) (c, b) #

Strong p => Strong (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

first' :: Yoneda p a b -> Yoneda p (a, c) (b, c) #

second' :: Yoneda p a b -> Yoneda p (c, a) (c, b) #

Strong (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Forget r a b -> Forget r (a, c) (b, c) #

second' :: Forget r a b -> Forget r (c, a) (c, b) #

Functor m => Strong (Star m) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Star m a b -> Star m (a, c) (b, c) #

second' :: Star m a b -> Star m (c, a) (c, b) #

Strong (->) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: (a -> b) -> (a, c) -> (b, c) #

second' :: (a -> b) -> (c, a) -> (c, b) #

Contravariant f => Strong (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Clown f a b -> Clown f (a, c) (b, c) #

second' :: Clown f a b -> Clown f (c, a) (c, b) #

Strong p => Strong (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

first' :: WrappedProfunctor p a b -> WrappedProfunctor p (a, c) (b, c) #

second' :: WrappedProfunctor p a b -> WrappedProfunctor p (c, a) (c, b) #

Arrow p => Strong (WrappedArrow p)

Arrow is Strong Category

Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: WrappedArrow p a b -> WrappedArrow p (a, c) (b, c) #

second' :: WrappedArrow p a b -> WrappedArrow p (c, a) (c, b) #

(Strong p, Strong q) => Strong (Product p q) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Product p q a b -> Product p q (a, c) (b, c) #

second' :: Product p q a b -> Product p q (c, a) (c, b) #

(Strong p, Strong q) => Strong (Sum p q) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Sum p q a b -> Sum p q (a, c) (b, c) #

second' :: Sum p q a b -> Sum p q (c, a) (c, b) #

(Functor f, Strong p) => Strong (Tannen f p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Tannen f p a b -> Tannen f p (a, c) (b, c) #

second' :: Tannen f p a b -> Tannen f p (c, a) (c, b) #

(Functor f, Strong p) => Strong (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

first' :: Cayley f p a b -> Cayley f p (a, c) (b, c) #

second' :: Cayley f p a b -> Cayley f p (c, a) (c, b) #

(Strong p, Strong q) => Strong (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

first' :: Procompose p q a b -> Procompose p q (a, c) (b, c) #

second' :: Procompose p q a b -> Procompose p q (c, a) (c, b) #

newtype Tambara (p :: Type -> Type -> Type) a b #

Tambara cofreely makes any Profunctor Strong.

Constructors

Tambara 

Fields

Instances

Instances details
ProfunctorComonad Tambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Tambara p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Tambara p :-> Tambara (Tambara p) #

ProfunctorAdjunction Pastro Tambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Tambara (Pastro p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Pastro (Tambara p) :-> p #

ProfunctorFunctor Tambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Tambara p :-> Tambara q #

Category p => Category (Tambara p :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Strong

Methods

id :: forall (a :: k). Tambara p a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Tambara p b c -> Tambara p a b -> Tambara p a c #

Arrow p => Arrow (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

arr :: (b -> c) -> Tambara p b c #

first :: Tambara p b c -> Tambara p (b, d) (c, d) #

second :: Tambara p b c -> Tambara p (d, b) (d, c) #

(***) :: Tambara p b c -> Tambara p b' c' -> Tambara p (b, b') (c, c') #

(&&&) :: Tambara p b c -> Tambara p b c' -> Tambara p b (c, c') #

ArrowApply p => ArrowApply (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

app :: Tambara p (Tambara p b c, b) c #

ArrowChoice p => ArrowChoice (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

left :: Tambara p b c -> Tambara p (Either b d) (Either c d) #

right :: Tambara p b c -> Tambara p (Either d b) (Either d c) #

(+++) :: Tambara p b c -> Tambara p b' c' -> Tambara p (Either b b') (Either c c') #

(|||) :: Tambara p b d -> Tambara p c d -> Tambara p (Either b c) d #

ArrowLoop p => ArrowLoop (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

loop :: Tambara p (b, d) (c, d) -> Tambara p b c #

ArrowPlus p => ArrowPlus (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

(<+>) :: Tambara p b c -> Tambara p b c -> Tambara p b c #

ArrowZero p => ArrowZero (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

zeroArrow :: Tambara p b c #

Invariant2 p => Invariant2 (Tambara p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Tambara p a b -> Tambara p c d #

Choice p => Choice (Tambara p) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Tambara p a b -> Tambara p (Either a c) (Either b c) #

right' :: Tambara p a b -> Tambara p (Either c a) (Either c b) #

Profunctor p => Strong (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Tambara p a b -> Tambara p (a, c) (b, c) #

second' :: Tambara p a b -> Tambara p (c, a) (c, b) #

Profunctor p => Profunctor (Tambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (a -> b) -> (c -> d) -> Tambara p b c -> Tambara p a d #

lmap :: (a -> b) -> Tambara p b c -> Tambara p a c #

rmap :: (b -> c) -> Tambara p a b -> Tambara p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Tambara p a b -> Tambara p a c #

(.#) :: forall a b c q. Coercible b a => Tambara p b c -> q a b -> Tambara p a c #

(Profunctor p, ArrowPlus p) => Alternative (Tambara p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

empty :: Tambara p a a0 #

(<|>) :: Tambara p a a0 -> Tambara p a a0 -> Tambara p a a0 #

some :: Tambara p a a0 -> Tambara p a [a0] #

many :: Tambara p a a0 -> Tambara p a [a0] #

(Profunctor p, Arrow p) => Applicative (Tambara p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

pure :: a0 -> Tambara p a a0 #

(<*>) :: Tambara p a (a0 -> b) -> Tambara p a a0 -> Tambara p a b #

liftA2 :: (a0 -> b -> c) -> Tambara p a a0 -> Tambara p a b -> Tambara p a c #

(*>) :: Tambara p a a0 -> Tambara p a b -> Tambara p a b #

(<*) :: Tambara p a a0 -> Tambara p a b -> Tambara p a a0 #

Profunctor p => Functor (Tambara p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

fmap :: (a0 -> b) -> Tambara p a a0 -> Tambara p a b #

(<$) :: a0 -> Tambara p a b -> Tambara p a a0 #

Invariant2 p => Invariant (Tambara p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Tambara p a a0 -> Tambara p a b #

ArrowPlus p => Monoid (Tambara p a b) 
Instance details

Defined in Data.Profunctor.Strong

Methods

mempty :: Tambara p a b #

mappend :: Tambara p a b -> Tambara p a b -> Tambara p a b #

mconcat :: [Tambara p a b] -> Tambara p a b #

ArrowPlus p => Semigroup (Tambara p a b) 
Instance details

Defined in Data.Profunctor.Strong

Methods

(<>) :: Tambara p a b -> Tambara p a b -> Tambara p a b #

sconcat :: NonEmpty (Tambara p a b) -> Tambara p a b #

stimes :: Integral b0 => b0 -> Tambara p a b -> Tambara p a b #

data Pastro (p :: Type -> Type -> Type) a b where #

Pastro -| Tambara

Pastro p ~ exists z. Costar ((,)z) Procompose p Procompose Star ((,)z)

Pastro freely makes any Profunctor Strong.

Constructors

Pastro :: forall y z b (p :: Type -> Type -> Type) x a. ((y, z) -> b) -> p x y -> (a -> (x, z)) -> Pastro p a b 

Instances

Instances details
ProfunctorMonad Pastro 
Instance details

Defined in Data.Profunctor.Strong

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Pastro p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Pastro (Pastro p) :-> Pastro p #

ProfunctorAdjunction Pastro Tambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Tambara (Pastro p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Pastro (Tambara p) :-> p #

ProfunctorFunctor Pastro 
Instance details

Defined in Data.Profunctor.Strong

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Pastro p :-> Pastro q #

Invariant2 (Pastro p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Pastro p a b -> Pastro p c d #

Strong (Pastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Pastro p a b -> Pastro p (a, c) (b, c) #

second' :: Pastro p a b -> Pastro p (c, a) (c, b) #

Profunctor (Pastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (a -> b) -> (c -> d) -> Pastro p b c -> Pastro p a d #

lmap :: (a -> b) -> Pastro p b c -> Pastro p a c #

rmap :: (b -> c) -> Pastro p a b -> Pastro p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Pastro p a b -> Pastro p a c #

(.#) :: forall a b c q. Coercible b a => Pastro p b c -> q a b -> Pastro p a c #

Functor (Pastro p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

fmap :: (a0 -> b) -> Pastro p a a0 -> Pastro p a b #

(<$) :: a0 -> Pastro p a b -> Pastro p a a0 #

Invariant (Pastro p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Pastro p a a0 -> Pastro p a b #

class Profunctor p => Costrong (p :: Type -> Type -> Type) where #

Analogous to ArrowLoop, loop = unfirst

Minimal complete definition

unfirst | unsecond

Methods

unfirst :: p (a, d) (b, d) -> p a b #

Laws:

unfirstunsecond . dimap swap swap
lmap (,()) ≡ unfirst . rmap (,())
unfirst . lmap (second f) ≡ unfirst . rmap (second f)
unfirst . unfirst = unfirst . dimap assoc unassoc where
  assoc ((a,b),c) = (a,(b,c))
  unassoc (a,(b,c)) = ((a,b),c)

unsecond :: p (d, a) (d, b) -> p a b #

Laws:

unsecondunfirst . dimap swap swap
lmap ((),) ≡ unsecond . rmap ((),)
unsecond . lmap (first f) ≡ unsecond . rmap (first f)
unsecond . unsecond = unsecond . dimap unassoc assoc where
  assoc ((a,b),c) = (a,(b,c))
  unassoc (a,(b,c)) = ((a,b),c)

Instances

Instances details
MonadFix m => Costrong (Kleisli m) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Kleisli m (a, d) (b, d) -> Kleisli m a b #

unsecond :: Kleisli m (d, a) (d, b) -> Kleisli m a b #

Costrong (Copastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Copastro p (a, d) (b, d) -> Copastro p a b #

unsecond :: Copastro p (d, a) (d, b) -> Copastro p a b #

Costrong (Cotambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Cotambara p (a, d) (b, d) -> Cotambara p a b #

unsecond :: Cotambara p (d, a) (d, b) -> Cotambara p a b #

Costrong p => Costrong (Coyoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unfirst :: Coyoneda p (a, d) (b, d) -> Coyoneda p a b #

unsecond :: Coyoneda p (d, a) (d, b) -> Coyoneda p a b #

Costrong p => Costrong (Yoneda p) 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

unfirst :: Yoneda p (a, d) (b, d) -> Yoneda p a b #

unsecond :: Yoneda p (d, a) (d, b) -> Yoneda p a b #

Costrong (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Tagged (a, d) (b, d) -> Tagged a b #

unsecond :: Tagged (d, a) (d, b) -> Tagged a b #

Functor f => Costrong (Cokleisli f) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Cokleisli f (a, d) (b, d) -> Cokleisli f a b #

unsecond :: Cokleisli f (d, a) (d, b) -> Cokleisli f a b #

Functor f => Costrong (Costar f) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Costar f (a, d) (b, d) -> Costar f a b #

unsecond :: Costar f (d, a) (d, b) -> Costar f a b #

Costrong (->) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: ((a, d) -> (b, d)) -> a -> b #

unsecond :: ((d, a) -> (d, b)) -> a -> b #

Costrong p => Costrong (WrappedProfunctor p) 
Instance details

Defined in Data.Functor.Invariant

Methods

unfirst :: WrappedProfunctor p (a, d) (b, d) -> WrappedProfunctor p a b #

unsecond :: WrappedProfunctor p (d, a) (d, b) -> WrappedProfunctor p a b #

ArrowLoop p => Costrong (WrappedArrow p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: WrappedArrow p (a, d) (b, d) -> WrappedArrow p a b #

unsecond :: WrappedArrow p (d, a) (d, b) -> WrappedArrow p a b #

(Costrong p, Costrong q) => Costrong (Product p q) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Product p q (a, d) (b, d) -> Product p q a b #

unsecond :: Product p q (d, a) (d, b) -> Product p q a b #

(Costrong p, Costrong q) => Costrong (Sum p q) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Sum p q (a, d) (b, d) -> Sum p q a b #

unsecond :: Sum p q (d, a) (d, b) -> Sum p q a b #

(Functor f, Costrong p) => Costrong (Tannen f p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Tannen f p (a, d) (b, d) -> Tannen f p a b #

unsecond :: Tannen f p (d, a) (d, b) -> Tannen f p a b #

(Functor f, Costrong p) => Costrong (Cayley f p) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

unfirst :: Cayley f p (a, d) (b, d) -> Cayley f p a b #

unsecond :: Cayley f p (d, a) (d, b) -> Cayley f p a b #

(Corepresentable p, Corepresentable q) => Costrong (Procompose p q) 
Instance details

Defined in Data.Profunctor.Composition

Methods

unfirst :: Procompose p q (a, d) (b, d) -> Procompose p q a b #

unsecond :: Procompose p q (d, a) (d, b) -> Procompose p q a b #

data Cotambara (q :: Type -> Type -> Type) a b where #

Cotambara cofreely constructs costrength

Constructors

Cotambara :: forall (r :: Type -> Type -> Type) (q :: Type -> Type -> Type) a b. Costrong r => (r :-> q) -> r a b -> Cotambara q a b 

Instances

Instances details
ProfunctorComonad Cotambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> Cotambara (Cotambara p) #

ProfunctorAdjunction Copastro Cotambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Cotambara (Copastro p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Copastro (Cotambara p) :-> p #

ProfunctorFunctor Cotambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Cotambara p :-> Cotambara q #

Invariant2 (Cotambara p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Cotambara p a b -> Cotambara p c d #

Costrong (Cotambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Cotambara p (a, d) (b, d) -> Cotambara p a b #

unsecond :: Cotambara p (d, a) (d, b) -> Cotambara p a b #

Profunctor (Cotambara p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (a -> b) -> (c -> d) -> Cotambara p b c -> Cotambara p a d #

lmap :: (a -> b) -> Cotambara p b c -> Cotambara p a c #

rmap :: (b -> c) -> Cotambara p a b -> Cotambara p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Cotambara p a b -> Cotambara p a c #

(.#) :: forall a b c q. Coercible b a => Cotambara p b c -> q a b -> Cotambara p a c #

Functor (Cotambara p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

fmap :: (a0 -> b) -> Cotambara p a a0 -> Cotambara p a b #

(<$) :: a0 -> Cotambara p a b -> Cotambara p a a0 #

Invariant (Cotambara p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Cotambara p a a0 -> Cotambara p a b #

newtype Copastro (p :: Type -> Type -> Type) a b #

Copastro -| Cotambara

Copastro freely constructs costrength

Constructors

Copastro 

Fields

Instances

Instances details
ProfunctorMonad Copastro 
Instance details

Defined in Data.Profunctor.Strong

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Copastro p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Copastro (Copastro p) :-> Copastro p #

ProfunctorAdjunction Copastro Cotambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Cotambara (Copastro p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Copastro (Cotambara p) :-> p #

ProfunctorFunctor Copastro 
Instance details

Defined in Data.Profunctor.Strong

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Copastro p :-> Copastro q #

Invariant2 (Copastro p)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Copastro p a b -> Copastro p c d #

Costrong (Copastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Copastro p (a, d) (b, d) -> Copastro p a b #

unsecond :: Copastro p (d, a) (d, b) -> Copastro p a b #

Profunctor (Copastro p) 
Instance details

Defined in Data.Profunctor.Strong

Methods

dimap :: (a -> b) -> (c -> d) -> Copastro p b c -> Copastro p a d #

lmap :: (a -> b) -> Copastro p b c -> Copastro p a c #

rmap :: (b -> c) -> Copastro p a b -> Copastro p a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Copastro p a b -> Copastro p a c #

(.#) :: forall a b c q. Coercible b a => Copastro p b c -> q a b -> Copastro p a c #

Functor (Copastro p a) 
Instance details

Defined in Data.Profunctor.Strong

Methods

fmap :: (a0 -> b) -> Copastro p a a0 -> Copastro p a b #

(<$) :: a0 -> Copastro p a b -> Copastro p a a0 #

Invariant (Copastro p a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Copastro p a a0 -> Copastro p a b #

class (ProfunctorFunctor f, ProfunctorFunctor u) => ProfunctorAdjunction (f :: (Type -> Type -> Type) -> Type -> Type -> Type) (u :: (Type -> Type -> Type) -> Type -> Type -> Type) | f -> u, u -> f where #

Laws:

unit . counitid
counit . unitid

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> u (f p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => f (u p) :-> p #

Instances

Instances details
ProfunctorAdjunction CopastroSum CotambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> CotambaraSum (CopastroSum p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => CopastroSum (CotambaraSum p) :-> p #

ProfunctorAdjunction PastroSum TambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> TambaraSum (PastroSum p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => PastroSum (TambaraSum p) :-> p #

ProfunctorAdjunction Environment Closure 
Instance details

Defined in Data.Profunctor.Closed

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Closure (Environment p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Environment (Closure p) :-> p #

ProfunctorAdjunction Copastro Cotambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Cotambara (Copastro p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Copastro (Cotambara p) :-> p #

ProfunctorAdjunction Pastro Tambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

unit :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Tambara (Pastro p) #

counit :: forall (p :: Type -> Type -> Type). Profunctor p => Pastro (Tambara p) :-> p #

ProfunctorAdjunction (Procompose p :: (Type -> Type -> Type) -> Type -> Type -> Type) (Rift p :: (Type -> Type -> Type) -> Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Composition

Methods

unit :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => p0 :-> Rift p (Procompose p p0) #

counit :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Procompose p (Rift p p0) :-> p0 #

class ProfunctorFunctor (t :: (Type -> Type -> Type) -> k -> k1 -> Type) where #

ProfunctorFunctor has a polymorphic kind since 5.6.

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> t p :-> t q #

Laws:

promap f . promap g ≡ promap (f . g)
promap idid

Instances

Instances details
ProfunctorFunctor CopastroSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CopastroSum p :-> CopastroSum q #

ProfunctorFunctor CotambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CotambaraSum p :-> CotambaraSum q #

ProfunctorFunctor PastroSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> PastroSum p :-> PastroSum q #

ProfunctorFunctor TambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> TambaraSum p :-> TambaraSum q #

ProfunctorFunctor Closure 
Instance details

Defined in Data.Profunctor.Closed

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Closure p :-> Closure q #

ProfunctorFunctor Environment 
Instance details

Defined in Data.Profunctor.Closed

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Environment p :-> Environment q #

ProfunctorFunctor CofreeMapping 
Instance details

Defined in Data.Profunctor.Mapping

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CofreeMapping p :-> CofreeMapping q #

ProfunctorFunctor FreeMapping 
Instance details

Defined in Data.Profunctor.Mapping

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> FreeMapping p :-> FreeMapping q #

ProfunctorFunctor Copastro 
Instance details

Defined in Data.Profunctor.Strong

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Copastro p :-> Copastro q #

ProfunctorFunctor Cotambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Cotambara p :-> Cotambara q #

ProfunctorFunctor Pastro 
Instance details

Defined in Data.Profunctor.Strong

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Pastro p :-> Pastro q #

ProfunctorFunctor Tambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Tambara p :-> Tambara q #

ProfunctorFunctor CofreeTraversing 
Instance details

Defined in Data.Profunctor.Traversing

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> CofreeTraversing p :-> CofreeTraversing q #

ProfunctorFunctor FreeTraversing 
Instance details

Defined in Data.Profunctor.Traversing

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> FreeTraversing p :-> FreeTraversing q #

ProfunctorFunctor Coyoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Coyoneda p :-> Coyoneda q #

ProfunctorFunctor Yoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Yoneda p :-> Yoneda q #

ProfunctorFunctor (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Invariant

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> WrappedProfunctor p :-> WrappedProfunctor q #

ProfunctorFunctor (Product p :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Monad

Methods

promap :: forall (p0 :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p0 => (p0 :-> q) -> Product p p0 :-> Product p q #

ProfunctorFunctor (Sum p :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Monad

Methods

promap :: forall (p0 :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p0 => (p0 :-> q) -> Sum p p0 :-> Sum p q #

Functor f => ProfunctorFunctor (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Monad

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Tannen f p :-> Tannen f q #

Functor f => ProfunctorFunctor (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Cayley

Methods

promap :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p => (p :-> q) -> Cayley f p :-> Cayley f q #

ProfunctorFunctor (Procompose p :: (Type -> Type -> Type) -> Type -> k1 -> Type) 
Instance details

Defined in Data.Profunctor.Composition

Methods

promap :: forall (p0 :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p0 => (p0 :-> q) -> Procompose p p0 :-> Procompose p q #

ProfunctorFunctor (Rift p :: (Type -> Type -> Type) -> Type -> k1 -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Composition

Methods

promap :: forall (p0 :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p0 => (p0 :-> q) -> Rift p p0 :-> Rift p q #

ProfunctorFunctor (Ran p :: (Type -> Type -> Type) -> k -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Ran

Methods

promap :: forall (p0 :: Type -> Type -> Type) (q :: Type -> Type -> Type). Profunctor p0 => (p0 :-> q) -> Ran p p0 :-> Ran p q #

class ProfunctorFunctor t => ProfunctorMonad (t :: (Type -> Type -> Type) -> Type -> Type -> Type) where #

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> t p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => t (t p) :-> t p #

Instances

Instances details
ProfunctorMonad CopastroSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> CopastroSum p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => CopastroSum (CopastroSum p) :-> CopastroSum p #

ProfunctorMonad PastroSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> PastroSum p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => PastroSum (PastroSum p) :-> PastroSum p #

ProfunctorMonad Environment 
Instance details

Defined in Data.Profunctor.Closed

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Environment p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Environment (Environment p) :-> Environment p #

ProfunctorMonad FreeMapping 
Instance details

Defined in Data.Profunctor.Mapping

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> FreeMapping p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => FreeMapping (FreeMapping p) :-> FreeMapping p #

ProfunctorMonad Copastro 
Instance details

Defined in Data.Profunctor.Strong

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Copastro p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Copastro (Copastro p) :-> Copastro p #

ProfunctorMonad Pastro 
Instance details

Defined in Data.Profunctor.Strong

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Pastro p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Pastro (Pastro p) :-> Pastro p #

ProfunctorMonad FreeTraversing 
Instance details

Defined in Data.Profunctor.Traversing

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> FreeTraversing p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => FreeTraversing (FreeTraversing p) :-> FreeTraversing p #

ProfunctorMonad Coyoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Coyoneda p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda (Coyoneda p) :-> Coyoneda p #

ProfunctorMonad Yoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Yoneda p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda (Yoneda p) :-> Yoneda p #

ProfunctorMonad (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Invariant

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> WrappedProfunctor p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => WrappedProfunctor (WrappedProfunctor p) :-> WrappedProfunctor p #

ProfunctorMonad (Sum p) 
Instance details

Defined in Data.Profunctor.Monad

Methods

proreturn :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => p0 :-> Sum p p0 #

projoin :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Sum p (Sum p p0) :-> Sum p p0 #

Monad f => ProfunctorMonad (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Monad

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Tannen f p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Tannen f (Tannen f p) :-> Tannen f p #

(Functor f, Monad f) => ProfunctorMonad (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type)

Cayley transforms Monads in Hask into monads on Prof

Instance details

Defined in Data.Profunctor.Cayley

Methods

proreturn :: forall (p :: Type -> Type -> Type). Profunctor p => p :-> Cayley f p #

projoin :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f (Cayley f p) :-> Cayley f p #

Category p => ProfunctorMonad (Procompose p :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Composition

Methods

proreturn :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => p0 :-> Procompose p p0 #

projoin :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Procompose p (Procompose p p0) :-> Procompose p p0 #

class ProfunctorFunctor t => ProfunctorComonad (t :: (Type -> Type -> Type) -> Type -> Type -> Type) where #

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => t p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => t p :-> t (t p) #

Instances

Instances details
ProfunctorComonad CotambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CotambaraSum p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CotambaraSum p :-> CotambaraSum (CotambaraSum p) #

ProfunctorComonad TambaraSum 
Instance details

Defined in Data.Profunctor.Choice

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => TambaraSum p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => TambaraSum p :-> TambaraSum (TambaraSum p) #

ProfunctorComonad Closure 
Instance details

Defined in Data.Profunctor.Closed

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Closure p :-> Closure (Closure p) #

ProfunctorComonad CofreeMapping 
Instance details

Defined in Data.Profunctor.Mapping

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeMapping p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => CofreeMapping p :-> CofreeMapping (CofreeMapping p) #

ProfunctorComonad Cotambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cotambara p :-> Cotambara (Cotambara p) #

ProfunctorComonad Tambara 
Instance details

Defined in Data.Profunctor.Strong

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Tambara p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Tambara p :-> Tambara (Tambara p) #

ProfunctorComonad CofreeTraversing 
Instance details

Defined in Data.Profunctor.Traversing

ProfunctorComonad Coyoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Coyoneda p :-> Coyoneda (Coyoneda p) #

ProfunctorComonad Yoneda 
Instance details

Defined in Data.Profunctor.Yoneda

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Yoneda p :-> Yoneda (Yoneda p) #

ProfunctorComonad (WrappedProfunctor :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Invariant

ProfunctorComonad (Product p) 
Instance details

Defined in Data.Profunctor.Monad

Methods

proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Product p p0 :-> p0 #

produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Product p p0 :-> Product p (Product p p0) #

Comonad f => ProfunctorComonad (Tannen f :: (Type -> Type -> Type) -> Type -> Type -> Type) 
Instance details

Defined in Data.Profunctor.Monad

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Tannen f p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Tannen f p :-> Tannen f (Tannen f p) #

Comonad f => ProfunctorComonad (Cayley f :: (Type -> Type -> Type) -> Type -> Type -> Type)

Cayley transforms Comonads in Hask into comonads on Prof

Instance details

Defined in Data.Profunctor.Cayley

Methods

proextract :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> p #

produplicate :: forall (p :: Type -> Type -> Type). Profunctor p => Cayley f p :-> Cayley f (Cayley f p) #

Category p => ProfunctorComonad (Rift p :: (Type -> Type -> Type) -> Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Composition

Methods

proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Rift p p0 :-> p0 #

produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Rift p p0 :-> Rift p (Rift p p0) #

Category p => ProfunctorComonad (Ran p :: (Type -> Type -> Type) -> Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Ran

Methods

proextract :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Ran p p0 :-> p0 #

produplicate :: forall (p0 :: Type -> Type -> Type). Profunctor p0 => Ran p p0 :-> Ran p (Ran p p0) #

type (:->) (p :: k -> k1 -> Type) (q :: k -> k1 -> Type) = forall (a :: k) (b :: k1). p a b -> q a b infixr 0 #

(:->) has a polymorphic kind since 5.6.

newtype Star (f :: k -> Type) d (c :: k) #

Lift a Functor into a Profunctor (forwards).

Star has a polymorphic kind since 5.6.

Constructors

Star 

Fields

Instances

Instances details
Monad f => Category (Star f :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

id :: forall (a :: k). Star f a a #

(.) :: forall (b :: k) (c :: k) (a :: k). Star f b c -> Star f a b -> Star f a c #

Invariant f => Invariant2 (Star f)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Star f a b -> Star f c d #

Applicative f => Choice (Star f) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Star f a b -> Star f (Either a c) (Either b c) #

right' :: Star f a b -> Star f (Either c a) (Either c b) #

Traversable f => Cochoice (Star f) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Star f (Either a d) (Either b d) -> Star f a b #

unright :: Star f (Either d a) (Either d b) -> Star f a b #

Distributive f => Closed (Star f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Star f a b -> Star f (x -> a) (x -> b) #

(Applicative m, Distributive m) => Mapping (Star m) 
Instance details

Defined in Data.Profunctor.Mapping

Methods

map' :: Functor f => Star m a b -> Star m (f a) (f b) #

roam :: ((a -> b) -> s -> t) -> Star m a b -> Star m s t #

Functor f => Representable (Star f) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Rep (Star f) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Star f) c) -> Star f d c #

Functor m => Strong (Star m) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Star m a b -> Star m (a, c) (b, c) #

second' :: Star m a b -> Star m (c, a) (c, b) #

Applicative m => Traversing (Star m) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => Star m a b -> Star m (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Star m a b -> Star m s t #

Functor f => Profunctor (Star f) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (a -> b) -> (c -> d) -> Star f b c -> Star f a d #

lmap :: (a -> b) -> Star f b c -> Star f a c #

rmap :: (b -> c) -> Star f a b -> Star f a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Star f a b -> Star f a c #

(.#) :: forall a b c q. Coercible b a => Star f b c -> q a b -> Star f a c #

Functor f => Sieve (Star f) f 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: Star f a b -> a -> f b #

Contravariant f => Contravariant (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

contramap :: (a' -> a0) -> Star f a a0 -> Star f a a' #

(>$) :: b -> Star f a b -> Star f a a0 #

Alternative f => Alternative (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

empty :: Star f a a0 #

(<|>) :: Star f a a0 -> Star f a a0 -> Star f a a0 #

some :: Star f a a0 -> Star f a [a0] #

many :: Star f a a0 -> Star f a [a0] #

Applicative f => Applicative (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

pure :: a0 -> Star f a a0 #

(<*>) :: Star f a (a0 -> b) -> Star f a a0 -> Star f a b #

liftA2 :: (a0 -> b -> c) -> Star f a a0 -> Star f a b -> Star f a c #

(*>) :: Star f a a0 -> Star f a b -> Star f a b #

(<*) :: Star f a a0 -> Star f a b -> Star f a a0 #

Functor f => Functor (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

fmap :: (a0 -> b) -> Star f a a0 -> Star f a b #

(<$) :: a0 -> Star f a b -> Star f a a0 #

Monad f => Monad (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

(>>=) :: Star f a a0 -> (a0 -> Star f a b) -> Star f a b #

(>>) :: Star f a a0 -> Star f a b -> Star f a b #

return :: a0 -> Star f a a0 #

MonadPlus f => MonadPlus (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

mzero :: Star f a a0 #

mplus :: Star f a a0 -> Star f a a0 -> Star f a a0 #

Distributive f => Distributive (Star f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

distribute :: Functor f0 => f0 (Star f a a0) -> Star f a (f0 a0) #

collect :: Functor f0 => (a0 -> Star f a b) -> f0 a0 -> Star f a (f0 b) #

distributeM :: Monad m => m (Star f a a0) -> Star f a (m a0) #

collectM :: Monad m => (a0 -> Star f a b) -> m a0 -> Star f a (m b) #

Invariant f => Invariant (Star f a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Star f a a0 -> Star f a b #

type Rep (Star f) 
Instance details

Defined in Data.Profunctor.Rep

type Rep (Star f) = f

newtype Costar (f :: k -> Type) (d :: k) c #

Lift a Functor into a Profunctor (backwards).

Costar has a polymorphic kind since 5.6.

Constructors

Costar 

Fields

Instances

Instances details
Invariant f => Invariant2 (Costar f)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Costar f a b -> Costar f c d #

Applicative f => Cochoice (Costar f) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Costar f (Either a d) (Either b d) -> Costar f a b #

unright :: Costar f (Either d a) (Either d b) -> Costar f a b #

Functor f => Closed (Costar f) 
Instance details

Defined in Data.Profunctor.Closed

Methods

closed :: Costar f a b -> Costar f (x -> a) (x -> b) #

Functor f => Corepresentable (Costar f) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Corep (Costar f) :: Type -> Type #

Methods

cotabulate :: (Corep (Costar f) d -> c) -> Costar f d c #

Functor f => Costrong (Costar f) 
Instance details

Defined in Data.Profunctor.Strong

Methods

unfirst :: Costar f (a, d) (b, d) -> Costar f a b #

unsecond :: Costar f (d, a) (d, b) -> Costar f a b #

Functor f => Profunctor (Costar f) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (a -> b) -> (c -> d) -> Costar f b c -> Costar f a d #

lmap :: (a -> b) -> Costar f b c -> Costar f a c #

rmap :: (b -> c) -> Costar f a b -> Costar f a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Costar f a b -> Costar f a c #

(.#) :: forall a b c q. Coercible b a => Costar f b c -> q a b -> Costar f a c #

Functor f => Cosieve (Costar f) f 
Instance details

Defined in Data.Profunctor.Sieve

Methods

cosieve :: Costar f a b -> f a -> b #

Applicative (Costar f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

pure :: a0 -> Costar f a a0 #

(<*>) :: Costar f a (a0 -> b) -> Costar f a a0 -> Costar f a b #

liftA2 :: (a0 -> b -> c) -> Costar f a a0 -> Costar f a b -> Costar f a c #

(*>) :: Costar f a a0 -> Costar f a b -> Costar f a b #

(<*) :: Costar f a a0 -> Costar f a b -> Costar f a a0 #

Functor (Costar f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

fmap :: (a0 -> b) -> Costar f a a0 -> Costar f a b #

(<$) :: a0 -> Costar f a b -> Costar f a a0 #

Monad (Costar f a) 
Instance details

Defined in Data.Profunctor.Types

Methods

(>>=) :: Costar f a a0 -> (a0 -> Costar f a b) -> Costar f a b #

(>>) :: Costar f a a0 -> Costar f a b -> Costar f a b #

return :: a0 -> Costar f a a0 #

Distributive (Costar f d) 
Instance details

Defined in Data.Profunctor.Types

Methods

distribute :: Functor f0 => f0 (Costar f d a) -> Costar f d (f0 a) #

collect :: Functor f0 => (a -> Costar f d b) -> f0 a -> Costar f d (f0 b) #

distributeM :: Monad m => m (Costar f d a) -> Costar f d (m a) #

collectM :: Monad m => (a -> Costar f d b) -> m a -> Costar f d (m b) #

Invariant (Costar f a)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Costar f a a0 -> Costar f a b #

type Corep (Costar f) 
Instance details

Defined in Data.Profunctor.Rep

type Corep (Costar f) = f

newtype Forget r a (b :: k) #

Forget has a polymorphic kind since 5.6.

Constructors

Forget 

Fields

Instances

Instances details
Invariant2 (Forget r :: Type -> Type -> TYPE LiftedRep)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap2 :: (a -> c) -> (c -> a) -> (b -> d) -> (d -> b) -> Forget r a b -> Forget r c d #

Monoid r => Choice (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Choice

Methods

left' :: Forget r a b -> Forget r (Either a c) (Either b c) #

right' :: Forget r a b -> Forget r (Either c a) (Either c b) #

Cochoice (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Choice

Methods

unleft :: Forget r (Either a d) (Either b d) -> Forget r a b #

unright :: Forget r (Either d a) (Either d b) -> Forget r a b #

Representable (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Rep

Associated Types

type Rep (Forget r) :: Type -> Type #

Methods

tabulate :: (d -> Rep (Forget r) c) -> Forget r d c #

Strong (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Strong

Methods

first' :: Forget r a b -> Forget r (a, c) (b, c) #

second' :: Forget r a b -> Forget r (c, a) (c, b) #

Monoid m => Traversing (Forget m :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Traversing

Methods

traverse' :: Traversable f => Forget m a b -> Forget m (f a) (f b) #

wander :: (forall (f :: Type -> Type). Applicative f => (a -> f b) -> s -> f t) -> Forget m a b -> Forget m s t #

Profunctor (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

dimap :: (a -> b) -> (c -> d) -> Forget r b c -> Forget r a d #

lmap :: (a -> b) -> Forget r b c -> Forget r a c #

rmap :: (b -> c) -> Forget r a b -> Forget r a c #

(#.) :: forall a b c q. Coercible c b => q b c -> Forget r a b -> Forget r a c #

(.#) :: forall a b c q. Coercible b a => Forget r b c -> q a b -> Forget r a c #

Sieve (Forget r :: Type -> Type -> TYPE LiftedRep) (Const r :: Type -> Type) 
Instance details

Defined in Data.Profunctor.Sieve

Methods

sieve :: Forget r a b -> a -> Const r b #

Foldable (Forget r a :: TYPE LiftedRep -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

fold :: Monoid m => Forget r a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Forget r a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Forget r a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Forget r a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Forget r a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Forget r a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Forget r a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Forget r a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Forget r a a0 -> a0 #

toList :: Forget r a a0 -> [a0] #

null :: Forget r a a0 -> Bool #

length :: Forget r a a0 -> Int #

elem :: Eq a0 => a0 -> Forget r a a0 -> Bool #

maximum :: Ord a0 => Forget r a a0 -> a0 #

minimum :: Ord a0 => Forget r a a0 -> a0 #

sum :: Num a0 => Forget r a a0 -> a0 #

product :: Num a0 => Forget r a a0 -> a0 #

Contravariant (Forget r a :: Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

contramap :: (a' -> a0) -> Forget r a a0 -> Forget r a a' #

(>$) :: b -> Forget r a b -> Forget r a a0 #

Traversable (Forget r a :: Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

traverse :: Applicative f => (a0 -> f b) -> Forget r a a0 -> f (Forget r a b) #

sequenceA :: Applicative f => Forget r a (f a0) -> f (Forget r a a0) #

mapM :: Monad m => (a0 -> m b) -> Forget r a a0 -> m (Forget r a b) #

sequence :: Monad m => Forget r a (m a0) -> m (Forget r a a0) #

Functor (Forget r a :: Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Types

Methods

fmap :: (a0 -> b) -> Forget r a a0 -> Forget r a b #

(<$) :: a0 -> Forget r a b -> Forget r a a0 #

Invariant (Forget r a :: Type -> TYPE LiftedRep)

from the profunctors package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a0 -> b) -> (b -> a0) -> Forget r a a0 -> Forget r a b #

Monoid r => Monoid (Forget r a b)

Via Monoid r => (a -> r)

Since: profunctors-5.6.2

Instance details

Defined in Data.Profunctor.Types

Methods

mempty :: Forget r a b #

mappend :: Forget r a b -> Forget r a b -> Forget r a b #

mconcat :: [Forget r a b] -> Forget r a b #

Semigroup r => Semigroup (Forget r a b)

Via Semigroup r => (a -> r)

Since: profunctors-5.6.2

Instance details

Defined in Data.Profunctor.Types

Methods

(<>) :: Forget r a b -> Forget r a b -> Forget r a b #

sconcat :: NonEmpty (Forget r a b) -> Forget r a b #

stimes :: Integral b0 => b0 -> Forget r a b -> Forget r a b #

type Rep (Forget r :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Profunctor.Rep

type Rep (Forget r :: Type -> Type -> TYPE LiftedRep) = Const r :: Type -> Type

data Scientific #

An arbitrary-precision number represented using scientific notation.

This type describes the set of all Reals which have a finite decimal expansion.

A scientific number with coefficient c and base10Exponent e corresponds to the Fractional number: fromInteger c * 10 ^^ e

Instances

Instances details
Data Scientific 
Instance details

Defined in Data.Scientific

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Scientific -> c Scientific #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Scientific #

toConstr :: Scientific -> Constr #

dataTypeOf :: Scientific -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Scientific) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Scientific) #

gmapT :: (forall b. Data b => b -> b) -> Scientific -> Scientific #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Scientific -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Scientific -> r #

gmapQ :: (forall d. Data d => d -> u) -> Scientific -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Scientific -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Scientific -> m Scientific #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Scientific -> m Scientific #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Scientific -> m Scientific #

Num Scientific

WARNING: + and - compute the Integer magnitude: 10^e where e is the difference between the base10Exponents 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

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

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

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

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

Show Scientific

See formatScientific if you need more control over the rendering.

Instance details

Defined in Data.Scientific

Binary Scientific

Note that in the future I intend to change the type of the base10Exponent from Int to Integer. To be forward compatible the Binary instance already encodes the exponent as Integer.

Instance details

Defined in Data.Scientific

NFData Scientific 
Instance details

Defined in Data.Scientific

Methods

rnf :: Scientific -> () #

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

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

Hashable Scientific

A hash can be safely calculated from a Scientific. No magnitude 10^e is calculated so there's no risk of a blowup in space or time when hashing scientific numbers coming from untrusted sources.

>>> import Data.Hashable (hash)
>>> let x = scientific 1 2
>>> let y = scientific 100 0
>>> (x == y, hash x == hash y)
(True,True)
Instance details

Defined in Data.Scientific

Lift Scientific

Since: scientific-0.3.7.0

Instance details

Defined in Data.Scientific

Methods

lift :: Quote m => Scientific -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Scientific -> Code m Scientific #

foldS :: (Selective f, Foldable t, Monoid a) => t (f (Either e a)) -> f (Either e a) #

Generalised folding with the short-circuiting behaviour.

allS :: Selective f => (a -> f Bool) -> [a] -> f Bool #

A lifted version of all. Retains the short-circuiting behaviour.

anyS :: Selective f => (a -> f Bool) -> [a] -> f Bool #

A lifted version of any. Retains the short-circuiting behaviour.

(<&&>) :: Selective f => f Bool -> f Bool -> f Bool #

A lifted version of lazy Boolean AND.

(<||>) :: Selective f => f Bool -> f Bool -> f Bool #

A lifted version of lazy Boolean OR.

untilRight :: (Monoid a, Selective f) => f (Either a b) -> f (a, b) #

Keep running an effectful computation until it returns a Right value, collecting the Left's using a supplied Monoid instance.

whileS :: Selective f => f Bool -> f () #

Keep checking an effectful condition while it holds.

andAlso :: (Selective f, Semigroup a) => f (Either e a) -> f (Either e a) -> f (Either e a) #

Accumulate the Right values, or return the first Left.

orElse :: (Selective f, Semigroup e) => f (Either e a) -> f (Either e a) -> f (Either e a) #

Return the first Right value. If both are Left's, accumulate errors.

fromMaybeS :: Selective f => f a -> f (Maybe a) -> f a #

A lifted version of fromMaybe.

whenS :: Selective f => f Bool -> f () -> f () #

Conditionally perform an effect.

bindS :: (Bounded a, Enum a, Eq a, Selective f) => f a -> (a -> f b) -> f b #

A restricted version of monadic bind. Fails with an error if the Bounded and Enum instances for a do not cover all values of a.

matchM :: Monad m => Cases a -> m a -> (a -> m b) -> m (Either a b) #

Eliminate all specified values a from f (Either a b) by replacing each of them with a given f a.

matchS :: (Eq a, Selective f) => Cases a -> f a -> (a -> f b) -> f (Either a b) #

Eliminate all specified values a from f (Either a b) by replacing each of them with a given f a.

cases :: Eq a => [a] -> Cases a #

Embed a list of values into Cases using the trivial but slow membership test based on elem.

casesEnum :: (Bounded a, Enum a) => Cases a #

The list of all possible values of an enumerable data type.

ifS :: Selective f => f Bool -> f a -> f a -> f a #

Branch on a Boolean value, skipping unnecessary effects.

selectM :: Monad f => f (Either a b) -> f (a -> b) -> f b #

One can easily implement a monadic selectM that satisfies the laws, hence any Monad is Selective.

apS :: Selective f => f (a -> b) -> f a -> f b #

Recover the application operator <*> from select. Rigid selective functors satisfy the law <*> = apS and furthermore, the resulting applicative functor satisfies all laws of Applicative:

  • Identity:

    pure id <*> v = v
  • Homomorphism:

    pure f <*> pure x = pure (f x)
  • Interchange:

    u <*> pure y = pure ($y) <*> u
  • Composition:

    (.) <$> u <*> v <*> w = u <*> (v <*> w)

selectT :: Traversable f => f (Either a b) -> f (a -> b) -> f b #

For traversable functors, we can implement select in another interesting way: the effects associated with the second argument can be skipped as long as the first argument contains only Right values.

selectA :: Applicative f => f (Either a b) -> f (a -> b) -> f b #

We can write a function with the type signature of select using the Applicative type class, but it will always execute the effects associated with the second argument, hence being potentially less efficient.

branch :: Selective f => f (Either a b) -> f (a -> c) -> f (b -> c) -> f c #

The branch function is a natural generalisation of select: instead of skipping an unnecessary effect, it chooses which of the two given effectful functions to apply to a given argument; the other effect is unnecessary. It is possible to implement branch in terms of select, which is a good puzzle (give it a try!).

We can also implement select via branch:

selectB :: Selective f => f (Either a b) -> f (a -> b) -> f b
selectB x y = branch x y (pure id)

(<*?) :: Selective f => f (Either a b) -> f (a -> b) -> f b infixl 4 #

An operator alias for select, which is sometimes convenient. It tries to follow the notational convention for Applicative operators. The angle bracket pointing to the left means we always use the corresponding value. The value on the right, however, may be skipped, hence the question mark.

class Applicative f => Selective (f :: Type -> Type) where #

Selective applicative functors. You can think of select as a selective function application: when given a value of type Left a, you must apply the given function, but when given a Right b, you may skip the function and associated effects, and simply return the b.

Note that it is not a requirement for selective functors to skip unnecessary effects. It may be counterintuitive, but this makes them more useful. Why? Typically, when executing a selective computation, you would want to skip the effects (saving work); but on the other hand, if your goal is to statically analyse a given selective computation and extract the set of all possible effects (without actually executing them), then you do not want to skip any effects, because that defeats the purpose of static analysis.

The type signature of select is reminiscent of both <*> and >>=, and indeed a selective functor is in some sense a composition of an applicative functor and the Either monad.

Laws:

  • Identity:
x <*? pure id = either id id <$> x
  • Distributivity; note that y and z have the same type f (a -> b):
pure x <*? (y *> z) = (pure x <*? y) *> (pure x <*? z)
  • Associativity:
x <*? (y <*? z) = (f <$> x) <*? (g <$> y) <*? (h <$> z)
  where
    f x = Right <$> x
    g y = a -> bimap (,a) ($a) y
    h z = uncurry z
  • Monadic select (for selective functors that are also monads):
select = selectM

There are also a few useful theorems:

  • Apply a pure function to the result:
f <$> select x y = select (fmap f <$> x) (fmap f <$> y)
  • Apply a pure function to the Left case of the first argument:
select (first f <$> x) y = select x ((. f) <$> y)
  • Apply a pure function to the second argument:
select x (f <$> y) = select (first (flip f) <$> x) ((&) <$> y)
  • Generalised identity:
x <*? pure y = either y id <$> x
  • A selective functor is rigid if it satisfies <*> = apS. The following interchange law holds for rigid selective functors:
x *> (y <*? z) = (x *> y) <*? z

If f is also a Monad, we require that select = selectM, from which one can prove <*> = apS.

Methods

select :: f (Either a b) -> f (a -> b) -> f b #

Instances

Instances details
Selective ZipList 
Instance details

Defined in Control.Selective

Methods

select :: ZipList (Either a b) -> ZipList (a -> b) -> ZipList b #

Selective Identity 
Instance details

Defined in Control.Selective

Methods

select :: Identity (Either a b) -> Identity (a -> b) -> Identity b #

Selective STM 
Instance details

Defined in Control.Selective

Methods

select :: STM (Either a b) -> STM (a -> b) -> STM b #

Selective IO 
Instance details

Defined in Control.Selective

Methods

select :: IO (Either a b) -> IO (a -> b) -> IO b #

Selective NonEmpty 
Instance details

Defined in Control.Selective

Methods

select :: NonEmpty (Either a b) -> NonEmpty (a -> b) -> NonEmpty b #

Selective Maybe 
Instance details

Defined in Control.Selective

Methods

select :: Maybe (Either a b) -> Maybe (a -> b) -> Maybe b #

Selective [] 
Instance details

Defined in Control.Selective

Methods

select :: [Either a b] -> [a -> b] -> [b] #

ArrowChoice a => Selective (ArrowMonad a) 
Instance details

Defined in Control.Selective

Methods

select :: ArrowMonad a (Either a0 b) -> ArrowMonad a (a0 -> b) -> ArrowMonad a b #

Selective (Either e) 
Instance details

Defined in Control.Selective

Methods

select :: Either e (Either a b) -> Either e (a -> b) -> Either e b #

Selective (Proxy :: Type -> Type) 
Instance details

Defined in Control.Selective

Methods

select :: Proxy (Either a b) -> Proxy (a -> b) -> Proxy b #

Selective (ST s) 
Instance details

Defined in Control.Selective

Methods

select :: ST s (Either a b) -> ST s (a -> b) -> ST s b #

Monoid m => Selective (Over m) 
Instance details

Defined in Control.Selective

Methods

select :: Over m (Either a b) -> Over m (a -> b) -> Over m b #

Applicative f => Selective (SelectA f) 
Instance details

Defined in Control.Selective

Methods

select :: SelectA f (Either a b) -> SelectA f (a -> b) -> SelectA f b #

Monad f => Selective (SelectM f) 
Instance details

Defined in Control.Selective

Methods

select :: SelectM f (Either a b) -> SelectM f (a -> b) -> SelectM f b #

Monoid m => Selective (Under m) 
Instance details

Defined in Control.Selective

Methods

select :: Under m (Either a b) -> Under m (a -> b) -> Under m b #

Semigroup e => Selective (Validation e) 
Instance details

Defined in Control.Selective

Methods

select :: Validation e (Either a b) -> Validation e (a -> b) -> Validation e b #

Selective (Select f) 
Instance details

Defined in Control.Selective.Free

Methods

select :: Select f (Either a b) -> Select f (a -> b) -> Select f b #

Functor f => Selective (Select f) 
Instance details

Defined in Control.Selective.Rigid.Free

Methods

select :: Select f (Either a b) -> Select f (a -> b) -> Select f b #

Selective (Select f) 
Instance details

Defined in Control.Selective.Rigid.Freer

Methods

select :: Select f (Either a b) -> Select f (a -> b) -> Select f b #

Selective f => Selective (Lift f) 
Instance details

Defined in Control.Selective

Methods

select :: Lift f (Either a b) -> Lift f (a -> b) -> Lift f b #

Monad m => Selective (MaybeT m) 
Instance details

Defined in Control.Selective

Methods

select :: MaybeT m (Either a b) -> MaybeT m (a -> b) -> MaybeT m b #

Monoid a => Selective ((,) a) 
Instance details

Defined in Control.Selective

Methods

select :: (a, Either a0 b) -> (a, a0 -> b) -> (a, b) #

Selective f => Selective (ComposeEither f e) 
Instance details

Defined in Control.Selective

Methods

select :: ComposeEither f e (Either a b) -> ComposeEither f e (a -> b) -> ComposeEither f e b #

(Selective f, Applicative g, Traversable g) => Selective (ComposeTraversable f g) 
Instance details

Defined in Control.Selective

Methods

select :: ComposeTraversable f g (Either a b) -> ComposeTraversable f g (a -> b) -> ComposeTraversable f g b #

Selective f => Selective (IdentityT f) 
Instance details

Defined in Control.Selective

Methods

select :: IdentityT f (Either a b) -> IdentityT f (a -> b) -> IdentityT f b #

Selective f => Selective (ReaderT env f) 
Instance details

Defined in Control.Selective

Methods

select :: ReaderT env f (Either a b) -> ReaderT env f (a -> b) -> ReaderT env f b #

Monad m => Selective (StateT s m) 
Instance details

Defined in Control.Selective

Methods

select :: StateT s m (Either a b) -> StateT s m (a -> b) -> StateT s m b #

Monad m => Selective (StateT s m) 
Instance details

Defined in Control.Selective

Methods

select :: StateT s m (Either a b) -> StateT s m (a -> b) -> StateT s m b #

(Monoid w, Selective f) => Selective (WriterT w f) 
Instance details

Defined in Control.Selective

Methods

select :: WriterT w f (Either a b) -> WriterT w f (a -> b) -> WriterT w f b #

(Monoid w, Selective f) => Selective (WriterT w f) 
Instance details

Defined in Control.Selective

Methods

select :: WriterT w f (Either a b) -> WriterT w f (a -> b) -> WriterT w f b #

(Selective f, Selective g) => Selective (Product f g) 
Instance details

Defined in Control.Selective

Methods

select :: Product f g (Either a b) -> Product f g (a -> b) -> Product f g b #

Selective (ContT r m) 
Instance details

Defined in Control.Selective

Methods

select :: ContT r m (Either a b) -> ContT r m (a -> b) -> ContT r m b #

Selective ((->) a) 
Instance details

Defined in Control.Selective

Methods

select :: (a -> Either a0 b) -> (a -> (a0 -> b)) -> a -> b #

(Applicative f, Selective g) => Selective (Compose f g) 
Instance details

Defined in Control.Selective

Methods

select :: Compose f g (Either a b) -> Compose f g (a -> b) -> Compose f g b #

(Monoid w, Monad m) => Selective (RWST r w s m) 
Instance details

Defined in Control.Selective

Methods

select :: RWST r w s m (Either a b) -> RWST r w s m (a -> b) -> RWST r w s m b #

(Monoid w, Monad m) => Selective (RWST r w s m) 
Instance details

Defined in Control.Selective

Methods

select :: RWST r w s m (Either a b) -> RWST r w s m (a -> b) -> RWST r w s m b #

data Cases a #

A list of values, equipped with a fast membership test.

newtype SelectA (f :: Type -> Type) a #

Any applicative functor can be given a Selective instance by defining select = selectA. This data type captures this pattern, so you can use it in combination with the DerivingVia extension as follows:

newtype Over m a = Over m
    deriving (Functor, Applicative, Selective) via SelectA (Const m)

Constructors

SelectA 

Fields

Instances

Instances details
Applicative f => Applicative (SelectA f) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> SelectA f a #

(<*>) :: SelectA f (a -> b) -> SelectA f a -> SelectA f b #

liftA2 :: (a -> b -> c) -> SelectA f a -> SelectA f b -> SelectA f c #

(*>) :: SelectA f a -> SelectA f b -> SelectA f b #

(<*) :: SelectA f a -> SelectA f b -> SelectA f a #

Functor f => Functor (SelectA f) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> SelectA f a -> SelectA f b #

(<$) :: a -> SelectA f b -> SelectA f a #

Applicative f => Selective (SelectA f) 
Instance details

Defined in Control.Selective

Methods

select :: SelectA f (Either a b) -> SelectA f (a -> b) -> SelectA f b #

newtype SelectM (f :: Type -> Type) a #

Any monad can be given a Selective instance by defining select = selectM. This data type captures this pattern, so you can use it in combination with the DerivingVia extension as follows:

newtype V1 a = V1 a
    deriving (Functor, Applicative, Selective, Monad) via SelectM Identity

Constructors

SelectM 

Fields

Instances

Instances details
Applicative f => Applicative (SelectM f) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> SelectM f a #

(<*>) :: SelectM f (a -> b) -> SelectM f a -> SelectM f b #

liftA2 :: (a -> b -> c) -> SelectM f a -> SelectM f b -> SelectM f c #

(*>) :: SelectM f a -> SelectM f b -> SelectM f b #

(<*) :: SelectM f a -> SelectM f b -> SelectM f a #

Functor f => Functor (SelectM f) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> SelectM f a -> SelectM f b #

(<$) :: a -> SelectM f b -> SelectM f a #

Monad f => Monad (SelectM f) 
Instance details

Defined in Control.Selective

Methods

(>>=) :: SelectM f a -> (a -> SelectM f b) -> SelectM f b #

(>>) :: SelectM f a -> SelectM f b -> SelectM f b #

return :: a -> SelectM f a #

Monad f => Selective (SelectM f) 
Instance details

Defined in Control.Selective

Methods

select :: SelectM f (Either a b) -> SelectM f (a -> b) -> SelectM f b #

newtype Over m a #

Static analysis of selective functors with over-approximation.

Constructors

Over 

Fields

Instances

Instances details
Monoid m => Applicative (Over m) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> Over m a #

(<*>) :: Over m (a -> b) -> Over m a -> Over m b #

liftA2 :: (a -> b -> c) -> Over m a -> Over m b -> Over m c #

(*>) :: Over m a -> Over m b -> Over m b #

(<*) :: Over m a -> Over m b -> Over m a #

Functor (Over m) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> Over m a -> Over m b #

(<$) :: a -> Over m b -> Over m a #

Monoid m => Selective (Over m) 
Instance details

Defined in Control.Selective

Methods

select :: Over m (Either a b) -> Over m (a -> b) -> Over m b #

Show m => Show (Over m a) 
Instance details

Defined in Control.Selective

Methods

showsPrec :: Int -> Over m a -> ShowS #

show :: Over m a -> String #

showList :: [Over m a] -> ShowS #

Eq m => Eq (Over m a) 
Instance details

Defined in Control.Selective

Methods

(==) :: Over m a -> Over m a -> Bool #

(/=) :: Over m a -> Over m a -> Bool #

Ord m => Ord (Over m a) 
Instance details

Defined in Control.Selective

Methods

compare :: Over m a -> Over m a -> Ordering #

(<) :: Over m a -> Over m a -> Bool #

(<=) :: Over m a -> Over m a -> Bool #

(>) :: Over m a -> Over m a -> Bool #

(>=) :: Over m a -> Over m a -> Bool #

max :: Over m a -> Over m a -> Over m a #

min :: Over m a -> Over m a -> Over m a #

newtype Under m a #

Static analysis of selective functors with under-approximation.

Constructors

Under 

Fields

Instances

Instances details
Foldable (Under m) 
Instance details

Defined in Control.Selective

Methods

fold :: Monoid m0 => Under m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> Under m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> Under m a -> m0 #

foldr :: (a -> b -> b) -> b -> Under m a -> b #

foldr' :: (a -> b -> b) -> b -> Under m a -> b #

foldl :: (b -> a -> b) -> b -> Under m a -> b #

foldl' :: (b -> a -> b) -> b -> Under m a -> b #

foldr1 :: (a -> a -> a) -> Under m a -> a #

foldl1 :: (a -> a -> a) -> Under m a -> a #

toList :: Under m a -> [a] #

null :: Under m a -> Bool #

length :: Under m a -> Int #

elem :: Eq a => a -> Under m a -> Bool #

maximum :: Ord a => Under m a -> a #

minimum :: Ord a => Under m a -> a #

sum :: Num a => Under m a -> a #

product :: Num a => Under m a -> a #

Traversable (Under m) 
Instance details

Defined in Control.Selective

Methods

traverse :: Applicative f => (a -> f b) -> Under m a -> f (Under m b) #

sequenceA :: Applicative f => Under m (f a) -> f (Under m a) #

mapM :: Monad m0 => (a -> m0 b) -> Under m a -> m0 (Under m b) #

sequence :: Monad m0 => Under m (m0 a) -> m0 (Under m a) #

Monoid m => Applicative (Under m) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> Under m a #

(<*>) :: Under m (a -> b) -> Under m a -> Under m b #

liftA2 :: (a -> b -> c) -> Under m a -> Under m b -> Under m c #

(*>) :: Under m a -> Under m b -> Under m b #

(<*) :: Under m a -> Under m b -> Under m a #

Functor (Under m) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> Under m a -> Under m b #

(<$) :: a -> Under m b -> Under m a #

Monoid m => Selective (Under m) 
Instance details

Defined in Control.Selective

Methods

select :: Under m (Either a b) -> Under m (a -> b) -> Under m b #

Show m => Show (Under m a) 
Instance details

Defined in Control.Selective

Methods

showsPrec :: Int -> Under m a -> ShowS #

show :: Under m a -> String #

showList :: [Under m a] -> ShowS #

Eq m => Eq (Under m a) 
Instance details

Defined in Control.Selective

Methods

(==) :: Under m a -> Under m a -> Bool #

(/=) :: Under m a -> Under m a -> Bool #

Ord m => Ord (Under m a) 
Instance details

Defined in Control.Selective

Methods

compare :: Under m a -> Under m a -> Ordering #

(<) :: Under m a -> Under m a -> Bool #

(<=) :: Under m a -> Under m a -> Bool #

(>) :: Under m a -> Under m a -> Bool #

(>=) :: Under m a -> Under m a -> Bool #

max :: Under m a -> Under m a -> Under m a #

min :: Under m a -> Under m a -> Under m a #

data Validation e a #

Selective instance for the standard applicative functor Validation. This is a good example of a non-trivial selective functor which is not a monad.

Constructors

Failure e 
Success a 

Instances

Instances details
Semigroup e => Applicative (Validation e) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> Validation e a #

(<*>) :: Validation e (a -> b) -> Validation e a -> Validation e b #

liftA2 :: (a -> b -> c) -> Validation e a -> Validation e b -> Validation e c #

(*>) :: Validation e a -> Validation e b -> Validation e b #

(<*) :: Validation e a -> Validation e b -> Validation e a #

Functor (Validation e) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> Validation e a -> Validation e b #

(<$) :: a -> Validation e b -> Validation e a #

Semigroup e => Selective (Validation e) 
Instance details

Defined in Control.Selective

Methods

select :: Validation e (Either a b) -> Validation e (a -> b) -> Validation e b #

(Show e, Show a) => Show (Validation e a) 
Instance details

Defined in Control.Selective

Methods

showsPrec :: Int -> Validation e a -> ShowS #

show :: Validation e a -> String #

showList :: [Validation e a] -> ShowS #

(Eq e, Eq a) => Eq (Validation e a) 
Instance details

Defined in Control.Selective

Methods

(==) :: Validation e a -> Validation e a -> Bool #

(/=) :: Validation e a -> Validation e a -> Bool #

(Ord e, Ord a) => Ord (Validation e a) 
Instance details

Defined in Control.Selective

Methods

compare :: Validation e a -> Validation e a -> Ordering #

(<) :: Validation e a -> Validation e a -> Bool #

(<=) :: Validation e a -> Validation e a -> Bool #

(>) :: Validation e a -> Validation e a -> Bool #

(>=) :: Validation e a -> Validation e a -> Bool #

max :: Validation e a -> Validation e a -> Validation e a #

min :: Validation e a -> Validation e a -> Validation e a #

newtype ComposeTraversable (f :: Type -> Type) (g :: Type -> Type) a #

Composition of a selective functor f and an applicative traversable functor g.

Constructors

ComposeTraversable (f (g a)) 

Instances

Instances details
(Applicative f, Applicative g) => Applicative (ComposeTraversable f g) 
Instance details

Defined in Control.Selective

(Functor f, Functor g) => Functor (ComposeTraversable f g) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> ComposeTraversable f g a -> ComposeTraversable f g b #

(<$) :: a -> ComposeTraversable f g b -> ComposeTraversable f g a #

(Selective f, Applicative g, Traversable g) => Selective (ComposeTraversable f g) 
Instance details

Defined in Control.Selective

Methods

select :: ComposeTraversable f g (Either a b) -> ComposeTraversable f g (a -> b) -> ComposeTraversable f g b #

newtype ComposeEither (f :: Type -> Type) e a #

Composition of a selective functor f with the Either monad.

Constructors

ComposeEither (f (Either e a)) 

Instances

Instances details
(Selective f, Monoid e) => Alternative (ComposeEither f e) 
Instance details

Defined in Control.Selective

Methods

empty :: ComposeEither f e a #

(<|>) :: ComposeEither f e a -> ComposeEither f e a -> ComposeEither f e a #

some :: ComposeEither f e a -> ComposeEither f e [a] #

many :: ComposeEither f e a -> ComposeEither f e [a] #

Selective f => Applicative (ComposeEither f e) 
Instance details

Defined in Control.Selective

Methods

pure :: a -> ComposeEither f e a #

(<*>) :: ComposeEither f e (a -> b) -> ComposeEither f e a -> ComposeEither f e b #

liftA2 :: (a -> b -> c) -> ComposeEither f e a -> ComposeEither f e b -> ComposeEither f e c #

(*>) :: ComposeEither f e a -> ComposeEither f e b -> ComposeEither f e b #

(<*) :: ComposeEither f e a -> ComposeEither f e b -> ComposeEither f e a #

Functor f => Functor (ComposeEither f e) 
Instance details

Defined in Control.Selective

Methods

fmap :: (a -> b) -> ComposeEither f e a -> ComposeEither f e b #

(<$) :: a -> ComposeEither f e b -> ComposeEither f e a #

Selective f => Selective (ComposeEither f e) 
Instance details

Defined in Control.Selective

Methods

select :: ComposeEither f e (Either a b) -> ComposeEither f e (a -> b) -> ComposeEither f e b #

gzero :: (Plus (Rep1 f), Generic1 f) => f a #

Generic zero. Caveats:

  1. Will not compile if f is a sum type.
  2. Any types where the a does not appear must have a Monoid instance.

Since: semigroupoids-5.3.8

psum :: (Foldable t, Plus f) => t (f a) -> f a #

The sum of a collection of actions, generalizing concat.

>>> psum [Just "Hello", Nothing, Just "World"]
Just "Hello"

Since: semigroupoids-5.3.6

class Alt f => Plus (f :: Type -> Type) where #

Laws:

zero <!> m = m
m <!> zero = m

If extended to an Alternative then zero should equal empty.

Methods

zero :: f a #

Instances

Instances details
Plus First 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: First a #

Plus Last 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Last a #

Plus IntMap 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: IntMap a #

Plus Seq 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Seq a #

Plus IO 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: IO a #

Plus Maybe 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Maybe a #

Plus [] 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: [a] #

MonadPlus m => Plus (WrappedMonad m) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: WrappedMonad m a #

Plus (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Proxy a #

Plus (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: U1 a #

Ord k => Plus (Map k) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Map k a #

Alternative f => Plus (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: WrappedApplicative f a #

Plus f => Plus (Lift f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Lift f a #

(Apply f, Applicative f) => Plus (ListT f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: ListT f a #

(Functor f, Monad f) => Plus (MaybeT f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: MaybeT f a #

(Hashable k, Eq k) => Plus (HashMap k) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: HashMap k a #

ArrowPlus a => Plus (WrappedArrow a b) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: WrappedArrow a b a0 #

Plus f => Plus (Rec1 f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Rec1 f a #

Plus f => Plus (Static f a) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

zero :: Static f a a0 #

Plus f => Plus (Backwards f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Backwards f a #

(Functor f, Monad f, Error e) => Plus (ErrorT e f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: ErrorT e f a #

(Functor f, Monad f, Semigroup e, Monoid e) => Plus (ExceptT e f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: ExceptT e f a #

Plus f => Plus (IdentityT f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: IdentityT f a #

Plus f => Plus (ReaderT e f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: ReaderT e f a #

Plus f => Plus (StateT e f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: StateT e f a #

Plus f => Plus (StateT e f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: StateT e f a #

Plus f => Plus (WriterT w f)

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Plus

Methods

zero :: WriterT w f a #

Plus f => Plus (WriterT w f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: WriterT w f a #

Plus f => Plus (WriterT w f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: WriterT w f a #

Plus f => Plus (Reverse f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Reverse f a #

(Plus f, Plus g) => Plus (Product f g) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Product f g a #

(Plus f, Plus g) => Plus (f :*: g) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: (f :*: g) a #

Monoid c => Plus (K1 i c :: Type -> Type)

Since: semigroupoids-5.3.8

Instance details

Defined in Data.Functor.Plus

Methods

zero :: K1 i c a #

(Plus f, Functor g) => Plus (Compose f g) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: Compose f g a #

(Plus f, Functor g) => Plus (f :.: g)

Since: semigroupoids-5.3.8

Instance details

Defined in Data.Functor.Plus

Methods

zero :: (f :.: g) a #

Plus f => Plus (M1 i c f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: M1 i c f a #

Plus f => Plus (RWST r w s f)

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Plus

Methods

zero :: RWST r w s f a #

Plus f => Plus (RWST r w s f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: RWST r w s f a #

Plus f => Plus (RWST r w s f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: RWST r w s f a #

bifoldMap1Default :: (Bitraversable1 t, Semigroup m) => (a -> m) -> (b -> m) -> t a b -> m #

gsequence1 :: (Traversable1 (Rep1 t), Apply f, Generic1 t) => t (f b) -> f (t b) #

Generic sequence1. Caveats are the same for gtraverse1.

Since: semigroupoids-5.3.8

gtraverse1 :: (Traversable1 (Rep1 t), Apply f, Generic1 t) => (a -> f b) -> t a -> f (t b) #

Generic traverse1. Caveats:

  1. Will not compile if t is an empty constructor.
  2. Will not compile if t has some fields that don't mention a, for exmaple data Bar a = MkBar a Int

Since: semigroupoids-5.3.8

foldMap1Default :: (Traversable1 f, Semigroup m) => (a -> m) -> f a -> m #

Default implementation of foldMap1 given an implementation of Traversable1.

class (Bifoldable1 t, Bitraversable t) => Bitraversable1 (t :: TYPE LiftedRep -> TYPE LiftedRep -> Type) where #

Minimal complete definition

bitraverse1 | bisequence1

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> t a c -> f (t b d) #

bisequence1 :: Apply f => t (f a) (f b) -> f (t a b) #

Instances

Instances details
Bitraversable1 Either 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Either a c -> f (Either b d) #

bisequence1 :: Apply f => Either (f a) (f b) -> f (Either a b) #

Bitraversable1 Arg 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Arg a c -> f (Arg b d) #

bisequence1 :: Apply f => Arg (f a) (f b) -> f (Arg a b) #

Bitraversable1 (,) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> (a, c) -> f (b, d) #

bisequence1 :: Apply f => (f a, f b) -> f (a, b) #

Bitraversable1 (Const :: Type -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Const a c -> f (Const b d) #

bisequence1 :: Apply f => Const (f a) (f b) -> f (Const a b) #

Bitraversable1 (Tagged :: TYPE LiftedRep -> Type -> Type) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Tagged a c -> f (Tagged b d) #

bisequence1 :: Apply f => Tagged (f a) (f b) -> f (Tagged a b) #

Bitraversable1 ((,,) x) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> (x, a, c) -> f (x, b, d) #

bisequence1 :: Apply f => (x, f a, f b) -> f (x, a, b) #

Bitraversable1 ((,,,) x y) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> (x, y, a, c) -> f (x, y, b, d) #

bisequence1 :: Apply f => (x, y, f a, f b) -> f (x, y, a, b) #

Traversable1 f => Bitraversable1 (Clown f :: TYPE LiftedRep -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f0 => (a -> f0 b) -> (c -> f0 d) -> Clown f a c -> f0 (Clown f b d) #

bisequence1 :: Apply f0 => Clown f (f0 a) (f0 b) -> f0 (Clown f a b) #

Bitraversable1 p => Bitraversable1 (Flip p) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Flip p a c -> f (Flip p b d) #

bisequence1 :: Apply f => Flip p (f a) (f b) -> f (Flip p a b) #

Traversable1 g => Bitraversable1 (Joker g :: TYPE LiftedRep -> TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Joker g a c -> f (Joker g b d) #

bisequence1 :: Apply f => Joker g (f a) (f b) -> f (Joker g a b) #

Bitraversable1 p => Bitraversable1 (WrappedBifunctor p) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> WrappedBifunctor p a c -> f (WrappedBifunctor p b d) #

bisequence1 :: Apply f => WrappedBifunctor p (f a) (f b) -> f (WrappedBifunctor p a b) #

Bitraversable1 ((,,,,) x y z) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> (x, y, z, a, c) -> f (x, y, z, b, d) #

bisequence1 :: Apply f => (x, y, z, f a, f b) -> f (x, y, z, a, b) #

(Bitraversable1 f, Bitraversable1 g) => Bitraversable1 (Product f g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f0 => (a -> f0 b) -> (c -> f0 d) -> Product f g a c -> f0 (Product f g b d) #

bisequence1 :: Apply f0 => Product f g (f0 a) (f0 b) -> f0 (Product f g a b) #

(Traversable1 f, Bitraversable1 p) => Bitraversable1 (Tannen f p) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f0 => (a -> f0 b) -> (c -> f0 d) -> Tannen f p a c -> f0 (Tannen f p b d) #

bisequence1 :: Apply f0 => Tannen f p (f0 a) (f0 b) -> f0 (Tannen f p a b) #

(Bitraversable1 p, Traversable1 f, Traversable1 g) => Bitraversable1 (Biff p f g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f0 => (a -> f0 b) -> (c -> f0 d) -> Biff p f g a c -> f0 (Biff p f g b d) #

bisequence1 :: Apply f0 => Biff p f g (f0 a) (f0 b) -> f0 (Biff p f g a b) #

class (Foldable1 t, Traversable t) => Traversable1 (t :: TYPE LiftedRep -> Type) where #

Minimal complete definition

traverse1 | sequence1

Methods

traverse1 :: Apply f => (a -> f b) -> t a -> f (t b) #

sequence1 :: Apply f => t (f b) -> f (t b) #

Instances

Instances details
Traversable1 Complex 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Complex a -> f (Complex b) #

sequence1 :: Apply f => Complex (f b) -> f (Complex b) #

Traversable1 Identity 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Identity a -> f (Identity b) #

sequence1 :: Apply f => Identity (f b) -> f (Identity b) #

Traversable1 First 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> First a -> f (First b) #

sequence1 :: Apply f => First (f b) -> f (First b) #

Traversable1 Last 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Last a -> f (Last b) #

sequence1 :: Apply f => Last (f b) -> f (Last b) #

Traversable1 Max 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Max a -> f (Max b) #

sequence1 :: Apply f => Max (f b) -> f (Max b) #

Traversable1 Min 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Min a -> f (Min b) #

sequence1 :: Apply f => Min (f b) -> f (Min b) #

Traversable1 Dual 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Dual a -> f (Dual b) #

sequence1 :: Apply f => Dual (f b) -> f (Dual b) #

Traversable1 Product 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Product a -> f (Product b) #

sequence1 :: Apply f => Product (f b) -> f (Product b) #

Traversable1 Sum 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Sum a -> f (Sum b) #

sequence1 :: Apply f => Sum (f b) -> f (Sum b) #

Traversable1 Par1 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Par1 a -> f (Par1 b) #

sequence1 :: Apply f => Par1 (f b) -> f (Par1 b) #

Traversable1 Tree 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Tree a -> f (Tree b) #

sequence1 :: Apply f => Tree (f b) -> f (Tree b) #

Traversable1 NonEmpty 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) #

sequence1 :: Apply f => NonEmpty (f b) -> f (NonEmpty b) #

Traversable1 (V1 :: TYPE LiftedRep -> Type) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> V1 a -> f (V1 b) #

sequence1 :: Apply f => V1 (f b) -> f (V1 b) #

Traversable1 f => Traversable1 (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Cofree f a -> f0 (Cofree f b) #

sequence1 :: Apply f0 => Cofree f (f0 b) -> f0 (Cofree f b) #

Traversable1 f => Traversable1 (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Free f a -> f0 (Free f b) #

sequence1 :: Apply f0 => Free f (f0 b) -> f0 (Free f b) #

Traversable1 f => Traversable1 (Lift f) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Lift f a -> f0 (Lift f b) #

sequence1 :: Apply f0 => Lift f (f0 b) -> f0 (Lift f b) #

Traversable1 ((,) a) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a0 -> f b) -> (a, a0) -> f (a, b) #

sequence1 :: Apply f => (a, f b) -> f (a, b) #

Traversable1 f => Traversable1 (Alt f) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Alt f a -> f0 (Alt f b) #

sequence1 :: Apply f0 => Alt f (f0 b) -> f0 (Alt f b) #

Traversable1 f => Traversable1 (Rec1 f) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Rec1 f a -> f0 (Rec1 f b) #

sequence1 :: Apply f0 => Rec1 f (f0 b) -> f0 (Rec1 f b) #

Bitraversable1 p => Traversable1 (Join p) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Join p a -> f (Join p b) #

sequence1 :: Apply f => Join p (f b) -> f (Join p b) #

Traversable1 (Tagged a) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a0 -> f b) -> Tagged a a0 -> f (Tagged a b) #

sequence1 :: Apply f => Tagged a (f b) -> f (Tagged a b) #

Traversable1 f => Traversable1 (Backwards f) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Backwards f a -> f0 (Backwards f b) #

sequence1 :: Apply f0 => Backwards f (f0 b) -> f0 (Backwards f b) #

Traversable1 f => Traversable1 (IdentityT f) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> IdentityT f a -> f0 (IdentityT f b) #

sequence1 :: Apply f0 => IdentityT f (f0 b) -> f0 (IdentityT f b) #

Traversable1 f => Traversable1 (Reverse f) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Reverse f a -> f0 (Reverse f b) #

sequence1 :: Apply f0 => Reverse f (f0 b) -> f0 (Reverse f b) #

(Traversable1 f, Traversable1 g) => Traversable1 (Product f g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Product f g a -> f0 (Product f g b) #

sequence1 :: Apply f0 => Product f g (f0 b) -> f0 (Product f g b) #

(Traversable1 f, Traversable1 g) => Traversable1 (Sum f g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Sum f g a -> f0 (Sum f g b) #

sequence1 :: Apply f0 => Sum f g (f0 b) -> f0 (Sum f g b) #

(Traversable1 f, Traversable1 g) => Traversable1 (f :*: g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) #

sequence1 :: Apply f0 => (f :*: g) (f0 b) -> f0 ((f :*: g) b) #

(Traversable1 f, Traversable1 g) => Traversable1 (f :+: g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) #

sequence1 :: Apply f0 => (f :+: g) (f0 b) -> f0 ((f :+: g) b) #

(Traversable1 f, Traversable1 g) => Traversable1 (Compose f g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Compose f g a -> f0 (Compose f g b) #

sequence1 :: Apply f0 => Compose f g (f0 b) -> f0 (Compose f g b) #

(Traversable1 f, Traversable1 g) => Traversable1 (f :.: g) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> (f :.: g) a -> f0 ((f :.: g) b) #

sequence1 :: Apply f0 => (f :.: g) (f0 b) -> f0 ((f :.: g) b) #

Traversable1 f => Traversable1 (M1 i c f) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> M1 i c f a -> f0 (M1 i c f b) #

sequence1 :: Apply f0 => M1 i c f (f0 b) -> f0 (M1 i c f b) #

Traversable1 g => Traversable1 (Joker g a) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a0 -> f b) -> Joker g a a0 -> f (Joker g a b) #

sequence1 :: Apply f => Joker g a (f b) -> f (Joker g a b) #

gtoNonEmpty :: (Foldable1 (Rep1 t), Generic1 t) => t a -> NonEmpty a #

Generic toNonEmpty. Caveats are the same as for gfold1.

Since: semigroupoids-5.3.8

gfoldMap1 :: (Foldable1 (Rep1 t), Generic1 t, Semigroup m) => (a -> m) -> t a -> m #

Generic foldMap1. Caveats are the same as for gfold1.

Since: semigroupoids-5.3.8

gfold1 :: (Foldable1 (Rep1 t), Generic1 t, Semigroup m) => t m -> m #

Generic fold1. Caveats:

  1. Will not compile if t is an empty constructor.
  2. Will not compile if t has some fields that don't mention a, for exmaple data Bar a = MkBar a Int

Since: semigroupoids-5.3.8

asum1 :: (Foldable1 t, Alt m) => t (m a) -> m a #

foldMapDefault1 :: (Foldable1 t, Monoid m) => (a -> m) -> t a -> m #

Usable default for foldMap, but only if you define foldMap1 yourself

sequenceA1_ :: (Foldable1 t, Apply f) => t (f a) -> f () #

for1_ :: (Foldable1 t, Apply f) => t a -> (a -> f b) -> f () #

traverse1_ :: (Foldable1 t, Apply f) => (a -> f b) -> t a -> f () #

intercalateMap1 :: (Foldable1 t, Semigroup m) => m -> (a -> m) -> t a -> m #

Insert m between each pair of m derived from a.

>>> intercalateMap1 " " show $ True :| [False, True]
"True False True"
>>> intercalateMap1 " " show $ True :| []
"True"

galt :: (Generic1 f, Alt (Rep1 f)) => f a -> f a -> f a #

Generic (<!>). Caveats:

  1. Will not compile if f is a sum type.
  2. Any types where the a does not appear must have a Semigroup instance.

Since: semigroupoids-5.3.8

class Functor f => Alt (f :: Type -> Type) where #

Laws:

<!> is associative:             (a <!> b) <!> c = a <!> (b <!> c)
<$> left-distributes over <!>:  f <$> (a <!> b) = (f <$> a) <!> (f <$> b)

If extended to an Alternative then <!> should equal <|>.

Ideally, an instance of Alt also satisfies the "left distribution" law of MonadPlus with respect to <.>:

<.> right-distributes over <!>: (a <!> b) <.> c = (a <.> c) <!> (b <.> c)

IO, Either a, ExceptT e m and STM instead satisfy the "left catch" law:

pure a <!> b = pure a

Maybe and Identity satisfy both "left distribution" and "left catch".

These variations cannot be stated purely in terms of the dependencies of Alt.

When and if MonadPlus is successfully refactored, this class should also be refactored to remove these instances.

The right distributive law should extend in the cases where the a Bind or Monad is provided to yield variations of the right distributive law:

(m <!> n) >>- f = (m >>- f) <!> (m >>- f)
(m <!> n) >>= f = (m >>= f) <!> (m >>= f)

Methods

(<!>) :: f a -> f a -> f a infixl 3 #

<|> without a required empty

Instances

Instances details
Alt Identity

Choose the first option every time. While 'choose the last option' every time is also valid, this instance satisfies more laws.

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Alt

Alt First 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: First a -> First a -> First a #

some :: Applicative First => First a -> First [a] #

many :: Applicative First => First a -> First [a] #

Alt Last 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Last a -> Last a -> Last a #

some :: Applicative Last => Last a -> Last [a] #

many :: Applicative Last => Last a -> Last [a] #

Alt First 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: First a -> First a -> First a #

some :: Applicative First => First a -> First [a] #

many :: Applicative First => First a -> First [a] #

Alt Last 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Last a -> Last a -> Last a #

some :: Applicative Last => Last a -> Last [a] #

many :: Applicative Last => Last a -> Last [a] #

Alt IntMap 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: IntMap a -> IntMap a -> IntMap a #

some :: Applicative IntMap => IntMap a -> IntMap [a] #

many :: Applicative IntMap => IntMap a -> IntMap [a] #

Alt Seq 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Seq a -> Seq a -> Seq a #

some :: Applicative Seq => Seq a -> Seq [a] #

many :: Applicative Seq => Seq a -> Seq [a] #

Alt IO

This instance does not actually satisfy the (<.>) right distributive law It instead satisfies the "left catch" law

Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: IO a -> IO a -> IO a #

some :: Applicative IO => IO a -> IO [a] #

many :: Applicative IO => IO a -> IO [a] #

Alt NonEmpty 
Instance details

Defined in Data.Functor.Alt

Alt Maybe 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Maybe a -> Maybe a -> Maybe a #

some :: Applicative Maybe => Maybe a -> Maybe [a] #

many :: Applicative Maybe => Maybe a -> Maybe [a] #

Alt [] 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: [a] -> [a] -> [a] #

some :: Applicative [] => [a] -> [[a]] #

many :: Applicative [] => [a] -> [[a]] #

MonadPlus m => Alt (WrappedMonad m) 
Instance details

Defined in Data.Functor.Alt

Alt (Either a) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Either a a0 -> Either a a0 -> Either a a0 #

some :: Applicative (Either a) => Either a a0 -> Either a [a0] #

many :: Applicative (Either a) => Either a a0 -> Either a [a0] #

Alt (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Proxy a -> Proxy a -> Proxy a #

some :: Applicative Proxy => Proxy a -> Proxy [a] #

many :: Applicative Proxy => Proxy a -> Proxy [a] #

Alt (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: U1 a -> U1 a -> U1 a #

some :: Applicative U1 => U1 a -> U1 [a] #

many :: Applicative U1 => U1 a -> U1 [a] #

Alt (V1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: V1 a -> V1 a -> V1 a #

some :: Applicative V1 => V1 a -> V1 [a] #

many :: Applicative V1 => V1 a -> V1 [a] #

Ord k => Alt (Map k) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Map k a -> Map k a -> Map k a #

some :: Applicative (Map k) => Map k a -> Map k [a] #

many :: Applicative (Map k) => Map k a -> Map k [a] #

Semigroup e => Alt (Validation e)

For two errors, this instance reports both of them.

Instance details

Defined in Data.Either.Validation

Methods

(<!>) :: Validation e a -> Validation e a -> Validation e a #

some :: Applicative (Validation e) => Validation e a -> Validation e [a] #

many :: Applicative (Validation e) => Validation e a -> Validation e [a] #

Alternative f => Alt (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Alt

Alt f => Alt (Lift f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Lift f a -> Lift f a -> Lift f a #

some :: Applicative (Lift f) => Lift f a -> Lift f [a] #

many :: Applicative (Lift f) => Lift f a -> Lift f [a] #

Apply f => Alt (ListT f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: ListT f a -> ListT f a -> ListT f a #

some :: Applicative (ListT f) => ListT f a -> ListT f [a] #

many :: Applicative (ListT f) => ListT f a -> ListT f [a] #

(Functor f, Monad f) => Alt (MaybeT f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: MaybeT f a -> MaybeT f a -> MaybeT f a #

some :: Applicative (MaybeT f) => MaybeT f a -> MaybeT f [a] #

many :: Applicative (MaybeT f) => MaybeT f a -> MaybeT f [a] #

(Hashable k, Eq k) => Alt (HashMap k) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: HashMap k a -> HashMap k a -> HashMap k a #

some :: Applicative (HashMap k) => HashMap k a -> HashMap k [a] #

many :: Applicative (HashMap k) => HashMap k a -> HashMap k [a] #

ArrowPlus a => Alt (WrappedArrow a b) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: Applicative (WrappedArrow a b) => WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: Applicative (WrappedArrow a b) => WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Alt f => Alt (Rec1 f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Rec1 f a -> Rec1 f a -> Rec1 f a #

some :: Applicative (Rec1 f) => Rec1 f a -> Rec1 f [a] #

many :: Applicative (Rec1 f) => Rec1 f a -> Rec1 f [a] #

Alt f => Alt (Static f a) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

(<!>) :: Static f a a0 -> Static f a a0 -> Static f a a0 #

some :: Applicative (Static f a) => Static f a a0 -> Static f a [a0] #

many :: Applicative (Static f a) => Static f a a0 -> Static f a [a0] #

Alt f => Alt (Backwards f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Backwards f a -> Backwards f a -> Backwards f a #

some :: Applicative (Backwards f) => Backwards f a -> Backwards f [a] #

many :: Applicative (Backwards f) => Backwards f a -> Backwards f [a] #

(Functor f, Monad f) => Alt (ErrorT e f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: ErrorT e f a -> ErrorT e f a -> ErrorT e f a #

some :: Applicative (ErrorT e f) => ErrorT e f a -> ErrorT e f [a] #

many :: Applicative (ErrorT e f) => ErrorT e f a -> ErrorT e f [a] #

(Functor f, Monad f, Semigroup e) => Alt (ExceptT e f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: ExceptT e f a -> ExceptT e f a -> ExceptT e f a #

some :: Applicative (ExceptT e f) => ExceptT e f a -> ExceptT e f [a] #

many :: Applicative (ExceptT e f) => ExceptT e f a -> ExceptT e f [a] #

Alt f => Alt (IdentityT f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: IdentityT f a -> IdentityT f a -> IdentityT f a #

some :: Applicative (IdentityT f) => IdentityT f a -> IdentityT f [a] #

many :: Applicative (IdentityT f) => IdentityT f a -> IdentityT f [a] #

Alt f => Alt (ReaderT e f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: ReaderT e f a -> ReaderT e f a -> ReaderT e f a #

some :: Applicative (ReaderT e f) => ReaderT e f a -> ReaderT e f [a] #

many :: Applicative (ReaderT e f) => ReaderT e f a -> ReaderT e f [a] #

Alt f => Alt (StateT e f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: StateT e f a -> StateT e f a -> StateT e f a #

some :: Applicative (StateT e f) => StateT e f a -> StateT e f [a] #

many :: Applicative (StateT e f) => StateT e f a -> StateT e f [a] #

Alt f => Alt (StateT e f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: StateT e f a -> StateT e f a -> StateT e f a #

some :: Applicative (StateT e f) => StateT e f a -> StateT e f [a] #

many :: Applicative (StateT e f) => StateT e f a -> StateT e f [a] #

Alt f => Alt (WriterT w f)

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: WriterT w f a -> WriterT w f a -> WriterT w f a #

some :: Applicative (WriterT w f) => WriterT w f a -> WriterT w f [a] #

many :: Applicative (WriterT w f) => WriterT w f a -> WriterT w f [a] #

Alt f => Alt (WriterT w f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: WriterT w f a -> WriterT w f a -> WriterT w f a #

some :: Applicative (WriterT w f) => WriterT w f a -> WriterT w f [a] #

many :: Applicative (WriterT w f) => WriterT w f a -> WriterT w f [a] #

Alt f => Alt (WriterT w f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: WriterT w f a -> WriterT w f a -> WriterT w f a #

some :: Applicative (WriterT w f) => WriterT w f a -> WriterT w f [a] #

many :: Applicative (WriterT w f) => WriterT w f a -> WriterT w f [a] #

Alt f => Alt (Reverse f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Reverse f a -> Reverse f a -> Reverse f a #

some :: Applicative (Reverse f) => Reverse f a -> Reverse f [a] #

many :: Applicative (Reverse f) => Reverse f a -> Reverse f [a] #

(Alt f, Alt g) => Alt (Product f g) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Product f g a -> Product f g a -> Product f g a #

some :: Applicative (Product f g) => Product f g a -> Product f g [a] #

many :: Applicative (Product f g) => Product f g a -> Product f g [a] #

(Alt f, Alt g) => Alt (f :*: g) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

some :: Applicative (f :*: g) => (f :*: g) a -> (f :*: g) [a] #

many :: Applicative (f :*: g) => (f :*: g) a -> (f :*: g) [a] #

Semigroup c => Alt (K1 i c :: Type -> Type)
since 5.3.8
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: K1 i c a -> K1 i c a -> K1 i c a #

some :: Applicative (K1 i c) => K1 i c a -> K1 i c [a] #

many :: Applicative (K1 i c) => K1 i c a -> K1 i c [a] #

(Alt f, Functor g) => Alt (Compose f g) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Applicative (Compose f g) => Compose f g a -> Compose f g [a] #

many :: Applicative (Compose f g) => Compose f g a -> Compose f g [a] #

(Alt f, Functor g) => Alt (f :.: g)

Since: semigroupoids-5.3.8

Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a #

some :: Applicative (f :.: g) => (f :.: g) a -> (f :.: g) [a] #

many :: Applicative (f :.: g) => (f :.: g) a -> (f :.: g) [a] #

Alt f => Alt (M1 i c f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: M1 i c f a -> M1 i c f a -> M1 i c f a #

some :: Applicative (M1 i c f) => M1 i c f a -> M1 i c f [a] #

many :: Applicative (M1 i c f) => M1 i c f a -> M1 i c f [a] #

Alt f => Alt (RWST r w s f)

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: RWST r w s f a -> RWST r w s f a -> RWST r w s f a #

some :: Applicative (RWST r w s f) => RWST r w s f a -> RWST r w s f [a] #

many :: Applicative (RWST r w s f) => RWST r w s f a -> RWST r w s f [a] #

Alt f => Alt (RWST r w s f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: RWST r w s f a -> RWST r w s f a -> RWST r w s f a #

some :: Applicative (RWST r w s f) => RWST r w s f a -> RWST r w s f [a] #

many :: Applicative (RWST r w s f) => RWST r w s f a -> RWST r w s f [a] #

Alt f => Alt (RWST r w s f) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: RWST r w s f a -> RWST r w s f a -> RWST r w s f a #

some :: Applicative (RWST r w s f) => RWST r w s f a -> RWST r w s f [a] #

many :: Applicative (RWST r w s f) => RWST r w s f a -> RWST r w s f [a] #

bilift3 :: Biapply w => (a -> b -> c -> d) -> (e -> f -> g -> h) -> w a e -> w b f -> w c g -> w d h #

Lift ternary functions

bilift2 :: Biapply w => (a -> b -> c) -> (d -> e -> f) -> w a d -> w b e -> w c f #

Lift binary functions

(<<..>>) :: Biapply p => p a c -> p (a -> b) (c -> d) -> p b d infixl 4 #

class Semigroupoid k1 => Groupoid (k1 :: k -> k -> Type) where #

semigroupoid with inverses. This technically should be a category with inverses, except we need to use Ob to define the valid objects for the category

Methods

inv :: forall (a :: k) (b :: k). k1 a b -> k1 b a #

Instances

Instances details
Groupoid (Coercion :: k -> k -> Type) 
Instance details

Defined in Data.Groupoid

Methods

inv :: forall (a :: k0) (b :: k0). Coercion a b -> Coercion b a #

Groupoid ((:~:) :: k -> k -> Type) 
Instance details

Defined in Data.Groupoid

Methods

inv :: forall (a :: k0) (b :: k0). (a :~: b) -> b :~: a #

Groupoid ((:~~:) :: k -> k -> Type) 
Instance details

Defined in Data.Groupoid

Methods

inv :: forall (a :: k0) (b :: k0). (a :~~: b) -> b :~~: a #

Semigroupoid k2 => Groupoid (Iso k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Isomorphism

Methods

inv :: forall (a :: k) (b :: k). Iso k2 a b -> Iso k2 b a #

Groupoid k2 => Groupoid (Dual k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Groupoid

Methods

inv :: forall (a :: k) (b :: k). Dual k2 a b -> Dual k2 b a #

class Semigroupoid (c :: k -> k -> Type) where #

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). c j k1 -> c i j -> c i k1 #

Instances

Instances details
Semigroupoid Op 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Op j k1 -> Op i j -> Op i k1 #

Semigroupoid (,)

http://en.wikipedia.org/wiki/Band_(mathematics)#Rectangular_bands

Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). (j, k1) -> (i, j) -> (i, k1) #

Bind m => Semigroupoid (Kleisli m :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Kleisli m j k1 -> Kleisli m i j -> Kleisli m i k1 #

Semigroupoid (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Const j k1 -> Const i j -> Const i k1 #

Apply f => Semigroupoid (Static f :: Type -> Type -> Type) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Static f j k1 -> Static f i j -> Static f i k1 #

Semigroupoid (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Tagged j k1 -> Tagged i j -> Tagged i k1 #

Semigroupoid (Coercion :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k0) (k1 :: k0) (i :: k0). Coercion j k1 -> Coercion i j -> Coercion i k1 #

Semigroupoid ((:~:) :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k0) (k1 :: k0) (i :: k0). (j :~: k1) -> (i :~: j) -> i :~: k1 #

Extend w => Semigroupoid (Cokleisli w :: Type -> Type -> TYPE LiftedRep) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). Cokleisli w j k1 -> Cokleisli w i j -> Cokleisli w i k1 #

Semigroupoid (->) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). (j -> k1) -> (i -> j) -> i -> k1 #

Semigroupoid ((:~~:) :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k0) (k1 :: k0) (i :: k0). (j :~~: k1) -> (i :~~: j) -> i :~~: k1 #

Semigroupoid k2 => Semigroupoid (Iso k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Isomorphism

Methods

o :: forall (j :: k) (k10 :: k) (i :: k). Iso k2 j k10 -> Iso k2 i j -> Iso k2 i k10 #

Semigroup m => Semigroupoid (Semi m :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k0) (k1 :: k0) (i :: k0). Semi m j k1 -> Semi m i j -> Semi m i k1 #

Category k2 => Semigroupoid (WrappedCategory k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k10 :: k) (i :: k). WrappedCategory k2 j k10 -> WrappedCategory k2 i j -> WrappedCategory k2 i k10 #

Semigroupoid k2 => Semigroupoid (Dual k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Semigroupoid.Dual

Methods

o :: forall (j :: k) (k10 :: k) (i :: k). Dual k2 j k10 -> Dual k2 i j -> Dual k2 i k10 #

newtype WrappedCategory (k2 :: k -> k1 -> Type) (a :: k) (b :: k1) #

Constructors

WrapCategory 

Fields

Instances

Instances details
Category k2 => Category (WrappedCategory k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

id :: forall (a :: k). WrappedCategory k2 a a #

(.) :: forall (b :: k) (c :: k) (a :: k). WrappedCategory k2 b c -> WrappedCategory k2 a b -> WrappedCategory k2 a c #

Category k2 => Semigroupoid (WrappedCategory k2 :: k1 -> k1 -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k) (k10 :: k) (i :: k). WrappedCategory k2 j k10 -> WrappedCategory k2 i j -> WrappedCategory k2 i k10 #

newtype Semi m (a :: k) (b :: k1) #

Constructors

Semi 

Fields

Instances

Instances details
Monoid m => Category (Semi m :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

id :: forall (a :: k0). Semi m a a #

(.) :: forall (b :: k0) (c :: k0) (a :: k0). Semi m b c -> Semi m a b -> Semi m a c #

Semigroup m => Semigroupoid (Semi m :: k -> k -> Type) 
Instance details

Defined in Data.Semigroupoid

Methods

o :: forall (j :: k0) (k1 :: k0) (i :: k0). Semi m j k1 -> Semi m i j -> Semi m i k1 #

(-<-) :: Bind m => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 #

(->-) :: Bind m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 #

(-<<) :: Bind m => (a -> m b) -> m a -> m b infixr 1 #

gbind :: (Generic1 m, Bind (Rep1 m)) => m a -> (a -> m b) -> m b #

Generic (>>-). Caveats:

  1. Will not compile if m is a sum type.
  2. Will not compile if m contains fields that do not mention its type variable.
  3. Will not compile if m contains fields where the type variable appears underneath the composition of type constructors (e.g., f (g a)).
  4. May do redundant work, due to the nature of the Bind instance for (:*:)

Since: semigroupoids-5.3.8

bifoldMapDefault1 :: (Bifoldable1 t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> m #

Usable default for foldMap, but only if you define bifoldMap1 yourself

bisequenceA1_ :: (Bifoldable1 t, Apply f) => t (f a) (f b) -> f () #

bifor1_ :: (Bifoldable1 t, Apply f) => t a c -> (a -> f b) -> (c -> f d) -> f () #

bitraverse1_ :: (Bifoldable1 t, Apply f) => (a -> f b) -> (c -> f d) -> t a c -> f () #

gliftF3 :: (Generic1 w, Apply (Rep1 w)) => (a -> b -> c -> d) -> w a -> w b -> w c -> w d #

Generic liftF3. Caveats are the same as for gliftF2.

Since: semigroupoids-5.3.8

gliftF2 :: (Generic1 w, Apply (Rep1 w)) => (a -> b -> c) -> w a -> w b -> w c #

Generic liftF2. Caveats:

  1. Will not compile if w is a sum type.
  2. Types in w that do not mention the type variable must be instances of Semigroup.

Since: semigroupoids-5.3.8

liftF3 :: Apply w => (a -> b -> c -> d) -> w a -> w b -> w c -> w d #

Lift a ternary function into a comonad with zipping

(<..>) :: Apply w => w a -> w (a -> b) -> w b infixl 4 #

A variant of <.> with the arguments reversed.

apDefault :: Bind f => f (a -> b) -> f a -> f b #

returning :: Functor f => f a -> (a -> b) -> f b #

traverse1Maybe :: (Traversable t, Apply f) => (a -> f b) -> t a -> MaybeApply f (t b) #

Traverse a Traversable using Apply, getting the results back in a MaybeApply.

(<*.>) :: Apply f => MaybeApply f (a -> b) -> f a -> f b infixl 4 #

Apply a possibly-empty-with-unit container of functions to a non-empty container of values.

(<.*>) :: Apply f => f (a -> b) -> MaybeApply f a -> f b infixl 4 #

Apply a non-empty container of functions to a possibly-empty-with-unit container of values.

class Functor f => Apply (f :: Type -> Type) where #

A strong lax semi-monoidal endofunctor. This is equivalent to an Applicative without pure.

Laws:

(.) <$> u <.> v <.> w = u <.> (v <.> w)
x <.> (f <$> y) = (. f) <$> x <.> y
f <$> (x <.> y) = (f .) <$> x <.> y

The laws imply that .> and <. really ignore their left and right results, respectively, and really return their right and left results, respectively. Specifically,

(mf <$> m) .> (nf <$> n) = nf <$> (m .> n)
(mf <$> m) <. (nf <$> n) = mf <$> (m <. n)

Minimal complete definition

(<.>) | liftF2

Methods

(<.>) :: f (a -> b) -> f a -> f b infixl 4 #

(.>) :: f a -> f b -> f b infixl 4 #

 a .> b = const id <$> a <.> b

(<.) :: f a -> f b -> f a infixl 4 #

 a <. b = const <$> a <.> b

liftF2 :: (a -> b -> c) -> f a -> f b -> f c #

Lift a binary function into a comonad with zipping

Instances

Instances details
Apply ZipList 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

(.>) :: ZipList a -> ZipList b -> ZipList b #

(<.) :: ZipList a -> ZipList b -> ZipList a #

liftF2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

Apply Complex 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Complex (a -> b) -> Complex a -> Complex b #

(.>) :: Complex a -> Complex b -> Complex b #

(<.) :: Complex a -> Complex b -> Complex a #

liftF2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

Apply Identity 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Identity (a -> b) -> Identity a -> Identity b #

(.>) :: Identity a -> Identity b -> Identity b #

(<.) :: Identity a -> Identity b -> Identity a #

liftF2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

Apply First 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: First (a -> b) -> First a -> First b #

(.>) :: First a -> First b -> First b #

(<.) :: First a -> First b -> First a #

liftF2 :: (a -> b -> c) -> First a -> First b -> First c #

Apply Last 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Last (a -> b) -> Last a -> Last b #

(.>) :: Last a -> Last b -> Last b #

(<.) :: Last a -> Last b -> Last a #

liftF2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

Apply Down 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Down (a -> b) -> Down a -> Down b #

(.>) :: Down a -> Down b -> Down b #

(<.) :: Down a -> Down b -> Down a #

liftF2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

Apply First 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: First (a -> b) -> First a -> First b #

(.>) :: First a -> First b -> First b #

(<.) :: First a -> First b -> First a #

liftF2 :: (a -> b -> c) -> First a -> First b -> First c #

Apply Last 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Last (a -> b) -> Last a -> Last b #

(.>) :: Last a -> Last b -> Last b #

(<.) :: Last a -> Last b -> Last a #

liftF2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

Apply Max 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Max (a -> b) -> Max a -> Max b #

(.>) :: Max a -> Max b -> Max b #

(<.) :: Max a -> Max b -> Max a #

liftF2 :: (a -> b -> c) -> Max a -> Max b -> Max c #

Apply Min 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Min (a -> b) -> Min a -> Min b #

(.>) :: Min a -> Min b -> Min b #

(<.) :: Min a -> Min b -> Min a #

liftF2 :: (a -> b -> c) -> Min a -> Min b -> Min c #

Apply Dual 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Dual (a -> b) -> Dual a -> Dual b #

(.>) :: Dual a -> Dual b -> Dual b #

(<.) :: Dual a -> Dual b -> Dual a #

liftF2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

Apply Product 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Product (a -> b) -> Product a -> Product b #

(.>) :: Product a -> Product b -> Product b #

(<.) :: Product a -> Product b -> Product a #

liftF2 :: (a -> b -> c) -> Product a -> Product b -> Product c #

Apply Sum 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Sum (a -> b) -> Sum a -> Sum b #

(.>) :: Sum a -> Sum b -> Sum b #

(<.) :: Sum a -> Sum b -> Sum a #

liftF2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

Apply Par1 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Par1 (a -> b) -> Par1 a -> Par1 b #

(.>) :: Par1 a -> Par1 b -> Par1 b #

(<.) :: Par1 a -> Par1 b -> Par1 a #

liftF2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c #

Apply IntMap

An IntMap is not Applicative, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: IntMap (a -> b) -> IntMap a -> IntMap b #

(.>) :: IntMap a -> IntMap b -> IntMap b #

(<.) :: IntMap a -> IntMap b -> IntMap a #

liftF2 :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c #

Apply Seq 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Seq (a -> b) -> Seq a -> Seq b #

(.>) :: Seq a -> Seq b -> Seq b #

(<.) :: Seq a -> Seq b -> Seq a #

liftF2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

Apply Tree 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Tree (a -> b) -> Tree a -> Tree b #

(.>) :: Tree a -> Tree b -> Tree b #

(<.) :: Tree a -> Tree b -> Tree a #

liftF2 :: (a -> b -> c) -> Tree a -> Tree b -> Tree c #

Apply IO 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: IO (a -> b) -> IO a -> IO b #

(.>) :: IO a -> IO b -> IO b #

(<.) :: IO a -> IO b -> IO a #

liftF2 :: (a -> b -> c) -> IO a -> IO b -> IO c #

Apply Q 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Q (a -> b) -> Q a -> Q b #

(.>) :: Q a -> Q b -> Q b #

(<.) :: Q a -> Q b -> Q a #

liftF2 :: (a -> b -> c) -> Q a -> Q b -> Q c #

Apply NonEmpty 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

(.>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<.) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

liftF2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

Apply Maybe 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

(.>) :: Maybe a -> Maybe b -> Maybe b #

(<.) :: Maybe a -> Maybe b -> Maybe a #

liftF2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

Apply [] 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: [a -> b] -> [a] -> [b] #

(.>) :: [a] -> [b] -> [b] #

(<.) :: [a] -> [b] -> [a] #

liftF2 :: (a -> b -> c) -> [a] -> [b] -> [c] #

Representable f => Apply (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

(<.>) :: Co f (a -> b) -> Co f a -> Co f b #

(.>) :: Co f a -> Co f b -> Co f b #

(<.) :: Co f a -> Co f b -> Co f a #

liftF2 :: (a -> b -> c) -> Co f a -> Co f b -> Co f c #

Monad m => Apply (WrappedMonad m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

(.>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<.) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

liftF2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

Apply (Either a) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Either a (a0 -> b) -> Either a a0 -> Either a b #

(.>) :: Either a a0 -> Either a b -> Either a b #

(<.) :: Either a a0 -> Either a b -> Either a a0 #

liftF2 :: (a0 -> b -> c) -> Either a a0 -> Either a b -> Either a c #

Apply (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Proxy (a -> b) -> Proxy a -> Proxy b #

(.>) :: Proxy a -> Proxy b -> Proxy b #

(<.) :: Proxy a -> Proxy b -> Proxy a #

liftF2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

Apply (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: U1 (a -> b) -> U1 a -> U1 b #

(.>) :: U1 a -> U1 b -> U1 b #

(<.) :: U1 a -> U1 b -> U1 a #

liftF2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c #

Apply (V1 :: Type -> Type)

A V1 is not Applicative, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: V1 (a -> b) -> V1 a -> V1 b #

(.>) :: V1 a -> V1 b -> V1 b #

(<.) :: V1 a -> V1 b -> V1 a #

liftF2 :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

Ord k => Apply (Map k)

A 'Map k' is not Applicative, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Map k (a -> b) -> Map k a -> Map k b #

(.>) :: Map k a -> Map k b -> Map k b #

(<.) :: Map k a -> Map k b -> Map k a #

liftF2 :: (a -> b -> c) -> Map k a -> Map k b -> Map k c #

Semigroup e => Apply (Validation e) 
Instance details

Defined in Data.Either.Validation

Methods

(<.>) :: Validation e (a -> b) -> Validation e a -> Validation e b #

(.>) :: Validation e a -> Validation e b -> Validation e b #

(<.) :: Validation e a -> Validation e b -> Validation e a #

liftF2 :: (a -> b -> c) -> Validation e a -> Validation e b -> Validation e c #

Apply f => Apply (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

(<.>) :: Cofree f (a -> b) -> Cofree f a -> Cofree f b #

(.>) :: Cofree f a -> Cofree f b -> Cofree f b #

(<.) :: Cofree f a -> Cofree f b -> Cofree f a #

liftF2 :: (a -> b -> c) -> Cofree f a -> Cofree f b -> Cofree f c #

Functor f => Apply (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

(<.>) :: Free f (a -> b) -> Free f a -> Free f b #

(.>) :: Free f a -> Free f b -> Free f b #

(<.) :: Free f a -> Free f b -> Free f a #

liftF2 :: (a -> b -> c) -> Free f a -> Free f b -> Free f c #

Apply f => Apply (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: MaybeApply f (a -> b) -> MaybeApply f a -> MaybeApply f b #

(.>) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f b #

(<.) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f a #

liftF2 :: (a -> b -> c) -> MaybeApply f a -> MaybeApply f b -> MaybeApply f c #

Applicative f => Apply (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Bind.Class

Apply f => Apply (Lift f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Lift f (a -> b) -> Lift f a -> Lift f b #

(.>) :: Lift f a -> Lift f b -> Lift f b #

(<.) :: Lift f a -> Lift f b -> Lift f a #

liftF2 :: (a -> b -> c) -> Lift f a -> Lift f b -> Lift f c #

Apply m => Apply (ListT m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ListT m (a -> b) -> ListT m a -> ListT m b #

(.>) :: ListT m a -> ListT m b -> ListT m b #

(<.) :: ListT m a -> ListT m b -> ListT m a #

liftF2 :: (a -> b -> c) -> ListT m a -> ListT m b -> ListT m c #

(Functor m, Monad m) => Apply (MaybeT m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #

(.>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

(<.) :: MaybeT m a -> MaybeT m b -> MaybeT m a #

liftF2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

(Hashable k, Eq k) => Apply (HashMap k)

A 'HashMap k' is not Applicative, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: HashMap k (a -> b) -> HashMap k a -> HashMap k b #

(.>) :: HashMap k a -> HashMap k b -> HashMap k b #

(<.) :: HashMap k a -> HashMap k b -> HashMap k a #

liftF2 :: (a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c #

Semigroup m => Apply ((,) m)

A (,) m is not Applicative unless its m is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: (m, a -> b) -> (m, a) -> (m, b) #

(.>) :: (m, a) -> (m, b) -> (m, b) #

(<.) :: (m, a) -> (m, b) -> (m, a) #

liftF2 :: (a -> b -> c) -> (m, a) -> (m, b) -> (m, c) #

Arrow a => Apply (WrappedArrow a b) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

(.>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<.) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

liftF2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

Semigroup m => Apply (Const m :: Type -> Type)

A Const m is not Applicative unless its m is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Const m (a -> b) -> Const m a -> Const m b #

(.>) :: Const m a -> Const m b -> Const m b #

(<.) :: Const m a -> Const m b -> Const m a #

liftF2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

Apply f => Apply (Alt f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Alt f (a -> b) -> Alt f a -> Alt f b #

(.>) :: Alt f a -> Alt f b -> Alt f b #

(<.) :: Alt f a -> Alt f b -> Alt f a #

liftF2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c #

Apply f => Apply (Rec1 f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b #

(.>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #

(<.) :: Rec1 f a -> Rec1 f b -> Rec1 f a #

liftF2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c #

Biapply p => Apply (Join p) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Join p (a -> b) -> Join p a -> Join p b #

(.>) :: Join p a -> Join p b -> Join p b #

(<.) :: Join p a -> Join p b -> Join p a #

liftF2 :: (a -> b -> c) -> Join p a -> Join p b -> Join p c #

(Semigroup e, Apply w) => Apply (EnvT e w)

An EnvT e w is not Applicative unless its e is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: EnvT e w (a -> b) -> EnvT e w a -> EnvT e w b #

(.>) :: EnvT e w a -> EnvT e w b -> EnvT e w b #

(<.) :: EnvT e w a -> EnvT e w b -> EnvT e w a #

liftF2 :: (a -> b -> c) -> EnvT e w a -> EnvT e w b -> EnvT e w c #

(Apply w, Semigroup s) => Apply (StoreT s w)

A StoreT s w is not Applicative unless its s is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: StoreT s w (a -> b) -> StoreT s w a -> StoreT s w b #

(.>) :: StoreT s w a -> StoreT s w b -> StoreT s w b #

(<.) :: StoreT s w a -> StoreT s w b -> StoreT s w a #

liftF2 :: (a -> b -> c) -> StoreT s w a -> StoreT s w b -> StoreT s w c #

Apply w => Apply (TracedT m w) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: TracedT m w (a -> b) -> TracedT m w a -> TracedT m w b #

(.>) :: TracedT m w a -> TracedT m w b -> TracedT m w b #

(<.) :: TracedT m w a -> TracedT m w b -> TracedT m w a #

liftF2 :: (a -> b -> c) -> TracedT m w a -> TracedT m w b -> TracedT m w c #

(Functor f, Monad m) => Apply (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(<.>) :: FreeT f m (a -> b) -> FreeT f m a -> FreeT f m b #

(.>) :: FreeT f m a -> FreeT f m b -> FreeT f m b #

(<.) :: FreeT f m a -> FreeT f m b -> FreeT f m a #

liftF2 :: (a -> b -> c) -> FreeT f m a -> FreeT f m b -> FreeT f m c #

Apply f => Apply (Static f a) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

(<.>) :: Static f a (a0 -> b) -> Static f a a0 -> Static f a b #

(.>) :: Static f a a0 -> Static f a b -> Static f a b #

(<.) :: Static f a a0 -> Static f a b -> Static f a a0 #

liftF2 :: (a0 -> b -> c) -> Static f a a0 -> Static f a b -> Static f a c #

Apply (Tagged a) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Tagged a (a0 -> b) -> Tagged a a0 -> Tagged a b #

(.>) :: Tagged a a0 -> Tagged a b -> Tagged a b #

(<.) :: Tagged a a0 -> Tagged a b -> Tagged a a0 #

liftF2 :: (a0 -> b -> c) -> Tagged a a0 -> Tagged a b -> Tagged a c #

Apply f => Apply (Backwards f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Backwards f (a -> b) -> Backwards f a -> Backwards f b #

(.>) :: Backwards f a -> Backwards f b -> Backwards f b #

(<.) :: Backwards f a -> Backwards f b -> Backwards f a #

liftF2 :: (a -> b -> c) -> Backwards f a -> Backwards f b -> Backwards f c #

(Functor m, Monad m) => Apply (ErrorT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ErrorT e m (a -> b) -> ErrorT e m a -> ErrorT e m b #

(.>) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m b #

(<.) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m a #

liftF2 :: (a -> b -> c) -> ErrorT e m a -> ErrorT e m b -> ErrorT e m c #

(Functor m, Monad m) => Apply (ExceptT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b #

(.>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

(<.) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a #

liftF2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c #

Apply w => Apply (IdentityT w) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: IdentityT w (a -> b) -> IdentityT w a -> IdentityT w b #

(.>) :: IdentityT w a -> IdentityT w b -> IdentityT w b #

(<.) :: IdentityT w a -> IdentityT w b -> IdentityT w a #

liftF2 :: (a -> b -> c) -> IdentityT w a -> IdentityT w b -> IdentityT w c #

Apply m => Apply (ReaderT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ReaderT e m (a -> b) -> ReaderT e m a -> ReaderT e m b #

(.>) :: ReaderT e m a -> ReaderT e m b -> ReaderT e m b #

(<.) :: ReaderT e m a -> ReaderT e m b -> ReaderT e m a #

liftF2 :: (a -> b -> c) -> ReaderT e m a -> ReaderT e m b -> ReaderT e m c #

Bind m => Apply (StateT s m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

(.>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<.) :: StateT s m a -> StateT s m b -> StateT s m a #

liftF2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

Bind m => Apply (StateT s m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

(.>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<.) :: StateT s m a -> StateT s m b -> StateT s m a #

liftF2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

Bind m => Apply (WriterT w m)

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

(.>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<.) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

liftF2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(Apply m, Semigroup w) => Apply (WriterT w m)

A WriterT w m is not Applicative unless its w is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

(.>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<.) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

liftF2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(Apply m, Semigroup w) => Apply (WriterT w m)

A WriterT w m is not Applicative unless its w is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

(.>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<.) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

liftF2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

Semigroup f => Apply (Constant f :: Type -> Type)

A Constant f is not Applicative unless its f is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Constant f (a -> b) -> Constant f a -> Constant f b #

(.>) :: Constant f a -> Constant f b -> Constant f b #

(<.) :: Constant f a -> Constant f b -> Constant f a #

liftF2 :: (a -> b -> c) -> Constant f a -> Constant f b -> Constant f c #

Apply f => Apply (Reverse f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Reverse f (a -> b) -> Reverse f a -> Reverse f b #

(.>) :: Reverse f a -> Reverse f b -> Reverse f b #

(<.) :: Reverse f a -> Reverse f b -> Reverse f a #

liftF2 :: (a -> b -> c) -> Reverse f a -> Reverse f b -> Reverse f c #

(Apply f, Apply g) => Apply (Product f g) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Product f g (a -> b) -> Product f g a -> Product f g b #

(.>) :: Product f g a -> Product f g b -> Product f g b #

(<.) :: Product f g a -> Product f g b -> Product f g a #

liftF2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

(Apply f, Apply g) => Apply (f :*: g) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b #

(.>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #

(<.) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a #

liftF2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c #

Semigroup c => Apply (K1 i c :: Type -> Type)

A K1 i c is not Applicative unless its c is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b #

(.>) :: K1 i c a -> K1 i c b -> K1 i c b #

(<.) :: K1 i c a -> K1 i c b -> K1 i c a #

liftF2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 #

Apply (Cokleisli w a) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Cokleisli w a (a0 -> b) -> Cokleisli w a a0 -> Cokleisli w a b #

(.>) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a b #

(<.) :: Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a a0 #

liftF2 :: (a0 -> b -> c) -> Cokleisli w a a0 -> Cokleisli w a b -> Cokleisli w a c #

Apply (ContT r m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b #

(.>) :: ContT r m a -> ContT r m b -> ContT r m b #

(<.) :: ContT r m a -> ContT r m b -> ContT r m a #

liftF2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c #

Apply ((->) m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: (m -> (a -> b)) -> (m -> a) -> m -> b #

(.>) :: (m -> a) -> (m -> b) -> m -> b #

(<.) :: (m -> a) -> (m -> b) -> m -> a #

liftF2 :: (a -> b -> c) -> (m -> a) -> (m -> b) -> m -> c #

(Apply f, Apply g) => Apply (Compose f g) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

(.>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<.) :: Compose f g a -> Compose f g b -> Compose f g a #

liftF2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(Apply f, Apply g) => Apply (f :.: g) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b #

(.>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b #

(<.) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a #

liftF2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c #

Apply f => Apply (M1 i t f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: M1 i t f (a -> b) -> M1 i t f a -> M1 i t f b #

(.>) :: M1 i t f a -> M1 i t f b -> M1 i t f b #

(<.) :: M1 i t f a -> M1 i t f b -> M1 i t f a #

liftF2 :: (a -> b -> c) -> M1 i t f a -> M1 i t f b -> M1 i t f c #

Bind m => Apply (RWST r w s m)

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

(.>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<.) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

liftF2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(Bind m, Semigroup w) => Apply (RWST r w s m)

An RWST r w s m is not Applicative unless its w is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

(.>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<.) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

liftF2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(Bind m, Semigroup w) => Apply (RWST r w s m)

An RWST r w s m is not Applicative unless its w is a Monoid, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

(.>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<.) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

liftF2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

newtype WrappedApplicative (f :: Type -> Type) a #

Wrap an Applicative to be used as a member of Apply

Constructors

WrapApplicative 

Fields

Instances

Instances details
Alternative f => Alternative (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Bind.Class

Applicative f => Applicative (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Bind.Class

Functor f => Functor (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

fmap :: (a -> b) -> WrappedApplicative f a -> WrappedApplicative f b #

(<$) :: a -> WrappedApplicative f b -> WrappedApplicative f a #

Alternative f => Alt (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Alt

Applicative f => Apply (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Bind.Class

Alternative f => Plus (WrappedApplicative f) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: WrappedApplicative f a #

newtype MaybeApply (f :: Type -> Type) a #

Transform an Apply into an Applicative by adding a unit.

Constructors

MaybeApply 

Fields

Instances

Instances details
Apply f => Applicative (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

pure :: a -> MaybeApply f a #

(<*>) :: MaybeApply f (a -> b) -> MaybeApply f a -> MaybeApply f b #

liftA2 :: (a -> b -> c) -> MaybeApply f a -> MaybeApply f b -> MaybeApply f c #

(*>) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f b #

(<*) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f a #

Functor f => Functor (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

fmap :: (a -> b) -> MaybeApply f a -> MaybeApply f b #

(<$) :: a -> MaybeApply f b -> MaybeApply f a #

Comonad f => Comonad (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

extract :: MaybeApply f a -> a #

duplicate :: MaybeApply f a -> MaybeApply f (MaybeApply f a) #

extend :: (MaybeApply f a -> b) -> MaybeApply f a -> MaybeApply f b #

Apply f => Apply (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: MaybeApply f (a -> b) -> MaybeApply f a -> MaybeApply f b #

(.>) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f b #

(<.) :: MaybeApply f a -> MaybeApply f b -> MaybeApply f a #

liftF2 :: (a -> b -> c) -> MaybeApply f a -> MaybeApply f b -> MaybeApply f c #

Extend f => Extend (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

duplicated :: MaybeApply f a -> MaybeApply f (MaybeApply f a) #

extended :: (MaybeApply f a -> b) -> MaybeApply f a -> MaybeApply f b #

class Apply m => Bind (m :: Type -> Type) where #

A Monad sans return.

Minimal definition: Either join or >>-

If defining both, then the following laws (the default definitions) must hold:

join = (>>- id)
m >>- f = join (fmap f m)

Laws:

induced definition of <.>: f <.> x = f >>- (<$> x)

Finally, there are two associativity conditions:

associativity of (>>-):    (m >>- f) >>- g == m >>- (\x -> f x >>- g)
associativity of join:     join . join = join . fmap join

These can both be seen as special cases of the constraint that

associativity of (->-): (f ->- g) ->- h = f ->- (g ->- h)

Minimal complete definition

(>>-) | join

Methods

(>>-) :: m a -> (a -> m b) -> m b infixl 1 #

Instances

Instances details
Bind Complex 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Complex a -> (a -> Complex b) -> Complex b #

join :: Complex (Complex a) -> Complex a #

Bind Identity 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Identity a -> (a -> Identity b) -> Identity b #

join :: Identity (Identity a) -> Identity a #

Bind First 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: First a -> (a -> First b) -> First b #

join :: First (First a) -> First a #

Bind Last 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Last a -> (a -> Last b) -> Last b #

join :: Last (Last a) -> Last a #

Bind Down 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Down a -> (a -> Down b) -> Down b #

join :: Down (Down a) -> Down a #

Bind First 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: First a -> (a -> First b) -> First b #

join :: First (First a) -> First a #

Bind Last 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Last a -> (a -> Last b) -> Last b #

join :: Last (Last a) -> Last a #

Bind Max 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Max a -> (a -> Max b) -> Max b #

join :: Max (Max a) -> Max a #

Bind Min 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Min a -> (a -> Min b) -> Min b #

join :: Min (Min a) -> Min a #

Bind Dual 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Dual a -> (a -> Dual b) -> Dual b #

join :: Dual (Dual a) -> Dual a #

Bind Product 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Product a -> (a -> Product b) -> Product b #

join :: Product (Product a) -> Product a #

Bind Sum 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Sum a -> (a -> Sum b) -> Sum b #

join :: Sum (Sum a) -> Sum a #

Bind Par1

Since: semigroupoids-5.3.8

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Par1 a -> (a -> Par1 b) -> Par1 b #

join :: Par1 (Par1 a) -> Par1 a #

Bind IntMap

An IntMap is not a Monad, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: IntMap a -> (a -> IntMap b) -> IntMap b #

join :: IntMap (IntMap a) -> IntMap a #

Bind Seq 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Seq a -> (a -> Seq b) -> Seq b #

join :: Seq (Seq a) -> Seq a #

Bind Tree 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Tree a -> (a -> Tree b) -> Tree b #

join :: Tree (Tree a) -> Tree a #

Bind IO 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: IO a -> (a -> IO b) -> IO b #

join :: IO (IO a) -> IO a #

Bind Q 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Q a -> (a -> Q b) -> Q b #

join :: Q (Q a) -> Q a #

Bind NonEmpty 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b #

join :: NonEmpty (NonEmpty a) -> NonEmpty a #

Bind Maybe 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Maybe a -> (a -> Maybe b) -> Maybe b #

join :: Maybe (Maybe a) -> Maybe a #

Bind [] 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: [a] -> (a -> [b]) -> [b] #

join :: [[a]] -> [a] #

Representable f => Bind (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

(>>-) :: Co f a -> (a -> Co f b) -> Co f b #

join :: Co f (Co f a) -> Co f a #

Monad m => Bind (WrappedMonad m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #

join :: WrappedMonad m (WrappedMonad m a) -> WrappedMonad m a #

Bind (Either a) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Either a a0 -> (a0 -> Either a b) -> Either a b #

join :: Either a (Either a a0) -> Either a a0 #

Bind (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Proxy a -> (a -> Proxy b) -> Proxy b #

join :: Proxy (Proxy a) -> Proxy a #

Bind (U1 :: Type -> Type)

Since: semigroupoids-5.3.8

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: U1 a -> (a -> U1 b) -> U1 b #

join :: U1 (U1 a) -> U1 a #

Bind (V1 :: Type -> Type)

A V1 is not a Monad, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: V1 a -> (a -> V1 b) -> V1 b #

join :: V1 (V1 a) -> V1 a #

Ord k => Bind (Map k)

A 'Map k' is not a Monad, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Map k a -> (a -> Map k b) -> Map k b #

join :: Map k (Map k a) -> Map k a #

Functor f => Bind (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

(>>-) :: Free f a -> (a -> Free f b) -> Free f b #

join :: Free f (Free f a) -> Free f a #

(Apply m, Monad m) => Bind (ListT m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ListT m a -> (a -> ListT m b) -> ListT m b #

join :: ListT m (ListT m a) -> ListT m a #

(Functor m, Monad m) => Bind (MaybeT m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #

join :: MaybeT m (MaybeT m a) -> MaybeT m a #

(Hashable k, Eq k) => Bind (HashMap k)

A 'HashMap k' is not a Monad, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: HashMap k a -> (a -> HashMap k b) -> HashMap k b #

join :: HashMap k (HashMap k a) -> HashMap k a #

Semigroup m => Bind ((,) m)

A (,) m is not a Monad unless its m is a Monoid, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: (m, a) -> (a -> (m, b)) -> (m, b) #

join :: (m, (m, a)) -> (m, a) #

Bind f => Bind (Alt f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Alt f a -> (a -> Alt f b) -> Alt f b #

join :: Alt f (Alt f a) -> Alt f a #

Bind m => Bind (Rec1 m)

Since: semigroupoids-5.3.8

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Rec1 m a -> (a -> Rec1 m b) -> Rec1 m b #

join :: Rec1 m (Rec1 m a) -> Rec1 m a #

(Functor f, Monad m) => Bind (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(>>-) :: FreeT f m a -> (a -> FreeT f m b) -> FreeT f m b #

join :: FreeT f m (FreeT f m a) -> FreeT f m a #

Bind (Tagged a) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Tagged a a0 -> (a0 -> Tagged a b) -> Tagged a b #

join :: Tagged a (Tagged a a0) -> Tagged a a0 #

(Functor m, Monad m) => Bind (ErrorT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ErrorT e m a -> (a -> ErrorT e m b) -> ErrorT e m b #

join :: ErrorT e m (ErrorT e m a) -> ErrorT e m a #

(Functor m, Monad m) => Bind (ExceptT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b #

join :: ExceptT e m (ExceptT e m a) -> ExceptT e m a #

Bind m => Bind (IdentityT m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b #

join :: IdentityT m (IdentityT m a) -> IdentityT m a #

Bind m => Bind (ReaderT e m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ReaderT e m a -> (a -> ReaderT e m b) -> ReaderT e m b #

join :: ReaderT e m (ReaderT e m a) -> ReaderT e m a #

Bind m => Bind (StateT s m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

join :: StateT s m (StateT s m a) -> StateT s m a #

Bind m => Bind (StateT s m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

join :: StateT s m (StateT s m a) -> StateT s m a #

Bind m => Bind (WriterT w m)

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

join :: WriterT w m (WriterT w m a) -> WriterT w m a #

(Bind m, Semigroup w) => Bind (WriterT w m)

A WriterT w m is not a Monad unless its w is a Monoid, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

join :: WriterT w m (WriterT w m a) -> WriterT w m a #

(Bind m, Semigroup w) => Bind (WriterT w m)

A WriterT w m is not a Monad unless its w is a Monoid, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

join :: WriterT w m (WriterT w m a) -> WriterT w m a #

(Bind f, Bind g) => Bind (Product f g) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: Product f g a -> (a -> Product f g b) -> Product f g b #

join :: Product f g (Product f g a) -> Product f g a #

(Bind f, Bind g) => Bind (f :*: g)

Since: semigroupoids-5.3.8

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: (f :*: g) a -> (a -> (f :*: g) b) -> (f :*: g) b #

join :: (f :*: g) ((f :*: g) a) -> (f :*: g) a #

Bind (ContT r m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: ContT r m a -> (a -> ContT r m b) -> ContT r m b #

join :: ContT r m (ContT r m a) -> ContT r m a #

Bind ((->) m) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: (m -> a) -> (a -> m -> b) -> m -> b #

join :: (m -> (m -> a)) -> m -> a #

Bind f => Bind (M1 i c f)

Since: semigroupoids-5.3.8

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: M1 i c f a -> (a -> M1 i c f b) -> M1 i c f b #

join :: M1 i c f (M1 i c f a) -> M1 i c f a #

Bind m => Bind (RWST r w s m)

Since: semigroupoids-5.3.6

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #

join :: RWST r w s m (RWST r w s m a) -> RWST r w s m a #

(Bind m, Semigroup w) => Bind (RWST r w s m)

An RWST r w s m is not a Monad unless its w is a Monoid, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #

join :: RWST r w s m (RWST r w s m a) -> RWST r w s m a #

(Bind m, Semigroup w) => Bind (RWST r w s m)

An RWST r w s m is not a Monad unless its w is a Monoid, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #

join :: RWST r w s m (RWST r w s m a) -> RWST r w s m a #

class Bifunctor p => Biapply (p :: Type -> Type -> Type) where #

Minimal complete definition

(<<.>>)

Methods

(<<.>>) :: p (a -> b) (c -> d) -> p a c -> p b d infixl 4 #

(.>>) :: p a b -> p c d -> p c d infixl 4 #

a .> b ≡ const id <$> a <.> b

(<<.) :: p a b -> p c d -> p a b infixl 4 #

a <. b ≡ const <$> a <.> b

Instances

Instances details
Biapply Arg 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Arg (a -> b) (c -> d) -> Arg a c -> Arg b d #

(.>>) :: Arg a b -> Arg c d -> Arg c d #

(<<.) :: Arg a b -> Arg c d -> Arg a b #

Biapply (,) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: (a -> b, c -> d) -> (a, c) -> (b, d) #

(.>>) :: (a, b) -> (c, d) -> (c, d) #

(<<.) :: (a, b) -> (c, d) -> (a, b) #

Biapply (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Const (a -> b) (c -> d) -> Const a c -> Const b d #

(.>>) :: Const a b -> Const c d -> Const c d #

(<<.) :: Const a b -> Const c d -> Const a b #

Biapply (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Tagged (a -> b) (c -> d) -> Tagged a c -> Tagged b d #

(.>>) :: Tagged a b -> Tagged c d -> Tagged c d #

(<<.) :: Tagged a b -> Tagged c d -> Tagged a b #

Semigroup x => Biapply ((,,) x) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: (x, a -> b, c -> d) -> (x, a, c) -> (x, b, d) #

(.>>) :: (x, a, b) -> (x, c, d) -> (x, c, d) #

(<<.) :: (x, a, b) -> (x, c, d) -> (x, a, b) #

(Semigroup x, Semigroup y) => Biapply ((,,,) x y) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: (x, y, a -> b, c -> d) -> (x, y, a, c) -> (x, y, b, d) #

(.>>) :: (x, y, a, b) -> (x, y, c, d) -> (x, y, c, d) #

(<<.) :: (x, y, a, b) -> (x, y, c, d) -> (x, y, a, b) #

Apply f => Biapply (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Clown f (a -> b) (c -> d) -> Clown f a c -> Clown f b d #

(.>>) :: Clown f a b -> Clown f c d -> Clown f c d #

(<<.) :: Clown f a b -> Clown f c d -> Clown f a b #

Biapply p => Biapply (Flip p) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Flip p (a -> b) (c -> d) -> Flip p a c -> Flip p b d #

(.>>) :: Flip p a b -> Flip p c d -> Flip p c d #

(<<.) :: Flip p a b -> Flip p c d -> Flip p a b #

Apply g => Biapply (Joker g :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Joker g (a -> b) (c -> d) -> Joker g a c -> Joker g b d #

(.>>) :: Joker g a b -> Joker g c d -> Joker g c d #

(<<.) :: Joker g a b -> Joker g c d -> Joker g a b #

Biapply p => Biapply (WrappedBifunctor p) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: WrappedBifunctor p (a -> b) (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d #

(.>>) :: WrappedBifunctor p a b -> WrappedBifunctor p c d -> WrappedBifunctor p c d #

(<<.) :: WrappedBifunctor p a b -> WrappedBifunctor p c d -> WrappedBifunctor p a b #

(Semigroup x, Semigroup y, Semigroup z) => Biapply ((,,,,) x y z) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: (x, y, z, a -> b, c -> d) -> (x, y, z, a, c) -> (x, y, z, b, d) #

(.>>) :: (x, y, z, a, b) -> (x, y, z, c, d) -> (x, y, z, c, d) #

(<<.) :: (x, y, z, a, b) -> (x, y, z, c, d) -> (x, y, z, a, b) #

(Biapply p, Biapply q) => Biapply (Product p q) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Product p q (a -> b) (c -> d) -> Product p q a c -> Product p q b d #

(.>>) :: Product p q a b -> Product p q c d -> Product p q c d #

(<<.) :: Product p q a b -> Product p q c d -> Product p q a b #

(Apply f, Biapply p) => Biapply (Tannen f p) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Tannen f p (a -> b) (c -> d) -> Tannen f p a c -> Tannen f p b d #

(.>>) :: Tannen f p a b -> Tannen f p c d -> Tannen f p c d #

(<<.) :: Tannen f p a b -> Tannen f p c d -> Tannen f p a b #

(Biapply p, Apply f, Apply g) => Biapply (Biff p f g) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

(<<.>>) :: Biff p f g (a -> b) (c -> d) -> Biff p f g a c -> Biff p f g b d #

(.>>) :: Biff p f g a b -> Biff p f g c d -> Biff p f g c d #

(<<.) :: Biff p f g a b -> Biff p f g c d -> Biff p f g a b #

gextended :: (Extend (Rep1 w), Generic1 w) => (w a -> b) -> w a -> w b #

Generic extended. Caveats are the same as for gduplicated.

Since: semigroupoids-5.3.8

gduplicated :: (Extend (Rep1 w), Generic1 w) => w a -> w (w a) #

Generic duplicated. Caveats:

  1. Will not compile if w is a product type.
  2. Will not compile if w contains fields where the type variable appears underneath the composition of type constructors (e.g., f (g a)).

Since: semigroupoids-5.3.8

class Functor w => Extend (w :: Type -> Type) where #

Minimal complete definition

duplicated | extended

Methods

duplicated :: w a -> w (w a) #

duplicated = extended id
fmap (fmap f) . duplicated = duplicated . fmap f

extended :: (w a -> b) -> w a -> w b #

extended f  = fmap f . duplicated

Instances

Instances details
Extend Identity 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Identity a -> Identity (Identity a) #

extended :: (Identity a -> b) -> Identity a -> Identity b #

Extend First 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: First a -> First (First a) #

extended :: (First a -> b) -> First a -> First b #

Extend Last 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Last a -> Last (Last a) #

extended :: (Last a -> b) -> Last a -> Last b #

Extend Max 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Max a -> Max (Max a) #

extended :: (Max a -> b) -> Max a -> Max b #

Extend Min 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Min a -> Min (Min a) #

extended :: (Min a -> b) -> Min a -> Min b #

Extend Dual 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Dual a -> Dual (Dual a) #

extended :: (Dual a -> b) -> Dual a -> Dual b #

Extend Product 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Product a -> Product (Product a) #

extended :: (Product a -> b) -> Product a -> Product b #

Extend Sum 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Sum a -> Sum (Sum a) #

extended :: (Sum a -> b) -> Sum a -> Sum b #

Extend Par1 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Par1 a -> Par1 (Par1 a) #

extended :: (Par1 a -> b) -> Par1 a -> Par1 b #

Extend Seq 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Seq a -> Seq (Seq a) #

extended :: (Seq a -> b) -> Seq a -> Seq b #

Extend Tree 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Tree a -> Tree (Tree a) #

extended :: (Tree a -> b) -> Tree a -> Tree b #

Extend NonEmpty 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: NonEmpty a -> NonEmpty (NonEmpty a) #

extended :: (NonEmpty a -> b) -> NonEmpty a -> NonEmpty b #

Extend Maybe 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Maybe a -> Maybe (Maybe a) #

extended :: (Maybe a -> b) -> Maybe a -> Maybe b #

Extend [] 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: [a] -> [[a]] #

extended :: ([a] -> b) -> [a] -> [b] #

(Representable f, Semigroup (Rep f)) => Extend (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

duplicated :: Co f a -> Co f (Co f a) #

extended :: (Co f a -> b) -> Co f a -> Co f b #

Extend (Either a) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Either a a0 -> Either a (Either a a0) #

extended :: (Either a a0 -> b) -> Either a a0 -> Either a b #

Extend (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Proxy a -> Proxy (Proxy a) #

extended :: (Proxy a -> b) -> Proxy a -> Proxy b #

Extend (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: U1 a -> U1 (U1 a) #

extended :: (U1 a -> b) -> U1 a -> U1 b #

Extend (V1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: V1 a -> V1 (V1 a) #

extended :: (V1 a -> b) -> V1 a -> V1 b #

Functor f => Extend (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

duplicated :: Cofree f a -> Cofree f (Cofree f a) #

extended :: (Cofree f a -> b) -> Cofree f a -> Cofree f b #

Extend f => Extend (MaybeApply f) 
Instance details

Defined in Data.Functor.Bind.Class

Methods

duplicated :: MaybeApply f a -> MaybeApply f (MaybeApply f a) #

extended :: (MaybeApply f a -> b) -> MaybeApply f a -> MaybeApply f b #

Extend ((,) e) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: (e, a) -> (e, (e, a)) #

extended :: ((e, a) -> b) -> (e, a) -> (e, b) #

Extend f => Extend (Alt f) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Alt f a -> Alt f (Alt f a) #

extended :: (Alt f a -> b) -> Alt f a -> Alt f b #

Extend f => Extend (Rec1 f) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Rec1 f a -> Rec1 f (Rec1 f a) #

extended :: (Rec1 f a -> b) -> Rec1 f a -> Rec1 f b #

Extend w => Extend (EnvT e w) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: EnvT e w a -> EnvT e w (EnvT e w a) #

extended :: (EnvT e w a -> b) -> EnvT e w a -> EnvT e w b #

Extend w => Extend (StoreT s w) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: StoreT s w a -> StoreT s w (StoreT s w a) #

extended :: (StoreT s w a -> b) -> StoreT s w a -> StoreT s w b #

(Extend w, Semigroup m) => Extend (TracedT m w) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: TracedT m w a -> TracedT m w (TracedT m w a) #

extended :: (TracedT m w a -> b) -> TracedT m w a -> TracedT m w b #

(Extend f, Semigroup a) => Extend (Static f a) 
Instance details

Defined in Data.Semigroupoid.Static

Methods

duplicated :: Static f a a0 -> Static f a (Static f a a0) #

extended :: (Static f a a0 -> b) -> Static f a a0 -> Static f a b #

Extend (Tagged a) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Tagged a a0 -> Tagged a (Tagged a a0) #

extended :: (Tagged a a0 -> b) -> Tagged a a0 -> Tagged a b #

Extend w => Extend (IdentityT w) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: IdentityT w a -> IdentityT w (IdentityT w a) #

extended :: (IdentityT w a -> b) -> IdentityT w a -> IdentityT w b #

(Extend f, Extend g) => Extend (Sum f g) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: Sum f g a -> Sum f g (Sum f g a) #

extended :: (Sum f g a -> b) -> Sum f g a -> Sum f g b #

(Extend f, Extend g) => Extend (f :+: g) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: (f :+: g) a -> (f :+: g) ((f :+: g) a) #

extended :: ((f :+: g) a -> b) -> (f :+: g) a -> (f :+: g) b #

Extend (K1 i c :: Type -> Type)

Since: semigroupoids-5.3.8

Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: K1 i c a -> K1 i c (K1 i c a) #

extended :: (K1 i c a -> b) -> K1 i c a -> K1 i c b #

Semigroup m => Extend ((->) m) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: (m -> a) -> m -> (m -> a) #

extended :: ((m -> a) -> b) -> (m -> a) -> m -> b #

Extend f => Extend (M1 i t f) 
Instance details

Defined in Data.Functor.Extend

Methods

duplicated :: M1 i t f a -> M1 i t f (M1 i t f a) #

extended :: (M1 i t f a -> b) -> M1 i t f a -> M1 i t f b #

check :: Bool -> STM () #

Check that the boolean condition is true and, if not, retry.

In other words, check b = unless b retry.

Since: stm-2.1.1

data TArray i e #

TArray is a transactional array, supporting the usual MArray interface for mutable arrays.

It is currently implemented as Array ix (TVar e), but it may be replaced by a more efficient implementation in the future (the interface will remain the same, however).

Instances

Instances details
MArray TArray e STM 
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

getBounds :: Ix i => TArray i e -> STM (i, i) #

getNumElements :: Ix i => TArray i e -> STM Int

newArray :: Ix i => (i, i) -> e -> STM (TArray i e) #

newArray_ :: Ix i => (i, i) -> STM (TArray i e) #

unsafeNewArray_ :: Ix i => (i, i) -> STM (TArray i e)

unsafeRead :: Ix i => TArray i e -> Int -> STM e

unsafeWrite :: Ix i => TArray i e -> Int -> e -> STM ()

Ix i => Eq (TArray i e) 
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

(==) :: TArray i e -> TArray i e -> Bool #

(/=) :: TArray i e -> TArray i e -> Bool #

swapTVar :: TVar a -> a -> STM a #

Swap the contents of a TVar for a new value.

Since: stm-2.3

stateTVar :: TVar s -> (s -> (a, s)) -> STM a #

Like modifyTVar' but the function is a simple state transition that can return a side value which is passed on as the result of the STM.

Since: stm-2.5.0

modifyTVar' :: TVar a -> (a -> a) -> STM () #

Strict version of modifyTVar.

Since: stm-2.3

modifyTVar :: TVar a -> (a -> a) -> STM () #

Mutate the contents of a TVar. N.B., this version is non-strict.

Since: stm-2.3

mkWeakTVar :: TVar a -> IO () -> IO (Weak (TVar a)) #

Make a Weak pointer to a TVar, using the second argument as a finalizer to run when TVar is garbage-collected

Since: stm-2.4.3

data TQueue a #

TQueue is an abstract type representing an unbounded FIFO channel.

Since: stm-2.4

Instances

Instances details
Eq (TQueue a) 
Instance details

Defined in Control.Concurrent.STM.TQueue

Methods

(==) :: TQueue a -> TQueue a -> Bool #

(/=) :: TQueue a -> TQueue a -> Bool #

writeTQueue :: TQueue a -> a -> STM () #

Write a value to a TQueue.

unGetTQueue :: TQueue a -> a -> STM () #

Put a data item back onto a channel, where it will be the next item read.

tryReadTQueue :: TQueue a -> STM (Maybe a) #

A version of readTQueue which does not retry. Instead it returns Nothing if no value is available.

tryPeekTQueue :: TQueue a -> STM (Maybe a) #

A version of peekTQueue which does not retry. Instead it returns Nothing if no value is available.

readTQueue :: TQueue a -> STM a #

Read the next value from the TQueue.

peekTQueue :: TQueue a -> STM a #

Get the next value from the TQueue without removing it, retrying if the channel is empty.

newTQueueIO :: IO (TQueue a) #

IO version of newTQueue. This is useful for creating top-level TQueues using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

newTQueue :: STM (TQueue a) #

Build and returns a new instance of TQueue

isEmptyTQueue :: TQueue a -> STM Bool #

Returns True if the supplied TQueue is empty.

flushTQueue :: TQueue a -> STM [a] #

Efficiently read the entire contents of a TQueue into a list. This function never retries.

Since: stm-2.4.5

data TMVar a #

A TMVar 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
Eq (TMVar a) 
Instance details

Defined in Control.Concurrent.STM.TMVar

Methods

(==) :: TMVar a -> TMVar a -> Bool #

(/=) :: TMVar a -> TMVar a -> Bool #

tryTakeTMVar :: TMVar a -> STM (Maybe a) #

A version of takeTMVar that does not retry. The tryTakeTMVar function returns Nothing if the TMVar was empty, or Just a if the TMVar was full with contents a. After tryTakeTMVar, the TMVar is left empty.

tryReadTMVar :: TMVar a -> STM (Maybe a) #

A version of readTMVar which does not retry. Instead it returns Nothing if no value is available.

Since: stm-2.3

tryPutTMVar :: TMVar a -> a -> STM Bool #

A version of putTMVar that does not retry. The tryPutTMVar function attempts to put the value a into the TMVar, returning True if it was successful, or False otherwise.

takeTMVar :: TMVar a -> STM a #

Return the contents of the TMVar. If the TMVar is currently empty, the transaction will retry. After a takeTMVar, the TMVar is left empty.

swapTMVar :: TMVar a -> a -> STM a #

Swap the contents of a TMVar for a new value.

readTMVar :: TMVar a -> STM a #

This is a combination of takeTMVar and putTMVar; ie. it takes the value from the TMVar, puts it back, and also returns it.

putTMVar :: TMVar a -> a -> STM () #

Put a value into a TMVar. If the TMVar is currently full, putTMVar will retry.

newTMVarIO :: a -> IO (TMVar a) #

IO version of newTMVar. This is useful for creating top-level TMVars using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

newTMVar :: a -> STM (TMVar a) #

Create a TMVar which contains the supplied value.

newEmptyTMVarIO :: IO (TMVar a) #

IO version of newEmptyTMVar. This is useful for creating top-level TMVars using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

newEmptyTMVar :: STM (TMVar a) #

Create a TMVar which is initially empty.

mkWeakTMVar :: TMVar a -> IO () -> IO (Weak (TMVar a)) #

Make a Weak pointer to a TMVar, using the second argument as a finalizer to run when the TMVar is garbage-collected.

Since: stm-2.4.4

isEmptyTMVar :: TMVar a -> STM Bool #

Check whether a given TMVar is empty.

data TChan a #

TChan is an abstract type representing an unbounded FIFO channel.

Instances

Instances details
Eq (TChan a) 
Instance details

Defined in Control.Concurrent.STM.TChan

Methods

(==) :: TChan a -> TChan a -> Bool #

(/=) :: TChan a -> TChan a -> Bool #

writeTChan :: TChan a -> a -> STM () #

Write a value to a TChan.

unGetTChan :: TChan a -> a -> STM () #

Put a data item back onto a channel, where it will be the next item read.

tryReadTChan :: TChan a -> STM (Maybe a) #

A version of readTChan which does not retry. Instead it returns Nothing if no value is available.

Since: stm-2.3

tryPeekTChan :: TChan a -> STM (Maybe a) #

A version of peekTChan which does not retry. Instead it returns Nothing if no value is available.

Since: stm-2.3

readTChan :: TChan a -> STM a #

Read the next value from the TChan.

peekTChan :: TChan a -> STM a #

Get the next value from the TChan without removing it, retrying if the channel is empty.

Since: stm-2.3

newTChanIO :: IO (TChan a) #

IO version of newTChan. This is useful for creating top-level TChans using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

newTChan :: STM (TChan a) #

Build and return a new instance of TChan

newBroadcastTChanIO :: IO (TChan a) #

IO version of newBroadcastTChan.

Since: stm-2.4

newBroadcastTChan :: STM (TChan a) #

Create a write-only TChan. More precisely, readTChan will retry even after items have been written to the channel. The only way to read a broadcast channel is to duplicate it with dupTChan.

Consider a server that broadcasts messages to clients:

serve :: TChan Message -> Client -> IO loop
serve broadcastChan client = do
    myChan <- dupTChan broadcastChan
    forever $ do
        message <- readTChan myChan
        send client message

The problem with using newTChan to create the broadcast channel is that if it is only written to and never read, items will pile up in memory. By using newBroadcastTChan to create the broadcast channel, items can be garbage collected after clients have seen them.

Since: stm-2.4

isEmptyTChan :: TChan a -> STM Bool #

Returns True if the supplied TChan is empty.

dupTChan :: TChan a -> STM (TChan a) #

Duplicate a TChan: 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.

cloneTChan :: TChan a -> STM (TChan a) #

Clone a TChan: similar to dupTChan, but the cloned channel starts with the same content available as the original channel.

Since: stm-2.4

data TBQueue a #

TBQueue is an abstract type representing a bounded FIFO channel.

Since: stm-2.4

Instances

Instances details
Eq (TBQueue a) 
Instance details

Defined in Control.Concurrent.STM.TBQueue

Methods

(==) :: TBQueue a -> TBQueue a -> Bool #

(/=) :: TBQueue a -> TBQueue a -> Bool #

writeTBQueue :: TBQueue a -> a -> STM () #

Write a value to a TBQueue; blocks if the queue is full.

unGetTBQueue :: TBQueue a -> a -> STM () #

Put a data item back onto a channel, where it will be the next item read. Blocks if the queue is full.

tryReadTBQueue :: TBQueue a -> STM (Maybe a) #

A version of readTBQueue which does not retry. Instead it returns Nothing if no value is available.

tryPeekTBQueue :: TBQueue a -> STM (Maybe a) #

A version of peekTBQueue which does not retry. Instead it returns Nothing if no value is available.

readTBQueue :: TBQueue a -> STM a #

Read the next value from the TBQueue.

peekTBQueue :: TBQueue a -> STM a #

Get the next value from the TBQueue without removing it, retrying if the channel is empty.

newTBQueueIO :: Natural -> IO (TBQueue a) #

IO version of newTBQueue. This is useful for creating top-level TBQueues using unsafePerformIO, because using atomically inside unsafePerformIO isn't possible.

newTBQueue #

Arguments

:: Natural

maximum number of elements the queue can hold

-> STM (TBQueue a) 

Builds and returns a new instance of TBQueue.

lengthTBQueue :: TBQueue a -> STM Natural #

Return the length of a TBQueue.

Since: stm-2.5.0.0

isFullTBQueue :: TBQueue a -> STM Bool #

Returns True if the supplied TBQueue is full.

Since: stm-2.4.3

isEmptyTBQueue :: TBQueue a -> STM Bool #

Returns True if the supplied TBQueue is empty.

flushTBQueue :: TBQueue a -> STM [a] #

Efficiently read the entire contents of a TBQueue into a list. This function never retries.

Since: stm-2.4.5

data Text #

A space efficient, packed, unboxed Unicode text type.

Instances

Instances details
Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

type Item Text 
Instance details

Defined in Data.Text

type Item Text = Char

class ISO8601 t where #

Methods

iso8601Format :: Format t #

The most commonly used ISO 8601 format for this type.

Instances

Instances details
ISO8601 CalendarDiffDays

PyYmMdD (ISO 8601:2004(E) sec. 4.4.3.2)

Instance details

Defined in Data.Time.Format.ISO8601

ISO8601 Day

yyyy-mm-dd (ISO 8601:2004(E) sec. 4.1.2.2 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

ISO8601 UTCTime

yyyy-mm-ddThh:mm:ss[.sss]Z (ISO 8601:2004(E) sec. 4.3.2 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

ISO8601 CalendarDiffTime

PyYmMdDThHmMs[.sss]S (ISO 8601:2004(E) sec. 4.4.3.2)

Instance details

Defined in Data.Time.Format.ISO8601

ISO8601 LocalTime

yyyy-mm-ddThh:mm:ss[.sss] (ISO 8601:2004(E) sec. 4.3.2 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

ISO8601 TimeOfDay

hh:mm:ss[.sss] (ISO 8601:2004(E) sec. 4.2.2.2, 4.2.2.4(a) extended format)

Instance details

Defined in Data.Time.Format.ISO8601

ISO8601 TimeZone

±hh:mm (ISO 8601:2004(E) sec. 4.2.5.1 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

ISO8601 ZonedTime

yyyy-mm-ddThh:mm:ss[.sss]±hh:mm (ISO 8601:2004(E) sec. 4.3.2 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

iso8601Show :: ISO8601 t => t -> String #

Show in the most commonly used ISO 8601 format.

iso8601ParseM :: (MonadFail m, ISO8601 t) => String -> m t #

Parse the most commonly used ISO 8601 format.

readSTime #

Arguments

:: ParseTime t 
=> Bool

Accept leading whitespace?

-> TimeLocale

Time locale.

-> String

Format string

-> ReadS t 

Parse a time value given a format string. See parseTimeM for details.

readPTime #

Arguments

:: ParseTime t 
=> Bool

Accept leading whitespace?

-> TimeLocale

Time locale.

-> String

Format string

-> ReadP t 

Parse a time value given a format string. See parseTimeM for details.

parseTimeOrError #

Arguments

:: ParseTime t 
=> Bool

Accept leading and trailing whitespace?

-> TimeLocale

Time locale.

-> String

Format string.

-> String

Input string.

-> t

The time value.

Parse a time value given a format string. Fails if the input could not be parsed using the given format. See parseTimeM for details.

parseTimeMultipleM #

Arguments

:: (MonadFail m, ParseTime t) 
=> Bool

Accept leading and trailing whitespace?

-> TimeLocale

Time locale.

-> [(String, String)]

Pairs of (format string, input string).

-> m t

Return the time value, or fail if the input could not be parsed using the given format.

Parses a time value given a list of pairs of format and input. Resulting value is constructed from all provided specifiers.

parseTimeM #

Arguments

:: (MonadFail m, ParseTime t) 
=> Bool

Accept leading and trailing whitespace?

-> TimeLocale

Time locale.

-> String

Format string.

-> String

Input string.

-> m t

Return the time value, or fail if the input could not be parsed using the given format.

Parses a time value given a format string. Missing information will be derived from 1970-01-01 00:00 UTC (which was a Thursday). Supports the same %-codes as formatTime, including %-, %_ and %0 modifiers, however padding widths are not supported. Case is not significant in the input string. Some variations in the input are accepted:

%z %Ez
accepts any of ±HHMM or ±HH:MM.
%Z %EZ
accepts any string of letters, or any of the formats accepted by %z.
%0Y
accepts exactly four digits.
%0G
accepts exactly four digits.
%0C
accepts exactly two digits.
%0f
accepts exactly two digits.

For example, to parse a date in YYYY-MM-DD format, while allowing the month and date to have optional leading zeros (notice the - modifier used for %m and %d):

Prelude Data.Time> parseTimeM True defaultTimeLocale "%Y-%-m-%-d" "2010-3-04" :: Maybe Day
Just 2010-03-04

data ZonedTime #

A local time together with a time zone.

There is no Eq instance for ZonedTime. If you want to compare local times, use zonedTimeToLocalTime. If you want to compare absolute times, use zonedTimeToUTC.

Instances

Instances details
Data ZonedTime 
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZonedTime -> c ZonedTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ZonedTime #

toConstr :: ZonedTime -> Constr #

dataTypeOf :: ZonedTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ZonedTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ZonedTime) #

gmapT :: (forall b. Data b => b -> b) -> ZonedTime -> ZonedTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZonedTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZonedTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> ZonedTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ZonedTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZonedTime -> m ZonedTime #

Show ZonedTime 
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

NFData ZonedTime 
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Methods

rnf :: ZonedTime -> () #

ISO8601 ZonedTime

yyyy-mm-ddThh:mm:ss[.sss]±hh:mm (ISO 8601:2004(E) sec. 4.3.2 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

class FormatTime t #

Minimal complete definition

formatCharacter

formatTime :: FormatTime t => TimeLocale -> String -> t -> String #

Substitute various time-related information for each %-code in the string, as per formatCharacter.

The general form is %<modifier><width><alternate><specifier>, where <modifier>, <width>, and <alternate> are optional.

<modifier>

glibc-style modifiers can be used before the specifier (here marked as z):

%-z
no padding
%_z
pad with spaces
%0z
pad with zeros
%^z
convert to upper case
%#z
convert to lower case (consistently, unlike glibc)

<width>

Width digits can also be used after any modifiers and before the specifier (here marked as z), for example:

%4z
pad to 4 characters (with default padding character)
%_12z
pad with spaces to 12 characters

<alternate>

An optional E character indicates an alternate formatting. Currently this only affects %Z and %z.

%Ez
alternate formatting

<specifier>

For all types (note these three are done by formatTime, not by formatCharacter):

%%
%
%t
tab
%n
newline

TimeZone

For TimeZone (and ZonedTime and UTCTime):

%z
timezone offset in the format ±HHMM
%Ez
timezone offset in the format ±HH:MM
%Z
timezone name (or else offset in the format ±HHMM)
%EZ
timezone name (or else offset in the format ±HH:MM)

LocalTime

For LocalTime (and ZonedTime and UTCTime and UniversalTime):

%c
as dateTimeFmt locale (e.g. %a %b %e %H:%M:%S %Z %Y)

TimeOfDay

For TimeOfDay (and LocalTime and ZonedTime and UTCTime and UniversalTime):

%R
same as %H:%M
%T
same as %H:%M:%S
%X
as timeFmt locale (e.g. %H:%M:%S)
%r
as time12Fmt locale (e.g. %I:%M:%S %p)
%P
day-half of day from (amPm locale), converted to lowercase, am, pm
%p
day-half of day from (amPm locale), AM, PM
%H
hour of day (24-hour), 0-padded to two chars, 00 - 23
%k
hour of day (24-hour), space-padded to two chars, 0 - 23
%I
hour of day-half (12-hour), 0-padded to two chars, 01 - 12
%l
hour of day-half (12-hour), space-padded to two chars, 1 - 12
%M
minute of hour, 0-padded to two chars, 00 - 59
%S
second of minute (without decimal part), 0-padded to two chars, 00 - 60
%q
picosecond of second, 0-padded to twelve chars, 000000000000 - 999999999999.
%Q
decimal point and fraction of second, up to 12 second decimals, without trailing zeros. For a whole number of seconds, %Q omits the decimal point unless padding is specified.

UTCTime and ZonedTime

For UTCTime and ZonedTime:

%s
number of whole seconds since the Unix epoch. For times before the Unix epoch, this is a negative number. Note that in %s.%q and %s%Q the decimals are positive, not negative. For example, 0.9 seconds before the Unix epoch is formatted as -1.1 with %s%Q.

DayOfWeek

For DayOfWeek (and Day and LocalTime and ZonedTime and UTCTime and UniversalTime):

%u
day of week number for Week Date format, 1 (= Monday) - 7 (= Sunday)
%w
day of week number, 0 (= Sunday) - 6 (= Saturday)
%a
day of week, short form (snd from wDays locale), Sun - Sat
%A
day of week, long form (fst from wDays locale), Sunday - Saturday

Month

For Month (and Day and LocalTime and ZonedTime and UTCTime and UniversalTime):

%Y
year, no padding. Note %0Y and %_Y pad to four chars
%y
year of century, 0-padded to two chars, 00 - 99
%C
century, no padding. Note %0C and %_C pad to two chars
%B
month name, long form (fst from months locale), January - December
%b, %h
month name, short form (snd from months locale), Jan - Dec
%m
month of year, 0-padded to two chars, 01 - 12

Day

For Day (and LocalTime and ZonedTime and UTCTime and UniversalTime):

%D
same as %m/%d/%y
%F
same as %Y-%m-%d
%x
as dateFmt locale (e.g. %m/%d/%y)
%d
day of month, 0-padded to two chars, 01 - 31
%e
day of month, space-padded to two chars, 1 - 31
%j
day of year, 0-padded to three chars, 001 - 366
%f
century for Week Date format, no padding. Note %0f and %_f pad to two chars
%V
week of year for Week Date format, 0-padded to two chars, 01 - 53
%U
week of year where weeks start on Sunday (as sundayStartWeek), 0-padded to two chars, 00 - 53
%W
week of year where weeks start on Monday (as mondayStartWeek), 0-padded to two chars, 00 - 53

Duration types

The specifiers for DiffTime, NominalDiffTime, CalendarDiffDays, and CalendarDiffTime are semantically separate from the other types. Specifiers on negative time differences will generally be negative (think rem rather than mod).

NominalDiffTime and DiffTime

Note that a "minute" of DiffTime is simply 60 SI seconds, rather than a minute of civil time. Use NominalDiffTime to work with civil time, ignoring any leap seconds.

For NominalDiffTime and DiffTime:

%w
total whole weeks
%d
total whole days
%D
whole days of week
%h
total whole hours
%H
whole hours of day
%m
total whole minutes
%M
whole minutes of hour
%s
total whole seconds
%Es
total seconds, with decimal point and up to <width> (default 12) decimal places, without trailing zeros. For a whole number of seconds, %Es omits the decimal point unless padding is specified.
%0Es
total seconds, with decimal point and <width> (default 12) decimal places.
%S
whole seconds of minute
%ES
seconds of minute, with decimal point and up to <width> (default 12) decimal places, without trailing zeros. For a whole number of seconds, %ES omits the decimal point unless padding is specified.
%0ES
seconds of minute as two digits, with decimal point and <width> (default 12) decimal places.

CalendarDiffDays

For CalendarDiffDays (and CalendarDiffTime):

%y
total years
%b
total months
%B
months of year
%w
total weeks, not including months
%d
total days, not including months
%D
days of week

CalendarDiffTime

For CalendarDiffTime:

%h
total hours, not including months
%H
hours of day
%m
total minutes, not including months
%M
minutes of hour
%s
total whole seconds, not including months
%Es
total seconds, not including months, with decimal point and up to <width> (default 12) decimal places, without trailing zeros. For a whole number of seconds, %Es omits the decimal point unless padding is specified.
%0Es
total seconds, not including months, with decimal point and <width> (default 12) decimal places.
%S
whole seconds of minute
%ES
seconds of minute, with decimal point and up to <width> (default 12) decimal places, without trailing zeros. For a whole number of seconds, %ES omits the decimal point unless padding is specified.
%0ES
seconds of minute as two digits, with decimal point and <width> (default 12) decimal places.

class ParseTime t #

The class of types which can be parsed given a UNIX-style time format string.

Minimal complete definition

parseTimeSpecifier, buildTime

data TimeLocale #

Constructors

TimeLocale 

Fields

rfc822DateFormat :: String #

Format string according to RFC822.

iso8601DateFormat :: Maybe String -> String #

Construct format string according to ISO-8601.

The Maybe String argument allows to supply an optional time specification. E.g.:

iso8601DateFormat Nothing            == "%Y-%m-%d"           -- i.e. YYYY-MM-DD
iso8601DateFormat (Just "%H:%M:%S")  == "%Y-%m-%dT%H:%M:%S"  -- i.e. YYYY-MM-DDTHH:MM:SS

defaultTimeLocale :: TimeLocale #

Locale representing American usage.

knownTimeZones contains only the ten time-zones mentioned in RFC 802 sec. 5: "UT", "GMT", "EST", "EDT", "CST", "CDT", "MST", "MDT", "PST", "PDT". Note that the parsing functions will regardless parse "UTC", single-letter military time-zones, and +HHMM format.

data LocalTime #

A simple day and time aggregate, where the day is of the specified parameter, and the time is a TimeOfDay. Conversion of this (as local civil time) to UTC depends on the time zone. Conversion of this (as local mean time) to UT1 depends on the longitude.

Constructors

LocalTime 

Instances

Instances details
Data LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LocalTime -> c LocalTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LocalTime #

toConstr :: LocalTime -> Constr #

dataTypeOf :: LocalTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LocalTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LocalTime) #

gmapT :: (forall b. Data b => b -> b) -> LocalTime -> LocalTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LocalTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LocalTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> LocalTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LocalTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LocalTime -> m LocalTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LocalTime -> m LocalTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LocalTime -> m LocalTime #

Show LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

NFData LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Methods

rnf :: LocalTime -> () #

Eq LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Ord LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

ISO8601 LocalTime

yyyy-mm-ddThh:mm:ss[.sss] (ISO 8601:2004(E) sec. 4.3.2 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

utcToLocalTime :: TimeZone -> UTCTime -> LocalTime #

Get the local time of a UTC time in a time zone.

ut1ToLocalTime :: Rational -> UniversalTime -> LocalTime #

Get the local time of a UT1 time on a particular meridian (in degrees, positive is East).

localTimeToUTC :: TimeZone -> LocalTime -> UTCTime #

Get the UTC time of a local time in a time zone.

localTimeToUT1 :: Rational -> LocalTime -> UniversalTime #

Get the UT1 time of a local time on a particular meridian (in degrees, positive is East).

diffLocalTime :: LocalTime -> LocalTime -> NominalDiffTime #

diffLocalTime a b = a - b

addLocalTime :: NominalDiffTime -> LocalTime -> LocalTime #

addLocalTime a b = a + b

data TimeOfDay #

Time of day as represented in hour, minute and second (with picoseconds), typically used to express local time of day.

Constructors

TimeOfDay 

Fields

  • todHour :: Int

    range 0 - 23

  • todMin :: Int

    range 0 - 59

  • todSec :: Pico

    Note that 0 <= todSec < 61, accomodating leap seconds. Any local minute may have a leap second, since leap seconds happen in all zones simultaneously

Instances

Instances details
Data TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TimeOfDay -> c TimeOfDay #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TimeOfDay #

toConstr :: TimeOfDay -> Constr #

dataTypeOf :: TimeOfDay -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TimeOfDay) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeOfDay) #

gmapT :: (forall b. Data b => b -> b) -> TimeOfDay -> TimeOfDay #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TimeOfDay -> r #

gmapQ :: (forall d. Data d => d -> u) -> TimeOfDay -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TimeOfDay -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeOfDay -> m TimeOfDay #

Show TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

NFData TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Methods

rnf :: TimeOfDay -> () #

Eq TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

Ord TimeOfDay 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeOfDay

ISO8601 TimeOfDay

hh:mm:ss[.sss] (ISO 8601:2004(E) sec. 4.2.2.2, 4.2.2.4(a) extended format)

Instance details

Defined in Data.Time.Format.ISO8601

utcToLocalTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay) #

Convert a time of day in UTC to a time of day in some timezone, together with a day adjustment.

timeToTimeOfDay :: DiffTime -> TimeOfDay #

Get the time of day given a time since midnight. Time more than 24h will be converted to leap-seconds.

timeToDaysAndTimeOfDay :: NominalDiffTime -> (Integer, TimeOfDay) #

Convert a period of time into a count of days and a time of day since midnight. The time of day will never have a leap second.

timeOfDayToTime :: TimeOfDay -> DiffTime #

Get the time since midnight for a given time of day.

timeOfDayToDayFraction :: TimeOfDay -> Rational #

Get the fraction of a day since midnight given a time of day.

midnight :: TimeOfDay #

Hour zero

midday :: TimeOfDay #

Hour twelve

localToUTCTimeOfDay :: TimeZone -> TimeOfDay -> (Integer, TimeOfDay) #

Convert a time of day in some timezone to a time of day in UTC, together with a day adjustment.

daysAndTimeOfDayToTime :: Integer -> TimeOfDay -> NominalDiffTime #

Convert a count of days and a time of day since midnight into a period of time.

dayFractionToTimeOfDay :: Rational -> TimeOfDay #

Get the time of day given the fraction of a day since midnight.

data TimeZone #

A TimeZone is a whole number of minutes offset from UTC, together with a name and a "just for summer" flag.

Constructors

TimeZone 

Fields

Instances

Instances details
Data TimeZone 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TimeZone -> c TimeZone #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TimeZone #

toConstr :: TimeZone -> Constr #

dataTypeOf :: TimeZone -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TimeZone) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TimeZone) #

gmapT :: (forall b. Data b => b -> b) -> TimeZone -> TimeZone #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TimeZone -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TimeZone -> r #

gmapQ :: (forall d. Data d => d -> u) -> TimeZone -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TimeZone -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TimeZone -> m TimeZone #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeZone -> m TimeZone #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TimeZone -> m TimeZone #

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

NFData TimeZone 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

Methods

rnf :: TimeZone -> () #

Eq TimeZone 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

Ord TimeZone 
Instance details

Defined in Data.Time.LocalTime.Internal.TimeZone

ISO8601 TimeZone

±hh:mm (ISO 8601:2004(E) sec. 4.2.5.1 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

utc :: TimeZone #

The UTC time zone.

timeZoneOffsetString' :: Maybe Char -> TimeZone -> String #

Text representing the offset of this timezone, such as "-0800" or "+0400" (like %z in formatTime), with arbitrary padding.

timeZoneOffsetString :: TimeZone -> String #

Text representing the offset of this timezone, such as "-0800" or "+0400" (like %z in formatTime).

minutesToTimeZone :: Int -> TimeZone #

Create a nameless non-summer timezone for this number of minutes.

hoursToTimeZone :: Int -> TimeZone #

Create a nameless non-summer timezone for this number of hours.

getTimeZone :: UTCTime -> IO TimeZone #

Get the local time-zone for a given time (varying as per summertime adjustments).

getCurrentTimeZone :: IO TimeZone #

Get the current time-zone.

data CalendarDiffTime #

Instances

Instances details
Data CalendarDiffTime

Since: time-1.9.2

Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CalendarDiffTime -> c CalendarDiffTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CalendarDiffTime #

toConstr :: CalendarDiffTime -> Constr #

dataTypeOf :: CalendarDiffTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CalendarDiffTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CalendarDiffTime) #

gmapT :: (forall b. Data b => b -> b) -> CalendarDiffTime -> CalendarDiffTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CalendarDiffTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CalendarDiffTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> CalendarDiffTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CalendarDiffTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CalendarDiffTime -> m CalendarDiffTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CalendarDiffTime -> m CalendarDiffTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CalendarDiffTime -> m CalendarDiffTime #

Monoid CalendarDiffTime

Additive

Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

Semigroup CalendarDiffTime

Additive

Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

Show CalendarDiffTime 
Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

NFData CalendarDiffTime 
Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

Methods

rnf :: CalendarDiffTime -> () #

Eq CalendarDiffTime 
Instance details

Defined in Data.Time.LocalTime.Internal.CalendarDiffTime

ISO8601 CalendarDiffTime

PyYmMdDThHmMs[.sss]S (ISO 8601:2004(E) sec. 4.4.3.2)

Instance details

Defined in Data.Time.Format.ISO8601

scaleCalendarDiffTime :: Integer -> CalendarDiffTime -> CalendarDiffTime #

Scale by a factor. Note that scaleCalendarDiffTime (-1) will not perfectly invert a duration, due to variable month lengths.

diffUTCTime :: UTCTime -> UTCTime -> NominalDiffTime #

diffUTCTime a b = a - b

addUTCTime :: NominalDiffTime -> UTCTime -> UTCTime #

addUTCTime a b = a + b

getPOSIXTime :: IO POSIXTime #

Get the current POSIX time from the system clock.

getCurrentTime :: IO UTCTime #

Get the current UTCTime from the system clock.

utcToSystemTime :: UTCTime -> SystemTime #

Convert UTCTime to SystemTime, matching zero SystemTime to midnight of systemEpochDay UTC.

truncateSystemTimeLeapSecond :: SystemTime -> SystemTime #

Map leap-second values to the start of the following second. The resulting systemNanoseconds will always be in the range 0 to 1E9-1.

systemToUTCTime :: SystemTime -> UTCTime #

Convert SystemTime to UTCTime, matching zero SystemTime to midnight of systemEpochDay UTC.

systemToTAITime :: SystemTime -> AbsoluteTime #

Convert SystemTime to AbsoluteTime, matching zero SystemTime to midnight of systemEpochDay TAI.

systemEpochDay :: Day #

The day of the epoch of SystemTime, 1970-01-01

newtype UniversalTime #

The Modified Julian Date is the day with the fraction of the day, measured from UT midnight. It's used to represent UT1, which is time as measured by the earth's rotation, adjusted for various wobbles.

Constructors

ModJulianDate 

Instances

Instances details
Data UniversalTime 
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniversalTime -> c UniversalTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UniversalTime #

toConstr :: UniversalTime -> Constr #

dataTypeOf :: UniversalTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UniversalTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UniversalTime) #

gmapT :: (forall b. Data b => b -> b) -> UniversalTime -> UniversalTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniversalTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniversalTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> UniversalTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UniversalTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniversalTime -> m UniversalTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniversalTime -> m UniversalTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniversalTime -> m UniversalTime #

NFData UniversalTime 
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Methods

rnf :: UniversalTime -> () #

Eq UniversalTime 
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Ord UniversalTime 
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

data UTCTime #

This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.

Constructors

UTCTime 

Fields

Instances

Instances details
Data UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime #

toConstr :: UTCTime -> Constr #

dataTypeOf :: UTCTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) #

gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

NFData UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

rnf :: UTCTime -> () #

Eq UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

(==) :: UTCTime -> UTCTime -> Bool #

(/=) :: UTCTime -> UTCTime -> Bool #

Ord UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

ISO8601 UTCTime

yyyy-mm-ddThh:mm:ss[.sss]Z (ISO 8601:2004(E) sec. 4.3.2 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

data SystemTime #

SystemTime is time returned by system clock functions. Its semantics depends on the clock function, but the epoch is typically the beginning of 1970. Note that systemNanoseconds of 1E9 to 2E9-1 can be used to represent leap seconds.

Instances

Instances details
Data SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SystemTime -> c SystemTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SystemTime #

toConstr :: SystemTime -> Constr #

dataTypeOf :: SystemTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SystemTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SystemTime) #

gmapT :: (forall b. Data b => b -> b) -> SystemTime -> SystemTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SystemTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SystemTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> SystemTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SystemTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SystemTime -> m SystemTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SystemTime -> m SystemTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SystemTime -> m SystemTime #

Show SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

NFData SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

Methods

rnf :: SystemTime -> () #

Eq SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

Ord SystemTime 
Instance details

Defined in Data.Time.Clock.Internal.SystemTime

getTime_resolution :: DiffTime #

The resolution of getSystemTime, getCurrentTime, getPOSIXTime. On UNIX systems this uses clock_getres, which may be wrong on WSL2.

getSystemTime :: IO SystemTime #

Get the system time, epoch start of 1970 UTC, leap-seconds ignored. getSystemTime is typically much faster than getCurrentTime.

type POSIXTime = NominalDiffTime #

POSIX time is the nominal time since 1970-01-01 00:00 UTC

To convert from a CTime or System.Posix.EpochTime, use realToFrac.

posixDayLength :: NominalDiffTime #

86400 nominal seconds in every day

data NominalDiffTime #

This is a length of time, as measured by UTC. It has a precision of 10^-12 s.

Conversion functions such as fromInteger and realToFrac will treat it as seconds. For example, (0.010 :: NominalDiffTime) corresponds to 10 milliseconds.

It has a precision of one picosecond (= 10^-12 s). Enumeration functions will treat it as picoseconds.

It ignores leap-seconds, so it's not necessarily a fixed amount of clock time. For instance, 23:00 UTC + 2 hours of NominalDiffTime = 01:00 UTC (+ 1 day), regardless of whether a leap-second intervened.

Instances

Instances details
Data NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NominalDiffTime -> c NominalDiffTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NominalDiffTime #

toConstr :: NominalDiffTime -> Constr #

dataTypeOf :: NominalDiffTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NominalDiffTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NominalDiffTime) #

gmapT :: (forall b. Data b => b -> b) -> NominalDiffTime -> NominalDiffTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NominalDiffTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NominalDiffTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> NominalDiffTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NominalDiffTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NominalDiffTime -> m NominalDiffTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NominalDiffTime -> m NominalDiffTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NominalDiffTime -> m NominalDiffTime #

Enum NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Num NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Read NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Fractional NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Real NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

RealFrac NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Show NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

NFData NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Methods

rnf :: NominalDiffTime -> () #

Eq NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Ord NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

secondsToNominalDiffTime :: Pico -> NominalDiffTime #

Create a NominalDiffTime from a number of seconds.

Since: time-1.9.1

nominalDiffTimeToSeconds :: NominalDiffTime -> Pico #

Get the seconds in a NominalDiffTime.

Since: time-1.9.1

data DiffTime #

This is a length of time, as measured by a clock. Conversion functions such as fromInteger and realToFrac will treat it as seconds. For example, (0.010 :: DiffTime) corresponds to 10 milliseconds.

It has a precision of one picosecond (= 10^-12 s). Enumeration functions will treat it as picoseconds.

Instances

Instances details
Data DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DiffTime -> c DiffTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DiffTime #

toConstr :: DiffTime -> Constr #

dataTypeOf :: DiffTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DiffTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DiffTime) #

gmapT :: (forall b. Data b => b -> b) -> DiffTime -> DiffTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> DiffTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DiffTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime #

Enum DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Num DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Read DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Fractional DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Real DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

RealFrac DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

properFraction :: Integral b => DiffTime -> (b, DiffTime) #

truncate :: Integral b => DiffTime -> b #

round :: Integral b => DiffTime -> b #

ceiling :: Integral b => DiffTime -> b #

floor :: Integral b => DiffTime -> b #

Show DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

NFData DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

rnf :: DiffTime -> () #

Eq DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Ord DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

secondsToDiffTime :: Integer -> DiffTime #

Create a DiffTime which represents an integral number of seconds.

picosecondsToDiffTime :: Integer -> DiffTime #

Create a DiffTime from a number of picoseconds.

diffTimeToPicoseconds :: DiffTime -> Integer #

Get the number of picoseconds in a DiffTime.

data DayOfWeek #

Instances

Instances details
Data DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DayOfWeek -> c DayOfWeek #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DayOfWeek #

toConstr :: DayOfWeek -> Constr #

dataTypeOf :: DayOfWeek -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DayOfWeek) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DayOfWeek) #

gmapT :: (forall b. Data b => b -> b) -> DayOfWeek -> DayOfWeek #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DayOfWeek -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DayOfWeek -> r #

gmapQ :: (forall d. Data d => d -> u) -> DayOfWeek -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DayOfWeek -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DayOfWeek -> m DayOfWeek #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DayOfWeek -> m DayOfWeek #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DayOfWeek -> m DayOfWeek #

Enum DayOfWeek

"Circular", so for example [Tuesday ..] gives an endless sequence. Also: fromEnum gives [1 .. 7] for [Monday .. Sunday], and toEnum performs mod 7 to give a cycle of days.

Instance details

Defined in Data.Time.Calendar.Week

Ix DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Read DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Show DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

NFData DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Methods

rnf :: DayOfWeek -> () #

Eq DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

Ord DayOfWeek 
Instance details

Defined in Data.Time.Calendar.Week

firstDayOfWeekOnAfter :: DayOfWeek -> Day -> Day #

The first day-of-week on or after some day

dayOfWeekDiff :: DayOfWeek -> DayOfWeek -> Int #

dayOfWeekDiff a b = a - b in range 0 to 6. The number of days from b to the next a.

toGregorian :: Day -> (Year, MonthOfYear, DayOfMonth) #

Convert to proleptic Gregorian calendar.

showGregorian :: Day -> String #

Show in ISO 8601 format (yyyy-mm-dd)

gregorianMonthLength :: Year -> MonthOfYear -> DayOfMonth #

The number of days in a given month according to the proleptic Gregorian calendar.

fromGregorianValid :: Year -> MonthOfYear -> DayOfMonth -> Maybe Day #

Convert from proleptic Gregorian calendar. Invalid values will return Nothing

fromGregorian :: Year -> MonthOfYear -> DayOfMonth -> Day #

Convert from proleptic Gregorian calendar. Invalid values will be clipped to the correct range, month first, then day.

diffGregorianDurationRollOver :: Day -> Day -> CalendarDiffDays #

Calendrical difference, with as many whole months as possible. Same as diffGregorianDurationClip for positive durations.

diffGregorianDurationClip :: Day -> Day -> CalendarDiffDays #

Calendrical difference, with as many whole months as possible

addGregorianYearsRollOver :: Integer -> Day -> Day #

Add years, matching month and day, with Feb 29th rolled over to Mar 1st if necessary. For instance, 2004-02-29 + 2 years = 2006-03-01.

addGregorianYearsClip :: Integer -> Day -> Day #

Add years, matching month and day, with Feb 29th clipped to Feb 28th if necessary. For instance, 2004-02-29 + 2 years = 2006-02-28.

addGregorianMonthsRollOver :: Integer -> Day -> Day #

Add months, with days past the last day of the month rolling over to the next month. For instance, 2005-01-30 + 1 month = 2005-03-02.

addGregorianMonthsClip :: Integer -> Day -> Day #

Add months, with days past the last day of the month clipped to the last day. For instance, 2005-01-30 + 1 month = 2005-02-28.

addGregorianDurationRollOver :: CalendarDiffDays -> Day -> Day #

Add months (rolling over to next month), then add days

addGregorianDurationClip :: CalendarDiffDays -> Day -> Day #

Add months (clipped to last day), then add days

pattern YearMonthDay :: Year -> MonthOfYear -> DayOfMonth -> Day #

Bidirectional abstract constructor for the proleptic Gregorian calendar. Invalid values will be clipped to the correct range, month first, then day.

isLeapYear :: Year -> Bool #

Is this year a leap year according to the proleptic Gregorian calendar?

type Year = Integer #

Year of Common Era.

type MonthOfYear = Int #

Month of year, in range 1 (January) to 12 (December).

type DayOfMonth = Int #

Day of month, in range 1 to 31.

newtype Day #

The Modified Julian Day is a standard count of days, with zero being the day 1858-11-17.

Instances

Instances details
Data Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Day -> c Day #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Day #

toConstr :: Day -> Constr #

dataTypeOf :: Day -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Day) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Day) #

gmapT :: (forall b. Data b => b -> b) -> Day -> Day #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Day -> r #

gmapQ :: (forall d. Data d => d -> u) -> Day -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Day -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Day -> m Day #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Day -> m Day #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Day -> m Day #

Enum Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

succ :: Day -> Day #

pred :: Day -> Day #

toEnum :: Int -> Day #

fromEnum :: Day -> Int #

enumFrom :: Day -> [Day] #

enumFromThen :: Day -> Day -> [Day] #

enumFromTo :: Day -> Day -> [Day] #

enumFromThenTo :: Day -> Day -> Day -> [Day] #

Ix Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

range :: (Day, Day) -> [Day] #

index :: (Day, Day) -> Day -> Int #

unsafeIndex :: (Day, Day) -> Day -> Int #

inRange :: (Day, Day) -> Day -> Bool #

rangeSize :: (Day, Day) -> Int #

unsafeRangeSize :: (Day, Day) -> Int #

NFData Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

rnf :: Day -> () #

Eq Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

(==) :: Day -> Day -> Bool #

(/=) :: Day -> Day -> Bool #

Ord Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

compare :: Day -> Day -> Ordering #

(<) :: Day -> Day -> Bool #

(<=) :: Day -> Day -> Bool #

(>) :: Day -> Day -> Bool #

(>=) :: Day -> Day -> Bool #

max :: Day -> Day -> Day #

min :: Day -> Day -> Day #

ISO8601 Day

yyyy-mm-dd (ISO 8601:2004(E) sec. 4.1.2.2 extended format)

Instance details

Defined in Data.Time.Format.ISO8601

data CalendarDiffDays #

Constructors

CalendarDiffDays 

Instances

Instances details
Data CalendarDiffDays

Since: time-1.9.2

Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CalendarDiffDays -> c CalendarDiffDays #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CalendarDiffDays #

toConstr :: CalendarDiffDays -> Constr #

dataTypeOf :: CalendarDiffDays -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CalendarDiffDays) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CalendarDiffDays) #

gmapT :: (forall b. Data b => b -> b) -> CalendarDiffDays -> CalendarDiffDays #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CalendarDiffDays -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CalendarDiffDays -> r #

gmapQ :: (forall d. Data d => d -> u) -> CalendarDiffDays -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CalendarDiffDays -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CalendarDiffDays -> m CalendarDiffDays #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CalendarDiffDays -> m CalendarDiffDays #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CalendarDiffDays -> m CalendarDiffDays #

Monoid CalendarDiffDays

Additive

Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Semigroup CalendarDiffDays

Additive

Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Show CalendarDiffDays 
Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

NFData CalendarDiffDays 
Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

Methods

rnf :: CalendarDiffDays -> () #

Eq CalendarDiffDays 
Instance details

Defined in Data.Time.Calendar.CalendarDiffDays

ISO8601 CalendarDiffDays

PyYmMdD (ISO 8601:2004(E) sec. 4.4.3.2)

Instance details

Defined in Data.Time.Format.ISO8601

scaleCalendarDiffDays :: Integer -> CalendarDiffDays -> CalendarDiffDays #

Scale by a factor. Note that scaleCalendarDiffDays (-1) will not perfectly invert a duration, due to variable month lengths.

maybeToExceptT :: forall (m :: Type -> Type) e a. Functor m => e -> MaybeT m a -> ExceptT e m a #

Convert a MaybeT computation to ExceptT, with a default exception value.

mapMaybeT :: (m (Maybe a) -> n (Maybe b)) -> MaybeT m a -> MaybeT n b #

Transform the computation inside a MaybeT.

exceptToMaybeT :: forall (m :: Type -> Type) e a. Functor m => ExceptT e m a -> MaybeT m a #

Convert a ExceptT computation to MaybeT, discarding the value of any exception.

except :: forall (m :: Type -> Type) e a. Monad m => Either e a -> ExceptT e m a #

Constructor for computations in the exception monad. (The inverse of runExcept).

shiftT :: Monad m => ((a -> m r) -> ContT r m r) -> ContT r m a #

shiftT f captures the continuation up to the nearest enclosing resetT and passes it to f:

resetT :: forall (m :: Type -> Type) r r'. Monad m => ContT r m r -> ContT r' m r #

resetT m delimits the continuation of any shiftT inside m.

reset :: Cont r r -> Cont r' r #

reset m delimits the continuation of any shift inside m.

liftLocal :: Monad m => m r' -> ((r' -> r') -> m r -> m r) -> (r' -> r') -> ContT r m a -> ContT r m a #

liftLocal ask local yields a local function for ContT r m.

evalContT :: Monad m => ContT r m r -> m r #

The result of running a CPS computation with return as the final continuation.

evalCont :: Cont r r -> r #

The result of running a CPS computation with the identity as the final continuation.

data HashSet a #

A set of values. A set cannot contain duplicate values.

Instances

Instances details
Foldable HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

fold :: Monoid m => HashSet m -> m #

foldMap :: Monoid m => (a -> m) -> HashSet a -> m #

foldMap' :: Monoid m => (a -> m) -> HashSet a -> m #

foldr :: (a -> b -> b) -> b -> HashSet a -> b #

foldr' :: (a -> b -> b) -> b -> HashSet a -> b #

foldl :: (b -> a -> b) -> b -> HashSet a -> b #

foldl' :: (b -> a -> b) -> b -> HashSet a -> b #

foldr1 :: (a -> a -> a) -> HashSet a -> a #

foldl1 :: (a -> a -> a) -> HashSet a -> a #

toList :: HashSet a -> [a] #

null :: HashSet a -> Bool #

length :: HashSet a -> Int #

elem :: Eq a => a -> HashSet a -> Bool #

maximum :: Ord a => HashSet a -> a #

minimum :: Ord a => HashSet a -> a #

sum :: Num a => HashSet a -> a #

product :: Num a => HashSet a -> a #

Eq1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashSet a -> HashSet b -> Bool #

Ord1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashSet a -> HashSet b -> Ordering #

Show1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashSet a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashSet a] -> ShowS #

NFData1 HashSet

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashSet.Internal

Methods

liftRnf :: (a -> ()) -> HashSet a -> () #

Hashable1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> HashSet a -> Int #

Lift a => Lift (HashSet a :: TYPE LiftedRep)

Since: unordered-containers-0.2.17.0

Instance details

Defined in Data.HashSet.Internal

Methods

lift :: Quote m => HashSet a -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => HashSet a -> Code m (HashSet a) #

(Data a, Eq a, Hashable a) => Data (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashSet a -> c (HashSet a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashSet a) #

toConstr :: HashSet a -> Constr #

dataTypeOf :: HashSet a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashSet a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashSet a)) #

gmapT :: (forall b. Data b => b -> b) -> HashSet a -> HashSet a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r #

gmapQ :: (forall d. Data d => d -> u) -> HashSet a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashSet a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

(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

Methods

mempty :: HashSet a #

mappend :: HashSet a -> HashSet a -> HashSet a #

mconcat :: [HashSet a] -> HashSet a #

(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

Methods

(<>) :: HashSet a -> HashSet a -> HashSet a #

sconcat :: NonEmpty (HashSet a) -> HashSet a #

stimes :: Integral b => b -> HashSet a -> HashSet a #

(Eq a, Hashable a) => IsList (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Associated Types

type Item (HashSet a) #

Methods

fromList :: [Item (HashSet a)] -> HashSet a #

fromListN :: Int -> [Item (HashSet a)] -> HashSet a #

toList :: HashSet a -> [Item (HashSet a)] #

(Eq a, Hashable a, Read a) => Read (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Show a => Show (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

showsPrec :: Int -> HashSet a -> ShowS #

show :: HashSet a -> String #

showList :: [HashSet a] -> ShowS #

NFData a => NFData (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

rnf :: HashSet a -> () #

Eq a => Eq (HashSet a)

Note that, in the presence of hash collisions, equal HashSets 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

Methods

(==) :: HashSet a -> HashSet a -> Bool #

(/=) :: HashSet a -> HashSet a -> Bool #

Ord a => Ord (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

compare :: HashSet a -> HashSet a -> Ordering #

(<) :: HashSet a -> HashSet a -> Bool #

(<=) :: HashSet a -> HashSet a -> Bool #

(>) :: HashSet a -> HashSet a -> Bool #

(>=) :: HashSet a -> HashSet a -> Bool #

max :: HashSet a -> HashSet a -> HashSet a #

min :: HashSet a -> HashSet a -> HashSet a #

Hashable a => Hashable (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

hashWithSalt :: Int -> HashSet a -> Int #

hash :: HashSet a -> Int #

type Item (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

type Item (HashSet a) = a

data HashMap k v #

A map from keys to values. A map cannot contain duplicate keys; each key can map to at most one value.

Instances

Instances details
Bifoldable HashMap

Since: unordered-containers-0.2.11

Instance details

Defined in Data.HashMap.Internal

Methods

bifold :: Monoid m => HashMap m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> HashMap a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> HashMap a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> HashMap a b -> c #

Eq2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> HashMap a c -> HashMap b d -> Bool #

Ord2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> HashMap a c -> HashMap b d -> Ordering #

Show2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> HashMap a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [HashMap a b] -> ShowS #

NFData2 HashMap

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> HashMap a b -> () #

Hashable2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> HashMap a b -> Int #

(Lift k, Lift v) => Lift (HashMap k v :: Type)

Since: unordered-containers-0.2.17.0

Instance details

Defined in Data.HashMap.Internal

Methods

lift :: Quote m => HashMap k v -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => HashMap k v -> Code m (HashMap k v) #

Foldable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fold :: Monoid m => HashMap k m -> m #

foldMap :: Monoid m => (a -> m) -> HashMap k a -> m #

foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m #

foldr :: (a -> b -> b) -> b -> HashMap k a -> b #

foldr' :: (a -> b -> b) -> b -> HashMap k a -> b #

foldl :: (b -> a -> b) -> b -> HashMap k a -> b #

foldl' :: (b -> a -> b) -> b -> HashMap k a -> b #

foldr1 :: (a -> a -> a) -> HashMap k a -> a #

foldl1 :: (a -> a -> a) -> HashMap k a -> a #

toList :: HashMap k a -> [a] #

null :: HashMap k a -> Bool #

length :: HashMap k a -> Int #

elem :: Eq a => a -> HashMap k a -> Bool #

maximum :: Ord a => HashMap k a -> a #

minimum :: Ord a => HashMap k a -> a #

sum :: Num a => HashMap k a -> a #

product :: Num a => HashMap k a -> a #

Eq k => Eq1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashMap k a -> HashMap k b -> Bool #

Ord k => Ord1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashMap k a -> HashMap k b -> Ordering #

(Eq k, Hashable k, Read k) => Read1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (HashMap k a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [HashMap k a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (HashMap k a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [HashMap k a] #

Show k => Show1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashMap k a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashMap k a] -> ShowS #

Traversable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> HashMap k a -> f (HashMap k b) #

sequenceA :: Applicative f => HashMap k (f a) -> f (HashMap k a) #

mapM :: Monad m => (a -> m b) -> HashMap k a -> m (HashMap k b) #

sequence :: Monad m => HashMap k (m a) -> m (HashMap k a) #

Functor (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fmap :: (a -> b) -> HashMap k a -> HashMap k b #

(<$) :: a -> HashMap k b -> HashMap k a #

NFData k => NFData1 (HashMap k)

Since: unordered-containers-0.2.14.0

Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf :: (a -> ()) -> HashMap k a -> () #

Hashable k => Hashable1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> HashMap k a -> Int #

Invariant (HashMap k)

from the unordered-containers package

Instance details

Defined in Data.Functor.Invariant

Methods

invmap :: (a -> b) -> (b -> a) -> HashMap k a -> HashMap k b #

FoldableWithKey (HashMap k) 
Instance details

Defined in Data.Key

Methods

toKeyedList :: HashMap k a -> [(Key (HashMap k), a)] #

foldMapWithKey :: Monoid m => (Key (HashMap k) -> a -> m) -> HashMap k a -> m #

foldrWithKey :: (Key (HashMap k) -> a -> b -> b) -> b -> HashMap k a -> b #

foldlWithKey :: (b -> Key (HashMap k) -> a -> b) -> b -> HashMap k a -> b #

(Eq k, Hashable k) => Indexable (HashMap k) 
Instance details

Defined in Data.Key

Methods

index :: HashMap k a -> Key (HashMap k) -> a #

Keyed (HashMap k) 
Instance details

Defined in Data.Key

Methods

mapWithKey :: (Key (HashMap k) -> a -> b) -> HashMap k a -> HashMap k b #

(Eq k, Hashable k) => Lookup (HashMap k) 
Instance details

Defined in Data.Key

Methods

lookup :: Key (HashMap k) -> HashMap k a -> Maybe a #

TraversableWithKey (HashMap k) 
Instance details

Defined in Data.Key

Methods

traverseWithKey :: Applicative f => (Key (HashMap k) -> a -> f b) -> HashMap k a -> f (HashMap k b) #

mapWithKeyM :: Monad m => (Key (HashMap k) -> a -> m b) -> HashMap k a -> m (HashMap k b) #

(Eq k, Hashable k) => Zip (HashMap k) 
Instance details

Defined in Data.Key

Methods

zipWith :: (a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c #

zip :: HashMap k a -> HashMap k b -> HashMap k (a, b) #

zap :: HashMap k (a -> b) -> HashMap k a -> HashMap k b #

(Eq k, Hashable k) => ZipWithKey (HashMap k) 
Instance details

Defined in Data.Key

Methods

zipWithKey :: (Key (HashMap k) -> a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c #

zapWithKey :: HashMap k (Key (HashMap k) -> a -> b) -> HashMap k a -> HashMap k b #

(Hashable k, Eq k) => Alt (HashMap k) 
Instance details

Defined in Data.Functor.Alt

Methods

(<!>) :: HashMap k a -> HashMap k a -> HashMap k a #

some :: Applicative (HashMap k) => HashMap k a -> HashMap k [a] #

many :: Applicative (HashMap k) => HashMap k a -> HashMap k [a] #

(Hashable k, Eq k) => Apply (HashMap k)

A 'HashMap k' is not Applicative, but it is an instance of Apply

Instance details

Defined in Data.Functor.Bind.Class

Methods

(<.>) :: HashMap k (a -> b) -> HashMap k a -> HashMap k b #

(.>) :: HashMap k a -> HashMap k b -> HashMap k b #

(<.) :: HashMap k a -> HashMap k b -> HashMap k a #

liftF2 :: (a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c #

(Hashable k, Eq k) => Bind (HashMap k)

A 'HashMap k' is not a Monad, but it is an instance of Bind

Instance details

Defined in Data.Functor.Bind.Class

Methods

(>>-) :: HashMap k a -> (a -> HashMap k b) -> HashMap k b #

join :: HashMap k (HashMap k a) -> HashMap k a #

(Hashable k, Eq k) => Plus (HashMap k) 
Instance details

Defined in Data.Functor.Plus

Methods

zero :: HashMap k a #

(Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashMap k v -> c (HashMap k v) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashMap k v) #

toConstr :: HashMap k v -> Constr #

dataTypeOf :: HashMap k v -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashMap k v)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashMap k v)) #

gmapT :: (forall b. Data b => b -> b) -> HashMap k v -> HashMap k v #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r #

gmapQ :: (forall d. Data d => d -> u) -> HashMap k v -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashMap k v -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

(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

Methods

mempty :: HashMap k v #

mappend :: HashMap k v -> HashMap k v -> HashMap k v #

mconcat :: [HashMap k v] -> HashMap k v #

(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

Methods

(<>) :: HashMap k v -> HashMap k v -> HashMap k v #

sconcat :: NonEmpty (HashMap k v) -> HashMap k v #

stimes :: Integral b => b -> HashMap k v -> HashMap k v #

(Eq k, Hashable k) => IsList (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Associated Types

type Item (HashMap k v) #

Methods

fromList :: [Item (HashMap k v)] -> HashMap k v #

fromListN :: Int -> [Item (HashMap k v)] -> HashMap k v #

toList :: HashMap k v -> [Item (HashMap k v)] #

(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) 
Instance details

Defined in Data.HashMap.Internal

(Show k, Show v) => Show (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

showsPrec :: Int -> HashMap k v -> ShowS #

show :: HashMap k v -> String #

showList :: [HashMap k v] -> ShowS #

(NFData k, NFData v) => NFData (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: HashMap k v -> () #

(Eq k, Eq v) => Eq (HashMap k v)

Note that, in the presence of hash collisions, equal HashMaps 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

Methods

(==) :: HashMap k v -> HashMap k v -> Bool #

(/=) :: HashMap k v -> HashMap k v -> Bool #

(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

Methods

compare :: HashMap k v -> HashMap k v -> Ordering #

(<) :: HashMap k v -> HashMap k v -> Bool #

(<=) :: HashMap k v -> HashMap k v -> Bool #

(>) :: HashMap k v -> HashMap k v -> Bool #

(>=) :: HashMap k v -> HashMap k v -> Bool #

max :: HashMap k v -> HashMap k v -> HashMap k v #

min :: HashMap k v -> HashMap k v -> HashMap k v #

(Hashable k, Hashable v) => Hashable (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

hashWithSalt :: Int -> HashMap k v -> Int #

hash :: HashMap k v -> Int #

type Key (HashMap k) 
Instance details

Defined in Data.Key

type Key (HashMap k) = k
type Item (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

type Item (HashMap k v) = (k, v)

data UUID #

Type representing Universally Unique Identifiers (UUID) as specified in RFC 4122.

Instances

Instances details
Data UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UUID -> c UUID #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UUID #

toConstr :: UUID -> Constr #

dataTypeOf :: UUID -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UUID) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UUID) #

gmapT :: (forall b. Data b => b -> b) -> UUID -> UUID #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UUID -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UUID -> r #

gmapQ :: (forall d. Data d => d -> u) -> UUID -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UUID -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UUID -> m UUID #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UUID -> m UUID #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UUID -> m UUID #

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

Methods

sizeOf :: UUID -> Int #

alignment :: UUID -> Int #

peekElemOff :: Ptr UUID -> Int -> IO UUID #

pokeElemOff :: Ptr UUID -> Int -> UUID -> IO () #

peekByteOff :: Ptr b -> Int -> IO UUID #

pokeByteOff :: Ptr b -> Int -> UUID -> IO () #

peek :: Ptr UUID -> IO UUID #

poke :: Ptr UUID -> UUID -> IO () #

Read UUID 
Instance details

Defined in Data.UUID.Types.Internal

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

Methods

showsPrec :: Int -> UUID -> ShowS #

show :: UUID -> String #

showList :: [UUID] -> ShowS #

Binary UUID

This Binary instance is compatible with RFC 4122, storing the fields in network order as 16 bytes.

Instance details

Defined in Data.UUID.Types.Internal

Methods

put :: UUID -> Put #

get :: Get UUID #

putList :: [UUID] -> Put #

NFData UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

rnf :: UUID -> () #

Eq UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

(==) :: UUID -> UUID -> Bool #

(/=) :: UUID -> UUID -> Bool #

Ord UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

compare :: UUID -> UUID -> Ordering #

(<) :: UUID -> UUID -> Bool #

(<=) :: UUID -> UUID -> Bool #

(>) :: UUID -> UUID -> Bool #

(>=) :: UUID -> UUID -> Bool #

max :: UUID -> UUID -> UUID #

min :: UUID -> UUID -> UUID #

Hashable UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

hashWithSalt :: Int -> UUID -> Int #

hash :: UUID -> Int #

Random UUID

This Random instance produces insecure version 4 UUIDs as specified in RFC 4122.

Instance details

Defined in Data.UUID.Types.Internal

Methods

randomR :: RandomGen g => (UUID, UUID) -> g -> (UUID, g) #

random :: RandomGen g => g -> (UUID, g) #

randomRs :: RandomGen g => (UUID, UUID) -> g -> [UUID] #

randoms :: RandomGen g => g -> [UUID] #

Uniform UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

uniformM :: StatefulGen g m => g -> m UUID #

Lift UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

lift :: Quote m => UUID -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => UUID -> Code m UUID #

data Vector a #

Boxed vectors, supporting efficient slicing.

Instances

Instances details
MonadFail Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector

Methods

fail :: String -> Vector a #

MonadFix Vector

This instance has the same semantics as the one for lists.

Since: vector-0.12.2.0

Instance details

Defined in Data.Vector

Methods

mfix :: (a -> Vector a) -> Vector a #

MonadZip Vector 
Instance details

Defined in Data.Vector

Methods

mzip :: Vector a -> Vector b -> Vector (a, b) #

mzipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

munzip :: Vector (a, b) -> (Vector a, Vector b) #

Foldable Vector 
Instance details

Defined in Data.Vector

Methods

fold :: Monoid m => Vector m -> m #

foldMap :: Monoid m => (a -> m) -> Vector a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector a -> m #

foldr :: (a -> b -> b) -> b -> Vector a -> b #

foldr' :: (a -> b -> b) -> b -> Vector a -> b #

foldl :: (b -> a -> b) -> b -> Vector a -> b #

foldl' :: (b -> a -> b) -> b -> Vector a -> b #

foldr1 :: (a -> a -> a) -> Vector a -> a #

foldl1 :: (a -> a -> a) -> Vector a -> a #

toList :: Vector a -> [a] #

null :: Vector a -> Bool #

length :: Vector a -> Int #

elem :: Eq a => a -> Vector a -> Bool #

maximum :: Ord a => Vector a -> a #

minimum :: Ord a => Vector a -> a #

sum :: Num a => Vector a -> a #

product :: Num a => Vector a -> a #

Eq1 Vector 
Instance details

Defined in Data.Vector

Methods

liftEq :: (a -> b -> Bool) -> Vector a -> Vector b -> Bool #

Ord1 Vector 
Instance details

Defined in Data.Vector

Methods

liftCompare :: (a -> b -> Ordering) -> Vector a -> Vector b -> Ordering #

Read1 Vector 
Instance details

Defined in Data.Vector

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Vector a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Vector a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Vector a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Vector a] #

Show1 Vector 
Instance details

Defined in Data.Vector

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Vector a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Vector a] -> ShowS #

Traversable Vector 
Instance details

Defined in Data.Vector

Methods

traverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) #

sequenceA :: Applicative f => Vector (f a) -> f (Vector a) #

mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) #

sequence :: Monad m => Vector (m a) -> m (Vector a) #

Alternative Vector 
Instance details

Defined in Data.Vector

Methods

empty :: Vector a #

(<|>) :: Vector a -> Vector a -> Vector a #

some :: Vector a -> Vector [a] #

many :: Vector a -> Vector [a] #

Applicative Vector 
Instance details

Defined in Data.Vector

Methods

pure :: a -> Vector a #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

(*>) :: Vector a -> Vector b -> Vector b #

(<*) :: Vector a -> Vector b -> Vector a #

Functor Vector 
Instance details

Defined in Data.Vector

Methods

fmap :: (a -> b) -> Vector a -> Vector b #

(<$) :: a -> Vector b -> Vector a #

Monad Vector 
Instance details

Defined in Data.Vector

Methods

(>>=) :: Vector a -> (a -> Vector b) -> Vector b #

(>>) :: Vector a -> Vector b -> Vector b #

return :: a -> Vector a #

MonadPlus Vector 
Instance details

Defined in Data.Vector

Methods

mzero :: Vector a #

mplus :: Vector a -> Vector a -> Vector a #

NFData1 Vector

Since: vector-0.12.1.0

Instance details

Defined in Data.Vector

Methods

liftRnf :: (a -> ()) -> Vector a -> () #

Vector Vector a 
Instance details

Defined in Data.Vector

Methods

basicUnsafeFreeze :: Mutable Vector s a -> ST s (Vector a) #

basicUnsafeThaw :: Vector a -> ST s (Mutable Vector s a) #

basicLength :: Vector a -> Int #

basicUnsafeSlice :: Int -> Int -> Vector a -> Vector a #

basicUnsafeIndexM :: Vector a -> Int -> Box a #

basicUnsafeCopy :: Mutable Vector s a -> Vector a -> ST s () #

elemseq :: Vector a -> a -> b -> b #

Data a => Data (Vector a) 
Instance details

Defined in Data.Vector

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) #

toConstr :: Vector a -> Constr #

dataTypeOf :: Vector a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) #

gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

Monoid (Vector a) 
Instance details

Defined in Data.Vector

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Semigroup (Vector a) 
Instance details

Defined in Data.Vector

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

IsList (Vector a) 
Instance details

Defined in Data.Vector

Associated Types

type Item (Vector a) #

Methods

fromList :: [Item (Vector a)] -> Vector a #

fromListN :: Int -> [Item (Vector a)] -> Vector a #

toList :: Vector a -> [Item (Vector a)] #

Read a => Read (Vector a) 
Instance details

Defined in Data.Vector

Show a => Show (Vector a) 
Instance details

Defined in Data.Vector

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

NFData a => NFData (Vector a) 
Instance details

Defined in Data.Vector

Methods

rnf :: Vector a -> () #

Eq a => Eq (Vector a) 
Instance details

Defined in Data.Vector

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

Ord a => Ord (Vector a) 
Instance details

Defined in Data.Vector

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

type Key Vector 
Instance details

Defined in Data.Vector.Instances

type Key Vector = Int
type Mutable Vector 
Instance details

Defined in Data.Vector

type Item (Vector a) 
Instance details

Defined in Data.Vector

type Item (Vector a) = a

unsafeVacuousM :: Monad m => m Void -> m a #

If Void is uninhabited then any Monad that holds values of type Void is holding no values.

This is only safe for valid monads that do not perform GADT-like analysis on the argument.

unsafeVacuous :: Functor f => f Void -> f a #

If Void is uninhabited than any Functor that holds only values of the type Void is holding no values.

This is only safe for valid functors that do not perform GADT-like analysis on the argument.

mapLeft :: Bifunctor p => (a -> b) -> p a c -> p b c Source #

A more meaningful and conflict-free alias for first.

mapRight :: Bifunctor p => (b -> c) -> p a b -> p a c Source #

A more meaningful and conflict-free alias for second.

type List = [] Source #

If you're not a fan of magical or special cases, you probably have already been looking for this alias.

type List1 = NonEmpty Source #

A more meaningful name for the non-empty list. Follows the convention behind such names as foldr1.

sappend :: Semigroup a => a -> a -> a Source #