hedgehog-1.2: Release with confidence.
Safe Haskell Safe-Inferred
Language Haskell2010

Hedgehog.Internal.Prelude

Description

Mostly for compatibility across different base Prelude changes.

Synopsis

Documentation

class Semigroup a where Source #

The class of semigroups (types with an associative binary operation).

Instances should satisfy the following:

Associativity
x <> (y <> z) = (x <> y) <> z

Since: base-4.9.0.0

Minimal complete definition

(<>)

Methods

(<>) :: a -> a -> a infixr 6 Source #

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

sconcat :: NonEmpty a -> a Source #

Reduce a non-empty list with <>

The default definition should be sufficient, but this can be overridden for efficiency.

>>> import Data.List.NonEmpty
>>> sconcat $ "Hello" :| [" ", "Haskell", "!"]
"Hello Haskell!"

stimes :: Integral b => b -> a -> a Source #

Repeat a value n times.

Given that this works on a Semigroup it is allowed to fail if you request 0 or fewer repetitions, and the default definition will do so.

By making this a member of the class, idempotent semigroups and monoids can upgrade this to execute in \(\mathcal{O}(1)\) by picking stimes = stimesIdempotent or stimes = stimesIdempotentMonoid respectively.

>>> stimes 4 [1]
[1,1,1,1]

Instances

Instances details
Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup ()

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in Data.Void

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup ByteString
Instance details

Defined in Data.ByteString.Internal

Semigroup Builder
Instance details

Defined in Data.ByteString.Builder.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Semigroup Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Semigroup LabelName Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup CoverCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup Cover Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup Journal Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup GroupName Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup PropertyName Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup Style Source #
Instance details

Defined in Hedgehog.Internal.Report

Semigroup Summary Source #
Instance details

Defined in Hedgehog.Internal.Report

Semigroup [a]

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

sconcat :: NonEmpty [a] -> [a] Source #

stimes :: Integral b => b -> [a] -> [a] Source #

Semigroup a => Semigroup ( Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup a => Semigroup ( IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Semigroup p => Semigroup ( Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Semigroup a => Semigroup ( Concurrently a)

Only defined by async for base >= 4.9

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async

Semigroup a => Semigroup ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Ord a => Semigroup ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Semigroup ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid m => Semigroup ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Semigroup ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Semigroup ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Semigroup a => Semigroup ( Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup ( Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Semigroup ( Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Semigroup ( Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup a => Semigroup ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Semigroup ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Num a => Semigroup ( Colour a)
Instance details

Defined in Data.Colour.Internal

Num a => Semigroup ( AlphaColour a)

AlphaColour forms a monoid with over and transparent .

Instance details

Defined in Data.Colour.Internal

Semigroup ( IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Semigroup ( Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Ord a => Semigroup ( Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Semigroup ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Semigroup ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Semigroup (MergeSet a)
Instance details

Defined in Data.Set.Internal

Methods

(<>) :: MergeSet a -> MergeSet a -> MergeSet a Source #

sconcat :: NonEmpty (MergeSet a) -> MergeSet a Source #

stimes :: Integral b => b -> MergeSet a -> MergeSet a Source #

Semigroup a => Semigroup ( Coverage a) Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup a => Semigroup ( Label a) Source #

This semigroup is right biased. The name, location and percentage from the rightmost Label will be kept. This shouldn't be a problem since the library doesn't allow setting multiple classes with the same ClassifierName .

Instance details

Defined in Hedgehog.Internal.Property

Semigroup a => Semigroup ( Pos a) Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Semigroup b => Semigroup (a -> b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

sconcat :: NonEmpty (a -> b) -> a -> b Source #

stimes :: Integral b0 => b0 -> (a -> b) -> a -> b Source #

Semigroup ( Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Semigroup ( V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Semigroup ( U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Semigroup a, Semigroup b) => Semigroup (a, b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

sconcat :: NonEmpty (a, b) -> (a, b) Source #

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

Semigroup a => Semigroup ( ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Semigroup ( Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

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

Defined in Data.Map.Internal

( MonadBaseControl IO m, Semigroup a) => Semigroup ( Concurrently m a)
Instance details

Defined in Control.Concurrent.Async.Lifted

( Monad m, Semigroup a) => Semigroup ( GenT m a) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Semigroup (f p) => Semigroup ( Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

sconcat :: NonEmpty (a, b, c) -> (a, b, c) Source #

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

Semigroup a => Semigroup ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Alternative f => Semigroup ( Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

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

Defined in Data.Tagged

Semigroup c => Semigroup ( K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

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

sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p Source #

stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p Source #

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

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

stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) Source #

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

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

stimes :: Integral b => b -> M1 i c f p -> M1 i c f p Source #

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

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

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

sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p Source #

stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p Source #

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

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

stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

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

When a value is bound in do -notation, the pattern on the left hand side of <- might not match. In this case, this class provides a function to recover.

A Monad without a MonadFail instance may only be used in conjunction with pattern that always match, such as newtypes, tuples, data types with only a single data constructor, and irrefutable patterns ( ~pat ).

Instances of MonadFail should satisfy the following law: fail s should be a left zero for >>= ,

fail s >>= f  =  fail s

If your Monad is also MonadPlus , a popular definition is

fail _ = mzero

Since: base-4.9.0.0

Minimal complete definition

fail

Instances

Instances details
MonadFail []

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

MonadFail Q
Instance details

Defined in Language.Haskell.TH.Syntax

MonadFail ReadPrec

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

MonadFail ReadP

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

MonadFail P

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

MonadFail ( ST s)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

MonadFail ( ST s)

Since: base-4.10

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Monad m => MonadFail ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

Monad m => MonadFail ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

MonadFail m => MonadFail ( ResourceT m)

Since: resourcet-1.2.2

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Monad m => MonadFail ( GenT m) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Monad m => MonadFail ( TestT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

Monad m => MonadFail ( PropertyT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

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

Defined in Control.Monad.Trans.Reader

MonadFail f => MonadFail ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

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

Defined in Control.Monad.Trans.Except

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

Defined in Control.Monad.Trans.Writer.Lazy

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

Defined in Control.Monad.Trans.State.Lazy

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

Defined in Control.Monad.Trans.Error

MonadFail m => MonadFail ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

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

Defined in Control.Monad.Trans.State.Strict

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

Defined in Control.Monad.Trans.Writer.Strict

( Monoid w, MonadFail m) => MonadFail ( AccumT w m)
Instance details

Defined in Control.Monad.Trans.Accum

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

Defined in Control.Monad.Trans.Writer.CPS

MonadFail m => MonadFail ( SelectT r m)
Instance details

Defined in Control.Monad.Trans.Select

MonadFail m => MonadFail ( ContT r m)
Instance details

Defined in Control.Monad.Trans.Cont

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

Defined in Control.Monad.Trans.RWS.Lazy

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

Defined in Control.Monad.Trans.RWS.Strict

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

Defined in Control.Monad.Trans.RWS.CPS

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

Append two lists, i.e.,

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

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

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

The value of seq a b is bottom if a is bottom, and otherwise equal to b . In other words, it evaluates the first argument a to weak head normal form (WHNF). seq is usually introduced to improve performance by avoiding unneeded laziness.

A note on evaluation order: the expression seq a b does not guarantee that a will be evaluated before b . The only guarantee given by seq is that the both a and b will be evaluated before seq returns a value. In particular, this means that b may be evaluated before a . If you need to guarantee a specific order of evaluation, you must use the function pseq from the "parallel" package.

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

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

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

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

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

zip is right-lazy:

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

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

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

Extract the first component of a pair.

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

Extract the second component of a pair.

otherwise :: Bool Source #

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

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

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

Application operator. This operator is redundant, since ordinary application (f x) means the same as (f $ x) . However, $ has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example:

f $ g $ h x  =  f (g (h x))

It is also useful in higher-order situations, such as map ( $ 0) xs , or zipWith ( $ ) fs xs .

Note that ( $ ) is levity-polymorphic in its result type, so that foo $ True where foo :: Bool -> Int# is well-typed.

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

general coercion from integral types

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

general coercion to fractional types

class Bounded a where Source #

The Bounded class is used to name the upper and lower limits of a type. Ord is not a superclass of Bounded since types that are not totally ordered may also have upper and lower bounds.

The Bounded class may be derived for any enumeration type; minBound is the first constructor listed in the data declaration and maxBound is the last. Bounded may also be derived for single-constructor datatypes whose constituent types are in Bounded .

Instances

Instances details
Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Color
Instance details

Defined in System.Console.ANSI.Types

Bounded ColorIntensity
Instance details

Defined in System.Console.ANSI.Types

Bounded ConsoleLayer
Instance details

Defined in System.Console.ANSI.Types

Bounded BlinkSpeed
Instance details

Defined in System.Console.ANSI.Types

Bounded Underlining
Instance details

Defined in System.Console.ANSI.Types

Bounded ConsoleIntensity
Instance details

Defined in System.Console.ANSI.Types

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 Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Bounded Extension
Instance details

Defined in GHC.LanguageExtensions.Type

Bounded a => Bounded ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded m => Bounded ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

Bounded a => Bounded ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

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

Defined in Data.Tagged

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

class Enum a where Source #

Class Enum defines operations on sequentially ordered types.

The enumFrom ... methods are used in Haskell's translation of arithmetic sequences.

Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1 . See Chapter 10 of the Haskell Report for more details.

For any type that is an instance of class Bounded as well as Enum , the following should hold:

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

Minimal complete definition

toEnum , fromEnum

Methods

succ :: a -> a Source #

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

pred :: a -> a Source #

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

toEnum :: Int -> a Source #

Convert from an Int .

fromEnum :: a -> Int Source #

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

enumFrom :: a -> [a] Source #

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

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

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

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

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

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

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

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

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

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

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

Instances

Instances details
Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Color
Instance details

Defined in System.Console.ANSI.Types

Enum ColorIntensity
Instance details

Defined in System.Console.ANSI.Types

Enum ConsoleLayer
Instance details

Defined in System.Console.ANSI.Types

Enum BlinkSpeed
Instance details

Defined in System.Console.ANSI.Types

Enum Underlining
Instance details

Defined in System.Console.ANSI.Types

Enum ConsoleIntensity
Instance details

Defined in System.Console.ANSI.Types

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 Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Enum Extension
Instance details

Defined in GHC.LanguageExtensions.Type

Enum NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Enum Day
Instance details

Defined in Data.Time.Calendar.Days

Enum Size Source #
Instance details

Defined in Hedgehog.Internal.Range

Enum ColumnNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Enum LineNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Enum PropertyCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Enum ShrinkRetries Source #
Instance details

Defined in Hedgehog.Internal.Property

Enum ShrinkCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Enum ShrinkLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Enum DiscardLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Enum DiscardCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Enum TestCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Enum TestLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Enum WorkerCount Source #
Instance details

Defined in Hedgehog.Internal.Config

Enum TaskIndex Source #
Instance details

Defined in Hedgehog.Internal.Queue

Integral a => Enum ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Enum a => Enum ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Enum a => Enum ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Enum ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Enum ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Enum a => Enum ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

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

Defined in Data.Tagged

class Eq a where Source #

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

The Haskell Report defines no laws for Eq . However, == is customarily expected to implement an equivalence relationship where two values comparing equal are indistinguishable by "public" functions, with a "public" function being one not allowing to see implementation details. For example, for a type representing non-normalised natural numbers modulo 100, a "public" function doesn't make the difference between 1 and 201. It is expected to have the following properties:

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

Minimal complete definition: either == or /= .

Minimal complete definition

(==) | (/=)

Methods

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

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

Instances

Instances details
Eq Bool
Instance details

Defined in GHC.Classes

Eq Char
Instance details

Defined in GHC.Classes

Eq Double

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

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

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

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

Defined in GHC.Classes

Eq Float

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

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

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

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

Defined in GHC.Classes

Eq Int
Instance details

Defined in GHC.Classes

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Integer
Instance details

Defined in GHC.Integer.Type

Eq Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Eq Ordering
Instance details

Defined in GHC.Classes

Eq Word
Instance details

Defined in GHC.Classes

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Eq SomeTypeRep
Instance details

Defined in Data.Typeable.Internal

Eq Exp
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Match
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Clause
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Pat
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Type
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Dec
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Name
Instance details

Defined in Language.Haskell.TH.Syntax

Eq FunDep
Instance details

Defined in Language.Haskell.TH.Syntax

Eq InjectivityAnn
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Overlap
Instance details

Defined in Language.Haskell.TH.Syntax

Eq ()
Instance details

Defined in GHC.Classes

Methods

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

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

Eq TyCon
Instance details

Defined in GHC.Classes

Eq Module
Instance details

Defined in GHC.Classes

Eq TrName
Instance details

Defined in GHC.Classes

Eq Color
Instance details

Defined in System.Console.ANSI.Types

Eq ColorIntensity
Instance details

Defined in System.Console.ANSI.Types

Eq ConsoleLayer
Instance details

Defined in System.Console.ANSI.Types

Eq BlinkSpeed
Instance details

Defined in System.Console.ANSI.Types

Eq Underlining
Instance details

Defined in System.Console.ANSI.Types

Eq ConsoleIntensity
Instance details

Defined in System.Console.ANSI.Types

Eq SGR
Instance details

Defined in System.Console.ANSI.Types

Eq Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Eq AsyncCancelled
Instance details

Defined in Control.Concurrent.Async

Eq DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Eq Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Eq Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Eq SpecConstrAnnotation

Since: base-4.3.0.0

Instance details

Defined in GHC.Exts

Eq Version

Since: base-2.1

Instance details

Defined in Data.Version

Eq HandlePosn

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle

Eq BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Eq ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Eq AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq ExitCode
Instance details

Defined in GHC.IO.Exception

Eq IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq Newline

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq NewlineMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Eq IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Eq SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Stack.Types

Eq ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Eq ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Eq ByteString
Instance details

Defined in Data.ByteString.Internal

Eq RegionLayout
Instance details

Defined in System.Console.Regions

Eq ConsoleRegion
Instance details

Defined in System.Console.Regions

Eq OutputBuffer
Instance details

Defined in System.Console.Concurrent.Internal

Eq OutputBufferedActivity
Instance details

Defined in System.Console.Concurrent.Internal

Eq AtEnd
Instance details

Defined in System.Console.Concurrent.Internal

Eq IntSet
Instance details

Defined in Data.IntSet.Internal

Eq Extension
Instance details

Defined in GHC.LanguageExtensions.Type

Eq ForeignSrcLang
Instance details

Defined in GHC.ForeignSrcLang.Type

Eq BigNat
Instance details

Defined in GHC.Integer.Type

Eq Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Eq TextDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Style
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Mode
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Value
Instance details

Defined in Text.Show.Value

Eq StdGen
Instance details

Defined in System.Random.Internal

Eq ModName
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PkgName
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Module
Instance details

Defined in Language.Haskell.TH.Syntax

Eq OccName
Instance details

Defined in Language.Haskell.TH.Syntax

Eq NameFlavour
Instance details

Defined in Language.Haskell.TH.Syntax

Eq NameSpace
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Loc
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Info
Instance details

Defined in Language.Haskell.TH.Syntax

Eq ModuleInfo
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Fixity
Instance details

Defined in Language.Haskell.TH.Syntax

Eq FixityDirection
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Lit
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Bytes
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Body
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Guard
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Stmt
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Range
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DerivClause
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DerivStrategy
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TypeFamilyHead
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TySynEqn
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Foreign
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Callconv
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Safety
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Pragma
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Inline
Instance details

Defined in Language.Haskell.TH.Syntax

Eq RuleMatch
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Phases
Instance details

Defined in Language.Haskell.TH.Syntax

Eq RuleBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Eq AnnTarget
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceUnpackedness
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DecidedStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Con
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Bang
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PatSynDir
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PatSynArgs
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TyVarBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Eq FamilyResultSig
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TyLit
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Role
Instance details

Defined in Language.Haskell.TH.Syntax

Eq AnnLookup
Instance details

Defined in Language.Haskell.TH.Syntax

Eq LocalTime
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Eq UniversalTime
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Eq UTCTime
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Eq NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Eq Day
Instance details

Defined in Data.Time.Calendar.Days

Eq Size Source #
Instance details

Defined in Hedgehog.Internal.Range

Eq LineUpdate
Instance details

Defined in System.Console.Regions

Methods

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

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

Eq Seed Source #
Instance details

Defined in Hedgehog.Internal.Seed

Eq LineDiff Source #
Instance details

Defined in Hedgehog.Internal.Show

Eq ValueDiff Source #
Instance details

Defined in Hedgehog.Internal.Show

Eq Span Source #
Instance details

Defined in Hedgehog.Internal.Source

Eq ColumnNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Eq LineNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Eq CodePoint
Instance details

Defined in Data.Text.Encoding

Methods

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

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

Eq DecoderState
Instance details

Defined in Data.Text.Encoding

Methods

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

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

Eq LabelName Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq CoverPercentage Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq CoverCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq Cover Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq Diff Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq Failure Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq Journal Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq Log Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq TerminationCriteria Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq PropertyCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq GroupName Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq ShrinkRetries Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq ShrinkPath Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq Skip Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq ShrinkCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq ShrinkLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq DiscardLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq DiscardCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq TestCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq TestLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq PropertyConfig Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq Confidence Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq PropertyName Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq EnvironmentError Source #
Instance details

Defined in Hedgehog.Internal.State

Eq Name Source #
Instance details

Defined in Hedgehog.Internal.State

Eq Position Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Eq PropertySource Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Eq WorkerCount Source #
Instance details

Defined in Hedgehog.Internal.Config

Eq Verbosity Source #
Instance details

Defined in Hedgehog.Internal.Config

Eq UseColor Source #
Instance details

Defined in Hedgehog.Internal.Config

Eq Markup Source #
Instance details

Defined in Hedgehog.Internal.Report

Eq Style Source #
Instance details

Defined in Hedgehog.Internal.Report

Eq Result Source #
Instance details

Defined in Hedgehog.Internal.Report

Eq Progress Source #
Instance details

Defined in Hedgehog.Internal.Report

Eq FailureReport Source #
Instance details

Defined in Hedgehog.Internal.Report

Eq FailedAnnotation Source #
Instance details

Defined in Hedgehog.Internal.Report

Eq TaskIndex Source #
Instance details

Defined in Hedgehog.Internal.Queue

Eq RunnerConfig Source #
Instance details

Defined in Hedgehog.Internal.Runner

Eq a => Eq [a]
Instance details

Defined in GHC.Classes

Methods

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

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

Eq a => Eq ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Eq a => Eq ( Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Real

Eq ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Eq ( FunPtr a)
Instance details

Defined in GHC.Ptr

Eq p => Eq ( Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Eq ( Async a)
Instance details

Defined in Control.Concurrent.Async

Eq a => Eq ( Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Eq a => Eq ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Eq a => Eq ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq m => Eq ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Eq ( TVar a)

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Eq ( IORef a)

Pointer equality.

Since: base-4.0.0.0

Instance details

Defined in GHC.IORef

Eq a => Eq ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Eq a => Eq ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Eq a => Eq ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq ( Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Eq ( MVar a)

Since: base-4.1.0.0

Instance details

Defined in GHC.MVar

Eq a => Eq ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Eq a => Eq ( Colour a)
Instance details

Defined in Data.Colour.Internal

Eq a => Eq ( AlphaColour a)
Instance details

Defined in Data.Colour.Internal

Eq a => Eq ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Eq a => Eq ( Tree a)
Instance details

Defined in Data.Tree

Eq a => Eq ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Eq a => Eq ( ViewL a)
Instance details

Defined in Data.Sequence.Internal

Eq a => Eq ( ViewR a)
Instance details

Defined in Data.Sequence.Internal

Eq a => Eq ( Set a)
Instance details

Defined in Data.Set.Internal

Eq a => Eq ( Hashed a)

Uses precomputed hash to detect inequality faster

Instance details

Defined in Data.Hashable.Class

Eq ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq a => Eq ( AnnotDetails a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq a => Eq ( Span a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq g => Eq ( StateGen g)
Instance details

Defined in System.Random.Internal

Eq ( TMVar a)
Instance details

Defined in Control.Concurrent.STM.TMVar

Eq a => Eq ( Window a)
Instance details

Defined in System.Console.Terminal.Common

Eq a => Eq ( Opaque a) Source #
Instance details

Defined in Hedgehog.Internal.Opaque

Eq a => Eq ( Coverage a) Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq a => Eq ( Label a) Source #
Instance details

Defined in Hedgehog.Internal.Property

Eq a => Eq ( Concrete a) Source #
Instance details

Defined in Hedgehog.Internal.State

Eq ( Symbolic a) Source #
Instance details

Defined in Hedgehog.Internal.State

Eq a => Eq ( Pos a) Source #
Instance details

Defined in Hedgehog.Internal.Discovery

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

Since: base-2.1

Instance details

Defined in Data.Either

Eq ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( TypeRep a)

Since: base-2.1

Instance details

Defined in Data.Typeable.Internal

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

Defined in GHC.Classes

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Arr

Eq ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Eq a => Eq ( Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Eq ( STRef s a)

Pointer equality.

Since: base-2.1

Instance details

Defined in GHC.STRef

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

Defined in Data.Map.Internal

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

Defined in Control.Monad.Trans.Maybe

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

Defined in Control.Monad.Trans.List

( Eq a, Eq1 m) => Eq ( NodeT m a) Source #
Instance details

Defined in Hedgehog.Internal.Tree

( Eq1 m, Eq a) => Eq ( TreeT m a) Source #
Instance details

Defined in Hedgehog.Internal.Tree

( Eq a, Eq1 v) => Eq ( Var a v) Source #
Instance details

Defined in Hedgehog.Internal.State

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Eq ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Float p)
Instance details

Defined in GHC.Generics

Eq ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

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

Defined in GHC.Classes

Methods

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

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

Eq ( STArray s i e)

Since: base-2.1

Instance details

Defined in GHC.Arr

Eq a => Eq ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

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

Defined in Control.Monad.Trans.Except

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

Defined in Control.Monad.Trans.Writer.Lazy

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

Defined in Control.Monad.Trans.Error

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

Defined in Control.Monad.Trans.Identity

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

Defined in Control.Monad.Trans.Writer.Strict

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

Defined in Data.Tagged

Eq c => Eq ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

class Fractional a => Floating a where Source #

Trigonometric and hyperbolic functions and related functions.

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

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

Instances

Instances details
Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

Floating a => Floating ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => Floating ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Floating a => Floating ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Floating a => Floating ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Defined in Data.Tagged

class Num a => Fractional a where Source #

Fractional numbers, supporting real division.

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

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

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

Minimal complete definition

fromRational , ( recip | (/) )

Methods

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

Fractional division.

recip :: a -> a Source #

Reciprocal fraction.

fromRational :: Rational -> a Source #

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

Instances

Instances details
Fractional NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Fractional CoverPercentage Source #
Instance details

Defined in Hedgehog.Internal.Property

Integral a => Fractional ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Fractional a => Fractional ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => Fractional ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Fractional a => Fractional ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

HasResolution a => Fractional ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Fractional a => Fractional ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Defined in Data.Tagged

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

Integral numbers, supporting integer division.

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

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

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

Minimal complete definition

quotRem , toInteger

Methods

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

integer division truncated toward zero

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

integer remainder, satisfying

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

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

integer division truncated toward negative infinity

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

integer modulus, satisfying

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

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

simultaneous quot and rem

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

simultaneous div and mod

toInteger :: a -> Integer Source #

conversion to Integer

Instances

Instances details
Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Size Source #
Instance details

Defined in Hedgehog.Internal.Range

Integral ColumnNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Integral LineNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Integral PropertyCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Integral ShrinkRetries Source #
Instance details

Defined in Hedgehog.Internal.Property

Integral ShrinkCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Integral ShrinkLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Integral DiscardLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Integral DiscardCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Integral TestCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Integral TestLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Integral WorkerCount Source #
Instance details

Defined in Hedgehog.Internal.Config

Integral a => Integral ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Integral a => Integral ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Integral a => Integral ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Defined in Data.Tagged

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

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

Instances of Monad should satisfy the following:

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

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

The above laws imply:

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

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

Minimal complete definition

(>>=)

Methods

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

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

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

do a <- as
   bs a

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

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

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

do as
   bs

return :: a -> m a Source #

Inject a value into the monadic type.

Instances

Instances details
Monad []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> [a] Source #

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Monad Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Monad Q
Instance details

Defined in Language.Haskell.TH.Syntax

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Monad Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Monad Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monad STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Monad ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Monad ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Monad Put
Instance details

Defined in Data.ByteString.Builder.Internal

Monad Tree
Instance details

Defined in Data.Tree

Monad Seq
Instance details

Defined in Data.Sequence.Internal

Monad P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

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

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

return :: a -> P a Source #

Monad ( Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Monad ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Monoid a => Monad ( (,) a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

Monad ( ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Monad ( ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Monad m => Monad ( WrappedMonad m)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

ArrowApply a => Monad ( ArrowMonad a)

Since: base-2.1

Instance details

Defined in Control.Arrow

Monad ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Monad m => Monad ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

Monad m => Monad ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

Monad m => Monad ( ResourceT m)
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Monad m => Monad ( NodeT m) Source #
Instance details

Defined in Hedgehog.Internal.Tree

Monad m => Monad ( TreeT m) Source #
Instance details

Defined in Hedgehog.Internal.Tree

Monad m => Monad ( GenT m) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Monad m => Monad ( TestT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

Monad m => Monad ( PropertyT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

Monad f => Monad ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

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

Defined in Control.Monad.Trans.Reader

Monad m => Monad ( Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Monad f => Monad ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Monad f => Monad ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

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

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

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

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

Defined in Control.Monad.Trans.Except

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

Defined in Control.Monad.Trans.Writer.Lazy

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

Defined in Control.Monad.Trans.State.Lazy

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

Defined in Control.Monad.Trans.Error

Monad m => Monad ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

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

Defined in Control.Monad.Trans.State.Strict

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

Defined in Control.Monad.Trans.Writer.Strict

Monad ( Tagged s)
Instance details

Defined in Data.Tagged

( Monoid w, Functor m, Monad m) => Monad ( AccumT w m)
Instance details

Defined in Control.Monad.Trans.Accum

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

Defined in Control.Monad.Trans.Writer.CPS

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

Defined in Control.Monad.Trans.Select

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

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

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

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

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

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

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Monad ( ContT r m)
Instance details

Defined in Control.Monad.Trans.Cont

Monad f => Monad ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

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

Defined in Control.Monad.Trans.RWS.Lazy

Methods

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

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

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

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

Defined in Control.Monad.Trans.RWS.Strict

Methods

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

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

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

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

Defined in Control.Monad.Trans.RWS.CPS

Methods

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

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

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

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

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

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

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

Minimal complete definition

fmap

Methods

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

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

do a <- as
   pure (f a)

with an inferred Functor constraint.

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

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

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

do bs
   pure a

with an inferred Functor constraint.

Instances

Instances details
Functor []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor Q
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Functor Async
Instance details

Defined in Control.Concurrent.Async

Functor Concurrently
Instance details

Defined in Control.Concurrent.Async

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Functor Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Functor Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Functor Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Functor First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Functor Handler

Since: base-4.6.0.0

Instance details

Defined in Control.Exception

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

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

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

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Functor ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Functor ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Functor Put
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

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

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

Functor IntMap
Instance details

Defined in Data.IntMap.Internal

Functor Tree
Instance details

Defined in Data.Tree

Functor Seq
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Functor FingerTree
Instance details

Defined in Data.Sequence.Internal

Functor Digit
Instance details

Defined in Data.Sequence.Internal

Functor Node
Instance details

Defined in Data.Sequence.Internal

Functor Elem
Instance details

Defined in Data.Sequence.Internal

Functor ViewL
Instance details

Defined in Data.Sequence.Internal

Functor ViewR
Instance details

Defined in Data.Sequence.Internal

Functor Doc
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Functor AnnotDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Functor Span
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Functor Window
Instance details

Defined in System.Console.Terminal.Common

Functor Doc
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Methods

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

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

Functor SimpleDoc
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Functor P

Since: base-4.8.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

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

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

Functor Range Source #
Instance details

Defined in Hedgehog.Internal.Range

Functor Coverage Source #
Instance details

Defined in Hedgehog.Internal.Property

Functor Label Source #
Instance details

Defined in Hedgehog.Internal.Property

Functor Concrete Source #
Instance details

Defined in Hedgehog.Internal.State

Functor Pos Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Methods

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

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

Functor Report Source #
Instance details

Defined in Hedgehog.Internal.Report

Functor ( Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

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

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

Functor ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor ( (,) a)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor ( ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

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

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

Functor ( Array i)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

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

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

Functor ( Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

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

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

Monad m => Functor ( WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Arrow a => Functor ( ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Functor ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Functor ( Map k)
Instance details

Defined in Data.Map.Internal

Methods

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

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

Functor m => Functor ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

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

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

Monad m => Functor ( Handler m)
Instance details

Defined in Control.Monad.Catch

Functor m => Functor ( Concurrently m)
Instance details

Defined in Control.Concurrent.Async.Lifted

Functor m => Functor ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

Methods

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

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

Functor m => Functor ( ResourceT m)
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Functor m => Functor ( NodeT m) Source #
Instance details

Defined in Hedgehog.Internal.Tree

Methods

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

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

Functor m => Functor ( TreeT m) Source #
Instance details

Defined in Hedgehog.Internal.Tree

Methods

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

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

Functor ( Vec n) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Methods

fmap :: (a -> b) -> Vec n a -> Vec n b Source #

(<$) :: a -> Vec n b -> Vec n a Source #

Functor m => Functor ( GenT m) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Methods

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

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

Functor m => Functor ( TestT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

Methods

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

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

Functor m => Functor ( PropertyT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

Functor f => Functor ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor ( URec Char :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Double :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Float :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Int :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Functor ( URec Word :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor ( (,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

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

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

Functor ( Const m :: Type -> Type )

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

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

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

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

Defined in Control.Monad.Trans.Reader

Methods

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

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

Arrow a => Functor ( WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Functor m => Functor ( Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

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

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

Functor f => Functor ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

Functor f => Functor ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

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

Defined in Control.Monad.Trans.Except

Methods

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

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

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

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

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

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

Defined in Control.Monad.Trans.State.Lazy

Methods

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

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

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

Defined in Control.Monad.Trans.Error

Methods

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

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

Functor m => Functor ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

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

Defined in Control.Monad.Trans.State.Strict

Methods

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

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

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

Defined in Control.Monad.Trans.Writer.Strict

Methods

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

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

Functor ( Tagged s)
Instance details

Defined in Data.Tagged

Methods

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

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

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

Defined in Control.Monad.Trans.Accum

Methods

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

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

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

Defined in Control.Monad.Trans.Writer.CPS

Methods

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

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

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

Defined in Control.Monad.Trans.Select

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor ( (,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

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

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

Functor f => Functor ( WhenMatched f x y)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

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

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

Functor ( ContT r m)
Instance details

Defined in Control.Monad.Trans.Cont

Methods

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

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

Functor f => Functor ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

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

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

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

Defined in Control.Monad.Trans.RWS.Lazy

Methods

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

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

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

Defined in Control.Monad.Trans.RWS.Strict

Methods

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

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

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

Defined in Control.Monad.Trans.RWS.CPS

Methods

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

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

class Num a where Source #

Basic numeric class.

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

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

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

Minimal complete definition

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

Methods

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

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

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

negate :: a -> a Source #

Unary negation.

abs :: a -> a Source #

Absolute value.

signum :: a -> a Source #

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

abs x * signum x == x

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

fromInteger :: Integer -> a Source #

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

Instances

Instances details
Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Num Natural

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

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Num Size Source #
Instance details

Defined in Hedgehog.Internal.Range

Num ColumnNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Num LineNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Num CodePoint
Instance details

Defined in Data.Text.Encoding

Methods

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

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

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

negate :: CodePoint -> CodePoint Source #

abs :: CodePoint -> CodePoint Source #

signum :: CodePoint -> CodePoint Source #

fromInteger :: Integer -> CodePoint Source #

Num DecoderState
Instance details

Defined in Data.Text.Encoding

Methods

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

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

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

negate :: DecoderState -> DecoderState Source #

abs :: DecoderState -> DecoderState Source #

signum :: DecoderState -> DecoderState Source #

fromInteger :: Integer -> DecoderState Source #

Num CoverPercentage Source #
Instance details

Defined in Hedgehog.Internal.Property

Num CoverCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Num PropertyCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Num ShrinkRetries Source #
Instance details

Defined in Hedgehog.Internal.Property

Num ShrinkCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Num ShrinkLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Num DiscardLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Num DiscardCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Num TestCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Num TestLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Num Confidence Source #
Instance details

Defined in Hedgehog.Internal.Property

Num Name Source #
Instance details

Defined in Hedgehog.Internal.State

Num WorkerCount Source #
Instance details

Defined in Hedgehog.Internal.Config

Num TaskIndex Source #
Instance details

Defined in Hedgehog.Internal.Queue

Integral a => Num ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Num a => Num ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => Num ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Num a => Num ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Num a => Num ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Num a => Num ( Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Num ( Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Num ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

HasResolution a => Num ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Num a => Num ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

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

Defined in Data.Tagged

class Eq a => Ord a where Source #

The Ord class is used for totally ordered datatypes.

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

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

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

Note that the following operator interactions are expected to hold:

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

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

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

Minimal complete definition

compare | (<=)

Methods

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

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

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

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

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

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

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

Instances

Instances details
Ord Bool
Instance details

Defined in GHC.Classes

Ord Char
Instance details

Defined in GHC.Classes

Ord Double

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

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

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

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

Defined in GHC.Classes

Ord Float

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

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

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

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

Defined in GHC.Classes

Ord Int
Instance details

Defined in GHC.Classes

Ord Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Integer
Instance details

Defined in GHC.Integer.Type

Ord Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Ord Ordering
Instance details

Defined in GHC.Classes

Ord Word
Instance details

Defined in GHC.Classes

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ord SomeTypeRep
Instance details

Defined in Data.Typeable.Internal

Ord Exp
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Match
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Clause
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pat
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Type
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Dec
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Name
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FunDep
Instance details

Defined in Language.Haskell.TH.Syntax

Ord InjectivityAnn
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Overlap
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ()
Instance details

Defined in GHC.Classes

Ord TyCon
Instance details

Defined in GHC.Classes

Ord Color
Instance details

Defined in System.Console.ANSI.Types

Ord ColorIntensity
Instance details

Defined in System.Console.ANSI.Types

Ord ConsoleLayer
Instance details

Defined in System.Console.ANSI.Types

Ord BlinkSpeed
Instance details

Defined in System.Console.ANSI.Types

Ord Underlining
Instance details

Defined in System.Console.ANSI.Types

Ord ConsoleIntensity
Instance details

Defined in System.Console.ANSI.Types

Ord ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Ord DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Ord Version

Since: base-2.1

Instance details

Defined in Data.Version

Ord BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Ord ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Ord AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord ExitCode
Instance details

Defined in GHC.IO.Exception

Ord BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Ord ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Ord ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Ord ByteString
Instance details

Defined in Data.ByteString.Internal

Ord IntSet
Instance details

Defined in Data.IntSet.Internal

Ord BigNat
Instance details

Defined in GHC.Integer.Type

Ord ModName
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PkgName
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Module
Instance details

Defined in Language.Haskell.TH.Syntax

Ord OccName
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameFlavour
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameSpace
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Loc
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Info
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ModuleInfo
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Fixity
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FixityDirection
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Lit
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Bytes
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Body
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Guard
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Stmt
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Range
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DerivClause
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DerivStrategy
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TypeFamilyHead
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TySynEqn
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Foreign
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Callconv
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Safety
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pragma
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Inline
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleMatch
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Phases
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Ord AnnTarget
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceUnpackedness
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DecidedStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Con
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Bang
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PatSynDir
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PatSynArgs
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TyVarBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FamilyResultSig
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TyLit
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Role
Instance details

Defined in Language.Haskell.TH.Syntax

Ord AnnLookup
Instance details

Defined in Language.Haskell.TH.Syntax

Ord LocalTime
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Ord UniversalTime
Instance details

Defined in Data.Time.Clock.Internal.UniversalTime

Ord UTCTime
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Ord NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Ord Day
Instance details

Defined in Data.Time.Calendar.Days

Ord Size Source #
Instance details

Defined in Hedgehog.Internal.Range

Ord Seed Source #
Instance details

Defined in Hedgehog.Internal.Seed

Ord Span Source #
Instance details

Defined in Hedgehog.Internal.Source

Ord ColumnNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Ord LineNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Ord LabelName Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord CoverPercentage Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord CoverCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord Cover Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord TerminationCriteria Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord PropertyCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord GroupName Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord ShrinkRetries Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord ShrinkPath Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord Skip Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord ShrinkCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord ShrinkLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord DiscardLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord DiscardCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord TestCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord TestLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord PropertyConfig Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord Confidence Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord PropertyName Source #
Instance details

Defined in Hedgehog.Internal.Property

Ord EnvironmentError Source #
Instance details

Defined in Hedgehog.Internal.State

Ord Name Source #
Instance details

Defined in Hedgehog.Internal.State

Ord Position Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Ord PropertySource Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Ord WorkerCount Source #
Instance details

Defined in Hedgehog.Internal.Config

Ord Verbosity Source #
Instance details

Defined in Hedgehog.Internal.Config

Ord UseColor Source #
Instance details

Defined in Hedgehog.Internal.Config

Ord Markup Source #
Instance details

Defined in Hedgehog.Internal.Report

Ord Style Source #
Instance details

Defined in Hedgehog.Internal.Report

Ord TaskIndex Source #
Instance details

Defined in Hedgehog.Internal.Queue

Ord RunnerConfig Source #
Instance details

Defined in Hedgehog.Internal.Runner

Ord a => Ord [a]
Instance details

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

Ord a => Ord ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Integral a => Ord ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Ord ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Ord ( FunPtr a)
Instance details

Defined in GHC.Ptr

Ord p => Ord ( Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Ord ( Async a)
Instance details

Defined in Control.Concurrent.Async

Ord a => Ord ( Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Ord a => Ord ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord m => Ord ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Ord a => Ord ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Ord a => Ord ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Ord a => Ord ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord a => Ord ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord a => Ord ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Ord a => Ord ( Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Ord a => Ord ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Ord a => Ord ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Ord a => Ord ( Tree a)

Since: containers-0.6.5

Instance details

Defined in Data.Tree

Ord a => Ord ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Ord a => Ord ( ViewL a)
Instance details

Defined in Data.Sequence.Internal

Ord a => Ord ( ViewR a)
Instance details

Defined in Data.Sequence.Internal

Ord a => Ord ( Set a)
Instance details

Defined in Data.Set.Internal

Ord a => Ord ( Hashed a)
Instance details

Defined in Data.Hashable.Class

Ord g => Ord ( StateGen g)
Instance details

Defined in System.Random.Internal

Ord a => Ord ( Opaque a) Source #
Instance details

Defined in Hedgehog.Internal.Opaque

Ord a => Ord ( Concrete a) Source #
Instance details

Defined in Hedgehog.Internal.State

Ord ( Symbolic a) Source #
Instance details

Defined in Hedgehog.Internal.State

Ord a => Ord ( Pos a) Source #
Instance details

Defined in Hedgehog.Internal.Discovery

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

Since: base-2.1

Instance details

Defined in Data.Either

Ord ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Ord ( TypeRep a)

Since: base-4.4.0.0

Instance details

Defined in Data.Typeable.Internal

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Arr

Ord ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Ord a => Ord ( Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

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

Defined in Data.Map.Internal

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

Defined in Control.Monad.Trans.Maybe

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

Defined in Control.Monad.Trans.List

( Ord a, Ord1 v) => Ord ( Var a v) Source #
Instance details

Defined in Hedgehog.Internal.State

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Ord ( URec ( Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Float p)
Instance details

Defined in GHC.Generics

Ord ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

Ord a => Ord ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

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

Defined in Control.Monad.Trans.Except

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

Defined in Control.Monad.Trans.Writer.Lazy

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

Defined in Control.Monad.Trans.Error

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

Defined in Control.Monad.Trans.Identity

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

Defined in Control.Monad.Trans.Writer.Strict

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

Defined in Data.Tagged

Ord c => Ord ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

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

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

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

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

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

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

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

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

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

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

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

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

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

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

class Read a where Source #

Parsing of String s, producing values.

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

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

For example, given the declarations

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

the derived instance of Read in Haskell 2010 is equivalent to

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

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

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

          where app_prec = 10
                up_prec = 5

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

The derived instance in GHC is equivalent to

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

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

                     +++ (prec up_prec $ do
                                 u <- step readPrec
                                 Symbol ":^:" <- lexP
                                 v <- step readPrec
                                 return (u :^: v))

          where app_prec = 10
                up_prec = 5

        readListPrec = readListPrecDefault

Why do both readsPrec and readPrec exist, and why does GHC opt to implement readPrec in derived Read instances instead of readsPrec ? The reason is that readsPrec is based on the ReadS type, and although ReadS is mentioned in the Haskell 2010 Report, it is not a very efficient parser data structure.

readPrec , on the other hand, is based on a much more efficient ReadPrec datatype (a.k.a "new-style parsers"), but its definition relies on the use of the RankNTypes language extension. Therefore, readPrec (and its cousin, readListPrec ) are marked as GHC-only. Nevertheless, it is recommended to use readPrec instead of readsPrec whenever possible for the efficiency improvements it brings.

As mentioned above, derived Read instances in GHC will implement readPrec instead of readsPrec . The default implementations of readsPrec (and its cousin, readList ) will simply use readPrec under the hood. If you are writing a Read instance by hand, it is recommended to write it like so:

instance Read T where
  readPrec     = ...
  readListPrec = readListPrecDefault

Minimal complete definition

readsPrec | readPrec

Methods

readsPrec Source #

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

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.

Instances

Instances details
Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Read Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word16

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Read ()

Since: base-2.1

Instance details

Defined in GHC.Read

Read Color
Instance details

Defined in System.Console.ANSI.Types

Read ColorIntensity
Instance details

Defined in System.Console.ANSI.Types

Read ConsoleLayer
Instance details

Defined in System.Console.ANSI.Types

Read BlinkSpeed
Instance details

Defined in System.Console.ANSI.Types

Read Underlining
Instance details

Defined in System.Console.ANSI.Types

Read ConsoleIntensity
Instance details

Defined in System.Console.ANSI.Types

Read SGR
Instance details

Defined in System.Console.ANSI.Types

Read DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read Void

Reading a Void value is always a parse error, considering Void as a data type with no constructors.

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Read Version

Since: base-2.1

Instance details

Defined in Data.Version

Read ExitCode
Instance details

Defined in GHC.IO.Exception

Read BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Lexeme

Since: base-2.1

Instance details

Defined in GHC.Read

Read GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Read

Read ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Read ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Read ByteString
Instance details

Defined in Data.ByteString.Internal

Read IntSet
Instance details

Defined in Data.IntSet.Internal

Read Size Source #
Instance details

Defined in Hedgehog.Internal.Range

Read Seed Source #
Instance details

Defined in Hedgehog.Internal.Seed

Read a => Read [a]

Since: base-2.1

Instance details

Defined in GHC.Read

Read a => Read ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

( Integral a, Read a) => Read ( Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Read

Read p => Read ( Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Read a => Read ( 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 ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Read a => Read ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read m => Read ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Read a => Read ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read ( Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Read a => Read ( NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Read e => Read ( IntMap e)
Instance details

Defined in Data.IntMap.Internal

Read a => Read ( Tree a)
Instance details

Defined in Data.Tree

Read a => Read ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Read a => Read ( ViewL a)
Instance details

Defined in Data.Sequence.Internal

Read a => Read ( ViewR a)
Instance details

Defined in Data.Sequence.Internal

( Read a, Ord a) => Read ( Set a)
Instance details

Defined in Data.Set.Internal

Read a => Read ( Window a)
Instance details

Defined in System.Console.Terminal.Common

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

Since: base-3.0

Instance details

Defined in Data.Either

Read ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read ( U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

( Read a, Read b) => Read (a, b)

Since: base-2.1

Instance details

Defined in GHC.Read

( Ix a, Read a, Read b) => Read ( Array a b)

Since: base-2.1

Instance details

Defined in GHC.Read

HasResolution a => Read ( Fixed a)

Since: base-4.3.0.0

Instance details

Defined in Data.Fixed

( Read a, Read b) => Read ( Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

( Ord k, Read k, Read e) => Read ( Map k e)
Instance details

Defined in Data.Map.Internal

( Read1 m, Read a) => Read ( MaybeT m a)
Instance details

Defined in Control.Monad.Trans.Maybe

( Read1 m, Read a) => Read ( ListT m a)
Instance details

Defined in Control.Monad.Trans.List

Read (f p) => Read ( Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-2.1

Instance details

Defined in GHC.Read

Read a => Read ( Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Read (f a) => Read ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Read (f a) => Read ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

( Read e, Read1 m, Read a) => Read ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

( Read w, Read1 m, Read a) => Read ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Read e, Read1 m, Read a) => Read ( ErrorT e m a)
Instance details

Defined in Control.Monad.Trans.Error

( 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.Strict

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

Defined in Data.Tagged

Read c => Read ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-2.1

Instance details

Defined in GHC.Read

( Read1 f, Read1 g, Read a) => Read ( Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Read1 f, Read1 g, Read a) => Read ( Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-2.1

Instance details

Defined in GHC.Read

( Read1 f, Read1 g, Read a) => Read ( Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f) Source #

readList :: ReadS [(a, b, c, d, e, f)] Source #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f)] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g) Source #

readList :: ReadS [(a, b, c, d, e, f, g)] Source #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g)] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

readList :: ReadS [(a, b, c, d, e, f, g, h)] Source #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h)] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

readList :: ReadS [(a, b, c, d, e, f, g, h, i)] Source #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i)] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j)] Source #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j)] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k)] Source #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k)] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l)] Source #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l)] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m)] Source #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m)] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

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

class ( Num a, Ord a) => Real a where Source #

Methods

toRational :: a -> Rational Source #

the rational equivalent of its real argument with full precision

Instances

Instances details
Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Real NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Real Size Source #
Instance details

Defined in Hedgehog.Internal.Range

Real ColumnNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Real LineNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Real PropertyCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Real ShrinkRetries Source #
Instance details

Defined in Hedgehog.Internal.Property

Real ShrinkCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Real ShrinkLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Real DiscardLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Real DiscardCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Real TestCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Real TestLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Real WorkerCount Source #
Instance details

Defined in Hedgehog.Internal.Config

Integral a => Real ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real a => Real ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Real a => Real ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

HasResolution a => Real ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Real a => Real ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Defined in Data.Tagged

class ( RealFrac a, Floating a) => RealFloat a where Source #

Efficient, machine-independent access to the components of a floating-point number.

Methods

floatRadix :: a -> Integer Source #

a constant function, returning the radix of the representation (often 2 )

floatDigits :: a -> Int Source #

a constant function, returning the number of digits of floatRadix in the significand

floatRange :: a -> ( Int , Int ) Source #

a constant function, returning the lowest and highest values the exponent may assume

decodeFloat :: a -> ( Integer , Int ) Source #

The function decodeFloat applied to a real floating-point number returns the significand expressed as an Integer and an appropriately scaled exponent (an Int ). If decodeFloat x yields (m,n) , then x is equal in value to m*b^^n , where b is the floating-point radix, and furthermore, either m and n are both zero or else b^(d-1) <= abs m < b^d , where d is the value of floatDigits x . In particular, decodeFloat 0 = (0,0) . If the type contains a negative zero, also decodeFloat (-0.0) = (0,0) . The result of decodeFloat x is unspecified if either of isNaN x or isInfinite x is True .

encodeFloat :: Integer -> Int -> a Source #

encodeFloat performs the inverse of decodeFloat in the sense that for finite x with the exception of -0.0 , uncurry encodeFloat ( decodeFloat x) = x . encodeFloat m n is one of the two closest representable floating-point numbers to m*b^^n (or ±Infinity if overflow occurs); usually the closer, but if m contains too many bits, the result may be rounded in the wrong direction.

exponent :: a -> Int Source #

exponent corresponds to the second component of decodeFloat . exponent 0 = 0 and for finite nonzero x , exponent x = snd ( decodeFloat x) + floatDigits x . If x is a finite floating-point number, it is equal in value to significand x * b ^^ exponent x , where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

significand :: a -> a Source #

The first component of decodeFloat , scaled to lie in the open interval ( -1 , 1 ), either 0.0 or of absolute value >= 1/b , where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

scaleFloat :: Int -> a -> a Source #

multiplies a floating-point number by an integer power of the radix

isNaN :: a -> Bool Source #

True if the argument is an IEEE "not-a-number" (NaN) value

isInfinite :: a -> Bool Source #

True if the argument is an IEEE infinity or negative infinity

isDenormalized :: a -> Bool Source #

True if the argument is too small to be represented in normalized format

isNegativeZero :: a -> Bool Source #

True if the argument is an IEEE negative zero

isIEEE :: a -> Bool Source #

True if the argument is an IEEE floating point number

atan2 :: a -> a -> a Source #

a version of arctangent taking two real floating-point arguments. For real floating x and y , atan2 y x computes the angle (from the positive x-axis) of the vector from the origin to the point (x,y) . atan2 y x returns a value in the range [ -pi , pi ]. It follows the Common Lisp semantics for the origin when signed zeroes are supported. atan2 y 1 , with y in a type that is RealFloat , should return the same value as atan y . A default definition of atan2 is provided, but implementors can provide a more accurate implementation.

Instances

Instances details
RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat 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

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

Defined in Data.Tagged

class ( Real a, Fractional a) => RealFrac a where Source #

Extracting components of fractions.

Minimal complete definition

properFraction

Methods

properFraction :: Integral b => a -> (b, a) Source #

The function properFraction takes a real fractional number x and returns a pair (n,f) such that x = n+f , and:

  • n is an integral number with the same sign as x ; and
  • f is a fraction with the same type and sign as x , and with absolute value less than 1 .

The default definitions of the ceiling , floor , truncate and round functions are in terms of properFraction .

truncate :: Integral b => a -> b Source #

truncate x returns the integer nearest x between zero and x

round :: Integral b => a -> b Source #

round x returns the nearest integer to x ; the even integer if x is equidistant between two integers

ceiling :: Integral b => a -> b Source #

ceiling x returns the least integer not less than x

floor :: Integral b => a -> b Source #

floor x returns the greatest integer not greater than x

Instances

Instances details
RealFrac NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Integral a => RealFrac ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

RealFrac a => RealFrac ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFrac a => RealFrac ( Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

HasResolution a => RealFrac ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

RealFrac a => RealFrac ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

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

Defined in Data.Tagged

class Show a where Source #

Conversion of values to readable String s.

Derived instances of Show have the following properties, which are compatible with derived instances of Read :

  • The result of show is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.
  • If the constructor is defined to be an infix operator, then showsPrec will produce infix applications of the constructor.
  • the representation will be enclosed in parentheses if the precedence of the top-level constructor in x is less than d (associativity is ignored). Thus, if d is 0 then the result is never surrounded in parentheses; if d is 11 it is always surrounded in parentheses, unless it is an atomic expression.
  • If the constructor is defined using record syntax, then show will produce the record-syntax form, with the fields given in the same order as the original declaration.

For example, given the declarations

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

the derived instance of Show is equivalent to

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

       showsPrec d (Leaf m) = showParen (d > app_prec) $
            showString "Leaf " . showsPrec (app_prec+1) m
         where app_prec = 10

       showsPrec d (u :^: v) = showParen (d > up_prec) $
            showsPrec (up_prec+1) u .
            showString " :^: "      .
            showsPrec (up_prec+1) v
         where up_prec = 5

Note that right-associativity of :^: is ignored. For example,

  • show (Leaf 1 :^: Leaf 2 :^: Leaf 3) produces the string "Leaf 1 :^: (Leaf 2 :^: Leaf 3)" .

Minimal complete definition

showsPrec | show

Methods

showsPrec Source #

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

A specialised variant of showsPrec , using precedence context zero, and returning an ordinary String .

showList :: [a] -> ShowS Source #

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 Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Show Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show RuntimeRep

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecCount

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecElem

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show CallStack

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SomeTypeRep

Since: base-4.10.0.0

Instance details

Defined in Data.Typeable.Internal

Show Exp
Instance details

Defined in Language.Haskell.TH.Syntax

Show Match
Instance details

Defined in Language.Haskell.TH.Syntax

Show Clause
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pat
Instance details

Defined in Language.Haskell.TH.Syntax

Show Type
Instance details

Defined in Language.Haskell.TH.Syntax

Show Dec
Instance details

Defined in Language.Haskell.TH.Syntax

Show Name
Instance details

Defined in Language.Haskell.TH.Syntax

Show FunDep
Instance details

Defined in Language.Haskell.TH.Syntax

Show InjectivityAnn
Instance details

Defined in Language.Haskell.TH.Syntax

Show Overlap
Instance details

Defined in Language.Haskell.TH.Syntax

Show ()

Since: base-2.1

Instance details

Defined in GHC.Show

Show TyCon

Since: base-2.1

Instance details

Defined in GHC.Show

Show Module

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show TrName

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show KindRep
Instance details

Defined in GHC.Show

Show TypeLitSort

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show Color
Instance details

Defined in System.Console.ANSI.Types

Show ColorIntensity
Instance details

Defined in System.Console.ANSI.Types

Show ConsoleLayer
Instance details

Defined in System.Console.ANSI.Types

Show BlinkSpeed
Instance details

Defined in System.Console.ANSI.Types

Show Underlining
Instance details

Defined in System.Console.ANSI.Types

Show ConsoleIntensity
Instance details

Defined in System.Console.ANSI.Types

Show SGR
Instance details

Defined in System.Console.ANSI.Types

Show Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show ThreadId

Since: base-4.2.0.0

Instance details

Defined in GHC.Conc.Sync

Show AsyncCancelled
Instance details

Defined in Control.Concurrent.Async

Show ExceptionInLinkedThread
Instance details

Defined in Control.Concurrent.Async

Show DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

Show HandlePosn

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle

Show PatternMatchFail

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Show NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show NestedAtomically

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Show BlockReason

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Show ThreadStatus

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Show Dynamic

Since: base-2.1

Instance details

Defined in Data.Dynamic

Show BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show AllocationLimitExceeded

Since: base-4.7.1.0

Instance details

Defined in GHC.IO.Exception

Show CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Show AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Show AsyncException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Show ExitCode
Instance details

Defined in GHC.IO.Exception

Show IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show HandleType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Show IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Show SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Show ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Show ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Show ByteString
Instance details

Defined in Data.ByteString.Internal

Show IntSet
Instance details

Defined in Data.IntSet.Internal

Show Extension
Instance details

Defined in GHC.LanguageExtensions.Type

Show ForeignSrcLang
Instance details

Defined in GHC.ForeignSrcLang.Type

Show Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Show TextDetails
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Style
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Mode
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Value
Instance details

Defined in Text.Show.Value

Show StdGen
Instance details

Defined in System.Random.Internal

Show InvalidAccess
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Show ResourceCleanupException
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Show ModName
Instance details

Defined in Language.Haskell.TH.Syntax

Show PkgName
Instance details

Defined in Language.Haskell.TH.Syntax

Show Module
Instance details

Defined in Language.Haskell.TH.Syntax

Show OccName
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameFlavour
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameSpace
Instance details

Defined in Language.Haskell.TH.Syntax

Show Loc
Instance details

Defined in Language.Haskell.TH.Syntax

Show Info
Instance details

Defined in Language.Haskell.TH.Syntax

Show ModuleInfo
Instance details

Defined in Language.Haskell.TH.Syntax

Show Fixity
Instance details

Defined in Language.Haskell.TH.Syntax

Show FixityDirection
Instance details

Defined in Language.Haskell.TH.Syntax

Show Lit
Instance details

Defined in Language.Haskell.TH.Syntax

Show Bytes
Instance details

Defined in Language.Haskell.TH.Syntax

Show Body
Instance details

Defined in Language.Haskell.TH.Syntax

Show Guard
Instance details

Defined in Language.Haskell.TH.Syntax

Show Stmt
Instance details

Defined in Language.Haskell.TH.Syntax

Show Range
Instance details

Defined in Language.Haskell.TH.Syntax

Show DerivClause
Instance details

Defined in Language.Haskell.TH.Syntax

Show DerivStrategy
Instance details

Defined in Language.Haskell.TH.Syntax

Show TypeFamilyHead
Instance details

Defined in Language.Haskell.TH.Syntax

Show TySynEqn
Instance details

Defined in Language.Haskell.TH.Syntax

Show Foreign
Instance details

Defined in Language.Haskell.TH.Syntax

Show Callconv
Instance details

Defined in Language.Haskell.TH.Syntax

Show Safety
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pragma
Instance details

Defined in Language.Haskell.TH.Syntax

Show Inline
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleMatch
Instance details

Defined in Language.Haskell.TH.Syntax

Show Phases
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Show AnnTarget
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceUnpackedness
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Show DecidedStrictness
Instance details

Defined in Language.Haskell.TH.Syntax

Show Con
Instance details

Defined in Language.Haskell.TH.Syntax

Show Bang
Instance details

Defined in Language.Haskell.TH.Syntax

Show PatSynDir
Instance details

Defined in Language.Haskell.TH.Syntax

Show PatSynArgs
Instance details

Defined in Language.Haskell.TH.Syntax

Show TyVarBndr
Instance details

Defined in Language.Haskell.TH.Syntax

Show FamilyResultSig
Instance details

Defined in Language.Haskell.TH.Syntax

Show TyLit
Instance details

Defined in Language.Haskell.TH.Syntax

Show Role
Instance details

Defined in Language.Haskell.TH.Syntax

Show AnnLookup
Instance details

Defined in Language.Haskell.TH.Syntax

Show Decoding
Instance details

Defined in Data.Text.Encoding

Show ZonedTime
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Show LocalTime
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Show NominalDiffTime
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Show Size Source #
Instance details

Defined in Hedgehog.Internal.Range

Show LineUpdate
Instance details

Defined in System.Console.Regions

Show Seed Source #
Instance details

Defined in Hedgehog.Internal.Seed

Show LineDiff Source #
Instance details

Defined in Hedgehog.Internal.Show

Show ValueDiff Source #
Instance details

Defined in Hedgehog.Internal.Show

Show Span Source #
Instance details

Defined in Hedgehog.Internal.Source

Show ColumnNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Show LineNo Source #
Instance details

Defined in Hedgehog.Internal.Source

Show CodePoint
Instance details

Defined in Data.Text.Encoding

Show DecoderState
Instance details

Defined in Data.Text.Encoding

Methods

showsPrec :: Int -> DecoderState -> ShowS Source #

show :: DecoderState -> String Source #

showList :: [DecoderState] -> ShowS Source #

Show LabelName Source #
Instance details

Defined in Hedgehog.Internal.Property

Show CoverPercentage Source #
Instance details

Defined in Hedgehog.Internal.Property

Show CoverCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Show Cover Source #
Instance details

Defined in Hedgehog.Internal.Property

Show Diff Source #
Instance details

Defined in Hedgehog.Internal.Property

Show Failure Source #
Instance details

Defined in Hedgehog.Internal.Property

Show Journal Source #
Instance details

Defined in Hedgehog.Internal.Property

Show Log Source #
Instance details

Defined in Hedgehog.Internal.Property

Show TerminationCriteria Source #
Instance details

Defined in Hedgehog.Internal.Property

Show PropertyCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Show GroupName Source #
Instance details

Defined in Hedgehog.Internal.Property

Show ShrinkRetries Source #
Instance details

Defined in Hedgehog.Internal.Property

Show ShrinkPath Source #
Instance details

Defined in Hedgehog.Internal.Property

Show Skip Source #
Instance details

Defined in Hedgehog.Internal.Property

Show ShrinkCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Show ShrinkLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Show DiscardLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Show DiscardCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Show TestCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Show TestLimit Source #
Instance details

Defined in Hedgehog.Internal.Property

Show PropertyConfig Source #
Instance details

Defined in Hedgehog.Internal.Property

Show Confidence Source #
Instance details

Defined in Hedgehog.Internal.Property

Show PropertyName Source #
Instance details

Defined in Hedgehog.Internal.Property

Show EnvironmentError Source #
Instance details

Defined in Hedgehog.Internal.State

Show Environment Source #
Instance details

Defined in Hedgehog.Internal.State

Show Name Source #
Instance details

Defined in Hedgehog.Internal.State

Show Position Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Show PropertySource Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Show WorkerCount Source #
Instance details

Defined in Hedgehog.Internal.Config

Show Verbosity Source #
Instance details

Defined in Hedgehog.Internal.Config

Show UseColor Source #
Instance details

Defined in Hedgehog.Internal.Config

Show Markup Source #
Instance details

Defined in Hedgehog.Internal.Report

Show Style Source #
Instance details

Defined in Hedgehog.Internal.Report

Show Summary Source #
Instance details

Defined in Hedgehog.Internal.Report

Show Result Source #
Instance details

Defined in Hedgehog.Internal.Report

Show Progress Source #
Instance details

Defined in Hedgehog.Internal.Report

Show FailureReport Source #
Instance details

Defined in Hedgehog.Internal.Report

Show FailedAnnotation Source #
Instance details

Defined in Hedgehog.Internal.Report

Show RunnerConfig Source #
Instance details

Defined in Hedgehog.Internal.Runner

Show a => Show [a]

Since: base-2.1

Instance details

Defined in GHC.Show

Show a => Show ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Show a => Show ( Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show ( Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Show ( FunPtr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Show p => Show ( Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Show a => Show ( Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Show a => Show ( Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Show a => Show ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show m => Show ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show ( ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Show a => Show ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show ( Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Show a => Show ( NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show a => Show ( ExitCase a)
Instance details

Defined in Control.Monad.Catch

Show a => Show ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Show a => Show ( Tree a)
Instance details

Defined in Data.Tree

Show a => Show ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Show a => Show ( ViewL a)
Instance details

Defined in Data.Sequence.Internal

Show a => Show ( ViewR a)
Instance details

Defined in Data.Sequence.Internal

Show a => Show ( Set a)
Instance details

Defined in Data.Set.Internal

Show a => Show ( Hashed a)
Instance details

Defined in Data.Hashable.Class

Show ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show a => Show ( AnnotDetails a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show a => Show ( Span a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show a => Show ( PreProc a)
Instance details

Defined in Text.Show.Pretty

Show g => Show ( StateGen g)
Instance details

Defined in System.Random.Internal

Show a => Show ( Window a)
Instance details

Defined in System.Console.Terminal.Common

Show ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Show ( Opaque a) Source #
Instance details

Defined in Hedgehog.Internal.Opaque

Show a => Show ( Coverage a) Source #
Instance details

Defined in Hedgehog.Internal.Property

Show a => Show ( Label a) Source #
Instance details

Defined in Hedgehog.Internal.Property

Show a => Show ( Concrete a) Source #
Instance details

Defined in Hedgehog.Internal.State

Show ( Symbolic a) Source #
Instance details

Defined in Hedgehog.Internal.State

Show a => Show ( Pos a) Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Show a => Show ( Report a) Source #
Instance details

Defined in Hedgehog.Internal.Report

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

Since: base-3.0

Instance details

Defined in Data.Either

Show ( V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( TypeRep a)
Instance details

Defined in Data.Typeable.Internal

( Show a, Show b) => Show (a, b)

Since: base-2.1

Instance details

Defined in GHC.Show

Show ( ST s a)

Since: base-2.1

Instance details

Defined in GHC.ST

( Ix a, Show a, Show b) => Show ( Array a b)

Since: base-2.1

Instance details

Defined in GHC.Arr

HasResolution a => Show ( Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

( Show a, Show b) => Show ( Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

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

Defined in Data.Map.Internal

( Show1 m, Show a) => Show ( MaybeT m a)
Instance details

Defined in Control.Monad.Trans.Maybe

( Show1 m, Show a) => Show ( ListT m a)
Instance details

Defined in Control.Monad.Trans.List

( Show1 m, Show a) => Show ( NodeT m a) Source #
Instance details

Defined in Hedgehog.Internal.Tree

( Show1 m, Show a) => Show ( TreeT m a) Source #
Instance details

Defined in Hedgehog.Internal.Tree

Show ( Parallel m state) Source #
Instance details

Defined in Hedgehog.Internal.State

Show ( Sequential m state) Source #
Instance details

Defined in Hedgehog.Internal.State

Show ( Action m state) Source #
Instance details

Defined in Hedgehog.Internal.State

( Show a, Show1 v) => Show ( Var a v) Source #
Instance details

Defined in Hedgehog.Internal.State

Show (f p) => Show ( Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Show ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Float p)
Instance details

Defined in GHC.Generics

Show ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

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

Since: base-2.1

Instance details

Defined in GHC.Show

Show a => Show ( Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Show (f a) => Show ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Show (f a) => Show ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

( Show e, Show1 m, Show a) => Show ( ExceptT e m a)
Instance details

Defined in Control.Monad.Trans.Except

( Show w, Show1 m, Show a) => Show ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Show e, Show1 m, Show a) => Show ( ErrorT e m a)
Instance details

Defined in Control.Monad.Trans.Error

( Show1 f, Show a) => Show ( IdentityT f a)
Instance details

Defined in Control.Monad.Trans.Identity

( Show w, Show1 m, Show a) => Show ( WriterT w m a)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

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

Defined in Data.Tagged

Show c => Show ( K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

showList :: [(a, b, c, d)] -> ShowS Source #

( Show1 f, Show1 g, Show a) => Show ( Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Show1 f, Show1 g, Show a) => Show ( Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e) -> ShowS Source #

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

showList :: [(a, b, c, d, e)] -> ShowS Source #

( Show1 f, Show1 g, Show a) => Show ( Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS Source #

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

showList :: [(a, b, c, d, e, f)] -> ShowS Source #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS Source #

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

showList :: [(a, b, c, d, e, f, g)] -> ShowS Source #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

showList :: [(a, b, c, d, e, f, g, h)] -> ShowS Source #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS Source #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS Source #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS Source #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

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

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

When a value is bound in do -notation, the pattern on the left hand side of <- might not match. In this case, this class provides a function to recover.

A Monad without a MonadFail instance may only be used in conjunction with pattern that always match, such as newtypes, tuples, data types with only a single data constructor, and irrefutable patterns ( ~pat ).

Instances of MonadFail should satisfy the following law: fail s should be a left zero for >>= ,

fail s >>= f  =  fail s

If your Monad is also MonadPlus , a popular definition is

fail _ = mzero

Since: base-4.9.0.0

Instances

Instances details
MonadFail []

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

MonadFail Q
Instance details

Defined in Language.Haskell.TH.Syntax

MonadFail ReadPrec

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

MonadFail ReadP

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

MonadFail P

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

MonadFail ( ST s)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

MonadFail ( ST s)

Since: base-4.10

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Monad m => MonadFail ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

Monad m => MonadFail ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

MonadFail m => MonadFail ( ResourceT m)

Since: resourcet-1.2.2

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Monad m => MonadFail ( GenT m) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Monad m => MonadFail ( TestT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

Monad m => MonadFail ( PropertyT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

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

Defined in Control.Monad.Trans.Reader

MonadFail f => MonadFail ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

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

Defined in Control.Monad.Trans.Except

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

Defined in Control.Monad.Trans.Writer.Lazy

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

Defined in Control.Monad.Trans.State.Lazy

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

Defined in Control.Monad.Trans.Error

MonadFail m => MonadFail ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

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

Defined in Control.Monad.Trans.State.Strict

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

Defined in Control.Monad.Trans.Writer.Strict

( Monoid w, MonadFail m) => MonadFail ( AccumT w m)
Instance details

Defined in Control.Monad.Trans.Accum

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

Defined in Control.Monad.Trans.Writer.CPS

MonadFail m => MonadFail ( SelectT r m)
Instance details

Defined in Control.Monad.Trans.Select

MonadFail m => MonadFail ( ContT r m)
Instance details

Defined in Control.Monad.Trans.Cont

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

Defined in Control.Monad.Trans.RWS.Lazy

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

Defined in Control.Monad.Trans.RWS.Strict

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

Defined in Control.Monad.Trans.RWS.CPS

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

A functor with application, providing operations to

  • embed pure expressions ( pure ), and
  • sequence computations and combine their results ( <*> and liftA2 ).

A minimal complete definition must include implementations of pure and of either <*> or liftA2 . If it defines both, then they must behave the same as their default definitions:

(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y

Further, any definition must satisfy the following:

Identity
pure id <*> v = v
Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
Homomorphism
pure f <*> pure x = pure (f x)
Interchange
u <*> pure y = pure ($ y) <*> u

The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:

As a consequence of these laws, the Functor instance for f will satisfy

It may be useful to note that supposing

forall x y. p (q x y) = f x . g y

it follows from the above that

liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v

If f is also a Monad , it should satisfy

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

Minimal complete definition

pure , ( (<*>) | liftA2 )

Methods

pure :: a -> f a Source #

Lift a value.

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

Sequential application.

A few functors support an implementation of <*> that is more efficient than the default one.

Using ApplicativeDo : ' fs <*> as ' can be understood as the do expression

do f <- fs
   a <- as
   pure (f a)

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

Sequence actions, discarding the value of the first argument.

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

do as
   bs

This is a tad complicated for our ApplicativeDo extension which will give it a Monad constraint. For an Applicative constraint we write it of the form

do _ <- as
   b <- bs
   pure b

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

Sequence actions, discarding the value of the second argument.

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

do a <- as
   bs
   pure a

Instances

Instances details
Applicative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> [a] Source #

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

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

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

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

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Applicative Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Applicative Q
Instance details

Defined in Language.Haskell.TH.Syntax

Applicative Concurrently
Instance details

Defined in Control.Concurrent.Async

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Applicative Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Applicative Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Applicative ZipList
f <$> ZipList xs1 <*> ... <*> ZipList xsN
    = ZipList (zipWithN f xs1 ... xsN)

where zipWithN refers to the zipWith function of the appropriate arity ( zipWith , zipWith3 , zipWith4 , ...). For example:

(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
    = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
    = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}

Since: base-2.1

Instance details

Defined in Control.Applicative

Applicative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Applicative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Applicative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Applicative Put
Instance details

Defined in Data.ByteString.Builder.Internal

Applicative Tree
Instance details

Defined in Data.Tree

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Applicative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> P a Source #

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

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

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

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

Applicative ( Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Applicative ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Monoid a => Applicative ( (,) a)

For tuples, the Monoid constraint on a determines how the first values merge. For example, String s concatenate:

("hello ", (+15)) <*> ("world!", 2002)
("hello world!",2017)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

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

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

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

Applicative ( ST s)

Since: base-4.4.0.0

Instance details

Defined in GHC.ST

Methods

pure :: a -> ST s a Source #

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

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c Source #

(*>) :: ST s a -> ST s b -> ST s b Source #

(<*) :: ST s a -> ST s b -> ST s a Source #

Applicative ( ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

pure :: a -> ST s a Source #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b Source #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c Source #

(*>) :: ST s a -> ST s b -> ST s b Source #

(<*) :: ST s a -> ST s b -> ST s a Source #

Monad m => Applicative ( WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Arrow a => Applicative ( ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Applicative ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

( Functor m, Monad m) => Applicative ( MaybeT m)
Instance details

Defined in Control.Monad.Trans.Maybe

MonadBaseControl IO m => Applicative ( Concurrently m)
Instance details

Defined in Control.Concurrent.Async.Lifted

Applicative m => Applicative ( ListT m)
Instance details

Defined in Control.Monad.Trans.List

Applicative m => Applicative ( ResourceT m)
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Applicative m => Applicative ( NodeT m) Source #
Instance details

Defined in Hedgehog.Internal.Tree

Applicative m => Applicative ( TreeT m) Source #
Instance details

Defined in Hedgehog.Internal.Tree

Monad m => Applicative ( GenT m) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Monad m => Applicative ( TestT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

Monad m => Applicative ( PropertyT m) Source #
Instance details

Defined in Hedgehog.Internal.Property

Applicative f => Applicative ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

( Monoid a, Monoid b) => Applicative ( (,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, b, a0) Source #

(<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) Source #

liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) Source #

(*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) Source #

(<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) Source #

Monoid m => Applicative ( Const m :: Type -> Type )

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Applicative m => Applicative ( ReaderT r m)
Instance details

Defined in Control.Monad.Trans.Reader

Arrow a => Applicative ( WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Applicative m => Applicative ( Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Applicative f => Applicative ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a Source #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b Source #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c Source #

(*>) :: Ap f a -> Ap f b -> Ap f b Source #

(<*) :: Ap f a -> Ap f b -> Ap f a Source #

Applicative f => Applicative ( Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

( Applicative f, Monad f) => Applicative ( WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

( Functor m, Monad m) => Applicative ( ExceptT e m)
Instance details

Defined in Control.Monad.Trans.Except

( Monoid w, Applicative m) => Applicative ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

( Functor m, Monad m) => Applicative ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Lazy

( Functor m, Monad m) => Applicative ( ErrorT e m)
Instance details

Defined in Control.Monad.Trans.Error

Applicative m => Applicative ( IdentityT m)
Instance details

Defined in Control.Monad.Trans.Identity

( Functor m, Monad m) => Applicative ( StateT s m)
Instance details

Defined in Control.Monad.Trans.State.Strict

( Monoid w, Applicative m) => Applicative ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Applicative ( Tagged s)
Instance details

Defined in Data.Tagged

( Monoid w, Functor m, Monad m) => Applicative ( AccumT w m)
Instance details

Defined in Control.Monad.Trans.Accum

( Functor m, Monad m) => Applicative ( WriterT w m)
Instance details

Defined in Control.Monad.Trans.Writer.CPS

( Functor m, Monad m) => Applicative ( SelectT r m)
Instance details

Defined in Control.Monad.Trans.Select

Applicative ((->) r :: Type -> Type )

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> r -> a Source #

(<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b Source #

liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c Source #

(*>) :: (r -> a) -> (r -> b) -> r -> b Source #

(<*) :: (r -> a) -> (r -> b) -> r -> a Source #

Monoid c => Applicative ( K1 i c :: Type -> Type )

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> K1 i c a Source #

(<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b Source #

liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 Source #

(*>) :: K1 i c a -> K1 i c b -> K1 i c b Source #

(<*) :: K1 i c a -> K1 i c b -> K1 i c a Source #

( Applicative f, Applicative g) => Applicative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :*: g) a Source #

(<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b Source #

liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c Source #

(*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b Source #

(<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a Source #

( Monoid a, Monoid b, Monoid c) => Applicative ( (,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, b, c, a0) Source #

(<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) Source #

liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) Source #

(*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) Source #

(<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) Source #

( Applicative f, Applicative g) => Applicative ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Monad f, Applicative f) => Applicative ( WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

( Applicative f, Monad f) => Applicative ( WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Applicative ( ContT r m)
Instance details

Defined in Control.Monad.Trans.Cont

Methods

pure :: a -> ContT r m a Source #

(<*>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b Source #

liftA2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c Source #

(*>) :: ContT r m a -> ContT r m b -> ContT r m b Source #

(<*) :: ContT r m a -> ContT r m b -> ContT r m a Source #

Applicative f => Applicative ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> M1 i c f a Source #

(<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b Source #

liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 Source #

(*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b Source #

(<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a Source #

( Applicative f, Applicative g) => Applicative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :.: g) a Source #

(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b Source #

liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c Source #

(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b Source #

(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a Source #

( Applicative f, Applicative g) => Applicative ( Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

( Monad f, Applicative f) => Applicative ( WhenMatched f k x y)

Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMatched f k x y a Source #

(<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b Source #

liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c Source #

(*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b Source #

(<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a Source #

( Monoid w, Functor m, Monad m) => Applicative ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

pure :: a -> RWST r w s m a Source #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c Source #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a Source #

( Monoid w, Functor m, Monad m) => Applicative ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

pure :: a -> RWST r w s m a Source #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c Source #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a Source #

( Functor m, Monad m) => Applicative ( RWST r w s m)
Instance details

Defined in Control.Monad.Trans.RWS.CPS

Methods

pure :: a -> RWST r w s m a Source #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c Source #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b Source #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a Source #

class Foldable (t :: Type -> Type ) where Source #

Data structures that can be folded.

For example, given a data type

data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

instance Foldable Tree where
   foldMap f Empty = mempty
   foldMap f (Leaf x) = f x
   foldMap f (Node l k r) = foldMap f l `mappend` f k `mappend` foldMap f r

This is suitable even for abstract types, as the monoid is assumed to satisfy the monoid laws. Alternatively, one could define foldr :

instance Foldable Tree where
   foldr f z Empty = z
   foldr f z (Leaf x) = f x z
   foldr f z (Node l k r) = foldr f (f k (foldr f z r)) l

Foldable instances are expected to satisfy the following laws:

foldr f z t = appEndo (foldMap (Endo . f) t ) z
foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z
fold = foldMap id
length = getSum . foldMap (Sum . const  1)

sum , product , maximum , and minimum should all be essentially equivalent to foldMap forms, such as

sum = getSum . foldMap Sum

but may be less defined.

If the type is also a Functor instance, it should satisfy

foldMap f = fold . fmap f

which implies that

foldMap f . fmap g = foldMap (f . g)

Minimal complete definition

foldMap | foldr

Methods

foldMap :: Monoid m => (a -> m) -> t a -> m Source #

Map each element of the structure to a monoid, and combine the results.

foldr :: (a -> b -> b) -> b -> t a -> b Source #

Right-associative fold of a structure.

In the case of lists, foldr , when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left:

foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)

Note that, since the head of the resulting expression is produced by an application of the operator to the first element of the list, foldr can produce a terminating expression from an infinite list.

For a general Foldable structure this should be semantically identical to,

foldr f z = foldr f z . toList

foldl :: (b -> a -> b) -> b -> t a -> b Source #

Left-associative fold of a structure.

In the case of lists, foldl , when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn

Note that to produce the outermost application of the operator the entire input list must be traversed. This means that foldl' will diverge if given an infinite list.

Also note that if you want an efficient left-fold, you probably want to use foldl' instead of foldl . The reason for this is that latter does not force the "inner" results (e.g. z `f` x1 in the above example) before applying them to the operator (e.g. to (`f` x2) ). This results in a thunk chain \(\mathcal{O}(n)\) elements long, which then must be evaluated from the outside-in.

For a general Foldable structure this should be semantically identical to,

foldl f z = foldl f z . toList

foldr1 :: (a -> a -> a) -> t a -> a Source #

A variant of foldr that has no base case, and thus may only be applied to non-empty structures.

foldr1 f = foldr1 f . toList

foldl1 :: (a -> a -> a) -> t a -> a Source #

A variant of foldl that has no base case, and thus may only be applied to non-empty structures.

foldl1 f = foldl1 f . toList

null :: t a -> Bool Source #

Test whether the structure is empty. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

Since: base-4.8.0.0

length :: t a -> Int Source #

Returns the size/length of a finite structure as an Int . The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

Since: base-4.8.0.0

elem :: Eq a => a -> t a -> Bool infix 4 Source #

Does the element occur in the structure?

Since: base-4.8.0.0

maximum :: Ord a => t a -> a Source #

The largest element of a non-empty structure.

Since: base-4.8.0.0

minimum :: Ord a => t a -> a Source #

The least element of a non-empty structure.

Since: base-4.8.0.0

sum :: Num a => t a -> a Source #

The sum function computes the sum of the numbers of a structure.

Since: base-4.8.0.0

product :: Num a => t a -> a Source #

The product function computes the product of the numbers of a structure.

Since: base-4.8.0.0

Instances

Instances details
Foldable []

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => [m] -> m Source #

foldMap :: Monoid m => (a -> m) -> [a] -> m Source #

foldMap' :: Monoid m => (a -> m) -> [a] -> m Source #

foldr :: (a -> b -> b) -> b -> [a] -> b Source #

foldr' :: (a -> b -> b) -> b -> [a] -> b Source #

foldl :: (b -> a -> b) -> b -> [a] -> b Source #

foldl' :: (b -> a -> b) -> b -> [a] -> b Source #

foldr1 :: (a -> a -> a) -> [a] -> a Source #

foldl1 :: (a -> a -> a) -> [a] -> a Source #

toList :: [a] -> [a] Source #

null :: [a] -> Bool Source #

length :: [a] -> Int Source #

elem :: Eq a => a -> [a] -> Bool Source #

maximum :: Ord a => [a] -> a Source #

minimum :: Ord a => [a] -> a Source #

sum :: Num a => [a] -> a Source #

product :: Num a => [a] -> a Source #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Foldable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Foldable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Foldable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Foldable Tree
Instance details

Defined in Data.Tree

Foldable Seq
Instance details

Defined in Data.Sequence.Internal

Foldable FingerTree
Instance details

Defined in Data.Sequence.Internal

Foldable Digit
Instance details

Defined in Data.Sequence.Internal

Foldable Node
Instance details

Defined in Data.Sequence.Internal

Foldable Elem
Instance details

Defined in Data.Sequence.Internal

Foldable ViewL
Instance details

Defined in Data.Sequence.Internal

Foldable ViewR
Instance details

Defined in Data.Sequence.Internal

Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Foldable Hashed
Instance details

Defined in Data.Hashable.Class

Foldable Window
Instance details

Defined in System.Console.Terminal.Common

Foldable SimpleDoc
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Foldable Node Source #
Instance details

Defined in Hedgehog.Internal.Tree

Foldable Tree Source #
Instance details

Defined in Hedgehog.Internal.Tree

Foldable Coverage Source #
Instance details

Defined in Hedgehog.Internal.Property

Foldable Label Source #
Instance details

Defined in Hedgehog.Internal.Property

Foldable Concrete Source #
Instance details

Defined in Hedgehog.Internal.State

Foldable Report Source #
Instance details

Defined in Hedgehog.Internal.Report

Foldable ( Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

toList :: Either a a0 -> [a0] Source #

null :: Either a a0 -> Bool Source #

length :: Either a a0 -> Int Source #

elem :: Eq a0 => a0 -> Either a a0 -> Bool Source #

maximum :: Ord a0 => Either a a0 -> a0 Source #

minimum :: Ord a0 => Either a a0 -> a0 Source #

sum :: Num a0 => Either a a0 -> a0 Source #

product :: Num a0 => Either a a0 -> a0 Source #

Foldable ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( (,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (a, m) -> m Source #

foldMap :: Monoid m => (a0 -> m) -> (a, a0) -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> (a, a0) -> m Source #

foldr :: (a0 -> b -> b) -> b -> (a, a0) -> b Source #

foldr' :: (a0 -> b -> b) -> b -> (a, a0) -> b Source #

foldl :: (b -> a0 -> b) -> b -> (a, a0) -> b Source #

foldl' :: (b -> a0 -> b) -> b -> (a, a0) -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 Source #

toList :: (a, a0) -> [a0] Source #

null :: (a, a0) -> Bool Source #

length :: (a, a0) -> Int Source #

elem :: Eq a0 => a0 -> (a, a0) -> Bool Source #

maximum :: Ord a0 => (a, a0) -> a0 Source #

minimum :: Ord a0 => (a, a0) -> a0 Source #

sum :: Num a0 => (a, a0) -> a0 Source #

product :: Num a0 => (a, a0) -> a0 Source #

Foldable ( Array i)

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Foldable ( Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Arg a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Arg a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Arg a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Arg a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 Source #

toList :: Arg a a0 -> [a0] Source #

null :: Arg a a0 -> Bool Source #

length :: Arg a a0 -> Int Source #

elem :: Eq a0 => a0 -> Arg a a0 -> Bool Source #

maximum :: Ord a0 => Arg a a0 -> a0 Source #

minimum :: Ord a0 => Arg a a0 -> a0 Source #

sum :: Num a0 => Arg a a0 -> a0 Source #

product :: Num a0 => Arg a a0 -> a0 Source #

Foldable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Foldable ( Map k)

Folds in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m Source #

foldMap :: Monoid m => (a -> m) -> Map k a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m Source #

foldr :: (a -> b -> b) -> b -> Map k a -> b Source #

foldr' :: (a -> b -> b) -> b -> Map k a -> b Source #

foldl :: (b -> a -> b) -> b -> Map k a -> b Source #

foldl' :: (b -> a -> b) -> b -> Map k a -> b Source #

foldr1 :: (a -> a -> a) -> Map k a -> a Source #

foldl1 :: (a -> a -> a) -> Map k a -> a Source #

toList :: Map k a -> [a] Source #

null :: Map k a -> Bool Source #

length :: Map k a -> Int Source #

elem :: Eq a => a -> Map k a -> Bool Source #

maximum :: Ord a => Map k a -> a Source #

minimum :: Ord a => Map k a -> a Source #

sum :: Num a => Map k a -> a Source #

product :: Num a => Map k a -> a Source #

Foldable f => Foldable ( MaybeT f)
Instance details

Defined in Control.Monad.Trans.Maybe

Foldable f => Foldable ( ListT f)
Instance details

Defined in Control.Monad.Trans.List

Foldable ( Vec n) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Methods

fold :: Monoid m => Vec n m -> m Source #

foldMap :: Monoid m => (a -> m) -> Vec n a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Vec n a -> m Source #

foldr :: (a -> b -> b) -> b -> Vec n a -> b Source #

foldr' :: (a -> b -> b) -> b -> Vec n a -> b Source #

foldl :: (b -> a -> b) -> b -> Vec n a -> b Source #

foldl' :: (b -> a -> b) -> b -> Vec n a -> b Source #

foldr1 :: (a -> a -> a) -> Vec n a -> a Source #

foldl1 :: (a -> a -> a) -> Vec n a -> a Source #

toList :: Vec n a -> [a] Source #

null :: Vec n a -> Bool Source #

length :: Vec n a -> Int Source #

elem :: Eq a => a -> Vec n a -> Bool Source #

maximum :: Ord a => Vec n a -> a Source #

minimum :: Ord a => Vec n a -> a Source #

sum :: Num a => Vec n a -> a Source #

product :: Num a => Vec n a -> a Source #

Foldable f => Foldable ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Foldable ( Const m :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Functor.Const

Foldable f => Foldable ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Ap f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldr :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldl :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldr1 :: (a -> a -> a) -> Ap f a -> a Source #

foldl1 :: (a -> a -> a) -> Ap f a -> a Source #

toList :: Ap f a -> [a] Source #

null :: Ap f a -> Bool Source #

length :: Ap f a -> Int Source #

elem :: Eq a => a -> Ap f a -> Bool Source #

maximum :: Ord a => Ap f a -> a Source #

minimum :: Ord a => Ap f a -> a Source #

sum :: Num a => Ap f a -> a Source #

product :: Num a => Ap f a -> a Source #

Foldable f => Foldable ( Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Alt f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Alt f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Alt f a -> m Source #

foldr :: (a -> b -> b) -> b -> Alt f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Alt f a -> b Source #

foldl :: (b -> a -> b) -> b -> Alt f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Alt f a -> b Source #

foldr1 :: (a -> a -> a) -> Alt f a -> a Source #

foldl1 :: (a -> a -> a) -> Alt f a -> a Source #

toList :: Alt f a -> [a] Source #

null :: Alt f a -> Bool Source #

length :: Alt f a -> Int Source #

elem :: Eq a => a -> Alt f a -> Bool Source #

maximum :: Ord a => Alt f a -> a Source #

minimum :: Ord a => Alt f a -> a Source #

sum :: Num a => Alt f a -> a Source #

product :: Num a => Alt f a -> a Source #

Foldable f => Foldable ( ExceptT e f)
Instance details

Defined in Control.Monad.Trans.Except

Foldable f => Foldable ( WriterT w f)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Foldable f => Foldable ( ErrorT e f)
Instance details

Defined in Control.Monad.Trans.Error

Methods

fold :: Monoid m => ErrorT e f m -> m Source #

foldMap :: Monoid m => (a -> m) -> ErrorT e f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ErrorT e f a -> m Source #

foldr :: (a -> b -> b) -> b -> ErrorT e f a -> b Source #

foldr' :: (a -> b -> b) -> b -> ErrorT e f a -> b Source #

foldl :: (b -> a -> b) -> b -> ErrorT e f a -> b Source #

foldl' :: (b -> a -> b) -> b -> ErrorT e f a -> b Source #

foldr1 :: (a -> a -> a) -> ErrorT e f a -> a Source #

foldl1 :: (a -> a -> a) -> ErrorT e f a -> a Source #

toList :: ErrorT e f a -> [a] Source #

null :: ErrorT e f a -> Bool Source #

length :: ErrorT e f a -> Int Source #

elem :: Eq a => a -> ErrorT e f a -> Bool Source #

maximum :: Ord a => ErrorT e f a -> a Source #

minimum :: Ord a => ErrorT e f a -> a Source #

sum :: Num a => ErrorT e f a -> a Source #

product :: Num a => ErrorT e f a -> a Source #

Foldable f => Foldable ( IdentityT f)
Instance details

Defined in Control.Monad.Trans.Identity

Foldable f => Foldable ( WriterT w f)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Foldable ( Tagged s)
Instance details

Defined in Data.Tagged

Foldable ( K1 i c :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => K1 i c m -> m Source #

foldMap :: Monoid m => (a -> m) -> K1 i c a -> m Source #

foldMap' :: Monoid m => (a -> m) -> K1 i c a -> m Source #

foldr :: (a -> b -> b) -> b -> K1 i c a -> b Source #

foldr' :: (a -> b -> b) -> b -> K1 i c a -> b Source #

foldl :: (b -> a -> b) -> b -> K1 i c a -> b Source #

foldl' :: (b -> a -> b) -> b -> K1 i c a -> b Source #

foldr1 :: (a -> a -> a) -> K1 i c a -> a Source #

foldl1 :: (a -> a -> a) -> K1 i c a -> a Source #

toList :: K1 i c a -> [a] Source #

null :: K1 i c a -> Bool Source #

length :: K1 i c a -> Int Source #

elem :: Eq a => a -> K1 i c a -> Bool Source #

maximum :: Ord a => K1 i c a -> a Source #

minimum :: Ord a => K1 i c a -> a Source #

sum :: Num a => K1 i c a -> a Source #

product :: Num a => K1 i c a -> a Source #

( Foldable f, Foldable g) => Foldable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :+: g) m -> m Source #

foldMap :: Monoid m => (a -> m) -> (f :+: g) a -> m Source #

foldMap' :: Monoid m => (a -> m) -> (f :+: g) a -> m Source #

foldr :: (a -> b -> b) -> b -> (f :+: g) a -> b Source #

foldr' :: (a -> b -> b) -> b -> (f :+: g) a -> b Source #

foldl :: (b -> a -> b) -> b -> (f :+: g) a -> b Source #

foldl' :: (b -> a -> b) -> b -> (f :+: g) a -> b Source #

foldr1 :: (a -> a -> a) -> (f :+: g) a -> a Source #

foldl1 :: (a -> a -> a) -> (f :+: g) a -> a Source #

toList :: (f :+: g) a -> [a] Source #

null :: (f :+: g) a -> Bool Source #

length :: (f :+: g) a -> Int Source #

elem :: Eq a => a -> (f :+: g) a -> Bool Source #

maximum :: Ord a => (f :+: g) a -> a Source #

minimum :: Ord a => (f :+: g) a -> a Source #

sum :: Num a => (f :+: g) a -> a Source #

product :: Num a => (f :+: g) a -> a Source #

( Foldable f, Foldable g) => Foldable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :*: g) m -> m Source #

foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m Source #

foldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m Source #

foldr :: (a -> b -> b) -> b -> (f :*: g) a -> b Source #

foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b Source #

foldl :: (b -> a -> b) -> b -> (f :*: g) a -> b Source #

foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b Source #

foldr1 :: (a -> a -> a) -> (f :*: g) a -> a Source #

foldl1 :: (a -> a -> a) -> (f :*: g) a -> a Source #

toList :: (f :*: g) a -> [a] Source #

null :: (f :*: g) a -> Bool Source #

length :: (f :*: g) a -> Int Source #

elem :: Eq a => a -> (f :*: g) a -> Bool Source #

maximum :: Ord a => (f :*: g) a -> a Source #

minimum :: Ord a => (f :*: g) a -> a Source #

sum :: Num a => (f :*: g) a -> a Source #

product :: Num a => (f :*: g) a -> a Source #

( Foldable f, Foldable g) => Foldable ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

( Foldable f, Foldable g) => Foldable ( Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

fold :: Monoid m => Sum f g m -> m Source #

foldMap :: Monoid m => (a -> m) -> Sum f g a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Sum f g a -> m Source #

foldr :: (a -> b -> b) -> b -> Sum f g a -> b Source #

foldr' :: (a -> b -> b) -> b -> Sum f g a -> b Source #

foldl :: (b -> a -> b) -> b -> Sum f g a -> b Source #

foldl' :: (b -> a -> b) -> b -> Sum f g a -> b Source #

foldr1 :: (a -> a -> a) -> Sum f g a -> a Source #

foldl1 :: (a -> a -> a) -> Sum f g a -> a Source #

toList :: Sum f g a -> [a] Source #

null :: Sum f g a -> Bool Source #

length :: Sum f g a -> Int Source #

elem :: Eq a => a -> Sum f g a -> Bool Source #

maximum :: Ord a => Sum f g a -> a Source #

minimum :: Ord a => Sum f g a -> a Source #

sum :: Num a => Sum f g a -> a Source #

product :: Num a => Sum f g a -> a Source #

Foldable f => Foldable ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => M1 i c f m -> m Source #

foldMap :: Monoid m => (a -> m) -> M1 i c f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> M1 i c f a -> m Source #

foldr :: (a -> b -> b) -> b -> M1 i c f a -> b Source #

foldr' :: (a -> b -> b) -> b -> M1 i c f a -> b Source #

foldl :: (b -> a -> b) -> b -> M1 i c f a -> b Source #

foldl' :: (b -> a -> b) -> b -> M1 i c f a -> b Source #

foldr1 :: (a -> a -> a) -> M1 i c f a -> a Source #

foldl1 :: (a -> a -> a) -> M1 i c f a -> a Source #

toList :: M1 i c f a -> [a] Source #

null :: M1 i c f a -> Bool Source #

length :: M1 i c f a -> Int Source #

elem :: Eq a => a -> M1 i c f a -> Bool Source #

maximum :: Ord a => M1 i c f a -> a Source #

minimum :: Ord a => M1 i c f a -> a Source #

sum :: Num a => M1 i c f a -> a Source #

product :: Num a => M1 i c f a -> a Source #

( Foldable f, Foldable g) => Foldable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :.: g) m -> m Source #

foldMap :: Monoid m => (a -> m) -> (f :.: g) a -> m Source #

foldMap' :: Monoid m => (a -> m) -> (f :.: g) a -> m Source #

foldr :: (a -> b -> b) -> b -> (f :.: g) a -> b Source #

foldr' :: (a -> b -> b) -> b -> (f :.: g) a -> b Source #

foldl :: (b -> a -> b) -> b -> (f :.: g) a -> b Source #

foldl' :: (b -> a -> b) -> b -> (f :.: g) a -> b Source #

foldr1 :: (a -> a -> a) -> (f :.: g) a -> a Source #

foldl1 :: (a -> a -> a) -> (f :.: g) a -> a Source #

toList :: (f :.: g) a -> [a] Source #

null :: (f :.: g) a -> Bool Source #

length :: (f :.: g) a -> Int Source #

elem :: Eq a => a -> (f :.: g) a -> Bool Source #

maximum :: Ord a => (f :.: g) a -> a Source #

minimum :: Ord a => (f :.: g) a -> a Source #

sum :: Num a => (f :.: g) a -> a Source #

product :: Num a => (f :.: g) a -> a Source #

( Foldable f, Foldable g) => Foldable ( Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

class ( Functor t, Foldable t) => Traversable (t :: Type -> Type ) where Source #

Functors representing data structures that can be traversed from left to right.

A definition of traverse must satisfy the following laws:

Naturality
t . traverse f = traverse (t . f) for every applicative transformation t
Identity
traverse Identity = Identity
Composition
traverse ( Compose . fmap g . f) = Compose . fmap ( traverse g) . traverse f

A definition of sequenceA must satisfy the following laws:

Naturality
t . sequenceA = sequenceA . fmap t for every applicative transformation t
Identity
sequenceA . fmap Identity = Identity
Composition
sequenceA . fmap Compose = Compose . fmap sequenceA . sequenceA

where an applicative transformation is a function

t :: (Applicative f, Applicative g) => f a -> g a

preserving the Applicative operations, i.e.

t (pure x) = pure x
t (f <*> x) = t f <*> t x

and the identity functor Identity and composition functors Compose are from Data.Functor.Identity and Data.Functor.Compose .

A result of the naturality law is a purity law for traverse

traverse pure = pure

(The naturality law is implied by parametricity and thus so is the purity law [1, p15].)

Instances are similar to Functor , e.g. given a data type

data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

instance Traversable Tree where
   traverse f Empty = pure Empty
   traverse f (Leaf x) = Leaf <$> f x
   traverse f (Node l k r) = Node <$> traverse f l <*> f k <*> traverse f r

This is suitable even for abstract types, as the laws for <*> imply a form of associativity.

The superclass instances should satisfy the following:

References: [1] The Essence of the Iterator Pattern, Jeremy Gibbons and Bruno C. d. S. Oliveira

Minimal complete definition

traverse | sequenceA

Methods

traverse :: Applicative f => (a -> f b) -> t a -> f (t b) Source #

Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_ .

sequenceA :: Applicative f => t (f a) -> f (t a) Source #

Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_ .

mapM :: Monad m => (a -> m b) -> t a -> m (t b) Source #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_ .

sequence :: Monad m => t (m a) -> m (t a) Source #

Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_ .

Instances

Instances details
Traversable []

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> [a] -> f [b] Source #

sequenceA :: Applicative f => [f a] -> f [a] Source #

mapM :: Monad m => (a -> m b) -> [a] -> m [b] Source #

sequence :: Monad m => [m a] -> m [a] Source #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Traversable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Traversable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Traversable Tree
Instance details

Defined in Data.Tree

Traversable Seq
Instance details

Defined in Data.Sequence.Internal

Traversable FingerTree
Instance details

Defined in Data.Sequence.Internal

Traversable Digit
Instance details

Defined in Data.Sequence.Internal

Traversable Node
Instance details

Defined in Data.Sequence.Internal

Traversable Elem
Instance details

Defined in Data.Sequence.Internal

Traversable ViewL
Instance details

Defined in Data.Sequence.Internal

Traversable ViewR
Instance details

Defined in Data.Sequence.Internal

Traversable Window
Instance details

Defined in System.Console.Terminal.Common

Traversable SimpleDoc
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Traversable Node Source #
Instance details

Defined in Hedgehog.Internal.Tree

Traversable Tree Source #
Instance details

Defined in Hedgehog.Internal.Tree

Traversable Coverage Source #
Instance details

Defined in Hedgehog.Internal.Property

Traversable Label Source #
Instance details

Defined in Hedgehog.Internal.Property

Traversable Concrete Source #
Instance details

Defined in Hedgehog.Internal.State

Traversable Report Source #
Instance details

Defined in Hedgehog.Internal.Report

Traversable ( Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f ( Either a b) Source #

sequenceA :: Applicative f => Either a (f a0) -> f ( Either a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m ( Either a b) Source #

sequence :: Monad m => Either a (m a0) -> m ( Either a a0) Source #

Traversable ( V1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( U1 :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UAddr :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Traversable ( (,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> (a, a0) -> f (a, b) Source #

sequenceA :: Applicative f => (a, f a0) -> f (a, a0) Source #

mapM :: Monad m => (a0 -> m b) -> (a, a0) -> m (a, b) Source #

sequence :: Monad m => (a, m a0) -> m (a, a0) Source #

Ix i => Traversable ( Array i)

Since: base-2.1

Instance details

Defined in Data.Traversable

Traversable ( Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a0 -> f b) -> Arg a a0 -> f ( Arg a b) Source #

sequenceA :: Applicative f => Arg a (f a0) -> f ( Arg a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Arg a a0 -> m ( Arg a b) Source #

sequence :: Monad m => Arg a (m a0) -> m ( Arg a a0) Source #

Traversable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Traversable ( Map k)

Traverses in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Map k a -> f ( Map k b) Source #

sequenceA :: Applicative f => Map k (f a) -> f ( Map k a) Source #

mapM :: Monad m => (a -> m b) -> Map k a -> m ( Map k b) Source #

sequence :: Monad m => Map k (m a) -> m ( Map k a) Source #

Traversable f => Traversable ( MaybeT f)
Instance details

Defined in Control.Monad.Trans.Maybe

Traversable f => Traversable ( ListT f)
Instance details

Defined in Control.Monad.Trans.List

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ListT f a -> f0 ( ListT f b) Source #

sequenceA :: Applicative f0 => ListT f (f0 a) -> f0 ( ListT f a) Source #

mapM :: Monad m => (a -> m b) -> ListT f a -> m ( ListT f b) Source #

sequence :: Monad m => ListT f (m a) -> m ( ListT f a) Source #

Traversable ( Vec n) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Methods

traverse :: Applicative f => (a -> f b) -> Vec n a -> f ( Vec n b) Source #

sequenceA :: Applicative f => Vec n (f a) -> f ( Vec n a) Source #

mapM :: Monad m => (a -> m b) -> Vec n a -> m ( Vec n b) Source #

sequence :: Monad m => Vec n (m a) -> m ( Vec n a) Source #

Traversable f => Traversable ( Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Rec1 f a -> f0 ( Rec1 f b) Source #

sequenceA :: Applicative f0 => Rec1 f (f0 a) -> f0 ( Rec1 f a) Source #

mapM :: Monad m => (a -> m b) -> Rec1 f a -> m ( Rec1 f b) Source #

sequence :: Monad m => Rec1 f (m a) -> m ( Rec1 f a) Source #

Traversable ( Const m :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Const m a -> f ( Const m b) Source #

sequenceA :: Applicative f => Const m (f a) -> f ( Const m a) Source #

mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 ( Const m b) Source #

sequence :: Monad m0 => Const m (m0 a) -> m0 ( Const m a) Source #

Traversable f => Traversable ( Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Ap f a -> f0 ( Ap f b) Source #

sequenceA :: Applicative f0 => Ap f (f0 a) -> f0 ( Ap f a) Source #

mapM :: Monad m => (a -> m b) -> Ap f a -> m ( Ap f b) Source #

sequence :: Monad m => Ap f (m a) -> m ( Ap f a) Source #

Traversable f => Traversable ( Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Alt f a -> f0 ( Alt f b) Source #

sequenceA :: Applicative f0 => Alt f (f0 a) -> f0 ( Alt f a) Source #

mapM :: Monad m => (a -> m b) -> Alt f a -> m ( Alt f b) Source #

sequence :: Monad m => Alt f (m a) -> m ( Alt f a) Source #

Traversable f => Traversable ( ExceptT e f)
Instance details

Defined in Control.Monad.Trans.Except

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ExceptT e f a -> f0 ( ExceptT e f b) Source #

sequenceA :: Applicative f0 => ExceptT e f (f0 a) -> f0 ( ExceptT e f a) Source #

mapM :: Monad m => (a -> m b) -> ExceptT e f a -> m ( ExceptT e f b) Source #

sequence :: Monad m => ExceptT e f (m a) -> m ( ExceptT e f a) Source #

Traversable f => Traversable ( WriterT w f)
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

traverse :: Applicative f0 => (a -> f0 b) -> WriterT w f a -> f0 ( WriterT w f b) Source #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 ( WriterT w f a) Source #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m ( WriterT w f b) Source #

sequence :: Monad m => WriterT w f (m a) -> m ( WriterT w f a) Source #

Traversable f => Traversable ( ErrorT e f)
Instance details

Defined in Control.Monad.Trans.Error

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ErrorT e f a -> f0 ( ErrorT e f b) Source #

sequenceA :: Applicative f0 => ErrorT e f (f0 a) -> f0 ( ErrorT e f a) Source #

mapM :: Monad m => (a -> m b) -> ErrorT e f a -> m ( ErrorT e f b) Source #

sequence :: Monad m => ErrorT e f (m a) -> m ( ErrorT e f a) Source #

Traversable f => Traversable ( IdentityT f)
Instance details

Defined in Control.Monad.Trans.Identity

Traversable f => Traversable ( WriterT w f)
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

traverse :: Applicative f0 => (a -> f0 b) -> WriterT w f a -> f0 ( WriterT w f b) Source #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 ( WriterT w f a) Source #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m ( WriterT w f b) Source #

sequence :: Monad m => WriterT w f (m a) -> m ( WriterT w f a) Source #

Traversable ( Tagged s)
Instance details

Defined in Data.Tagged

Traversable ( K1 i c :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> K1 i c a -> f ( K1 i c b) Source #

sequenceA :: Applicative f => K1 i c (f a) -> f ( K1 i c a) Source #

mapM :: Monad m => (a -> m b) -> K1 i c a -> m ( K1 i c b) Source #

sequence :: Monad m => K1 i c (m a) -> m ( K1 i c a) Source #

( Traversable f, Traversable g) => Traversable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) Source #

sequenceA :: Applicative f0 => (f :+: g) (f0 a) -> f0 ((f :+: g) a) Source #

mapM :: Monad m => (a -> m b) -> (f :+: g) a -> m ((f :+: g) b) Source #

sequence :: Monad m => (f :+: g) (m a) -> m ((f :+: g) a) Source #

( Traversable f, Traversable g) => Traversable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) Source #

sequenceA :: Applicative f0 => (f :*: g) (f0 a) -> f0 ((f :*: g) a) Source #

mapM :: Monad m => (a -> m b) -> (f :*: g) a -> m ((f :*: g) b) Source #

sequence :: Monad m => (f :*: g) (m a) -> m ((f :*: g) a) Source #

( Traversable f, Traversable g) => Traversable ( Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Product f g a -> f0 ( Product f g b) Source #

sequenceA :: Applicative f0 => Product f g (f0 a) -> f0 ( Product f g a) Source #

mapM :: Monad m => (a -> m b) -> Product f g a -> m ( Product f g b) Source #

sequence :: Monad m => Product f g (m a) -> m ( Product f g a) Source #

( Traversable f, Traversable g) => Traversable ( Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Sum f g a -> f0 ( Sum f g b) Source #

sequenceA :: Applicative f0 => Sum f g (f0 a) -> f0 ( Sum f g a) Source #

mapM :: Monad m => (a -> m b) -> Sum f g a -> m ( Sum f g b) Source #

sequence :: Monad m => Sum f g (m a) -> m ( Sum f g a) Source #

Traversable f => Traversable ( M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> M1 i c f a -> f0 ( M1 i c f b) Source #

sequenceA :: Applicative f0 => M1 i c f (f0 a) -> f0 ( M1 i c f a) Source #

mapM :: Monad m => (a -> m b) -> M1 i c f a -> m ( M1 i c f b) Source #

sequence :: Monad m => M1 i c f (m a) -> m ( M1 i c f a) Source #

( Traversable f, Traversable g) => Traversable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :.: g) a -> f0 ((f :.: g) b) Source #

sequenceA :: Applicative f0 => (f :.: g) (f0 a) -> f0 ((f :.: g) a) Source #

mapM :: Monad m => (a -> m b) -> (f :.: g) a -> m ((f :.: g) b) Source #

sequence :: Monad m => (f :.: g) (m a) -> m ((f :.: g) a) Source #

( Traversable f, Traversable g) => Traversable ( Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Compose f g a -> f0 ( Compose f g b) Source #

sequenceA :: Applicative f0 => Compose f g (f0 a) -> f0 ( Compose f g a) Source #

mapM :: Monad m => (a -> m b) -> Compose f g a -> m ( Compose f g b) Source #

sequence :: Monad m => Compose f g (m a) -> m ( Compose f g a) Source #

class Semigroup a where Source #

The class of semigroups (types with an associative binary operation).

Instances should satisfy the following:

Associativity
x <> (y <> z) = (x <> y) <> z

Since: base-4.9.0.0

Methods

(<>) :: a -> a -> a infixr 6 Source #

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

Instances

Instances details
Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup ()

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in Data.Void

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup ByteString
Instance details

Defined in Data.ByteString.Internal

Semigroup Builder
Instance details

Defined in Data.ByteString.Builder.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Semigroup Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Semigroup LabelName Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup CoverCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup Cover Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup Journal Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup GroupName Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup PropertyName Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup Style Source #
Instance details

Defined in Hedgehog.Internal.Report

Semigroup Summary Source #
Instance details

Defined in Hedgehog.Internal.Report

Semigroup [a]

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: [a] -> [a] -> [a] Source #

sconcat :: NonEmpty [a] -> [a] Source #

stimes :: Integral b => b -> [a] -> [a] Source #

Semigroup a => Semigroup ( Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup a => Semigroup ( IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Semigroup p => Semigroup ( Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Semigroup a => Semigroup ( Concurrently a)

Only defined by async for base >= 4.9

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async

Semigroup a => Semigroup ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Ord a => Semigroup ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Semigroup ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid m => Semigroup ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Semigroup ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup ( First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Semigroup ( Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Semigroup a => Semigroup ( Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup ( Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Semigroup ( Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Semigroup ( Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup a => Semigroup ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Semigroup ( NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Num a => Semigroup ( Colour a)
Instance details

Defined in Data.Colour.Internal

Num a => Semigroup ( AlphaColour a)

AlphaColour forms a monoid with over and transparent .

Instance details

Defined in Data.Colour.Internal

Semigroup ( IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Semigroup ( Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Ord a => Semigroup ( Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Semigroup ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Semigroup ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Semigroup (MergeSet a)
Instance details

Defined in Data.Set.Internal

Methods

(<>) :: MergeSet a -> MergeSet a -> MergeSet a Source #

sconcat :: NonEmpty (MergeSet a) -> MergeSet a Source #

stimes :: Integral b => b -> MergeSet a -> MergeSet a Source #

Semigroup a => Semigroup ( Coverage a) Source #
Instance details

Defined in Hedgehog.Internal.Property

Semigroup a => Semigroup ( Label a) Source #

This semigroup is right biased. The name, location and percentage from the rightmost Label will be kept. This shouldn't be a problem since the library doesn't allow setting multiple classes with the same ClassifierName .

Instance details

Defined in Hedgehog.Internal.Property

Semigroup a => Semigroup ( Pos a) Source #
Instance details

Defined in Hedgehog.Internal.Discovery

Semigroup b => Semigroup (a -> b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a -> b) -> (a -> b) -> a -> b Source #

sconcat :: NonEmpty (a -> b) -> a -> b Source #

stimes :: Integral b0 => b0 -> (a -> b) -> a -> b Source #

Semigroup ( Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Semigroup ( V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Semigroup ( U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Semigroup a, Semigroup b) => Semigroup (a, b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b) -> (a, b) -> (a, b) Source #

sconcat :: NonEmpty (a, b) -> (a, b) Source #

stimes :: Integral b0 => b0 -> (a, b) -> (a, b) Source #

Semigroup a => Semigroup ( ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Semigroup ( Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Ord k => Semigroup ( Map k v)
Instance details

Defined in Data.Map.Internal

( MonadBaseControl IO m, Semigroup a) => Semigroup ( Concurrently m a)
Instance details

Defined in Control.Concurrent.Async.Lifted

( Monad m, Semigroup a) => Semigroup ( GenT m a) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Semigroup (f p) => Semigroup ( Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

sconcat :: NonEmpty (a, b, c) -> (a, b, c) Source #

stimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) Source #

Semigroup a => Semigroup ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

( Applicative f, Semigroup a) => Semigroup ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Alternative f => Semigroup ( Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Semigroup a => Semigroup ( Tagged s a)
Instance details

Defined in Data.Tagged

Semigroup c => Semigroup ( K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p Source #

stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p Source #

( Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) Source #

stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) Source #

Semigroup (f p) => Semigroup ( M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

sconcat :: NonEmpty ( M1 i c f p) -> M1 i c f p Source #

stimes :: Integral b => b -> M1 i c f p -> M1 i c f p Source #

Semigroup (f (g p)) => Semigroup ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p Source #

stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p Source #

( Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) Source #

stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

class Semigroup a => Monoid a where Source #

The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:

Right identity
x <> mempty = x
Left identity
mempty <> x = x
Associativity
x <> (y <> z) = (x <> y) <> z ( Semigroup law)
Concatenation
mconcat = foldr ( <> ) mempty

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtype s and make those instances of Monoid , e.g. Sum and Product .

NOTE : Semigroup is a superclass of Monoid since base-4.11.0.0 .

Minimal complete definition

mempty

Methods

mempty :: a Source #

Identity of mappend

>>> "Hello world" <> mempty
"Hello world"

mappend :: a -> a -> a Source #

An associative operation

NOTE : This method is redundant and has the default implementation mappend = ( <> ) since base-4.11.0.0 . Should it be implemented manually, since mappend is a synonym for ( <> ), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid .

mconcat :: [a] -> a Source #

Fold a list using the monoid.

For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.

>>> mconcat ["Hello", " ", "Haskell", "!"]
"Hello Haskell!"

Instances

Instances details
Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid ShortByteString
Instance details

Defined in Data.ByteString.Short.Internal

Monoid ByteString
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid ByteString
Instance details

Defined in Data.ByteString.Internal

Monoid Builder
Instance details

Defined in Data.ByteString.Builder.Internal

Monoid IntSet
Instance details

Defined in Data.IntSet.Internal

Monoid Doc
Instance details

Defined in Text.PrettyPrint.HughesPJ

Monoid LabelName Source #
Instance details

Defined in Hedgehog.Internal.Property

Monoid CoverCount Source #
Instance details

Defined in Hedgehog.Internal.Property

Monoid Cover Source #
Instance details

Defined in Hedgehog.Internal.Property

Monoid Journal Source #
Instance details

Defined in Hedgehog.Internal.Property

Monoid Summary Source #
Instance details

Defined in Hedgehog.Internal.Report

Monoid [a]

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: [a] Source #

mappend :: [a] -> [a] -> [a] Source #

mconcat :: [[a]] -> [a] Source #

Semigroup a => Monoid ( Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid : "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S ."

Since 4.11.0 : constraint on inner a value generalised from Monoid to Semigroup .

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid a => Monoid ( IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Monoid p => Monoid ( Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Semigroup a, Monoid a) => Monoid ( Concurrently a)

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async

Monoid a => Monoid ( Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

( Ord a, Bounded a) => Monoid ( Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

( Ord a, Bounded a) => Monoid ( Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid m => Monoid ( WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Monoid ( Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid ( First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Monoid ( Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Monoid a => Monoid ( Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid ( Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Num a => Monoid ( Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Num a => Monoid ( Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Monoid a => Monoid ( Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Num a => Monoid ( Colour a)
Instance details

Defined in Data.Colour.Internal

Num a => Monoid ( AlphaColour a)
Instance details

Defined in Data.Colour.Internal

Monoid ( IntMap a)
Instance details

Defined in Data.IntMap.Internal

Monoid ( Seq a)
Instance details

Defined in Data.Sequence.Internal

Ord a => Monoid ( Set a)
Instance details

Defined in Data.Set.Internal

Monoid ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Monoid ( Doc a)
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Monoid (MergeSet a)
Instance details

Defined in Data.Set.Internal

Methods

mempty :: MergeSet a Source #

mappend :: MergeSet a -> MergeSet a -> MergeSet a Source #

mconcat :: [MergeSet a] -> MergeSet a Source #

( Semigroup a, Monoid a) => Monoid ( Coverage a) Source #
Instance details

Defined in Hedgehog.Internal.Property

Monoid b => Monoid (a -> b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: a -> b Source #

mappend :: (a -> b) -> (a -> b) -> a -> b Source #

mconcat :: [a -> b] -> a -> b Source #

Monoid ( U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Monoid a, Monoid b) => Monoid (a, b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b) Source #

mappend :: (a, b) -> (a, b) -> (a, b) Source #

mconcat :: [(a, b)] -> (a, b) Source #

Monoid a => Monoid ( ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Monoid ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Ord k => Monoid ( Map k v)
Instance details

Defined in Data.Map.Internal

( MonadBaseControl IO m, Semigroup a, Monoid a) => Monoid ( Concurrently m a)
Instance details

Defined in Control.Concurrent.Async.Lifted

( Monad m, Monoid a) => Monoid ( GenT m a) Source #
Instance details

Defined in Hedgehog.Internal.Gen

Monoid (f p) => Monoid ( Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c) Source #

mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

mconcat :: [(a, b, c)] -> (a, b, c) Source #

Monoid a => Monoid ( Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

( Applicative f, Monoid a) => Monoid ( Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Alternative f => Monoid ( Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

( Semigroup a, Monoid a) => Monoid ( Tagged s a)
Instance details

Defined in Data.Tagged

Monoid c => Monoid ( K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

( Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :*: g) p Source #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p Source #

mconcat :: [(f :*: g) p] -> (f :*: g) p Source #

( Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d) Source #

mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

mconcat :: [(a, b, c, d)] -> (a, b, c, d) Source #

Monoid (f p) => Monoid ( M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: M1 i c f p Source #

mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p Source #

mconcat :: [ M1 i c f p] -> M1 i c f p Source #

Monoid (f (g p)) => Monoid ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :.: g) p Source #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p Source #

mconcat :: [(f :.: g) p] -> (f :.: g) p Source #

( Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d, e) Source #

mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) Source #

data Bool Source #

Constructors

False
True

Instances

Instances details
Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Bool
Instance details

Defined in GHC.Classes

Ord Bool
Instance details

Defined in GHC.Classes

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Bool

Since: base-2.1

Instance details

Defined in GHC.Ix

Generic Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type Source #

Bits Bool

Interpret Bool as 1-bit bit-field

Since: base-4.7.0.0

Instance details

Defined in Data.Bits

FiniteBits Bool

Since: base-4.7.0.0

Instance details

Defined in Data.Bits

NFData Bool
Instance details

Defined in Control.DeepSeq

Hashable Bool
Instance details

Defined in Data.Hashable.Class

Random Bool
Instance details

Defined in System.Random

Uniform Bool
Instance details

Defined in System.Random.Internal

UniformRange Bool
Instance details

Defined in System.Random.Internal

Pretty Bool
Instance details

Defined in Text.PrettyPrint.Annotated.WL

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

Lift Bool
Instance details

Defined in Language.Haskell.TH.Syntax

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

type Rep Bool
Instance details

Defined in GHC.Generics

type DemoteRep Bool
Instance details

Defined in GHC.Generics

type DemoteRep Bool = Bool
data Sing (a :: Bool )
Instance details

Defined in GHC.Generics

data Sing (a :: Bool ) where

data Char Source #

The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) code points (i.e. characters, see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character set (the first 128 characters). A character literal in Haskell has type Char .

To convert a Char to or from the corresponding Int value defined by Unicode, use toEnum and fromEnum from the Enum class respectively (or equivalently ord and chr ).

Instances

Instances details
Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Char
Instance details

Defined in GHC.Classes

Ord Char
Instance details

Defined in GHC.Classes

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Char

Since: base-2.1

Instance details

Defined in GHC.Ix

PrintfArg Char

Since: base-2.1

Instance details

Defined in Text.Printf

IsChar Char

Since: base-2.1

Instance details

Defined in Text.Printf

ToRegionContent String
Instance details

Defined in System.Console.Regions

Outputable String
Instance details

Defined in System.Console.Concurrent.Internal

NFData Char
Instance details

Defined in Control.DeepSeq

Hashable Char
Instance details

Defined in Data.Hashable.Class

Random Char
Instance details

Defined in System.Random

Uniform Char
Instance details

Defined in System.Random.Internal

UniformRange Char
Instance details

Defined in System.Random.Internal

ErrorList Char
Instance details

Defined in Control.Monad.Trans.Error

Pretty Char
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Lift Char
Instance details

Defined in Language.Haskell.TH.Syntax

Generic1 ( URec Char :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Char ) :: k -> Type Source #

Foldable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UChar :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Functor ( URec Char :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Char p) :: Type -> Type Source #

data URec Char (p :: k)

Used for marking occurrences of Char#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 ( URec Char :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Char p)
Instance details

Defined in GHC.Generics

data Double Source #

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

Instances

Instances details
Eq Double

Note that due to the presence of NaN , Double 's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Double)
False

Also note that Double 's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Double)
True
>>> recip 0 == recip (-0 :: Double)
False
Instance details

Defined in GHC.Classes

Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

Ord Double

Note that due to the presence of NaN , Double 's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Double)
False

Also note that, due to the same, Ord 's operator interactions are not respected by Double 's instance:

>>> (0/0 :: Double) > 1
False
>>> compare (0/0 :: Double) 1
GT
Instance details

Defined in GHC.Classes

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

PrintfArg Double

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Double
Instance details

Defined in Control.DeepSeq

Erf Double
Instance details

Defined in Data.Number.Erf

InvErf Double
Instance details

Defined in Data.Number.Erf

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

Random Double

Note - random produces values in the closed range [0,1] .

Instance details

Defined in System.Random

UniformRange Double

See Floating point number caveats .

Instance details

Defined in System.Random.Internal

Pretty Double
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Lift Double
Instance details

Defined in Language.Haskell.TH.Syntax

Generic1 ( URec Double :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Double ) :: k -> Type Source #

Foldable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UDouble :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Functor ( URec Double :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Double (p :: k)

Used for marking occurrences of Double#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 ( URec Double :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Double p)
Instance details

Defined in GHC.Generics

data Float Source #

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

Instances

Instances details
Eq Float

Note that due to the presence of NaN , Float 's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Float)
False

Also note that Float 's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Float)
True
>>> recip 0 == recip (-0 :: Float)
False
Instance details

Defined in GHC.Classes

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

Ord Float

Note that due to the presence of NaN , Float 's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Float)
False

Also note that, due to the same, Ord 's operator interactions are not respected by Float 's instance:

>>> (0/0 :: Float) > 1
False
>>> compare (0/0 :: Float) 1
GT
Instance details

Defined in GHC.Classes

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

PrintfArg Float

Since: base-2.1

Instance details

Defined in Text.Printf

NFData Float
Instance details

Defined in Control.DeepSeq

Erf Float
Instance details

Defined in Data.Number.Erf

InvErf Float
Instance details

Defined in Data.Number.Erf

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

Random Float

Note - random produces values in the closed range [0,1] .

Instance details

Defined in System.Random

UniformRange Float

See Floating point number caveats .

Instance details

Defined in System.Random.Internal

Pretty Float
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Lift Float
Instance details

Defined in Language.Haskell.TH.Syntax

Generic1 ( URec Float :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Float ) :: k -> Type Source #

Foldable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UFloat :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Functor ( URec Float :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Float p)
Instance details

Defined in GHC.Generics

Ord ( URec Float p)
Instance details

Defined in GHC.Generics

Show ( URec Float p)
Instance details

Defined in GHC.Generics

Generic ( URec Float p)
Instance details

Defined in GHC.Generics

data URec Float (p :: k)

Used for marking occurrences of Float#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 ( URec Float :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Float p)
Instance details

Defined in GHC.Generics

data Int Source #

A fixed-precision integer type with at least the range [-2^29 .. 2^29-1] . The exact range for a given implementation can be determined by using minBound and maxBound from the Bounded class.

Instances

Instances details
Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Int
Instance details

Defined in GHC.Classes

Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Ord Int
Instance details

Defined in GHC.Classes

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Int

Since: base-2.1

Instance details

Defined in GHC.Ix

PrintfArg Int

Since: base-2.1

Instance details

Defined in Text.Printf

Bits Int

Since: base-2.1

Instance details

Defined in Data.Bits

FiniteBits Int

Since: base-4.6.0.0

Instance details

Defined in Data.Bits

NFData Int
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () Source #

Hashable Int
Instance details

Defined in Data.Hashable.Class

Random Int
Instance details

Defined in System.Random

Uniform Int
Instance details

Defined in System.Random.Internal

UniformRange Int
Instance details

Defined in System.Random.Internal

Pretty Int
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Lift Int
Instance details

Defined in Language.Haskell.TH.Syntax

Generic1 ( URec Int :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Int ) :: k -> Type Source #

Foldable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UInt :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Functor ( URec Int :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Int p) :: Type -> Type Source #

data URec Int (p :: k)

Used for marking occurrences of Int#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 ( URec Int :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Int p)
Instance details

Defined in GHC.Generics

data Integer Source #

Arbitrary precision integers. In contrast with fixed-size integral types such as Int , the Integer type represents the entire infinite range of integers.

For more information about this type's representation, see the comments in its implementation.

Instances

Instances details
Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Integer
Instance details

Defined in GHC.Integer.Type

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Ord Integer
Instance details

Defined in GHC.Integer.Type

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Integer

Since: base-2.1

Instance details

Defined in GHC.Ix

PrintfArg Integer

Since: base-2.1

Instance details

Defined in Text.Printf

Bits Integer

Since: base-2.1

Instance details

Defined in Data.Bits

NFData Integer
Instance details

Defined in Control.DeepSeq

Hashable Integer
Instance details

Defined in Data.Hashable.Class

Random Integer

Note - random generates values in the Int range

Instance details

Defined in System.Random

UniformRange Integer
Instance details

Defined in System.Random.Internal

Pretty Integer
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Pretty Rational
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Lift Integer
Instance details

Defined in Language.Haskell.TH.Syntax

data Maybe a Source #

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a ), or it is empty (represented as Nothing ). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error .

The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing . A richer error monad can be built using the Either type.

Constructors

Nothing
Just a

Instances

Instances details
Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

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 Source #

Ord1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Show1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Read1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

MonadZip Maybe

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Zip

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

MonadThrow Maybe
Instance details

Defined in Control.Monad.Catch

NFData1 Maybe

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Maybe a -> () Source #

Hashable1 Maybe
Instance details

Defined in Data.Hashable.Class

MonadBase Maybe Maybe
Instance details

Defined in Control.Monad.Base

MonadBaseControl Maybe Maybe
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM Maybe a Source #

MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

Lift a => Lift ( Maybe a :: Type )
Instance details

Defined in Language.Haskell.TH.Syntax

Eq a => Eq ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Ord a => Ord ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Read a => Read ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

Show a => Show ( Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Generic ( Maybe a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Maybe a) :: Type -> Type Source #

Semigroup a => Semigroup ( Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup a => Monoid ( Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid : "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S ."

Since 4.11.0 : constraint on inner a value generalised from Monoid to Semigroup .

Since: base-2.1

Instance details

Defined in GHC.Base

NFData a => NFData ( Maybe a)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () Source #

Hashable a => Hashable ( Maybe a)
Instance details

Defined in Data.Hashable.Class

Pretty a => Pretty ( Maybe a)
Instance details

Defined in Text.PrettyPrint.Annotated.WL

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)

Generic1 Maybe

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Maybe :: k -> Type Source #

Methods

from1 :: forall (a :: k). Maybe a -> Rep1 Maybe a Source #

to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a Source #

SingI (' Nothing :: Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ' Nothing

SingI a2 => SingI (' Just a2 :: Maybe a1)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing (' Just a2)

type StM Maybe a
Instance details

Defined in Control.Monad.Trans.Control

type StM Maybe a = a
type Rep ( Maybe a)
Instance details

Defined in GHC.Generics

type DemoteRep ( Maybe a)
Instance details

Defined in GHC.Generics

type DemoteRep ( Maybe a) = Maybe (DemoteRep a)
data Sing (b :: Maybe a)
Instance details

Defined in GHC.Generics

data Sing (b :: Maybe a) where
type Rep1 Maybe
Instance details

Defined in GHC.Generics

data Ordering Source #

Constructors

LT
EQ
GT

Instances

Instances details
Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Ordering
Instance details

Defined in GHC.Classes

Ord Ordering
Instance details

Defined in GHC.Classes

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Ordering

Since: base-2.1

Instance details

Defined in GHC.Ix

Generic Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

NFData Ordering
Instance details

Defined in Control.DeepSeq

Hashable Ordering
Instance details

Defined in Data.Hashable.Class

type Rep Ordering
Instance details

Defined in GHC.Generics

type Rational = Ratio Integer Source #

Arbitrary-precision rational numbers, represented as a ratio of two Integer values. A rational number may be constructed using the % operator.

data IO a Source #

A value of type IO a is a computation which, when performed, does some I/O before returning a value of type a .

There is really only one way to "perform" an I/O action: bind it to Main.main in your program. When your program is run, the I/O will be performed. It isn't possible to perform I/O from an arbitrary function, unless that function is itself in the IO monad and called at some point, directly or indirectly, from Main.main .

IO is a monad, so IO actions can be combined using either the do-notation or the >> and >>= operations from the Monad class.

Instances

Instances details
Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> IO a -> IO b Source #

(<$) :: a -> IO b -> IO a Source #

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Alternative IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

MonadPlus IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

MonadMask IO
Instance details

Defined in Control.Monad.Catch

Methods

mask :: (( forall a. IO a -> IO a) -> IO b) -> IO b Source #

uninterruptibleMask :: (( forall a. IO a -> IO a) -> IO b) -> IO b Source #

generalBracket :: IO a -> (a -> ExitCase b -> IO c) -> (a -> IO b) -> IO (b, c) Source #

MonadCatch IO
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => IO a -> (e -> IO a) -> IO a Source #

MonadThrow IO
Instance details

Defined in Control.Monad.Catch

LiftRegion IO
Instance details

Defined in System.Console.Regions

PrimMonad IO
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState IO Source #

PrimBase IO
Instance details

Defined in Control.Monad.Primitive

Quasi IO
Instance details

Defined in Language.Haskell.TH.Syntax

MonadBase IO IO
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: IO α -> IO α Source #

MonadBaseControl IO IO
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM IO a Source #

MonadError IOException IO
Instance details

Defined in Control.Monad.Error.Class

Semigroup a => Semigroup ( IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Monoid a => Monoid ( IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

a ~ () => PrintfType ( IO a)

Since: base-4.7.0.0

Instance details

Defined in Text.Printf

Methods

spr :: String -> [UPrintf] -> 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

type PrimState IO
Instance details

Defined in Control.Monad.Primitive

type StM IO a
Instance details

Defined in Control.Monad.Trans.Control

type StM IO a = a

data Word Source #

A Word is an unsigned integral type, with the same size as Int .

Instances

Instances details
Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Word
Instance details

Defined in GHC.Classes

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Ord Word
Instance details

Defined in GHC.Classes

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Word

Since: base-4.6.0.0

Instance details

Defined in GHC.Ix

PrintfArg Word

Since: base-2.1

Instance details

Defined in Text.Printf

Bits Word

Since: base-2.1

Instance details

Defined in Data.Bits

FiniteBits Word

Since: base-4.6.0.0

Instance details

Defined in Data.Bits

NFData Word
Instance details

Defined in Control.DeepSeq

Hashable Word
Instance details

Defined in Data.Hashable.Class

Random Word
Instance details

Defined in System.Random

Uniform Word
Instance details

Defined in System.Random.Internal

UniformRange Word
Instance details

Defined in System.Random.Internal

Pretty Word
Instance details

Defined in Text.PrettyPrint.Annotated.WL

Lift Word
Instance details

Defined in Language.Haskell.TH.Syntax

Generic1 ( URec Word :: k -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( URec Word ) :: k -> Type Source #

Foldable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Traversable ( UWord :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Functor ( URec Word :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Generic ( URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( URec Word p) :: Type -> Type Source #

data URec Word (p :: k)

Used for marking occurrences of Word#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 ( URec Word :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep ( URec Word p)
Instance details

Defined in GHC.Generics

data Either a b Source #

The Either type represents values with two possibilities: a value of type Either a b is either Left a or Right b .

The Either type is sometimes used to represent a value which is either correct or an error; by convention, the Left constructor is used to hold an error value and the Right constructor is used to hold a correct value (mnemonic: "right" also means "correct").

Examples

Expand

The type Either String Int is the type of values which can be either a String or an Int . The Left constructor can be used only on String s, and the Right constructor can be used only on Int s:

>>> let s = Left "foo" :: Either String Int
>>> s
Left "foo"
>>> let n = Right 3 :: Either String Int
>>> n
Right 3
>>> :type s
s :: Either String Int
>>> :type n
n :: Either String Int

The fmap from our Functor instance will ignore Left values, but will apply the supplied function to values contained in a Right :

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> fmap (*2) s
Left "foo"
>>> fmap (*2) n
Right 6

The Monad instance for Either allows us to chain together multiple actions which may fail, and fail overall if any of the individual steps failed. First we'll write a function that can either parse an Int from a Char , or fail.

>>> import Data.Char ( digitToInt, isDigit )
>>> :{
    let parseEither :: Char -> Either String Int
        parseEither c
          | isDigit c = Right (digitToInt c)
          | otherwise = Left "parse error"
>>> :}

The following should work, since both '1' and '2' can be parsed as Int s.

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither '1'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Right 3

But the following should fail overall, since the first operation where we attempt to parse 'm' as an Int will fail:

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither 'm'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Left "parse error"

Constructors

Left a
Right b

Instances

Instances details
Bifunctor Either

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

first :: (a -> b) -> Either a c -> Either b c Source #

second :: (b -> c) -> Either a b -> Either a c Source #

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 Source #

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 Source #

Read2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

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 Source #

liftShowList2 :: ( Int -> a -> ShowS ) -> ([a] -> ShowS ) -> ( Int -> b -> ShowS ) -> ([b] -> ShowS ) -> [ Either a b] -> ShowS Source #

NFData2 Either

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Either a b -> () Source #

Hashable2 Either
Instance details

Defined in Data.Hashable.Class

MonadError e ( Either e)
Instance details

Defined in Control.Monad.Error.Class

( Lift a, Lift b) => Lift ( Either a b :: Type )
Instance details

Defined in Language.Haskell.TH.Syntax

Monad ( Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Functor ( Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b Source #

(<$) :: a0 -> Either a b -> Either a a0 Source #

Applicative ( Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Foldable ( Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 Source #

toList :: Either a a0 -> [a0] Source #

null :: Either a a0 -> Bool Source #

length :: Either a a0 -> Int Source #

elem :: Eq a0 => a0 -> Either a a0 -> Bool Source #

maximum :: Ord a0 => Either a a0 -> a0 Source #

minimum :: Ord a0 => Either a a0 -> a0 Source #

sum :: Num a0 => Either a a0 -> a0 Source #

product :: Num a0 => Either a a0 -> a0 Source #

Traversable ( Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f ( Either a b) Source #

sequenceA :: Applicative f => Either a (f a0) -> f ( Either a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m ( Either a b) Source #

sequence :: Monad m => Either a (m a0) -> m ( Either a a0) Source #

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 Source #

Ord a => Ord1 ( Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Show a => Show1 ( Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Read a => Read1 ( Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

e ~ SomeException => MonadMask ( Either e)

Since: exceptions-0.8.3

Instance details

Defined in Control.Monad.Catch

Methods

mask :: (( forall a. Either e a -> Either e a) -> Either e b) -> Either e b Source #

uninterruptibleMask :: (( forall a. Either e a -> Either e a) -> Either e b) -> Either e b Source #

generalBracket :: Either e a -> (a -> ExitCase b -> Either e c) -> (a -> Either e b) -> Either e (b, c) Source #

e ~ SomeException => MonadCatch ( Either e)

Since: exceptions-0.8.3

Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e0 => Either e a -> (e0 -> Either e a) -> Either e a Source #

e ~ SomeException => MonadThrow ( Either e)
Instance details

Defined in Control.Monad.Catch

NFData a => NFData1 ( Either a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Either a a0 -> () Source #

Hashable a => Hashable1 ( Either a)
Instance details

Defined in Data.Hashable.Class

Generic1 ( Either a :: Type -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 ( Either a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k). Either a a0 -> Rep1 ( Either a) a0 Source #

to1 :: forall (a0 :: k). Rep1 ( Either a) a0 -> Either a a0 Source #

MonadBase ( Either e) ( Either e)
Instance details

Defined in Control.Monad.Base

MonadBaseControl ( Either e) ( Either e)
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM ( Either e) a Source #

( Eq a, Eq b) => Eq ( Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

( Ord a, Ord b) => Ord ( Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

( Read a, Read b) => Read ( Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

( Show a, Show b) => Show ( Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

Generic ( Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Either a b) :: Type -> Type Source #

Semigroup ( Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

( NFData a, NFData b) => NFData ( Either a b)
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Either a b -> () Source #

( Hashable a, Hashable b) => Hashable ( Either a b)
Instance details

Defined in Data.Hashable.Class

type StM ( Either e) a
Instance details

Defined in Control.Monad.Trans.Control

type StM ( Either e) a = a
type Rep1 ( Either a :: Type -> Type )
Instance details

Defined in GHC.Generics

type Rep ( Either a b)
Instance details

Defined in GHC.Generics

type String = [ Char ] Source #

A String is a list of characters. String constants in Haskell are values of type String .

See Data.List for operations on lists.

mapM_ :: ( Foldable t, Monad m) => (a -> m b) -> t a -> m () Source #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM .

As of base 4.8.0.0, mapM_ is just traverse_ , specialized to Monad .

unzip :: [(a, b)] -> ([a], [b]) Source #

unzip transforms a list of pairs into a list of first components and a list of second components.

id :: a -> a Source #

Identity function.

id x = x

uncurry :: (a -> b -> c) -> (a, b) -> c Source #

uncurry converts a curried function to a function on pairs.

Examples

Expand
>>> uncurry (+) (1,2)
3
>>> uncurry ($) (show, 1)
"1"
>>> map (uncurry max) [(1,2), (3,4), (6,8)]
[2,4,8]

readIO :: Read a => String -> IO a Source #

The readIO function is similar to read except that it signals parse failure to the IO monad instead of terminating the program.

appendFile :: FilePath -> String -> IO () Source #

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]])

writeFile :: FilePath -> String -> IO () Source #

The computation writeFile file str function writes the string str , to the file file .

readFile :: FilePath -> IO String Source #

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 .

interact :: ( String -> String ) -> IO () Source #

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.

getContents :: IO String Source #

The getContents operation returns all user input as a single string, which is read lazily as it is needed (same as hGetContents stdin ).

getLine :: IO String Source #

Read a line from the standard input device (same as hGetLine stdin ).

getChar :: IO Char Source #

Read a character from the standard input device (same as hGetChar stdin ).

putStrLn :: String -> IO () Source #

The same as putStr , but adds a newline character.

putStr :: String -> IO () Source #

Write a string to the standard output device (same as hPutStr stdout ).

putChar :: Char -> IO () Source #

Write a character to the standard output device (same as hPutChar stdout ).

type FilePath = String Source #

File and directory names are values of type String , whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.

userError :: String -> IOError Source #

Construct an IOError 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)

type IOError = IOException Source #

The Haskell 2010 type for exceptions in the IO monad. Any I/O operation may raise an IOError 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.

notElem :: ( Foldable t, Eq a) => a -> t a -> Bool infix 4 Source #

notElem is the negation of elem .

all :: Foldable t => (a -> Bool ) -> t a -> Bool Source #

Determines whether all elements of the structure satisfy the predicate.

any :: Foldable t => (a -> Bool ) -> t a -> Bool Source #

Determines whether any element of the structure satisfies the predicate.

or :: Foldable t => t Bool -> Bool Source #

or returns the disjunction of a container of Bools. For the result to be False , the container must be finite; True , however, results from a True value finitely far from the left end.

and :: Foldable t => t Bool -> Bool Source #

and returns the conjunction of a container of Bools. For the result to be True , the container must be finite; False , however, results from a False value finitely far from the left end.

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] Source #

Map a function over all the elements of a container and concatenate the resulting lists.

concat :: Foldable t => t [a] -> [a] Source #

The concatenation of all the elements of a container of lists.

sequence_ :: ( Foldable t, Monad m) => t (m a) -> m () Source #

Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence .

As of base 4.8.0.0, sequence_ is just sequenceA_ , specialized to Monad .

unwords :: [ String ] -> String Source #

unwords is an inverse operation to words . It joins words with separating spaces.

>>> unwords ["Lorem", "ipsum", "dolor"]
"Lorem ipsum dolor"

words :: String -> [ String ] Source #

words breaks a string up into a list of words, which were delimited by white space.

>>> words "Lorem ipsum\ndolor"
["Lorem","ipsum","dolor"]

unlines :: [ String ] -> String Source #

unlines is an inverse operation to lines . It joins lines, after appending a terminating newline to each.

>>> unlines ["Hello", "World", "!"]
"Hello\nWorld\n!\n"

lines :: String -> [ String ] Source #

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 .

read :: Read a => String -> a Source #

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

reads :: Read a => ReadS a Source #

equivalent to readsPrec with a precedence of 0.

either :: (a -> c) -> (b -> c) -> Either a b -> c Source #

Case analysis for the Either type. If the value is Left a , apply the first function to a ; if it is Right b , apply the second function to b .

Examples

Expand

We create two values of type Either String Int , one using the Left constructor and another using the Right constructor. Then we apply "either" the length function (if we have a String ) or the "times-two" function (if we have an Int ):

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> either length (*2) s
3
>>> either length (*2) n
6

lex :: ReadS String Source #

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

readParen :: Bool -> ReadS a -> ReadS a Source #

readParen True p parses what p parses, but surrounded with parentheses.

readParen False p parses what p parses, but optionally surrounded with parentheses.

type ReadS a = String -> [(a, String )] Source #

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 ).

lcm :: Integral a => a -> a -> a Source #

lcm x y is the smallest positive integer that both x and y divide.

gcd :: Integral a => a -> a -> a Source #

gcd x y is the non-negative factor of both x and y of which every common factor of x and y is also a factor; for example gcd 4 2 = 2 , gcd (-4) 6 = 2 , gcd 0 4 = 4 . gcd 0 0 = 0 . (That is, the common divisor that is "greatest" in the divisibility preordering.)

Note: Since for signed fixed-width integer types, abs minBound < 0 , the result may be negative if one of the arguments is minBound (and necessarily is if the other is 0 or minBound ) for such types.

(^^) :: ( Fractional a, Integral b) => a -> b -> a infixr 8 Source #

raise a number to an integral power

(^) :: ( Num a, Integral b) => a -> b -> a infixr 8 Source #

raise a number to a non-negative integral power

showParen :: Bool -> ShowS -> ShowS Source #

utility function that surrounds the inner show function with parentheses when the Bool parameter is True .

showString :: String -> ShowS Source #

utility function converting a String to a show function that simply prepends the string unchanged.

showChar :: Char -> ShowS Source #

utility function converting a Char to a show function that simply prepends the character unchanged.

shows :: Show a => a -> ShowS Source #

equivalent to showsPrec with a precedence of 0.

type ShowS = String -> String Source #

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.

unzip3 :: [(a, b, c)] -> ([a], [b], [c]) Source #

The unzip3 function takes a list of triples and returns three lists, analogous to unzip .

zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] Source #

The zipWith3 function takes a function which combines three elements, as well as three 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.

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] Source #

\(\mathcal{O}(\min(m,n))\) . zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function. For example, zipWith (+) is applied to two lists to produce the list of corresponding sums:

>>> zipWith (+) [1, 2, 3] [4, 5, 6]
[5,7,9]

zipWith is right-lazy:

zipWith f [] _|_ = []

zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] Source #

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.

(!!) :: [a] -> Int -> a infixl 9 Source #

List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex , which takes an index of any integral type.

lookup :: Eq a => a -> [(a, b)] -> Maybe b Source #

\(\mathcal{O}(n)\) . lookup key assocs looks up a key in an association list.

>>> lookup 2 [(1, "first"), (2, "second"), (3, "third")]
Just "second"

reverse :: [a] -> [a] Source #

reverse xs returns the elements of xs in reverse order. xs must be finite.

break :: (a -> Bool ) -> [a] -> ([a], [a]) Source #

break , applied to a predicate p and a list xs , returns a tuple where first element is longest prefix (possibly empty) of xs of elements that do not satisfy p and second element is the remainder of the list:

break (> 3) [1,2,3,4,1,2,3,4] == ([1,2,3],[4,1,2,3,4])
break (< 9) [1,2,3] == ([],[1,2,3])
break (> 9) [1,2,3] == ([1,2,3],[])

break p is equivalent to span ( not . p) .

span :: (a -> Bool ) -> [a] -> ([a], [a]) Source #

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)

splitAt :: Int -> [a] -> ([a], [a]) Source #

splitAt n xs returns a tuple where first element is xs prefix of length n and second element is the remainder of the list:

splitAt 6 "Hello World!" == ("Hello ","World!")
splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5])
splitAt 1 [1,2,3] == ([1],[2,3])
splitAt 3 [1,2,3] == ([1,2,3],[])
splitAt 4 [1,2,3] == ([1,2,3],[])
splitAt 0 [1,2,3] == ([],[1,2,3])
splitAt (-1) [1,2,3] == ([],[1,2,3])

It is equivalent to ( take n xs, drop n xs) when n is not _|_ ( splitAt _|_ xs = _|_ ). splitAt is an instance of the more general genericSplitAt , in which n may be of any integral type.

drop :: Int -> [a] -> [a] Source #

drop n xs returns the suffix of xs after the first n elements, or [] if n > length xs :

drop 6 "Hello World!" == "World!"
drop 3 [1,2,3,4,5] == [4,5]
drop 3 [1,2] == []
drop 3 [] == []
drop (-1) [1,2] == [1,2]
drop 0 [1,2] == [1,2]

It is an instance of the more general genericDrop , in which n may be of any integral type.

take :: Int -> [a] -> [a] Source #

take n , applied to a list xs , returns the prefix of xs of length n , or xs itself if n > length xs :

take 5 "Hello World!" == "Hello"
take 3 [1,2,3,4,5] == [1,2,3]
take 3 [1,2] == [1,2]
take 3 [] == []
take (-1) [1,2] == []
take 0 [1,2] == []

It is an instance of the more general genericTake , in which n may be of any integral type.

dropWhile :: (a -> Bool ) -> [a] -> [a] Source #

dropWhile p xs returns the suffix remaining after takeWhile p xs :

dropWhile (< 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3]
dropWhile (< 9) [1,2,3] == []
dropWhile (< 0) [1,2,3] == [1,2,3]

takeWhile :: (a -> Bool ) -> [a] -> [a] Source #

takeWhile , applied to a predicate p and a list xs , returns the longest prefix (possibly empty) of xs of elements that satisfy p :

takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2]
takeWhile (< 9) [1,2,3] == [1,2,3]
takeWhile (< 0) [1,2,3] == []

cycle :: [a] -> [a] Source #

cycle ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.

replicate :: Int -> a -> [a] Source #

replicate n x is a list of length n with x the value of every element. It is an instance of the more general genericReplicate , in which n may be of any integral type.

repeat :: a -> [a] Source #

repeat x is an infinite list, with x the value of every element.

iterate :: (a -> a) -> a -> [a] Source #

iterate f x returns an infinite list of repeated applications of f to x :

iterate f x == [x, f x, f (f x), ...]

Note that iterate is lazy, potentially leading to thunk build-up if the consumer doesn't force each iterate. See iterate' for a strict variant of this function.

scanr1 :: (a -> a -> a) -> [a] -> [a] Source #

\(\mathcal{O}(n)\) . scanr1 is a variant of scanr that has no starting value argument.

scanr :: (a -> b -> b) -> b -> [a] -> [b] Source #

\(\mathcal{O}(n)\) . scanr is the right-to-left dual of scanl . Note that

head (scanr f z xs) == foldr f z xs.

scanl1 :: (a -> a -> a) -> [a] -> [a] Source #

\(\mathcal{O}(n)\) . scanl1 is a variant of scanl that has no starting value argument:

scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]

scanl :: (b -> a -> b) -> b -> [a] -> [b] Source #

\(\mathcal{O}(n)\) . scanl is similar to foldl , but returns a list of successive reduced values from the left:

scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]

Note that

last (scanl f z xs) == foldl f z xs.

init :: [a] -> [a] Source #

\(\mathcal{O}(n)\) . Return all the elements of a list except the last one. The list must be non-empty.

last :: [a] -> a Source #

\(\mathcal{O}(n)\) . Extract the last element of a list, which must be finite and non-empty.

tail :: [a] -> [a] Source #

\(\mathcal{O}(1)\) . Extract the elements after the head of a list, which must be non-empty.

head :: [a] -> a Source #

\(\mathcal{O}(1)\) . Extract the first element of a list, which must be non-empty.

maybe :: b -> (a -> b) -> Maybe a -> b Source #

The maybe function takes a default value, a function, and a Maybe value. If the Maybe value is Nothing , the function returns the default value. Otherwise, it applies the function to the value inside the Just and returns the result.

Examples

Expand

Basic usage:

>>> maybe False odd (Just 3)
True
>>> maybe False odd Nothing
False

Read an integer from a string using readMaybe . If we succeed, return twice the integer; that is, apply (*2) to it. If instead we fail to parse an integer, return 0 by default:

>>> import Text.Read ( readMaybe )
>>> maybe 0 (*2) (readMaybe "5")
10
>>> maybe 0 (*2) (readMaybe "")
0

Apply show to a Maybe Int . If we have Just n , we want to show the underlying Int n . But if we have Nothing , we return the empty string instead of (for example) "Nothing":

>>> maybe "" show (Just 5)
"5"
>>> maybe "" show Nothing
""

(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 Source #

An infix synonym for fmap .

The name of this operator is an allusion to $ . Note the similarities between their types:

 ($)  ::              (a -> b) ->   a ->   b
(<$>) :: Functor f => (a -> b) -> f a -> f b

Whereas $ is function application, <$> is function application lifted over a Functor .

Examples

Expand

Convert from a Maybe Int to a Maybe String using show :

>>> show <$> Nothing
Nothing
>>> show <$> Just 3
Just "3"

Convert from an Either Int Int to an Either Int String using show :

>>> show <$> Left 17
Left 17
>>> show <$> Right 17
Right "17"

Double each element of a list:

>>> (*2) <$> [1,2,3]
[2,4,6]

Apply even to the second element of a pair:

>>> even <$> (2,2)
(2,True)

curry :: ((a, b) -> c) -> a -> b -> c Source #

curry converts an uncurried function to a curried function.

Examples

Expand
>>> curry fst 1 2
1

subtract :: Num a => a -> a -> a Source #

the same as flip ( - ) .

Because - is treated specially in the Haskell grammar, (- e ) is not a section, but an application of prefix negation. However, ( subtract exp ) is equivalent to the disallowed section.

asTypeOf :: a -> a -> a Source #

asTypeOf is a type-restricted version of const . It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the second.

until :: (a -> Bool ) -> (a -> a) -> a -> a Source #

until p f yields the result of applying f until p holds.

($!) :: forall (r :: RuntimeRep ) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 Source #

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.

flip :: (a -> b -> c) -> b -> a -> c Source #

flip f takes its (first) two arguments in the reverse order of f .

>>> flip (++) "hello" "world"
"worldhello"

(.) :: (b -> c) -> (a -> b) -> a -> c infixr 9 Source #

Function composition.

const :: a -> b -> a Source #

const x is a unary function which evaluates to x for all inputs.

>>> const 42 "hello"
42
>>> map (const 42) [0..3]
[42,42,42,42]

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 Source #

Same as >>= , but with the arguments interchanged.

undefined :: forall (r :: RuntimeRep ) (a :: TYPE r). HasCallStack => a Source #

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 Source #

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 Source #

error stops execution and displays an error message.

(&&) :: Bool -> Bool -> Bool infixr 3 Source #

Boolean "and", lazy in the second argument

(||) :: Bool -> Bool -> Bool infixr 2 Source #

Boolean "or", lazy in the second argument