hydra-prelude-0.16.0: Custom Hydra Prelude used across other Hydra packages.
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Prelude

Synopsis

Documentation

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
Arbitrary Int 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int #

shrink :: Int -> [Int] #

CoArbitrary Int 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Int -> Gen b -> Gen b

FromJSON Int 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int #

parseJSONList :: Value -> Parser [Int] #

omittedField :: Maybe Int #

FromJSONKey Int 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Int

fromJSONKeyList :: FromJSONKeyFunction [Int]

ToJSON Int 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int -> Value #

toEncoding :: Int -> Encoding #

toJSONList :: [Int] -> Value #

toEncodingList :: [Int] -> Encoding #

omitField :: Int -> Bool #

ToJSONKey Int 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Int

toJSONKeyList :: ToJSONKeyFunction [Int]

Bits Int

Since: base-2.1

Instance details

Defined in GHC.Bits

FiniteBits Int

Since: base-4.6.0.0

Instance details

Defined in GHC.Bits

Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

quot :: Int -> Int -> Int Source #

rem :: Int -> Int -> Int Source #

div :: Int -> Int -> Int Source #

mod :: Int -> Int -> Int Source #

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

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

toInteger :: Int -> Integer Source #

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

FromCBOR Int 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Int #

label :: Proxy Int -> Text #

ToCBOR Int 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Int -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Int -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Int] -> Size #

NFData Int 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () Source #

Eq Int 
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Int 
Instance details

Defined in GHC.Classes

Methods

compare :: Int -> Int -> Ordering Source #

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

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

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

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

max :: Int -> Int -> Int Source #

min :: Int -> Int -> Int Source #

Hashable Int 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int -> Int #

hash :: Int -> Int

Uniform Int 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int

UniformRange Int 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int, Int) -> g -> m Int

ByteSource Int 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Int g -> Int -> g

Unbox Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int -> Code m Int Source #

Vector Vector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Int -> ST s (Vector Int)

basicUnsafeThaw :: Vector Int -> ST s (Mutable Vector s Int)

basicLength :: Vector Int -> Int

basicUnsafeSlice :: Int -> Int -> Vector Int -> Vector Int

basicUnsafeIndexM :: Vector Int -> Int -> Box Int

basicUnsafeCopy :: Mutable Vector s Int -> Vector Int -> ST s ()

elemseq :: Vector Int -> Int -> b -> b

MVector MVector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Int -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Int -> MVector s Int

basicOverlaps :: MVector s Int -> MVector s Int -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Int)

basicInitialize :: MVector s Int -> ST s ()

basicUnsafeReplicate :: Int -> Int -> ST s (MVector s Int)

basicUnsafeRead :: MVector s Int -> Int -> ST s Int

basicUnsafeWrite :: MVector s Int -> Int -> Int -> ST s ()

basicClear :: MVector s Int -> ST s ()

basicSet :: MVector s Int -> Int -> ST s ()

basicUnsafeCopy :: MVector s Int -> MVector s Int -> ST s ()

basicUnsafeMove :: MVector s Int -> MVector s Int -> ST s ()

basicUnsafeGrow :: MVector s Int -> Int -> ST s (MVector s Int)

y ~ 'Just 0 => BaseCaseSearch Int z y e 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearch :: prox y -> proxy '(z, e) -> IfM y Gen Proxy Int

Generic1 (URec Int :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Int) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Int a -> Rep1 (URec Int) a Source #

to1 :: forall (a :: k0). Rep1 (URec Int) a -> URec Int a Source #

Foldable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UInt m -> m Source #

foldMap :: Monoid m => (a -> m) -> UInt a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UInt a -> m Source #

foldr :: (a -> b -> b) -> b -> UInt a -> b Source #

foldr' :: (a -> b -> b) -> b -> UInt a -> b Source #

foldl :: (b -> a -> b) -> b -> UInt a -> b Source #

foldl' :: (b -> a -> b) -> b -> UInt a -> b Source #

foldr1 :: (a -> a -> a) -> UInt a -> a Source #

foldl1 :: (a -> a -> a) -> UInt a -> a Source #

toList :: UInt a -> [a] Source #

null :: UInt a -> Bool Source #

length :: UInt a -> Int Source #

elem :: Eq a => a -> UInt a -> Bool Source #

maximum :: Ord a => UInt a -> a Source #

minimum :: Ord a => UInt a -> a Source #

sum :: Num a => UInt a -> a Source #

product :: Num a => UInt a -> a Source #

Traversable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) Source #

sequenceA :: Applicative f => UInt (f a) -> f (UInt a) Source #

mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) Source #

sequence :: Monad m => UInt (m a) -> m (UInt a) Source #

Functor (URec Int :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Generic (URec Int p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type Source #

Methods

from :: URec Int p -> Rep (URec Int p) x Source #

to :: Rep (URec Int p) x -> URec Int p Source #

Show (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

WeightBuilder a => WeightBuilder' (a, Int, r) 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

(%) :: forall (c :: Symbol). c ~ First' (a, Int, r) => W c -> Prec' (a, Int, r) -> (a, Int, r)

Eq (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Int p -> URec Int p -> Bool Source #

(/=) :: URec Int p -> URec Int p -> Bool Source #

Ord (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Int p -> URec Int p -> Ordering Source #

(<) :: URec Int p -> URec Int p -> Bool Source #

(<=) :: URec Int p -> URec Int p -> Bool Source #

(>) :: URec Int p -> URec Int p -> Bool Source #

(>=) :: URec Int p -> URec Int p -> Bool Source #

max :: URec Int p -> URec Int p -> URec Int p Source #

min :: URec Int p -> URec Int p -> URec Int p Source #

newtype Vector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int = V_Int (Vector Int)
data URec Int (p :: k)

Used for marking occurrences of Int#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Int (p :: k) = UInt {}
type ByteSink Int g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Int g = Takes4Bytes g
newtype MVector s Int 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int = MV_Int (MVector s Int)
type Rep1 (URec Int :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Int :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: k -> Type)))
type Rep (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Int p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: Type -> Type)))

data Float Source #

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

Constructors

F# Float# 

Instances

Instances details
Arbitrary Float 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Float #

shrink :: Float -> [Float] #

CoArbitrary Float 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Float -> Gen b -> Gen b

FromJSON Float 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Float #

parseJSONList :: Value -> Parser [Float] #

omittedField :: Maybe Float #

FromJSONKey Float 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Float

fromJSONKeyList :: FromJSONKeyFunction [Float]

ToJSON Float 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Float -> Value #

toEncoding :: Float -> Encoding #

toJSONList :: [Float] -> Value #

toEncodingList :: [Float] -> Encoding #

omitField :: Float -> Bool #

ToJSONKey Float 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Float

toJSONKeyList :: ToJSONKeyFunction [Float]

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

FromCBOR Float 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Float #

label :: Proxy Float -> Text #

ToCBOR Float 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Float -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Float -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Float] -> Size #

NFData Float 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Float -> () Source #

Eq Float

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

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Hashable Float 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Float -> Int #

hash :: Float -> Int

UniformRange Float 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Float, Float) -> g -> m Float

Unbox Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Float 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Float -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Float -> Code m Float Source #

Vector Vector Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Float -> ST s (Vector Float)

basicUnsafeThaw :: Vector Float -> ST s (Mutable Vector s Float)

basicLength :: Vector Float -> Int

basicUnsafeSlice :: Int -> Int -> Vector Float -> Vector Float

basicUnsafeIndexM :: Vector Float -> Int -> Box Float

basicUnsafeCopy :: Mutable Vector s Float -> Vector Float -> ST s ()

elemseq :: Vector Float -> Float -> b -> b

MVector MVector Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Float -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Float -> MVector s Float

basicOverlaps :: MVector s Float -> MVector s Float -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Float)

basicInitialize :: MVector s Float -> ST s ()

basicUnsafeReplicate :: Int -> Float -> ST s (MVector s Float)

basicUnsafeRead :: MVector s Float -> Int -> ST s Float

basicUnsafeWrite :: MVector s Float -> Int -> Float -> ST s ()

basicClear :: MVector s Float -> ST s ()

basicSet :: MVector s Float -> Float -> ST s ()

basicUnsafeCopy :: MVector s Float -> MVector s Float -> ST s ()

basicUnsafeMove :: MVector s Float -> MVector s Float -> ST s ()

basicUnsafeGrow :: MVector s Float -> Int -> ST s (MVector s Float)

y ~ 'Just 0 => BaseCaseSearch Float z y e 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearch :: prox y -> proxy '(z, e) -> IfM y Gen Proxy Float

Generic1 (URec Float :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Float) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Float a -> Rep1 (URec Float) a Source #

to1 :: forall (a :: k0). Rep1 (URec Float) a -> URec Float a Source #

Foldable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UFloat m -> m Source #

foldMap :: Monoid m => (a -> m) -> UFloat a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UFloat a -> m Source #

foldr :: (a -> b -> b) -> b -> UFloat a -> b Source #

foldr' :: (a -> b -> b) -> b -> UFloat a -> b Source #

foldl :: (b -> a -> b) -> b -> UFloat a -> b Source #

foldl' :: (b -> a -> b) -> b -> UFloat a -> b Source #

foldr1 :: (a -> a -> a) -> UFloat a -> a Source #

foldl1 :: (a -> a -> a) -> UFloat a -> a Source #

toList :: UFloat a -> [a] Source #

null :: UFloat a -> Bool Source #

length :: UFloat a -> Int Source #

elem :: Eq a => a -> UFloat a -> Bool Source #

maximum :: Ord a => UFloat a -> a Source #

minimum :: Ord a => UFloat a -> a Source #

sum :: Num a => UFloat a -> a Source #

product :: Num a => UFloat a -> a Source #

Traversable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) Source #

sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) Source #

mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) Source #

sequence :: Monad m => UFloat (m a) -> m (UFloat a) Source #

Functor (URec Float :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type Source #

Methods

from :: URec Float p -> Rep (URec Float p) x Source #

to :: Rep (URec Float p) x -> URec Float p Source #

Show (URec Float p) 
Instance details

Defined in GHC.Generics

Eq (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

(==) :: URec Float p -> URec Float p -> Bool Source #

(/=) :: URec Float p -> URec Float p -> Bool Source #

Ord (URec Float p) 
Instance details

Defined in GHC.Generics

type ForeignFloating Float 
Instance details

Defined in Data.Double.Conversion.Internal.FFI

type ForeignFloating Float = CFloat
newtype Vector Float 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Float = V_Float (Vector Float)
data URec Float (p :: k)

Used for marking occurrences of Float#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Float (p :: k) = UFloat {}
newtype MVector s Float 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Float = MV_Float (MVector s Float)
type Rep1 (URec Float :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Float :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: k -> Type)))
type Rep (URec Float p) 
Instance details

Defined in GHC.Generics

type Rep (URec Float p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: Type -> Type)))

data 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
Arbitrary Char 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Char #

shrink :: Char -> [Char] #

CoArbitrary Char 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Char -> Gen b -> Gen b

FromJSON Char 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Char #

parseJSONList :: Value -> Parser [Char] #

omittedField :: Maybe Char #

FromJSONKey Char 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Char

fromJSONKeyList :: FromJSONKeyFunction [Char]

ToJSON Char 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Char -> Value #

toEncoding :: Char -> Encoding #

toJSONList :: [Char] -> Value #

toEncodingList :: [Char] -> Encoding #

omitField :: Char -> Bool #

ToJSONKey Char 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Char

toJSONKeyList :: ToJSONKeyFunction [Char]

Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

NFData Char 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Char -> () Source #

Eq Char 
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Char 
Instance details

Defined in GHC.Classes

Hashable Char 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Char -> Int #

hash :: Char -> Int

Uniform Char 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Char

UniformRange Char 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Char, Char) -> g -> m Char

ToLText String 
Instance details

Defined in Relude.String.Conversion

Methods

toLText :: String -> LText #

ToString String 
Instance details

Defined in Relude.String.Conversion

Methods

toString :: String -> String #

ToText String 
Instance details

Defined in Relude.String.Conversion

Methods

toText :: String -> Text #

Unbox Char 
Instance details

Defined in Data.Vector.Unboxed.Base

ConvertUtf8 String ByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 String ShortByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 String LByteString 
Instance details

Defined in Relude.String.Conversion

Lift Char 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Char -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Char -> Code m Char Source #

Vector Vector Char 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Char -> ST s (Vector Char)

basicUnsafeThaw :: Vector Char -> ST s (Mutable Vector s Char)

basicLength :: Vector Char -> Int

basicUnsafeSlice :: Int -> Int -> Vector Char -> Vector Char

basicUnsafeIndexM :: Vector Char -> Int -> Box Char

basicUnsafeCopy :: Mutable Vector s Char -> Vector Char -> ST s ()

elemseq :: Vector Char -> Char -> b -> b

MVector MVector Char 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Char -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Char -> MVector s Char

basicOverlaps :: MVector s Char -> MVector s Char -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Char)

basicInitialize :: MVector s Char -> ST s ()

basicUnsafeReplicate :: Int -> Char -> ST s (MVector s Char)

basicUnsafeRead :: MVector s Char -> Int -> ST s Char

basicUnsafeWrite :: MVector s Char -> Int -> Char -> ST s ()

basicClear :: MVector s Char -> ST s ()

basicSet :: MVector s Char -> Char -> ST s ()

basicUnsafeCopy :: MVector s Char -> MVector s Char -> ST s ()

basicUnsafeMove :: MVector s Char -> MVector s Char -> ST s ()

basicUnsafeGrow :: MVector s Char -> Int -> ST s (MVector s Char)

y ~ 'Just 0 => BaseCaseSearch Char z y e 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearch :: prox y -> proxy '(z, e) -> IfM y Gen Proxy Char

Generic1 (URec Char :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Char) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Char a -> Rep1 (URec Char) a Source #

to1 :: forall (a :: k0). Rep1 (URec Char) a -> URec Char a Source #

Foldable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UChar m -> m Source #

foldMap :: Monoid m => (a -> m) -> UChar a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UChar a -> m Source #

foldr :: (a -> b -> b) -> b -> UChar a -> b Source #

foldr' :: (a -> b -> b) -> b -> UChar a -> b Source #

foldl :: (b -> a -> b) -> b -> UChar a -> b Source #

foldl' :: (b -> a -> b) -> b -> UChar a -> b Source #

foldr1 :: (a -> a -> a) -> UChar a -> a Source #

foldl1 :: (a -> a -> a) -> UChar a -> a Source #

toList :: UChar a -> [a] Source #

null :: UChar a -> Bool Source #

length :: UChar a -> Int Source #

elem :: Eq a => a -> UChar a -> Bool Source #

maximum :: Ord a => UChar a -> a Source #

minimum :: Ord a => UChar a -> a Source #

sum :: Num a => UChar a -> a Source #

product :: Num a => UChar a -> a Source #

Traversable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) Source #

sequenceA :: Applicative f => UChar (f a) -> f (UChar a) Source #

mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) Source #

sequence :: Monad m => UChar (m a) -> m (UChar a) Source #

Functor (URec Char :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Generic (URec Char p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type Source #

Methods

from :: URec Char p -> Rep (URec Char p) x Source #

to :: Rep (URec Char p) x -> URec Char p Source #

Show (URec Char 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

Methods

(==) :: URec Char p -> URec Char p -> Bool Source #

(/=) :: URec Char p -> URec Char p -> Bool Source #

Ord (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Char p -> URec Char p -> Ordering Source #

(<) :: URec Char p -> URec Char p -> Bool Source #

(<=) :: URec Char p -> URec Char p -> Bool Source #

(>) :: URec Char p -> URec Char p -> Bool Source #

(>=) :: URec Char p -> URec Char p -> Bool Source #

max :: URec Char p -> URec Char p -> URec Char p Source #

min :: URec Char p -> URec Char p -> URec Char p Source #

newtype Vector Char 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Char = V_Char (Vector Char)
data URec Char (p :: k)

Used for marking occurrences of Char#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Char (p :: k) = UChar {}
newtype MVector s Char 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Char = MV_Char (MVector s Char)
type Rep1 (URec Char :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Char :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: k -> Type)))
type Rep (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Char p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: Type -> Type)))

data 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
MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> IO a Source #

MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a Source #

Alternative IO

Takes the first non-throwing IO action's result. empty throws an exception.

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a Source #

(<|>) :: IO a -> IO a -> IO a Source #

some :: IO a -> IO [a] Source #

many :: IO a -> IO [a] Source #

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> IO a Source #

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

liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c Source #

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

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

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 #

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> IO a Source #

MonadPlus IO

Takes the first non-throwing IO action's result. mzero throws an exception.

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a Source #

mplus :: IO a -> IO a -> IO a Source #

MonadAsync IO 
Instance details

Defined in Control.Monad.Class.MonadAsync

Associated Types

type Async IO = (async :: Type -> Type)

Methods

async :: IO a -> IO (Async IO a)

asyncBound :: IO a -> IO (Async IO a)

asyncOn :: Int -> IO a -> IO (Async IO a)

asyncThreadId :: Async IO a -> ThreadId IO

withAsync :: IO a -> (Async IO a -> IO b) -> IO b #

withAsyncBound :: IO a -> (Async IO a -> IO b) -> IO b

withAsyncOn :: Int -> IO a -> (Async IO a -> IO b) -> IO b

waitSTM :: Async IO a -> STM IO a

pollSTM :: Async IO a -> STM IO (Maybe (Either SomeException a))

waitCatchSTM :: Async IO a -> STM IO (Either SomeException a)

waitAnySTM :: [Async IO a] -> STM IO (Async IO a, a)

waitAnyCatchSTM :: [Async IO a] -> STM IO (Async IO a, Either SomeException a)

waitEitherSTM :: Async IO a -> Async IO b -> STM IO (Either a b)

waitEitherSTM_ :: Async IO a -> Async IO b -> STM IO ()

waitEitherCatchSTM :: Async IO a -> Async IO b -> STM IO (Either (Either SomeException a) (Either SomeException b))

waitBothSTM :: Async IO a -> Async IO b -> STM IO (a, b)

wait :: Async IO a -> IO a

poll :: Async IO a -> IO (Maybe (Either SomeException a))

waitCatch :: Async IO a -> IO (Either SomeException a)

cancel :: Async IO a -> IO ()

cancelWith :: Exception e => Async IO a -> e -> IO ()

uninterruptibleCancel :: Async IO a -> IO ()

waitAny :: [Async IO a] -> IO (Async IO a, a)

waitAnyCatch :: [Async IO a] -> IO (Async IO a, Either SomeException a)

waitAnyCancel :: [Async IO a] -> IO (Async IO a, a)

waitAnyCatchCancel :: [Async IO a] -> IO (Async IO a, Either SomeException a)

waitEither :: Async IO a -> Async IO b -> IO (Either a b)

waitEitherCatch :: Async IO a -> Async IO b -> IO (Either (Either SomeException a) (Either SomeException b))

waitEitherCancel :: Async IO a -> Async IO b -> IO (Either a b)

waitEitherCatchCancel :: Async IO a -> Async IO b -> IO (Either (Either SomeException a) (Either SomeException b))

waitEither_ :: Async IO a -> Async IO b -> IO ()

waitBoth :: Async IO a -> Async IO b -> IO (a, b)

race :: IO a -> IO b -> IO (Either a b) #

race_ :: IO a -> IO b -> IO () #

concurrently :: IO a -> IO b -> IO (a, b) #

concurrently_ :: IO a -> IO b -> IO () #

asyncWithUnmask :: ((forall b. IO b -> IO b) -> IO a) -> IO (Async IO a)

asyncOnWithUnmask :: Int -> ((forall b. IO b -> IO b) -> IO a) -> IO (Async IO a)

withAsyncWithUnmask :: ((forall c. IO c -> IO c) -> IO a) -> (Async IO a -> IO b) -> IO b

withAsyncOnWithUnmask :: Int -> ((forall c. IO c -> IO c) -> IO a) -> (Async IO a -> IO b) -> IO b

compareAsyncs :: Async IO a -> Async IO b -> Ordering

MonadEventlog IO 
Instance details

Defined in Control.Monad.Class.MonadEventlog

Methods

traceEventIO :: String -> IO ()

traceMarkerIO :: String -> IO ()

MonadFork IO 
Instance details

Defined in Control.Monad.Class.MonadFork

Methods

forkIO :: IO () -> IO (ThreadId IO)

forkOn :: Int -> IO () -> IO (ThreadId IO)

forkIOWithUnmask :: ((forall a. IO a -> IO a) -> IO ()) -> IO (ThreadId IO)

forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO (ThreadId IO)

throwTo :: Exception e => ThreadId IO -> e -> IO ()

killThread :: ThreadId IO -> IO ()

yield :: IO ()

MonadThread IO 
Instance details

Defined in Control.Monad.Class.MonadFork

Associated Types

type ThreadId IO

Methods

myThreadId :: IO (ThreadId IO)

labelThread :: ThreadId IO -> String -> IO ()

MonadST IO 
Instance details

Defined in Control.Monad.Class.MonadST

Methods

stToIO :: ST (PrimState IO) a -> IO a

withLiftST :: (forall s. (forall a. ST s a -> IO a) -> b) -> b

MonadInspectSTM IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Associated Types

type InspectMonad IO :: Type -> Type

Methods

inspectTVar :: proxy IO -> TVar IO a -> InspectMonad IO a

inspectTMVar :: proxy IO -> TMVar IO a -> InspectMonad IO (Maybe a)

MonadLabelledSTM IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Methods

labelTVar :: TVar IO a -> String -> STM IO ()

labelTMVar :: TMVar IO a -> String -> STM IO ()

labelTQueue :: TQueue IO a -> String -> STM IO ()

labelTBQueue :: TBQueue IO a -> String -> STM IO ()

labelTArray :: (Ix i, Show i) => TArray IO i e -> String -> STM IO ()

labelTSem :: TSem IO -> String -> STM IO ()

labelTChan :: TChan IO a -> String -> STM IO ()

labelTVarIO :: TVar IO a -> String -> IO ()

labelTMVarIO :: TMVar IO a -> String -> IO ()

labelTQueueIO :: TQueue IO a -> String -> IO ()

labelTBQueueIO :: TBQueue IO a -> String -> IO ()

labelTArrayIO :: (Ix i, Show i) => TArray IO i e -> String -> IO ()

labelTSemIO :: TSem IO -> String -> IO ()

labelTChanIO :: TChan IO a -> String -> IO ()

MonadSTM IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Associated Types

type STM IO = (stm :: Type -> Type) #

type TVar IO :: Type -> Type #

type TMVar IO :: Type -> Type #

type TQueue IO :: Type -> Type #

type TBQueue IO :: Type -> Type #

type TArray IO :: Type -> Type -> Type

type TSem IO

type TChan IO :: Type -> Type

Methods

atomically :: HasCallStack => STM IO a -> IO a #

newTVar :: a -> STM IO (TVar IO a)

readTVar :: TVar IO a -> STM IO a #

writeTVar :: TVar IO a -> a -> STM IO ()

retry :: STM IO a

orElse :: STM IO a -> STM IO a -> STM IO a

modifyTVar :: TVar IO a -> (a -> a) -> STM IO ()

modifyTVar' :: TVar IO a -> (a -> a) -> STM IO ()

stateTVar :: TVar IO s -> (s -> (a, s)) -> STM IO a

swapTVar :: TVar IO a -> a -> STM IO a

check :: Bool -> STM IO ()

newTMVar :: a -> STM IO (TMVar IO a)

newEmptyTMVar :: STM IO (TMVar IO a)

takeTMVar :: TMVar IO a -> STM IO a

tryTakeTMVar :: TMVar IO a -> STM IO (Maybe a)

putTMVar :: TMVar IO a -> a -> STM IO ()

tryPutTMVar :: TMVar IO a -> a -> STM IO Bool

readTMVar :: TMVar IO a -> STM IO a

tryReadTMVar :: TMVar IO a -> STM IO (Maybe a)

swapTMVar :: TMVar IO a -> a -> STM IO a

isEmptyTMVar :: TMVar IO a -> STM IO Bool

newTQueue :: STM IO (TQueue IO a)

readTQueue :: TQueue IO a -> STM IO a

tryReadTQueue :: TQueue IO a -> STM IO (Maybe a)

peekTQueue :: TQueue IO a -> STM IO a

tryPeekTQueue :: TQueue IO a -> STM IO (Maybe a)

flushTQueue :: TQueue IO a -> STM IO [a]

writeTQueue :: TQueue IO a -> a -> STM IO ()

isEmptyTQueue :: TQueue IO a -> STM IO Bool

unGetTQueue :: TQueue IO a -> a -> STM IO ()

newTBQueue :: Natural -> STM IO (TBQueue IO a)

readTBQueue :: TBQueue IO a -> STM IO a

tryReadTBQueue :: TBQueue IO a -> STM IO (Maybe a)

peekTBQueue :: TBQueue IO a -> STM IO a

tryPeekTBQueue :: TBQueue IO a -> STM IO (Maybe a)

flushTBQueue :: TBQueue IO a -> STM IO [a]

writeTBQueue :: TBQueue IO a -> a -> STM IO ()

lengthTBQueue :: TBQueue IO a -> STM IO Natural

isEmptyTBQueue :: TBQueue IO a -> STM IO Bool

isFullTBQueue :: TBQueue IO a -> STM IO Bool

unGetTBQueue :: TBQueue IO a -> a -> STM IO ()

newTSem :: Integer -> STM IO (TSem IO)

waitTSem :: TSem IO -> STM IO ()

signalTSem :: TSem IO -> STM IO ()

signalTSemN :: Natural -> TSem IO -> STM IO ()

newTChan :: STM IO (TChan IO a)

newBroadcastTChan :: STM IO (TChan IO a)

dupTChan :: TChan IO a -> STM IO (TChan IO a)

cloneTChan :: TChan IO a -> STM IO (TChan IO a)

readTChan :: TChan IO a -> STM IO a

tryReadTChan :: TChan IO a -> STM IO (Maybe a)

peekTChan :: TChan IO a -> STM IO a

tryPeekTChan :: TChan IO a -> STM IO (Maybe a)

writeTChan :: TChan IO a -> a -> STM IO ()

unGetTChan :: TChan IO a -> a -> STM IO ()

isEmptyTChan :: TChan IO a -> STM IO Bool

newTVarIO :: a -> IO (TVar IO a)

readTVarIO :: TVar IO a -> IO a

newTMVarIO :: a -> IO (TMVar IO a)

newEmptyTMVarIO :: IO (TMVar IO a)

newTQueueIO :: IO (TQueue IO a)

newTBQueueIO :: Natural -> IO (TBQueue IO a)

newTChanIO :: IO (TChan IO a)

newBroadcastTChanIO :: IO (TChan IO a)

MonadTraceSTM IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Methods

traceTVar :: proxy IO -> TVar IO a -> (Maybe a -> a -> InspectMonad IO TraceValue) -> STM IO ()

traceTMVar :: proxy IO -> TMVar IO a -> (Maybe (Maybe a) -> Maybe a -> InspectMonad IO TraceValue) -> STM IO ()

traceTQueue :: proxy IO -> TQueue IO a -> (Maybe [a] -> [a] -> InspectMonad IO TraceValue) -> STM IO ()

traceTBQueue :: proxy IO -> TBQueue IO a -> (Maybe [a] -> [a] -> InspectMonad IO TraceValue) -> STM IO ()

traceTSem :: proxy IO -> TSem IO -> (Maybe Integer -> Integer -> InspectMonad IO TraceValue) -> STM IO ()

traceTVarIO :: TVar IO a -> (Maybe a -> a -> InspectMonad IO TraceValue) -> IO ()

traceTMVarIO :: TMVar IO a -> (Maybe (Maybe a) -> Maybe a -> InspectMonad IO TraceValue) -> IO ()

traceTQueueIO :: TQueue IO a -> (Maybe [a] -> [a] -> InspectMonad IO TraceValue) -> IO ()

traceTBQueueIO :: TBQueue IO a -> (Maybe [a] -> [a] -> InspectMonad IO TraceValue) -> IO ()

traceTSemIO :: TSem IO -> (Maybe Integer -> Integer -> InspectMonad IO TraceValue) -> IO ()

MonadCatch IO 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

catch :: Exception e => IO a -> (e -> IO a) -> IO a #

catchJust :: Exception e => (e -> Maybe b) -> IO a -> (b -> IO a) -> IO a #

try :: Exception e => IO a -> IO (Either e a) #

tryJust :: Exception e => (e -> Maybe b) -> IO a -> IO (Either b a) #

handle :: Exception e => (e -> IO a) -> IO a -> IO a #

handleJust :: Exception e => (e -> Maybe b) -> (b -> IO a) -> IO a -> IO a #

onException :: IO a -> IO b -> IO a #

bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c #

generalBracket :: IO a -> (a -> ExitCase b -> IO c) -> (a -> IO b) -> IO (b, c) #

MonadEvaluate IO 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

evaluate :: a -> IO a #

MonadMask IO 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

mask_ :: IO a -> IO a #

uninterruptibleMask_ :: IO a -> IO a #

MonadMaskingState IO 
Instance details

Defined in Control.Monad.Class.MonadThrow

MonadThrow IO 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

throwIO :: Exception e => e -> IO a #

bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c #

bracket_ :: IO a -> IO b -> IO c -> IO c #

finally :: IO a -> IO b -> IO a #

MonadMonotonicTimeNSec IO 
Instance details

Defined in Control.Monad.Class.MonadTime

MonadTime IO 
Instance details

Defined in Control.Monad.Class.MonadTime

PrimBase IO 
Instance details

Defined in Control.Monad.Primitive

Methods

internal :: IO a -> State# (PrimState IO) -> (# State# (PrimState IO), a #)

PrimMonad IO 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState IO

Methods

primitive :: (State# (PrimState IO) -> (# State# (PrimState IO), a #)) -> IO a

MonadMonotonicTime IO 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

MonadDelay IO 
Instance details

Defined in Control.Monad.Class.MonadTimer.SI

Methods

threadDelay :: DiffTime -> IO () #

MonadTimer IO 
Instance details

Defined in Control.Monad.Class.MonadTimer.SI

Methods

registerDelay :: DiffTime -> IO (TVar IO Bool) #

registerDelayCancellable :: DiffTime -> IO (STM IO TimeoutState, IO ()) #

timeout :: DiffTime -> IO a -> IO (Maybe a) #

Quasi IO 
Instance details

Defined in Language.Haskell.TH.Syntax

Quote IO 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

newName :: String -> IO Name Source #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a Source #

mappend :: IO a -> IO a -> IO a Source #

mconcat :: [IO a] -> IO a Source #

Semigroup a => Semigroup (IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

type Async IO 
Instance details

Defined in Control.Monad.Class.MonadAsync

type Async IO = Async
type ThreadId IO 
Instance details

Defined in Control.Monad.Class.MonadFork

type ThreadId IO = ThreadId
type InspectMonad IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type InspectMonad IO = IO
type STM IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type STM IO = STM
type TArray IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TArray IO = TArray
type TBQueue IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TChan IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TChan IO = TChan
type TMVar IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TMVar IO = TMVar
type TQueue IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TSem IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TSem IO = TSem
type TVar IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TVar IO = TVar
type PrimState IO 
Instance details

Defined in Control.Monad.Primitive

type PrimState IO = RealWorld

data Word8 Source #

8-bit unsigned integer type

Instances

Instances details
Arbitrary Word8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Word8 #

shrink :: Word8 -> [Word8] #

CoArbitrary Word8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Word8 -> Gen b -> Gen b

FromJSON Word8 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word8 #

parseJSONList :: Value -> Parser [Word8] #

omittedField :: Maybe Word8 #

FromJSONKey Word8 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Word8

fromJSONKeyList :: FromJSONKeyFunction [Word8]

ToJSON Word8 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word8 -> Value #

toEncoding :: Word8 -> Encoding #

toJSONList :: [Word8] -> Value #

toEncodingList :: [Word8] -> Encoding #

omitField :: Word8 -> Bool #

ToJSONKey Word8 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Word8

toJSONKeyList :: ToJSONKeyFunction [Word8]

Bits Word8

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word8

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

FromCBOR Word8 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word8 #

label :: Proxy Word8 -> Text #

ToCBOR Word8 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word8 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word8 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word8] -> Size #

NFData Word8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word8 -> () Source #

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int #

hash :: Word8 -> Int

Uniform Word8 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word8

UniformRange Word8 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word8, Word8) -> g -> m Word8

ByteSource Word8 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word8 g -> Word8 -> g

Unbox Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word8 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word8 -> Code m Word8 Source #

Vector Vector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Word8 -> ST s (Vector Word8)

basicUnsafeThaw :: Vector Word8 -> ST s (Mutable Vector s Word8)

basicLength :: Vector Word8 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Word8 -> Vector Word8

basicUnsafeIndexM :: Vector Word8 -> Int -> Box Word8

basicUnsafeCopy :: Mutable Vector s Word8 -> Vector Word8 -> ST s ()

elemseq :: Vector Word8 -> Word8 -> b -> b

MVector MVector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Word8 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Word8 -> MVector s Word8

basicOverlaps :: MVector s Word8 -> MVector s Word8 -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Word8)

basicInitialize :: MVector s Word8 -> ST s ()

basicUnsafeReplicate :: Int -> Word8 -> ST s (MVector s Word8)

basicUnsafeRead :: MVector s Word8 -> Int -> ST s Word8

basicUnsafeWrite :: MVector s Word8 -> Int -> Word8 -> ST s ()

basicClear :: MVector s Word8 -> ST s ()

basicSet :: MVector s Word8 -> Word8 -> ST s ()

basicUnsafeCopy :: MVector s Word8 -> MVector s Word8 -> ST s ()

basicUnsafeMove :: MVector s Word8 -> MVector s Word8 -> ST s ()

basicUnsafeGrow :: MVector s Word8 -> Int -> ST s (MVector s Word8)

newtype Vector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Word8 = V_Word8 (Vector Word8)
type ByteSink Word8 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word8 g = Takes1Byte g
newtype MVector s Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word8 = MV_Word8 (MVector s Word8)

data Handle Source #

Haskell defines operations to read and write characters from and to files, represented by values of type Handle. Each value of this type is a handle: a record used by the Haskell run-time system to manage I/O with file system objects. A handle has at least the following properties:

  • whether it manages input or output or both;
  • whether it is open, closed or semi-closed;
  • whether the object is seekable;
  • whether buffering is disabled, or enabled on a line or block basis;
  • a buffer (whose length may be zero).

Most handles will also have a current I/O position indicating where the next input or output operation will occur. A handle is readable if it manages only input or both input and output; likewise, it is writable if it manages only output or both input and output. A handle is open when first allocated. Once it is closed it can no longer be used for either input or output, though an implementation cannot re-use its storage while references remain to it. Handles are in the Show and Eq classes. The string produced by showing a handle is system dependent; it should include enough information to identify the handle for debugging. A handle is equal according to == only to itself; no attempt is made to compare the internal state of different handles for equality.

Instances

Instances details
Show Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

data Bool Source #

Constructors

False 
True 

Instances

Instances details
Arbitrary Bool 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Bool #

shrink :: Bool -> [Bool] #

CoArbitrary Bool 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Bool -> Gen b -> Gen b

FromJSON Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Bool #

parseJSONList :: Value -> Parser [Bool] #

omittedField :: Maybe Bool #

FromJSONKey Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Bool

fromJSONKeyList :: FromJSONKeyFunction [Bool]

ToJSON Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Bool -> Value #

toEncoding :: Bool -> Encoding #

toJSONList :: [Bool] -> Value #

toEncodingList :: [Bool] -> Encoding #

omitField :: Bool -> Bool #

ToJSONKey Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Bool

toJSONKeyList :: ToJSONKeyFunction [Bool]

Bits Bool

Interpret Bool as 1-bit bit-field

Since: base-4.7.0.0

Instance details

Defined in GHC.Bits

FiniteBits Bool

Since: base-4.7.0.0

Instance details

Defined in GHC.Bits

Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type Source #

Methods

from :: Bool -> Rep Bool x Source #

to :: Rep Bool x -> Bool Source #

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

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

FromCBOR Bool 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Bool #

label :: Proxy Bool -> Text #

ToCBOR Bool 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Bool -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Bool -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Bool] -> Size #

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Bool -> () Source #

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Bool 
Instance details

Defined in GHC.Classes

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int #

hash :: Bool -> Int

Uniform Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Bool

UniformRange Bool 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Bool, Bool) -> g -> m Bool

Unbox Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

SingI 'False

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing 'False

SingI 'True

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing 'True

Lift Bool 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Bool -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Bool -> Code m Bool Source #

Vector Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Bool -> ST s (Vector Bool)

basicUnsafeThaw :: Vector Bool -> ST s (Mutable Vector s Bool)

basicLength :: Vector Bool -> Int

basicUnsafeSlice :: Int -> Int -> Vector Bool -> Vector Bool

basicUnsafeIndexM :: Vector Bool -> Int -> Box Bool

basicUnsafeCopy :: Mutable Vector s Bool -> Vector Bool -> ST s ()

elemseq :: Vector Bool -> Bool -> b -> b

MVector MVector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Bool -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Bool -> MVector s Bool

basicOverlaps :: MVector s Bool -> MVector s Bool -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Bool)

basicInitialize :: MVector s Bool -> ST s ()

basicUnsafeReplicate :: Int -> Bool -> ST s (MVector s Bool)

basicUnsafeRead :: MVector s Bool -> Int -> ST s Bool

basicUnsafeWrite :: MVector s Bool -> Int -> Bool -> ST s ()

basicClear :: MVector s Bool -> ST s ()

basicSet :: MVector s Bool -> Bool -> ST s ()

basicUnsafeCopy :: MVector s Bool -> MVector s Bool -> ST s ()

basicUnsafeMove :: MVector s Bool -> MVector s Bool -> ST s ()

basicUnsafeGrow :: MVector s Bool -> Int -> ST s (MVector s Bool)

y ~ 'Just 0 => BaseCaseSearch Bool z y e 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearch :: prox y -> proxy '(z, e) -> IfM y Gen Proxy Bool

type DemoteRep Bool 
Instance details

Defined in GHC.Generics

type DemoteRep Bool = Bool
type Rep Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep Bool = D1 ('MetaData "Bool" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "True" 'PrefixI 'False) (U1 :: Type -> Type))
data Sing (a :: Bool) 
Instance details

Defined in GHC.Generics

data Sing (a :: Bool) where
newtype Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Bool = V_Bool (Vector Word8)
newtype MVector s Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Bool = MV_Bool (MVector s Word8)

data Double Source #

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

Constructors

D# Double# 

Instances

Instances details
Arbitrary Double 
Instance details

Defined in Test.QuickCheck.Arbitrary

CoArbitrary Double 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Double -> Gen b -> Gen b

FromJSON Double 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Double #

parseJSONList :: Value -> Parser [Double] #

omittedField :: Maybe Double #

FromJSONKey Double 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Double

fromJSONKeyList :: FromJSONKeyFunction [Double]

ToJSON Double 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Double -> Value #

toEncoding :: Double -> Encoding #

toJSONList :: [Double] -> Value #

toEncodingList :: [Double] -> Encoding #

omitField :: Double -> Bool #

ToJSONKey Double 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Double

toJSONKeyList :: ToJSONKeyFunction [Double]

Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

FromCBOR Double 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Double #

label :: Proxy Double -> Text #

ToCBOR Double 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Double -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Double -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Double] -> Size #

NFData Double 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Double -> () Source #

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

Ord Double

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

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

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

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

Defined in GHC.Classes

Hashable Double 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Double -> Int #

hash :: Double -> Int

UniformRange Double 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Double, Double) -> g -> m Double

Unbox Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Double 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Double -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Double -> Code m Double Source #

Vector Vector Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Double -> ST s (Vector Double)

basicUnsafeThaw :: Vector Double -> ST s (Mutable Vector s Double)

basicLength :: Vector Double -> Int

basicUnsafeSlice :: Int -> Int -> Vector Double -> Vector Double

basicUnsafeIndexM :: Vector Double -> Int -> Box Double

basicUnsafeCopy :: Mutable Vector s Double -> Vector Double -> ST s ()

elemseq :: Vector Double -> Double -> b -> b

MVector MVector Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Double -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Double -> MVector s Double

basicOverlaps :: MVector s Double -> MVector s Double -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Double)

basicInitialize :: MVector s Double -> ST s ()

basicUnsafeReplicate :: Int -> Double -> ST s (MVector s Double)

basicUnsafeRead :: MVector s Double -> Int -> ST s Double

basicUnsafeWrite :: MVector s Double -> Int -> Double -> ST s ()

basicClear :: MVector s Double -> ST s ()

basicSet :: MVector s Double -> Double -> ST s ()

basicUnsafeCopy :: MVector s Double -> MVector s Double -> ST s ()

basicUnsafeMove :: MVector s Double -> MVector s Double -> ST s ()

basicUnsafeGrow :: MVector s Double -> Int -> ST s (MVector s Double)

y ~ 'Just 0 => BaseCaseSearch Double z y e 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearch :: prox y -> proxy '(z, e) -> IfM y Gen Proxy Double

Generic1 (URec Double :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Double) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Double a -> Rep1 (URec Double) a Source #

to1 :: forall (a :: k0). Rep1 (URec Double) a -> URec Double a Source #

Foldable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UDouble m -> m Source #

foldMap :: Monoid m => (a -> m) -> UDouble a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UDouble a -> m Source #

foldr :: (a -> b -> b) -> b -> UDouble a -> b Source #

foldr' :: (a -> b -> b) -> b -> UDouble a -> b Source #

foldl :: (b -> a -> b) -> b -> UDouble a -> b Source #

foldl' :: (b -> a -> b) -> b -> UDouble a -> b Source #

foldr1 :: (a -> a -> a) -> UDouble a -> a Source #

foldl1 :: (a -> a -> a) -> UDouble a -> a Source #

toList :: UDouble a -> [a] Source #

null :: UDouble a -> Bool Source #

length :: UDouble a -> Int Source #

elem :: Eq a => a -> UDouble a -> Bool Source #

maximum :: Ord a => UDouble a -> a Source #

minimum :: Ord a => UDouble a -> a Source #

sum :: Num a => UDouble a -> a Source #

product :: Num a => UDouble a -> a Source #

Traversable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) Source #

sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) Source #

mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) Source #

sequence :: Monad m => UDouble (m a) -> m (UDouble a) Source #

Functor (URec Double :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Generic (URec Double p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type Source #

Methods

from :: URec Double p -> Rep (URec Double p) x Source #

to :: Rep (URec Double p) x -> URec Double p Source #

Show (URec Double 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

Methods

(==) :: URec Double p -> URec Double p -> Bool Source #

(/=) :: URec Double p -> URec Double p -> Bool Source #

Ord (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type ForeignFloating Double 
Instance details

Defined in Data.Double.Conversion.Internal.FFI

type ForeignFloating Double = CDouble
newtype Vector Double 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Double = V_Double (Vector Double)
data URec Double (p :: k)

Used for marking occurrences of Double#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Double (p :: k) = UDouble {}
newtype MVector s Double 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Double = MV_Double (MVector s Double)
type Rep1 (URec Double :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Double :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: k -> Type)))
type Rep (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Double p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: Type -> Type)))

data Word Source #

A Word is an unsigned integral type, with the same size as Int.

Instances

Instances details
Arbitrary Word 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Word #

shrink :: Word -> [Word] #

CoArbitrary Word 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Word -> Gen b -> Gen b

FromJSON Word 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word #

parseJSONList :: Value -> Parser [Word] #

omittedField :: Maybe Word #

FromJSONKey Word 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Word

fromJSONKeyList :: FromJSONKeyFunction [Word]

ToJSON Word 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word -> Value #

toEncoding :: Word -> Encoding #

toJSONList :: [Word] -> Value #

toEncodingList :: [Word] -> Encoding #

omitField :: Word -> Bool #

ToJSONKey Word 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Word

toJSONKeyList :: ToJSONKeyFunction [Word]

Bits Word

Since: base-2.1

Instance details

Defined in GHC.Bits

FiniteBits Word

Since: base-4.6.0.0

Instance details

Defined in GHC.Bits

Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

FromCBOR Word 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word #

label :: Proxy Word -> Text #

ToCBOR Word 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word] -> Size #

NFData Word 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word -> () Source #

Eq Word 
Instance details

Defined in GHC.Classes

Methods

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

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

Ord Word 
Instance details

Defined in GHC.Classes

Hashable Word 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word -> Int #

hash :: Word -> Int

Uniform Word 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word

UniformRange Word 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word, Word) -> g -> m Word

Unbox Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word -> Code m Word Source #

Vector Vector Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Word -> ST s (Vector Word)

basicUnsafeThaw :: Vector Word -> ST s (Mutable Vector s Word)

basicLength :: Vector Word -> Int

basicUnsafeSlice :: Int -> Int -> Vector Word -> Vector Word

basicUnsafeIndexM :: Vector Word -> Int -> Box Word

basicUnsafeCopy :: Mutable Vector s Word -> Vector Word -> ST s ()

elemseq :: Vector Word -> Word -> b -> b

MVector MVector Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Word -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Word -> MVector s Word

basicOverlaps :: MVector s Word -> MVector s Word -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Word)

basicInitialize :: MVector s Word -> ST s ()

basicUnsafeReplicate :: Int -> Word -> ST s (MVector s Word)

basicUnsafeRead :: MVector s Word -> Int -> ST s Word

basicUnsafeWrite :: MVector s Word -> Int -> Word -> ST s ()

basicClear :: MVector s Word -> ST s ()

basicSet :: MVector s Word -> Word -> ST s ()

basicUnsafeCopy :: MVector s Word -> MVector s Word -> ST s ()

basicUnsafeMove :: MVector s Word -> MVector s Word -> ST s ()

basicUnsafeGrow :: MVector s Word -> Int -> ST s (MVector s Word)

y ~ 'Just 0 => BaseCaseSearch Word z y e 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearch :: prox y -> proxy '(z, e) -> IfM y Gen Proxy Word

Generic1 (URec Word :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Word) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). URec Word a -> Rep1 (URec Word) a Source #

to1 :: forall (a :: k0). Rep1 (URec Word) a -> URec Word a Source #

Foldable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UWord m -> m Source #

foldMap :: Monoid m => (a -> m) -> UWord a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UWord a -> m Source #

foldr :: (a -> b -> b) -> b -> UWord a -> b Source #

foldr' :: (a -> b -> b) -> b -> UWord a -> b Source #

foldl :: (b -> a -> b) -> b -> UWord a -> b Source #

foldl' :: (b -> a -> b) -> b -> UWord a -> b Source #

foldr1 :: (a -> a -> a) -> UWord a -> a Source #

foldl1 :: (a -> a -> a) -> UWord a -> a Source #

toList :: UWord a -> [a] Source #

null :: UWord a -> Bool Source #

length :: UWord a -> Int Source #

elem :: Eq a => a -> UWord a -> Bool Source #

maximum :: Ord a => UWord a -> a Source #

minimum :: Ord a => UWord a -> a Source #

sum :: Num a => UWord a -> a Source #

product :: Num a => UWord a -> a Source #

Traversable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) Source #

sequenceA :: Applicative f => UWord (f a) -> f (UWord a) Source #

mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) Source #

sequence :: Monad m => UWord (m a) -> m (UWord a) Source #

Functor (URec Word :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type Source #

Methods

from :: URec Word p -> Rep (URec Word p) x Source #

to :: Rep (URec Word p) x -> URec Word p Source #

Show (URec Word 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

Methods

(==) :: URec Word p -> URec Word p -> Bool Source #

(/=) :: URec Word p -> URec Word p -> Bool Source #

Ord (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Word p -> URec Word p -> Ordering Source #

(<) :: URec Word p -> URec Word p -> Bool Source #

(<=) :: URec Word p -> URec Word p -> Bool Source #

(>) :: URec Word p -> URec Word p -> Bool Source #

(>=) :: URec Word p -> URec Word p -> Bool Source #

max :: URec Word p -> URec Word p -> URec Word p Source #

min :: URec Word p -> URec Word p -> URec Word p Source #

newtype Vector Word 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Word = V_Word (Vector Word)
data URec Word (p :: k)

Used for marking occurrences of Word#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Word (p :: k) = UWord {}
newtype MVector s Word 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word = MV_Word (MVector s Word)
type Rep1 (URec Word :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep1 (URec Word :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: k -> Type)))
type Rep (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

type Rep (URec Word p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: Type -> Type)))

data Ordering Source #

Constructors

LT 
EQ 
GT 

Instances

Instances details
Arbitrary Ordering 
Instance details

Defined in Test.QuickCheck.Arbitrary

CoArbitrary Ordering 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Ordering -> Gen b -> Gen b

FromJSON Ordering 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Ordering #

parseJSONList :: Value -> Parser [Ordering] #

omittedField :: Maybe Ordering #

ToJSON Ordering 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Ordering -> Value #

toEncoding :: Ordering -> Encoding #

toJSONList :: [Ordering] -> Value #

toEncodingList :: [Ordering] -> Encoding #

omitField :: Ordering -> Bool #

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type Source #

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

NFData Ordering 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ordering -> () Source #

Eq Ordering 
Instance details

Defined in GHC.Classes

Ord Ordering 
Instance details

Defined in GHC.Classes

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ordering -> Int #

hash :: Ordering -> Int

y ~ 'Just 0 => BaseCaseSearch Ordering z y e 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearch :: prox y -> proxy '(z, e) -> IfM y Gen Proxy Ordering

GBCSSumCompare (f :: k1 -> Type) (g :: k1 -> Type) (z :: k2) (e :: k3) 'EQ 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

gbcsSumCompare :: forall proxy0 proxy (p :: k). proxy0 'EQ -> proxy '(z, e) -> Weighted (f p) -> Weighted (g p) -> Weighted ((f :+: g) p)

GBCSSumCompare (f :: k1 -> Type) (g :: k1 -> Type) (z :: k2) (e :: k3) 'GT 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

gbcsSumCompare :: forall proxy0 proxy (p :: k). proxy0 'GT -> proxy '(z, e) -> Weighted (f p) -> Weighted (g p) -> Weighted ((f :+: g) p)

GBCSSumCompare (f :: k1 -> Type) (g :: k1 -> Type) (z :: k2) (e :: k3) 'LT 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

gbcsSumCompare :: forall proxy0 proxy (p :: k). proxy0 'LT -> proxy '(z, e) -> Weighted (f p) -> Weighted (g p) -> Weighted ((f :+: g) p)

type Rep Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep Ordering = D1 ('MetaData "Ordering" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "LT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EQ" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GT" 'PrefixI 'False) (U1 :: Type -> Type)))

data 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
Arbitrary1 Maybe 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (Maybe a)

liftShrink :: (a -> [a]) -> Maybe a -> [Maybe a]

FromJSON1 Maybe 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Maybe a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Maybe a]

liftOmittedField :: Maybe a -> Maybe (Maybe a)

ToJSON1 Maybe 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Maybe a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Maybe a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Maybe a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Maybe a] -> Encoding

liftOmitField :: (a -> Bool) -> Maybe a -> Bool

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> Maybe a Source #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Maybe m -> m Source #

foldMap :: Monoid m => (a -> m) -> Maybe a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Maybe a -> m Source #

foldr :: (a -> b -> b) -> b -> Maybe a -> b Source #

foldr' :: (a -> b -> b) -> b -> Maybe a -> b Source #

foldl :: (b -> a -> b) -> b -> Maybe a -> b Source #

foldl' :: (b -> a -> b) -> b -> Maybe a -> b Source #

foldr1 :: (a -> a -> a) -> Maybe a -> a Source #

foldl1 :: (a -> a -> a) -> Maybe a -> a Source #

toList :: Maybe a -> [a] Source #

null :: Maybe a -> Bool Source #

length :: Maybe a -> Int Source #

elem :: Eq a => a -> Maybe a -> Bool Source #

maximum :: Ord a => Maybe a -> a Source #

minimum :: Ord a => Maybe a -> a Source #

sum :: Num a => Maybe a -> a Source #

product :: Num a => Maybe a -> a Source #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) Source #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) Source #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) Source #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) Source #

Alternative Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a Source #

(<|>) :: Maybe a -> Maybe a -> Maybe a Source #

some :: Maybe a -> Maybe [a] Source #

many :: Maybe a -> Maybe [a] Source #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> Maybe a Source #

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

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c Source #

(*>) :: Maybe a -> Maybe b -> Maybe b Source #

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

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> Maybe a Source #

MonadPlus Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a Source #

mplus :: Maybe a -> Maybe a -> Maybe a Source #

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

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Maybe a -> Int

Generic1 Maybe 
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 #

Lift a => Lift (Maybe a :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Maybe a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Maybe a -> Code m (Maybe a) Source #

Arbitrary a => Arbitrary (Maybe a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Maybe a) #

shrink :: Maybe a -> [Maybe a] #

CoArbitrary a => CoArbitrary (Maybe a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Maybe a -> Gen b -> Gen b

FromJSON a => FromJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Maybe a) #

parseJSONList :: Value -> Parser [Maybe a] #

omittedField :: Maybe (Maybe a) #

ToJSON a => ToJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Maybe a -> Value #

toEncoding :: Maybe a -> Encoding #

toJSONList :: [Maybe a] -> Value #

toEncodingList :: [Maybe a] -> Encoding #

omitField :: Maybe a -> Bool #

Semigroup a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S."

Since 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: Maybe a Source #

mappend :: Maybe a -> Maybe a -> Maybe a Source #

mconcat :: [Maybe a] -> Maybe a Source #

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type Source #

Methods

from :: Maybe a -> Rep (Maybe a) x Source #

to :: Rep (Maybe a) x -> Maybe a Source #

SingKind a => SingKind (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep (Maybe a)

Methods

fromSing :: forall (a0 :: Maybe a). Sing a0 -> DemoteRep (Maybe a)

Read a => Read (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

Show a => Show (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

FromCBOR a => FromCBOR (Maybe a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Maybe a) #

label :: Proxy (Maybe a) -> Text #

ToCBOR a => ToCBOR (Maybe a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Maybe a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Maybe a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Maybe a] -> Size #

NFData a => NFData (Maybe a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () Source #

Eq a => Eq (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

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

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

Ord a => Ord (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

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

(<) :: Maybe a -> Maybe a -> Bool Source #

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

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

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

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

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

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int

Corecursive (Maybe a) 
Instance details

Defined in Data.Functor.Foldable

Methods

embed :: Base (Maybe a) (Maybe a) -> Maybe a

ana :: (a0 -> Base (Maybe a) a0) -> a0 -> Maybe a

apo :: (a0 -> Base (Maybe a) (Either (Maybe a) a0)) -> a0 -> Maybe a

postpro :: Recursive (Maybe a) => (forall b. Base (Maybe a) b -> Base (Maybe a) b) -> (a0 -> Base (Maybe a) a0) -> a0 -> Maybe a

gpostpro :: (Recursive (Maybe a), Monad m) => (forall b. m (Base (Maybe a) b) -> Base (Maybe a) (m b)) -> (forall c. Base (Maybe a) c -> Base (Maybe a) c) -> (a0 -> Base (Maybe a) (m a0)) -> a0 -> Maybe a

Recursive (Maybe a) 
Instance details

Defined in Data.Functor.Foldable

Methods

project :: Maybe a -> Base (Maybe a) (Maybe a)

cata :: (Base (Maybe a) a0 -> a0) -> Maybe a -> a0

para :: (Base (Maybe a) (Maybe a, a0) -> a0) -> Maybe a -> a0

gpara :: (Corecursive (Maybe a), Comonad w) => (forall b. Base (Maybe a) (w b) -> w (Base (Maybe a) b)) -> (Base (Maybe a) (EnvT (Maybe a) w a0) -> a0) -> Maybe a -> a0

prepro :: Corecursive (Maybe a) => (forall b. Base (Maybe a) b -> Base (Maybe a) b) -> (Base (Maybe a) a0 -> a0) -> Maybe a -> a0

gprepro :: (Corecursive (Maybe a), Comonad w) => (forall b. Base (Maybe a) (w b) -> w (Base (Maybe a) b)) -> (forall c. Base (Maybe a) c -> Base (Maybe a) c) -> (Base (Maybe a) (w a0) -> a0) -> Maybe a -> a0

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)

a ~ a' => FindGen ('Match 'INCOHERENT) ('S _fg _coh '(con, i, 'Just s)) (FieldGen s a) gs a' 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

findGen :: (Proxy ('Match 'INCOHERENT), Proxy ('S _fg _coh '(con, i, 'Just s)), FullGenListOf ('S _fg _coh '(con, i, 'Just s))) -> FieldGen s a -> gs -> Gen a'

a ~ a' => FindGen ('Match 'INCOHERENT) ('S _fg _coh '('Just c, i, s)) (ConstrGen c i a) gs a' 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

findGen :: (Proxy ('Match 'INCOHERENT), Proxy ('S _fg _coh '('Just c, i, s)), FullGenListOf ('S _fg _coh '('Just c, i, s))) -> ConstrGen c i a -> gs -> Gen a'

type Rep1 Maybe

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep1 Maybe = D1 ('MetaData "Maybe" "GHC.Maybe" "base" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type DemoteRep (Maybe a) 
Instance details

Defined in GHC.Generics

type DemoteRep (Maybe a) = Maybe (DemoteRep a)
type Rep (Maybe a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (Maybe a) = D1 ('MetaData "Maybe" "GHC.Maybe" "base" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
data Sing (b :: Maybe a) 
Instance details

Defined in GHC.Generics

data Sing (b :: Maybe a) where
type Base (Maybe a) 
Instance details

Defined in Data.Functor.Foldable

type Base (Maybe a) = Const (Maybe a) :: Type -> Type

class a ~# b => (a :: k) ~ (b :: k) infix 4 Source #

Lifted, homogeneous equality. By lifted, we mean that it can be bogus (deferred type error). By homogeneous, the two types a and b must have the same kinds.

class a ~R# b => Coercible (a :: k) (b :: k) Source #

Coercible is a two-parameter class that has instances for types a and b if the compiler can infer that they have the same representation. This class does not have regular instances; instead they are created on-the-fly during type-checking. Trying to manually declare an instance of Coercible is an error.

Nevertheless one can pretend that the following three kinds of instances exist. First, as a trivial base-case:

instance Coercible a a

Furthermore, for every type constructor there is an instance that allows to coerce under the type constructor. For example, let D be a prototypical type constructor (data or newtype) with three type arguments, which have roles nominal, representational resp. phantom. Then there is an instance of the form

instance Coercible b b' => Coercible (D a b c) (D a b' c')

Note that the nominal type arguments are equal, the representational type arguments can differ, but need to have a Coercible instance themself, and the phantom type arguments can be changed arbitrarily.

The third kind of instance exists for every newtype NT = MkNT T and comes in two variants, namely

instance Coercible a T => Coercible a NT
instance Coercible T b => Coercible NT b

This instance is only usable if the constructor MkNT is in scope.

If, as a library author of a type constructor like Set a, you want to prevent a user of your module to write coerce :: Set T -> Set NT, you need to set the role of Set's type parameter to nominal, by writing

type role Set nominal

For more details about this feature, please refer to Safe Coercions by Joachim Breitner, Richard A. Eisenberg, Simon Peyton Jones and Stephanie Weirich.

Since: ghc-prim-0.4.0

class One x where #

Associated Types

type OneItem x #

Methods

one :: OneItem x -> x #

Instances

Instances details
One ByteString 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem ByteString #

One ByteString 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem ByteString #

One ShortByteString 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem ShortByteString #

One IntSet 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem IntSet #

Methods

one :: OneItem IntSet -> IntSet #

One Text 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem Text #

Methods

one :: OneItem Text -> Text #

One Text 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem Text #

Methods

one :: OneItem Text -> Text #

One (NonEmpty a) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (NonEmpty a) #

Methods

one :: OneItem (NonEmpty a) -> NonEmpty a #

One (IntMap v) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (IntMap v) #

Methods

one :: OneItem (IntMap v) -> IntMap v #

One (Seq a) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (Seq a) #

Methods

one :: OneItem (Seq a) -> Seq a #

One (Set a) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (Set a) #

Methods

one :: OneItem (Set a) -> Set a #

Hashable a => One (HashSet a) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (HashSet a) #

Methods

one :: OneItem (HashSet a) -> HashSet a #

One [a] 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem [a] #

Methods

one :: OneItem [a] -> [a] #

One (Map k v) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (Map k v) #

Methods

one :: OneItem (Map k v) -> Map k v #

Hashable k => One (HashMap k v) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (HashMap k v) #

Methods

one :: OneItem (HashMap k v) -> HashMap k v #

data Natural Source #

Natural number

Invariant: numbers <= 0xffffffffffffffff use the NS constructor

Instances

Instances details
FromJSON Natural 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Natural #

parseJSONList :: Value -> Parser [Natural] #

omittedField :: Maybe Natural #

FromJSONKey Natural 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Natural

fromJSONKeyList :: FromJSONKeyFunction [Natural]

ToJSON Natural 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Natural -> Value #

toEncoding :: Natural -> Encoding #

toJSONList :: [Natural] -> Value #

toEncodingList :: [Natural] -> Encoding #

omitField :: Natural -> Bool #

ToJSONKey Natural 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Natural

toJSONKeyList :: ToJSONKeyFunction [Natural]

Bits Natural

Since: base-4.8.0

Instance details

Defined in GHC.Bits

Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Num Natural

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

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

FromCBOR Natural 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Natural #

label :: Proxy Natural -> Text #

ToCBOR Natural 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Natural -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Natural -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Natural] -> Size #

NFData Natural

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Natural -> () Source #

Eq Natural 
Instance details

Defined in GHC.Num.Natural

Ord Natural 
Instance details

Defined in GHC.Num.Natural

Hashable Natural 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Natural -> Int #

hash :: Natural -> Int

UniformRange Natural 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Natural, Natural) -> g -> m Natural

Corecursive Natural 
Instance details

Defined in Data.Functor.Foldable

Methods

embed :: Base Natural Natural -> Natural

ana :: (a -> Base Natural a) -> a -> Natural

apo :: (a -> Base Natural (Either Natural a)) -> a -> Natural

postpro :: Recursive Natural => (forall b. Base Natural b -> Base Natural b) -> (a -> Base Natural a) -> a -> Natural

gpostpro :: (Recursive Natural, Monad m) => (forall b. m (Base Natural b) -> Base Natural (m b)) -> (forall c. Base Natural c -> Base Natural c) -> (a -> Base Natural (m a)) -> a -> Natural

Recursive Natural 
Instance details

Defined in Data.Functor.Foldable

Methods

project :: Natural -> Base Natural Natural

cata :: (Base Natural a -> a) -> Natural -> a

para :: (Base Natural (Natural, a) -> a) -> Natural -> a

gpara :: (Corecursive Natural, Comonad w) => (forall b. Base Natural (w b) -> w (Base Natural b)) -> (Base Natural (EnvT Natural w a) -> a) -> Natural -> a

prepro :: Corecursive Natural => (forall b. Base Natural b -> Base Natural b) -> (Base Natural a -> a) -> Natural -> a

gprepro :: (Corecursive Natural, Comonad w) => (forall b. Base Natural (w b) -> w (Base Natural b)) -> (forall c. Base Natural c -> Base Natural c) -> (Base Natural (w a) -> a) -> Natural -> a

TestCoercion SNat

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeNats

Methods

testCoercion :: forall (a :: k) (b :: k). SNat a -> SNat b -> Maybe (Coercion a b) Source #

TestEquality SNat

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeNats

Methods

testEquality :: forall (a :: k) (b :: k). SNat a -> SNat b -> Maybe (a :~: b) Source #

Lift Natural 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Natural -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Natural -> Code m Natural Source #

(BaseCaseSearch a z y a, BaseCaseSearching_ a z y) => BaseCaseSearching a (z :: Nat) 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearching :: proxy '(z, a) -> Gen a

(Generic a, GBCS (Rep a) z y e, IsMaybe y) => GBaseCaseSearch a (z :: Nat) (y :: Maybe Nat) (e :: Type) 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

gBaseCaseSearch :: prox y -> proxy '(z, e) -> IfM y Gen Proxy a

GBCSSum (f :: k1 -> Type) (g :: k1 -> Type) (z :: k2) (e :: k3) ('Nothing :: Maybe Nat) ('Nothing :: Maybe Nat) 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

gbcsSum :: forall prox proxy (p :: k). prox '('Nothing, 'Nothing) -> proxy '(z, e) -> IfM 'Nothing Weighted Proxy (f p) -> IfM 'Nothing Weighted Proxy (g p) -> IfM ('Nothing ||? 'Nothing) Weighted Proxy ((f :+: g) p)

GBCSSum (f :: k1 -> Type) (g :: k1 -> Type) (z :: k2) (e :: k3) ('Nothing :: Maybe Nat) ('Just n) 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

gbcsSum :: forall prox proxy (p :: k). prox '('Nothing, 'Just n) -> proxy '(z, e) -> IfM 'Nothing Weighted Proxy (f p) -> IfM ('Just n) Weighted Proxy (g p) -> IfM ('Nothing ||? 'Just n) Weighted Proxy ((f :+: g) p)

GBCSSum (f :: k1 -> Type) (g :: k1 -> Type) (z :: k2) (e :: k3) ('Just m) ('Nothing :: Maybe Nat) 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

gbcsSum :: forall prox proxy (p :: k). prox '('Just m, 'Nothing) -> proxy '(z, e) -> IfM ('Just m) Weighted Proxy (f p) -> IfM 'Nothing Weighted Proxy (g p) -> IfM ('Just m ||? 'Nothing) Weighted Proxy ((f :+: g) p)

GBCSProduct (f :: k1 -> Type) (g :: k1 -> Type) (z :: k2) (e :: k3) ('Just m) ('Just n) 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

gbcsProduct :: forall prox proxy (p :: k). prox '('Just m, 'Just n) -> proxy '(z, e) -> IfM ('Just m) Weighted Proxy (f p) -> IfM ('Just n) Weighted Proxy (g p) -> IfM ('Just m &&? 'Just n) Weighted Proxy ((f :*: g) p)

GBCSSumCompare f g z e (CmpNat m n) => GBCSSum (f :: k1 -> Type) (g :: k1 -> Type) (z :: k2) (e :: k3) ('Just m) ('Just n) 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

gbcsSum :: forall prox proxy (p :: k). prox '('Just m, 'Just n) -> proxy '(z, e) -> IfM ('Just m) Weighted Proxy (f p) -> IfM ('Just n) Weighted Proxy (g p) -> IfM ('Just m ||? 'Just n) Weighted Proxy ((f :+: g) p)

BaseCaseSearching a (z + 1) => BaseCaseSearching_ a (z :: Natural) ('Nothing :: Maybe t) 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearching_ :: proxy 'Nothing -> proxy2 '(z, a) -> IfM 'Nothing Gen Proxy a -> Gen a

Buildable (Range Natural) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

build :: Range Natural -> Builder

KnownNat weight => TypeLevelWeights ('[weight] :: [Nat]) (L x) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

typeLevelWeightsBuilder :: (L x, Int)

(KnownNat weight, TypeLevelWeights weights a) => TypeLevelWeights (weight ': weights :: [Nat]) (L x :| a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

typeLevelWeightsBuilder :: (L x :| a, Int)

a ~ a' => FindGen ('Match 'INCOHERENT) ('S _fg _coh '(con, i, 'Just s)) (FieldGen s a) gs a' 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

findGen :: (Proxy ('Match 'INCOHERENT), Proxy ('S _fg _coh '(con, i, 'Just s)), FullGenListOf ('S _fg _coh '(con, i, 'Just s))) -> FieldGen s a -> gs -> Gen a'

a ~ a' => FindGen ('Match 'INCOHERENT) ('S _fg _coh '('Just c, i, s)) (ConstrGen c i a) gs a' 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

findGen :: (Proxy ('Match 'INCOHERENT), Proxy ('S _fg _coh '('Just c, i, s)), FullGenListOf ('S _fg _coh '('Just c, i, s))) -> ConstrGen c i a -> gs -> Gen a'

type Base Natural 
Instance details

Defined in Data.Functor.Foldable

type Base Natural = Maybe
type m &&? ('Nothing :: Maybe Nat) 
Instance details

Defined in Generic.Random.Internal.BaseCase

type m &&? ('Nothing :: Maybe Nat) = 'Nothing :: Maybe Nat
type m ||? ('Nothing :: Maybe Nat) 
Instance details

Defined in Generic.Random.Internal.BaseCase

type m ||? ('Nothing :: Maybe Nat) = m
type ('Nothing :: Maybe Nat) &&? n 
Instance details

Defined in Generic.Random.Internal.BaseCase

type ('Nothing :: Maybe Nat) &&? n = 'Nothing :: Maybe Nat
type ('Nothing :: Maybe Nat) ||? n 
Instance details

Defined in Generic.Random.Internal.BaseCase

type ('Nothing :: Maybe Nat) ||? n = n
type ('Just m) &&? ('Just n) 
Instance details

Defined in Generic.Random.Internal.BaseCase

type ('Just m) &&? ('Just n) = 'Just (Max m n)
type ('Just m) ||? ('Just n) 
Instance details

Defined in Generic.Random.Internal.BaseCase

type ('Just m) ||? ('Just n) = 'Just (Min m n)

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.

Integers are stored in a kind of sign-magnitude form, hence do not expect two's complement form when using bit operations.

If the value is small (fit into an Int), IS constructor is used. Otherwise Integer and IN constructors are used to store a BigNat representing respectively the positive or the negative value magnitude.

Invariant: Integer and IN are used iff value doesn't fit in IS

Instances

Instances details
Arbitrary Integer 
Instance details

Defined in Test.QuickCheck.Arbitrary

CoArbitrary Integer 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Integer -> Gen b -> Gen b

FromJSON Integer 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Integer #

parseJSONList :: Value -> Parser [Integer] #

omittedField :: Maybe Integer #

FromJSONKey Integer 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Integer

fromJSONKeyList :: FromJSONKeyFunction [Integer]

ToJSON Integer 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Integer -> Value #

toEncoding :: Integer -> Encoding #

toJSONList :: [Integer] -> Value #

toEncodingList :: [Integer] -> Encoding #

omitField :: Integer -> Bool #

ToJSONKey Integer 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Integer

toJSONKeyList :: ToJSONKeyFunction [Integer]

Bits Integer

Since: base-2.1

Instance details

Defined in GHC.Bits

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

FromCBOR Rational 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Rational #

label :: Proxy Rational -> Text #

FromCBOR Integer 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Integer #

label :: Proxy Integer -> Text #

ToCBOR Integer 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Integer -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Integer -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Integer] -> Size #

NFData Integer 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Integer -> () Source #

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int #

hash :: Integer -> Int

UniformRange Integer 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Integer, Integer) -> g -> m Integer

Lift Integer 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Integer -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Integer -> Code m Integer Source #

y ~ 'Just 0 => BaseCaseSearch Integer z y e 
Instance details

Defined in Generic.Random.Internal.BaseCase

Methods

baseCaseSearch :: prox y -> proxy '(z, e) -> IfM y Gen Proxy Integer

type Type = TYPE LiftedRep Source #

The kind of types with lifted values. For example Int :: Type.

type Constraint = CONSTRAINT LiftedRep Source #

The kind of lifted constraints

newtype Any Source #

Boolean monoid under disjunction (||).

>>> getAny (Any True <> mempty <> Any False)
True
>>> getAny (mconcat (map (\x -> Any (even x)) [2,4,6,7,8]))
True

Constructors

Any 

Fields

Instances

Instances details
Arbitrary Any 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Any #

shrink :: Any -> [Any] #

CoArbitrary Any 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Any -> Gen b -> Gen b

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Any -> Any -> Any Source #

sconcat :: NonEmpty Any -> Any Source #

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

Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type Source #

Methods

from :: Any -> Rep Any x Source #

to :: Rep Any x -> Any Source #

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () Source #

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Any -> Any -> Ordering Source #

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

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

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

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

max :: Any -> Any -> Any Source #

min :: Any -> Any -> Any Source #

Unbox Any 
Instance details

Defined in Data.Vector.Unboxed.Base

Vector Vector Any 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Any -> ST s (Vector Any)

basicUnsafeThaw :: Vector Any -> ST s (Mutable Vector s Any)

basicLength :: Vector Any -> Int

basicUnsafeSlice :: Int -> Int -> Vector Any -> Vector Any

basicUnsafeIndexM :: Vector Any -> Int -> Box Any

basicUnsafeCopy :: Mutable Vector s Any -> Vector Any -> ST s ()

elemseq :: Vector Any -> Any -> b -> b

MVector MVector Any 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Any -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Any -> MVector s Any

basicOverlaps :: MVector s Any -> MVector s Any -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Any)

basicInitialize :: MVector s Any -> ST s ()

basicUnsafeReplicate :: Int -> Any -> ST s (MVector s Any)

basicUnsafeRead :: MVector s Any -> Int -> ST s Any

basicUnsafeWrite :: MVector s Any -> Int -> Any -> ST s ()

basicClear :: MVector s Any -> ST s ()

basicSet :: MVector s Any -> Any -> ST s ()

basicUnsafeCopy :: MVector s Any -> MVector s Any -> ST s ()

basicUnsafeMove :: MVector s Any -> MVector s Any -> ST s ()

basicUnsafeGrow :: MVector s Any -> Int -> ST s (MVector s Any)

type Rep Any

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep Any = D1 ('MetaData "Any" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Any" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAny") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
newtype Vector Any 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Any = V_Any (Vector Bool)
newtype MVector s Any 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Any = MV_Any (MVector s Bool)

data Word64 Source #

64-bit unsigned integer type

Instances

Instances details
Arbitrary Word64 
Instance details

Defined in Test.QuickCheck.Arbitrary

CoArbitrary Word64 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Word64 -> Gen b -> Gen b

FromJSON Word64 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word64 #

parseJSONList :: Value -> Parser [Word64] #

omittedField :: Maybe Word64 #

FromJSONKey Word64 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Word64

fromJSONKeyList :: FromJSONKeyFunction [Word64]

ToJSON Word64 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word64 -> Value #

toEncoding :: Word64 -> Encoding #

toJSONList :: [Word64] -> Value #

toEncodingList :: [Word64] -> Encoding #

omitField :: Word64 -> Bool #

ToJSONKey Word64 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Word64

toJSONKeyList :: ToJSONKeyFunction [Word64]

Bits Word64

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word64

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

FromCBOR Word64 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word64 #

label :: Proxy Word64 -> Text #

ToCBOR Word64 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word64 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word64 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word64] -> Size #

NFData Word64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word64 -> () Source #

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int #

hash :: Word64 -> Int

Uniform Word64 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word64

UniformRange Word64 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word64, Word64) -> g -> m Word64

ByteSource Word64 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word64 g -> Word64 -> g

Unbox Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word64 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word64 -> Code m Word64 Source #

Vector Vector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Word64 -> ST s (Vector Word64)

basicUnsafeThaw :: Vector Word64 -> ST s (Mutable Vector s Word64)

basicLength :: Vector Word64 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Word64 -> Vector Word64

basicUnsafeIndexM :: Vector Word64 -> Int -> Box Word64

basicUnsafeCopy :: Mutable Vector s Word64 -> Vector Word64 -> ST s ()

elemseq :: Vector Word64 -> Word64 -> b -> b

MVector MVector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Word64 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Word64 -> MVector s Word64

basicOverlaps :: MVector s Word64 -> MVector s Word64 -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Word64)

basicInitialize :: MVector s Word64 -> ST s ()

basicUnsafeReplicate :: Int -> Word64 -> ST s (MVector s Word64)

basicUnsafeRead :: MVector s Word64 -> Int -> ST s Word64

basicUnsafeWrite :: MVector s Word64 -> Int -> Word64 -> ST s ()

basicClear :: MVector s Word64 -> ST s ()

basicSet :: MVector s Word64 -> Word64 -> ST s ()

basicUnsafeCopy :: MVector s Word64 -> MVector s Word64 -> ST s ()

basicUnsafeMove :: MVector s Word64 -> MVector s Word64 -> ST s ()

basicUnsafeGrow :: MVector s Word64 -> Int -> ST s (MVector s Word64)

newtype Vector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Word64 = V_Word64 (Vector Word64)
type ByteSink Word64 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word64 g = Takes8Bytes g
newtype MVector s Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word64 = MV_Word64 (MVector s Word64)

data Word32 Source #

32-bit unsigned integer type

Instances

Instances details
Arbitrary Word32 
Instance details

Defined in Test.QuickCheck.Arbitrary

CoArbitrary Word32 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Word32 -> Gen b -> Gen b

FromJSON Word32 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word32 #

parseJSONList :: Value -> Parser [Word32] #

omittedField :: Maybe Word32 #

FromJSONKey Word32 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Word32

fromJSONKeyList :: FromJSONKeyFunction [Word32]

ToJSON Word32 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word32 -> Value #

toEncoding :: Word32 -> Encoding #

toJSONList :: [Word32] -> Value #

toEncodingList :: [Word32] -> Encoding #

omitField :: Word32 -> Bool #

ToJSONKey Word32 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Word32

toJSONKeyList :: ToJSONKeyFunction [Word32]

Bits Word32

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word32

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

FromCBOR Word32 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word32 #

label :: Proxy Word32 -> Text #

ToCBOR Word32 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word32 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word32 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word32] -> Size #

NFData Word32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word32 -> () Source #

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int #

hash :: Word32 -> Int

Uniform Word32 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word32

UniformRange Word32 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word32, Word32) -> g -> m Word32

ByteSource Word32 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word32 g -> Word32 -> g

Unbox Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word32 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word32 -> Code m Word32 Source #

Vector Vector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Word32 -> ST s (Vector Word32)

basicUnsafeThaw :: Vector Word32 -> ST s (Mutable Vector s Word32)

basicLength :: Vector Word32 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Word32 -> Vector Word32

basicUnsafeIndexM :: Vector Word32 -> Int -> Box Word32

basicUnsafeCopy :: Mutable Vector s Word32 -> Vector Word32 -> ST s ()

elemseq :: Vector Word32 -> Word32 -> b -> b

MVector MVector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Word32 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Word32 -> MVector s Word32

basicOverlaps :: MVector s Word32 -> MVector s Word32 -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Word32)

basicInitialize :: MVector s Word32 -> ST s ()

basicUnsafeReplicate :: Int -> Word32 -> ST s (MVector s Word32)

basicUnsafeRead :: MVector s Word32 -> Int -> ST s Word32

basicUnsafeWrite :: MVector s Word32 -> Int -> Word32 -> ST s ()

basicClear :: MVector s Word32 -> ST s ()

basicSet :: MVector s Word32 -> Word32 -> ST s ()

basicUnsafeCopy :: MVector s Word32 -> MVector s Word32 -> ST s ()

basicUnsafeMove :: MVector s Word32 -> MVector s Word32 -> ST s ()

basicUnsafeGrow :: MVector s Word32 -> Int -> ST s (MVector s Word32)

newtype Vector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Word32 = V_Word32 (Vector Word32)
type ByteSink Word32 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word32 g = Takes4Bytes g
newtype MVector s Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word32 = MV_Word32 (MVector s Word32)

data Word16 Source #

16-bit unsigned integer type

Instances

Instances details
Arbitrary Word16 
Instance details

Defined in Test.QuickCheck.Arbitrary

CoArbitrary Word16 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Word16 -> Gen b -> Gen b

FromJSON Word16 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word16 #

parseJSONList :: Value -> Parser [Word16] #

omittedField :: Maybe Word16 #

FromJSONKey Word16 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Word16

fromJSONKeyList :: FromJSONKeyFunction [Word16]

ToJSON Word16 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word16 -> Value #

toEncoding :: Word16 -> Encoding #

toJSONList :: [Word16] -> Value #

toEncodingList :: [Word16] -> Encoding #

omitField :: Word16 -> Bool #

ToJSONKey Word16 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Word16

toJSONKeyList :: ToJSONKeyFunction [Word16]

Bits Word16

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word16

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Bounded Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word16

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word16

Since: base-2.1

Instance details

Defined in GHC.Word

FromCBOR Word16 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word16 #

label :: Proxy Word16 -> Text #

ToCBOR Word16 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word16 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word16 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word16] -> Size #

NFData Word16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word16 -> () Source #

Eq Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word16 -> Int #

hash :: Word16 -> Int

Uniform Word16 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word16

UniformRange Word16 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word16, Word16) -> g -> m Word16

ByteSource Word16 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word16 g -> Word16 -> g

Unbox Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Word16 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Word16 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Word16 -> Code m Word16 Source #

Vector Vector Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Word16 -> ST s (Vector Word16)

basicUnsafeThaw :: Vector Word16 -> ST s (Mutable Vector s Word16)

basicLength :: Vector Word16 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Word16 -> Vector Word16

basicUnsafeIndexM :: Vector Word16 -> Int -> Box Word16

basicUnsafeCopy :: Mutable Vector s Word16 -> Vector Word16 -> ST s ()

elemseq :: Vector Word16 -> Word16 -> b -> b

MVector MVector Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Word16 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Word16 -> MVector s Word16

basicOverlaps :: MVector s Word16 -> MVector s Word16 -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Word16)

basicInitialize :: MVector s Word16 -> ST s ()

basicUnsafeReplicate :: Int -> Word16 -> ST s (MVector s Word16)

basicUnsafeRead :: MVector s Word16 -> Int -> ST s Word16

basicUnsafeWrite :: MVector s Word16 -> Int -> Word16 -> ST s ()

basicClear :: MVector s Word16 -> ST s ()

basicSet :: MVector s Word16 -> Word16 -> ST s ()

basicUnsafeCopy :: MVector s Word16 -> MVector s Word16 -> ST s ()

basicUnsafeMove :: MVector s Word16 -> MVector s Word16 -> ST s ()

basicUnsafeGrow :: MVector s Word16 -> Int -> ST s (MVector s Word16)

newtype Vector Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Word16 = V_Word16 (Vector Word16)
type ByteSink Word16 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word16 g = Takes2Bytes g
newtype MVector s Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word16 = MV_Word16 (MVector s Word16)

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 Strings, and the Right constructor can be used only on Ints:

>>> let s = Left "foo" :: Either String Int
>>> s
Left "foo"
>>> let n = Right 3 :: Either String Int
>>> n
Right 3
>>> :type s
s :: Either String Int
>>> :type n
n :: Either String Int

The fmap from our Functor instance will ignore Left values, but will apply the supplied function to values contained in a Right:

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> fmap (*2) s
Left "foo"
>>> fmap (*2) n
Right 6

The Monad instance for Either allows us to chain together multiple actions which may fail, and fail overall if any of the individual steps failed. First we'll write a function that can either parse an Int from a Char, or fail.

>>> import Data.Char ( digitToInt, isDigit )
>>> :{
    let parseEither :: Char -> Either String Int
        parseEither c
          | isDigit c = Right (digitToInt c)
          | otherwise = Left "parse error"
>>> :}

The following should work, since both '1' and '2' can be parsed as Ints.

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither '1'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Right 3

But the following should fail overall, since the first operation where we attempt to parse 'm' as an Int will fail:

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither 'm'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Left "parse error"

Constructors

Left a 
Right b 

Instances

Instances details
Arbitrary2 Either 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary2 :: Gen a -> Gen b -> Gen (Either a b)

liftShrink2 :: (a -> [a]) -> (b -> [b]) -> Either a b -> [Either a b]

FromJSON2 Either 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser (Either a b)

liftParseJSONList2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser [Either a b]

liftOmittedField2 :: Maybe a -> Maybe b -> Maybe (Either a b)

ToJSON2 Either 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> Either a b -> Value

liftToJSONList2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> [Either a b] -> Value

liftToEncoding2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> Either a b -> Encoding

liftToEncodingList2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> [Either a b] -> Encoding

liftOmitField2 :: (a -> Bool) -> (b -> Bool) -> Either a b -> Bool

Bifoldable Either

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => Either m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Either a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Either a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Either a b -> c Source #

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 #

Bitraversable Either

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) 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

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Either a b -> Int

Generic1 (Either a :: Type -> Type) 
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 #

(Lift a, Lift b) => Lift (Either a b :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Either a b -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Either a b -> Code m (Either a b) Source #

Arbitrary a => Arbitrary1 (Either a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a0 -> Gen (Either a a0)

liftShrink :: (a0 -> [a0]) -> Either a a0 -> [Either a a0]

FromJSON a => FromJSON1 (Either a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a0 -> (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser (Either a a0)

liftParseJSONList :: Maybe a0 -> (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser [Either a a0]

liftOmittedField :: Maybe a0 -> Maybe (Either a a0)

ToJSON a => ToJSON1 (Either a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> Either a a0 -> Value

liftToJSONList :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> [Either a a0] -> Value

liftToEncoding :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> Either a a0 -> Encoding

liftToEncodingList :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> [Either a a0] -> Encoding

liftOmitField :: (a0 -> Bool) -> Either a a0 -> Bool

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 #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure :: a -> Either e a Source #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b Source #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c Source #

(*>) :: Either e a -> Either e b -> Either e b Source #

(<*) :: Either e a -> Either e b -> Either e a Source #

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

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

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

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b Source #

(>>) :: Either e a -> Either e b -> Either e b Source #

return :: a -> Either e a Source #

NFData a => NFData1 (Either a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Either a a0 -> () Source #

Hashable a => Hashable1 (Either a) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Either a a0 -> Int

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

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Either a b) #

shrink :: Either a b -> [Either a b] #

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

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Either a b -> Gen b0 -> Gen b0

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

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Either a b) #

parseJSONList :: Value -> Parser [Either a b] #

omittedField :: Maybe (Either a b) #

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

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Either a b -> Value #

toEncoding :: Either a b -> Encoding #

toJSONList :: [Either a b] -> Value #

toEncodingList :: [Either a b] -> Encoding #

omitField :: Either a b -> Bool #

Semigroup (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

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

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

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

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type Source #

Methods

from :: Either a b -> Rep (Either a b) x Source #

to :: Rep (Either a b) x -> Either a b Source #

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

Since: base-3.0

Instance details

Defined in Data.Either

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

Since: base-3.0

Instance details

Defined in Data.Either

Methods

showsPrec :: Int -> Either a b -> ShowS Source #

show :: Either a b -> String Source #

showList :: [Either a b] -> ShowS Source #

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

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Either a b) #

label :: Proxy (Either a b) -> Text #

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

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Either a b -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Either a b) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Either a b] -> Size #

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

Defined in Control.DeepSeq

Methods

rnf :: Either a b -> () Source #

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

Since: base-2.1

Instance details

Defined in Data.Either

Methods

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

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

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

Since: base-2.1

Instance details

Defined in Data.Either

Methods

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

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

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

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

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

max :: Either a b -> Either a b -> Either a b Source #

min :: Either a b -> Either a b -> Either a b Source #

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

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int

Corecursive (Either a b) 
Instance details

Defined in Data.Functor.Foldable

Methods

embed :: Base (Either a b) (Either a b) -> Either a b

ana :: (a0 -> Base (Either a b) a0) -> a0 -> Either a b

apo :: (a0 -> Base (Either a b) (Either (Either a b) a0)) -> a0 -> Either a b

postpro :: Recursive (Either a b) => (forall b0. Base (Either a b) b0 -> Base (Either a b) b0) -> (a0 -> Base (Either a b) a0) -> a0 -> Either a b

gpostpro :: (Recursive (Either a b), Monad m) => (forall b0. m (Base (Either a b) b0) -> Base (Either a b) (m b0)) -> (forall c. Base (Either a b) c -> Base (Either a b) c) -> (a0 -> Base (Either a b) (m a0)) -> a0 -> Either a b

Recursive (Either a b) 
Instance details

Defined in Data.Functor.Foldable

Methods

project :: Either a b -> Base (Either a b) (Either a b)

cata :: (Base (Either a b) a0 -> a0) -> Either a b -> a0

para :: (Base (Either a b) (Either a b, a0) -> a0) -> Either a b -> a0

gpara :: (Corecursive (Either a b), Comonad w) => (forall b0. Base (Either a b) (w b0) -> w (Base (Either a b) b0)) -> (Base (Either a b) (EnvT (Either a b) w a0) -> a0) -> Either a b -> a0

prepro :: Corecursive (Either a b) => (forall b0. Base (Either a b) b0 -> Base (Either a b) b0) -> (Base (Either a b) a0 -> a0) -> Either a b -> a0

gprepro :: (Corecursive (Either a b), Comonad w) => (forall b0. Base (Either a b) (w b0) -> w (Base (Either a b) b0)) -> (forall c. Base (Either a b) c -> Base (Either a b) c) -> (Base (Either a b) (w a0) -> a0) -> Either a b -> a0

type Rep1 (Either a :: Type -> Type)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Base (Either a b) 
Instance details

Defined in Data.Functor.Foldable

type Base (Either a b) = Const (Either a b) :: Type -> Type

class (forall a. Functor (p a)) => Bifunctor (p :: Type -> Type -> Type) where Source #

A bifunctor is a type constructor that takes two type arguments and is a functor in both arguments. That is, unlike with Functor, a type constructor such as Either does not need to be partially applied for a Bifunctor instance, and the methods in this class permit mapping functions over the Left value or the Right value, or both at the same time.

Formally, the class Bifunctor represents a bifunctor from Hask -> Hask.

Intuitively it is a bifunctor where both the first and second arguments are covariant.

You can define a Bifunctor by either defining bimap or by defining both first and second. A partially applied Bifunctor must be a Functor and the second method must agree with fmap. From this it follows that:

second id = id

If you supply bimap, you should ensure that:

bimap id idid

If you supply first and second, ensure:

first idid
second idid

If you supply both, you should also ensure:

bimap f g ≡ first f . second g

These ensure by parametricity:

bimap  (f . g) (h . i) ≡ bimap f h . bimap g i
first  (f . g) ≡ first  f . first  g
second (f . g) ≡ second f . second g

Since 4.18.0.0 Functor is a superclass of 'Bifunctor.

Since: base-4.8.0.0

Minimal complete definition

bimap | first, second

Methods

bimap :: (a -> b) -> (c -> d) -> p a c -> p b d Source #

Map over both arguments at the same time.

bimap f g ≡ first f . second g

Examples

Expand
>>> bimap toUpper (+1) ('j', 3)
('J',4)
>>> bimap toUpper (+1) (Left 'j')
Left 'J'
>>> bimap toUpper (+1) (Right 3)
Right 4

first :: (a -> b) -> p a c -> p b c Source #

Map covariantly over the first argument.

first f ≡ bimap f id

Examples

Expand
>>> first toUpper ('j', 3)
('J',3)
>>> first toUpper (Left 'j')
Left 'J'

second :: (b -> c) -> p a b -> p a c Source #

Map covariantly over the second argument.

secondbimap id

Examples

Expand
>>> second (+1) ('j', 3)
('j',4)
>>> second (+1) (Right 3)
Right 4

Instances

Instances details
Bifunctor Either

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

first :: (a -> b) -> Either a c -> Either b c Source #

second :: (b -> c) -> Either a b -> Either a c Source #

Bifunctor Arg

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

bimap :: (a -> b) -> (c -> d) -> Arg a c -> Arg b d Source #

first :: (a -> b) -> Arg a c -> Arg b c Source #

second :: (b -> c) -> Arg a b -> Arg a c Source #

Bifunctor ListF 
Instance details

Defined in Data.Functor.Base

Methods

bimap :: (a -> b) -> (c -> d) -> ListF a c -> ListF b d Source #

first :: (a -> b) -> ListF a c -> ListF b c Source #

second :: (b -> c) -> ListF a b -> ListF a c Source #

Bifunctor NonEmptyF 
Instance details

Defined in Data.Functor.Base

Methods

bimap :: (a -> b) -> (c -> d) -> NonEmptyF a c -> NonEmptyF b d Source #

first :: (a -> b) -> NonEmptyF a c -> NonEmptyF b c Source #

second :: (b -> c) -> NonEmptyF a b -> NonEmptyF a c Source #

Bifunctor TreeF 
Instance details

Defined in Data.Functor.Base

Methods

bimap :: (a -> b) -> (c -> d) -> TreeF a c -> TreeF b d Source #

first :: (a -> b) -> TreeF a c -> TreeF b c Source #

second :: (b -> c) -> TreeF a b -> TreeF a c Source #

Bifunctor Either 
Instance details

Defined in Data.Strict.Either

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

first :: (a -> b) -> Either a c -> Either b c Source #

second :: (b -> c) -> Either a b -> Either a c Source #

Bifunctor These 
Instance details

Defined in Data.Strict.These

Methods

bimap :: (a -> b) -> (c -> d) -> These a c -> These b d Source #

first :: (a -> b) -> These a c -> These b c Source #

second :: (b -> c) -> These a b -> These a c Source #

Bifunctor Pair 
Instance details

Defined in Data.Strict.Tuple

Methods

bimap :: (a -> b) -> (c -> d) -> Pair a c -> Pair b d Source #

first :: (a -> b) -> Pair a c -> Pair b c Source #

second :: (b -> c) -> Pair a b -> Pair a c Source #

Bifunctor These 
Instance details

Defined in Data.These

Methods

bimap :: (a -> b) -> (c -> d) -> These a c -> These b d Source #

first :: (a -> b) -> These a c -> These b c Source #

second :: (b -> c) -> These a b -> These a c Source #

Bifunctor (,)

Class laws for tuples hold only up to laziness. Both first id and second id are lazier than id (and fmap id):

>>> first id (undefined :: (Int, Word)) `seq` ()
()
>>> second id (undefined :: (Int, Word)) `seq` ()
()
>>> id (undefined :: (Int, Word)) `seq` ()
*** Exception: Prelude.undefined

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

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

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

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

Bifunctor (Const :: Type -> Type -> Type)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d Source #

first :: (a -> b) -> Const a c -> Const b c Source #

second :: (b -> c) -> Const a b -> Const a c Source #

Functor f => Bifunctor (CofreeF f) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

bimap :: (a -> b) -> (c -> d) -> CofreeF f a c -> CofreeF f b d Source #

first :: (a -> b) -> CofreeF f a c -> CofreeF f b c Source #

second :: (b -> c) -> CofreeF f a b -> CofreeF f a c Source #

Functor f => Bifunctor (FreeF f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

bimap :: (a -> b) -> (c -> d) -> FreeF f a c -> FreeF f b d Source #

first :: (a -> b) -> FreeF f a c -> FreeF f b c Source #

second :: (b -> c) -> FreeF f a b -> FreeF f a c Source #

Bifunctor (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Tagged

Methods

bimap :: (a -> b) -> (c -> d) -> Tagged a c -> Tagged b d Source #

first :: (a -> b) -> Tagged a c -> Tagged b c Source #

second :: (b -> c) -> Tagged a b -> Tagged a c Source #

Bifunctor (Constant :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

bimap :: (a -> b) -> (c -> d) -> Constant a c -> Constant b d Source #

first :: (a -> b) -> Constant a c -> Constant b c Source #

second :: (b -> c) -> Constant a b -> Constant a c Source #

Bifunctor ((,,) x1)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

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

first :: (a -> b) -> (x1, a, c) -> (x1, b, c) Source #

second :: (b -> c) -> (x1, a, b) -> (x1, a, c) Source #

Bifunctor (K1 i :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Bifunctor

Methods

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

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

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

Bifunctor ((,,,) x1 x2)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, a, c) -> (x1, x2, b, d) Source #

first :: (a -> b) -> (x1, x2, a, c) -> (x1, x2, b, c) Source #

second :: (b -> c) -> (x1, x2, a, b) -> (x1, x2, a, c) Source #

Functor f => Bifunctor (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

bimap :: (a -> b) -> (c -> d) -> Clown f a c -> Clown f b d Source #

first :: (a -> b) -> Clown f a c -> Clown f b c Source #

second :: (b -> c) -> Clown f a b -> Clown f a c Source #

Bifunctor p => Bifunctor (Flip p) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bimap :: (a -> b) -> (c -> d) -> Flip p a c -> Flip p b d Source #

first :: (a -> b) -> Flip p a c -> Flip p b c Source #

second :: (b -> c) -> Flip p a b -> Flip p a c Source #

Functor g => Bifunctor (Joker g :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

bimap :: (a -> b) -> (c -> d) -> Joker g a c -> Joker g b d Source #

first :: (a -> b) -> Joker g a c -> Joker g b c Source #

second :: (b -> c) -> Joker g a b -> Joker g a c Source #

Bifunctor p => Bifunctor (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bimap :: (a -> b) -> (c -> d) -> WrappedBifunctor p a c -> WrappedBifunctor p b d Source #

first :: (a -> b) -> WrappedBifunctor p a c -> WrappedBifunctor p b c Source #

second :: (b -> c) -> WrappedBifunctor p a b -> WrappedBifunctor p a c Source #

Bifunctor ((,,,,) x1 x2 x3)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, d) Source #

first :: (a -> b) -> (x1, x2, x3, a, c) -> (x1, x2, x3, b, c) Source #

second :: (b -> c) -> (x1, x2, x3, a, b) -> (x1, x2, x3, a, c) Source #

(Bifunctor f, Bifunctor g) => Bifunctor (Product f g) 
Instance details

Defined in Data.Bifunctor.Product

Methods

bimap :: (a -> b) -> (c -> d) -> Product f g a c -> Product f g b d Source #

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

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

(Bifunctor p, Bifunctor q) => Bifunctor (Sum p q) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

bimap :: (a -> b) -> (c -> d) -> Sum p q a c -> Sum p q b d Source #

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

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

Bifunctor ((,,,,,) x1 x2 x3 x4)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, d) Source #

first :: (a -> b) -> (x1, x2, x3, x4, a, c) -> (x1, x2, x3, x4, b, c) Source #

second :: (b -> c) -> (x1, x2, x3, x4, a, b) -> (x1, x2, x3, x4, a, c) Source #

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

Defined in Data.Bifunctor.Tannen

Methods

bimap :: (a -> b) -> (c -> d) -> Tannen f p a c -> Tannen f p b d Source #

first :: (a -> b) -> Tannen f p a c -> Tannen f p b c Source #

second :: (b -> c) -> Tannen f p a b -> Tannen f p a c Source #

Bifunctor ((,,,,,,) x1 x2 x3 x4 x5)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, d) Source #

first :: (a -> b) -> (x1, x2, x3, x4, x5, a, c) -> (x1, x2, x3, x4, x5, b, c) Source #

second :: (b -> c) -> (x1, x2, x3, x4, x5, a, b) -> (x1, x2, x3, x4, x5, a, c) Source #

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

Defined in Data.Bifunctor.Biff

Methods

bimap :: (a -> b) -> (c -> d) -> Biff p f g a c -> Biff p f g b d Source #

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

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

newtype Sum a Source #

Monoid under addition.

>>> getSum (Sum 1 <> Sum 2 <> mempty)
3

Constructors

Sum 

Fields

Instances

Instances details
Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Sum m -> m Source #

foldMap :: Monoid m => (a -> m) -> Sum a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Sum a -> m Source #

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

foldr' :: (a -> b -> b) -> b -> Sum a -> b Source #

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

foldl' :: (b -> a -> b) -> b -> Sum a -> b Source #

foldr1 :: (a -> a -> a) -> Sum a -> a Source #

foldl1 :: (a -> a -> a) -> Sum a -> a Source #

toList :: Sum a -> [a] Source #

null :: Sum a -> Bool Source #

length :: Sum a -> Int Source #

elem :: Eq a => a -> Sum a -> Bool Source #

maximum :: Ord a => Sum a -> a Source #

minimum :: Ord a => Sum a -> a Source #

sum :: Num a => Sum a -> a Source #

product :: Num a => Sum a -> a Source #

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) Source #

sequenceA :: Applicative f => Sum (f a) -> f (Sum a) Source #

mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) Source #

sequence :: Monad m => Sum (m a) -> m (Sum a) Source #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Sum a Source #

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

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c Source #

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

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

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 #

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

return :: a -> Sum a Source #

NFData1 Sum

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Sum a -> () Source #

Generic1 Sum 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Sum :: k -> Type Source #

Methods

from1 :: forall (a :: k). Sum a -> Rep1 Sum a Source #

to1 :: forall (a :: k). Rep1 Sum a -> Sum a Source #

Unbox a => Vector Vector (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Sum a) -> ST s (Vector (Sum a))

basicUnsafeThaw :: Vector (Sum a) -> ST s (Mutable Vector s (Sum a))

basicLength :: Vector (Sum a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Sum a) -> Vector (Sum a)

basicUnsafeIndexM :: Vector (Sum a) -> Int -> Box (Sum a)

basicUnsafeCopy :: Mutable Vector s (Sum a) -> Vector (Sum a) -> ST s ()

elemseq :: Vector (Sum a) -> Sum a -> b -> b

Unbox a => MVector MVector (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Sum a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Sum a) -> MVector s (Sum a)

basicOverlaps :: MVector s (Sum a) -> MVector s (Sum a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Sum a))

basicInitialize :: MVector s (Sum a) -> ST s ()

basicUnsafeReplicate :: Int -> Sum a -> ST s (MVector s (Sum a))

basicUnsafeRead :: MVector s (Sum a) -> Int -> ST s (Sum a)

basicUnsafeWrite :: MVector s (Sum a) -> Int -> Sum a -> ST s ()

basicClear :: MVector s (Sum a) -> ST s ()

basicSet :: MVector s (Sum a) -> Sum a -> ST s ()

basicUnsafeCopy :: MVector s (Sum a) -> MVector s (Sum a) -> ST s ()

basicUnsafeMove :: MVector s (Sum a) -> MVector s (Sum a) -> ST s ()

basicUnsafeGrow :: MVector s (Sum a) -> Int -> ST s (MVector s (Sum a))

Arbitrary a => Arbitrary (Sum a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Sum a) #

shrink :: Sum a -> [Sum a] #

CoArbitrary a => CoArbitrary (Sum a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Sum a -> Gen b -> Gen b

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a Source #

mappend :: Sum a -> Sum a -> Sum a Source #

mconcat :: [Sum a] -> Sum a Source #

Num a => Semigroup (Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

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

Bounded a => Bounded (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type Source #

Methods

from :: Sum a -> Rep (Sum a) x Source #

to :: Rep (Sum a) x -> Sum a Source #

Num a => Num (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Sum a -> Sum a -> Sum a Source #

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

(*) :: Sum a -> Sum a -> Sum a Source #

negate :: Sum a -> Sum a Source #

abs :: Sum a -> Sum a Source #

signum :: Sum a -> Sum a Source #

fromInteger :: Integer -> Sum a Source #

Read a => Read (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Sum a -> ShowS Source #

show :: Sum a -> String Source #

showList :: [Sum a] -> ShowS Source #

NFData a => NFData (Sum a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum a -> () Source #

Eq a => Eq (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Ord a => Ord (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

(<) :: Sum a -> Sum a -> Bool Source #

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

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

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

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

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

Unbox a => Unbox (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Sum

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Sum = D1 ('MetaData "Sum" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Sum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Sum a) = MV_Sum (MVector s a)
type Rep (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Sum a) = D1 ('MetaData "Sum" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Sum" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Sum a) = V_Sum (Vector a)

newtype Product a Source #

Monoid under multiplication.

>>> getProduct (Product 3 <> Product 4 <> mempty)
12

Constructors

Product 

Fields

Instances

Instances details
Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Product m -> m Source #

foldMap :: Monoid m => (a -> m) -> Product a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Product a -> m Source #

foldr :: (a -> b -> b) -> b -> Product a -> b Source #

foldr' :: (a -> b -> b) -> b -> Product a -> b Source #

foldl :: (b -> a -> b) -> b -> Product a -> b Source #

foldl' :: (b -> a -> b) -> b -> Product a -> b Source #

foldr1 :: (a -> a -> a) -> Product a -> a Source #

foldl1 :: (a -> a -> a) -> Product a -> a Source #

toList :: Product a -> [a] Source #

null :: Product a -> Bool Source #

length :: Product a -> Int Source #

elem :: Eq a => a -> Product a -> Bool Source #

maximum :: Ord a => Product a -> a Source #

minimum :: Ord a => Product a -> a Source #

sum :: Num a => Product a -> a Source #

product :: Num a => Product a -> a Source #

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) Source #

sequenceA :: Applicative f => Product (f a) -> f (Product a) Source #

mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) Source #

sequence :: Monad m => Product (m a) -> m (Product a) Source #

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Product a Source #

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

liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c Source #

(*>) :: Product a -> Product b -> Product b Source #

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

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

return :: a -> Product a Source #

NFData1 Product

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Product a -> () Source #

Generic1 Product 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Product :: k -> Type Source #

Methods

from1 :: forall (a :: k). Product a -> Rep1 Product a Source #

to1 :: forall (a :: k). Rep1 Product a -> Product a Source #

Unbox a => Vector Vector (Product a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Product a) -> ST s (Vector (Product a))

basicUnsafeThaw :: Vector (Product a) -> ST s (Mutable Vector s (Product a))

basicLength :: Vector (Product a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Product a) -> Vector (Product a)

basicUnsafeIndexM :: Vector (Product a) -> Int -> Box (Product a)

basicUnsafeCopy :: Mutable Vector s (Product a) -> Vector (Product a) -> ST s ()

elemseq :: Vector (Product a) -> Product a -> b -> b

Unbox a => MVector MVector (Product a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Product a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Product a) -> MVector s (Product a)

basicOverlaps :: MVector s (Product a) -> MVector s (Product a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Product a))

basicInitialize :: MVector s (Product a) -> ST s ()

basicUnsafeReplicate :: Int -> Product a -> ST s (MVector s (Product a))

basicUnsafeRead :: MVector s (Product a) -> Int -> ST s (Product a)

basicUnsafeWrite :: MVector s (Product a) -> Int -> Product a -> ST s ()

basicClear :: MVector s (Product a) -> ST s ()

basicSet :: MVector s (Product a) -> Product a -> ST s ()

basicUnsafeCopy :: MVector s (Product a) -> MVector s (Product a) -> ST s ()

basicUnsafeMove :: MVector s (Product a) -> MVector s (Product a) -> ST s ()

basicUnsafeGrow :: MVector s (Product a) -> Int -> ST s (MVector s (Product a))

Arbitrary a => Arbitrary (Product a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Product a) #

shrink :: Product a -> [Product a] #

CoArbitrary a => CoArbitrary (Product a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Product a -> Gen b -> Gen b

Num a => Monoid (Product a)

Since: base-2.1

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

Methods

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

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

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

Bounded a => Bounded (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic (Product a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type Source #

Methods

from :: Product a -> Rep (Product a) x Source #

to :: Rep (Product a) x -> Product a Source #

Num a => Num (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData a => NFData (Product a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Product a -> () Source #

Eq a => Eq (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Ord a => Ord (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Unbox a => Unbox (Product a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Product

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Product = D1 ('MetaData "Product" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Product" 'PrefixI 'True) (S1 ('MetaSel ('Just "getProduct") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (Product a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Product a) = MV_Product (MVector s a)
type Rep (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Product a) = D1 ('MetaData "Product" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Product" 'PrefixI 'True) (S1 ('MetaSel ('Just "getProduct") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Product a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Product a) = V_Product (Vector a)

class IsString a where Source #

IsString is used in combination with the -XOverloadedStrings language extension to convert the literals to different string types.

For example, if you use the text package, you can say

{-# LANGUAGE OverloadedStrings  #-}

myText = "hello world" :: Text

Internally, the extension will convert this to the equivalent of

myText = fromString @Text ("hello world" :: String)

Note: You can use fromString in normal code as well, but the usual performance/memory efficiency problems with String apply.

Methods

fromString :: String -> a Source #

Instances

Instances details
IsString Key 
Instance details

Defined in Data.Aeson.Key

Methods

fromString :: String -> Key Source #

IsString Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fromString :: String -> Value Source #

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal.Type

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Lazy.Internal

IsString ShortByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Short.Internal

IsString ByteArray 
Instance details

Defined in Codec.CBOR.ByteArray

Methods

fromString :: String -> ByteArray Source #

IsString SlicedByteArray 
Instance details

Defined in Codec.CBOR.ByteArray.Sliced

Methods

fromString :: String -> SlicedByteArray Source #

IsString Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

IsString ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

fromString :: String -> ShortText Source #

IsString (Encoding' a) 
Instance details

Defined in Data.Aeson.Encoding.Internal

Methods

fromString :: String -> Encoding' a Source #

IsString a => IsString (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

a ~ Char => IsString (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

fromString :: String -> Seq a Source #

a ~ Char => IsString (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

fromString :: String -> DNonEmpty a Source #

a ~ Char => IsString (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

fromString :: String -> DList a Source #

(IsString a, Hashable a) => IsString (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

fromString :: String -> Hashed a Source #

IsString (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fromString :: String -> Doc a Source #

a ~ Char => IsString [a]

(a ~ Char) context was introduced in 4.9.0.0

Since: base-2.1

Instance details

Defined in Data.String

Methods

fromString :: String -> [a] Source #

IsString a => IsString (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Const a b Source #

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

Defined in Data.Tagged

Methods

fromString :: String -> Tagged s a Source #

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.

In addition, toInteger should be total, and fromInteger should be a left inverse for it, i.e. fromInteger (toInteger i) = i.

Minimal complete definition

quotRem, toInteger

Methods

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

integer division truncated toward zero

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

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

integer remainder, satisfying

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

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

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

integer division truncated toward negative infinity

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

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

integer modulus, satisfying

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

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

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

simultaneous quot and rem

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

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

simultaneous div and mod

WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.

toInteger :: a -> Integer Source #

conversion to Integer

Instances

Instances details
Integral CBool 
Instance details

Defined in Foreign.C.Types

Integral CChar 
Instance details

Defined in Foreign.C.Types

Integral CInt 
Instance details

Defined in Foreign.C.Types

Integral CIntMax 
Instance details

Defined in Foreign.C.Types

Integral CIntPtr 
Instance details

Defined in Foreign.C.Types

Integral CLLong 
Instance details

Defined in Foreign.C.Types

Integral CLong 
Instance details

Defined in Foreign.C.Types

Integral CPtrdiff 
Instance details

Defined in Foreign.C.Types

Integral CSChar 
Instance details

Defined in Foreign.C.Types

Integral CShort 
Instance details

Defined in Foreign.C.Types

Integral CSigAtomic 
Instance details

Defined in Foreign.C.Types

Integral CSize 
Instance details

Defined in Foreign.C.Types

Integral CUChar 
Instance details

Defined in Foreign.C.Types

Integral CUInt 
Instance details

Defined in Foreign.C.Types

Integral CUIntMax 
Instance details

Defined in Foreign.C.Types

Integral CUIntPtr 
Instance details

Defined in Foreign.C.Types

Integral CULLong 
Instance details

Defined in Foreign.C.Types

Integral CULong 
Instance details

Defined in Foreign.C.Types

Integral CUShort 
Instance details

Defined in Foreign.C.Types

Integral CWchar 
Instance details

Defined in Foreign.C.Types

Integral Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

quot :: Int -> Int -> Int Source #

rem :: Int -> Int -> Int Source #

div :: Int -> Int -> Int Source #

mod :: Int -> Int -> Int Source #

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

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

toInteger :: Int -> Integer Source #

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Integral a => Integral (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Integral a => Integral (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

quot :: Const a b -> Const a b -> Const a b Source #

rem :: Const a b -> Const a b -> Const a b Source #

div :: Const a b -> Const a b -> Const a b Source #

mod :: Const a b -> Const a b -> Const a b Source #

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

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

toInteger :: Const a b -> Integer Source #

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

Defined in Data.Tagged

Methods

quot :: Tagged s a -> Tagged s a -> Tagged s a Source #

rem :: Tagged s a -> Tagged s a -> Tagged s a Source #

div :: Tagged s a -> Tagged s a -> Tagged s a Source #

mod :: Tagged s a -> Tagged s a -> Tagged s a Source #

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

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

toInteger :: Tagged s a -> Integer Source #

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.

type String = [Char] Source #

String is an alias for a list of characters.

String constants in Haskell are values of type String. That means if you write a string literal like "hello world", it will have the type [Char], which is the same as String.

Note: You can ask the compiler to automatically infer different types with the -XOverloadedStrings language extension, for example "hello world" :: Text. See IsString for more information.

Because String is just a list of characters, you can use normal list functions to do basic string manipulation. See Data.List for operations on lists.

Performance considerations

Expand

[Char] is a relatively memory-inefficient type. It is a linked list of boxed word-size characters, internally it looks something like:

╭─────┬───┬──╮  ╭─────┬───┬──╮  ╭─────┬───┬──╮  ╭────╮
│ (:) │   │ ─┼─>│ (:) │   │ ─┼─>│ (:) │   │ ─┼─>│ [] │
╰─────┴─┼─┴──╯  ╰─────┴─┼─┴──╯  ╰─────┴─┼─┴──╯  ╰────╯
        v               v               v
       'a'             'b'             'c'

The String "abc" will use 5*3+1 = 16 (in general 5n+1) words of space in memory.

Furthermore, operations like (++) (string concatenation) are O(n) (in the left argument).

For historical reasons, the base library uses String in a lot of places for the conceptual simplicity, but library code dealing with user-data should use the text package for Unicode text, or the the bytestring package for binary data.

class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where Source #

Monads that also support choice and failure.

Minimal complete definition

Nothing

Methods

mzero :: m a Source #

The identity of mplus. It should also satisfy the equations

mzero >>= f  =  mzero
v >> mzero   =  mzero

The default definition is

mzero = empty

mplus :: m a -> m a -> m a Source #

An associative operation. The default definition is

mplus = (<|>)

Instances

Instances details
MonadPlus IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mzero :: IResult a Source #

mplus :: IResult a -> IResult a -> IResult a Source #

MonadPlus Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mzero :: Parser a Source #

mplus :: Parser a -> Parser a -> Parser a Source #

MonadPlus Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mzero :: Result a Source #

mplus :: Result a -> Result a -> Result a Source #

MonadPlus P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: P a Source #

mplus :: P a -> P a -> P a Source #

MonadPlus ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: ReadP a Source #

mplus :: ReadP a -> ReadP a -> ReadP a Source #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a Source #

mplus :: Seq a -> Seq a -> Seq a Source #

MonadPlus DList 
Instance details

Defined in Data.DList.Internal

Methods

mzero :: DList a Source #

mplus :: DList a -> DList a -> DList a Source #

MonadPlus IO

Takes the first non-throwing IO action's result. mzero throws an exception.

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a Source #

mplus :: IO a -> IO a -> IO a Source #

MonadPlus Array 
Instance details

Defined in Data.Primitive.Array

Methods

mzero :: Array a Source #

mplus :: Array a -> Array a -> Array a Source #

MonadPlus SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

mzero :: SmallArray a Source #

mplus :: SmallArray a -> SmallArray a -> SmallArray a Source #

MonadPlus Vector 
Instance details

Defined in Data.Vector

Methods

mzero :: Vector a Source #

mplus :: Vector a -> Vector a -> Vector a Source #

MonadPlus Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a Source #

mplus :: Maybe a -> Maybe a -> Maybe a Source #

MonadPlus List

Combines lists by concatenation, starting from the empty list.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: [a] Source #

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

(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: ArrowMonad a a0 Source #

mplus :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 Source #

MonadPlus (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

mzero :: Proxy a Source #

mplus :: Proxy a -> Proxy a -> Proxy a Source #

MonadPlus (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: U1 a Source #

mplus :: U1 a -> U1 a -> U1 a Source #

MonadPlus v => MonadPlus (Free v) 
Instance details

Defined in Control.Monad.Free

Methods

mzero :: Free v a Source #

mplus :: Free v a -> Free v a -> Free v a Source #

Monad m => MonadPlus (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzero :: MaybeT m a Source #

mplus :: MaybeT m a -> MaybeT m a -> MaybeT m a Source #

MonadPlus m => MonadPlus (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: Kleisli m a a0 Source #

mplus :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 Source #

MonadPlus f => MonadPlus (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mzero :: Ap f a Source #

mplus :: Ap f a -> Ap f a -> Ap f a Source #

MonadPlus f => MonadPlus (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mzero :: Alt f a Source #

mplus :: Alt f a -> Alt f a -> Alt f a Source #

MonadPlus f => MonadPlus (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: Rec1 f a Source #

mplus :: Rec1 f a -> Rec1 f a -> Rec1 f a Source #

(Functor f, MonadPlus m) => MonadPlus (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

mzero :: FreeT f m a Source #

mplus :: FreeT f m a -> FreeT f m a -> FreeT f m a Source #

(Monad m, Monoid e) => MonadPlus (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mzero :: ExceptT e m a Source #

mplus :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

MonadPlus m => MonadPlus (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mzero :: IdentityT m a Source #

mplus :: IdentityT m a -> IdentityT m a -> IdentityT m a Source #

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

Defined in Control.Monad.Trans.Reader

Methods

mzero :: ReaderT r m a Source #

mplus :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a Source #

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

Defined in Control.Monad.Trans.State.Strict

Methods

mzero :: StateT s m a Source #

mplus :: StateT s m a -> StateT s m a -> StateT s m a Source #

MonadPlus m => MonadPlus (Reverse m)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

mzero :: Reverse m a Source #

mplus :: Reverse m a -> Reverse m a -> Reverse m a Source #

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: (f :*: g) a Source #

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

MonadPlus f => MonadPlus (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: M1 i c f a Source #

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

class Read a Source #

Parsing of Strings, producing values.

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

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

For example, given the declarations

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

the derived instance of Read in Haskell 2010 is equivalent to

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

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

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

          where app_prec = 10
                up_prec = 5

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

The derived instance in GHC is equivalent to

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

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

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

          where app_prec = 10
                up_prec = 5

        readListPrec = readListPrecDefault

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

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

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

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

Minimal complete definition

readsPrec | readPrec

Instances

Instances details
Read QCGen 
Instance details

Defined in Test.QuickCheck.Random

Methods

readsPrec :: Int -> ReadS QCGen Source #

readList :: ReadS [QCGen] Source #

readPrec :: ReadPrec QCGen Source #

readListPrec :: ReadPrec [QCGen] Source #

Read Key 
Instance details

Defined in Data.Aeson.Key

Read DotNetTime 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

readsPrec :: Int -> ReadS DotNetTime Source #

readList :: ReadS [DotNetTime] Source #

readPrec :: ReadPrec DotNetTime Source #

readListPrec :: ReadPrec [DotNetTime] Source #

Read Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

readsPrec :: Int -> ReadS Value Source #

readList :: ReadS [Value] Source #

readPrec :: ReadPrec Value Source #

readListPrec :: ReadPrec [Value] Source #

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

Defined in Foreign.C.Types

Read CChar 
Instance details

Defined in Foreign.C.Types

Read CClock 
Instance details

Defined in Foreign.C.Types

Read CDouble 
Instance details

Defined in Foreign.C.Types

Read CFloat 
Instance details

Defined in Foreign.C.Types

Read CInt 
Instance details

Defined in Foreign.C.Types

Read CIntMax 
Instance details

Defined in Foreign.C.Types

Read CIntPtr 
Instance details

Defined in Foreign.C.Types

Read CLLong 
Instance details

Defined in Foreign.C.Types

Read CLong 
Instance details

Defined in Foreign.C.Types

Read CPtrdiff 
Instance details

Defined in Foreign.C.Types

Read CSChar 
Instance details

Defined in Foreign.C.Types

Read CSUSeconds 
Instance details

Defined in Foreign.C.Types

Read CShort 
Instance details

Defined in Foreign.C.Types

Read CSigAtomic 
Instance details

Defined in Foreign.C.Types

Read CSize 
Instance details

Defined in Foreign.C.Types

Read CTime 
Instance details

Defined in Foreign.C.Types

Read CUChar 
Instance details

Defined in Foreign.C.Types

Read CUInt 
Instance details

Defined in Foreign.C.Types

Read CUIntMax 
Instance details

Defined in Foreign.C.Types

Read CUIntPtr 
Instance details

Defined in Foreign.C.Types

Read CULLong 
Instance details

Defined in Foreign.C.Types

Read CULong 
Instance details

Defined in Foreign.C.Types

Read CUSeconds 
Instance details

Defined in Foreign.C.Types

Read CUShort 
Instance details

Defined in Foreign.C.Types

Read CWchar 
Instance details

Defined in Foreign.C.Types

Read 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 GHC.Read

Read Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read ExitCode 
Instance details

Defined in GHC.IO.Exception

Read BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Read Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Read GCDetails

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Read RTSStats

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Read SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Read GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word16

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Read Lexeme

Since: base-2.1

Instance details

Defined in GHC.Read

Read ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Read ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Read ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Read IntSet 
Instance details

Defined in Data.IntSet.Internal

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Read Half 
Instance details

Defined in Numeric.Half.Internal

Read Undefined 
Instance details

Defined in Relude.Debug

Read Scientific 
Instance details

Defined in Data.Scientific

Methods

readsPrec :: Int -> ReadS Scientific Source #

readList :: ReadS [Scientific] Source #

readPrec :: ReadPrec Scientific Source #

readListPrec :: ReadPrec [Scientific] Source #

Read SMGen 
Instance details

Defined in System.Random.SplitMix

Methods

readsPrec :: Int -> ReadS SMGen Source #

readList :: ReadS [SMGen] Source #

readPrec :: ReadPrec SMGen Source #

readListPrec :: ReadPrec [SMGen] Source #

Read ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

readsPrec :: Int -> ReadS ShortText Source #

readList :: ReadS [ShortText] Source #

readPrec :: ReadPrec ShortText Source #

readListPrec :: ReadPrec [ShortText] Source #

Read DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Read NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Read UUID 
Instance details

Defined in Data.UUID.Types.Internal

Read UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

readsPrec :: Int -> ReadS UnpackedUUID Source #

readList :: ReadS [UnpackedUUID] Source #

readPrec :: ReadPrec UnpackedUUID Source #

readListPrec :: ReadPrec [UnpackedUUID] Source #

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Read ()

Since: base-2.1

Instance details

Defined in GHC.Read

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Read v => Read (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

readsPrec :: Int -> ReadS (KeyMap v) Source #

readList :: ReadS [KeyMap v] Source #

readPrec :: ReadPrec (KeyMap v) Source #

readListPrec :: ReadPrec [KeyMap v] Source #

Read a => Read (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Read a => Read (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Read a => Read (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read (Down a)

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

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Read a => Read (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read m => Read (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Read p => Read (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

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

Since: base-2.1

Instance details

Defined in GHC.Read

Read e => Read (IntMap e) 
Instance details

Defined in Data.IntMap.Internal

Read a => Read (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Read a => Read (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Read a => Read (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

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

Defined in Data.Set.Internal

Read a => Read (Tree a) 
Instance details

Defined in Data.Tree

Read1 f => Read (Fix f) 
Instance details

Defined in Data.Fix

Methods

readsPrec :: Int -> ReadS (Fix f) Source #

readList :: ReadS [Fix f] Source #

readPrec :: ReadPrec (Fix f) Source #

readListPrec :: ReadPrec [Fix f] Source #

(Functor f, Read1 f) => Read (Mu f) 
Instance details

Defined in Data.Fix

Methods

readsPrec :: Int -> ReadS (Mu f) Source #

readList :: ReadS [Mu f] Source #

readPrec :: ReadPrec (Mu f) Source #

readListPrec :: ReadPrec [Mu f] Source #

(Functor f, Read1 f) => Read (Nu f) 
Instance details

Defined in Data.Fix

Methods

readsPrec :: Int -> ReadS (Nu f) Source #

readList :: ReadS [Nu f] Source #

readPrec :: ReadPrec (Nu f) Source #

readListPrec :: ReadPrec [Nu f] Source #

Read a => Read (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

readsPrec :: Int -> ReadS (DNonEmpty a) Source #

readList :: ReadS [DNonEmpty a] Source #

readPrec :: ReadPrec (DNonEmpty a) Source #

readListPrec :: ReadPrec [DNonEmpty a] Source #

Read a => Read (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

readsPrec :: Int -> ReadS (DList a) Source #

readList :: ReadS [DList a] Source #

readPrec :: ReadPrec (DList a) Source #

readListPrec :: ReadPrec [DList a] Source #

Read a => Read (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

readsPrec :: Int -> ReadS (Array a) Source #

readList :: ReadS [Array a] Source #

readPrec :: ReadPrec (Array a) Source #

readListPrec :: ReadPrec [Array a] Source #

Read a => Read (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

readsPrec :: Int -> ReadS (SmallArray a) Source #

readList :: ReadS [SmallArray a] Source #

readPrec :: ReadPrec (SmallArray a) Source #

readListPrec :: ReadPrec [SmallArray a] Source #

Read a => Read (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

readsPrec :: Int -> ReadS (Maybe a) Source #

readList :: ReadS [Maybe a] Source #

readPrec :: ReadPrec (Maybe a) Source #

readListPrec :: ReadPrec [Maybe a] Source #

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

Defined in Data.HashSet.Internal

Read a => Read (Vector a) 
Instance details

Defined in Data.Vector

Methods

readsPrec :: Int -> ReadS (Vector a) Source #

readList :: ReadS [Vector a] Source #

readPrec :: ReadPrec (Vector a) Source #

readListPrec :: ReadPrec [Vector a] Source #

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

Defined in Data.Vector.Primitive

Methods

readsPrec :: Int -> ReadS (Vector a) Source #

readList :: ReadS [Vector a] Source #

readPrec :: ReadPrec (Vector a) Source #

readListPrec :: ReadPrec [Vector a] Source #

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

Defined in Data.Vector.Storable

Methods

readsPrec :: Int -> ReadS (Vector a) Source #

readList :: ReadS [Vector a] Source #

readPrec :: ReadPrec (Vector a) Source #

readListPrec :: ReadPrec [Vector a] Source #

Read a => Read (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

Read a => Read (a)

Since: base-4.15

Instance details

Defined in GHC.Read

Read a => Read [a]

Since: base-2.1

Instance details

Defined in GHC.Read

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

Since: base-3.0

Instance details

Defined in Data.Either

Read (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

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

Since: base-2.1

Instance details

Defined in GHC.Read

Read (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

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

Defined in Data.Map.Internal

(Read1 f, Read a) => Read (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

readsPrec :: Int -> ReadS (Cofree f a) Source #

readList :: ReadS [Cofree f a] Source #

readPrec :: ReadPrec (Cofree f a) Source #

readListPrec :: ReadPrec [Cofree f a] Source #

(Read1 f, Read a) => Read (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

readsPrec :: Int -> ReadS (Free f a) Source #

readList :: ReadS [Free f a] Source #

readPrec :: ReadPrec (Free f a) Source #

readListPrec :: ReadPrec [Free f a] Source #

(Read a, Read b) => Read (ListF a b) 
Instance details

Defined in Data.Functor.Base

Methods

readsPrec :: Int -> ReadS (ListF a b) Source #

readList :: ReadS [ListF a b] Source #

readPrec :: ReadPrec (ListF a b) Source #

readListPrec :: ReadPrec [ListF a b] Source #

(Read a, Read b) => Read (NonEmptyF a b) 
Instance details

Defined in Data.Functor.Base

Methods

readsPrec :: Int -> ReadS (NonEmptyF a b) Source #

readList :: ReadS [NonEmptyF a b] Source #

readPrec :: ReadPrec (NonEmptyF a b) Source #

readListPrec :: ReadPrec [NonEmptyF a b] Source #

(Read a, Read b) => Read (TreeF a b) 
Instance details

Defined in Data.Functor.Base

Methods

readsPrec :: Int -> ReadS (TreeF a b) Source #

readList :: ReadS [TreeF a b] Source #

readPrec :: ReadPrec (TreeF a b) Source #

readListPrec :: ReadPrec [TreeF a b] Source #

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

Defined in Data.Strict.Either

Methods

readsPrec :: Int -> ReadS (Either a b) Source #

readList :: ReadS [Either a b] Source #

readPrec :: ReadPrec (Either a b) Source #

readListPrec :: ReadPrec [Either a b] Source #

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

Defined in Data.Strict.These

Methods

readsPrec :: Int -> ReadS (These a b) Source #

readList :: ReadS [These a b] Source #

readPrec :: ReadPrec (These a b) Source #

readListPrec :: ReadPrec [These a b] Source #

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

Defined in Data.Strict.Tuple

Methods

readsPrec :: Int -> ReadS (Pair a b) Source #

readList :: ReadS [Pair a b] Source #

readPrec :: ReadPrec (Pair a b) Source #

readListPrec :: ReadPrec [Pair a b] Source #

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

Defined in Data.These

Methods

readsPrec :: Int -> ReadS (These a b) Source #

readList :: ReadS [These a b] Source #

readPrec :: ReadPrec (These a b) Source #

readListPrec :: ReadPrec [These a b] Source #

(Read1 f, Read a) => Read (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

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

Defined in Control.Monad.Trans.Maybe

(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) 
Instance details

Defined in Data.HashMap.Internal

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b) Source #

readList :: ReadS [(a, b)] Source #

readPrec :: ReadPrec (a, b) Source #

readListPrec :: ReadPrec [(a, b)] Source #

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 (f p) => Read (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Read (p a a) => Read (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

readsPrec :: Int -> ReadS (Join p a) Source #

readList :: ReadS [Join p a] Source #

readPrec :: ReadPrec (Join p a) Source #

readListPrec :: ReadPrec [Join p a] Source #

(Read a, Read (f b)) => Read (CofreeF f a b) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

readsPrec :: Int -> ReadS (CofreeF f a b) Source #

readList :: ReadS [CofreeF f a b] Source #

readPrec :: ReadPrec (CofreeF f a b) Source #

readListPrec :: ReadPrec [CofreeF f a b] Source #

Read (w (CofreeF f a (CofreeT f w a))) => Read (CofreeT f w a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

readsPrec :: Int -> ReadS (CofreeT f w a) Source #

readList :: ReadS [CofreeT f w a] Source #

readPrec :: ReadPrec (CofreeT f w a) Source #

readListPrec :: ReadPrec [CofreeT f w a] Source #

(Read a, Read (f b)) => Read (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

readsPrec :: Int -> ReadS (FreeF f a b) Source #

readList :: ReadS [FreeF f a b] Source #

readPrec :: ReadPrec (FreeF f a b) Source #

readListPrec :: ReadPrec [FreeF f a b] Source #

(Read1 f, Read1 m, Read a) => Read (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

readsPrec :: Int -> ReadS (FreeT f m a) Source #

readList :: ReadS [FreeT f m a] Source #

readPrec :: ReadPrec (FreeT f m a) Source #

readListPrec :: ReadPrec [FreeT f m a] Source #

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

Defined in Data.Tagged

Methods

readsPrec :: Int -> ReadS (Tagged s b) Source #

readList :: ReadS [Tagged s b] Source #

readPrec :: ReadPrec (Tagged s b) Source #

readListPrec :: ReadPrec [Tagged s b] Source #

(Read (f a), Read (g a), Read a) => Read (These1 f g a) 
Instance details

Defined in Data.Functor.These

Methods

readsPrec :: Int -> ReadS (These1 f g a) Source #

readList :: ReadS [These1 f g a] Source #

readPrec :: ReadPrec (These1 f g a) Source #

readListPrec :: ReadPrec [These1 f g a] Source #

(Read1 f, Read a) => Read (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

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

Defined in Control.Monad.Trans.Except

(Read1 f, Read a) => Read (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Read a => Read (Constant a b) 
Instance details

Defined in Data.Functor.Constant

(Read1 f, Read a) => Read (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

readPrec :: ReadPrec (a, b, c) Source #

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

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :*: g) p) Source #

readList :: ReadS [(f :*: g) p] Source #

readPrec :: ReadPrec ((f :*: g) p) Source #

readListPrec :: ReadPrec [(f :*: g) p] Source #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :+: g) p) Source #

readList :: ReadS [(f :+: g) p] Source #

readPrec :: ReadPrec ((f :+: g) p) Source #

readListPrec :: ReadPrec [(f :+: g) p] Source #

Read c => Read (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (K1 i c p) Source #

readList :: ReadS [K1 i c p] Source #

readPrec :: ReadPrec (K1 i c p) Source #

readListPrec :: ReadPrec [K1 i c p] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

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

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

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :.: g) p) Source #

readList :: ReadS [(f :.: g) p] Source #

readPrec :: ReadPrec ((f :.: g) p) Source #

readListPrec :: ReadPrec [(f :.: g) p] Source #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (M1 i c f p) Source #

readList :: ReadS [M1 i c f p] Source #

readPrec :: ReadPrec (M1 i c f p) Source #

readListPrec :: ReadPrec [M1 i c f p] Source #

Read (f a) => Read (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

readsPrec :: Int -> ReadS (Clown f a b) Source #

readList :: ReadS [Clown f a b] Source #

readPrec :: ReadPrec (Clown f a b) Source #

readListPrec :: ReadPrec [Clown f a b] Source #

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

Defined in Data.Bifunctor.Flip

Methods

readsPrec :: Int -> ReadS (Flip p a b) Source #

readList :: ReadS [Flip p a b] Source #

readPrec :: ReadPrec (Flip p a b) Source #

readListPrec :: ReadPrec [Flip p a b] Source #

Read (g b) => Read (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

readsPrec :: Int -> ReadS (Joker g a b) Source #

readList :: ReadS [Joker g a b] Source #

readPrec :: ReadPrec (Joker g a b) Source #

readListPrec :: ReadPrec [Joker g a b] Source #

Read (p a b) => Read (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

readsPrec :: Int -> ReadS (WrappedBifunctor p a b) Source #

readList :: ReadS [WrappedBifunctor p a b] Source #

readPrec :: ReadPrec (WrappedBifunctor p a b) Source #

readListPrec :: ReadPrec [WrappedBifunctor p a b] Source #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

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

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

Defined in Data.Bifunctor.Product

Methods

readsPrec :: Int -> ReadS (Product f g a b) Source #

readList :: ReadS [Product f g a b] Source #

readPrec :: ReadPrec (Product f g a b) Source #

readListPrec :: ReadPrec [Product f g a b] Source #

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

Defined in Data.Bifunctor.Sum

Methods

readsPrec :: Int -> ReadS (Sum p q a b) Source #

readList :: ReadS [Sum p q a b] Source #

readPrec :: ReadPrec (Sum p q a b) Source #

readListPrec :: ReadPrec [Sum p q a b] Source #

(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 (f (p a b)) => Read (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

readsPrec :: Int -> ReadS (Tannen f p a b) Source #

readList :: ReadS [Tannen f p a b] Source #

readPrec :: ReadPrec (Tannen f p a b) Source #

readListPrec :: ReadPrec [Tannen f p a b] 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 (p (f a) (g b)) => Read (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

readsPrec :: Int -> ReadS (Biff p f g a b) Source #

readList :: ReadS [Biff p f g a b] Source #

readPrec :: ReadPrec (Biff p f g a b) Source #

readListPrec :: ReadPrec [Biff p f g a b] 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 Show a Source #

Conversion of values to readable Strings.

Derived instances of Show have the following properties, which are compatible with derived instances of Read:

  • The result of show is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.
  • If the constructor is defined to be an infix operator, then showsPrec will produce infix applications of the constructor.
  • the representation will be enclosed in parentheses if the precedence of the top-level constructor in x is less than d (associativity is ignored). Thus, if d is 0 then the result is never surrounded in parentheses; if d is 11 it is always surrounded in parentheses, unless it is an atomic expression.
  • If the constructor is defined using record syntax, then show will produce the record-syntax form, with the fields given in the same order as the original declaration.

For example, given the declarations

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

the derived instance of Show is equivalent to

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

       showsPrec d (Leaf m) = showParen (d > app_prec) $
            showString "Leaf " . showsPrec (app_prec+1) m
         where app_prec = 10

       showsPrec d (u :^: v) = showParen (d > up_prec) $
            showsPrec (up_prec+1) u .
            showString " :^: "      .
            showsPrec (up_prec+1) v
         where up_prec = 5

Note that right-associativity of :^: is ignored. For example,

  • show (Leaf 1 :^: Leaf 2 :^: Leaf 3) produces the string "Leaf 1 :^: (Leaf 2 :^: Leaf 3)".

Minimal complete definition

showsPrec | show

Instances

Instances details
Show QCGen 
Instance details

Defined in Test.QuickCheck.Random

Methods

showsPrec :: Int -> QCGen -> ShowS Source #

show :: QCGen -> String Source #

showList :: [QCGen] -> ShowS Source #

Show Key 
Instance details

Defined in Data.Aeson.Key

Methods

showsPrec :: Int -> Key -> ShowS Source #

show :: Key -> String Source #

showList :: [Key] -> ShowS Source #

Show AesonException 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> AesonException -> ShowS Source #

show :: AesonException -> String Source #

showList :: [AesonException] -> ShowS Source #

Show DotNetTime 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> DotNetTime -> ShowS Source #

show :: DotNetTime -> String Source #

showList :: [DotNetTime] -> ShowS Source #

Show JSONPathElement 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> JSONPathElement -> ShowS Source #

show :: JSONPathElement -> String Source #

showList :: [JSONPathElement] -> ShowS Source #

Show Options 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> Options -> ShowS Source #

show :: Options -> String Source #

showList :: [Options] -> ShowS Source #

Show SumEncoding 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> SumEncoding -> ShowS Source #

show :: SumEncoding -> String Source #

showList :: [SumEncoding] -> ShowS Source #

Show Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> Value -> ShowS Source #

show :: Value -> String Source #

showList :: [Value] -> ShowS Source #

Show ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

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 SomeTypeRep

Since: base-4.10.0.0

Instance details

Defined in Data.Typeable.Internal

Show CBool 
Instance details

Defined in Foreign.C.Types

Show CChar 
Instance details

Defined in Foreign.C.Types

Show CClock 
Instance details

Defined in Foreign.C.Types

Show CDouble 
Instance details

Defined in Foreign.C.Types

Show CFloat 
Instance details

Defined in Foreign.C.Types

Show CInt 
Instance details

Defined in Foreign.C.Types

Show CIntMax 
Instance details

Defined in Foreign.C.Types

Show CIntPtr 
Instance details

Defined in Foreign.C.Types

Show CLLong 
Instance details

Defined in Foreign.C.Types

Show CLong 
Instance details

Defined in Foreign.C.Types

Show CPtrdiff 
Instance details

Defined in Foreign.C.Types

Show CSChar 
Instance details

Defined in Foreign.C.Types

Show CSUSeconds 
Instance details

Defined in Foreign.C.Types

Show CShort 
Instance details

Defined in Foreign.C.Types

Show CSigAtomic 
Instance details

Defined in Foreign.C.Types

Show CSize 
Instance details

Defined in Foreign.C.Types

Show CTime 
Instance details

Defined in Foreign.C.Types

Show CUChar 
Instance details

Defined in Foreign.C.Types

Show CUInt 
Instance details

Defined in Foreign.C.Types

Show CUIntMax 
Instance details

Defined in Foreign.C.Types

Show CUIntPtr 
Instance details

Defined in Foreign.C.Types

Show CULLong 
Instance details

Defined in Foreign.C.Types

Show CULong 
Instance details

Defined in Foreign.C.Types

Show CUSeconds 
Instance details

Defined in Foreign.C.Types

Show CUShort 
Instance details

Defined in Foreign.C.Types

Show CWchar 
Instance details

Defined in Foreign.C.Types

Show Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Show ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Show ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Show Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Show CodingProgress

Since: base-4.4.0.0

Instance details

Defined in GHC.IO.Encoding.Types

Show TextEncoding

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Encoding.Types

Show AllocationLimitExceeded

Since: base-4.7.1.0

Instance details

Defined in GHC.IO.Exception

Show ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show AsyncException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Show Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ExitCode 
Instance details

Defined in GHC.IO.Exception

Show FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Show IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Show BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show HandleType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

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 Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Show FractionalExponentBase 
Instance details

Defined in GHC.Real

Show CallStack

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show GCDetails

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Show RTSStats

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Show SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Show Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Show ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Show ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Show ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Show DecoderError 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

showsPrec :: Int -> DecoderError -> ShowS Source #

show :: DecoderError -> String Source #

showList :: [DecoderError] -> ShowS Source #

Show ByteArray 
Instance details

Defined in Codec.CBOR.ByteArray

Methods

showsPrec :: Int -> ByteArray -> ShowS Source #

show :: ByteArray -> String Source #

showList :: [ByteArray] -> ShowS Source #

Show SlicedByteArray 
Instance details

Defined in Codec.CBOR.ByteArray.Sliced

Methods

showsPrec :: Int -> SlicedByteArray -> ShowS Source #

show :: SlicedByteArray -> String Source #

showList :: [SlicedByteArray] -> ShowS Source #

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

Show OsChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Show OsString

On windows, decodes as UCS-2. On unix prints the raw bytes without decoding.

Instance details

Defined in System.OsString.Internal.Types.Hidden

Show PosixChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Show PosixString

Prints the raw bytes without decoding.

Instance details

Defined in System.OsString.Internal.Types.Hidden

Show WindowsChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Show WindowsString

Decodes as UCS-2.

Instance details

Defined in System.OsString.Internal.Types.Hidden

Show ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Show Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Show ClosureType 
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Show Box 
Instance details

Defined in GHC.Exts.Heap.Closures

Show PrimType 
Instance details

Defined in GHC.Exts.Heap.Closures

Show TsoFlags 
Instance details

Defined in GHC.Exts.Heap.Closures

Show WhatNext 
Instance details

Defined in GHC.Exts.Heap.Closures

Show WhyBlocked 
Instance details

Defined in GHC.Exts.Heap.Closures

Show StgInfoTable 
Instance details

Defined in GHC.Exts.Heap.InfoTable.Types

Show CostCentre 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Show CostCentreStack 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Show IndexTable 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Show StgTSOProfInfo 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Show KindRep 
Instance details

Defined in GHC.Show

Show Module

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Show TrName

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show TyCon

Since: base-2.1

Instance details

Defined in GHC.Show

Show TypeLitSort

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show Half 
Instance details

Defined in Numeric.Half.Internal

Methods

showsPrec :: Int -> Half -> ShowS Source #

show :: Half -> String Source #

showList :: [Half] -> ShowS Source #

Show ExceptionInLinkedThread 
Instance details

Defined in Control.Monad.Class.MonadAsync

Methods

showsPrec :: Int -> ExceptionInLinkedThread -> ShowS Source #

show :: ExceptionInLinkedThread -> String Source #

showList :: [ExceptionInLinkedThread] -> ShowS Source #

Show BlockedIndefinitely 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Methods

showsPrec :: Int -> BlockedIndefinitely -> ShowS Source #

show :: BlockedIndefinitely -> String Source #

showList :: [BlockedIndefinitely] -> ShowS Source #

Show URI 
Instance details

Defined in Network.URI

Methods

showsPrec :: Int -> URI -> ShowS Source #

show :: URI -> String Source #

showList :: [URI] -> ShowS Source #

Show URIAuth 
Instance details

Defined in Network.URI

Methods

showsPrec :: Int -> URIAuth -> ShowS Source #

show :: URIAuth -> String Source #

showList :: [URIAuth] -> ShowS Source #

Show Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Show StdGen 
Instance details

Defined in System.Random.Internal

Methods

showsPrec :: Int -> StdGen -> ShowS Source #

show :: StdGen -> String Source #

showList :: [StdGen] -> ShowS Source #

Show Undefined 
Instance details

Defined in Relude.Debug

Show Bug 
Instance details

Defined in Relude.Exception

Show Scientific 
Instance details

Defined in Data.Scientific

Methods

showsPrec :: Int -> Scientific -> ShowS Source #

show :: Scientific -> String Source #

showList :: [Scientific] -> ShowS Source #

Show Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

Show SMGen 
Instance details

Defined in System.Random.SplitMix

Methods

showsPrec :: Int -> SMGen -> ShowS Source #

show :: SMGen -> String Source #

showList :: [SMGen] -> ShowS Source #

Show AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Show AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Show DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Show DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Show DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Show FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Show FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Show FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Show InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Show ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Show ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Show OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Show PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Show PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Show PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Show TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Show TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Show TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Decoding 
Instance details

Defined in Data.Text.Encoding

Show UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

Show ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

showsPrec :: Int -> ShortText -> ShowS Source #

show :: ShortText -> String Source #

showList :: [ShortText] -> ShowS Source #

Show DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Show NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Show LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Show ZonedTime

For the time zone, this only shows the name, or offset if the name is empty.

Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Show UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

showsPrec :: Int -> UUID -> ShowS Source #

show :: UUID -> String Source #

showList :: [UUID] -> ShowS Source #

Show UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

showsPrec :: Int -> UnpackedUUID -> ShowS Source #

show :: UnpackedUUID -> String Source #

showList :: [UnpackedUUID] -> ShowS Source #

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Show ()

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> () -> ShowS Source #

show :: () -> String Source #

showList :: [()] -> ShowS Source #

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 Levity

Since: base-4.15.0.0

Instance details

Defined in GHC.Show

Show RuntimeRep

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecCount

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecElem

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Show (Encoding' a) 
Instance details

Defined in Data.Aeson.Encoding.Internal

Methods

showsPrec :: Int -> Encoding' a -> ShowS Source #

show :: Encoding' a -> String Source #

showList :: [Encoding' a] -> ShowS Source #

Show v => Show (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

showsPrec :: Int -> KeyMap v -> ShowS Source #

show :: KeyMap v -> String Source #

showList :: [KeyMap v] -> ShowS Source #

Show a => Show (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> IResult a -> ShowS Source #

show :: IResult a -> String Source #

showList :: [IResult a] -> ShowS Source #

Show a => Show (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

showsPrec :: Int -> Result a -> ShowS Source #

show :: Result a -> String Source #

showList :: [Result a] -> ShowS Source #

Show a => Show (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Show a => Show (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Show a => Show (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Last a -> ShowS Source #

show :: Last a -> String Source #

showList :: [Last a] -> ShowS Source #

Show a => Show (Down a)

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

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Methods

showsPrec :: Int -> Down a -> ShowS Source #

show :: Down a -> String Source #

showList :: [Down a] -> ShowS Source #

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

Methods

showsPrec :: Int -> Last a -> ShowS Source #

show :: Last a -> String Source #

showList :: [Last a] -> ShowS Source #

Show a => Show (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Max a -> ShowS Source #

show :: Max a -> String Source #

showList :: [Max a] -> ShowS Source #

Show a => Show (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Min a -> ShowS Source #

show :: Min a -> String Source #

showList :: [Min a] -> ShowS Source #

Show m => Show (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Dual a -> ShowS Source #

show :: Dual a -> String Source #

showList :: [Dual a] -> ShowS Source #

Show a => Show (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Sum a -> ShowS Source #

show :: Sum a -> String Source #

showList :: [Sum a] -> ShowS Source #

Show a => Show (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show p => Show (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> Par1 p -> ShowS Source #

show :: Par1 p -> String Source #

showList :: [Par1 p] -> ShowS Source #

Show (FunPtr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Show (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

showsPrec :: Int -> Ptr a -> ShowS Source #

show :: Ptr a -> String Source #

showList :: [Ptr a] -> ShowS Source #

Show a => Show (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show (SNat n)

Since: base-4.18.0.0

Instance details

Defined in GHC.TypeNats

Methods

showsPrec :: Int -> SNat n -> ShowS Source #

show :: SNat n -> String Source #

showList :: [SNat n] -> ShowS Source #

Show a => Show (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS Source #

show :: Seq a -> String Source #

showList :: [Seq a] -> ShowS Source #

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 (Intersection a) 
Instance details

Defined in Data.Set.Internal

Show a => Show (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

showsPrec :: Int -> Set a -> ShowS Source #

show :: Set a -> String Source #

showList :: [Set a] -> ShowS Source #

Show a => Show (Tree a) 
Instance details

Defined in Data.Tree

Methods

showsPrec :: Int -> Tree a -> ShowS Source #

show :: Tree a -> String Source #

showList :: [Tree a] -> ShowS Source #

Show1 f => Show (Fix f) 
Instance details

Defined in Data.Fix

Methods

showsPrec :: Int -> Fix f -> ShowS Source #

show :: Fix f -> String Source #

showList :: [Fix f] -> ShowS Source #

(Functor f, Show1 f) => Show (Mu f) 
Instance details

Defined in Data.Fix

Methods

showsPrec :: Int -> Mu f -> ShowS Source #

show :: Mu f -> String Source #

showList :: [Mu f] -> ShowS Source #

(Functor f, Show1 f) => Show (Nu f) 
Instance details

Defined in Data.Fix

Methods

showsPrec :: Int -> Nu f -> ShowS Source #

show :: Nu f -> String Source #

showList :: [Nu f] -> ShowS Source #

Show a => Show (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

showsPrec :: Int -> DNonEmpty a -> ShowS Source #

show :: DNonEmpty a -> String Source #

showList :: [DNonEmpty a] -> ShowS Source #

Show a => Show (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

showsPrec :: Int -> DList a -> ShowS Source #

show :: DList a -> String Source #

showList :: [DList a] -> ShowS Source #

Show a => Show (GenericArbitrarySingle a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> GenericArbitrarySingle a -> ShowS Source #

show :: GenericArbitrarySingle a -> String Source #

showList :: [GenericArbitrarySingle a] -> ShowS Source #

Show a => Show (GenericArbitraryU a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> GenericArbitraryU a -> ShowS Source #

show :: GenericArbitraryU a -> String Source #

showList :: [GenericArbitraryU a] -> ShowS Source #

Show b => Show (GenClosure b) 
Instance details

Defined in GHC.Exts.Heap.Closures

Show a => Show (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

showsPrec :: Int -> Hashed a -> ShowS Source #

show :: Hashed a -> String Source #

showList :: [Hashed a] -> ShowS Source #

Show a => Show (ReasonablySized a) Source # 
Instance details

Defined in Hydra.Prelude

Show a => Show (ExitCase a) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

showsPrec :: Int -> ExitCase a -> ShowS Source #

show :: ExitCase a -> String Source #

showList :: [ExitCase a] -> ShowS Source #

Show a => Show (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Doc a -> ShowS Source #

show :: Doc a -> String Source #

showList :: [Doc a] -> ShowS Source #

Show a => Show (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Span a -> ShowS Source #

show :: Span a -> String Source #

showList :: [Span a] -> ShowS Source #

Show a => Show (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

showsPrec :: Int -> Array a -> ShowS Source #

show :: Array a -> String Source #

showList :: [Array a] -> ShowS Source #

(Show a, Prim a) => Show (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

showsPrec :: Int -> PrimArray a -> ShowS Source #

show :: PrimArray a -> String Source #

showList :: [PrimArray a] -> ShowS Source #

Show a => Show (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

showsPrec :: Int -> SmallArray a -> ShowS Source #

show :: SmallArray a -> String Source #

showList :: [SmallArray a] -> ShowS Source #

Show g => Show (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

showsPrec :: Int -> StateGen g -> ShowS Source #

show :: StateGen g -> String Source #

showList :: [StateGen g] -> ShowS Source #

Show g => Show (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> AtomicGen g -> ShowS Source #

show :: AtomicGen g -> String Source #

showList :: [AtomicGen g] -> ShowS Source #

Show g => Show (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> IOGen g -> ShowS Source #

show :: IOGen g -> String Source #

showList :: [IOGen g] -> ShowS Source #

Show g => Show (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> STGen g -> ShowS Source #

show :: STGen g -> String Source #

showList :: [STGen g] -> ShowS Source #

Show g => Show (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

showsPrec :: Int -> TGen g -> ShowS Source #

show :: TGen g -> String Source #

showList :: [TGen g] -> ShowS Source #

Show a => Show (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

showsPrec :: Int -> Maybe a -> ShowS Source #

show :: Maybe a -> String Source #

showList :: [Maybe a] -> ShowS Source #

Show flag => Show (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Show a => Show (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Show a => Show (Vector a) 
Instance details

Defined in Data.Vector

Methods

showsPrec :: Int -> Vector a -> ShowS Source #

show :: Vector a -> String Source #

showList :: [Vector a] -> ShowS Source #

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

Defined in Data.Vector.Primitive

Methods

showsPrec :: Int -> Vector a -> ShowS Source #

show :: Vector a -> String Source #

showList :: [Vector a] -> ShowS Source #

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

Defined in Data.Vector.Storable

Methods

showsPrec :: Int -> Vector a -> ShowS Source #

show :: Vector a -> String Source #

showList :: [Vector a] -> ShowS Source #

Show a => Show (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Show a => Show (a)

Since: base-4.15

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a) -> ShowS Source #

show :: (a) -> String Source #

showList :: [(a)] -> ShowS Source #

Show a => Show [a]

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> [a] -> ShowS Source #

show :: [a] -> String Source #

showList :: [[a]] -> ShowS Source #

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

Since: base-3.0

Instance details

Defined in Data.Either

Methods

showsPrec :: Int -> Either a b -> ShowS Source #

show :: Either a b -> String Source #

showList :: [Either a b] -> ShowS Source #

Show (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Arg a b -> ShowS Source #

show :: Arg a b -> String Source #

showList :: [Arg a b] -> ShowS Source #

Show (TypeRep a) 
Instance details

Defined in Data.Typeable.Internal

Show (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> U1 p -> ShowS Source #

show :: U1 p -> String Source #

showList :: [U1 p] -> ShowS Source #

Show (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> V1 p -> ShowS Source #

show :: V1 p -> String Source #

showList :: [V1 p] -> ShowS Source #

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

Defined in Data.Map.Internal

Methods

showsPrec :: Int -> Map k a -> ShowS Source #

show :: Map k a -> String Source #

showList :: [Map k a] -> ShowS Source #

(Show1 f, Show a) => Show (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

showsPrec :: Int -> Cofree f a -> ShowS Source #

show :: Cofree f a -> String Source #

showList :: [Cofree f a] -> ShowS Source #

(Show1 f, Show a) => Show (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

showsPrec :: Int -> Free f a -> ShowS Source #

show :: Free f a -> String Source #

showList :: [Free f a] -> ShowS Source #

(Show a, Show b) => Show (ListF a b) 
Instance details

Defined in Data.Functor.Base

Methods

showsPrec :: Int -> ListF a b -> ShowS Source #

show :: ListF a b -> String Source #

showList :: [ListF a b] -> ShowS Source #

(Show a, Show b) => Show (NonEmptyF a b) 
Instance details

Defined in Data.Functor.Base

Methods

showsPrec :: Int -> NonEmptyF a b -> ShowS Source #

show :: NonEmptyF a b -> String Source #

showList :: [NonEmptyF a b] -> ShowS Source #

(Show a, Show b) => Show (TreeF a b) 
Instance details

Defined in Data.Functor.Base

Methods

showsPrec :: Int -> TreeF a b -> ShowS Source #

show :: TreeF a b -> String Source #

showList :: [TreeF a b] -> ShowS Source #

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

Defined in Data.Strict.Either

Methods

showsPrec :: Int -> Either a b -> ShowS Source #

show :: Either a b -> String Source #

showList :: [Either a b] -> ShowS Source #

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

Defined in Data.Strict.These

Methods

showsPrec :: Int -> These a b -> ShowS Source #

show :: These a b -> String Source #

showList :: [These a b] -> ShowS Source #

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

Defined in Data.Strict.Tuple

Methods

showsPrec :: Int -> Pair a b -> ShowS Source #

show :: Pair a b -> String Source #

showList :: [Pair a b] -> ShowS Source #

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

Defined in Data.These

Methods

showsPrec :: Int -> These a b -> ShowS Source #

show :: These a b -> String Source #

showList :: [These a b] -> ShowS Source #

(Show1 f, Show a) => Show (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Methods

showsPrec :: Int -> Lift f a -> ShowS Source #

show :: Lift f a -> String Source #

showList :: [Lift f a] -> ShowS Source #

(Show1 m, Show a) => Show (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

showsPrec :: Int -> MaybeT m a -> ShowS Source #

show :: MaybeT m a -> String Source #

showList :: [MaybeT m a] -> ShowS Source #

(Show k, Show v) => Show (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

showsPrec :: Int -> HashMap k v -> ShowS Source #

show :: HashMap k v -> String Source #

showList :: [HashMap k v] -> ShowS Source #

(Show a, Show b) => Show (a, b)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b) -> ShowS Source #

show :: (a, b) -> String Source #

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

Show a => Show (Const a b)

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

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Methods

showsPrec :: Int -> Const a b -> ShowS Source #

show :: Const a b -> String Source #

showList :: [Const a b] -> ShowS Source #

Show (f a) => Show (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Ap f a -> ShowS Source #

show :: Ap f a -> String Source #

showList :: [Ap f a] -> ShowS Source #

Show (f a) => Show (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Alt f a -> ShowS Source #

show :: Alt f a -> String Source #

showList :: [Alt f a] -> ShowS Source #

Show (f p) => Show (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> Rec1 f p -> ShowS Source #

show :: Rec1 f p -> String Source #

showList :: [Rec1 f p] -> ShowS Source #

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 (p a a) => Show (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

showsPrec :: Int -> Join p a -> ShowS Source #

show :: Join p a -> String Source #

showList :: [Join p a] -> ShowS Source #

(Show a, Show (f b)) => Show (CofreeF f a b) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

showsPrec :: Int -> CofreeF f a b -> ShowS Source #

show :: CofreeF f a b -> String Source #

showList :: [CofreeF f a b] -> ShowS Source #

Show (w (CofreeF f a (CofreeT f w a))) => Show (CofreeT f w a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

showsPrec :: Int -> CofreeT f w a -> ShowS Source #

show :: CofreeT f w a -> String Source #

showList :: [CofreeT f w a] -> ShowS Source #

(Show a, Show (f b)) => Show (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

showsPrec :: Int -> FreeF f a b -> ShowS Source #

show :: FreeF f a b -> String Source #

showList :: [FreeF f a b] -> ShowS Source #

(Show1 f, Show1 m, Show a) => Show (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

showsPrec :: Int -> FreeT f m a -> ShowS Source #

show :: FreeT f m a -> String Source #

showList :: [FreeT f m a] -> ShowS Source #

Show a => Show (AndShrinking f a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> AndShrinking f a -> ShowS Source #

show :: AndShrinking f a -> String Source #

showList :: [AndShrinking f a] -> ShowS Source #

Show a => Show (GenericArbitrary weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> GenericArbitrary weights a -> ShowS Source #

show :: GenericArbitrary weights a -> String Source #

showList :: [GenericArbitrary weights a] -> ShowS Source #

Show a => Show (GenericArbitraryRec weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> GenericArbitraryRec weights a -> ShowS Source #

show :: GenericArbitraryRec weights a -> String Source #

showList :: [GenericArbitraryRec weights a] -> ShowS Source #

Show a => Show (GenericArbitrarySingleG genList a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> GenericArbitrarySingleG genList a -> ShowS Source #

show :: GenericArbitrarySingleG genList a -> String Source #

showList :: [GenericArbitrarySingleG genList a] -> ShowS Source #

Show a => Show (GenericArbitraryUG genList a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> GenericArbitraryUG genList a -> ShowS Source #

show :: GenericArbitraryUG genList a -> String Source #

showList :: [GenericArbitraryUG genList a] -> ShowS Source #

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

Defined in Data.Tagged

Methods

showsPrec :: Int -> Tagged s b -> ShowS Source #

show :: Tagged s b -> String Source #

showList :: [Tagged s b] -> ShowS Source #

(Show (f a), Show (g a), Show a) => Show (These1 f g a) 
Instance details

Defined in Data.Functor.These

Methods

showsPrec :: Int -> These1 f g a -> ShowS Source #

show :: These1 f g a -> String Source #

showList :: [These1 f g a] -> ShowS Source #

(Show1 f, Show a) => Show (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

(Show e, Show1 m, Show a) => Show (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

showsPrec :: Int -> ExceptT e m a -> ShowS Source #

show :: ExceptT e m a -> String Source #

showList :: [ExceptT e m a] -> ShowS Source #

(Show1 f, Show a) => Show (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Show a => Show (Constant a b) 
Instance details

Defined in Data.Functor.Constant

(Show1 f, Show a) => Show (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

Methods

showsPrec :: Int -> Reverse f a -> ShowS Source #

show :: Reverse f a -> String Source #

showList :: [Reverse f a] -> ShowS Source #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

show :: (a, b, c) -> String Source #

showList :: [(a, b, c)] -> ShowS Source #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :*: g) p -> ShowS Source #

show :: (f :*: g) p -> String Source #

showList :: [(f :*: g) p] -> ShowS Source #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :+: g) p -> ShowS Source #

show :: (f :+: g) p -> String Source #

showList :: [(f :+: g) p] -> ShowS Source #

Show c => Show (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> K1 i c p -> ShowS Source #

show :: K1 i c p -> String Source #

showList :: [K1 i c p] -> ShowS Source #

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

Show (f (g a)) => Show (Compose f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

showsPrec :: Int -> Compose f g a -> ShowS Source #

show :: Compose f g a -> String Source #

showList :: [Compose f g a] -> ShowS Source #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :.: g) p -> ShowS Source #

show :: (f :.: g) p -> String Source #

showList :: [(f :.: g) p] -> ShowS Source #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> M1 i c f p -> ShowS Source #

show :: M1 i c f p -> String Source #

showList :: [M1 i c f p] -> ShowS Source #

Show (f a) => Show (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

showsPrec :: Int -> Clown f a b -> ShowS Source #

show :: Clown f a b -> String Source #

showList :: [Clown f a b] -> ShowS Source #

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

Defined in Data.Bifunctor.Flip

Methods

showsPrec :: Int -> Flip p a b -> ShowS Source #

show :: Flip p a b -> String Source #

showList :: [Flip p a b] -> ShowS Source #

Show (g b) => Show (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

showsPrec :: Int -> Joker g a b -> ShowS Source #

show :: Joker g a b -> String Source #

showList :: [Joker g a b] -> ShowS Source #

Show (p a b) => Show (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

showsPrec :: Int -> WrappedBifunctor p a b -> ShowS Source #

show :: WrappedBifunctor p a b -> String Source #

showList :: [WrappedBifunctor p a b] -> ShowS Source #

Show a => Show (GenericArbitraryG genList weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> GenericArbitraryG genList weights a -> ShowS Source #

show :: GenericArbitraryG genList weights a -> String Source #

showList :: [GenericArbitraryG genList weights a] -> ShowS Source #

Show a => Show (GenericArbitraryRecG genList weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> GenericArbitraryRecG genList weights a -> ShowS Source #

show :: GenericArbitraryRecG genList weights a -> String Source #

showList :: [GenericArbitraryRecG genList weights a] -> ShowS Source #

Show a => Show (GenericArbitraryWith opts weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

showsPrec :: Int -> GenericArbitraryWith opts weights a -> ShowS Source #

show :: GenericArbitraryWith opts weights a -> String Source #

showList :: [GenericArbitraryWith opts weights a] -> ShowS Source #

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

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

Defined in Data.Bifunctor.Product

Methods

showsPrec :: Int -> Product f g a b -> ShowS Source #

show :: Product f g a b -> String Source #

showList :: [Product f g a b] -> ShowS Source #

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

Defined in Data.Bifunctor.Sum

Methods

showsPrec :: Int -> Sum p q a b -> ShowS Source #

show :: Sum p q a b -> String Source #

showList :: [Sum p q a b] -> ShowS Source #

(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 (f (p a b)) => Show (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

showsPrec :: Int -> Tannen f p a b -> ShowS Source #

show :: Tannen f p a b -> String Source #

showList :: [Tannen f p a b] -> 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 (p (f a) (g b)) => Show (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

showsPrec :: Int -> Biff p f g a b -> ShowS Source #

show :: Biff p f g a b -> String Source #

showList :: [Biff p f g a b] -> 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 #

data Int8 Source #

8-bit signed integer type

Instances

Instances details
Arbitrary Int8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int8 #

shrink :: Int8 -> [Int8] #

CoArbitrary Int8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Int8 -> Gen b -> Gen b

FromJSON Int8 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int8 #

parseJSONList :: Value -> Parser [Int8] #

omittedField :: Maybe Int8 #

FromJSONKey Int8 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Int8

fromJSONKeyList :: FromJSONKeyFunction [Int8]

ToJSON Int8 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int8 -> Value #

toEncoding :: Int8 -> Encoding #

toJSONList :: [Int8] -> Value #

toEncodingList :: [Int8] -> Encoding #

omitField :: Int8 -> Bool #

ToJSONKey Int8 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Int8

toJSONKeyList :: ToJSONKeyFunction [Int8]

Bits Int8

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int8

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Bounded Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int8

Since: base-2.1

Instance details

Defined in GHC.Int

NFData Int8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int8 -> () Source #

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Ord Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int8 -> Int #

hash :: Int8 -> Int

Uniform Int8 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int8

UniformRange Int8 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int8, Int8) -> g -> m Int8

Unbox Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int8 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int8 -> Code m Int8 Source #

Vector Vector Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Int8 -> ST s (Vector Int8)

basicUnsafeThaw :: Vector Int8 -> ST s (Mutable Vector s Int8)

basicLength :: Vector Int8 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Int8 -> Vector Int8

basicUnsafeIndexM :: Vector Int8 -> Int -> Box Int8

basicUnsafeCopy :: Mutable Vector s Int8 -> Vector Int8 -> ST s ()

elemseq :: Vector Int8 -> Int8 -> b -> b

MVector MVector Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Int8 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Int8 -> MVector s Int8

basicOverlaps :: MVector s Int8 -> MVector s Int8 -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Int8)

basicInitialize :: MVector s Int8 -> ST s ()

basicUnsafeReplicate :: Int -> Int8 -> ST s (MVector s Int8)

basicUnsafeRead :: MVector s Int8 -> Int -> ST s Int8

basicUnsafeWrite :: MVector s Int8 -> Int -> Int8 -> ST s ()

basicClear :: MVector s Int8 -> ST s ()

basicSet :: MVector s Int8 -> Int8 -> ST s ()

basicUnsafeCopy :: MVector s Int8 -> MVector s Int8 -> ST s ()

basicUnsafeMove :: MVector s Int8 -> MVector s Int8 -> ST s ()

basicUnsafeGrow :: MVector s Int8 -> Int -> ST s (MVector s Int8)

newtype Vector Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int8 = V_Int8 (Vector Int8)
newtype MVector s Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int8 = MV_Int8 (MVector s Int8)

data Int16 Source #

16-bit signed integer type

Instances

Instances details
Arbitrary Int16 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int16 #

shrink :: Int16 -> [Int16] #

CoArbitrary Int16 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Int16 -> Gen b -> Gen b

FromJSON Int16 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int16 #

parseJSONList :: Value -> Parser [Int16] #

omittedField :: Maybe Int16 #

FromJSONKey Int16 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Int16

fromJSONKeyList :: FromJSONKeyFunction [Int16]

ToJSON Int16 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int16 -> Value #

toEncoding :: Int16 -> Encoding #

toJSONList :: [Int16] -> Value #

toEncodingList :: [Int16] -> Encoding #

omitField :: Int16 -> Bool #

ToJSONKey Int16 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Int16

toJSONKeyList :: ToJSONKeyFunction [Int16]

Bits Int16

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int16

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Bounded Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

NFData Int16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int16 -> () Source #

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int16 -> Int #

hash :: Int16 -> Int

Uniform Int16 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int16

UniformRange Int16 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int16, Int16) -> g -> m Int16

Unbox Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int16 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int16 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int16 -> Code m Int16 Source #

Vector Vector Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Int16 -> ST s (Vector Int16)

basicUnsafeThaw :: Vector Int16 -> ST s (Mutable Vector s Int16)

basicLength :: Vector Int16 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Int16 -> Vector Int16

basicUnsafeIndexM :: Vector Int16 -> Int -> Box Int16

basicUnsafeCopy :: Mutable Vector s Int16 -> Vector Int16 -> ST s ()

elemseq :: Vector Int16 -> Int16 -> b -> b

MVector MVector Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Int16 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Int16 -> MVector s Int16

basicOverlaps :: MVector s Int16 -> MVector s Int16 -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Int16)

basicInitialize :: MVector s Int16 -> ST s ()

basicUnsafeReplicate :: Int -> Int16 -> ST s (MVector s Int16)

basicUnsafeRead :: MVector s Int16 -> Int -> ST s Int16

basicUnsafeWrite :: MVector s Int16 -> Int -> Int16 -> ST s ()

basicClear :: MVector s Int16 -> ST s ()

basicSet :: MVector s Int16 -> Int16 -> ST s ()

basicUnsafeCopy :: MVector s Int16 -> MVector s Int16 -> ST s ()

basicUnsafeMove :: MVector s Int16 -> MVector s Int16 -> ST s ()

basicUnsafeGrow :: MVector s Int16 -> Int -> ST s (MVector s Int16)

newtype Vector Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int16 = V_Int16 (Vector Int16)
newtype MVector s Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int16 = MV_Int16 (MVector s Int16)

data Int32 Source #

32-bit signed integer type

Instances

Instances details
Arbitrary Int32 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int32 #

shrink :: Int32 -> [Int32] #

CoArbitrary Int32 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Int32 -> Gen b -> Gen b

FromJSON Int32 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int32 #

parseJSONList :: Value -> Parser [Int32] #

omittedField :: Maybe Int32 #

FromJSONKey Int32 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Int32

fromJSONKeyList :: FromJSONKeyFunction [Int32]

ToJSON Int32 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int32 -> Value #

toEncoding :: Int32 -> Encoding #

toJSONList :: [Int32] -> Value #

toEncodingList :: [Int32] -> Encoding #

omitField :: Int32 -> Bool #

ToJSONKey Int32 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Int32

toJSONKeyList :: ToJSONKeyFunction [Int32]

Bits Int32

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int32

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

FromCBOR Int32 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Int32 #

label :: Proxy Int32 -> Text #

ToCBOR Int32 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Int32 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Int32 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Int32] -> Size #

NFData Int32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int32 -> () Source #

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int

Uniform Int32 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int32

UniformRange Int32 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int32, Int32) -> g -> m Int32

Unbox Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int32 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int32 -> Code m Int32 Source #

Vector Vector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Int32 -> ST s (Vector Int32)

basicUnsafeThaw :: Vector Int32 -> ST s (Mutable Vector s Int32)

basicLength :: Vector Int32 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Int32 -> Vector Int32

basicUnsafeIndexM :: Vector Int32 -> Int -> Box Int32

basicUnsafeCopy :: Mutable Vector s Int32 -> Vector Int32 -> ST s ()

elemseq :: Vector Int32 -> Int32 -> b -> b

MVector MVector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Int32 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Int32 -> MVector s Int32

basicOverlaps :: MVector s Int32 -> MVector s Int32 -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Int32)

basicInitialize :: MVector s Int32 -> ST s ()

basicUnsafeReplicate :: Int -> Int32 -> ST s (MVector s Int32)

basicUnsafeRead :: MVector s Int32 -> Int -> ST s Int32

basicUnsafeWrite :: MVector s Int32 -> Int -> Int32 -> ST s ()

basicClear :: MVector s Int32 -> ST s ()

basicSet :: MVector s Int32 -> Int32 -> ST s ()

basicUnsafeCopy :: MVector s Int32 -> MVector s Int32 -> ST s ()

basicUnsafeMove :: MVector s Int32 -> MVector s Int32 -> ST s ()

basicUnsafeGrow :: MVector s Int32 -> Int -> ST s (MVector s Int32)

newtype Vector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int32 = V_Int32 (Vector Int32)
newtype MVector s Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int32 = MV_Int32 (MVector s Int32)

data Int64 Source #

64-bit signed integer type

Instances

Instances details
Arbitrary Int64 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int64 #

shrink :: Int64 -> [Int64] #

CoArbitrary Int64 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Int64 -> Gen b -> Gen b

FromJSON Int64 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int64 #

parseJSONList :: Value -> Parser [Int64] #

omittedField :: Maybe Int64 #

FromJSONKey Int64 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Int64

fromJSONKeyList :: FromJSONKeyFunction [Int64]

ToJSON Int64 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int64 -> Value #

toEncoding :: Int64 -> Encoding #

toJSONList :: [Int64] -> Value #

toEncodingList :: [Int64] -> Encoding #

omitField :: Int64 -> Bool #

ToJSONKey Int64 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Int64

toJSONKeyList :: ToJSONKeyFunction [Int64]

Bits Int64

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int64

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ix Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

FromCBOR Int64 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Int64 #

label :: Proxy Int64 -> Text #

ToCBOR Int64 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Int64 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Int64 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Int64] -> Size #

NFData Int64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int64 -> () Source #

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int #

hash :: Int64 -> Int

Uniform Int64 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int64

UniformRange Int64 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int64, Int64) -> g -> m Int64

Unbox Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Lift Int64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Int64 -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Int64 -> Code m Int64 Source #

Vector Vector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s Int64 -> ST s (Vector Int64)

basicUnsafeThaw :: Vector Int64 -> ST s (Mutable Vector s Int64)

basicLength :: Vector Int64 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Int64 -> Vector Int64

basicUnsafeIndexM :: Vector Int64 -> Int -> Box Int64

basicUnsafeCopy :: Mutable Vector s Int64 -> Vector Int64 -> ST s ()

elemseq :: Vector Int64 -> Int64 -> b -> b

MVector MVector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Int64 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Int64 -> MVector s Int64

basicOverlaps :: MVector s Int64 -> MVector s Int64 -> Bool

basicUnsafeNew :: Int -> ST s (MVector s Int64)

basicInitialize :: MVector s Int64 -> ST s ()

basicUnsafeReplicate :: Int -> Int64 -> ST s (MVector s Int64)

basicUnsafeRead :: MVector s Int64 -> Int -> ST s Int64

basicUnsafeWrite :: MVector s Int64 -> Int -> Int64 -> ST s ()

basicClear :: MVector s Int64 -> ST s ()

basicSet :: MVector s Int64 -> Int64 -> ST s ()

basicUnsafeCopy :: MVector s Int64 -> MVector s Int64 -> ST s ()

basicUnsafeMove :: MVector s Int64 -> MVector s Int64 -> ST s ()

basicUnsafeGrow :: MVector s Int64 -> Int -> ST s (MVector s Int64)

newtype Vector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int64 = V_Int64 (Vector Int64)
newtype MVector s Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int64 = MV_Int64 (MVector s Int64)

newtype Last a Source #

Maybe monoid returning the rightmost non-Nothing value.

Last a is isomorphic to Dual (First a), and thus to Dual (Alt Maybe a)

>>> getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world"))
Just "world"

Beware that Data.Monoid.Last is different from Data.Semigroup.Last. The former returns the last non-Nothing, so x <> Data.Monoid.Last Nothing = x. The latter simply returns the last value, thus x <> Data.Semigroup.Last Nothing = Data.Semigroup.Last Nothing.

Constructors

Last 

Fields

Instances

Instances details
FromJSON1 Last 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Last a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Last a]

liftOmittedField :: Maybe a -> Maybe (Last a)

ToJSON1 Last 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Last a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Last a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Last a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Last a] -> Encoding

liftOmitField :: (a -> Bool) -> Last a -> Bool

Foldable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Last m -> m Source #

foldMap :: Monoid m => (a -> m) -> Last a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Last a -> m Source #

foldr :: (a -> b -> b) -> b -> Last a -> b Source #

foldr' :: (a -> b -> b) -> b -> Last a -> b Source #

foldl :: (b -> a -> b) -> b -> Last a -> b Source #

foldl' :: (b -> a -> b) -> b -> Last a -> b Source #

foldr1 :: (a -> a -> a) -> Last a -> a Source #

foldl1 :: (a -> a -> a) -> Last a -> a Source #

toList :: Last a -> [a] Source #

null :: Last a -> Bool Source #

length :: Last a -> Int Source #

elem :: Eq a => a -> Last a -> Bool Source #

maximum :: Ord a => Last a -> a Source #

minimum :: Ord a => Last a -> a Source #

sum :: Num a => Last a -> a Source #

product :: Num a => Last a -> a Source #

Traversable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) Source #

sequenceA :: Applicative f => Last (f a) -> f (Last a) Source #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) Source #

sequence :: Monad m => Last (m a) -> m (Last a) Source #

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Last a Source #

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

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c Source #

(*>) :: Last a -> Last b -> Last b Source #

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

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

return :: a -> Last a Source #

NFData1 Last

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Last a -> () Source #

Generic1 Last 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 Last :: k -> Type Source #

Methods

from1 :: forall (a :: k). Last a -> Rep1 Last a Source #

to1 :: forall (a :: k). Rep1 Last a -> Last a Source #

Arbitrary a => Arbitrary (Last a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Last a) #

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

CoArbitrary a => CoArbitrary (Last a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Last a -> Gen b -> Gen b

FromJSON a => FromJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Last a) #

parseJSONList :: Value -> Parser [Last a] #

omittedField :: Maybe (Last a) #

ToJSON a => ToJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Last a -> Value #

toEncoding :: Last a -> Encoding #

toJSONList :: [Last a] -> Value #

toEncodingList :: [Last a] -> Encoding #

omitField :: Last a -> Bool #

Monoid (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: Last a Source #

mappend :: Last a -> Last a -> Last a Source #

mconcat :: [Last a] -> Last a Source #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

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

Generic (Last a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Last a) :: Type -> Type Source #

Methods

from :: Last a -> Rep (Last a) x Source #

to :: Rep (Last a) x -> Last a Source #

Read a => Read (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Last a -> ShowS Source #

show :: Last a -> String Source #

showList :: [Last a] -> ShowS Source #

NFData a => NFData (Last a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () Source #

Eq a => Eq (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

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

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

Ord a => Ord (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

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

(<) :: Last a -> Last a -> Bool Source #

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

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

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

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

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

type Rep1 Last

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep1 Last = D1 ('MetaData "Last" "Data.Monoid" "base" 'True) (C1 ('MetaCons "Last" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))
type Rep (Last a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep (Last a) = D1 ('MetaData "Last" "Data.Monoid" "base" 'True) (C1 ('MetaCons "Last" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a))))

newtype First a Source #

Maybe monoid returning the leftmost non-Nothing value.

First a is isomorphic to Alt Maybe a, but precedes it historically.

>>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world"))
Just "hello"

Beware that Data.Monoid.First is different from Data.Semigroup.First. The former returns the first non-Nothing, so Data.Monoid.First Nothing <> x = x. The latter simply returns the first value, thus Data.Semigroup.First Nothing <> x = Data.Semigroup.First Nothing.

Constructors

First 

Fields

Instances

Instances details
FromJSON1 First 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (First a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [First a]

liftOmittedField :: Maybe a -> Maybe (First a)

ToJSON1 First 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> First a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [First a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> First a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [First a] -> Encoding

liftOmitField :: (a -> Bool) -> First a -> Bool

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => First m -> m Source #

foldMap :: Monoid m => (a -> m) -> First a -> m Source #

foldMap' :: Monoid m => (a -> m) -> First a -> m Source #

foldr :: (a -> b -> b) -> b -> First a -> b Source #

foldr' :: (a -> b -> b) -> b -> First a -> b Source #

foldl :: (b -> a -> b) -> b -> First a -> b Source #

foldl' :: (b -> a -> b) -> b -> First a -> b Source #

foldr1 :: (a -> a -> a) -> First a -> a Source #

foldl1 :: (a -> a -> a) -> First a -> a Source #

toList :: First a -> [a] Source #

null :: First a -> Bool Source #

length :: First a -> Int Source #

elem :: Eq a => a -> First a -> Bool Source #

maximum :: Ord a => First a -> a Source #

minimum :: Ord a => First a -> a Source #

sum :: Num a => First a -> a Source #

product :: Num a => First a -> a Source #

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) Source #

sequenceA :: Applicative f => First (f a) -> f (First a) Source #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) Source #

sequence :: Monad m => First (m a) -> m (First a) Source #

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> First a Source #

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

liftA2 :: (a -> b -> c) -> First a -> First b -> First c Source #

(*>) :: First a -> First b -> First b Source #

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

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

return :: a -> First a Source #

NFData1 First

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> First a -> () Source #

Generic1 First 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 First :: k -> Type Source #

Methods

from1 :: forall (a :: k). First a -> Rep1 First a Source #

to1 :: forall (a :: k). Rep1 First a -> First a Source #

Arbitrary a => Arbitrary (First a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (First a) #

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

CoArbitrary a => CoArbitrary (First a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: First a -> Gen b -> Gen b

FromJSON a => FromJSON (First a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (First a) #

parseJSONList :: Value -> Parser [First a] #

omittedField :: Maybe (First a) #

ToJSON a => ToJSON (First a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: First a -> Value #

toEncoding :: First a -> Encoding #

toJSONList :: [First a] -> Value #

toEncodingList :: [First a] -> Encoding #

omitField :: First a -> Bool #

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a Source #

mappend :: First a -> First a -> First a Source #

mconcat :: [First a] -> First a Source #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

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

Generic (First a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a) :: Type -> Type Source #

Methods

from :: First a -> Rep (First a) x Source #

to :: Rep (First a) x -> First a Source #

Read a => Read (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

NFData a => NFData (First a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () Source #

Eq a => Eq (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

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

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

Ord a => Ord (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

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

(<) :: First a -> First a -> Bool Source #

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

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

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

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

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

type Rep1 First

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep1 First = D1 ('MetaData "First" "Data.Monoid" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))
type Rep (First a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep (First a) = D1 ('MetaData "First" "Data.Monoid" "base" 'True) (C1 ('MetaCons "First" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFirst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a))))

class (Typeable e, Show e) => Exception e where Source #

Any type that you wish to throw or catch as an exception must be an instance of the Exception class. The simplest case is a new exception type directly below the root:

data MyException = ThisException | ThatException
    deriving Show

instance Exception MyException

The default method definitions in the Exception class do what we need in this case. You can now throw and catch ThisException and ThatException as exceptions:

*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
Caught ThisException

In more complicated examples, you may wish to define a whole hierarchy of exceptions:

---------------------------------------------------------------------
-- Make the root exception type for all the exceptions in a compiler

data SomeCompilerException = forall e . Exception e => SomeCompilerException e

instance Show SomeCompilerException where
    show (SomeCompilerException e) = show e

instance Exception SomeCompilerException

compilerExceptionToException :: Exception e => e -> SomeException
compilerExceptionToException = toException . SomeCompilerException

compilerExceptionFromException :: Exception e => SomeException -> Maybe e
compilerExceptionFromException x = do
    SomeCompilerException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make a subhierarchy for exceptions in the frontend of the compiler

data SomeFrontendException = forall e . Exception e => SomeFrontendException e

instance Show SomeFrontendException where
    show (SomeFrontendException e) = show e

instance Exception SomeFrontendException where
    toException = compilerExceptionToException
    fromException = compilerExceptionFromException

frontendExceptionToException :: Exception e => e -> SomeException
frontendExceptionToException = toException . SomeFrontendException

frontendExceptionFromException :: Exception e => SomeException -> Maybe e
frontendExceptionFromException x = do
    SomeFrontendException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make an exception type for a particular frontend compiler exception

data MismatchedParentheses = MismatchedParentheses
    deriving Show

instance Exception MismatchedParentheses where
    toException   = frontendExceptionToException
    fromException = frontendExceptionFromException

We can now catch a MismatchedParentheses exception as MismatchedParentheses, SomeFrontendException or SomeCompilerException, but not other types, e.g. IOException:

*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
*** Exception: MismatchedParentheses

Minimal complete definition

Nothing

Methods

toException :: e -> SomeException Source #

fromException :: SomeException -> Maybe e Source #

displayException :: e -> String Source #

Render this exception value in a human-friendly manner.

Default implementation: show.

Since: base-4.8.0.0

Instances

Instances details
Exception AesonException 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

toException :: AesonException -> SomeException Source #

fromException :: SomeException -> Maybe AesonException Source #

displayException :: AesonException -> String Source #

Exception Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Exception.Type

Exception ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Exception ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Exception AllocationLimitExceeded

Since: base-4.8.0.0

Instance details

Defined in GHC.IO.Exception

Exception ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Exception Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception DecoderError 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

toException :: DecoderError -> SomeException Source #

fromException :: SomeException -> Maybe DecoderError Source #

displayException :: DecoderError -> String Source #

Exception ExceptionInLinkedThread 
Instance details

Defined in Control.Monad.Class.MonadAsync

Methods

toException :: ExceptionInLinkedThread -> SomeException Source #

fromException :: SomeException -> Maybe ExceptionInLinkedThread Source #

displayException :: ExceptionInLinkedThread -> String Source #

Exception BlockedIndefinitely 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Methods

toException :: BlockedIndefinitely -> SomeException Source #

fromException :: SomeException -> Maybe BlockedIndefinitely Source #

displayException :: BlockedIndefinitely -> String Source #

Exception Bug 
Instance details

Defined in Relude.Exception

Exception UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

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

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a Source #

Lift a computation from the IO monad. This allows us to run IO computations in any monadic stack, so long as it supports these kinds of operations (i.e. IO is the base monad for the stack).

Example

Expand
import Control.Monad.Trans.State -- from the "transformers" library

printState :: Show s => StateT s IO ()
printState = do
  state <- get
  liftIO $ print state

Had we omitted liftIO, we would have ended up with this error:

• Couldn't match type ‘IO’ with ‘StateT s IO’
 Expected type: StateT s IO ()
   Actual type: IO ()

The important part here is the mismatch between StateT s IO () and IO ().

Luckily, we know of a function that takes an IO a and returns an (m a): liftIO, enabling us to run the program and see the expected results:

> evalStateT printState "hello"
"hello"

> evalStateT printState 3
3

Instances

Instances details
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a Source #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a Source #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a Source #

(Functor f, MonadIO m) => MonadIO (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftIO :: IO a -> FreeT f m a Source #

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

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a Source #

MonadIO m => MonadIO (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftIO :: IO a -> IdentityT m a Source #

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

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a Source #

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

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a Source #

newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) infixr 9 Source #

Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.

Constructors

Compose infixr 9 

Fields

Instances

Instances details
TestEquality f => TestEquality (Compose f g :: k2 -> Type)

The deduction (via generativity) that if g x :~: g y then x :~: y.

Since: base-4.14.0.0

Instance details

Defined in Data.Functor.Compose

Methods

testEquality :: forall (a :: k) (b :: k). Compose f g a -> Compose f g b -> Maybe (a :~: b) Source #

Functor f => Generic1 (Compose f g :: k -> Type) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep1 (Compose f g) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Compose f g a -> Rep1 (Compose f g) a Source #

to1 :: forall (a :: k0). Rep1 (Compose f g) a -> Compose f g a Source #

Unbox (f (g a)) => Vector Vector (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Compose f g a) -> ST s (Vector (Compose f g a))

basicUnsafeThaw :: Vector (Compose f g a) -> ST s (Mutable Vector s (Compose f g a))

basicLength :: Vector (Compose f g a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Compose f g a) -> Vector (Compose f g a)

basicUnsafeIndexM :: Vector (Compose f g a) -> Int -> Box (Compose f g a)

basicUnsafeCopy :: Mutable Vector s (Compose f g a) -> Vector (Compose f g a) -> ST s ()

elemseq :: Vector (Compose f g a) -> Compose f g a -> b -> b

Unbox (f (g a)) => MVector MVector (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Compose f g a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Compose f g a) -> MVector s (Compose f g a)

basicOverlaps :: MVector s (Compose f g a) -> MVector s (Compose f g a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Compose f g a))

basicInitialize :: MVector s (Compose f g a) -> ST s ()

basicUnsafeReplicate :: Int -> Compose f g a -> ST s (MVector s (Compose f g a))

basicUnsafeRead :: MVector s (Compose f g a) -> Int -> ST s (Compose f g a)

basicUnsafeWrite :: MVector s (Compose f g a) -> Int -> Compose f g a -> ST s ()

basicClear :: MVector s (Compose f g a) -> ST s ()

basicSet :: MVector s (Compose f g a) -> Compose f g a -> ST s ()

basicUnsafeCopy :: MVector s (Compose f g a) -> MVector s (Compose f g a) -> ST s ()

basicUnsafeMove :: MVector s (Compose f g a) -> MVector s (Compose f g a) -> ST s ()

basicUnsafeGrow :: MVector s (Compose f g a) -> Int -> ST s (MVector s (Compose f g a))

(Arbitrary1 f, Arbitrary1 g) => Arbitrary1 (Compose f g) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (Compose f g a)

liftShrink :: (a -> [a]) -> Compose f g a -> [Compose f g a]

(FromJSON1 f, FromJSON1 g) => FromJSON1 (Compose f g) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Compose f g a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Compose f g a]

liftOmittedField :: Maybe a -> Maybe (Compose f g a)

(ToJSON1 f, ToJSON1 g) => ToJSON1 (Compose f g) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Compose f g a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Compose f g a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Compose f g a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Compose f g a] -> Encoding

liftOmitField :: (a -> Bool) -> Compose f g a -> Bool

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fold :: Monoid m => Compose f g m -> m Source #

foldMap :: Monoid m => (a -> m) -> Compose f g a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m Source #

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

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

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

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

foldr1 :: (a -> a -> a) -> Compose f g a -> a Source #

foldl1 :: (a -> a -> a) -> Compose f g a -> a Source #

toList :: Compose f g a -> [a] Source #

null :: Compose f g a -> Bool Source #

length :: Compose f g a -> Int Source #

elem :: Eq a => a -> Compose f g a -> Bool Source #

maximum :: Ord a => Compose f g a -> a Source #

minimum :: Ord a => Compose f g a -> a Source #

sum :: Num a => Compose f g a -> a Source #

product :: Num a => Compose f g a -> a Source #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Compose f g a) Source #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Compose f g a] Source #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Compose f g a) Source #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Compose f g a] Source #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Compose f g a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Compose f g a] -> ShowS Source #

(Functor f, Contravariant g) => Contravariant (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Compose f g a -> Compose f g a' Source #

(>$) :: b -> Compose f g b -> Compose 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 #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a Source #

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

some :: Compose f g a -> Compose f g [a] Source #

many :: Compose f g a -> Compose 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

Methods

pure :: a -> Compose f g a Source #

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

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

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

(<*) :: Compose f g a -> Compose f g b -> Compose 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 #

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

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Compose f g a -> () Source #

(Hashable1 f, Hashable1 g) => Hashable1 (Compose f g) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Compose f g a -> Int

(Arbitrary1 f, Arbitrary1 g, Arbitrary a) => Arbitrary (Compose f g a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Compose f g a) #

shrink :: Compose f g a -> [Compose f g a] #

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (Compose f g a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Compose f g a) #

parseJSONList :: Value -> Parser [Compose f g a] #

omittedField :: Maybe (Compose f g a) #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Compose f g a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Compose f g a -> Value #

toEncoding :: Compose f g a -> Encoding #

toJSONList :: [Compose f g a] -> Value #

toEncodingList :: [Compose f g a] -> Encoding #

omitField :: Compose f g a -> Bool #

(Typeable a, Typeable f, Typeable g, Typeable k1, Typeable k2, Data (f (g a))) => Data (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Compose f g a -> c (Compose f g a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Compose f g a) Source #

toConstr :: Compose f g a -> Constr Source #

dataTypeOf :: Compose f g a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Compose f g a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Compose f g a)) Source #

gmapT :: (forall b. Data b => b -> b) -> Compose f g a -> Compose f g a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Compose f g a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Compose f g a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) Source #

Monoid (f (g a)) => Monoid (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

mempty :: Compose f g a Source #

mappend :: Compose f g a -> Compose f g a -> Compose f g a Source #

mconcat :: [Compose f g a] -> Compose f g a Source #

Semigroup (f (g a)) => Semigroup (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

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

sconcat :: NonEmpty (Compose f g a) -> Compose f g a Source #

stimes :: Integral b => b -> Compose f g a -> Compose f g a Source #

Generic (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type Source #

Methods

from :: Compose f g a -> Rep (Compose f g a) x Source #

to :: Rep (Compose f g a) x -> Compose f g a Source #

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

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Show (f (g a)) => Show (Compose f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

showsPrec :: Int -> Compose f g a -> ShowS Source #

show :: Compose f g a -> String Source #

showList :: [Compose f g a] -> ShowS Source #

(NFData1 f, NFData1 g, NFData a) => NFData (Compose f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Compose f g a -> () Source #

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

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(==) :: Compose f g a -> Compose f g a -> Bool Source #

(/=) :: Compose f g a -> Compose f g a -> Bool Source #

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

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

compare :: Compose f g a -> Compose f g a -> Ordering Source #

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

(<=) :: Compose f g a -> Compose f g a -> Bool Source #

(>) :: Compose f g a -> Compose f g a -> Bool Source #

(>=) :: Compose f g a -> Compose f g a -> Bool Source #

max :: Compose f g a -> Compose f g a -> Compose f g a Source #

min :: Compose f g a -> Compose f g a -> Compose f g a Source #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Compose f g a -> Int #

hash :: Compose f g a -> Int

Unbox (f (g a)) => Unbox (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 (Compose f g :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

type Rep1 (Compose f g :: k -> Type) = D1 ('MetaData "Compose" "Data.Functor.Compose" "base" 'True) (C1 ('MetaCons "Compose" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCompose") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (f :.: Rec1 g)))
newtype MVector s (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Compose f g a) = MV_Compose (MVector s (f (g a)))
type Rep (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

type Rep (Compose f g a) = D1 ('MetaData "Compose" "Data.Functor.Compose" "base" 'True) (C1 ('MetaCons "Compose" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCompose") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f (g a)))))
newtype Vector (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Compose f g a) = V_Compose (Vector (f (g a)))

class IsList l where Source #

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

Since: base-4.7.0.0

Minimal complete definition

fromList, toList

Methods

fromList :: [Item l] -> l Source #

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

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

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

fromListN (length xs) xs == fromList xs

Instances

Instances details
IsList ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Associated Types

type Item ByteArray Source #

IsList Version

Since: base-4.8.0.0

Instance details

Defined in GHC.IsList

Associated Types

type Item Version Source #

IsList CallStack

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

Since: base-4.9.0.0

Instance details

Defined in GHC.IsList

Associated Types

type Item CallStack Source #

IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Internal.Type

Associated Types

type Item ByteString Source #

IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Lazy.Internal

Associated Types

type Item ByteString Source #

IsList ShortByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Short.Internal

Associated Types

type Item ShortByteString Source #

IsList ByteArray 
Instance details

Defined in Codec.CBOR.ByteArray

Associated Types

type Item ByteArray Source #

Methods

fromList :: [Item ByteArray] -> ByteArray Source #

fromListN :: Int -> [Item ByteArray] -> ByteArray Source #

toList :: ByteArray -> [Item ByteArray] Source #

IsList SlicedByteArray 
Instance details

Defined in Codec.CBOR.ByteArray.Sliced

Associated Types

type Item SlicedByteArray Source #

Methods

fromList :: [Item SlicedByteArray] -> SlicedByteArray Source #

fromListN :: Int -> [Item SlicedByteArray] -> SlicedByteArray Source #

toList :: SlicedByteArray -> [Item SlicedByteArray] Source #

IsList IntSet

Since: containers-0.5.6.2

Instance details

Defined in Data.IntSet.Internal

Associated Types

type Item IntSet Source #

IsList ShortText 
Instance details

Defined in Data.Text.Short.Internal

Associated Types

type Item ShortText Source #

Methods

fromList :: [Item ShortText] -> ShortText Source #

fromListN :: Int -> [Item ShortText] -> ShortText Source #

toList :: ShortText -> [Item ShortText] Source #

IsList (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Associated Types

type Item (KeyMap v) Source #

Methods

fromList :: [Item (KeyMap v)] -> KeyMap v Source #

fromListN :: Int -> [Item (KeyMap v)] -> KeyMap v Source #

toList :: KeyMap v -> [Item (KeyMap v)] Source #

IsList (ZipList a)

Since: base-4.15.0.0

Instance details

Defined in GHC.IsList

Associated Types

type Item (ZipList a) Source #

Methods

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

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

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

IsList (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.IsList

Associated Types

type Item (NonEmpty a) Source #

IsList (IntMap a)

Since: containers-0.5.6.2

Instance details

Defined in Data.IntMap.Internal

Associated Types

type Item (IntMap a) Source #

Methods

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

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

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

IsList (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Item (Seq a) Source #

Methods

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

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

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

Ord a => IsList (Set a)

Since: containers-0.5.6.2

Instance details

Defined in Data.Set.Internal

Associated Types

type Item (Set a) Source #

Methods

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

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

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

IsList (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Associated Types

type Item (DNonEmpty a) Source #

Methods

fromList :: [Item (DNonEmpty a)] -> DNonEmpty a Source #

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

toList :: DNonEmpty a -> [Item (DNonEmpty a)] Source #

IsList (DList a) 
Instance details

Defined in Data.DList.Internal

Associated Types

type Item (DList a) Source #

Methods

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

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

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

IsList (Array a) 
Instance details

Defined in Data.Primitive.Array

Associated Types

type Item (Array a) Source #

Methods

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

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

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

Prim a => IsList (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Associated Types

type Item (PrimArray a) Source #

Methods

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

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

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

IsList (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Associated Types

type Item (SmallArray a) Source #

Methods

fromList :: [Item (SmallArray a)] -> SmallArray a Source #

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

toList :: SmallArray a -> [Item (SmallArray a)] Source #

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

Defined in Data.HashSet.Internal

Associated Types

type Item (HashSet a) Source #

Methods

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

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

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

IsList (Vector a) 
Instance details

Defined in Data.Vector

Associated Types

type Item (Vector a) Source #

Methods

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

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

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

Prim a => IsList (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Associated Types

type Item (Vector a) Source #

Methods

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

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

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

Storable a => IsList (Vector a) 
Instance details

Defined in Data.Vector.Storable

Associated Types

type Item (Vector a) Source #

Methods

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

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

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

IsList [a]

Since: base-4.7.0.0

Instance details

Defined in GHC.IsList

Associated Types

type Item [a] Source #

Methods

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

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

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

Ord k => IsList (Map k v)

Since: containers-0.5.6.2

Instance details

Defined in Data.Map.Internal

Associated Types

type Item (Map k v) Source #

Methods

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

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

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

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

Defined in Data.HashMap.Internal

Associated Types

type Item (HashMap k v) Source #

Methods

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

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

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

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.

Methods

minBound :: a Source #

maxBound :: a Source #

Instances

Instances details
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 CBool 
Instance details

Defined in Foreign.C.Types

Bounded CChar 
Instance details

Defined in Foreign.C.Types

Bounded CInt 
Instance details

Defined in Foreign.C.Types

Bounded CIntMax 
Instance details

Defined in Foreign.C.Types

Bounded CIntPtr 
Instance details

Defined in Foreign.C.Types

Bounded CLLong 
Instance details

Defined in Foreign.C.Types

Bounded CLong 
Instance details

Defined in Foreign.C.Types

Bounded CPtrdiff 
Instance details

Defined in Foreign.C.Types

Bounded CSChar 
Instance details

Defined in Foreign.C.Types

Bounded CShort 
Instance details

Defined in Foreign.C.Types

Bounded CSigAtomic 
Instance details

Defined in Foreign.C.Types

Bounded CSize 
Instance details

Defined in Foreign.C.Types

Bounded CUChar 
Instance details

Defined in Foreign.C.Types

Bounded CUInt 
Instance details

Defined in Foreign.C.Types

Bounded CUIntMax 
Instance details

Defined in Foreign.C.Types

Bounded CUIntPtr 
Instance details

Defined in Foreign.C.Types

Bounded CULLong 
Instance details

Defined in Foreign.C.Types

Bounded CULong 
Instance details

Defined in Foreign.C.Types

Bounded CUShort 
Instance details

Defined in Foreign.C.Types

Bounded CWchar 
Instance details

Defined in Foreign.C.Types

Bounded Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Undefined 
Instance details

Defined in Relude.Debug

Bounded ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: () Source #

maxBound :: () Source #

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 Levity

Since: base-4.16.0.0

Instance details

Defined in GHC.Enum

Bounded VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded a => Bounded (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded (Down a)

Swaps minBound and maxBound of the underlying type.

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

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

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Bounded a => Bounded (a) 
Instance details

Defined in GHC.Enum

Methods

minBound :: (a) Source #

maxBound :: (a) Source #

Bounded (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

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

Defined in Data.Strict.Tuple

Methods

minBound :: Pair a b Source #

maxBound :: Pair a b Source #

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b) Source #

maxBound :: (a, b) Source #

Bounded a => Bounded (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

minBound :: Const a b Source #

maxBound :: Const a b Source #

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

minBound :: Ap f a Source #

maxBound :: Ap f a Source #

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

Defined in Data.Tagged

Methods

minBound :: Tagged s b Source #

maxBound :: Tagged s b Source #

(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 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 CBool 
Instance details

Defined in Foreign.C.Types

Enum CChar 
Instance details

Defined in Foreign.C.Types

Enum CClock 
Instance details

Defined in Foreign.C.Types

Enum CDouble 
Instance details

Defined in Foreign.C.Types

Enum CFloat 
Instance details

Defined in Foreign.C.Types

Enum CInt 
Instance details

Defined in Foreign.C.Types

Enum CIntMax 
Instance details

Defined in Foreign.C.Types

Enum CIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CLLong 
Instance details

Defined in Foreign.C.Types

Enum CLong 
Instance details

Defined in Foreign.C.Types

Enum CPtrdiff 
Instance details

Defined in Foreign.C.Types

Enum CSChar 
Instance details

Defined in Foreign.C.Types

Enum CSUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CShort 
Instance details

Defined in Foreign.C.Types

Enum CSigAtomic 
Instance details

Defined in Foreign.C.Types

Enum CSize 
Instance details

Defined in Foreign.C.Types

Enum CTime 
Instance details

Defined in Foreign.C.Types

Enum CUChar 
Instance details

Defined in Foreign.C.Types

Enum CUInt 
Instance details

Defined in Foreign.C.Types

Enum CUIntMax 
Instance details

Defined in Foreign.C.Types

Enum CUIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CULLong 
Instance details

Defined in Foreign.C.Types

Enum CULong 
Instance details

Defined in Foreign.C.Types

Enum CUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CUShort 
Instance details

Defined in Foreign.C.Types

Enum CWchar 
Instance details

Defined in Foreign.C.Types

Enum Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Enum ClosureType 
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Undefined 
Instance details

Defined in Relude.Debug

Enum Day 
Instance details

Defined in Data.Time.Calendar.Days

Enum DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Enum NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Enum ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: () -> () Source #

pred :: () -> () Source #

toEnum :: Int -> () Source #

fromEnum :: () -> Int Source #

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

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

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

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

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 Levity

Since: base-4.16.0.0

Instance details

Defined in GHC.Enum

Enum VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum a => Enum (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

(Enum a, Bounded a, Eq a) => Enum (Down a)

Swaps succ and pred of the underlying type.

Since: base-4.18.0.0

Instance details

Defined in Data.Ord

Methods

succ :: Down a -> Down a Source #

pred :: Down a -> Down a Source #

toEnum :: Int -> Down a Source #

fromEnum :: Down a -> Int Source #

enumFrom :: Down a -> [Down a] Source #

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

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

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

Enum a => Enum (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: First a -> First a Source #

pred :: First a -> First a Source #

toEnum :: Int -> First a Source #

fromEnum :: First a -> Int Source #

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

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

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

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

Enum a => Enum (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Last a -> Last a Source #

pred :: Last a -> Last a Source #

toEnum :: Int -> Last a Source #

fromEnum :: Last a -> Int Source #

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

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

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

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

Enum a => Enum (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Max a -> Max a Source #

pred :: Max a -> Max a Source #

toEnum :: Int -> Max a Source #

fromEnum :: Max a -> Int Source #

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

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

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

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

Enum a => Enum (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Min a -> Min a Source #

pred :: Min a -> Min a Source #

toEnum :: Int -> Min a Source #

fromEnum :: Min a -> Int Source #

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

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

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

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

Enum a => Enum (WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Integral a => Enum (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

succ :: Ratio a -> Ratio a Source #

pred :: Ratio a -> Ratio a Source #

toEnum :: Int -> Ratio a Source #

fromEnum :: Ratio a -> Int Source #

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

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

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

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

Enum a => Enum (a) 
Instance details

Defined in GHC.Enum

Methods

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

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

toEnum :: Int -> (a) Source #

fromEnum :: (a) -> Int Source #

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

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

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

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

Enum (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

succ :: Proxy s -> Proxy s Source #

pred :: Proxy s -> Proxy s Source #

toEnum :: Int -> Proxy s Source #

fromEnum :: Proxy s -> Int Source #

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

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

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

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

Enum a => Enum (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

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

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

toEnum :: Int -> Const a b Source #

fromEnum :: Const a b -> Int Source #

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

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

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

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

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

toEnum :: Int -> Ap f a Source #

fromEnum :: Ap f a -> Int Source #

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

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

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

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

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

toEnum :: Int -> Alt f a Source #

fromEnum :: Alt f a -> Int Source #

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

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

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

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

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

Defined in Data.Tagged

Methods

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

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

toEnum :: Int -> Tagged s a Source #

fromEnum :: Tagged s a -> Int Source #

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

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

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

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

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, instances are encouraged to follow these properties:

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

Minimal complete definition: either == or /=.

Minimal complete definition

(==) | (/=)

Methods

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

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

Instances

Instances details
Eq Key 
Instance details

Defined in Data.Aeson.Key

Methods

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

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

Eq DotNetTime 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

Eq JSONPathElement 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

Eq SumEncoding 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

Eq Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

Eq ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq SomeTypeRep 
Instance details

Defined in Data.Typeable.Internal

Eq CBool 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CClock 
Instance details

Defined in Foreign.C.Types

Eq CDouble 
Instance details

Defined in Foreign.C.Types

Eq CFloat 
Instance details

Defined in Foreign.C.Types

Eq CInt 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CIntMax 
Instance details

Defined in Foreign.C.Types

Eq CIntPtr 
Instance details

Defined in Foreign.C.Types

Eq CLLong 
Instance details

Defined in Foreign.C.Types

Eq CLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CPtrdiff 
Instance details

Defined in Foreign.C.Types

Eq CSChar 
Instance details

Defined in Foreign.C.Types

Eq CSUSeconds 
Instance details

Defined in Foreign.C.Types

Eq CShort 
Instance details

Defined in Foreign.C.Types

Eq CSigAtomic 
Instance details

Defined in Foreign.C.Types

Eq CSize 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CTime 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUChar 
Instance details

Defined in Foreign.C.Types

Eq CUInt 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUIntMax 
Instance details

Defined in Foreign.C.Types

Eq CUIntPtr 
Instance details

Defined in Foreign.C.Types

Eq CULLong 
Instance details

Defined in Foreign.C.Types

Eq CULong 
Instance details

Defined in Foreign.C.Types

Eq CUSeconds 
Instance details

Defined in Foreign.C.Types

Eq CUShort 
Instance details

Defined in Foreign.C.Types

Eq CWchar 
Instance details

Defined in Foreign.C.Types

Eq Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Base

Methods

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

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

Eq ErrorCall

Since: base-4.7.0.0

Instance details

Defined in GHC.Exception

Eq ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Eq SpecConstrAnnotation

Since: base-4.3.0.0

Instance details

Defined in GHC.Exts

Eq Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Eq DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Eq SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Eq CodingProgress

Since: base-4.4.0.0

Instance details

Defined in GHC.IO.Encoding.Types

Eq ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq ExitCode 
Instance details

Defined in GHC.IO.Exception

Eq IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

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 IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Stack.Types

Eq SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

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 Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Eq ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Eq ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Eq DecoderError 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

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

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

Eq ByteArray 
Instance details

Defined in Codec.CBOR.ByteArray

Methods

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

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

Eq SlicedByteArray 
Instance details

Defined in Codec.CBOR.ByteArray.Sliced

Methods

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

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

Eq IntSet 
Instance details

Defined in Data.IntSet.Internal

Eq OsChar

Byte equality of the internal representation.

Instance details

Defined in System.OsString.Internal.Types.Hidden

Eq OsString

Byte equality of the internal representation.

Instance details

Defined in System.OsString.Internal.Types.Hidden

Eq PosixChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Eq PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Eq WindowsChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Eq WindowsString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Eq BigNat 
Instance details

Defined in GHC.Num.BigNat

Eq ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Eq Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Eq ClosureType 
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Eq PrimType 
Instance details

Defined in GHC.Exts.Heap.Closures

Eq TsoFlags 
Instance details

Defined in GHC.Exts.Heap.Closures

Eq WhatNext 
Instance details

Defined in GHC.Exts.Heap.Closures

Eq WhyBlocked 
Instance details

Defined in GHC.Exts.Heap.Closures

Eq CostCentre 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Eq CostCentreStack 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Eq IndexTable 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Eq StgTSOProfInfo 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Eq Module 
Instance details

Defined in GHC.Classes

Eq Ordering 
Instance details

Defined in GHC.Classes

Eq TrName 
Instance details

Defined in GHC.Classes

Eq TyCon 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq IndexUsed 
Instance details

Defined in Development.GitRev

Methods

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

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

Eq Half 
Instance details

Defined in Numeric.Half.Internal

Methods

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

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

Eq URI 
Instance details

Defined in Network.URI

Methods

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

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

Eq URIAuth 
Instance details

Defined in Network.URI

Methods

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

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

Eq Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

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

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

Eq StdGen 
Instance details

Defined in System.Random.Internal

Methods

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

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

Eq Undefined 
Instance details

Defined in Relude.Debug

Eq Scientific 
Instance details

Defined in Data.Scientific

Methods

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

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

Eq Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

Methods

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

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

Eq AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq FamilyResultSig 
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 Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

Eq B 
Instance details

Defined in Data.Text.Short.Internal

Methods

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

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

Eq ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

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

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

Eq Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

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

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

Eq DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Eq NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Eq UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Eq LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Eq UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

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

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

Eq UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

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

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

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Eq Natural 
Instance details

Defined in GHC.Num.Natural

Eq () 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Char 
Instance details

Defined in GHC.Classes

Methods

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

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

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

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

Defined in GHC.Classes

Methods

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

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

Eq Int 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Word 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq (Encoding' a) 
Instance details

Defined in Data.Aeson.Encoding.Internal

Methods

(==) :: Encoding' a -> Encoding' a -> Bool Source #

(/=) :: Encoding' a -> Encoding' a -> Bool Source #

Eq v => Eq (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

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

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

Eq a => Eq (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

Eq a => Eq (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

Eq a => Eq (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

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

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

Eq (MutableByteArray s)

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Eq a => Eq (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

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

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

Eq a => Eq (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

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

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

Eq a => Eq (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

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

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

Eq a => Eq (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

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

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

Eq a => Eq (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq m => Eq (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq a => Eq (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq a => Eq (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq a => Eq (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

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

Eq p => Eq (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq (IORef a)

Pointer equality.

Since: base-4.0.0.0

Instance details

Defined in GHC.IORef

Methods

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

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

Eq (FunPtr a) 
Instance details

Defined in GHC.Ptr

Methods

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

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

Eq (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

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

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

Eq a => Eq (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

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

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

Eq a => Eq (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

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

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

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Eq a => Eq (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Eq a => Eq (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Eq a => Eq (Intersection a) 
Instance details

Defined in Data.Set.Internal

Eq a => Eq (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

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

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

Eq a => Eq (Tree a) 
Instance details

Defined in Data.Tree

Methods

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

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

Eq1 f => Eq (Fix f) 
Instance details

Defined in Data.Fix

Methods

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

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

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

Defined in Data.Fix

Methods

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

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

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

Defined in Data.Fix

Methods

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

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

Eq a => Eq (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

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

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

Eq a => Eq (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

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

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

Eq a => Eq (GenericArbitrarySingle a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

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

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

Eq a => Eq (GenericArbitraryU a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

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

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

Eq a => Eq (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

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

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

Eq a => Eq (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq a => Eq (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq a => Eq (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

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

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

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

Defined in Data.Primitive.PrimArray

Methods

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

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

Eq a => Eq (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

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

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

Eq g => Eq (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

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

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

Eq g => Eq (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

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

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

Eq g => Eq (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

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

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

Eq g => Eq (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

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

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

Eq g => Eq (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

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

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

Eq a => Eq (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

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

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

Eq flag => Eq (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq a => Eq (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

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

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

Eq a => Eq (Vector a) 
Instance details

Defined in Data.Vector

Methods

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

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

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

Defined in Data.Vector.Primitive

Methods

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

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

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

Defined in Data.Vector.Storable

Methods

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

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

Eq a => Eq (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

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

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

Eq a => Eq (a) 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq a => Eq [a] 
Instance details

Defined in GHC.Classes

Methods

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

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

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

Since: base-2.1

Instance details

Defined in Data.Either

Methods

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

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

Eq (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

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

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

Eq a => Eq (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq (TypeRep a)

Since: base-2.1

Instance details

Defined in Data.Typeable.Internal

Methods

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

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

Eq (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Defined in Data.Map.Internal

Methods

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

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

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

Defined in Control.Comonad.Cofree

Methods

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

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

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

Defined in Control.Monad.Free

Methods

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

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

Eq (MutableArray s a) 
Instance details

Defined in Data.Primitive.Array

Methods

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

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

Eq (MutablePrimArray s a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

(==) :: MutablePrimArray s a -> MutablePrimArray s a -> Bool Source #

(/=) :: MutablePrimArray s a -> MutablePrimArray s a -> Bool Source #

Eq (SmallMutableArray s a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

(==) :: SmallMutableArray s a -> SmallMutableArray s a -> Bool Source #

(/=) :: SmallMutableArray s a -> SmallMutableArray s a -> Bool Source #

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

Defined in Data.Functor.Base

Methods

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

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

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

Defined in Data.Functor.Base

Methods

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

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

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

Defined in Data.Functor.Base

Methods

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

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

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

Defined in Data.Strict.Either

Methods

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

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

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

Defined in Data.Strict.These

Methods

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

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

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

Defined in Data.Strict.Tuple

Methods

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

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

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

Defined in Data.These

Methods

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

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

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

Defined in Control.Applicative.Lift

Methods

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

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

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

Defined in Control.Monad.Trans.Maybe

Methods

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

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

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

Defined in Data.HashMap.Internal

Methods

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

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

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

Defined in Data.HashMap.Internal

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

Eq a => Eq (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

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

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

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

(Generic1 f, Eq (Rep1 f a)) => Eq (Generically1 f a)

Since: base-4.18.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #

(/=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #

Eq (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Char p -> URec Char p -> Bool Source #

(/=) :: URec Char p -> URec Char p -> Bool Source #

Eq (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Double p -> URec Double p -> Bool Source #

(/=) :: URec Double p -> URec Double p -> Bool Source #

Eq (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

(==) :: URec Float p -> URec Float p -> Bool Source #

(/=) :: URec Float p -> URec Float p -> Bool Source #

Eq (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Int p -> URec Int p -> Bool Source #

(/=) :: URec Int p -> URec Int p -> Bool Source #

Eq (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Word p -> URec Word p -> Bool Source #

(/=) :: URec Word p -> URec Word p -> Bool Source #

Eq (p a a) => Eq (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

(==) :: Join p a -> Join p a -> Bool Source #

(/=) :: Join p a -> Join p a -> Bool Source #

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

Defined in Control.Comonad.Trans.Cofree

Methods

(==) :: CofreeF f a b -> CofreeF f a b -> Bool Source #

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

Eq (w (CofreeF f a (CofreeT f w a))) => Eq (CofreeT f w a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

(==) :: CofreeT f w a -> CofreeT f w a -> Bool Source #

(/=) :: CofreeT f w a -> CofreeT f w a -> Bool Source #

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

Defined in Control.Monad.Trans.Free

Methods

(==) :: FreeF f a b -> FreeF f a b -> Bool Source #

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

(Eq1 f, Eq1 m, Eq a) => Eq (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(==) :: FreeT f m a -> FreeT f m a -> Bool Source #

(/=) :: FreeT f m a -> FreeT f m a -> Bool Source #

Eq a => Eq (AndShrinking f a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

(==) :: AndShrinking f a -> AndShrinking f a -> Bool Source #

(/=) :: AndShrinking f a -> AndShrinking f a -> Bool Source #

Eq a => Eq (GenericArbitrary weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

(==) :: GenericArbitrary weights a -> GenericArbitrary weights a -> Bool Source #

(/=) :: GenericArbitrary weights a -> GenericArbitrary weights a -> Bool Source #

Eq a => Eq (GenericArbitraryRec weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

(==) :: GenericArbitraryRec weights a -> GenericArbitraryRec weights a -> Bool Source #

(/=) :: GenericArbitraryRec weights a -> GenericArbitraryRec weights a -> Bool Source #

Eq a => Eq (GenericArbitrarySingleG genList a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

(==) :: GenericArbitrarySingleG genList a -> GenericArbitrarySingleG genList a -> Bool Source #

(/=) :: GenericArbitrarySingleG genList a -> GenericArbitrarySingleG genList a -> Bool Source #

Eq a => Eq (GenericArbitraryUG genList a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

(==) :: GenericArbitraryUG genList a -> GenericArbitraryUG genList a -> Bool Source #

(/=) :: GenericArbitraryUG genList a -> GenericArbitraryUG genList a -> Bool Source #

(Eq (TVar m e), Ix i) => Eq (TArrayDefault m i e) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Methods

(==) :: TArrayDefault m i e -> TArrayDefault m i e -> Bool Source #

(/=) :: TArrayDefault m i e -> TArrayDefault m i e -> Bool Source #

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

Defined in Data.Tagged

Methods

(==) :: Tagged s b -> Tagged s b -> Bool Source #

(/=) :: Tagged s b -> Tagged s b -> Bool Source #

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

Defined in Data.Functor.These

Methods

(==) :: These1 f g a -> These1 f g a -> Bool Source #

(/=) :: These1 f g a -> These1 f g a -> Bool Source #

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

Defined in Control.Applicative.Backwards

Methods

(==) :: Backwards f a -> Backwards f a -> Bool Source #

(/=) :: Backwards f a -> Backwards f a -> Bool Source #

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

Defined in Control.Monad.Trans.Except

Methods

(==) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(/=) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

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

Defined in Control.Monad.Trans.Identity

Methods

(==) :: IdentityT f a -> IdentityT f a -> Bool Source #

(/=) :: IdentityT f a -> IdentityT f a -> Bool Source #

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

Defined in Data.Functor.Constant

Methods

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

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

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

Defined in Data.Functor.Reverse

Methods

(==) :: Reverse f a -> Reverse f a -> Bool Source #

(/=) :: Reverse f a -> Reverse f a -> Bool Source #

(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 (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 c => Eq (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

(/=) :: K1 i c p -> K1 i c 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 #

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

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(==) :: Compose f g a -> Compose f g a -> Bool Source #

(/=) :: Compose f g a -> Compose f g a -> 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 (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 a) => Eq (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

(==) :: Clown f a b -> Clown f a b -> Bool Source #

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

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

Defined in Data.Bifunctor.Flip

Methods

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

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

Eq (g b) => Eq (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

(==) :: Joker g a b -> Joker g a b -> Bool Source #

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

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

Defined in Data.Bifunctor.Wrapped

Methods

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

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

Eq a => Eq (GenericArbitraryG genList weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

(==) :: GenericArbitraryG genList weights a -> GenericArbitraryG genList weights a -> Bool Source #

(/=) :: GenericArbitraryG genList weights a -> GenericArbitraryG genList weights a -> Bool Source #

Eq a => Eq (GenericArbitraryRecG genList weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

(==) :: GenericArbitraryRecG genList weights a -> GenericArbitraryRecG genList weights a -> Bool Source #

(/=) :: GenericArbitraryRecG genList weights a -> GenericArbitraryRecG genList weights a -> Bool Source #

Eq a => Eq (GenericArbitraryWith opts weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

(==) :: GenericArbitraryWith opts weights a -> GenericArbitraryWith opts weights a -> Bool Source #

(/=) :: GenericArbitraryWith opts weights a -> GenericArbitraryWith opts weights a -> 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 #

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

Defined in Data.Bifunctor.Product

Methods

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

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

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

Defined in Data.Bifunctor.Sum

Methods

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

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

(Eq 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 (f (p a b)) => Eq (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

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

(/=) :: Tannen f p a b -> Tannen f p a b -> 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 (p (f a) (g b)) => Eq (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

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

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

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (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

Minimal complete definition

pi, exp, log, sin, cos, asin, acos, atan, sinh, cosh, asinh, acosh, atanh

Methods

pi :: a Source #

exp :: a -> a Source #

sqrt :: a -> a Source #

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

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

sin :: a -> a Source #

cos :: a -> a Source #

tan :: a -> a Source #

asin :: a -> a Source #

acos :: a -> a Source #

atan :: a -> a Source #

sinh :: a -> a Source #

cosh :: a -> a Source #

tanh :: a -> a Source #

asinh :: a -> a Source #

acosh :: a -> a Source #

atanh :: a -> a Source #

Instances

Instances details
Floating CDouble 
Instance details

Defined in Foreign.C.Types

Floating CFloat 
Instance details

Defined in Foreign.C.Types

Floating Half 
Instance details

Defined in Numeric.Half.Internal

Methods

pi :: Half Source #

exp :: Half -> Half Source #

log :: Half -> Half Source #

sqrt :: Half -> Half Source #

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

logBase :: Half -> Half -> Half Source #

sin :: Half -> Half Source #

cos :: Half -> Half Source #

tan :: Half -> Half Source #

asin :: Half -> Half Source #

acos :: Half -> Half Source #

atan :: Half -> Half Source #

sinh :: Half -> Half Source #

cosh :: Half -> Half Source #

tanh :: Half -> Half Source #

asinh :: Half -> Half Source #

acosh :: Half -> Half Source #

atanh :: Half -> Half Source #

log1p :: Half -> Half Source #

expm1 :: Half -> Half Source #

log1pexp :: Half -> Half Source #

log1mexp :: Half -> Half Source #

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

Floating a => Floating (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

pi :: Down a Source #

exp :: Down a -> Down a Source #

log :: Down a -> Down a Source #

sqrt :: Down a -> Down a Source #

(**) :: Down a -> Down a -> Down a Source #

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

sin :: Down a -> Down a Source #

cos :: Down a -> Down a Source #

tan :: Down a -> Down a Source #

asin :: Down a -> Down a Source #

acos :: Down a -> Down a Source #

atan :: Down a -> Down a Source #

sinh :: Down a -> Down a Source #

cosh :: Down a -> Down a Source #

tanh :: Down a -> Down a Source #

asinh :: Down a -> Down a Source #

acosh :: Down a -> Down a Source #

atanh :: Down a -> Down a Source #

log1p :: Down a -> Down a Source #

expm1 :: Down a -> Down a Source #

log1pexp :: Down a -> Down a Source #

log1mexp :: Down a -> Down a Source #

Floating a => Floating (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

pi :: Op a b Source #

exp :: Op a b -> Op a b Source #

log :: Op a b -> Op a b Source #

sqrt :: Op a b -> Op a b Source #

(**) :: Op a b -> Op a b -> Op a b Source #

logBase :: Op a b -> Op a b -> Op a b Source #

sin :: Op a b -> Op a b Source #

cos :: Op a b -> Op a b Source #

tan :: Op a b -> Op a b Source #

asin :: Op a b -> Op a b Source #

acos :: Op a b -> Op a b Source #

atan :: Op a b -> Op a b Source #

sinh :: Op a b -> Op a b Source #

cosh :: Op a b -> Op a b Source #

tanh :: Op a b -> Op a b Source #

asinh :: Op a b -> Op a b Source #

acosh :: Op a b -> Op a b Source #

atanh :: Op a b -> Op a b Source #

log1p :: Op a b -> Op a b Source #

expm1 :: Op a b -> Op a b Source #

log1pexp :: Op a b -> Op a b Source #

log1mexp :: Op a b -> Op a b Source #

Floating a => Floating (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

pi :: Const a b Source #

exp :: Const a b -> Const a b Source #

log :: Const a b -> Const a b Source #

sqrt :: Const a b -> Const a b Source #

(**) :: Const a b -> Const a b -> Const a b Source #

logBase :: Const a b -> Const a b -> Const a b Source #

sin :: Const a b -> Const a b Source #

cos :: Const a b -> Const a b Source #

tan :: Const a b -> Const a b Source #

asin :: Const a b -> Const a b Source #

acos :: Const a b -> Const a b Source #

atan :: Const a b -> Const a b Source #

sinh :: Const a b -> Const a b Source #

cosh :: Const a b -> Const a b Source #

tanh :: Const a b -> Const a b Source #

asinh :: Const a b -> Const a b Source #

acosh :: Const a b -> Const a b Source #

atanh :: Const a b -> Const a b Source #

log1p :: Const a b -> Const a b Source #

expm1 :: Const a b -> Const a b Source #

log1pexp :: Const a b -> Const a b Source #

log1mexp :: Const a b -> Const a b Source #

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

Defined in Data.Tagged

Methods

pi :: Tagged s a Source #

exp :: Tagged s a -> Tagged s a Source #

log :: Tagged s a -> Tagged s a Source #

sqrt :: Tagged s a -> Tagged s a Source #

(**) :: Tagged s a -> Tagged s a -> Tagged s a Source #

logBase :: Tagged s a -> Tagged s a -> Tagged s a Source #

sin :: Tagged s a -> Tagged s a Source #

cos :: Tagged s a -> Tagged s a Source #

tan :: Tagged s a -> Tagged s a Source #

asin :: Tagged s a -> Tagged s a Source #

acos :: Tagged s a -> Tagged s a Source #

atan :: Tagged s a -> Tagged s a Source #

sinh :: Tagged s a -> Tagged s a Source #

cosh :: Tagged s a -> Tagged s a Source #

tanh :: Tagged s a -> Tagged s a Source #

asinh :: Tagged s a -> Tagged s a Source #

acosh :: Tagged s a -> Tagged s a Source #

atanh :: Tagged s a -> Tagged s a Source #

log1p :: Tagged s a -> Tagged s a Source #

expm1 :: Tagged s a -> Tagged s a Source #

log1pexp :: Tagged s a -> Tagged s a Source #

log1mexp :: Tagged s a -> Tagged s a Source #

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
Totality of toRational
toRational is total
Coherence with toRational
if the type also implements Real, then fromRational is a left inverse for toRational, i.e. fromRational (toRational i) = i

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

Defined in Foreign.C.Types

Fractional CFloat 
Instance details

Defined in Foreign.C.Types

Fractional Half 
Instance details

Defined in Numeric.Half.Internal

Methods

(/) :: Half -> Half -> Half Source #

recip :: Half -> Half Source #

fromRational :: Rational -> Half Source #

Fractional Scientific 
Instance details

Defined in Data.Scientific

Methods

(/) :: Scientific -> Scientific -> Scientific Source #

recip :: Scientific -> Scientific Source #

fromRational :: Rational -> Scientific Source #

Fractional DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Fractional NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Fractional a => Fractional (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Fractional a => Fractional (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(/) :: Down a -> Down a -> Down a Source #

recip :: Down a -> Down a Source #

fromRational :: Rational -> Down a Source #

Integral a => Fractional (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(/) :: Ratio a -> Ratio a -> Ratio a Source #

recip :: Ratio a -> Ratio a Source #

fromRational :: Rational -> Ratio a Source #

Fractional a => Fractional (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

(/) :: Op a b -> Op a b -> Op a b Source #

recip :: Op a b -> Op a b Source #

fromRational :: Rational -> Op a b Source #

Fractional a => Fractional (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(/) :: Const a b -> Const a b -> Const a b Source #

recip :: Const a b -> Const a b Source #

fromRational :: Rational -> Const a b Source #

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

Defined in Data.Tagged

Methods

(/) :: Tagged s a -> Tagged s a -> Tagged s a Source #

recip :: Tagged s a -> Tagged s a Source #

fromRational :: Rational -> Tagged s a Source #

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

Defined in Test.QuickCheck.Gen

Methods

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

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

return :: a -> Gen a Source #

Monad IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

return :: a -> IResult a Source #

Monad Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

return :: a -> Parser a Source #

Monad Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

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

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

return :: a -> Result a Source #

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

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

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

return :: a -> Identity a Source #

Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

return :: a -> First a Source #

Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

return :: a -> Last a Source #

Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(>>=) :: Down a -> (a -> Down b) -> Down b Source #

(>>) :: Down a -> Down b -> Down b Source #

return :: a -> Down a Source #

Monad First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: First a -> (a -> First b) -> First b Source #

(>>) :: First a -> First b -> First b Source #

return :: a -> First a Source #

Monad Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b Source #

(>>) :: Last a -> Last b -> Last b Source #

return :: a -> Last a Source #

Monad Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Max a -> (a -> Max b) -> Max b Source #

(>>) :: Max a -> Max b -> Max b Source #

return :: a -> Max a Source #

Monad Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Min a -> (a -> Min b) -> Min b Source #

(>>) :: Min a -> Min b -> Min b Source #

return :: a -> Min a Source #

Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Dual a -> (a -> Dual b) -> Dual b Source #

(>>) :: Dual a -> Dual b -> Dual b Source #

return :: a -> Dual a Source #

Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Product a -> (a -> Product b) -> Product b Source #

(>>) :: Product a -> Product b -> Product b Source #

return :: a -> Product a Source #

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Sum a -> (a -> Sum b) -> Sum b Source #

(>>) :: Sum a -> Sum b -> Sum b Source #

return :: a -> Sum a Source #

Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b Source #

(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source #

return :: a -> NonEmpty a Source #

Monad Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b Source #

(>>) :: Par1 a -> Par1 b -> Par1 b Source #

return :: a -> Par1 a Source #

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 ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

(>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b Source #

(>>) :: ReadP a -> ReadP b -> ReadP b Source #

return :: a -> ReadP a Source #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

(>>=) :: Seq a -> (a -> Seq b) -> Seq b Source #

(>>) :: Seq a -> Seq b -> Seq b Source #

return :: a -> Seq a Source #

Monad Tree 
Instance details

Defined in Data.Tree

Methods

(>>=) :: Tree a -> (a -> Tree b) -> Tree b Source #

(>>) :: Tree a -> Tree b -> Tree b Source #

return :: a -> Tree a Source #

Monad DNonEmpty 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

(>>=) :: DNonEmpty a -> (a -> DNonEmpty b) -> DNonEmpty b Source #

(>>) :: DNonEmpty a -> DNonEmpty b -> DNonEmpty b Source #

return :: a -> DNonEmpty a Source #

Monad DList 
Instance details

Defined in Data.DList.Internal

Methods

(>>=) :: DList a -> (a -> DList b) -> DList b Source #

(>>) :: DList a -> DList b -> DList b Source #

return :: a -> DList a Source #

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: IO a -> (a -> IO b) -> IO b Source #

(>>) :: IO a -> IO b -> IO b Source #

return :: a -> IO a Source #

Monad Array 
Instance details

Defined in Data.Primitive.Array

Methods

(>>=) :: Array a -> (a -> Array b) -> Array b Source #

(>>) :: Array a -> Array b -> Array b Source #

return :: a -> Array a Source #

Monad SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

(>>=) :: SmallArray a -> (a -> SmallArray b) -> SmallArray b Source #

(>>) :: SmallArray a -> SmallArray b -> SmallArray b Source #

return :: a -> SmallArray a Source #

Monad Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(>>=) :: Q a -> (a -> Q b) -> Q b Source #

(>>) :: Q a -> Q b -> Q b Source #

return :: a -> Q a Source #

Monad Vector 
Instance details

Defined in Data.Vector

Methods

(>>=) :: Vector a -> (a -> Vector b) -> Vector b Source #

(>>) :: Vector a -> Vector b -> Vector b Source #

return :: a -> Vector a Source #

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b Source #

(>>) :: Maybe a -> Maybe b -> Maybe b Source #

return :: a -> Maybe a Source #

Monad Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

(>>=) :: Solo a -> (a -> Solo b) -> Solo b Source #

(>>) :: Solo a -> Solo b -> Solo b Source #

return :: a -> Solo a Source #

Monad List

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 m => Monad (WrappedMonad m)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b Source #

(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source #

return :: a -> WrappedMonad m a Source #

ArrowApply a => Monad (ArrowMonad a)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b Source #

(>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b Source #

return :: a0 -> ArrowMonad a a0 Source #

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b Source #

(>>) :: Either e a -> Either e b -> Either e b Source #

return :: a -> Either e a Source #

Monad (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b Source #

(>>) :: Proxy a -> Proxy b -> Proxy b Source #

return :: a -> Proxy a Source #

Monad (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: U1 a -> (a -> U1 b) -> U1 b Source #

(>>) :: U1 a -> U1 b -> U1 b Source #

return :: a -> U1 a Source #

Alternative f => Monad (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

(>>=) :: Cofree f a -> (a -> Cofree f b) -> Cofree f b Source #

(>>) :: Cofree f a -> Cofree f b -> Cofree f b Source #

return :: a -> Cofree f a Source #

Functor f => Monad (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

(>>=) :: Free f a -> (a -> Free f b) -> Free f b Source #

(>>) :: Free f a -> Free f b -> Free f b Source #

return :: a -> Free f a Source #

Semigroup a => Monad (These a) 
Instance details

Defined in Data.Strict.These

Methods

(>>=) :: These a a0 -> (a0 -> These a b) -> These a b Source #

(>>) :: These a a0 -> These a b -> These a b Source #

return :: a0 -> These a a0 Source #

Semigroup a => Monad (These a) 
Instance details

Defined in Data.These

Methods

(>>=) :: These a a0 -> (a0 -> These a b) -> These a b Source #

(>>) :: These a a0 -> These a b -> These a b Source #

return :: a0 -> These a a0 Source #

Monad m => Monad (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b Source #

(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b Source #

return :: a -> MaybeT m a Source #

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 m => Monad (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

(>>=) :: Kleisli m a a0 -> (a0 -> Kleisli m a b) -> Kleisli m a b Source #

(>>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b Source #

return :: a0 -> Kleisli m a a0 Source #

Monad f => Monad (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b Source #

(>>) :: Ap f a -> Ap f b -> Ap f b Source #

return :: a -> Ap f a Source #

Monad f => Monad (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b Source #

(>>) :: Alt f a -> Alt f b -> Alt f b Source #

return :: a -> Alt f a Source #

Monad f => Monad (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Rec1 f a -> (a -> Rec1 f b) -> Rec1 f b Source #

(>>) :: Rec1 f a -> Rec1 f b -> Rec1 f b Source #

return :: a -> Rec1 f a Source #

(Applicative f, Monad f) => Monad (WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)).

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

(>>=) :: WhenMissing f x a -> (a -> WhenMissing f x b) -> WhenMissing f x b Source #

(>>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b Source #

return :: a -> WhenMissing f x a Source #

(Alternative f, Monad w) => Monad (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

(>>=) :: CofreeT f w a -> (a -> CofreeT f w b) -> CofreeT f w b Source #

(>>) :: CofreeT f w a -> CofreeT f w b -> CofreeT f w b Source #

return :: a -> CofreeT f w a Source #

(Functor f, Monad m) => Monad (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(>>=) :: FreeT f m a -> (a -> FreeT f m b) -> FreeT f m b Source #

(>>) :: FreeT f m a -> FreeT f m b -> FreeT f m b Source #

return :: a -> FreeT f m a Source #

Monad (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

(>>=) :: Tagged s a -> (a -> Tagged s b) -> Tagged s b Source #

(>>) :: Tagged s a -> Tagged s b -> Tagged s b Source #

return :: a -> Tagged s a Source #

Monad m => Monad (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

(>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b Source #

(>>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b Source #

return :: a -> ExceptT e m a Source #

Monad m => Monad (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

(>>=) :: IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b Source #

(>>) :: IdentityT m a -> IdentityT m b -> IdentityT m b Source #

return :: a -> IdentityT m a Source #

Monad m => Monad (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b Source #

(>>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b Source #

return :: a -> ReaderT r m a Source #

Monad m => Monad (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b Source #

(>>) :: StateT s m a -> StateT s m b -> StateT s m b Source #

return :: a -> StateT s m a Source #

Monad m => Monad (Reverse m)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

(>>=) :: Reverse m a -> (a -> Reverse m b) -> Reverse m b Source #

(>>) :: Reverse m a -> Reverse m b -> Reverse m b Source #

return :: a -> Reverse m a Source #

(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 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 #

(Monad f, Applicative f) => Monad (WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

(>>=) :: WhenMatched f x y a -> (a -> WhenMatched f x y b) -> WhenMatched f x y b Source #

(>>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b Source #

return :: a -> WhenMatched f x y a Source #

(Applicative f, Monad f) => Monad (WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

(>>=) :: WhenMissing f k x a -> (a -> WhenMissing f k x b) -> WhenMissing f k x b Source #

(>>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b Source #

return :: a -> WhenMissing f k x 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 ((->) r)

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 (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

Methods

(>>=) :: WhenMatched f k x y a -> (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 b Source #

return :: a -> WhenMatched f k x y 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. See https://www.schoolofhaskell.com/user/edwardk/snippets/fmap or https://github.com/quchen/articles/blob/master/second_functor_law.md for an explanation.

Minimal complete definition

fmap

Methods

fmap :: (a -> b) -> f a -> f b Source #

fmap is used to apply a function of type (a -> b) to a value of type f a, where f is a functor, to produce a value of type f b. Note that for any type constructor with more than one parameter (e.g., Either), only the last type parameter can be modified with fmap (e.g., b in `Either a b`).

Some type constructors with two parameters or more have a Bifunctor instance that allows both the last and the penultimate parameters to be mapped over.

Examples

Expand

Convert from a Maybe Int to a Maybe String using show:

>>> fmap show Nothing
Nothing
>>> fmap show (Just 3)
Just "3"

Convert from an Either Int Int to an Either Int String using show:

>>> fmap show (Left 17)
Left 17
>>> fmap show (Right 17)
Right "17"

Double each element of a list:

>>> fmap (*2) [1,2,3]
[2,4,6]

Apply even to the second element of a pair:

>>> fmap even (2,2)
(2,True)

It may seem surprising that the function is only applied to the last element of the tuple compared to the list example above which applies it to every element in the list. To understand, remember that tuples are type constructors with multiple type parameters: a tuple of 3 elements (a,b,c) can also be written (,,) a b c and its Functor instance is defined for Functor ((,,) a b) (i.e., only the third parameter is free to be mapped over with fmap).

It explains why fmap can be used with tuples containing values of different types as in the following example:

>>> fmap even ("hello", 1.0, 4)
("hello",1.0,True)

(<$) :: a -> f b -> f a infixl 4 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.

Examples

Expand

Perform a computation with Maybe and replace the result with a constant value if it is Just:

>>> 'a' <$ Just 2
Just 'a'
>>> 'a' <$ Nothing
Nothing

Instances

Instances details
Functor Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

fmap :: (a -> b) -> Gen a -> Gen b Source #

(<$) :: a -> Gen b -> Gen a Source #

Functor KeyMap 
Instance details

Defined in Data.Aeson.KeyMap

Methods

fmap :: (a -> b) -> KeyMap a -> KeyMap b Source #

(<$) :: a -> KeyMap b -> KeyMap a Source #

Functor FromJSONKeyFunction 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fmap :: (a -> b) -> FromJSONKeyFunction a -> FromJSONKeyFunction b Source #

(<$) :: a -> FromJSONKeyFunction b -> FromJSONKeyFunction a Source #

Functor IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fmap :: (a -> b) -> IResult a -> IResult b Source #

(<$) :: a -> IResult b -> IResult a Source #

Functor Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fmap :: (a -> b) -> Parser a -> Parser b Source #

(<$) :: a -> Parser b -> Parser a Source #

Functor Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fmap :: (a -> b) -> Result a -> Result b Source #

(<$) :: a -> Result b -> Result a Source #

Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> ZipList a -> ZipList b Source #

(<$) :: a -> ZipList b -> ZipList a Source #

Functor Handler

Since: base-4.6.0.0

Instance details

Defined in Control.Exception

Methods

fmap :: (a -> b) -> Handler a -> Handler b Source #

(<$) :: a -> Handler b -> Handler a Source #

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fmap :: (a -> b) -> Identity a -> Identity b Source #

(<$) :: a -> Identity b -> Identity a Source #

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> First a -> First b Source #

(<$) :: a -> First b -> First a Source #

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Last a -> Last b Source #

(<$) :: a -> Last b -> Last a Source #

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

fmap :: (a -> b) -> Down a -> Down b Source #

(<$) :: a -> Down b -> Down a Source #

Functor First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> First a -> First b Source #

(<$) :: a -> First b -> First a Source #

Functor Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Last a -> Last b Source #

(<$) :: a -> Last b -> Last 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 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 Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Dual a -> Dual b Source #

(<$) :: a -> Dual b -> Dual a Source #

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Product a -> Product b Source #

(<$) :: a -> Product b -> Product a Source #

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 NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> NonEmpty a -> NonEmpty b Source #

(<$) :: a -> NonEmpty b -> NonEmpty a Source #

Functor Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Par1 a -> Par1 b Source #

(<$) :: a -> Par1 b -> Par1 a Source #

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 ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> ReadP a -> ReadP b Source #

(<$) :: a -> ReadP b -> ReadP a Source #

Functor Case 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

fmap :: (a -> b) -> Case a -> Case b Source #

(<$) :: a -> Case b -> Case a Source #

Functor SizeF 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

fmap :: (a -> b) -> SizeF a -> SizeF b Source #

(<$) :: a -> SizeF b -> SizeF a Source #

Functor IntMap 
Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> IntMap a -> IntMap b Source #

(<$) :: a -> IntMap b -> IntMap a Source #

Functor Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Digit a -> Digit b Source #

(<$) :: a -> Digit b -> Digit a Source #

Functor Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Elem a -> Elem b Source #

(<$) :: a -> Elem b -> Elem a Source #

Functor FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> FingerTree a -> FingerTree b Source #

(<$) :: a -> FingerTree b -> FingerTree a Source #

Functor Node 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Node a -> Node b Source #

(<$) :: a -> Node b -> Node a Source #

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 ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewL a -> ViewL b Source #

(<$) :: a -> ViewL b -> ViewL a Source #

Functor ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewR a -> ViewR b Source #

(<$) :: a -> ViewR b -> ViewR a Source #

Functor Tree 
Instance details

Defined in Data.Tree

Methods

fmap :: (a -> b) -> Tree a -> Tree b Source #

(<$) :: a -> Tree b -> Tree a Source #

Functor DNonEmpty 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

fmap :: (a -> b) -> DNonEmpty a -> DNonEmpty b Source #

(<$) :: a -> DNonEmpty b -> DNonEmpty a Source #

Functor DList 
Instance details

Defined in Data.DList.Internal

Methods

fmap :: (a -> b) -> DList a -> DList b Source #

(<$) :: a -> DList b -> DList a Source #

Functor Weighted 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

fmap :: (a -> b) -> Weighted a -> Weighted b Source #

(<$) :: a -> Weighted b -> Weighted a Source #

Functor GenClosure 
Instance details

Defined in GHC.Exts.Heap.Closures

Methods

fmap :: (a -> b) -> GenClosure a -> GenClosure b Source #

(<$) :: a -> GenClosure b -> GenClosure a Source #

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 ExitCase 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

fmap :: (a -> b) -> ExitCase a -> ExitCase b Source #

(<$) :: a -> ExitCase b -> ExitCase a Source #

Functor AnnotDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> AnnotDetails a -> AnnotDetails b Source #

(<$) :: a -> AnnotDetails b -> AnnotDetails a Source #

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 Span 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> Span a -> Span b Source #

(<$) :: a -> Span b -> Span a Source #

Functor Array 
Instance details

Defined in Data.Primitive.Array

Methods

fmap :: (a -> b) -> Array a -> Array b Source #

(<$) :: a -> Array b -> Array a Source #

Functor SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fmap :: (a -> b) -> SmallArray a -> SmallArray b Source #

(<$) :: a -> SmallArray b -> SmallArray a Source #

Functor Maybe 
Instance details

Defined in Data.Strict.Maybe

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b Source #

(<$) :: a -> Maybe b -> Maybe a Source #

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 TyVarBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fmap :: (a -> b) -> TyVarBndr a -> TyVarBndr b Source #

(<$) :: a -> TyVarBndr b -> TyVarBndr a Source #

Functor Vector 
Instance details

Defined in Data.Vector

Methods

fmap :: (a -> b) -> Vector a -> Vector b Source #

(<$) :: a -> Vector b -> Vector a Source #

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b Source #

(<$) :: a -> Maybe b -> Maybe a Source #

Functor Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Solo a -> Solo b Source #

(<$) :: a -> Solo b -> Solo a Source #

Functor List

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> [a] -> [b] Source #

(<$) :: a -> [b] -> [a] Source #

Monad m => Functor (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source #

(<$) :: a -> WrappedMonad m b -> WrappedMonad m a Source #

Arrow a => Functor (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b Source #

(<$) :: a0 -> ArrowMonad a b -> ArrowMonad a a0 Source #

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b Source #

(<$) :: a0 -> Either a b -> Either a a0 Source #

Functor (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

fmap :: (a -> b) -> Proxy a -> Proxy b Source #

(<$) :: a -> Proxy b -> Proxy 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 (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 (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 (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 f => Functor (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

fmap :: (a -> b) -> Cofree f a -> Cofree f b Source #

(<$) :: a -> Cofree f b -> Cofree f a Source #

Functor f => Functor (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

fmap :: (a -> b) -> Free f a -> Free f b Source #

(<$) :: a -> Free f b -> Free f a Source #

Functor m => Functor (Concurrently m) 
Instance details

Defined in Control.Monad.Class.MonadAsync

Methods

fmap :: (a -> b) -> Concurrently m a -> Concurrently m b Source #

(<$) :: a -> Concurrently m b -> Concurrently m a Source #

Functor m => Functor (Handler m) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

fmap :: (a -> b) -> Handler m a -> Handler m b Source #

(<$) :: a -> Handler m b -> Handler m a Source #

Functor (ListF a) 
Instance details

Defined in Data.Functor.Base

Methods

fmap :: (a0 -> b) -> ListF a a0 -> ListF a b Source #

(<$) :: a0 -> ListF a b -> ListF a a0 Source #

Functor (NonEmptyF a) 
Instance details

Defined in Data.Functor.Base

Methods

fmap :: (a0 -> b) -> NonEmptyF a a0 -> NonEmptyF a b Source #

(<$) :: a0 -> NonEmptyF a b -> NonEmptyF a a0 Source #

Functor (TreeF a) 
Instance details

Defined in Data.Functor.Base

Methods

fmap :: (a0 -> b) -> TreeF a a0 -> TreeF a b Source #

(<$) :: a0 -> TreeF a b -> TreeF a a0 Source #

Functor (Either a) 
Instance details

Defined in Data.Strict.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b Source #

(<$) :: a0 -> Either a b -> Either a a0 Source #

Functor (These a) 
Instance details

Defined in Data.Strict.These

Methods

fmap :: (a0 -> b) -> These a a0 -> These a b Source #

(<$) :: a0 -> These a b -> These a a0 Source #

Functor (Pair e) 
Instance details

Defined in Data.Strict.Tuple

Methods

fmap :: (a -> b) -> Pair e a -> Pair e b Source #

(<$) :: a -> Pair e b -> Pair e a Source #

Functor (These a) 
Instance details

Defined in Data.These

Methods

fmap :: (a0 -> b) -> These a a0 -> These a b Source #

(<$) :: a0 -> These a b -> These a a0 Source #

Functor f => Functor (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

fmap :: (a -> b) -> Lift f a -> Lift f b Source #

(<$) :: a -> Lift f b -> Lift f 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 #

Functor (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fmap :: (a -> b) -> HashMap k a -> HashMap k b Source #

(<$) :: a -> HashMap k b -> HashMap k 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 #

Arrow a => Functor (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 Source #

(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 Source #

Functor m => Functor (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b Source #

(<$) :: a0 -> Kleisli m a b -> Kleisli m a a0 Source #

Functor (Const m :: Type -> Type)

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

fmap :: (a -> b) -> Const m a -> Const m b Source #

(<$) :: a -> Const m b -> Const m a Source #

Functor f => Functor (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Ap f a -> Ap f b Source #

(<$) :: a -> Ap f b -> Ap f a Source #

Functor f => Functor (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Alt f a -> Alt f b Source #

(<$) :: a -> Alt f b -> Alt f a Source #

(Generic1 f, Functor (Rep1 f)) => Functor (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Generically1 f a -> Generically1 f b Source #

(<$) :: a -> Generically1 f b -> Generically1 f a Source #

Functor f => Functor (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Rec1 f a -> Rec1 f b Source #

(<$) :: a -> Rec1 f b -> Rec1 f a Source #

Functor (URec (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 (URec Char :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Char a -> URec Char b Source #

(<$) :: a -> URec Char b -> URec Char a Source #

Functor (URec Double :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Double a -> URec Double b Source #

(<$) :: a -> URec Double b -> URec Double a Source #

Functor (URec Float :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Float a -> URec Float b Source #

(<$) :: a -> URec Float b -> URec Float a Source #

Functor (URec Int :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Int a -> URec Int b Source #

(<$) :: a -> URec Int b -> URec Int a Source #

Functor (URec Word :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Word a -> URec Word b Source #

(<$) :: a -> URec Word b -> URec Word a Source #

Bifunctor p => Functor (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

fmap :: (a -> b) -> Join p a -> Join p b Source #

(<$) :: a -> Join p b -> Join p a Source #

(Applicative f, Monad f) => Functor (WhenMissing f x)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> WhenMissing f x a -> WhenMissing f x b Source #

(<$) :: a -> WhenMissing f x b -> WhenMissing f x a Source #

Functor f => Functor (CofreeF f a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

fmap :: (a0 -> b) -> CofreeF f a a0 -> CofreeF f a b Source #

(<$) :: a0 -> CofreeF f a b -> CofreeF f a a0 Source #

(Functor f, Functor w) => Functor (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

fmap :: (a -> b) -> CofreeT f w a -> CofreeT f w b Source #

(<$) :: a -> CofreeT f w b -> CofreeT f w a Source #

Functor f => Functor (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fmap :: (a0 -> b) -> FreeF f a a0 -> FreeF f a b Source #

(<$) :: a0 -> FreeF f a b -> FreeF f a a0 Source #

(Functor f, Functor m) => Functor (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fmap :: (a -> b) -> FreeT f m a -> FreeT f m b Source #

(<$) :: a -> FreeT f m b -> FreeT f m a Source #

Functor (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

fmap :: (a -> b) -> Tagged s a -> Tagged s b Source #

(<$) :: a -> Tagged s b -> Tagged s a Source #

(Functor f, Functor g) => Functor (These1 f g) 
Instance details

Defined in Data.Functor.These

Methods

fmap :: (a -> b) -> These1 f g a -> These1 f g b Source #

(<$) :: a -> These1 f g b -> These1 f g a Source #

Functor f => Functor (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

fmap :: (a -> b) -> Backwards f a -> Backwards f b Source #

(<$) :: a -> Backwards f b -> Backwards f a Source #

Functor m => Functor (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b Source #

(<$) :: a -> ExceptT e m b -> ExceptT e m a Source #

Functor m => Functor (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fmap :: (a -> b) -> IdentityT m a -> IdentityT m b Source #

(<$) :: a -> IdentityT m b -> IdentityT m a Source #

Functor m => Functor (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b Source #

(<$) :: a -> ReaderT r m b -> ReaderT r m a Source #

Functor m => Functor (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.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 (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

fmap :: (a0 -> b) -> Constant a a0 -> Constant a b Source #

(<$) :: a0 -> Constant a b -> Constant a a0 Source #

Functor f => Functor (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

fmap :: (a -> b) -> Reverse f a -> Reverse f b Source #

(<$) :: a -> Reverse f b -> Reverse f 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 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 (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 (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 ((,,,) 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 ((->) r)

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 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 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 (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 (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

fmap :: (a0 -> b) -> Clown f a a0 -> Clown f a b Source #

(<$) :: a0 -> Clown f a b -> Clown f a a0 Source #

Bifunctor p => Functor (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

fmap :: (a0 -> b) -> Flip p a a0 -> Flip p a b Source #

(<$) :: a0 -> Flip p a b -> Flip p a a0 Source #

Functor g => Functor (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

fmap :: (a0 -> b) -> Joker g a a0 -> Joker g a b Source #

(<$) :: a0 -> Joker g a b -> Joker g a a0 Source #

Bifunctor p => Functor (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

fmap :: (a0 -> b) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b Source #

(<$) :: a0 -> WrappedBifunctor p a b -> WrappedBifunctor p a a0 Source #

Functor f => Functor (WhenMatched f k x y)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b Source #

(<$) :: a -> WhenMatched f k x y b -> WhenMatched f k x y a Source #

Functor ((,,,,) a b c d)

Since: base-4.18.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, c, d, a0) -> (a, b, c, d, b0) Source #

(<$) :: a0 -> (a, b, c, d, b0) -> (a, b, c, d, a0) Source #

(Functor (f a), Functor (g a)) => Functor (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

fmap :: (a0 -> b) -> Product f g a a0 -> Product f g a b Source #

(<$) :: a0 -> Product f g a b -> Product f g a a0 Source #

(Functor (f a), Functor (g a)) => Functor (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

fmap :: (a0 -> b) -> Sum f g a a0 -> Sum f g a b Source #

(<$) :: a0 -> Sum f g a b -> Sum f g a a0 Source #

Functor ((,,,,,) a b c d e)

Since: base-4.18.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, c, d, e, a0) -> (a, b, c, d, e, b0) Source #

(<$) :: a0 -> (a, b, c, d, e, b0) -> (a, b, c, d, e, a0) Source #

(Functor f, Bifunctor p) => Functor (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

fmap :: (a0 -> b) -> Tannen f p a a0 -> Tannen f p a b Source #

(<$) :: a0 -> Tannen f p a b -> Tannen f p a a0 Source #

Functor ((,,,,,,) a b c d e f)

Since: base-4.18.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b0) -> (a, b, c, d, e, f, a0) -> (a, b, c, d, e, f, b0) Source #

(<$) :: a0 -> (a, b, c, d, e, f, b0) -> (a, b, c, d, e, f, a0) Source #

(Bifunctor p, Functor g) => Functor (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

fmap :: (a0 -> b) -> Biff p f g a a0 -> Biff p f g a b Source #

(<$) :: a0 -> Biff p f g a b -> Biff p f g a a0 Source #

class Num a where Source #

Basic numeric class.

The Haskell Report defines no laws for Num. However, (+) and (*) are customarily expected to define a ring and have the following properties:

Associativity of (+)
(x + y) + z = x + (y + z)
Commutativity of (+)
x + y = y + x
fromInteger 0 is the additive identity
x + fromInteger 0 = x
negate gives the additive inverse
x + negate x = fromInteger 0
Associativity of (*)
(x * y) * z = x * (y * z)
fromInteger 1 is the multiplicative identity
x * fromInteger 1 = x and fromInteger 1 * x = x
Distributivity of (*) with respect to (+)
a * (b + c) = (a * b) + (a * c) and (b + c) * a = (b * a) + (c * a)
Coherence with toInteger
if the type also implements Integral, then fromInteger is a left inverse for toInteger, i.e. fromInteger (toInteger i) == i

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 CBool 
Instance details

Defined in Foreign.C.Types

Num CChar 
Instance details

Defined in Foreign.C.Types

Num CClock 
Instance details

Defined in Foreign.C.Types

Num CDouble 
Instance details

Defined in Foreign.C.Types

Num CFloat 
Instance details

Defined in Foreign.C.Types

Num CInt 
Instance details

Defined in Foreign.C.Types

Num CIntMax 
Instance details

Defined in Foreign.C.Types

Num CIntPtr 
Instance details

Defined in Foreign.C.Types

Num CLLong 
Instance details

Defined in Foreign.C.Types

Num CLong 
Instance details

Defined in Foreign.C.Types

Num CPtrdiff 
Instance details

Defined in Foreign.C.Types

Num CSChar 
Instance details

Defined in Foreign.C.Types

Num CSUSeconds 
Instance details

Defined in Foreign.C.Types

Num CShort 
Instance details

Defined in Foreign.C.Types

Num CSigAtomic 
Instance details

Defined in Foreign.C.Types

Num CSize 
Instance details

Defined in Foreign.C.Types

Num CTime 
Instance details

Defined in Foreign.C.Types

Num CUChar 
Instance details

Defined in Foreign.C.Types

Num CUInt 
Instance details

Defined in Foreign.C.Types

Num CUIntMax 
Instance details

Defined in Foreign.C.Types

Num CUIntPtr 
Instance details

Defined in Foreign.C.Types

Num CULLong 
Instance details

Defined in Foreign.C.Types

Num CULong 
Instance details

Defined in Foreign.C.Types

Num CUSeconds 
Instance details

Defined in Foreign.C.Types

Num CUShort 
Instance details

Defined in Foreign.C.Types

Num CWchar 
Instance details

Defined in Foreign.C.Types

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Half 
Instance details

Defined in Numeric.Half.Internal

Methods

(+) :: Half -> Half -> Half Source #

(-) :: Half -> Half -> Half Source #

(*) :: Half -> Half -> Half Source #

negate :: Half -> Half Source #

abs :: Half -> Half Source #

signum :: Half -> Half Source #

fromInteger :: Integer -> Half Source #

Num Scientific 
Instance details

Defined in Data.Scientific

Methods

(+) :: Scientific -> Scientific -> Scientific Source #

(-) :: Scientific -> Scientific -> Scientific Source #

(*) :: Scientific -> Scientific -> Scientific Source #

negate :: Scientific -> Scientific Source #

abs :: Scientific -> Scientific Source #

signum :: Scientific -> Scientific Source #

fromInteger :: Integer -> Scientific Source #

Num B 
Instance details

Defined in Data.Text.Short.Internal

Methods

(+) :: B -> B -> B Source #

(-) :: B -> B -> B Source #

(*) :: B -> B -> B Source #

negate :: B -> B Source #

abs :: B -> B Source #

signum :: B -> B Source #

fromInteger :: Integer -> B Source #

Num DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Num NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Num Natural

Note that Natural's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Num a => Num (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(+) :: Down a -> Down a -> Down a Source #

(-) :: Down a -> Down a -> Down a Source #

(*) :: Down a -> Down a -> Down a Source #

negate :: Down a -> Down a Source #

abs :: Down a -> Down a Source #

signum :: Down a -> Down a Source #

fromInteger :: Integer -> Down a Source #

Num a => Num (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Max a -> Max a -> Max a Source #

(-) :: Max a -> Max a -> Max a Source #

(*) :: Max a -> Max a -> Max a Source #

negate :: Max a -> Max a Source #

abs :: Max a -> Max a Source #

signum :: Max a -> Max a Source #

fromInteger :: Integer -> Max a Source #

Num a => Num (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Min a -> Min a -> Min a Source #

(-) :: Min a -> Min a -> Min a Source #

(*) :: Min a -> Min a -> Min a Source #

negate :: Min a -> Min a Source #

abs :: Min a -> Min a Source #

signum :: Min a -> Min a Source #

fromInteger :: Integer -> Min a Source #

Num a => Num (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Num a => Num (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Sum a -> Sum a -> Sum a Source #

(-) :: Sum a -> Sum a -> Sum a Source #

(*) :: Sum a -> Sum a -> Sum a Source #

negate :: Sum a -> Sum a Source #

abs :: Sum a -> Sum a Source #

signum :: Sum a -> Sum a Source #

fromInteger :: Integer -> Sum a Source #

Integral a => Num (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(+) :: Ratio a -> Ratio a -> Ratio a Source #

(-) :: Ratio a -> Ratio a -> Ratio a Source #

(*) :: Ratio a -> Ratio a -> Ratio a Source #

negate :: Ratio a -> Ratio a Source #

abs :: Ratio a -> Ratio a Source #

signum :: Ratio a -> Ratio a Source #

fromInteger :: Integer -> Ratio a Source #

(Ord b, Num b) => Num (Range b) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

(+) :: Range b -> Range b -> Range b Source #

(-) :: Range b -> Range b -> Range b Source #

(*) :: Range b -> Range b -> Range b Source #

negate :: Range b -> Range b Source #

abs :: Range b -> Range b Source #

signum :: Range b -> Range b Source #

fromInteger :: Integer -> Range b Source #

Num (Fix SizeF) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

(+) :: Fix SizeF -> Fix SizeF -> Fix SizeF Source #

(-) :: Fix SizeF -> Fix SizeF -> Fix SizeF Source #

(*) :: Fix SizeF -> Fix SizeF -> Fix SizeF Source #

negate :: Fix SizeF -> Fix SizeF Source #

abs :: Fix SizeF -> Fix SizeF Source #

signum :: Fix SizeF -> Fix SizeF Source #

fromInteger :: Integer -> Fix SizeF Source #

Num (W c) 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

(+) :: W c -> W c -> W c Source #

(-) :: W c -> W c -> W c Source #

(*) :: W c -> W c -> W c Source #

negate :: W c -> W c Source #

abs :: W c -> W c Source #

signum :: W c -> W c Source #

fromInteger :: Integer -> W c Source #

Num a => Num (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

(+) :: Op a b -> Op a b -> Op a b Source #

(-) :: Op a b -> Op a b -> Op a b Source #

(*) :: Op a b -> Op a b -> Op a b Source #

negate :: Op a b -> Op a b Source #

abs :: Op a b -> Op a b Source #

signum :: Op a b -> Op a b Source #

fromInteger :: Integer -> Op a b Source #

Num a => Num (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(+) :: Const a b -> Const a b -> Const a b Source #

(-) :: Const a b -> Const a b -> Const a b Source #

(*) :: Const a b -> Const a b -> Const a b Source #

negate :: Const a b -> Const a b Source #

abs :: Const a b -> Const a b Source #

signum :: Const a b -> Const a b Source #

fromInteger :: Integer -> Const a b Source #

(Applicative f, Num a) => Num (Ap f a)

Note that even if the underlying Num and Applicative instances are lawful, for most Applicatives, this instance will not be lawful. If you use this instance with the list Applicative, the following customary laws will not hold:

Commutativity:

>>> Ap [10,20] + Ap [1,2]
Ap {getAp = [11,12,21,22]}
>>> Ap [1,2] + Ap [10,20]
Ap {getAp = [11,21,12,22]}

Additive inverse:

>>> Ap [] + negate (Ap [])
Ap {getAp = []}
>>> fromInteger 0 :: Ap [] Int
Ap {getAp = [0]}

Distributivity:

>>> Ap [1,2] * (3 + 4)
Ap {getAp = [7,14]}
>>> (Ap [1,2] * 3) + (Ap [1,2] * 4)
Ap {getAp = [7,11,10,14]}

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(+) :: Ap f a -> Ap f a -> Ap f a Source #

(-) :: Ap f a -> Ap f a -> Ap f a Source #

(*) :: Ap f a -> Ap f a -> Ap f a Source #

negate :: Ap f a -> Ap f a Source #

abs :: Ap f a -> Ap f a Source #

signum :: Ap f a -> Ap f a Source #

fromInteger :: Integer -> Ap f a Source #

Num (f a) => Num (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Alt f a -> Alt f a -> Alt f a Source #

(-) :: Alt f a -> Alt f a -> Alt f a Source #

(*) :: Alt f a -> Alt f a -> Alt f a Source #

negate :: Alt f a -> Alt f a Source #

abs :: Alt f a -> Alt f a Source #

signum :: Alt f a -> Alt f a Source #

fromInteger :: Integer -> Alt f a Source #

Num a => Num (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(+) :: Tagged s a -> Tagged s a -> Tagged s a Source #

(-) :: Tagged s a -> Tagged s a -> Tagged s a Source #

(*) :: Tagged s a -> Tagged s a -> Tagged s a Source #

negate :: Tagged s a -> Tagged s a Source #

abs :: Tagged s a -> Tagged s a Source #

signum :: Tagged s a -> Tagged s a Source #

fromInteger :: Integer -> Tagged s a Source #

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.

Ord, as defined by the Haskell report, implements a total order and has the following properties:

Comparability
x <= y || y <= x = True
Transitivity
if x <= y && y <= z = True, then x <= z = True
Reflexivity
x <= x = True
Antisymmetry
if x <= y && y <= x = True, then x == y = True

The following operator interactions are expected to hold:

  1. x >= y = y <= x
  2. x < y = x <= y && x /= y
  3. x > y = y < x
  4. x < y = compare x y == LT
  5. x > y = compare x y == GT
  6. x == y = compare x y == EQ
  7. min x y == if x <= y then x else y = True
  8. max x y == if x >= y then x else y = True

Note that (7.) and (8.) do not require min and max to return either of their arguments. The result is merely required to equal one of the arguments in terms of (==).

Minimal complete definition: either compare or <=. Using compare can be more efficient for complex types.

Minimal complete definition

compare | (<=)

Methods

compare :: a -> a -> Ordering 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 Key 
Instance details

Defined in Data.Aeson.Key

Methods

compare :: Key -> Key -> Ordering Source #

(<) :: Key -> Key -> Bool Source #

(<=) :: Key -> Key -> Bool Source #

(>) :: Key -> Key -> Bool Source #

(>=) :: Key -> Key -> Bool Source #

max :: Key -> Key -> Key Source #

min :: Key -> Key -> Key Source #

Ord DotNetTime 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

compare :: DotNetTime -> DotNetTime -> Ordering Source #

(<) :: DotNetTime -> DotNetTime -> Bool Source #

(<=) :: DotNetTime -> DotNetTime -> Bool Source #

(>) :: DotNetTime -> DotNetTime -> Bool Source #

(>=) :: DotNetTime -> DotNetTime -> Bool Source #

max :: DotNetTime -> DotNetTime -> DotNetTime Source #

min :: DotNetTime -> DotNetTime -> DotNetTime Source #

Ord JSONPathElement 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

compare :: JSONPathElement -> JSONPathElement -> Ordering Source #

(<) :: JSONPathElement -> JSONPathElement -> Bool Source #

(<=) :: JSONPathElement -> JSONPathElement -> Bool Source #

(>) :: JSONPathElement -> JSONPathElement -> Bool Source #

(>=) :: JSONPathElement -> JSONPathElement -> Bool Source #

max :: JSONPathElement -> JSONPathElement -> JSONPathElement Source #

min :: JSONPathElement -> JSONPathElement -> JSONPathElement Source #

Ord Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

compare :: Value -> Value -> Ordering Source #

(<) :: Value -> Value -> Bool Source #

(<=) :: Value -> Value -> Bool Source #

(>) :: Value -> Value -> Bool Source #

(>=) :: Value -> Value -> Bool Source #

max :: Value -> Value -> Value Source #

min :: Value -> Value -> Value Source #

Ord ByteArray

Non-lexicographic ordering. This compares the lengths of the byte arrays first and uses a lexicographic ordering if the lengths are equal. Subject to change between major versions.

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: All -> All -> Ordering Source #

(<) :: All -> All -> Bool Source #

(<=) :: All -> All -> Bool Source #

(>) :: All -> All -> Bool Source #

(>=) :: All -> All -> Bool Source #

max :: All -> All -> All Source #

min :: All -> All -> All Source #

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Any -> Any -> Ordering Source #

(<) :: Any -> Any -> Bool Source #

(<=) :: Any -> Any -> Bool Source #

(>) :: Any -> Any -> Bool Source #

(>=) :: Any -> Any -> Bool Source #

max :: Any -> Any -> Any Source #

min :: Any -> Any -> Any Source #

Ord SomeTypeRep 
Instance details

Defined in Data.Typeable.Internal

Ord CBool 
Instance details

Defined in Foreign.C.Types

Ord CChar 
Instance details

Defined in Foreign.C.Types

Ord CClock 
Instance details

Defined in Foreign.C.Types

Ord CDouble 
Instance details

Defined in Foreign.C.Types

Ord CFloat 
Instance details

Defined in Foreign.C.Types

Ord CInt 
Instance details

Defined in Foreign.C.Types

Ord CIntMax 
Instance details

Defined in Foreign.C.Types

Ord CIntPtr 
Instance details

Defined in Foreign.C.Types

Ord CLLong 
Instance details

Defined in Foreign.C.Types

Ord CLong 
Instance details

Defined in Foreign.C.Types

Ord CPtrdiff 
Instance details

Defined in Foreign.C.Types

Ord CSChar 
Instance details

Defined in Foreign.C.Types

Ord CSUSeconds 
Instance details

Defined in Foreign.C.Types

Ord CShort 
Instance details

Defined in Foreign.C.Types

Ord CSigAtomic 
Instance details

Defined in Foreign.C.Types

Ord CSize 
Instance details

Defined in Foreign.C.Types

Ord CTime 
Instance details

Defined in Foreign.C.Types

Ord CUChar 
Instance details

Defined in Foreign.C.Types

Ord CUInt 
Instance details

Defined in Foreign.C.Types

Ord CUIntMax 
Instance details

Defined in Foreign.C.Types

Ord CUIntPtr 
Instance details

Defined in Foreign.C.Types

Ord CULLong 
Instance details

Defined in Foreign.C.Types

Ord CULong 
Instance details

Defined in Foreign.C.Types

Ord CUSeconds 
Instance details

Defined in Foreign.C.Types

Ord CUShort 
Instance details

Defined in Foreign.C.Types

Ord CWchar 
Instance details

Defined in Foreign.C.Types

Ord Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Base

Ord ErrorCall

Since: base-4.7.0.0

Instance details

Defined in GHC.Exception

Ord ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Ord Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord ExitCode 
Instance details

Defined in GHC.IO.Exception

Ord BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

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 Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Ord SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Ord Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Ord ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Ord ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Ord ByteArray 
Instance details

Defined in Codec.CBOR.ByteArray

Methods

compare :: ByteArray -> ByteArray -> Ordering Source #

(<) :: ByteArray -> ByteArray -> Bool Source #

(<=) :: ByteArray -> ByteArray -> Bool Source #

(>) :: ByteArray -> ByteArray -> Bool Source #

(>=) :: ByteArray -> ByteArray -> Bool Source #

max :: ByteArray -> ByteArray -> ByteArray Source #

min :: ByteArray -> ByteArray -> ByteArray Source #

Ord SlicedByteArray 
Instance details

Defined in Codec.CBOR.ByteArray.Sliced

Methods

compare :: SlicedByteArray -> SlicedByteArray -> Ordering Source #

(<) :: SlicedByteArray -> SlicedByteArray -> Bool Source #

(<=) :: SlicedByteArray -> SlicedByteArray -> Bool Source #

(>) :: SlicedByteArray -> SlicedByteArray -> Bool Source #

(>=) :: SlicedByteArray -> SlicedByteArray -> Bool Source #

max :: SlicedByteArray -> SlicedByteArray -> SlicedByteArray Source #

min :: SlicedByteArray -> SlicedByteArray -> SlicedByteArray Source #

Ord IntSet 
Instance details

Defined in Data.IntSet.Internal

Ord OsChar

Byte ordering of the internal representation.

Instance details

Defined in System.OsString.Internal.Types.Hidden

Ord OsString

Byte ordering of the internal representation.

Instance details

Defined in System.OsString.Internal.Types.Hidden

Ord PosixChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Ord PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Ord WindowsChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Ord WindowsString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Ord BigNat 
Instance details

Defined in GHC.Num.BigNat

Ord Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Ord ClosureType 
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Ord PrimType 
Instance details

Defined in GHC.Exts.Heap.Closures

Ord TsoFlags 
Instance details

Defined in GHC.Exts.Heap.Closures

Ord WhatNext 
Instance details

Defined in GHC.Exts.Heap.Closures

Ord WhyBlocked 
Instance details

Defined in GHC.Exts.Heap.Closures

Ord CostCentre 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Ord CostCentreStack 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Ord IndexTable 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Ord StgTSOProfInfo 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Ord Ordering 
Instance details

Defined in GHC.Classes

Ord TyCon 
Instance details

Defined in GHC.Classes

Ord Half 
Instance details

Defined in Numeric.Half.Internal

Methods

compare :: Half -> Half -> Ordering Source #

(<) :: Half -> Half -> Bool Source #

(<=) :: Half -> Half -> Bool Source #

(>) :: Half -> Half -> Bool Source #

(>=) :: Half -> Half -> Bool Source #

max :: Half -> Half -> Half Source #

min :: Half -> Half -> Half Source #

Ord URI 
Instance details

Defined in Network.URI

Methods

compare :: URI -> URI -> Ordering Source #

(<) :: URI -> URI -> Bool Source #

(<=) :: URI -> URI -> Bool Source #

(>) :: URI -> URI -> Bool Source #

(>=) :: URI -> URI -> Bool Source #

max :: URI -> URI -> URI Source #

min :: URI -> URI -> URI Source #

Ord URIAuth 
Instance details

Defined in Network.URI

Methods

compare :: URIAuth -> URIAuth -> Ordering Source #

(<) :: URIAuth -> URIAuth -> Bool Source #

(<=) :: URIAuth -> URIAuth -> Bool Source #

(>) :: URIAuth -> URIAuth -> Bool Source #

(>=) :: URIAuth -> URIAuth -> Bool Source #

max :: URIAuth -> URIAuth -> URIAuth Source #

min :: URIAuth -> URIAuth -> URIAuth Source #

Ord Undefined 
Instance details

Defined in Relude.Debug

Ord Scientific 
Instance details

Defined in Data.Scientific

Methods

compare :: Scientific -> Scientific -> Ordering Source #

(<) :: Scientific -> Scientific -> Bool Source #

(<=) :: Scientific -> Scientific -> Bool Source #

(>) :: Scientific -> Scientific -> Bool Source #

(>=) :: Scientific -> Scientific -> Bool Source #

max :: Scientific -> Scientific -> Scientific Source #

min :: Scientific -> Scientific -> Scientific Source #

Ord Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

Ord AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Con -> Con -> Ordering Source #

(<) :: Con -> Con -> Bool Source #

(<=) :: Con -> Con -> Bool Source #

(>) :: Con -> Con -> Bool Source #

(>=) :: Con -> Con -> Bool Source #

max :: Con -> Con -> Con Source #

min :: Con -> Con -> Con Source #

Ord Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Dec -> Dec -> Ordering Source #

(<) :: Dec -> Dec -> Bool Source #

(<=) :: Dec -> Dec -> Bool Source #

(>) :: Dec -> Dec -> Bool Source #

(>=) :: Dec -> Dec -> Bool Source #

max :: Dec -> Dec -> Dec Source #

min :: Dec -> Dec -> Dec Source #

Ord DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Exp -> Exp -> Ordering Source #

(<) :: Exp -> Exp -> Bool Source #

(<=) :: Exp -> Exp -> Bool Source #

(>) :: Exp -> Exp -> Bool Source #

(>=) :: Exp -> Exp -> Bool Source #

max :: Exp -> Exp -> Exp Source #

min :: Exp -> Exp -> Exp Source #

Ord FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Lit -> Lit -> Ordering Source #

(<) :: Lit -> Lit -> Bool Source #

(<=) :: Lit -> Lit -> Bool Source #

(>) :: Lit -> Lit -> Bool Source #

(>=) :: Lit -> Lit -> Bool Source #

max :: Lit -> Lit -> Lit Source #

min :: Lit -> Lit -> Lit Source #

Ord Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Loc -> Loc -> Ordering Source #

(<) :: Loc -> Loc -> Bool Source #

(<=) :: Loc -> Loc -> Bool Source #

(>) :: Loc -> Loc -> Bool Source #

(>=) :: Loc -> Loc -> Bool Source #

max :: Loc -> Loc -> Loc Source #

min :: Loc -> Loc -> Loc Source #

Ord Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Pat -> Pat -> Ordering Source #

(<) :: Pat -> Pat -> Bool Source #

(<=) :: Pat -> Pat -> Bool Source #

(>) :: Pat -> Pat -> Bool Source #

(>=) :: Pat -> Pat -> Bool Source #

max :: Pat -> Pat -> Pat Source #

min :: Pat -> Pat -> Pat Source #

Ord PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord B 
Instance details

Defined in Data.Text.Short.Internal

Methods

compare :: B -> B -> Ordering Source #

(<) :: B -> B -> Bool Source #

(<=) :: B -> B -> Bool Source #

(>) :: B -> B -> Bool Source #

(>=) :: B -> B -> Bool Source #

max :: B -> B -> B Source #

min :: B -> B -> B Source #

Ord ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

compare :: ShortText -> ShortText -> Ordering Source #

(<) :: ShortText -> ShortText -> Bool Source #

(<=) :: ShortText -> ShortText -> Bool Source #

(>) :: ShortText -> ShortText -> Bool Source #

(>=) :: ShortText -> ShortText -> Bool Source #

max :: ShortText -> ShortText -> ShortText Source #

min :: ShortText -> ShortText -> ShortText Source #

Ord Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

compare :: Day -> Day -> Ordering Source #

(<) :: Day -> Day -> Bool Source #

(<=) :: Day -> Day -> Bool Source #

(>) :: Day -> Day -> Bool Source #

(>=) :: Day -> Day -> Bool Source #

max :: Day -> Day -> Day Source #

min :: Day -> Day -> Day Source #

Ord DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Ord NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Ord UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Ord LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Ord UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

compare :: UUID -> UUID -> Ordering Source #

(<) :: UUID -> UUID -> Bool Source #

(<=) :: UUID -> UUID -> Bool Source #

(>) :: UUID -> UUID -> Bool Source #

(>=) :: UUID -> UUID -> Bool Source #

max :: UUID -> UUID -> UUID Source #

min :: UUID -> UUID -> UUID Source #

Ord UnpackedUUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

compare :: UnpackedUUID -> UnpackedUUID -> Ordering Source #

(<) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

(<=) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

(>) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

(>=) :: UnpackedUUID -> UnpackedUUID -> Bool Source #

max :: UnpackedUUID -> UnpackedUUID -> UnpackedUUID Source #

min :: UnpackedUUID -> UnpackedUUID -> UnpackedUUID Source #

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Ord Natural 
Instance details

Defined in GHC.Num.Natural

Ord () 
Instance details

Defined in GHC.Classes

Methods

compare :: () -> () -> Ordering Source #

(<) :: () -> () -> Bool Source #

(<=) :: () -> () -> Bool Source #

(>) :: () -> () -> Bool Source #

(>=) :: () -> () -> Bool Source #

max :: () -> () -> () Source #

min :: () -> () -> () Source #

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

Methods

compare :: Int -> Int -> Ordering Source #

(<) :: Int -> Int -> Bool Source #

(<=) :: Int -> Int -> Bool Source #

(>) :: Int -> Int -> Bool Source #

(>=) :: Int -> Int -> Bool Source #

max :: Int -> Int -> Int Source #

min :: Int -> Int -> Int Source #

Ord Word 
Instance details

Defined in GHC.Classes

Ord (Encoding' a) 
Instance details

Defined in Data.Aeson.Encoding.Internal

Methods

compare :: Encoding' a -> Encoding' a -> Ordering Source #

(<) :: Encoding' a -> Encoding' a -> Bool Source #

(<=) :: Encoding' a -> Encoding' a -> Bool Source #

(>) :: Encoding' a -> Encoding' a -> Bool Source #

(>=) :: Encoding' a -> Encoding' a -> Bool Source #

max :: Encoding' a -> Encoding' a -> Encoding' a Source #

min :: Encoding' a -> Encoding' a -> Encoding' a Source #

Ord v => Ord (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

compare :: KeyMap v -> KeyMap v -> Ordering Source #

(<) :: KeyMap v -> KeyMap v -> Bool Source #

(<=) :: KeyMap v -> KeyMap v -> Bool Source #

(>) :: KeyMap v -> KeyMap v -> Bool Source #

(>=) :: KeyMap v -> KeyMap v -> Bool Source #

max :: KeyMap v -> KeyMap v -> KeyMap v Source #

min :: KeyMap v -> KeyMap v -> KeyMap v Source #

Ord a => Ord (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Ord a => Ord (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Ord a => Ord (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: First a -> First a -> Ordering Source #

(<) :: First a -> First a -> Bool Source #

(<=) :: First a -> First a -> Bool Source #

(>) :: First a -> First a -> Bool Source #

(>=) :: First a -> First a -> Bool Source #

max :: First a -> First a -> First a Source #

min :: First a -> First a -> First a Source #

Ord a => Ord (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: Last a -> Last a -> Ordering Source #

(<) :: Last a -> Last a -> Bool Source #

(<=) :: Last a -> Last a -> Bool Source #

(>) :: Last a -> Last a -> Bool Source #

(>=) :: Last a -> Last a -> Bool Source #

max :: Last a -> Last a -> Last a Source #

min :: Last a -> Last a -> Last a Source #

Ord a => Ord (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

compare :: Down a -> Down a -> Ordering Source #

(<) :: Down a -> Down a -> Bool Source #

(<=) :: Down a -> Down a -> Bool Source #

(>) :: Down a -> Down a -> Bool Source #

(>=) :: Down a -> Down a -> Bool Source #

max :: Down a -> Down a -> Down a Source #

min :: Down a -> Down a -> Down a Source #

Ord a => Ord (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: First a -> First a -> Ordering Source #

(<) :: First a -> First a -> Bool Source #

(<=) :: First a -> First a -> Bool Source #

(>) :: First a -> First a -> Bool Source #

(>=) :: First a -> First a -> Bool Source #

max :: First a -> First a -> First a Source #

min :: First a -> First a -> First a Source #

Ord a => Ord (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Last a -> Last a -> Ordering Source #

(<) :: Last a -> Last a -> Bool Source #

(<=) :: Last a -> Last a -> Bool Source #

(>) :: Last a -> Last a -> Bool Source #

(>=) :: Last a -> Last a -> Bool Source #

max :: Last a -> Last a -> Last a Source #

min :: Last a -> Last a -> Last a Source #

Ord a => Ord (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Max a -> Max a -> Ordering Source #

(<) :: Max a -> Max a -> Bool Source #

(<=) :: Max a -> Max a -> Bool Source #

(>) :: Max a -> Max a -> Bool Source #

(>=) :: Max a -> Max a -> Bool Source #

max :: Max a -> Max a -> Max a Source #

min :: Max a -> Max a -> Max a Source #

Ord a => Ord (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Min a -> Min a -> Ordering Source #

(<) :: Min a -> Min a -> Bool Source #

(<=) :: Min a -> Min a -> Bool Source #

(>) :: Min a -> Min a -> Bool Source #

(>=) :: Min a -> Min a -> Bool Source #

max :: Min a -> Min a -> Min a Source #

min :: Min a -> Min a -> Min a Source #

Ord m => Ord (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Dual a -> Dual a -> Ordering Source #

(<) :: Dual a -> Dual a -> Bool Source #

(<=) :: Dual a -> Dual a -> Bool Source #

(>) :: Dual a -> Dual a -> Bool Source #

(>=) :: Dual a -> Dual a -> Bool Source #

max :: Dual a -> Dual a -> Dual a Source #

min :: Dual a -> Dual a -> Dual a Source #

Ord a => Ord (Product 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

Methods

compare :: Sum a -> Sum a -> Ordering Source #

(<) :: Sum a -> Sum a -> Bool Source #

(<=) :: Sum a -> Sum a -> Bool Source #

(>) :: Sum a -> Sum a -> Bool Source #

(>=) :: Sum a -> Sum a -> Bool Source #

max :: Sum a -> Sum a -> Sum a Source #

min :: Sum a -> Sum a -> Sum a Source #

Ord a => Ord (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Ord p => Ord (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: Par1 p -> Par1 p -> Ordering Source #

(<) :: Par1 p -> Par1 p -> Bool Source #

(<=) :: Par1 p -> Par1 p -> Bool Source #

(>) :: Par1 p -> Par1 p -> Bool Source #

(>=) :: Par1 p -> Par1 p -> Bool Source #

max :: Par1 p -> Par1 p -> Par1 p Source #

min :: Par1 p -> Par1 p -> Par1 p Source #

Ord (FunPtr a) 
Instance details

Defined in GHC.Ptr

Methods

compare :: FunPtr a -> FunPtr a -> Ordering Source #

(<) :: FunPtr a -> FunPtr a -> Bool Source #

(<=) :: FunPtr a -> FunPtr a -> Bool Source #

(>) :: FunPtr a -> FunPtr a -> Bool Source #

(>=) :: FunPtr a -> FunPtr a -> Bool Source #

max :: FunPtr a -> FunPtr a -> FunPtr a Source #

min :: FunPtr a -> FunPtr a -> FunPtr a Source #

Ord (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

compare :: Ptr a -> Ptr a -> Ordering Source #

(<) :: Ptr a -> Ptr a -> Bool Source #

(<=) :: Ptr a -> Ptr a -> Bool Source #

(>) :: Ptr a -> Ptr a -> Bool Source #

(>=) :: Ptr a -> Ptr a -> Bool Source #

max :: Ptr a -> Ptr a -> Ptr a Source #

min :: Ptr a -> Ptr a -> Ptr a Source #

Integral a => Ord (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

compare :: Ratio a -> Ratio a -> Ordering Source #

(<) :: Ratio a -> Ratio a -> Bool Source #

(<=) :: Ratio a -> Ratio a -> Bool Source #

(>) :: Ratio a -> Ratio a -> Bool Source #

(>=) :: Ratio a -> Ratio a -> Bool Source #

max :: Ratio a -> Ratio a -> Ratio a Source #

min :: Ratio a -> Ratio a -> Ratio a Source #

Ord a => Ord (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

compare :: IntMap a -> IntMap a -> Ordering Source #

(<) :: IntMap a -> IntMap a -> Bool Source #

(<=) :: IntMap a -> IntMap a -> Bool Source #

(>) :: IntMap a -> IntMap a -> Bool Source #

(>=) :: IntMap a -> IntMap a -> Bool Source #

max :: IntMap a -> IntMap a -> IntMap a Source #

min :: IntMap a -> IntMap a -> IntMap a Source #

Ord a => Ord (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: Seq a -> Seq a -> Ordering Source #

(<) :: Seq a -> Seq a -> Bool Source #

(<=) :: Seq a -> Seq a -> Bool Source #

(>) :: Seq a -> Seq a -> Bool Source #

(>=) :: Seq a -> Seq a -> Bool Source #

max :: Seq a -> Seq a -> Seq a Source #

min :: Seq a -> Seq a -> Seq a Source #

Ord a => Ord (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: ViewL a -> ViewL a -> Ordering Source #

(<) :: ViewL a -> ViewL a -> Bool Source #

(<=) :: ViewL a -> ViewL a -> Bool Source #

(>) :: ViewL a -> ViewL a -> Bool Source #

(>=) :: ViewL a -> ViewL a -> Bool Source #

max :: ViewL a -> ViewL a -> ViewL a Source #

min :: ViewL a -> ViewL a -> ViewL a Source #

Ord a => Ord (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: ViewR a -> ViewR a -> Ordering Source #

(<) :: ViewR a -> ViewR a -> Bool Source #

(<=) :: ViewR a -> ViewR a -> Bool Source #

(>) :: ViewR a -> ViewR a -> Bool Source #

(>=) :: ViewR a -> ViewR a -> Bool Source #

max :: ViewR a -> ViewR a -> ViewR a Source #

min :: ViewR a -> ViewR a -> ViewR a Source #

Ord a => Ord (Intersection a) 
Instance details

Defined in Data.Set.Internal

Ord a => Ord (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

compare :: Set a -> Set a -> Ordering Source #

(<) :: Set a -> Set a -> Bool Source #

(<=) :: Set a -> Set a -> Bool Source #

(>) :: Set a -> Set a -> Bool Source #

(>=) :: Set a -> Set a -> Bool Source #

max :: Set a -> Set a -> Set a Source #

min :: Set a -> Set a -> Set a Source #

Ord a => Ord (Tree a)

Since: containers-0.6.5

Instance details

Defined in Data.Tree

Methods

compare :: Tree a -> Tree a -> Ordering Source #

(<) :: Tree a -> Tree a -> Bool Source #

(<=) :: Tree a -> Tree a -> Bool Source #

(>) :: Tree a -> Tree a -> Bool Source #

(>=) :: Tree a -> Tree a -> Bool Source #

max :: Tree a -> Tree a -> Tree a Source #

min :: Tree a -> Tree a -> Tree a Source #

Ord1 f => Ord (Fix f) 
Instance details

Defined in Data.Fix

Methods

compare :: Fix f -> Fix f -> Ordering Source #

(<) :: Fix f -> Fix f -> Bool Source #

(<=) :: Fix f -> Fix f -> Bool Source #

(>) :: Fix f -> Fix f -> Bool Source #

(>=) :: Fix f -> Fix f -> Bool Source #

max :: Fix f -> Fix f -> Fix f Source #

min :: Fix f -> Fix f -> Fix f Source #

(Functor f, Ord1 f) => Ord (Mu f) 
Instance details

Defined in Data.Fix

Methods

compare :: Mu f -> Mu f -> Ordering Source #

(<) :: Mu f -> Mu f -> Bool Source #

(<=) :: Mu f -> Mu f -> Bool Source #

(>) :: Mu f -> Mu f -> Bool Source #

(>=) :: Mu f -> Mu f -> Bool Source #

max :: Mu f -> Mu f -> Mu f Source #

min :: Mu f -> Mu f -> Mu f Source #

(Functor f, Ord1 f) => Ord (Nu f) 
Instance details

Defined in Data.Fix

Methods

compare :: Nu f -> Nu f -> Ordering Source #

(<) :: Nu f -> Nu f -> Bool Source #

(<=) :: Nu f -> Nu f -> Bool Source #

(>) :: Nu f -> Nu f -> Bool Source #

(>=) :: Nu f -> Nu f -> Bool Source #

max :: Nu f -> Nu f -> Nu f Source #

min :: Nu f -> Nu f -> Nu f Source #

Ord a => Ord (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

compare :: DNonEmpty a -> DNonEmpty a -> Ordering Source #

(<) :: DNonEmpty a -> DNonEmpty a -> Bool Source #

(<=) :: DNonEmpty a -> DNonEmpty a -> Bool Source #

(>) :: DNonEmpty a -> DNonEmpty a -> Bool Source #

(>=) :: DNonEmpty a -> DNonEmpty a -> Bool Source #

max :: DNonEmpty a -> DNonEmpty a -> DNonEmpty a Source #

min :: DNonEmpty a -> DNonEmpty a -> DNonEmpty a Source #

Ord a => Ord (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

compare :: DList a -> DList a -> Ordering Source #

(<) :: DList a -> DList a -> Bool Source #

(<=) :: DList a -> DList a -> Bool Source #

(>) :: DList a -> DList a -> Bool Source #

(>=) :: DList a -> DList a -> Bool Source #

max :: DList a -> DList a -> DList a Source #

min :: DList a -> DList a -> DList a Source #

Ord a => Ord (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

compare :: Hashed a -> Hashed a -> Ordering Source #

(<) :: Hashed a -> Hashed a -> Bool Source #

(<=) :: Hashed a -> Hashed a -> Bool Source #

(>) :: Hashed a -> Hashed a -> Bool Source #

(>=) :: Hashed a -> Hashed a -> Bool Source #

max :: Hashed a -> Hashed a -> Hashed a Source #

min :: Hashed a -> Hashed a -> Hashed a Source #

Ord a => Ord (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

compare :: Array a -> Array a -> Ordering Source #

(<) :: Array a -> Array a -> Bool Source #

(<=) :: Array a -> Array a -> Bool Source #

(>) :: Array a -> Array a -> Bool Source #

(>=) :: Array a -> Array a -> Bool Source #

max :: Array a -> Array a -> Array a Source #

min :: Array a -> Array a -> Array a Source #

(Ord a, Prim a) => Ord (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

compare :: PrimArray a -> PrimArray a -> Ordering Source #

(<) :: PrimArray a -> PrimArray a -> Bool Source #

(<=) :: PrimArray a -> PrimArray a -> Bool Source #

(>) :: PrimArray a -> PrimArray a -> Bool Source #

(>=) :: PrimArray a -> PrimArray a -> Bool Source #

max :: PrimArray a -> PrimArray a -> PrimArray a Source #

min :: PrimArray a -> PrimArray a -> PrimArray a Source #

Ord a => Ord (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

compare :: SmallArray a -> SmallArray a -> Ordering Source #

(<) :: SmallArray a -> SmallArray a -> Bool Source #

(<=) :: SmallArray a -> SmallArray a -> Bool Source #

(>) :: SmallArray a -> SmallArray a -> Bool Source #

(>=) :: SmallArray a -> SmallArray a -> Bool Source #

max :: SmallArray a -> SmallArray a -> SmallArray a Source #

min :: SmallArray a -> SmallArray a -> SmallArray a Source #

Ord g => Ord (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

compare :: StateGen g -> StateGen g -> Ordering Source #

(<) :: StateGen g -> StateGen g -> Bool Source #

(<=) :: StateGen g -> StateGen g -> Bool Source #

(>) :: StateGen g -> StateGen g -> Bool Source #

(>=) :: StateGen g -> StateGen g -> Bool Source #

max :: StateGen g -> StateGen g -> StateGen g Source #

min :: StateGen g -> StateGen g -> StateGen g Source #

Ord g => Ord (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: AtomicGen g -> AtomicGen g -> Ordering Source #

(<) :: AtomicGen g -> AtomicGen g -> Bool Source #

(<=) :: AtomicGen g -> AtomicGen g -> Bool Source #

(>) :: AtomicGen g -> AtomicGen g -> Bool Source #

(>=) :: AtomicGen g -> AtomicGen g -> Bool Source #

max :: AtomicGen g -> AtomicGen g -> AtomicGen g Source #

min :: AtomicGen g -> AtomicGen g -> AtomicGen g Source #

Ord g => Ord (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: IOGen g -> IOGen g -> Ordering Source #

(<) :: IOGen g -> IOGen g -> Bool Source #

(<=) :: IOGen g -> IOGen g -> Bool Source #

(>) :: IOGen g -> IOGen g -> Bool Source #

(>=) :: IOGen g -> IOGen g -> Bool Source #

max :: IOGen g -> IOGen g -> IOGen g Source #

min :: IOGen g -> IOGen g -> IOGen g Source #

Ord g => Ord (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: STGen g -> STGen g -> Ordering Source #

(<) :: STGen g -> STGen g -> Bool Source #

(<=) :: STGen g -> STGen g -> Bool Source #

(>) :: STGen g -> STGen g -> Bool Source #

(>=) :: STGen g -> STGen g -> Bool Source #

max :: STGen g -> STGen g -> STGen g Source #

min :: STGen g -> STGen g -> STGen g Source #

Ord g => Ord (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

compare :: TGen g -> TGen g -> Ordering Source #

(<) :: TGen g -> TGen g -> Bool Source #

(<=) :: TGen g -> TGen g -> Bool Source #

(>) :: TGen g -> TGen g -> Bool Source #

(>=) :: TGen g -> TGen g -> Bool Source #

max :: TGen g -> TGen g -> TGen g Source #

min :: TGen g -> TGen g -> TGen g Source #

Ord a => Ord (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

compare :: Maybe a -> Maybe a -> Ordering Source #

(<) :: Maybe a -> Maybe a -> Bool Source #

(<=) :: Maybe a -> Maybe a -> Bool Source #

(>) :: Maybe a -> Maybe a -> Bool Source #

(>=) :: Maybe a -> Maybe a -> Bool Source #

max :: Maybe a -> Maybe a -> Maybe a Source #

min :: Maybe a -> Maybe a -> Maybe a Source #

Ord flag => Ord (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: TyVarBndr flag -> TyVarBndr flag -> Ordering Source #

(<) :: TyVarBndr flag -> TyVarBndr flag -> Bool Source #

(<=) :: TyVarBndr flag -> TyVarBndr flag -> Bool Source #

(>) :: TyVarBndr flag -> TyVarBndr flag -> Bool Source #

(>=) :: TyVarBndr flag -> TyVarBndr flag -> Bool Source #

max :: TyVarBndr flag -> TyVarBndr flag -> TyVarBndr flag Source #

min :: TyVarBndr flag -> TyVarBndr flag -> TyVarBndr flag Source #

Ord a => Ord (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Ord a => Ord (Vector a) 
Instance details

Defined in Data.Vector

Methods

compare :: Vector a -> Vector a -> Ordering Source #

(<) :: Vector a -> Vector a -> Bool Source #

(<=) :: Vector a -> Vector a -> Bool Source #

(>) :: Vector a -> Vector a -> Bool Source #

(>=) :: Vector a -> Vector a -> Bool Source #

max :: Vector a -> Vector a -> Vector a Source #

min :: Vector a -> Vector a -> Vector a Source #

(Prim a, Ord a) => Ord (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

compare :: Vector a -> Vector a -> Ordering Source #

(<) :: Vector a -> Vector a -> Bool Source #

(<=) :: Vector a -> Vector a -> Bool Source #

(>) :: Vector a -> Vector a -> Bool Source #

(>=) :: Vector a -> Vector a -> Bool Source #

max :: Vector a -> Vector a -> Vector a Source #

min :: Vector a -> Vector a -> Vector a Source #

(Storable a, Ord a) => Ord (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

compare :: Vector a -> Vector a -> Ordering Source #

(<) :: Vector a -> Vector a -> Bool Source #

(<=) :: Vector a -> Vector a -> Bool Source #

(>) :: Vector a -> Vector a -> Bool Source #

(>=) :: Vector a -> Vector a -> Bool Source #

max :: Vector a -> Vector a -> Vector a Source #

min :: Vector a -> Vector a -> Vector a Source #

Ord a => Ord (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

compare :: Maybe a -> Maybe a -> Ordering Source #

(<) :: Maybe a -> Maybe a -> Bool Source #

(<=) :: Maybe a -> Maybe a -> Bool Source #

(>) :: Maybe a -> Maybe a -> Bool Source #

(>=) :: Maybe a -> Maybe a -> Bool Source #

max :: Maybe a -> Maybe a -> Maybe a Source #

min :: Maybe a -> Maybe a -> Maybe a Source #

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 [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 b) => Ord (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

compare :: Either a b -> Either a b -> Ordering Source #

(<) :: Either a b -> Either a b -> Bool Source #

(<=) :: Either a b -> Either a b -> Bool Source #

(>) :: Either a b -> Either a b -> Bool Source #

(>=) :: Either a b -> Either a b -> Bool Source #

max :: Either a b -> Either a b -> Either a b Source #

min :: Either a b -> Either a b -> Either a b Source #

Ord (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

compare :: Proxy s -> Proxy s -> Ordering Source #

(<) :: Proxy s -> Proxy s -> Bool Source #

(<=) :: Proxy s -> Proxy s -> Bool Source #

(>) :: Proxy s -> Proxy s -> Bool Source #

(>=) :: Proxy s -> Proxy s -> Bool Source #

max :: Proxy s -> Proxy s -> Proxy s Source #

min :: Proxy s -> Proxy s -> Proxy s Source #

Ord a => Ord (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Arg a b -> Arg a b -> Ordering Source #

(<) :: Arg a b -> Arg a b -> Bool Source #

(<=) :: Arg a b -> Arg a b -> Bool Source #

(>) :: Arg a b -> Arg a b -> Bool Source #

(>=) :: Arg a b -> Arg a b -> Bool Source #

max :: Arg a b -> Arg a b -> Arg a b Source #

min :: Arg a b -> Arg a b -> Arg a b Source #

Ord (TypeRep a)

Since: base-4.4.0.0

Instance details

Defined in Data.Typeable.Internal

Ord (U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: U1 p -> U1 p -> Ordering Source #

(<) :: U1 p -> U1 p -> Bool Source #

(<=) :: U1 p -> U1 p -> Bool Source #

(>) :: U1 p -> U1 p -> Bool Source #

(>=) :: U1 p -> U1 p -> Bool Source #

max :: U1 p -> U1 p -> U1 p Source #

min :: U1 p -> U1 p -> U1 p Source #

Ord (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: V1 p -> V1 p -> Ordering Source #

(<) :: V1 p -> V1 p -> Bool Source #

(<=) :: V1 p -> V1 p -> Bool Source #

(>) :: V1 p -> V1 p -> Bool Source #

(>=) :: V1 p -> V1 p -> Bool Source #

max :: V1 p -> V1 p -> V1 p Source #

min :: V1 p -> V1 p -> V1 p Source #

(Ord k, Ord v) => Ord (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

compare :: Map k v -> Map k v -> Ordering Source #

(<) :: Map k v -> Map k v -> Bool Source #

(<=) :: Map k v -> Map k v -> Bool Source #

(>) :: Map k v -> Map k v -> Bool Source #

(>=) :: Map k v -> Map k v -> Bool Source #

max :: Map k v -> Map k v -> Map k v Source #

min :: Map k v -> Map k v -> Map k v Source #

(Ord1 f, Ord a) => Ord (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

compare :: Cofree f a -> Cofree f a -> Ordering Source #

(<) :: Cofree f a -> Cofree f a -> Bool Source #

(<=) :: Cofree f a -> Cofree f a -> Bool Source #

(>) :: Cofree f a -> Cofree f a -> Bool Source #

(>=) :: Cofree f a -> Cofree f a -> Bool Source #

max :: Cofree f a -> Cofree f a -> Cofree f a Source #

min :: Cofree f a -> Cofree f a -> Cofree f a Source #

(Ord1 f, Ord a) => Ord (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

compare :: Free f a -> Free f a -> Ordering Source #

(<) :: Free f a -> Free f a -> Bool Source #

(<=) :: Free f a -> Free f a -> Bool Source #

(>) :: Free f a -> Free f a -> Bool Source #

(>=) :: Free f a -> Free f a -> Bool Source #

max :: Free f a -> Free f a -> Free f a Source #

min :: Free f a -> Free f a -> Free f a Source #

(Ord a, Ord b) => Ord (ListF a b) 
Instance details

Defined in Data.Functor.Base

Methods

compare :: ListF a b -> ListF a b -> Ordering Source #

(<) :: ListF a b -> ListF a b -> Bool Source #

(<=) :: ListF a b -> ListF a b -> Bool Source #

(>) :: ListF a b -> ListF a b -> Bool Source #

(>=) :: ListF a b -> ListF a b -> Bool Source #

max :: ListF a b -> ListF a b -> ListF a b Source #

min :: ListF a b -> ListF a b -> ListF a b Source #

(Ord a, Ord b) => Ord (NonEmptyF a b) 
Instance details

Defined in Data.Functor.Base

Methods

compare :: NonEmptyF a b -> NonEmptyF a b -> Ordering Source #

(<) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source #

(<=) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source #

(>) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source #

(>=) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source #

max :: NonEmptyF a b -> NonEmptyF a b -> NonEmptyF a b Source #

min :: NonEmptyF a b -> NonEmptyF a b -> NonEmptyF a b Source #

(Ord a, Ord b) => Ord (TreeF a b) 
Instance details

Defined in Data.Functor.Base

Methods

compare :: TreeF a b -> TreeF a b -> Ordering Source #

(<) :: TreeF a b -> TreeF a b -> Bool Source #

(<=) :: TreeF a b -> TreeF a b -> Bool Source #

(>) :: TreeF a b -> TreeF a b -> Bool Source #

(>=) :: TreeF a b -> TreeF a b -> Bool Source #

max :: TreeF a b -> TreeF a b -> TreeF a b Source #

min :: TreeF a b -> TreeF a b -> TreeF a b Source #

(Ord a, Ord b) => Ord (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

compare :: Either a b -> Either a b -> Ordering Source #

(<) :: Either a b -> Either a b -> Bool Source #

(<=) :: Either a b -> Either a b -> Bool Source #

(>) :: Either a b -> Either a b -> Bool Source #

(>=) :: Either a b -> Either a b -> Bool Source #

max :: Either a b -> Either a b -> Either a b Source #

min :: Either a b -> Either a b -> Either a b Source #

(Ord a, Ord b) => Ord (These a b) 
Instance details

Defined in Data.Strict.These

Methods

compare :: These a b -> These a b -> Ordering Source #

(<) :: These a b -> These a b -> Bool Source #

(<=) :: These a b -> These a b -> Bool Source #

(>) :: These a b -> These a b -> Bool Source #

(>=) :: These a b -> These a b -> Bool Source #

max :: These a b -> These a b -> These a b Source #

min :: These a b -> These a b -> These a b Source #

(Ord a, Ord b) => Ord (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

compare :: Pair a b -> Pair a b -> Ordering Source #

(<) :: Pair a b -> Pair a b -> Bool Source #

(<=) :: Pair a b -> Pair a b -> Bool Source #

(>) :: Pair a b -> Pair a b -> Bool Source #

(>=) :: Pair a b -> Pair a b -> Bool Source #

max :: Pair a b -> Pair a b -> Pair a b Source #

min :: Pair a b -> Pair a b -> Pair a b Source #

(Ord a, Ord b) => Ord (These a b) 
Instance details

Defined in Data.These

Methods

compare :: These a b -> These a b -> Ordering Source #

(<) :: These a b -> These a b -> Bool Source #

(<=) :: These a b -> These a b -> Bool Source #

(>) :: These a b -> These a b -> Bool Source #

(>=) :: These a b -> These a b -> Bool Source #

max :: These a b -> These a b -> These a b Source #

min :: These a b -> These a b -> These a b Source #

(Ord1 f, Ord a) => Ord (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Methods

compare :: Lift f a -> Lift f a -> Ordering Source #

(<) :: Lift f a -> Lift f a -> Bool Source #

(<=) :: Lift f a -> Lift f a -> Bool Source #

(>) :: Lift f a -> Lift f a -> Bool Source #

(>=) :: Lift f a -> Lift f a -> Bool Source #

max :: Lift f a -> Lift f a -> Lift f a Source #

min :: Lift f a -> Lift f a -> Lift f a Source #

(Ord1 m, Ord a) => Ord (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

compare :: MaybeT m a -> MaybeT m a -> Ordering Source #

(<) :: MaybeT m a -> MaybeT m a -> Bool Source #

(<=) :: MaybeT m a -> MaybeT m a -> Bool Source #

(>) :: MaybeT m a -> MaybeT m a -> Bool Source #

(>=) :: MaybeT m a -> MaybeT m a -> Bool Source #

max :: MaybeT m a -> MaybeT m a -> MaybeT m a Source #

min :: MaybeT m a -> MaybeT m a -> MaybeT m a Source #

(Ord k, Ord v) => Ord (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

compare :: HashMap k v -> HashMap k v -> Ordering Source #

(<) :: HashMap k v -> HashMap k v -> Bool Source #

(<=) :: HashMap k v -> HashMap k v -> Bool Source #

(>) :: HashMap k v -> HashMap k v -> Bool Source #

(>=) :: HashMap k v -> HashMap k v -> Bool Source #

max :: HashMap k v -> HashMap k v -> HashMap k v Source #

min :: HashMap k v -> HashMap k v -> HashMap k v Source #

(Ord a, Ord b) => Ord (a, b) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b) -> (a, b) -> Ordering Source #

(<) :: (a, b) -> (a, b) -> Bool Source #

(<=) :: (a, b) -> (a, b) -> Bool Source #

(>) :: (a, b) -> (a, b) -> Bool Source #

(>=) :: (a, b) -> (a, b) -> Bool Source #

max :: (a, b) -> (a, b) -> (a, b) Source #

min :: (a, b) -> (a, b) -> (a, b) Source #

Ord a => Ord (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

compare :: Const a b -> Const a b -> Ordering Source #

(<) :: Const a b -> Const a b -> Bool Source #

(<=) :: Const a b -> Const a b -> Bool Source #

(>) :: Const a b -> Const a b -> Bool Source #

(>=) :: Const a b -> Const a b -> Bool Source #

max :: Const a b -> Const a b -> Const a b Source #

min :: Const a b -> Const a b -> Const a b Source #

Ord (f a) => Ord (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

compare :: Ap f a -> Ap f a -> Ordering Source #

(<) :: Ap f a -> Ap f a -> Bool Source #

(<=) :: Ap f a -> Ap f a -> Bool Source #

(>) :: Ap f a -> Ap f a -> Bool Source #

(>=) :: Ap f a -> Ap f a -> Bool Source #

max :: Ap f a -> Ap f a -> Ap f a Source #

min :: Ap f a -> Ap f a -> Ap f a Source #

Ord (f a) => Ord (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Alt f a -> Alt f a -> Ordering Source #

(<) :: Alt f a -> Alt f a -> Bool Source #

(<=) :: Alt f a -> Alt f a -> Bool Source #

(>) :: Alt f a -> Alt f a -> Bool Source #

(>=) :: Alt f a -> Alt f a -> Bool Source #

max :: Alt f a -> Alt f a -> Alt f a Source #

min :: Alt f a -> Alt f a -> Alt f a Source #

(Generic1 f, Ord (Rep1 f a)) => Ord (Generically1 f a)

Since: base-4.18.0.0

Instance details

Defined in GHC.Generics

Ord (f p) => Ord (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: Rec1 f p -> Rec1 f p -> Ordering Source #

(<) :: Rec1 f p -> Rec1 f p -> Bool Source #

(<=) :: Rec1 f p -> Rec1 f p -> Bool Source #

(>) :: Rec1 f p -> Rec1 f p -> Bool Source #

(>=) :: Rec1 f p -> Rec1 f p -> Bool Source #

max :: Rec1 f p -> Rec1 f p -> Rec1 f p Source #

min :: Rec1 f p -> Rec1 f p -> Rec1 f p Source #

Ord (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering Source #

(<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #

(<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #

(>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #

(>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool Source #

max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p Source #

min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p Source #

Ord (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Char p -> URec Char p -> Ordering Source #

(<) :: URec Char p -> URec Char p -> Bool Source #

(<=) :: URec Char p -> URec Char p -> Bool Source #

(>) :: URec Char p -> URec Char p -> Bool Source #

(>=) :: URec Char p -> URec Char p -> Bool Source #

max :: URec Char p -> URec Char p -> URec Char p Source #

min :: URec Char p -> URec Char p -> URec Char p Source #

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

Methods

compare :: URec Int p -> URec Int p -> Ordering Source #

(<) :: URec Int p -> URec Int p -> Bool Source #

(<=) :: URec Int p -> URec Int p -> Bool Source #

(>) :: URec Int p -> URec Int p -> Bool Source #

(>=) :: URec Int p -> URec Int p -> Bool Source #

max :: URec Int p -> URec Int p -> URec Int p Source #

min :: URec Int p -> URec Int p -> URec Int p Source #

Ord (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Word p -> URec Word p -> Ordering Source #

(<) :: URec Word p -> URec Word p -> Bool Source #

(<=) :: URec Word p -> URec Word p -> Bool Source #

(>) :: URec Word p -> URec Word p -> Bool Source #

(>=) :: URec Word p -> URec Word p -> Bool Source #

max :: URec Word p -> URec Word p -> URec Word p Source #

min :: URec Word p -> URec Word p -> URec Word p Source #

Ord (p a a) => Ord (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

compare :: Join p a -> Join p a -> Ordering Source #

(<) :: Join p a -> Join p a -> Bool Source #

(<=) :: Join p a -> Join p a -> Bool Source #

(>) :: Join p a -> Join p a -> Bool Source #

(>=) :: Join p a -> Join p a -> Bool Source #

max :: Join p a -> Join p a -> Join p a Source #

min :: Join p a -> Join p a -> Join p a Source #

(Ord a, Ord (f b)) => Ord (CofreeF f a b) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

compare :: CofreeF f a b -> CofreeF f a b -> Ordering Source #

(<) :: CofreeF f a b -> CofreeF f a b -> Bool Source #

(<=) :: CofreeF f a b -> CofreeF f a b -> Bool Source #

(>) :: CofreeF f a b -> CofreeF f a b -> Bool Source #

(>=) :: CofreeF f a b -> CofreeF f a b -> Bool Source #

max :: CofreeF f a b -> CofreeF f a b -> CofreeF f a b Source #

min :: CofreeF f a b -> CofreeF f a b -> CofreeF f a b Source #

Ord (w (CofreeF f a (CofreeT f w a))) => Ord (CofreeT f w a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

compare :: CofreeT f w a -> CofreeT f w a -> Ordering Source #

(<) :: CofreeT f w a -> CofreeT f w a -> Bool Source #

(<=) :: CofreeT f w a -> CofreeT f w a -> Bool Source #

(>) :: CofreeT f w a -> CofreeT f w a -> Bool Source #

(>=) :: CofreeT f w a -> CofreeT f w a -> Bool Source #

max :: CofreeT f w a -> CofreeT f w a -> CofreeT f w a Source #

min :: CofreeT f w a -> CofreeT f w a -> CofreeT f w a Source #

(Ord a, Ord (f b)) => Ord (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

compare :: FreeF f a b -> FreeF f a b -> Ordering Source #

(<) :: FreeF f a b -> FreeF f a b -> Bool Source #

(<=) :: FreeF f a b -> FreeF f a b -> Bool Source #

(>) :: FreeF f a b -> FreeF f a b -> Bool Source #

(>=) :: FreeF f a b -> FreeF f a b -> Bool Source #

max :: FreeF f a b -> FreeF f a b -> FreeF f a b Source #

min :: FreeF f a b -> FreeF f a b -> FreeF f a b Source #

(Ord1 f, Ord1 m, Ord a) => Ord (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

compare :: FreeT f m a -> FreeT f m a -> Ordering Source #

(<) :: FreeT f m a -> FreeT f m a -> Bool Source #

(<=) :: FreeT f m a -> FreeT f m a -> Bool Source #

(>) :: FreeT f m a -> FreeT f m a -> Bool Source #

(>=) :: FreeT f m a -> FreeT f m a -> Bool Source #

max :: FreeT f m a -> FreeT f m a -> FreeT f m a Source #

min :: FreeT f m a -> FreeT f m a -> FreeT f m a Source #

Ord b => Ord (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

compare :: Tagged s b -> Tagged s b -> Ordering Source #

(<) :: Tagged s b -> Tagged s b -> Bool Source #

(<=) :: Tagged s b -> Tagged s b -> Bool Source #

(>) :: Tagged s b -> Tagged s b -> Bool Source #

(>=) :: Tagged s b -> Tagged s b -> Bool Source #

max :: Tagged s b -> Tagged s b -> Tagged s b Source #

min :: Tagged s b -> Tagged s b -> Tagged s b Source #

(Ord (f a), Ord (g a), Ord a) => Ord (These1 f g a) 
Instance details

Defined in Data.Functor.These

Methods

compare :: These1 f g a -> These1 f g a -> Ordering Source #

(<) :: These1 f g a -> These1 f g a -> Bool Source #

(<=) :: These1 f g a -> These1 f g a -> Bool Source #

(>) :: These1 f g a -> These1 f g a -> Bool Source #

(>=) :: These1 f g a -> These1 f g a -> Bool Source #

max :: These1 f g a -> These1 f g a -> These1 f g a Source #

min :: These1 f g a -> These1 f g a -> These1 f g a Source #

(Ord1 f, Ord a) => Ord (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

Methods

compare :: Backwards f a -> Backwards f a -> Ordering Source #

(<) :: Backwards f a -> Backwards f a -> Bool Source #

(<=) :: Backwards f a -> Backwards f a -> Bool Source #

(>) :: Backwards f a -> Backwards f a -> Bool Source #

(>=) :: Backwards f a -> Backwards f a -> Bool Source #

max :: Backwards f a -> Backwards f a -> Backwards f a Source #

min :: Backwards f a -> Backwards f a -> Backwards f a Source #

(Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

compare :: ExceptT e m a -> ExceptT e m a -> Ordering Source #

(<) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(<=) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(>) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(>=) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

max :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

min :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

(Ord1 f, Ord a) => Ord (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

compare :: IdentityT f a -> IdentityT f a -> Ordering Source #

(<) :: IdentityT f a -> IdentityT f a -> Bool Source #

(<=) :: IdentityT f a -> IdentityT f a -> Bool Source #

(>) :: IdentityT f a -> IdentityT f a -> Bool Source #

(>=) :: IdentityT f a -> IdentityT f a -> Bool Source #

max :: IdentityT f a -> IdentityT f a -> IdentityT f a Source #

min :: IdentityT f a -> IdentityT f a -> IdentityT f a Source #

Ord a => Ord (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

compare :: Constant a b -> Constant a b -> Ordering Source #

(<) :: Constant a b -> Constant a b -> Bool Source #

(<=) :: Constant a b -> Constant a b -> Bool Source #

(>) :: Constant a b -> Constant a b -> Bool Source #

(>=) :: Constant a b -> Constant a b -> Bool Source #

max :: Constant a b -> Constant a b -> Constant a b Source #

min :: Constant a b -> Constant a b -> Constant a b Source #

(Ord1 f, Ord a) => Ord (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

Methods

compare :: Reverse f a -> Reverse f a -> Ordering Source #

(<) :: Reverse f a -> Reverse f a -> Bool Source #

(<=) :: Reverse f a -> Reverse f a -> Bool Source #

(>) :: Reverse f a -> Reverse f a -> Bool Source #

(>=) :: Reverse f a -> Reverse f a -> Bool Source #

max :: Reverse f a -> Reverse f a -> Reverse f a Source #

min :: Reverse f a -> Reverse f a -> Reverse f a Source #

(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 (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 c => Ord (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: K1 i c p -> K1 i c p -> Ordering Source #

(<) :: K1 i c p -> K1 i c p -> Bool Source #

(<=) :: K1 i c p -> K1 i c p -> Bool Source #

(>) :: K1 i c p -> K1 i c p -> Bool Source #

(>=) :: K1 i c p -> K1 i c p -> Bool Source #

max :: K1 i c p -> K1 i c p -> K1 i c p Source #

min :: K1 i c p -> K1 i c p -> K1 i c 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 #

Ord (f (g a)) => Ord (Compose f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

compare :: Compose f g a -> Compose f g a -> Ordering Source #

(<) :: Compose f g a -> Compose f g a -> Bool Source #

(<=) :: Compose f g a -> Compose f g a -> Bool Source #

(>) :: Compose f g a -> Compose f g a -> Bool Source #

(>=) :: Compose f g a -> Compose f g a -> Bool Source #

max :: Compose f g a -> Compose f g a -> Compose f g a Source #

min :: Compose f g a -> Compose f g a -> Compose f g a 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 (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 a) => Ord (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

compare :: Clown f a b -> Clown f a b -> Ordering Source #

(<) :: Clown f a b -> Clown f a b -> Bool Source #

(<=) :: Clown f a b -> Clown f a b -> Bool Source #

(>) :: Clown f a b -> Clown f a b -> Bool Source #

(>=) :: Clown f a b -> Clown f a b -> Bool Source #

max :: Clown f a b -> Clown f a b -> Clown f a b Source #

min :: Clown f a b -> Clown f a b -> Clown f a b Source #

Ord (p b a) => Ord (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

compare :: Flip p a b -> Flip p a b -> Ordering Source #

(<) :: Flip p a b -> Flip p a b -> Bool Source #

(<=) :: Flip p a b -> Flip p a b -> Bool Source #

(>) :: Flip p a b -> Flip p a b -> Bool Source #

(>=) :: Flip p a b -> Flip p a b -> Bool Source #

max :: Flip p a b -> Flip p a b -> Flip p a b Source #

min :: Flip p a b -> Flip p a b -> Flip p a b Source #

Ord (g b) => Ord (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

compare :: Joker g a b -> Joker g a b -> Ordering Source #

(<) :: Joker g a b -> Joker g a b -> Bool Source #

(<=) :: Joker g a b -> Joker g a b -> Bool Source #

(>) :: Joker g a b -> Joker g a b -> Bool Source #

(>=) :: Joker g a b -> Joker g a b -> Bool Source #

max :: Joker g a b -> Joker g a b -> Joker g a b Source #

min :: Joker g a b -> Joker g a b -> Joker g a b Source #

Ord (p a b) => Ord (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

compare :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Ordering Source #

(<) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool Source #

(<=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool Source #

(>) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool Source #

(>=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool Source #

max :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> WrappedBifunctor p a b Source #

min :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> WrappedBifunctor p a b 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 #

(Ord (f a b), Ord (g a b)) => Ord (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Methods

compare :: Product f g a b -> Product f g a b -> Ordering Source #

(<) :: Product f g a b -> Product f g a b -> Bool Source #

(<=) :: Product f g a b -> Product f g a b -> Bool Source #

(>) :: Product f g a b -> Product f g a b -> Bool Source #

(>=) :: Product f g a b -> Product f g a b -> Bool Source #

max :: Product f g a b -> Product f g a b -> Product f g a b Source #

min :: Product f g a b -> Product f g a b -> Product f g a b Source #

(Ord (p a b), Ord (q a b)) => Ord (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

compare :: Sum p q a b -> Sum p q a b -> Ordering Source #

(<) :: Sum p q a b -> Sum p q a b -> Bool Source #

(<=) :: Sum p q a b -> Sum p q a b -> Bool Source #

(>) :: Sum p q a b -> Sum p q a b -> Bool Source #

(>=) :: Sum p q a b -> Sum p q a b -> Bool Source #

max :: Sum p q a b -> Sum p q a b -> Sum p q a b Source #

min :: Sum p q a b -> Sum p q a b -> Sum p q a b Source #

(Ord 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 (f (p a b)) => Ord (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

compare :: Tannen f p a b -> Tannen f p a b -> Ordering Source #

(<) :: Tannen f p a b -> Tannen f p a b -> Bool Source #

(<=) :: Tannen f p a b -> Tannen f p a b -> Bool Source #

(>) :: Tannen f p a b -> Tannen f p a b -> Bool Source #

(>=) :: Tannen f p a b -> Tannen f p a b -> Bool Source #

max :: Tannen f p a b -> Tannen f p a b -> Tannen f p a b Source #

min :: Tannen f p a b -> Tannen f p a b -> Tannen f p a b 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 (p (f a) (g b)) => Ord (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

compare :: Biff p f g a b -> Biff p f g a b -> Ordering Source #

(<) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

(<=) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

(>) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

(>=) :: Biff p f g a b -> Biff p f g a b -> Bool Source #

max :: Biff p f g a b -> Biff p f g a b -> Biff p f g a b Source #

min :: Biff p f g a b -> Biff p f g a b -> Biff p f g a b Source #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (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 (Num a, Ord a) => Real a where Source #

Real numbers.

The Haskell report defines no laws for Real, however Real instances are customarily expected to adhere to the following law:

Coherence with fromRational
if the type also implements Fractional, then fromRational is a left inverse for toRational, i.e. fromRational (toRational i) = i

Methods

toRational :: a -> Rational Source #

the rational equivalent of its real argument with full precision

Instances

Instances details
Real CBool 
Instance details

Defined in Foreign.C.Types

Real CChar 
Instance details

Defined in Foreign.C.Types

Real CClock 
Instance details

Defined in Foreign.C.Types

Real CDouble 
Instance details

Defined in Foreign.C.Types

Real CFloat 
Instance details

Defined in Foreign.C.Types

Real CInt 
Instance details

Defined in Foreign.C.Types

Real CIntMax 
Instance details

Defined in Foreign.C.Types

Real CIntPtr 
Instance details

Defined in Foreign.C.Types

Real CLLong 
Instance details

Defined in Foreign.C.Types

Real CLong 
Instance details

Defined in Foreign.C.Types

Real CPtrdiff 
Instance details

Defined in Foreign.C.Types

Real CSChar 
Instance details

Defined in Foreign.C.Types

Real CSUSeconds 
Instance details

Defined in Foreign.C.Types

Real CShort 
Instance details

Defined in Foreign.C.Types

Real CSigAtomic 
Instance details

Defined in Foreign.C.Types

Real CSize 
Instance details

Defined in Foreign.C.Types

Real CTime 
Instance details

Defined in Foreign.C.Types

Real CUChar 
Instance details

Defined in Foreign.C.Types

Real CUInt 
Instance details

Defined in Foreign.C.Types

Real CUIntMax 
Instance details

Defined in Foreign.C.Types

Real CUIntPtr 
Instance details

Defined in Foreign.C.Types

Real CULLong 
Instance details

Defined in Foreign.C.Types

Real CULong 
Instance details

Defined in Foreign.C.Types

Real CUSeconds 
Instance details

Defined in Foreign.C.Types

Real CUShort 
Instance details

Defined in Foreign.C.Types

Real CWchar 
Instance details

Defined in Foreign.C.Types

Real 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 Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Real Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Real Half 
Instance details

Defined in Numeric.Half.Internal

Methods

toRational :: Half -> Rational Source #

Real Scientific 
Instance details

Defined in Data.Scientific

Methods

toRational :: Scientific -> Rational Source #

Real DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Real NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Word

Since: base-2.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

Integral a => Real (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real a => Real (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

toRational :: Const a b -> Rational Source #

Real a => Real (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

toRational :: Tagged s a -> Rational Source #

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.

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 CDouble 
Instance details

Defined in Foreign.C.Types

RealFloat CFloat 
Instance details

Defined in Foreign.C.Types

RealFloat Half 
Instance details

Defined in Numeric.Half.Internal

Methods

floatRadix :: Half -> Integer Source #

floatDigits :: Half -> Int Source #

floatRange :: Half -> (Int, Int) Source #

decodeFloat :: Half -> (Integer, Int) Source #

encodeFloat :: Integer -> Int -> Half Source #

exponent :: Half -> Int Source #

significand :: Half -> Half Source #

scaleFloat :: Int -> Half -> Half Source #

isNaN :: Half -> Bool Source #

isInfinite :: Half -> Bool Source #

isDenormalized :: Half -> Bool Source #

isNegativeZero :: Half -> Bool Source #

isIEEE :: Half -> Bool Source #

atan2 :: Half -> Half -> Half Source #

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

Methods

floatRadix :: Tagged s a -> Integer Source #

floatDigits :: Tagged s a -> Int Source #

floatRange :: Tagged s a -> (Int, Int) Source #

decodeFloat :: Tagged s a -> (Integer, Int) Source #

encodeFloat :: Integer -> Int -> Tagged s a Source #

exponent :: Tagged s a -> Int Source #

significand :: Tagged s a -> Tagged s a Source #

scaleFloat :: Int -> Tagged s a -> Tagged s a Source #

isNaN :: Tagged s a -> Bool Source #

isInfinite :: Tagged s a -> Bool Source #

isDenormalized :: Tagged s a -> Bool Source #

isNegativeZero :: Tagged s a -> Bool Source #

isIEEE :: Tagged s a -> Bool Source #

atan2 :: Tagged s a -> Tagged s a -> Tagged s a Source #

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 CDouble 
Instance details

Defined in Foreign.C.Types

RealFrac CFloat 
Instance details

Defined in Foreign.C.Types

RealFrac Half 
Instance details

Defined in Numeric.Half.Internal

Methods

properFraction :: Integral b => Half -> (b, Half) Source #

truncate :: Integral b => Half -> b Source #

round :: Integral b => Half -> b Source #

ceiling :: Integral b => Half -> b Source #

floor :: Integral b => Half -> b Source #

RealFrac Scientific 
Instance details

Defined in Data.Scientific

Methods

properFraction :: Integral b => Scientific -> (b, Scientific) Source #

truncate :: Integral b => Scientific -> b Source #

round :: Integral b => Scientific -> b Source #

ceiling :: Integral b => Scientific -> b Source #

floor :: Integral b => Scientific -> b Source #

RealFrac DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

RealFrac NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

RealFrac a => RealFrac (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

properFraction :: Integral b => Identity a -> (b, Identity a) Source #

truncate :: Integral b => Identity a -> b Source #

round :: Integral b => Identity a -> b Source #

ceiling :: Integral b => Identity a -> b Source #

floor :: Integral b => Identity a -> b Source #

RealFrac a => RealFrac (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

properFraction :: Integral b => Down a -> (b, Down a) Source #

truncate :: Integral b => Down a -> b Source #

round :: Integral b => Down a -> b Source #

ceiling :: Integral b => Down a -> b Source #

floor :: Integral b => Down a -> b Source #

Integral a => RealFrac (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

properFraction :: Integral b => Ratio a -> (b, Ratio a) Source #

truncate :: Integral b => Ratio a -> b Source #

round :: Integral b => Ratio a -> b Source #

ceiling :: Integral b => Ratio a -> b Source #

floor :: Integral b => Ratio a -> b Source #

RealFrac a => RealFrac (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

properFraction :: Integral b0 => Const a b -> (b0, Const a b) Source #

truncate :: Integral b0 => Const a b -> b0 Source #

round :: Integral b0 => Const a b -> b0 Source #

ceiling :: Integral b0 => Const a b -> b0 Source #

floor :: Integral b0 => Const a b -> b0 Source #

RealFrac a => RealFrac (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

properFraction :: Integral b => Tagged s a -> (b, Tagged s a) Source #

truncate :: Integral b => Tagged s a -> b Source #

round :: Integral b => Tagged s a -> b Source #

ceiling :: Integral b => Tagged s a -> b Source #

floor :: Integral b => Tagged s a -> b Source #

class Typeable (a :: k) Source #

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#

class Monad m => MonadFail (m :: Type -> Type) 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

fail s should be an action that runs in the monad itself, not an exception (except in instances of MonadIO). In particular, fail should not be implemented in terms of error.

Since: base-4.9.0.0

Methods

fail :: String -> m a Source #

Instances

Instances details
MonadFail IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fail :: String -> IResult a Source #

MonadFail Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fail :: String -> Parser a Source #

MonadFail Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fail :: String -> Result a Source #

MonadFail P

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> P a Source #

MonadFail ReadP

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> ReadP a Source #

MonadFail DList 
Instance details

Defined in Data.DList.Internal

Methods

fail :: String -> DList a Source #

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> IO a Source #

MonadFail Array 
Instance details

Defined in Data.Primitive.Array

Methods

fail :: String -> Array a Source #

MonadFail SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fail :: String -> SmallArray a Source #

MonadFail Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fail :: String -> Q a Source #

MonadFail Vector 
Instance details

Defined in Data.Vector

Methods

fail :: String -> Vector a Source #

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> Maybe a Source #

MonadFail List

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> [a] Source #

Monad m => MonadFail (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fail :: String -> MaybeT m a Source #

MonadFail f => MonadFail (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fail :: String -> Ap f a Source #

(Functor f, MonadFail m) => MonadFail (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fail :: String -> FreeT f m a Source #

MonadFail m => MonadFail (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fail :: String -> ExceptT e m a Source #

MonadFail m => MonadFail (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fail :: String -> IdentityT m a Source #

MonadFail m => MonadFail (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fail :: String -> ReaderT r m a Source #

MonadFail m => MonadFail (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

fail :: String -> StateT s m a Source #

MonadFail m => MonadFail (Reverse m) 
Instance details

Defined in Data.Functor.Reverse

Methods

fail :: String -> Reverse m a Source #

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.

Example

Expand

Used in combination with (<$>), (<*>) can be used to build a record.

>>> data MyState = MyState {arg1 :: Foo, arg2 :: Bar, arg3 :: Baz}
>>> produceFoo :: Applicative f => f Foo
>>> produceBar :: Applicative f => f Bar
>>> produceBaz :: Applicative f => f Baz
>>> mkState :: Applicative f => f MyState
>>> mkState = MyState <$> produceFoo <*> produceBar <*> produceBaz

liftA2 :: (a -> b -> c) -> f a -> f b -> f c Source #

Lift a binary function to actions.

Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>.

This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap.

Example

Expand
>>> liftA2 (,) (Just 3) (Just 5)
Just (3,5)

(*>) :: f a -> f b -> f b infixl 4 Source #

Sequence actions, discarding the value of the first argument.

Examples

Expand

If used in conjunction with the Applicative instance for Maybe, you can chain Maybe computations, with a possible "early return" in case of Nothing.

>>> Just 2 *> Just 3
Just 3
>>> Nothing *> Just 3
Nothing

Of course a more interesting use case would be to have effectful computations instead of just returning pure values.

>>> import Data.Char
>>> import Text.ParserCombinators.ReadP
>>> let p = string "my name is " *> munch1 isAlpha <* eof
>>> readP_to_S p "my name is Simon"
[("Simon","")]

(<*) :: f a -> f b -> f a infixl 4 Source #

Sequence actions, discarding the value of the second argument.

Instances

Instances details
Applicative Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

pure :: a -> Gen a Source #

(<*>) :: Gen (a -> b) -> Gen a -> Gen b Source #

liftA2 :: (a -> b -> c) -> Gen a -> Gen b -> Gen c Source #

(*>) :: Gen a -> Gen b -> Gen b Source #

(<*) :: Gen a -> Gen b -> Gen a Source #

Applicative IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

pure :: a -> IResult a Source #

(<*>) :: IResult (a -> b) -> IResult a -> IResult b Source #

liftA2 :: (a -> b -> c) -> IResult a -> IResult b -> IResult c Source #

(*>) :: IResult a -> IResult b -> IResult b Source #

(<*) :: IResult a -> IResult b -> IResult a Source #

Applicative Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

pure :: a -> Parser a Source #

(<*>) :: Parser (a -> b) -> Parser a -> Parser b Source #

liftA2 :: (a -> b -> c) -> Parser a -> Parser b -> Parser c Source #

(*>) :: Parser a -> Parser b -> Parser b Source #

(<*) :: Parser a -> Parser b -> Parser a Source #

Applicative Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

pure :: a -> Result a Source #

(<*>) :: Result (a -> b) -> Result a -> Result b Source #

liftA2 :: (a -> b -> c) -> Result a -> Result b -> Result c Source #

(*>) :: Result a -> Result b -> Result b Source #

(<*) :: Result a -> Result b -> Result a Source #

Applicative ZipList
f <$> ZipList xs1 <*> ... <*> ZipList xsN
    = ZipList (zipWithN f xs1 ... xsN)

where zipWithN refers to the zipWith function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example:

(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
    = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
    = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> ZipList a Source #

(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b Source #

liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c Source #

(*>) :: ZipList a -> ZipList b -> ZipList b Source #

(<*) :: ZipList a -> ZipList b -> ZipList a Source #

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

pure :: a -> Identity a Source #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b Source #

liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c Source #

(*>) :: Identity a -> Identity b -> Identity b Source #

(<*) :: Identity a -> Identity b -> Identity a Source #

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> First a Source #

(<*>) :: First (a -> b) -> First a -> First b Source #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c Source #

(*>) :: First a -> First b -> First b Source #

(<*) :: First a -> First b -> First a Source #

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Last a Source #

(<*>) :: Last (a -> b) -> Last a -> Last b Source #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c Source #

(*>) :: Last a -> Last b -> Last b Source #

(<*) :: Last a -> Last b -> Last a Source #

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

pure :: a -> Down a Source #

(<*>) :: Down (a -> b) -> Down a -> Down b Source #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c Source #

(*>) :: Down a -> Down b -> Down b Source #

(<*) :: Down a -> Down b -> Down a Source #

Applicative First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> First a Source #

(<*>) :: First (a -> b) -> First a -> First b Source #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c Source #

(*>) :: First a -> First b -> First b Source #

(<*) :: First a -> First b -> First a Source #

Applicative Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Last a Source #

(<*>) :: Last (a -> b) -> Last a -> Last b Source #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c Source #

(*>) :: Last a -> Last b -> Last b Source #

(<*) :: Last a -> Last b -> Last a Source #

Applicative Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Max a Source #

(<*>) :: Max (a -> b) -> Max a -> Max b Source #

liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c Source #

(*>) :: Max a -> Max b -> Max b Source #

(<*) :: Max a -> Max b -> Max a Source #

Applicative Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Min a Source #

(<*>) :: Min (a -> b) -> Min a -> Min b Source #

liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c Source #

(*>) :: Min a -> Min b -> Min b Source #

(<*) :: Min a -> Min b -> Min a Source #

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Dual a Source #

(<*>) :: Dual (a -> b) -> Dual a -> Dual b Source #

liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c Source #

(*>) :: Dual a -> Dual b -> Dual b Source #

(<*) :: Dual a -> Dual b -> Dual a Source #

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Product a Source #

(<*>) :: Product (a -> b) -> Product a -> Product b Source #

liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c Source #

(*>) :: Product a -> Product b -> Product b Source #

(<*) :: Product a -> Product b -> Product a Source #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Sum a Source #

(<*>) :: Sum (a -> b) -> Sum a -> Sum b Source #

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c Source #

(*>) :: Sum a -> Sum b -> Sum b Source #

(<*) :: Sum a -> Sum b -> Sum a Source #

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a -> NonEmpty a Source #

(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b Source #

liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source #

(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source #

(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a Source #

Applicative Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Par1 a Source #

(<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b Source #

liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c Source #

(*>) :: Par1 a -> Par1 b -> Par1 b Source #

(<*) :: Par1 a -> Par1 b -> Par1 a Source #

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 ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> ReadP a Source #

(<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b Source #

liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c Source #

(*>) :: ReadP a -> ReadP b -> ReadP b Source #

(<*) :: ReadP a -> ReadP b -> ReadP a Source #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a Source #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b Source #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c Source #

(*>) :: Seq a -> Seq b -> Seq b Source #

(<*) :: Seq a -> Seq b -> Seq a Source #

Applicative Tree 
Instance details

Defined in Data.Tree

Methods

pure :: a -> Tree a Source #

(<*>) :: Tree (a -> b) -> Tree a -> Tree b Source #

liftA2 :: (a -> b -> c) -> Tree a -> Tree b -> Tree c Source #

(*>) :: Tree a -> Tree b -> Tree b Source #

(<*) :: Tree a -> Tree b -> Tree a Source #

Applicative DNonEmpty 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

pure :: a -> DNonEmpty a Source #

(<*>) :: DNonEmpty (a -> b) -> DNonEmpty a -> DNonEmpty b Source #

liftA2 :: (a -> b -> c) -> DNonEmpty a -> DNonEmpty b -> DNonEmpty c Source #

(*>) :: DNonEmpty a -> DNonEmpty b -> DNonEmpty b Source #

(<*) :: DNonEmpty a -> DNonEmpty b -> DNonEmpty a Source #

Applicative DList 
Instance details

Defined in Data.DList.Internal

Methods

pure :: a -> DList a Source #

(<*>) :: DList (a -> b) -> DList a -> DList b Source #

liftA2 :: (a -> b -> c) -> DList a -> DList b -> DList c Source #

(*>) :: DList a -> DList b -> DList b Source #

(<*) :: DList a -> DList b -> DList a Source #

Applicative Weighted 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

pure :: a -> Weighted a Source #

(<*>) :: Weighted (a -> b) -> Weighted a -> Weighted b Source #

liftA2 :: (a -> b -> c) -> Weighted a -> Weighted b -> Weighted c Source #

(*>) :: Weighted a -> Weighted b -> Weighted b Source #

(<*) :: Weighted a -> Weighted b -> Weighted a Source #

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> IO a Source #

(<*>) :: IO (a -> b) -> IO a -> IO b Source #

liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c Source #

(*>) :: IO a -> IO b -> IO b Source #

(<*) :: IO a -> IO b -> IO a Source #

Applicative Array 
Instance details

Defined in Data.Primitive.Array

Methods

pure :: a -> Array a Source #

(<*>) :: Array (a -> b) -> Array a -> Array b Source #

liftA2 :: (a -> b -> c) -> Array a -> Array b -> Array c Source #

(*>) :: Array a -> Array b -> Array b Source #

(<*) :: Array a -> Array b -> Array a Source #

Applicative SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

pure :: a -> SmallArray a Source #

(<*>) :: SmallArray (a -> b) -> SmallArray a -> SmallArray b Source #

liftA2 :: (a -> b -> c) -> SmallArray a -> SmallArray b -> SmallArray c Source #

(*>) :: SmallArray a -> SmallArray b -> SmallArray b Source #

(<*) :: SmallArray a -> SmallArray b -> SmallArray a Source #

Applicative Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

pure :: a -> Q a Source #

(<*>) :: Q (a -> b) -> Q a -> Q b Source #

liftA2 :: (a -> b -> c) -> Q a -> Q b -> Q c Source #

(*>) :: Q a -> Q b -> Q b Source #

(<*) :: Q a -> Q b -> Q a Source #

Applicative Vector 
Instance details

Defined in Data.Vector

Methods

pure :: a -> Vector a Source #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b Source #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c Source #

(*>) :: Vector a -> Vector b -> Vector b Source #

(<*) :: Vector a -> Vector b -> Vector a Source #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> Maybe a Source #

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b Source #

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c Source #

(*>) :: Maybe a -> Maybe b -> Maybe b Source #

(<*) :: Maybe a -> Maybe b -> Maybe a Source #

Applicative Solo

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

pure :: a -> Solo a Source #

(<*>) :: Solo (a -> b) -> Solo a -> Solo b Source #

liftA2 :: (a -> b -> c) -> Solo a -> Solo b -> Solo c Source #

(*>) :: Solo a -> Solo b -> Solo b Source #

(<*) :: Solo a -> Solo b -> Solo a Source #

Applicative List

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 #

Monad m => Applicative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a Source #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c Source #

(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source #

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a Source #

Arrow a => Applicative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> ArrowMonad a a0 Source #

(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b Source #

liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c Source #

(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b Source #

(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 Source #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure :: a -> Either e a Source #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b Source #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c Source #

(*>) :: Either e a -> Either e b -> Either e b Source #

(<*) :: Either e a -> Either e b -> Either e a Source #

Applicative (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

pure :: a -> Proxy a Source #

(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b Source #

liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c Source #

(*>) :: Proxy a -> Proxy b -> Proxy b Source #

(<*) :: Proxy a -> Proxy b -> Proxy a Source #

Applicative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> U1 a Source #

(<*>) :: U1 (a -> b) -> U1 a -> U1 b Source #

liftA2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c Source #

(*>) :: U1 a -> U1 b -> U1 b Source #

(<*) :: U1 a -> U1 b -> U1 a Source #

Alternative f => Applicative (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

pure :: a -> Cofree f a Source #

(<*>) :: Cofree f (a -> b) -> Cofree f a -> Cofree f b Source #

liftA2 :: (a -> b -> c) -> Cofree f a -> Cofree f b -> Cofree f c Source #

(*>) :: Cofree f a -> Cofree f b -> Cofree f b Source #

(<*) :: Cofree f a -> Cofree f b -> Cofree f a Source #

Functor f => Applicative (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

pure :: a -> Free f a Source #

(<*>) :: Free f (a -> b) -> Free f a -> Free f b Source #

liftA2 :: (a -> b -> c) -> Free f a -> Free f b -> Free f c Source #

(*>) :: Free f a -> Free f b -> Free f b Source #

(<*) :: Free f a -> Free f b -> Free f a Source #

MonadAsync m => Applicative (Concurrently m) 
Instance details

Defined in Control.Monad.Class.MonadAsync

Methods

pure :: a -> Concurrently m a Source #

(<*>) :: Concurrently m (a -> b) -> Concurrently m a -> Concurrently m b Source #

liftA2 :: (a -> b -> c) -> Concurrently m a -> Concurrently m b -> Concurrently m c Source #

(*>) :: Concurrently m a -> Concurrently m b -> Concurrently m b Source #

(<*) :: Concurrently m a -> Concurrently m b -> Concurrently m a Source #

Semigroup a => Applicative (These a) 
Instance details

Defined in Data.Strict.These

Methods

pure :: a0 -> These a a0 Source #

(<*>) :: These a (a0 -> b) -> These a a0 -> These a b Source #

liftA2 :: (a0 -> b -> c) -> These a a0 -> These a b -> These a c Source #

(*>) :: These a a0 -> These a b -> These a b Source #

(<*) :: These a a0 -> These a b -> These a a0 Source #

Semigroup a => Applicative (These a) 
Instance details

Defined in Data.These

Methods

pure :: a0 -> These a a0 Source #

(<*>) :: These a (a0 -> b) -> These a a0 -> These a b Source #

liftA2 :: (a0 -> b -> c) -> These a a0 -> These a b -> These a c Source #

(*>) :: These a a0 -> These a b -> These a b Source #

(<*) :: These a a0 -> These a b -> These a a0 Source #

Applicative f => Applicative (Lift f)

A combination is Pure only if both parts are.

Instance details

Defined in Control.Applicative.Lift

Methods

pure :: a -> Lift f a Source #

(<*>) :: Lift f (a -> b) -> Lift f a -> Lift f b Source #

liftA2 :: (a -> b -> c) -> Lift f a -> Lift f b -> Lift f c Source #

(*>) :: Lift f a -> Lift f b -> Lift f b Source #

(<*) :: Lift f a -> Lift f b -> Lift f a Source #

(Functor m, Monad m) => Applicative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

pure :: a -> MaybeT m a Source #

(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b Source #

liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c Source #

(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b Source #

(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a Source #

Monoid a => Applicative ((,) a)

For tuples, the Monoid constraint on a determines how the first values merge. For example, Strings concatenate:

("hello ", (+15)) <*> ("world!", 2002)
("hello world!",2017)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, a0) 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 #

Arrow a => Applicative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 Source #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 Source #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c Source #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 Source #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 Source #

Applicative m => Applicative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> Kleisli m a a0 Source #

(<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b Source #

liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c Source #

(*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b Source #

(<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 Source #

Monoid m => Applicative (Const m :: Type -> Type)

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Methods

pure :: a -> Const m a Source #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b Source #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c Source #

(*>) :: Const m a -> Const m b -> Const m b Source #

(<*) :: Const m a -> Const m b -> Const m a Source #

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

Methods

pure :: a -> Alt f a Source #

(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b Source #

liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c Source #

(*>) :: Alt f a -> Alt f b -> Alt f b Source #

(<*) :: Alt f a -> Alt f b -> Alt f a Source #

(Generic1 f, Applicative (Rep1 f)) => Applicative (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Generically1 f a Source #

(<*>) :: Generically1 f (a -> b) -> Generically1 f a -> Generically1 f b Source #

liftA2 :: (a -> b -> c) -> Generically1 f a -> Generically1 f b -> Generically1 f c Source #

(*>) :: Generically1 f a -> Generically1 f b -> Generically1 f b Source #

(<*) :: Generically1 f a -> Generically1 f b -> Generically1 f a Source #

Applicative f => Applicative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Rec1 f a Source #

(<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b Source #

liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c Source #

(*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b Source #

(<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a Source #

Biapplicative p => Applicative (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

pure :: a -> Join p a Source #

(<*>) :: Join p (a -> b) -> Join p a -> Join p b Source #

liftA2 :: (a -> b -> c) -> Join p a -> Join p b -> Join p c Source #

(*>) :: Join p a -> Join p b -> Join p b Source #

(<*) :: Join p a -> Join p b -> Join p a Source #

(Applicative f, Monad f) => Applicative (WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)).

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMissing f x a Source #

(<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b Source #

liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c Source #

(*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b Source #

(<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a Source #

(Alternative f, Applicative w) => Applicative (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

pure :: a -> CofreeT f w a Source #

(<*>) :: CofreeT f w (a -> b) -> CofreeT f w a -> CofreeT f w b Source #

liftA2 :: (a -> b -> c) -> CofreeT f w a -> CofreeT f w b -> CofreeT f w c Source #

(*>) :: CofreeT f w a -> CofreeT f w b -> CofreeT f w b Source #

(<*) :: CofreeT f w a -> CofreeT f w b -> CofreeT f w a Source #

(Functor f, Monad m) => Applicative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

pure :: a -> FreeT f m a Source #

(<*>) :: FreeT f m (a -> b) -> FreeT f m a -> FreeT f m b Source #

liftA2 :: (a -> b -> c) -> FreeT f m a -> FreeT f m b -> FreeT f m c Source #

(*>) :: FreeT f m a -> FreeT f m b -> FreeT f m b Source #

(<*) :: FreeT f m a -> FreeT f m b -> FreeT f m a Source #

Applicative (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

pure :: a -> Tagged s a Source #

(<*>) :: Tagged s (a -> b) -> Tagged s a -> Tagged s b Source #

liftA2 :: (a -> b -> c) -> Tagged s a -> Tagged s b -> Tagged s c Source #

(*>) :: Tagged s a -> Tagged s b -> Tagged s b Source #

(<*) :: Tagged s a -> Tagged s b -> Tagged s a Source #

Applicative f => Applicative (Backwards f)

Apply f-actions in the reverse order.

Instance details

Defined in Control.Applicative.Backwards

Methods

pure :: a -> Backwards f a Source #

(<*>) :: Backwards f (a -> b) -> Backwards f a -> Backwards f b Source #

liftA2 :: (a -> b -> c) -> Backwards f a -> Backwards f b -> Backwards f c Source #

(*>) :: Backwards f a -> Backwards f b -> Backwards f b Source #

(<*) :: Backwards f a -> Backwards f b -> Backwards f a Source #

(Functor m, Monad m) => Applicative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

pure :: a -> ExceptT e m a Source #

(<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b Source #

liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c Source #

(*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b Source #

(<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a Source #

Applicative m => Applicative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

pure :: a -> IdentityT m a Source #

(<*>) :: IdentityT m (a -> b) -> IdentityT m a -> IdentityT m b Source #

liftA2 :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c Source #

(*>) :: IdentityT m a -> IdentityT m b -> IdentityT m b Source #

(<*) :: IdentityT m a -> IdentityT m b -> IdentityT m a Source #

Applicative m => Applicative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a Source #

(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b Source #

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c Source #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b Source #

(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a Source #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

pure :: a -> StateT s m a Source #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b Source #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c Source #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b Source #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a Source #

Monoid a => Applicative (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

pure :: a0 -> Constant a a0 Source #

(<*>) :: Constant a (a0 -> b) -> Constant a a0 -> Constant a b Source #

liftA2 :: (a0 -> b -> c) -> Constant a a0 -> Constant a b -> Constant a c Source #

(*>) :: Constant a a0 -> Constant a b -> Constant a b Source #

(<*) :: Constant a a0 -> Constant a b -> Constant a a0 Source #

Applicative f => Applicative (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

pure :: a -> Reverse f a Source #

(<*>) :: Reverse f (a -> b) -> Reverse f a -> Reverse f b Source #

liftA2 :: (a -> b -> c) -> Reverse f a -> Reverse f b -> Reverse f c Source #

(*>) :: Reverse f a -> Reverse f b -> Reverse f b Source #

(<*) :: Reverse f a -> Reverse f b -> Reverse f a Source #

(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 #

(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 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 #

(Monad f, Applicative f) => Applicative (WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMatched f x y a Source #

(<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b Source #

liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c Source #

(*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b Source #

(<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a Source #

(Applicative f, Monad f) => Applicative (WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMissing f k x a Source #

(<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b Source #

liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c Source #

(*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b Source #

(<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x 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 ((->) r)

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 #

(Applicative f, Applicative g) => Applicative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a Source #

(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b Source #

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c Source #

(*>) :: Compose f g a -> Compose f g b -> Compose f g b Source #

(<*) :: Compose f g a -> Compose f g b -> Compose f g a Source #

(Applicative f, Applicative g) => Applicative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :.: g) a Source #

(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b Source #

liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c Source #

(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b Source #

(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a Source #

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 #

(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 #

class Foldable (t :: Type -> Type) where Source #

The Foldable class represents data structures that can be reduced to a summary value one element at a time. Strict left-associative folds are a good fit for space-efficient reduction, while lazy right-associative folds are a good fit for corecursive iteration, or for folds that short-circuit after processing an initial subsequence of the structure's elements.

Instances can be derived automatically by enabling the DeriveFoldable extension. For example, a derived instance for a binary tree might be:

{-# LANGUAGE DeriveFoldable #-}
data Tree a = Empty
            | Leaf a
            | Node (Tree a) a (Tree a)
    deriving Foldable

A more detailed description can be found in the Overview section of Data.Foldable.

For the class laws see the Laws section of Data.Foldable.

Minimal complete definition

foldMap | foldr

Methods

fold :: Monoid m => t m -> m Source #

Given a structure with elements whose type is a Monoid, combine them via the monoid's (<>) operator. This fold is right-associative and lazy in the accumulator. When you need a strict left-associative fold, use foldMap' instead, with id as the map.

Examples

Expand

Basic usage:

>>> fold [[1, 2, 3], [4, 5], [6], []]
[1,2,3,4,5,6]
>>> fold $ Node (Leaf (Sum 1)) (Sum 3) (Leaf (Sum 5))
Sum {getSum = 9}

Folds of unbounded structures do not terminate when the monoid's (<>) operator is strict:

>>> fold (repeat Nothing)
* Hangs forever *

Lazy corecursive folds of unbounded structures are fine:

>>> take 12 $ fold $ map (\i -> [i..i+2]) [0..]
[0,1,2,1,2,3,2,3,4,3,4,5]
>>> sum $ take 4000000 $ fold $ map (\i -> [i..i+2]) [0..]
2666668666666

foldMap :: Monoid m => (a -> m) -> t a -> m Source #

Map each element of the structure into a monoid, and combine the results with (<>). This fold is right-associative and lazy in the accumulator. For strict left-associative folds consider foldMap' instead.

Examples

Expand

Basic usage:

>>> foldMap Sum [1, 3, 5]
Sum {getSum = 9}
>>> foldMap Product [1, 3, 5]
Product {getProduct = 15}
>>> foldMap (replicate 3) [1, 2, 3]
[1,1,1,2,2,2,3,3,3]

When a Monoid's (<>) is lazy in its second argument, foldMap can return a result even from an unbounded structure. For example, lazy accumulation enables Data.ByteString.Builder to efficiently serialise large data structures and produce the output incrementally:

>>> import qualified Data.ByteString.Lazy as L
>>> import qualified Data.ByteString.Builder as B
>>> let bld :: Int -> B.Builder; bld i = B.intDec i <> B.word8 0x20
>>> let lbs = B.toLazyByteString $ foldMap bld [0..]
>>> L.take 64 lbs
"0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24"

foldMap' :: Monoid m => (a -> m) -> t a -> m Source #

A left-associative variant of foldMap that is strict in the accumulator. Use this method for strict reduction when partial results are merged via (<>).

Examples

Expand

Define a Monoid over finite bit strings under xor. Use it to strictly compute the xor of a list of Int values.

>>> :set -XGeneralizedNewtypeDeriving
>>> import Data.Bits (Bits, FiniteBits, xor, zeroBits)
>>> import Data.Foldable (foldMap')
>>> import Numeric (showHex)
>>> 
>>> newtype X a = X a deriving (Eq, Bounded, Enum, Bits, FiniteBits)
>>> instance Bits a => Semigroup (X a) where X a <> X b = X (a `xor` b)
>>> instance Bits a => Monoid    (X a) where mempty     = X zeroBits
>>> 
>>> let bits :: [Int]; bits = [0xcafe, 0xfeed, 0xdeaf, 0xbeef, 0x5411]
>>> (\ (X a) -> showString "0x" . showHex a $ "") $ foldMap' X bits
"0x42"

Since: base-4.13.0.0

foldr :: (a -> b -> b) -> b -> t a -> b Source #

Right-associative fold of a structure, lazy in the accumulator.

In the case of lists, foldr, when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left:

foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)

Note that since the head of the resulting expression is produced by an application of the operator to the first element of the list, given an operator lazy in its right argument, foldr can produce a terminating expression from an unbounded list.

For a general Foldable structure this should be semantically identical to,

foldr f z = foldr f z . toList

Examples

Expand

Basic usage:

>>> foldr (||) False [False, True, False]
True
>>> foldr (||) False []
False
>>> foldr (\c acc -> acc ++ [c]) "foo" ['a', 'b', 'c', 'd']
"foodcba"
Infinite structures

⚠️ Applying foldr to infinite structures usually doesn't terminate.

It may still terminate under one of the following conditions:

  • the folding function is short-circuiting
  • the folding function is lazy on its second argument
Short-circuiting

(||) short-circuits on True values, so the following terminates because there is a True value finitely far from the left side:

>>> foldr (||) False (True : repeat False)
True

But the following doesn't terminate:

>>> foldr (||) False (repeat False ++ [True])
* Hangs forever *
Laziness in the second argument

Applying foldr to infinite structures terminates when the operator is lazy in its second argument (the initial accumulator is never used in this case, and so could be left undefined, but [] is more clear):

>>> take 5 $ foldr (\i acc -> i : fmap (+3) acc) [] (repeat 1)
[1,4,7,10,13]

foldl' :: (b -> a -> b) -> b -> t a -> b Source #

Left-associative fold of a structure but with strict application of the operator.

This ensures that each step of the fold is forced to Weak Head Normal Form before being applied, avoiding the collection of thunks that would otherwise occur. This is often what you want to strictly reduce a finite structure to a single strict result (e.g. sum).

For a general Foldable structure this should be semantically identical to,

foldl' f z = foldl' f z . toList

Since: base-4.6.0.0

toList :: t a -> [a] Source #

List of elements of a structure, from left to right. If the entire list is intended to be reduced via a fold, just fold the structure directly bypassing the list.

Examples

Expand

Basic usage:

>>> toList Nothing
[]
>>> toList (Just 42)
[42]
>>> toList (Left "foo")
[]
>>> toList (Node (Leaf 5) 17 (Node Empty 12 (Leaf 8)))
[5,17,12,8]

For lists, toList is the identity:

>>> toList [1, 2, 3]
[1,2,3]

Since: base-4.8.0.0

null :: t a -> Bool Source #

Test whether the structure is empty. The default implementation is Left-associative and lazy in both the initial element and the accumulator. Thus optimised for structures where the first element can be accessed in constant time. Structures where this is not the case should have a non-default implementation.

Examples

Expand

Basic usage:

>>> null []
True
>>> null [1]
False

null is expected to terminate even for infinite structures. The default implementation terminates provided the structure is bounded on the left (there is a leftmost element).

>>> null [1..]
False

Since: base-4.8.0.0

length :: t a -> Int Source #

Returns the size/length of a finite structure as an Int. The default implementation just counts elements starting with the leftmost. Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.

Examples

Expand

Basic usage:

>>> length []
0
>>> length ['a', 'b', 'c']
3
>>> length [1..]
* Hangs forever *

Since: base-4.8.0.0

Instances

Instances details
Foldable KeyMap 
Instance details

Defined in Data.Aeson.KeyMap

Methods

fold :: Monoid m => KeyMap m -> m Source #

foldMap :: Monoid m => (a -> m) -> KeyMap a -> m Source #

foldMap' :: Monoid m => (a -> m) -> KeyMap a -> m Source #

foldr :: (a -> b -> b) -> b -> KeyMap a -> b Source #

foldr' :: (a -> b -> b) -> b -> KeyMap a -> b Source #

foldl :: (b -> a -> b) -> b -> KeyMap a -> b Source #

foldl' :: (b -> a -> b) -> b -> KeyMap a -> b Source #

foldr1 :: (a -> a -> a) -> KeyMap a -> a Source #

foldl1 :: (a -> a -> a) -> KeyMap a -> a Source #

toList :: KeyMap a -> [a] Source #

null :: KeyMap a -> Bool Source #

length :: KeyMap a -> Int Source #

elem :: Eq a => a -> KeyMap a -> Bool Source #

maximum :: Ord a => KeyMap a -> a Source #

minimum :: Ord a => KeyMap a -> a Source #

sum :: Num a => KeyMap a -> a Source #

product :: Num a => KeyMap a -> a Source #

Foldable IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fold :: Monoid m => IResult m -> m Source #

foldMap :: Monoid m => (a -> m) -> IResult a -> m Source #

foldMap' :: Monoid m => (a -> m) -> IResult a -> m Source #

foldr :: (a -> b -> b) -> b -> IResult a -> b Source #

foldr' :: (a -> b -> b) -> b -> IResult a -> b Source #

foldl :: (b -> a -> b) -> b -> IResult a -> b Source #

foldl' :: (b -> a -> b) -> b -> IResult a -> b Source #

foldr1 :: (a -> a -> a) -> IResult a -> a Source #

foldl1 :: (a -> a -> a) -> IResult a -> a Source #

toList :: IResult a -> [a] Source #

null :: IResult a -> Bool Source #

length :: IResult a -> Int Source #

elem :: Eq a => a -> IResult a -> Bool Source #

maximum :: Ord a => IResult a -> a Source #

minimum :: Ord a => IResult a -> a Source #

sum :: Num a => IResult a -> a Source #

product :: Num a => IResult a -> a Source #

Foldable Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fold :: Monoid m => Result m -> m Source #

foldMap :: Monoid m => (a -> m) -> Result a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Result a -> m Source #

foldr :: (a -> b -> b) -> b -> Result a -> b Source #

foldr' :: (a -> b -> b) -> b -> Result a -> b Source #

foldl :: (b -> a -> b) -> b -> Result a -> b Source #

foldl' :: (b -> a -> b) -> b -> Result a -> b Source #

foldr1 :: (a -> a -> a) -> Result a -> a Source #

foldl1 :: (a -> a -> a) -> Result a -> a Source #

toList :: Result a -> [a] Source #

null :: Result a -> Bool Source #

length :: Result a -> Int Source #

elem :: Eq a => a -> Result a -> Bool Source #

maximum :: Ord a => Result a -> a Source #

minimum :: Ord a => Result a -> a Source #

sum :: Num a => Result a -> a Source #

product :: Num a => Result a -> a Source #

Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Methods

fold :: Monoid m => ZipList m -> m Source #

foldMap :: Monoid m => (a -> m) -> ZipList a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ZipList a -> m Source #

foldr :: (a -> b -> b) -> b -> ZipList a -> b Source #

foldr' :: (a -> b -> b) -> b -> ZipList a -> b Source #

foldl :: (b -> a -> b) -> b -> ZipList a -> b Source #

foldl' :: (b -> a -> b) -> b -> ZipList a -> b Source #

foldr1 :: (a -> a -> a) -> ZipList a -> a Source #

foldl1 :: (a -> a -> a) -> ZipList a -> a Source #

toList :: ZipList a -> [a] Source #

null :: ZipList a -> Bool Source #

length :: ZipList a -> Int Source #

elem :: Eq a => a -> ZipList a -> Bool Source #

maximum :: Ord a => ZipList a -> a Source #

minimum :: Ord a => ZipList a -> a Source #

sum :: Num a => ZipList a -> a Source #

product :: Num a => ZipList a -> a Source #

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fold :: Monoid m => Identity m -> m Source #

foldMap :: Monoid m => (a -> m) -> Identity a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Identity a -> m Source #

foldr :: (a -> b -> b) -> b -> Identity a -> b Source #

foldr' :: (a -> b -> b) -> b -> Identity a -> b Source #

foldl :: (b -> a -> b) -> b -> Identity a -> b Source #

foldl' :: (b -> a -> b) -> b -> Identity a -> b Source #

foldr1 :: (a -> a -> a) -> Identity a -> a Source #

foldl1 :: (a -> a -> a) -> Identity a -> a Source #

toList :: Identity a -> [a] Source #

null :: Identity a -> Bool Source #

length :: Identity a -> Int Source #

elem :: Eq a => a -> Identity a -> Bool Source #

maximum :: Ord a => Identity a -> a Source #

minimum :: Ord a => Identity a -> a Source #

sum :: Num a => Identity a -> a Source #

product :: Num a => Identity a -> a Source #

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => First m -> m Source #

foldMap :: Monoid m => (a -> m) -> First a -> m Source #

foldMap' :: Monoid m => (a -> m) -> First a -> m Source #

foldr :: (a -> b -> b) -> b -> First a -> b Source #

foldr' :: (a -> b -> b) -> b -> First a -> b Source #

foldl :: (b -> a -> b) -> b -> First a -> b Source #

foldl' :: (b -> a -> b) -> b -> First a -> b Source #

foldr1 :: (a -> a -> a) -> First a -> a Source #

foldl1 :: (a -> a -> a) -> First a -> a Source #

toList :: First a -> [a] Source #

null :: First a -> Bool Source #

length :: First a -> Int Source #

elem :: Eq a => a -> First a -> Bool Source #

maximum :: Ord a => First a -> a Source #

minimum :: Ord a => First a -> a Source #

sum :: Num a => First a -> a Source #

product :: Num a => First a -> a Source #

Foldable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Last m -> m Source #

foldMap :: Monoid m => (a -> m) -> Last a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Last a -> m Source #

foldr :: (a -> b -> b) -> b -> Last a -> b Source #

foldr' :: (a -> b -> b) -> b -> Last a -> b Source #

foldl :: (b -> a -> b) -> b -> Last a -> b Source #

foldl' :: (b -> a -> b) -> b -> Last a -> b Source #

foldr1 :: (a -> a -> a) -> Last a -> a Source #

foldl1 :: (a -> a -> a) -> Last a -> a Source #

toList :: Last a -> [a] Source #

null :: Last a -> Bool Source #

length :: Last a -> Int Source #

elem :: Eq a => a -> Last a -> Bool Source #

maximum :: Ord a => Last a -> a Source #

minimum :: Ord a => Last a -> a Source #

sum :: Num a => Last a -> a Source #

product :: Num a => Last a -> a Source #

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Down m -> m Source #

foldMap :: Monoid m => (a -> m) -> Down a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Down a -> m Source #

foldr :: (a -> b -> b) -> b -> Down a -> b Source #

foldr' :: (a -> b -> b) -> b -> Down a -> b Source #

foldl :: (b -> a -> b) -> b -> Down a -> b Source #

foldl' :: (b -> a -> b) -> b -> Down a -> b Source #

foldr1 :: (a -> a -> a) -> Down a -> a Source #

foldl1 :: (a -> a -> a) -> Down a -> a Source #

toList :: Down a -> [a] Source #

null :: Down a -> Bool Source #

length :: Down a -> Int Source #

elem :: Eq a => a -> Down a -> Bool Source #

maximum :: Ord a => Down a -> a Source #

minimum :: Ord a => Down a -> a Source #

sum :: Num a => Down a -> a Source #

product :: Num a => Down a -> a Source #

Foldable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => First m -> m Source #

foldMap :: Monoid m => (a -> m) -> First a -> m Source #

foldMap' :: Monoid m => (a -> m) -> First a -> m Source #

foldr :: (a -> b -> b) -> b -> First a -> b Source #

foldr' :: (a -> b -> b) -> b -> First a -> b Source #

foldl :: (b -> a -> b) -> b -> First a -> b Source #

foldl' :: (b -> a -> b) -> b -> First a -> b Source #

foldr1 :: (a -> a -> a) -> First a -> a Source #

foldl1 :: (a -> a -> a) -> First a -> a Source #

toList :: First a -> [a] Source #

null :: First a -> Bool Source #

length :: First a -> Int Source #

elem :: Eq a => a -> First a -> Bool Source #

maximum :: Ord a => First a -> a Source #

minimum :: Ord a => First a -> a Source #

sum :: Num a => First a -> a Source #

product :: Num a => First a -> a Source #

Foldable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Last m -> m Source #

foldMap :: Monoid m => (a -> m) -> Last a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Last a -> m Source #

foldr :: (a -> b -> b) -> b -> Last a -> b Source #

foldr' :: (a -> b -> b) -> b -> Last a -> b Source #

foldl :: (b -> a -> b) -> b -> Last a -> b Source #

foldl' :: (b -> a -> b) -> b -> Last a -> b Source #

foldr1 :: (a -> a -> a) -> Last a -> a Source #

foldl1 :: (a -> a -> a) -> Last a -> a Source #

toList :: Last a -> [a] Source #

null :: Last a -> Bool Source #

length :: Last a -> Int Source #

elem :: Eq a => a -> Last a -> Bool Source #

maximum :: Ord a => Last a -> a Source #

minimum :: Ord a => Last a -> a Source #

sum :: Num a => Last a -> a Source #

product :: Num a => Last a -> a Source #

Foldable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Max m -> m Source #

foldMap :: Monoid m => (a -> m) -> Max a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Max a -> m Source #

foldr :: (a -> b -> b) -> b -> Max a -> b Source #

foldr' :: (a -> b -> b) -> b -> Max a -> b Source #

foldl :: (b -> a -> b) -> b -> Max a -> b Source #

foldl' :: (b -> a -> b) -> b -> Max a -> b Source #

foldr1 :: (a -> a -> a) -> Max a -> a Source #

foldl1 :: (a -> a -> a) -> Max a -> a Source #

toList :: Max a -> [a] Source #

null :: Max a -> Bool Source #

length :: Max a -> Int Source #

elem :: Eq a => a -> Max a -> Bool Source #

maximum :: Ord a => Max a -> a Source #

minimum :: Ord a => Max a -> a Source #

sum :: Num a => Max a -> a Source #

product :: Num a => Max a -> a Source #

Foldable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Min m -> m Source #

foldMap :: Monoid m => (a -> m) -> Min a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Min a -> m Source #

foldr :: (a -> b -> b) -> b -> Min a -> b Source #

foldr' :: (a -> b -> b) -> b -> Min a -> b Source #

foldl :: (b -> a -> b) -> b -> Min a -> b Source #

foldl' :: (b -> a -> b) -> b -> Min a -> b Source #

foldr1 :: (a -> a -> a) -> Min a -> a Source #

foldl1 :: (a -> a -> a) -> Min a -> a Source #

toList :: Min a -> [a] Source #

null :: Min a -> Bool Source #

length :: Min a -> Int Source #

elem :: Eq a => a -> Min a -> Bool Source #

maximum :: Ord a => Min a -> a Source #

minimum :: Ord a => Min a -> a Source #

sum :: Num a => Min a -> a Source #

product :: Num a => Min a -> a Source #

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Dual m -> m Source #

foldMap :: Monoid m => (a -> m) -> Dual a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Dual a -> m Source #

foldr :: (a -> b -> b) -> b -> Dual a -> b Source #

foldr' :: (a -> b -> b) -> b -> Dual a -> b Source #

foldl :: (b -> a -> b) -> b -> Dual a -> b Source #

foldl' :: (b -> a -> b) -> b -> Dual a -> b Source #

foldr1 :: (a -> a -> a) -> Dual a -> a Source #

foldl1 :: (a -> a -> a) -> Dual a -> a Source #

toList :: Dual a -> [a] Source #

null :: Dual a -> Bool Source #

length :: Dual a -> Int Source #

elem :: Eq a => a -> Dual a -> Bool Source #

maximum :: Ord a => Dual a -> a Source #

minimum :: Ord a => Dual a -> a Source #

sum :: Num a => Dual a -> a Source #

product :: Num a => Dual a -> a Source #

Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Product m -> m Source #

foldMap :: Monoid m => (a -> m) -> Product a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Product a -> m Source #

foldr :: (a -> b -> b) -> b -> Product a -> b Source #

foldr' :: (a -> b -> b) -> b -> Product a -> b Source #

foldl :: (b -> a -> b) -> b -> Product a -> b Source #

foldl' :: (b -> a -> b) -> b -> Product a -> b Source #

foldr1 :: (a -> a -> a) -> Product a -> a Source #

foldl1 :: (a -> a -> a) -> Product a -> a Source #

toList :: Product a -> [a] Source #

null :: Product a -> Bool Source #

length :: Product a -> Int Source #

elem :: Eq a => a -> Product a -> Bool Source #

maximum :: Ord a => Product a -> a Source #

minimum :: Ord a => Product a -> a Source #

sum :: Num a => Product a -> a Source #

product :: Num a => Product a -> a Source #

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Sum m -> m Source #

foldMap :: Monoid m => (a -> m) -> Sum a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Sum a -> m Source #

foldr :: (a -> b -> b) -> b -> Sum a -> b Source #

foldr' :: (a -> b -> b) -> b -> Sum a -> b Source #

foldl :: (b -> a -> b) -> b -> Sum a -> b Source #

foldl' :: (b -> a -> b) -> b -> Sum a -> b Source #

foldr1 :: (a -> a -> a) -> Sum a -> a Source #

foldl1 :: (a -> a -> a) -> Sum a -> a Source #

toList :: Sum a -> [a] Source #

null :: Sum a -> Bool Source #

length :: Sum a -> Int Source #

elem :: Eq a => a -> Sum a -> Bool Source #

maximum :: Ord a => Sum a -> a Source #

minimum :: Ord a => Sum a -> a Source #

sum :: Num a => Sum a -> a Source #

product :: Num a => Sum a -> a Source #

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => NonEmpty m -> m Source #

foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m Source #

foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m Source #

foldr :: (a -> b -> b) -> b -> NonEmpty a -> b Source #

foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b Source #

foldl :: (b -> a -> b) -> b -> NonEmpty a -> b Source #

foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b Source #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a Source #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a Source #

toList :: NonEmpty a -> [a] Source #

null :: NonEmpty a -> Bool Source #

length :: NonEmpty a -> Int Source #

elem :: Eq a => a -> NonEmpty a -> Bool Source #

maximum :: Ord a => NonEmpty a -> a Source #

minimum :: Ord a => NonEmpty a -> a Source #

sum :: Num a => NonEmpty a -> a Source #

product :: Num a => NonEmpty a -> a Source #

Foldable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Par1 m -> m Source #

foldMap :: Monoid m => (a -> m) -> Par1 a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Par1 a -> m Source #

foldr :: (a -> b -> b) -> b -> Par1 a -> b Source #

foldr' :: (a -> b -> b) -> b -> Par1 a -> b Source #

foldl :: (b -> a -> b) -> b -> Par1 a -> b Source #

foldl' :: (b -> a -> b) -> b -> Par1 a -> b Source #

foldr1 :: (a -> a -> a) -> Par1 a -> a Source #

foldl1 :: (a -> a -> a) -> Par1 a -> a Source #

toList :: Par1 a -> [a] Source #

null :: Par1 a -> Bool Source #

length :: Par1 a -> Int Source #

elem :: Eq a => a -> Par1 a -> Bool Source #

maximum :: Ord a => Par1 a -> a Source #

minimum :: Ord a => Par1 a -> a Source #

sum :: Num a => Par1 a -> a Source #

product :: Num a => Par1 a -> a Source #

Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

fold :: Monoid m => IntMap m -> m Source #

foldMap :: Monoid m => (a -> m) -> IntMap a -> m Source #

foldMap' :: Monoid m => (a -> m) -> IntMap a -> m Source #

foldr :: (a -> b -> b) -> b -> IntMap a -> b Source #

foldr' :: (a -> b -> b) -> b -> IntMap a -> b Source #

foldl :: (b -> a -> b) -> b -> IntMap a -> b Source #

foldl' :: (b -> a -> b) -> b -> IntMap a -> b Source #

foldr1 :: (a -> a -> a) -> IntMap a -> a Source #

foldl1 :: (a -> a -> a) -> IntMap a -> a Source #

toList :: IntMap a -> [a] Source #

null :: IntMap a -> Bool Source #

length :: IntMap a -> Int Source #

elem :: Eq a => a -> IntMap a -> Bool Source #

maximum :: Ord a => IntMap a -> a Source #

minimum :: Ord a => IntMap a -> a Source #

sum :: Num a => IntMap a -> a Source #

product :: Num a => IntMap a -> a Source #

Foldable Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Digit m -> m Source #

foldMap :: Monoid m => (a -> m) -> Digit a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Digit a -> m Source #

foldr :: (a -> b -> b) -> b -> Digit a -> b Source #

foldr' :: (a -> b -> b) -> b -> Digit a -> b Source #

foldl :: (b -> a -> b) -> b -> Digit a -> b Source #

foldl' :: (b -> a -> b) -> b -> Digit a -> b Source #

foldr1 :: (a -> a -> a) -> Digit a -> a Source #

foldl1 :: (a -> a -> a) -> Digit a -> a Source #

toList :: Digit a -> [a] Source #

null :: Digit a -> Bool Source #

length :: Digit a -> Int Source #

elem :: Eq a => a -> Digit a -> Bool Source #

maximum :: Ord a => Digit a -> a Source #

minimum :: Ord a => Digit a -> a Source #

sum :: Num a => Digit a -> a Source #

product :: Num a => Digit a -> a Source #

Foldable Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Elem m -> m Source #

foldMap :: Monoid m => (a -> m) -> Elem a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Elem a -> m Source #

foldr :: (a -> b -> b) -> b -> Elem a -> b Source #

foldr' :: (a -> b -> b) -> b -> Elem a -> b Source #

foldl :: (b -> a -> b) -> b -> Elem a -> b Source #

foldl' :: (b -> a -> b) -> b -> Elem a -> b Source #

foldr1 :: (a -> a -> a) -> Elem a -> a Source #

foldl1 :: (a -> a -> a) -> Elem a -> a Source #

toList :: Elem a -> [a] Source #

null :: Elem a -> Bool Source #

length :: Elem a -> Int Source #

elem :: Eq a => a -> Elem a -> Bool Source #

maximum :: Ord a => Elem a -> a Source #

minimum :: Ord a => Elem a -> a Source #

sum :: Num a => Elem a -> a Source #

product :: Num a => Elem a -> a Source #

Foldable FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => FingerTree m -> m Source #

foldMap :: Monoid m => (a -> m) -> FingerTree a -> m Source #

foldMap' :: Monoid m => (a -> m) -> FingerTree a -> m Source #

foldr :: (a -> b -> b) -> b -> FingerTree a -> b Source #

foldr' :: (a -> b -> b) -> b -> FingerTree a -> b Source #

foldl :: (b -> a -> b) -> b -> FingerTree a -> b Source #

foldl' :: (b -> a -> b) -> b -> FingerTree a -> b Source #

foldr1 :: (a -> a -> a) -> FingerTree a -> a Source #

foldl1 :: (a -> a -> a) -> FingerTree a -> a Source #

toList :: FingerTree a -> [a] Source #

null :: FingerTree a -> Bool Source #

length :: FingerTree a -> Int Source #

elem :: Eq a => a -> FingerTree a -> Bool Source #

maximum :: Ord a => FingerTree a -> a Source #

minimum :: Ord a => FingerTree a -> a Source #

sum :: Num a => FingerTree a -> a Source #

product :: Num a => FingerTree a -> a Source #

Foldable Node 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Node m -> m Source #

foldMap :: Monoid m => (a -> m) -> Node a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Node a -> m Source #

foldr :: (a -> b -> b) -> b -> Node a -> b Source #

foldr' :: (a -> b -> b) -> b -> Node a -> b Source #

foldl :: (b -> a -> b) -> b -> Node a -> b Source #

foldl' :: (b -> a -> b) -> b -> Node a -> b Source #

foldr1 :: (a -> a -> a) -> Node a -> a Source #

foldl1 :: (a -> a -> a) -> Node a -> a Source #

toList :: Node a -> [a] Source #

null :: Node a -> Bool Source #

length :: Node a -> Int Source #

elem :: Eq a => a -> Node a -> Bool Source #

maximum :: Ord a => Node a -> a Source #

minimum :: Ord a => Node a -> a Source #

sum :: Num a => Node a -> a Source #

product :: Num a => Node a -> a Source #

Foldable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Seq m -> m Source #

foldMap :: Monoid m => (a -> m) -> Seq a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Seq a -> m Source #

foldr :: (a -> b -> b) -> b -> Seq a -> b Source #

foldr' :: (a -> b -> b) -> b -> Seq a -> b Source #

foldl :: (b -> a -> b) -> b -> Seq a -> b Source #

foldl' :: (b -> a -> b) -> b -> Seq a -> b Source #

foldr1 :: (a -> a -> a) -> Seq a -> a Source #

foldl1 :: (a -> a -> a) -> Seq a -> a Source #

toList :: Seq a -> [a] Source #

null :: Seq a -> Bool Source #

length :: Seq a -> Int Source #

elem :: Eq a => a -> Seq a -> Bool Source #

maximum :: Ord a => Seq a -> a Source #

minimum :: Ord a => Seq a -> a Source #

sum :: Num a => Seq a -> a Source #

product :: Num a => Seq a -> a Source #

Foldable ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => ViewL m -> m Source #

foldMap :: Monoid m => (a -> m) -> ViewL a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ViewL a -> m Source #

foldr :: (a -> b -> b) -> b -> ViewL a -> b Source #

foldr' :: (a -> b -> b) -> b -> ViewL a -> b Source #

foldl :: (b -> a -> b) -> b -> ViewL a -> b Source #

foldl' :: (b -> a -> b) -> b -> ViewL a -> b Source #

foldr1 :: (a -> a -> a) -> ViewL a -> a Source #

foldl1 :: (a -> a -> a) -> ViewL a -> a Source #

toList :: ViewL a -> [a] Source #

null :: ViewL a -> Bool Source #

length :: ViewL a -> Int Source #

elem :: Eq a => a -> ViewL a -> Bool Source #

maximum :: Ord a => ViewL a -> a Source #

minimum :: Ord a => ViewL a -> a Source #

sum :: Num a => ViewL a -> a Source #

product :: Num a => ViewL a -> a Source #

Foldable ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => ViewR m -> m Source #

foldMap :: Monoid m => (a -> m) -> ViewR a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ViewR a -> m Source #

foldr :: (a -> b -> b) -> b -> ViewR a -> b Source #

foldr' :: (a -> b -> b) -> b -> ViewR a -> b Source #

foldl :: (b -> a -> b) -> b -> ViewR a -> b Source #

foldl' :: (b -> a -> b) -> b -> ViewR a -> b Source #

foldr1 :: (a -> a -> a) -> ViewR a -> a Source #

foldl1 :: (a -> a -> a) -> ViewR a -> a Source #

toList :: ViewR a -> [a] Source #

null :: ViewR a -> Bool Source #

length :: ViewR a -> Int Source #

elem :: Eq a => a -> ViewR a -> Bool Source #

maximum :: Ord a => ViewR a -> a Source #

minimum :: Ord a => ViewR a -> a Source #

sum :: Num a => ViewR a -> a Source #

product :: Num a => ViewR a -> a Source #

Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Methods

fold :: Monoid m => Set m -> m Source #

foldMap :: Monoid m => (a -> m) -> Set a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Set a -> m Source #

foldr :: (a -> b -> b) -> b -> Set a -> b Source #

foldr' :: (a -> b -> b) -> b -> Set a -> b Source #

foldl :: (b -> a -> b) -> b -> Set a -> b Source #

foldl' :: (b -> a -> b) -> b -> Set a -> b Source #

foldr1 :: (a -> a -> a) -> Set a -> a Source #

foldl1 :: (a -> a -> a) -> Set a -> a Source #

toList :: Set a -> [a] Source #

null :: Set a -> Bool Source #

length :: Set a -> Int Source #

elem :: Eq a => a -> Set a -> Bool Source #

maximum :: Ord a => Set a -> a Source #

minimum :: Ord a => Set a -> a Source #

sum :: Num a => Set a -> a Source #

product :: Num a => Set a -> a Source #

Foldable Tree

Folds in preorder

Instance details

Defined in Data.Tree

Methods

fold :: Monoid m => Tree m -> m Source #

foldMap :: Monoid m => (a -> m) -> Tree a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Tree a -> m Source #

foldr :: (a -> b -> b) -> b -> Tree a -> b Source #

foldr' :: (a -> b -> b) -> b -> Tree a -> b Source #

foldl :: (b -> a -> b) -> b -> Tree a -> b Source #

foldl' :: (b -> a -> b) -> b -> Tree a -> b Source #

foldr1 :: (a -> a -> a) -> Tree a -> a Source #

foldl1 :: (a -> a -> a) -> Tree a -> a Source #

toList :: Tree a -> [a] Source #

null :: Tree a -> Bool Source #

length :: Tree a -> Int Source #

elem :: Eq a => a -> Tree a -> Bool Source #

maximum :: Ord a => Tree a -> a Source #

minimum :: Ord a => Tree a -> a Source #

sum :: Num a => Tree a -> a Source #

product :: Num a => Tree a -> a Source #

Foldable DNonEmpty 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

fold :: Monoid m => DNonEmpty m -> m Source #

foldMap :: Monoid m => (a -> m) -> DNonEmpty a -> m Source #

foldMap' :: Monoid m => (a -> m) -> DNonEmpty a -> m Source #

foldr :: (a -> b -> b) -> b -> DNonEmpty a -> b Source #

foldr' :: (a -> b -> b) -> b -> DNonEmpty a -> b Source #

foldl :: (b -> a -> b) -> b -> DNonEmpty a -> b Source #

foldl' :: (b -> a -> b) -> b -> DNonEmpty a -> b Source #

foldr1 :: (a -> a -> a) -> DNonEmpty a -> a Source #

foldl1 :: (a -> a -> a) -> DNonEmpty a -> a Source #

toList :: DNonEmpty a -> [a] Source #

null :: DNonEmpty a -> Bool Source #

length :: DNonEmpty a -> Int Source #

elem :: Eq a => a -> DNonEmpty a -> Bool Source #

maximum :: Ord a => DNonEmpty a -> a Source #

minimum :: Ord a => DNonEmpty a -> a Source #

sum :: Num a => DNonEmpty a -> a Source #

product :: Num a => DNonEmpty a -> a Source #

Foldable DList 
Instance details

Defined in Data.DList.Internal

Methods

fold :: Monoid m => DList m -> m Source #

foldMap :: Monoid m => (a -> m) -> DList a -> m Source #

foldMap' :: Monoid m => (a -> m) -> DList a -> m Source #

foldr :: (a -> b -> b) -> b -> DList a -> b Source #

foldr' :: (a -> b -> b) -> b -> DList a -> b Source #

foldl :: (b -> a -> b) -> b -> DList a -> b Source #

foldl' :: (b -> a -> b) -> b -> DList a -> b Source #

foldr1 :: (a -> a -> a) -> DList a -> a Source #

foldl1 :: (a -> a -> a) -> DList a -> a Source #

toList :: DList a -> [a] Source #

null :: DList a -> Bool Source #

length :: DList a -> Int Source #

elem :: Eq a => a -> DList a -> Bool Source #

maximum :: Ord a => DList a -> a Source #

minimum :: Ord a => DList a -> a Source #

sum :: Num a => DList a -> a Source #

product :: Num a => DList a -> a Source #

Foldable GenClosure 
Instance details

Defined in GHC.Exts.Heap.Closures

Methods

fold :: Monoid m => GenClosure m -> m Source #

foldMap :: Monoid m => (a -> m) -> GenClosure a -> m Source #

foldMap' :: Monoid m => (a -> m) -> GenClosure a -> m Source #

foldr :: (a -> b -> b) -> b -> GenClosure a -> b Source #

foldr' :: (a -> b -> b) -> b -> GenClosure a -> b Source #

foldl :: (b -> a -> b) -> b -> GenClosure a -> b Source #

foldl' :: (b -> a -> b) -> b -> GenClosure a -> b Source #

foldr1 :: (a -> a -> a) -> GenClosure a -> a Source #

foldl1 :: (a -> a -> a) -> GenClosure a -> a Source #

toList :: GenClosure a -> [a] Source #

null :: GenClosure a -> Bool Source #

length :: GenClosure a -> Int Source #

elem :: Eq a => a -> GenClosure a -> Bool Source #

maximum :: Ord a => GenClosure a -> a Source #

minimum :: Ord a => GenClosure a -> a Source #

sum :: Num a => GenClosure a -> a Source #

product :: Num a => GenClosure a -> a Source #

Foldable Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

fold :: Monoid m => Hashed m -> m Source #

foldMap :: Monoid m => (a -> m) -> Hashed a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Hashed a -> m Source #

foldr :: (a -> b -> b) -> b -> Hashed a -> b Source #

foldr' :: (a -> b -> b) -> b -> Hashed a -> b Source #

foldl :: (b -> a -> b) -> b -> Hashed a -> b Source #

foldl' :: (b -> a -> b) -> b -> Hashed a -> b Source #

foldr1 :: (a -> a -> a) -> Hashed a -> a Source #

foldl1 :: (a -> a -> a) -> Hashed a -> a Source #

toList :: Hashed a -> [a] Source #

null :: Hashed a -> Bool Source #

length :: Hashed a -> Int Source #

elem :: Eq a => a -> Hashed a -> Bool Source #

maximum :: Ord a => Hashed a -> a Source #

minimum :: Ord a => Hashed a -> a Source #

sum :: Num a => Hashed a -> a Source #

product :: Num a => Hashed a -> a Source #

Foldable Array 
Instance details

Defined in Data.Primitive.Array

Methods

fold :: Monoid m => Array m -> m Source #

foldMap :: Monoid m => (a -> m) -> Array a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Array a -> m Source #

foldr :: (a -> b -> b) -> b -> Array a -> b Source #

foldr' :: (a -> b -> b) -> b -> Array a -> b Source #

foldl :: (b -> a -> b) -> b -> Array a -> b Source #

foldl' :: (b -> a -> b) -> b -> Array a -> b Source #

foldr1 :: (a -> a -> a) -> Array a -> a Source #

foldl1 :: (a -> a -> a) -> Array a -> a Source #

toList :: Array a -> [a] Source #

null :: Array a -> Bool Source #

length :: Array a -> Int Source #

elem :: Eq a => a -> Array a -> Bool Source #

maximum :: Ord a => Array a -> a Source #

minimum :: Ord a => Array a -> a Source #

sum :: Num a => Array a -> a Source #

product :: Num a => Array a -> a Source #

Foldable SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fold :: Monoid m => SmallArray m -> m Source #

foldMap :: Monoid m => (a -> m) -> SmallArray a -> m Source #

foldMap' :: Monoid m => (a -> m) -> SmallArray a -> m Source #

foldr :: (a -> b -> b) -> b -> SmallArray a -> b Source #

foldr' :: (a -> b -> b) -> b -> SmallArray a -> b Source #

foldl :: (b -> a -> b) -> b -> SmallArray a -> b Source #

foldl' :: (b -> a -> b) -> b -> SmallArray a -> b Source #

foldr1 :: (a -> a -> a) -> SmallArray a -> a Source #

foldl1 :: (a -> a -> a) -> SmallArray a -> a Source #

toList :: SmallArray a -> [a] Source #

null :: SmallArray a -> Bool Source #

length :: SmallArray a -> Int Source #

elem :: Eq a => a -> SmallArray a -> Bool Source #

maximum :: Ord a => SmallArray a -> a Source #

minimum :: Ord a => SmallArray a -> a Source #

sum :: Num a => SmallArray a -> a Source #

product :: Num a => SmallArray a -> a Source #

Foldable Maybe 
Instance details

Defined in Data.Strict.Maybe

Methods

fold :: Monoid m => Maybe m -> m Source #

foldMap :: Monoid m => (a -> m) -> Maybe a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Maybe a -> m Source #

foldr :: (a -> b -> b) -> b -> Maybe a -> b Source #

foldr' :: (a -> b -> b) -> b -> Maybe a -> b Source #

foldl :: (b -> a -> b) -> b -> Maybe a -> b Source #

foldl' :: (b -> a -> b) -> b -> Maybe a -> b Source #

foldr1 :: (a -> a -> a) -> Maybe a -> a Source #

foldl1 :: (a -> a -> a) -> Maybe a -> a Source #

toList :: Maybe a -> [a] Source #

null :: Maybe a -> Bool Source #

length :: Maybe a -> Int Source #

elem :: Eq a => a -> Maybe a -> Bool Source #

maximum :: Ord a => Maybe a -> a Source #

minimum :: Ord a => Maybe a -> a Source #

sum :: Num a => Maybe a -> a Source #

product :: Num a => Maybe a -> a Source #

Foldable HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

fold :: Monoid m => HashSet m -> m Source #

foldMap :: Monoid m => (a -> m) -> HashSet a -> m Source #

foldMap' :: Monoid m => (a -> m) -> HashSet a -> m Source #

foldr :: (a -> b -> b) -> b -> HashSet a -> b Source #

foldr' :: (a -> b -> b) -> b -> HashSet a -> b Source #

foldl :: (b -> a -> b) -> b -> HashSet a -> b Source #

foldl' :: (b -> a -> b) -> b -> HashSet a -> b Source #

foldr1 :: (a -> a -> a) -> HashSet a -> a Source #

foldl1 :: (a -> a -> a) -> HashSet a -> a Source #

toList :: HashSet a -> [a] Source #

null :: HashSet a -> Bool Source #

length :: HashSet a -> Int Source #

elem :: Eq a => a -> HashSet a -> Bool Source #

maximum :: Ord a => HashSet a -> a Source #

minimum :: Ord a => HashSet a -> a Source #

sum :: Num a => HashSet a -> a Source #

product :: Num a => HashSet a -> a Source #

Foldable Vector 
Instance details

Defined in Data.Vector

Methods

fold :: Monoid m => Vector m -> m Source #

foldMap :: Monoid m => (a -> m) -> Vector a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Vector a -> m Source #

foldr :: (a -> b -> b) -> b -> Vector a -> b Source #

foldr' :: (a -> b -> b) -> b -> Vector a -> b Source #

foldl :: (b -> a -> b) -> b -> Vector a -> b Source #

foldl' :: (b -> a -> b) -> b -> Vector a -> b Source #

foldr1 :: (a -> a -> a) -> Vector a -> a Source #

foldl1 :: (a -> a -> a) -> Vector a -> a Source #

toList :: Vector a -> [a] Source #

null :: Vector a -> Bool Source #

length :: Vector a -> Int Source #

elem :: Eq a => a -> Vector a -> Bool Source #

maximum :: Ord a => Vector a -> a Source #

minimum :: Ord a => Vector a -> a Source #

sum :: Num a => Vector a -> a Source #

product :: Num a => Vector a -> a Source #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Maybe m -> m Source #

foldMap :: Monoid m => (a -> m) -> Maybe a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Maybe a -> m Source #

foldr :: (a -> b -> b) -> b -> Maybe a -> b Source #

foldr' :: (a -> b -> b) -> b -> Maybe a -> b Source #

foldl :: (b -> a -> b) -> b -> Maybe a -> b Source #

foldl' :: (b -> a -> b) -> b -> Maybe a -> b Source #

foldr1 :: (a -> a -> a) -> Maybe a -> a Source #

foldl1 :: (a -> a -> a) -> Maybe a -> a Source #

toList :: Maybe a -> [a] Source #

null :: Maybe a -> Bool Source #

length :: Maybe a -> Int Source #

elem :: Eq a => a -> Maybe a -> Bool Source #

maximum :: Ord a => Maybe a -> a Source #

minimum :: Ord a => Maybe a -> a Source #

sum :: Num a => Maybe a -> a Source #

product :: Num a => Maybe a -> a Source #

Foldable Solo

Since: base-4.15

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Solo m -> m Source #

foldMap :: Monoid m => (a -> m) -> Solo a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Solo a -> m Source #

foldr :: (a -> b -> b) -> b -> Solo a -> b Source #

foldr' :: (a -> b -> b) -> b -> Solo a -> b Source #

foldl :: (b -> a -> b) -> b -> Solo a -> b Source #

foldl' :: (b -> a -> b) -> b -> Solo a -> b Source #

foldr1 :: (a -> a -> a) -> Solo a -> a Source #

foldl1 :: (a -> a -> a) -> Solo a -> a Source #

toList :: Solo a -> [a] Source #

null :: Solo a -> Bool Source #

length :: Solo a -> Int Source #

elem :: Eq a => a -> Solo a -> Bool Source #

maximum :: Ord a => Solo a -> a Source #

minimum :: Ord a => Solo a -> a Source #

sum :: Num a => Solo a -> a Source #

product :: Num a => Solo a -> a Source #

Foldable List

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 (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 (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Proxy m -> m Source #

foldMap :: Monoid m => (a -> m) -> Proxy a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Proxy a -> m Source #

foldr :: (a -> b -> b) -> b -> Proxy a -> b Source #

foldr' :: (a -> b -> b) -> b -> Proxy a -> b Source #

foldl :: (b -> a -> b) -> b -> Proxy a -> b Source #

foldl' :: (b -> a -> b) -> b -> Proxy a -> b Source #

foldr1 :: (a -> a -> a) -> Proxy a -> a Source #

foldl1 :: (a -> a -> a) -> Proxy a -> a Source #

toList :: Proxy a -> [a] Source #

null :: Proxy a -> Bool Source #

length :: Proxy a -> Int Source #

elem :: Eq a => a -> Proxy a -> Bool Source #

maximum :: Ord a => Proxy a -> a Source #

minimum :: Ord a => Proxy a -> a Source #

sum :: Num a => Proxy a -> a Source #

product :: Num a => Proxy a -> a Source #

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 (Array i)

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Array i m -> m Source #

foldMap :: Monoid m => (a -> m) -> Array i a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Array i a -> m Source #

foldr :: (a -> b -> b) -> b -> Array i a -> b Source #

foldr' :: (a -> b -> b) -> b -> Array i a -> b Source #

foldl :: (b -> a -> b) -> b -> Array i a -> b Source #

foldl' :: (b -> a -> b) -> b -> Array i a -> b Source #

foldr1 :: (a -> a -> a) -> Array i a -> a Source #

foldl1 :: (a -> a -> a) -> Array i a -> a Source #

toList :: Array i a -> [a] Source #

null :: Array i a -> Bool Source #

length :: Array i a -> Int Source #

elem :: Eq a => a -> Array i a -> Bool Source #

maximum :: Ord a => Array i a -> a Source #

minimum :: Ord a => Array i a -> a Source #

sum :: Num a => Array i a -> a Source #

product :: Num a => Array i a -> a Source #

Foldable (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => U1 m -> m Source #

foldMap :: Monoid m => (a -> m) -> U1 a -> m Source #

foldMap' :: Monoid m => (a -> m) -> U1 a -> m Source #

foldr :: (a -> b -> b) -> b -> U1 a -> b Source #

foldr' :: (a -> b -> b) -> b -> U1 a -> b Source #

foldl :: (b -> a -> b) -> b -> U1 a -> b Source #

foldl' :: (b -> a -> b) -> b -> U1 a -> b Source #

foldr1 :: (a -> a -> a) -> U1 a -> a Source #

foldl1 :: (a -> a -> a) -> U1 a -> a Source #

toList :: U1 a -> [a] Source #

null :: U1 a -> Bool Source #

length :: U1 a -> Int Source #

elem :: Eq a => a -> U1 a -> Bool Source #

maximum :: Ord a => U1 a -> a Source #

minimum :: Ord a => U1 a -> a Source #

sum :: Num a => U1 a -> a Source #

product :: Num a => U1 a -> a Source #

Foldable (UAddr :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UAddr m -> m Source #

foldMap :: Monoid m => (a -> m) -> UAddr a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UAddr a -> m Source #

foldr :: (a -> b -> b) -> b -> UAddr a -> b Source #

foldr' :: (a -> b -> b) -> b -> UAddr a -> b Source #

foldl :: (b -> a -> b) -> b -> UAddr a -> b Source #

foldl' :: (b -> a -> b) -> b -> UAddr a -> b Source #

foldr1 :: (a -> a -> a) -> UAddr a -> a Source #

foldl1 :: (a -> a -> a) -> UAddr a -> a Source #

toList :: UAddr a -> [a] Source #

null :: UAddr a -> Bool Source #

length :: UAddr a -> Int Source #

elem :: Eq a => a -> UAddr a -> Bool Source #

maximum :: Ord a => UAddr a -> a Source #

minimum :: Ord a => UAddr a -> a Source #

sum :: Num a => UAddr a -> a Source #

product :: Num a => UAddr a -> a Source #

Foldable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UChar m -> m Source #

foldMap :: Monoid m => (a -> m) -> UChar a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UChar a -> m Source #

foldr :: (a -> b -> b) -> b -> UChar a -> b Source #

foldr' :: (a -> b -> b) -> b -> UChar a -> b Source #

foldl :: (b -> a -> b) -> b -> UChar a -> b Source #

foldl' :: (b -> a -> b) -> b -> UChar a -> b Source #

foldr1 :: (a -> a -> a) -> UChar a -> a Source #

foldl1 :: (a -> a -> a) -> UChar a -> a Source #

toList :: UChar a -> [a] Source #

null :: UChar a -> Bool Source #

length :: UChar a -> Int Source #

elem :: Eq a => a -> UChar a -> Bool Source #

maximum :: Ord a => UChar a -> a Source #

minimum :: Ord a => UChar a -> a Source #

sum :: Num a => UChar a -> a Source #

product :: Num a => UChar a -> a Source #

Foldable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UDouble m -> m Source #

foldMap :: Monoid m => (a -> m) -> UDouble a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UDouble a -> m Source #

foldr :: (a -> b -> b) -> b -> UDouble a -> b Source #

foldr' :: (a -> b -> b) -> b -> UDouble a -> b Source #

foldl :: (b -> a -> b) -> b -> UDouble a -> b Source #

foldl' :: (b -> a -> b) -> b -> UDouble a -> b Source #

foldr1 :: (a -> a -> a) -> UDouble a -> a Source #

foldl1 :: (a -> a -> a) -> UDouble a -> a Source #

toList :: UDouble a -> [a] Source #

null :: UDouble a -> Bool Source #

length :: UDouble a -> Int Source #

elem :: Eq a => a -> UDouble a -> Bool Source #

maximum :: Ord a => UDouble a -> a Source #

minimum :: Ord a => UDouble a -> a Source #

sum :: Num a => UDouble a -> a Source #

product :: Num a => UDouble a -> a Source #

Foldable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UFloat m -> m Source #

foldMap :: Monoid m => (a -> m) -> UFloat a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UFloat a -> m Source #

foldr :: (a -> b -> b) -> b -> UFloat a -> b Source #

foldr' :: (a -> b -> b) -> b -> UFloat a -> b Source #

foldl :: (b -> a -> b) -> b -> UFloat a -> b Source #

foldl' :: (b -> a -> b) -> b -> UFloat a -> b Source #

foldr1 :: (a -> a -> a) -> UFloat a -> a Source #

foldl1 :: (a -> a -> a) -> UFloat a -> a Source #

toList :: UFloat a -> [a] Source #

null :: UFloat a -> Bool Source #

length :: UFloat a -> Int Source #

elem :: Eq a => a -> UFloat a -> Bool Source #

maximum :: Ord a => UFloat a -> a Source #

minimum :: Ord a => UFloat a -> a Source #

sum :: Num a => UFloat a -> a Source #

product :: Num a => UFloat a -> a Source #

Foldable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UInt m -> m Source #

foldMap :: Monoid m => (a -> m) -> UInt a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UInt a -> m Source #

foldr :: (a -> b -> b) -> b -> UInt a -> b Source #

foldr' :: (a -> b -> b) -> b -> UInt a -> b Source #

foldl :: (b -> a -> b) -> b -> UInt a -> b Source #

foldl' :: (b -> a -> b) -> b -> UInt a -> b Source #

foldr1 :: (a -> a -> a) -> UInt a -> a Source #

foldl1 :: (a -> a -> a) -> UInt a -> a Source #

toList :: UInt a -> [a] Source #

null :: UInt a -> Bool Source #

length :: UInt a -> Int Source #

elem :: Eq a => a -> UInt a -> Bool Source #

maximum :: Ord a => UInt a -> a Source #

minimum :: Ord a => UInt a -> a Source #

sum :: Num a => UInt a -> a Source #

product :: Num a => UInt a -> a Source #

Foldable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UWord m -> m Source #

foldMap :: Monoid m => (a -> m) -> UWord a -> m Source #

foldMap' :: Monoid m => (a -> m) -> UWord a -> m Source #

foldr :: (a -> b -> b) -> b -> UWord a -> b Source #

foldr' :: (a -> b -> b) -> b -> UWord a -> b Source #

foldl :: (b -> a -> b) -> b -> UWord a -> b Source #

foldl' :: (b -> a -> b) -> b -> UWord a -> b Source #

foldr1 :: (a -> a -> a) -> UWord a -> a Source #

foldl1 :: (a -> a -> a) -> UWord a -> a Source #

toList :: UWord a -> [a] Source #

null :: UWord a -> Bool Source #

length :: UWord a -> Int Source #

elem :: Eq a => a -> UWord a -> Bool Source #

maximum :: Ord a => UWord a -> a Source #

minimum :: Ord a => UWord a -> a Source #

sum :: Num a => UWord a -> a Source #

product :: Num a => UWord a -> a Source #

Foldable (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => V1 m -> m Source #

foldMap :: Monoid m => (a -> m) -> V1 a -> m Source #

foldMap' :: Monoid m => (a -> m) -> V1 a -> m Source #

foldr :: (a -> b -> b) -> b -> V1 a -> b Source #

foldr' :: (a -> b -> b) -> b -> V1 a -> b Source #

foldl :: (b -> a -> b) -> b -> V1 a -> b Source #

foldl' :: (b -> a -> b) -> b -> V1 a -> b Source #

foldr1 :: (a -> a -> a) -> V1 a -> a Source #

foldl1 :: (a -> a -> a) -> V1 a -> a Source #

toList :: V1 a -> [a] Source #

null :: V1 a -> Bool Source #

length :: V1 a -> Int Source #

elem :: Eq a => a -> V1 a -> Bool Source #

maximum :: Ord a => V1 a -> a Source #

minimum :: Ord a => V1 a -> a Source #

sum :: Num a => V1 a -> a Source #

product :: Num a => V1 a -> a Source #

Foldable (Map k)

Folds in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m Source #

foldMap :: Monoid m => (a -> m) -> Map k a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m Source #

foldr :: (a -> b -> b) -> b -> Map k a -> b Source #

foldr' :: (a -> b -> b) -> b -> Map k a -> b Source #

foldl :: (b -> a -> b) -> b -> Map k a -> b Source #

foldl' :: (b -> a -> b) -> b -> Map k a -> b Source #

foldr1 :: (a -> a -> a) -> Map k a -> a Source #

foldl1 :: (a -> a -> a) -> Map k a -> a Source #

toList :: Map k a -> [a] Source #

null :: Map k a -> Bool Source #

length :: Map k a -> Int Source #

elem :: Eq a => a -> Map k a -> Bool Source #

maximum :: Ord a => Map k a -> a Source #

minimum :: Ord a => Map k a -> a Source #

sum :: Num a => Map k a -> a Source #

product :: Num a => Map k a -> a Source #

Foldable f => Foldable (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

fold :: Monoid m => Cofree f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Cofree f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Cofree f a -> m Source #

foldr :: (a -> b -> b) -> b -> Cofree f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Cofree f a -> b Source #

foldl :: (b -> a -> b) -> b -> Cofree f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Cofree f a -> b Source #

foldr1 :: (a -> a -> a) -> Cofree f a -> a Source #

foldl1 :: (a -> a -> a) -> Cofree f a -> a Source #

toList :: Cofree f a -> [a] Source #

null :: Cofree f a -> Bool Source #

length :: Cofree f a -> Int Source #

elem :: Eq a => a -> Cofree f a -> Bool Source #

maximum :: Ord a => Cofree f a -> a Source #

minimum :: Ord a => Cofree f a -> a Source #

sum :: Num a => Cofree f a -> a Source #

product :: Num a => Cofree f a -> a Source #

Foldable f => Foldable (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

fold :: Monoid m => Free f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Free f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Free f a -> m Source #

foldr :: (a -> b -> b) -> b -> Free f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Free f a -> b Source #

foldl :: (b -> a -> b) -> b -> Free f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Free f a -> b Source #

foldr1 :: (a -> a -> a) -> Free f a -> a Source #

foldl1 :: (a -> a -> a) -> Free f a -> a Source #

toList :: Free f a -> [a] Source #

null :: Free f a -> Bool Source #

length :: Free f a -> Int Source #

elem :: Eq a => a -> Free f a -> Bool Source #

maximum :: Ord a => Free f a -> a Source #

minimum :: Ord a => Free f a -> a Source #

sum :: Num a => Free f a -> a Source #

product :: Num a => Free f a -> a Source #

Foldable (ListF a) 
Instance details

Defined in Data.Functor.Base

Methods

fold :: Monoid m => ListF a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> ListF a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> ListF a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> ListF a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> ListF a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> ListF a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> ListF a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> ListF a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> ListF a a0 -> a0 Source #

toList :: ListF a a0 -> [a0] Source #

null :: ListF a a0 -> Bool Source #

length :: ListF a a0 -> Int Source #

elem :: Eq a0 => a0 -> ListF a a0 -> Bool Source #

maximum :: Ord a0 => ListF a a0 -> a0 Source #

minimum :: Ord a0 => ListF a a0 -> a0 Source #

sum :: Num a0 => ListF a a0 -> a0 Source #

product :: Num a0 => ListF a a0 -> a0 Source #

Foldable (NonEmptyF a) 
Instance details

Defined in Data.Functor.Base

Methods

fold :: Monoid m => NonEmptyF a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> NonEmptyF a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> NonEmptyF a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> NonEmptyF a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> NonEmptyF a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> NonEmptyF a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> NonEmptyF a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> NonEmptyF a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> NonEmptyF a a0 -> a0 Source #

toList :: NonEmptyF a a0 -> [a0] Source #

null :: NonEmptyF a a0 -> Bool Source #

length :: NonEmptyF a a0 -> Int Source #

elem :: Eq a0 => a0 -> NonEmptyF a a0 -> Bool Source #

maximum :: Ord a0 => NonEmptyF a a0 -> a0 Source #

minimum :: Ord a0 => NonEmptyF a a0 -> a0 Source #

sum :: Num a0 => NonEmptyF a a0 -> a0 Source #

product :: Num a0 => NonEmptyF a a0 -> a0 Source #

Foldable (TreeF a) 
Instance details

Defined in Data.Functor.Base

Methods

fold :: Monoid m => TreeF a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> TreeF a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> TreeF a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> TreeF a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> TreeF a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> TreeF a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> TreeF a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> TreeF a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> TreeF a a0 -> a0 Source #

toList :: TreeF a a0 -> [a0] Source #

null :: TreeF a a0 -> Bool Source #

length :: TreeF a a0 -> Int Source #

elem :: Eq a0 => a0 -> TreeF a a0 -> Bool Source #

maximum :: Ord a0 => TreeF a a0 -> a0 Source #

minimum :: Ord a0 => TreeF a a0 -> a0 Source #

sum :: Num a0 => TreeF a a0 -> a0 Source #

product :: Num a0 => TreeF a a0 -> a0 Source #

Foldable (Either e) 
Instance details

Defined in Data.Strict.Either

Methods

fold :: Monoid m => Either e m -> m Source #

foldMap :: Monoid m => (a -> m) -> Either e a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Either e a -> m Source #

foldr :: (a -> b -> b) -> b -> Either e a -> b Source #

foldr' :: (a -> b -> b) -> b -> Either e a -> b Source #

foldl :: (b -> a -> b) -> b -> Either e a -> b Source #

foldl' :: (b -> a -> b) -> b -> Either e a -> b Source #

foldr1 :: (a -> a -> a) -> Either e a -> a Source #

foldl1 :: (a -> a -> a) -> Either e a -> a Source #

toList :: Either e a -> [a] Source #

null :: Either e a -> Bool Source #

length :: Either e a -> Int Source #

elem :: Eq a => a -> Either e a -> Bool Source #

maximum :: Ord a => Either e a -> a Source #

minimum :: Ord a => Either e a -> a Source #

sum :: Num a => Either e a -> a Source #

product :: Num a => Either e a -> a Source #

Foldable (These a) 
Instance details

Defined in Data.Strict.These

Methods

fold :: Monoid m => These a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> These a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> These a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> These a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> These a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> These a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> These a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 Source #

toList :: These a a0 -> [a0] Source #

null :: These a a0 -> Bool Source #

length :: These a a0 -> Int Source #

elem :: Eq a0 => a0 -> These a a0 -> Bool Source #

maximum :: Ord a0 => These a a0 -> a0 Source #

minimum :: Ord a0 => These a a0 -> a0 Source #

sum :: Num a0 => These a a0 -> a0 Source #

product :: Num a0 => These a a0 -> a0 Source #

Foldable (Pair e) 
Instance details

Defined in Data.Strict.Tuple

Methods

fold :: Monoid m => Pair e m -> m Source #

foldMap :: Monoid m => (a -> m) -> Pair e a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Pair e a -> m Source #

foldr :: (a -> b -> b) -> b -> Pair e a -> b Source #

foldr' :: (a -> b -> b) -> b -> Pair e a -> b Source #

foldl :: (b -> a -> b) -> b -> Pair e a -> b Source #

foldl' :: (b -> a -> b) -> b -> Pair e a -> b Source #

foldr1 :: (a -> a -> a) -> Pair e a -> a Source #

foldl1 :: (a -> a -> a) -> Pair e a -> a Source #

toList :: Pair e a -> [a] Source #

null :: Pair e a -> Bool Source #

length :: Pair e a -> Int Source #

elem :: Eq a => a -> Pair e a -> Bool Source #

maximum :: Ord a => Pair e a -> a Source #

minimum :: Ord a => Pair e a -> a Source #

sum :: Num a => Pair e a -> a Source #

product :: Num a => Pair e a -> a Source #

Foldable (These a) 
Instance details

Defined in Data.These

Methods

fold :: Monoid m => These a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> These a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> These a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> These a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> These a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> These a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> These a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> These a a0 -> a0 Source #

toList :: These a a0 -> [a0] Source #

null :: These a a0 -> Bool Source #

length :: These a a0 -> Int Source #

elem :: Eq a0 => a0 -> These a a0 -> Bool Source #

maximum :: Ord a0 => These a a0 -> a0 Source #

minimum :: Ord a0 => These a a0 -> a0 Source #

sum :: Num a0 => These a a0 -> a0 Source #

product :: Num a0 => These a a0 -> a0 Source #

Foldable f => Foldable (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

fold :: Monoid m => Lift f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Lift f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Lift f a -> m Source #

foldr :: (a -> b -> b) -> b -> Lift f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Lift f a -> b Source #

foldl :: (b -> a -> b) -> b -> Lift f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Lift f a -> b Source #

foldr1 :: (a -> a -> a) -> Lift f a -> a Source #

foldl1 :: (a -> a -> a) -> Lift f a -> a Source #

toList :: Lift f a -> [a] Source #

null :: Lift f a -> Bool Source #

length :: Lift f a -> Int Source #

elem :: Eq a => a -> Lift f a -> Bool Source #

maximum :: Ord a => Lift f a -> a Source #

minimum :: Ord a => Lift f a -> a Source #

sum :: Num a => Lift f a -> a Source #

product :: Num a => Lift f a -> a Source #

Foldable f => Foldable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fold :: Monoid m => MaybeT f m -> m Source #

foldMap :: Monoid m => (a -> m) -> MaybeT f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> MaybeT f a -> m Source #

foldr :: (a -> b -> b) -> b -> MaybeT f a -> b Source #

foldr' :: (a -> b -> b) -> b -> MaybeT f a -> b Source #

foldl :: (b -> a -> b) -> b -> MaybeT f a -> b Source #

foldl' :: (b -> a -> b) -> b -> MaybeT f a -> b Source #

foldr1 :: (a -> a -> a) -> MaybeT f a -> a Source #

foldl1 :: (a -> a -> a) -> MaybeT f a -> a Source #

toList :: MaybeT f a -> [a] Source #

null :: MaybeT f a -> Bool Source #

length :: MaybeT f a -> Int Source #

elem :: Eq a => a -> MaybeT f a -> Bool Source #

maximum :: Ord a => MaybeT f a -> a Source #

minimum :: Ord a => MaybeT f a -> a Source #

sum :: Num a => MaybeT f a -> a Source #

product :: Num a => MaybeT f a -> a Source #

Foldable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fold :: Monoid m => HashMap k m -> m Source #

foldMap :: Monoid m => (a -> m) -> HashMap k a -> m Source #

foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m Source #

foldr :: (a -> b -> b) -> b -> HashMap k a -> b Source #

foldr' :: (a -> b -> b) -> b -> HashMap k a -> b Source #

foldl :: (b -> a -> b) -> b -> HashMap k a -> b Source #

foldl' :: (b -> a -> b) -> b -> HashMap k a -> b Source #

foldr1 :: (a -> a -> a) -> HashMap k a -> a Source #

foldl1 :: (a -> a -> a) -> HashMap k a -> a Source #

toList :: HashMap k a -> [a] Source #

null :: HashMap k a -> Bool Source #

length :: HashMap k a -> Int Source #

elem :: Eq a => a -> HashMap k a -> Bool Source #

maximum :: Ord a => HashMap k a -> a Source #

minimum :: Ord a => HashMap k a -> a Source #

sum :: Num a => HashMap k a -> a Source #

product :: Num a => HashMap k a -> a Source #

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 (Const m :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Functor.Const

Methods

fold :: Monoid m0 => Const m m0 -> m0 Source #

foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 Source #

foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 Source #

foldr :: (a -> b -> b) -> b -> Const m a -> b Source #

foldr' :: (a -> b -> b) -> b -> Const m a -> b Source #

foldl :: (b -> a -> b) -> b -> Const m a -> b Source #

foldl' :: (b -> a -> b) -> b -> Const m a -> b Source #

foldr1 :: (a -> a -> a) -> Const m a -> a Source #

foldl1 :: (a -> a -> a) -> Const m a -> a Source #

toList :: Const m a -> [a] Source #

null :: Const m a -> Bool Source #

length :: Const m a -> Int Source #

elem :: Eq a => a -> Const m a -> Bool Source #

maximum :: Ord a => Const m a -> a Source #

minimum :: Ord a => Const m a -> a Source #

sum :: Num a => Const m a -> a Source #

product :: Num a => Const m a -> a Source #

Foldable f => Foldable (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Ap f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldr :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldl :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldr1 :: (a -> a -> a) -> Ap f a -> a Source #

foldl1 :: (a -> a -> a) -> Ap f a -> a Source #

toList :: Ap f a -> [a] Source #

null :: Ap f a -> Bool Source #

length :: Ap f a -> Int Source #

elem :: Eq a => a -> Ap f a -> Bool Source #

maximum :: Ord a => Ap f a -> a Source #

minimum :: Ord a => Ap f a -> a Source #

sum :: Num a => Ap f a -> a Source #

product :: Num a => Ap f a -> a Source #

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 (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Rec1 f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Rec1 f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Rec1 f a -> m Source #

foldr :: (a -> b -> b) -> b -> Rec1 f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Rec1 f a -> b Source #

foldl :: (b -> a -> b) -> b -> Rec1 f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Rec1 f a -> b Source #

foldr1 :: (a -> a -> a) -> Rec1 f a -> a Source #

foldl1 :: (a -> a -> a) -> Rec1 f a -> a Source #

toList :: Rec1 f a -> [a] Source #

null :: Rec1 f a -> Bool Source #

length :: Rec1 f a -> Int Source #

elem :: Eq a => a -> Rec1 f a -> Bool Source #

maximum :: Ord a => Rec1 f a -> a Source #

minimum :: Ord a => Rec1 f a -> a Source #

sum :: Num a => Rec1 f a -> a Source #

product :: Num a => Rec1 f a -> a Source #

Bifoldable p => Foldable (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

fold :: Monoid m => Join p m -> m Source #

foldMap :: Monoid m => (a -> m) -> Join p a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Join p a -> m Source #

foldr :: (a -> b -> b) -> b -> Join p a -> b Source #

foldr' :: (a -> b -> b) -> b -> Join p a -> b Source #

foldl :: (b -> a -> b) -> b -> Join p a -> b Source #

foldl' :: (b -> a -> b) -> b -> Join p a -> b Source #

foldr1 :: (a -> a -> a) -> Join p a -> a Source #

foldl1 :: (a -> a -> a) -> Join p a -> a Source #

toList :: Join p a -> [a] Source #

null :: Join p a -> Bool Source #

length :: Join p a -> Int Source #

elem :: Eq a => a -> Join p a -> Bool Source #

maximum :: Ord a => Join p a -> a Source #

minimum :: Ord a => Join p a -> a Source #

sum :: Num a => Join p a -> a Source #

product :: Num a => Join p a -> a Source #

Foldable f => Foldable (CofreeF f a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

fold :: Monoid m => CofreeF f a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> CofreeF f a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> CofreeF f a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> CofreeF f a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> CofreeF f a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> CofreeF f a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> CofreeF f a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> CofreeF f a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> CofreeF f a a0 -> a0 Source #

toList :: CofreeF f a a0 -> [a0] Source #

null :: CofreeF f a a0 -> Bool Source #

length :: CofreeF f a a0 -> Int Source #

elem :: Eq a0 => a0 -> CofreeF f a a0 -> Bool Source #

maximum :: Ord a0 => CofreeF f a a0 -> a0 Source #

minimum :: Ord a0 => CofreeF f a a0 -> a0 Source #

sum :: Num a0 => CofreeF f a a0 -> a0 Source #

product :: Num a0 => CofreeF f a a0 -> a0 Source #

(Foldable f, Foldable w) => Foldable (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

fold :: Monoid m => CofreeT f w m -> m Source #

foldMap :: Monoid m => (a -> m) -> CofreeT f w a -> m Source #

foldMap' :: Monoid m => (a -> m) -> CofreeT f w a -> m Source #

foldr :: (a -> b -> b) -> b -> CofreeT f w a -> b Source #

foldr' :: (a -> b -> b) -> b -> CofreeT f w a -> b Source #

foldl :: (b -> a -> b) -> b -> CofreeT f w a -> b Source #

foldl' :: (b -> a -> b) -> b -> CofreeT f w a -> b Source #

foldr1 :: (a -> a -> a) -> CofreeT f w a -> a Source #

foldl1 :: (a -> a -> a) -> CofreeT f w a -> a Source #

toList :: CofreeT f w a -> [a] Source #

null :: CofreeT f w a -> Bool Source #

length :: CofreeT f w a -> Int Source #

elem :: Eq a => a -> CofreeT f w a -> Bool Source #

maximum :: Ord a => CofreeT f w a -> a Source #

minimum :: Ord a => CofreeT f w a -> a Source #

sum :: Num a => CofreeT f w a -> a Source #

product :: Num a => CofreeT f w a -> a Source #

Foldable f => Foldable (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fold :: Monoid m => FreeF f a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> FreeF f a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> FreeF f a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> FreeF f a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> FreeF f a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> FreeF f a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> FreeF f a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> FreeF f a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> FreeF f a a0 -> a0 Source #

toList :: FreeF f a a0 -> [a0] Source #

null :: FreeF f a a0 -> Bool Source #

length :: FreeF f a a0 -> Int Source #

elem :: Eq a0 => a0 -> FreeF f a a0 -> Bool Source #

maximum :: Ord a0 => FreeF f a a0 -> a0 Source #

minimum :: Ord a0 => FreeF f a a0 -> a0 Source #

sum :: Num a0 => FreeF f a a0 -> a0 Source #

product :: Num a0 => FreeF f a a0 -> a0 Source #

(Foldable m, Foldable f) => Foldable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fold :: Monoid m0 => FreeT f m m0 -> m0 Source #

foldMap :: Monoid m0 => (a -> m0) -> FreeT f m a -> m0 Source #

foldMap' :: Monoid m0 => (a -> m0) -> FreeT f m a -> m0 Source #

foldr :: (a -> b -> b) -> b -> FreeT f m a -> b Source #

foldr' :: (a -> b -> b) -> b -> FreeT f m a -> b Source #

foldl :: (b -> a -> b) -> b -> FreeT f m a -> b Source #

foldl' :: (b -> a -> b) -> b -> FreeT f m a -> b Source #

foldr1 :: (a -> a -> a) -> FreeT f m a -> a Source #

foldl1 :: (a -> a -> a) -> FreeT f m a -> a Source #

toList :: FreeT f m a -> [a] Source #

null :: FreeT f m a -> Bool Source #

length :: FreeT f m a -> Int Source #

elem :: Eq a => a -> FreeT f m a -> Bool Source #

maximum :: Ord a => FreeT f m a -> a Source #

minimum :: Ord a => FreeT f m a -> a Source #

sum :: Num a => FreeT f m a -> a Source #

product :: Num a => FreeT f m a -> a Source #

Foldable (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

fold :: Monoid m => Tagged s m -> m Source #

foldMap :: Monoid m => (a -> m) -> Tagged s a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Tagged s a -> m Source #

foldr :: (a -> b -> b) -> b -> Tagged s a -> b Source #

foldr' :: (a -> b -> b) -> b -> Tagged s a -> b Source #

foldl :: (b -> a -> b) -> b -> Tagged s a -> b Source #

foldl' :: (b -> a -> b) -> b -> Tagged s a -> b Source #

foldr1 :: (a -> a -> a) -> Tagged s a -> a Source #

foldl1 :: (a -> a -> a) -> Tagged s a -> a Source #

toList :: Tagged s a -> [a] Source #

null :: Tagged s a -> Bool Source #

length :: Tagged s a -> Int Source #

elem :: Eq a => a -> Tagged s a -> Bool Source #

maximum :: Ord a => Tagged s a -> a Source #

minimum :: Ord a => Tagged s a -> a Source #

sum :: Num a => Tagged s a -> a Source #

product :: Num a => Tagged s a -> a Source #

(Foldable f, Foldable g) => Foldable (These1 f g) 
Instance details

Defined in Data.Functor.These

Methods

fold :: Monoid m => These1 f g m -> m Source #

foldMap :: Monoid m => (a -> m) -> These1 f g a -> m Source #

foldMap' :: Monoid m => (a -> m) -> These1 f g a -> m Source #

foldr :: (a -> b -> b) -> b -> These1 f g a -> b Source #

foldr' :: (a -> b -> b) -> b -> These1 f g a -> b Source #

foldl :: (b -> a -> b) -> b -> These1 f g a -> b Source #

foldl' :: (b -> a -> b) -> b -> These1 f g a -> b Source #

foldr1 :: (a -> a -> a) -> These1 f g a -> a Source #

foldl1 :: (a -> a -> a) -> These1 f g a -> a Source #

toList :: These1 f g a -> [a] Source #

null :: These1 f g a -> Bool Source #

length :: These1 f g a -> Int Source #

elem :: Eq a => a -> These1 f g a -> Bool Source #

maximum :: Ord a => These1 f g a -> a Source #

minimum :: Ord a => These1 f g a -> a Source #

sum :: Num a => These1 f g a -> a Source #

product :: Num a => These1 f g a -> a Source #

Foldable f => Foldable (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

fold :: Monoid m => Backwards f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Backwards f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Backwards f a -> m Source #

foldr :: (a -> b -> b) -> b -> Backwards f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Backwards f a -> b Source #

foldl :: (b -> a -> b) -> b -> Backwards f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Backwards f a -> b Source #

foldr1 :: (a -> a -> a) -> Backwards f a -> a Source #

foldl1 :: (a -> a -> a) -> Backwards f a -> a Source #

toList :: Backwards f a -> [a] Source #

null :: Backwards f a -> Bool Source #

length :: Backwards f a -> Int Source #

elem :: Eq a => a -> Backwards f a -> Bool Source #

maximum :: Ord a => Backwards f a -> a Source #

minimum :: Ord a => Backwards f a -> a Source #

sum :: Num a => Backwards f a -> a Source #

product :: Num a => Backwards f a -> a Source #

Foldable f => Foldable (ExceptT e f) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fold :: Monoid m => ExceptT e f m -> m Source #

foldMap :: Monoid m => (a -> m) -> ExceptT e f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ExceptT e f a -> m Source #

foldr :: (a -> b -> b) -> b -> ExceptT e f a -> b Source #

foldr' :: (a -> b -> b) -> b -> ExceptT e f a -> b Source #

foldl :: (b -> a -> b) -> b -> ExceptT e f a -> b Source #

foldl' :: (b -> a -> b) -> b -> ExceptT e f a -> b Source #

foldr1 :: (a -> a -> a) -> ExceptT e f a -> a Source #

foldl1 :: (a -> a -> a) -> ExceptT e f a -> a Source #

toList :: ExceptT e f a -> [a] Source #

null :: ExceptT e f a -> Bool Source #

length :: ExceptT e f a -> Int Source #

elem :: Eq a => a -> ExceptT e f a -> Bool Source #

maximum :: Ord a => ExceptT e f a -> a Source #

minimum :: Ord a => ExceptT e f a -> a Source #

sum :: Num a => ExceptT e f a -> a Source #

product :: Num a => ExceptT e f a -> a Source #

Foldable f => Foldable (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fold :: Monoid m => IdentityT f m -> m Source #

foldMap :: Monoid m => (a -> m) -> IdentityT f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> IdentityT f a -> m Source #

foldr :: (a -> b -> b) -> b -> IdentityT f a -> b Source #

foldr' :: (a -> b -> b) -> b -> IdentityT f a -> b Source #

foldl :: (b -> a -> b) -> b -> IdentityT f a -> b Source #

foldl' :: (b -> a -> b) -> b -> IdentityT f a -> b Source #

foldr1 :: (a -> a -> a) -> IdentityT f a -> a Source #

foldl1 :: (a -> a -> a) -> IdentityT f a -> a Source #

toList :: IdentityT f a -> [a] Source #

null :: IdentityT f a -> Bool Source #

length :: IdentityT f a -> Int Source #

elem :: Eq a => a -> IdentityT f a -> Bool Source #

maximum :: Ord a => IdentityT f a -> a Source #

minimum :: Ord a => IdentityT f a -> a Source #

sum :: Num a => IdentityT f a -> a Source #

product :: Num a => IdentityT f a -> a Source #

Foldable (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

fold :: Monoid m => Constant a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Constant a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Constant a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Constant a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Constant a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Constant a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Constant a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 Source #

toList :: Constant a a0 -> [a0] Source #

null :: Constant a a0 -> Bool Source #

length :: Constant a a0 -> Int Source #

elem :: Eq a0 => a0 -> Constant a a0 -> Bool Source #

maximum :: Ord a0 => Constant a a0 -> a0 Source #

minimum :: Ord a0 => Constant a a0 -> a0 Source #

sum :: Num a0 => Constant a a0 -> a0 Source #

product :: Num a0 => Constant a a0 -> a0 Source #

Foldable f => Foldable (Reverse f)

Fold from right to left.

Instance details

Defined in Data.Functor.Reverse

Methods

fold :: Monoid m => Reverse f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Reverse f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Reverse f a -> m Source #

foldr :: (a -> b -> b) -> b -> Reverse f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Reverse f a -> b Source #

foldl :: (b -> a -> b) -> b -> Reverse f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Reverse f a -> b Source #

foldr1 :: (a -> a -> a) -> Reverse f a -> a Source #

foldl1 :: (a -> a -> a) -> Reverse f a -> a Source #

toList :: Reverse f a -> [a] Source #

null :: Reverse f a -> Bool Source #

length :: Reverse f a -> Int Source #

elem :: Eq a => a -> Reverse f a -> Bool Source #

maximum :: Ord a => Reverse f a -> a Source #

minimum :: Ord a => Reverse f a -> a Source #

sum :: Num a => Reverse f a -> a Source #

product :: Num a => Reverse 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 (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 (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 (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fold :: Monoid m => Compose f g m -> m Source #

foldMap :: Monoid m => (a -> m) -> Compose f g a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m Source #

foldr :: (a -> b -> b) -> b -> Compose f g a -> b Source #

foldr' :: (a -> b -> b) -> b -> Compose f g a -> b Source #

foldl :: (b -> a -> b) -> b -> Compose f g a -> b Source #

foldl' :: (b -> a -> b) -> b -> Compose f g a -> b Source #

foldr1 :: (a -> a -> a) -> Compose f g a -> a Source #

foldl1 :: (a -> a -> a) -> Compose f g a -> a Source #

toList :: Compose f g a -> [a] Source #

null :: Compose f g a -> Bool Source #

length :: Compose f g a -> Int Source #

elem :: Eq a => a -> Compose f g a -> Bool Source #

maximum :: Ord a => Compose f g a -> a Source #

minimum :: Ord a => Compose f g a -> a Source #

sum :: Num a => Compose f g a -> a Source #

product :: Num a => Compose 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 (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 (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

fold :: Monoid m => Clown f a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Clown f a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Clown f a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Clown f a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Clown f a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Clown f a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Clown f a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 Source #

toList :: Clown f a a0 -> [a0] Source #

null :: Clown f a a0 -> Bool Source #

length :: Clown f a a0 -> Int Source #

elem :: Eq a0 => a0 -> Clown f a a0 -> Bool Source #

maximum :: Ord a0 => Clown f a a0 -> a0 Source #

minimum :: Ord a0 => Clown f a a0 -> a0 Source #

sum :: Num a0 => Clown f a a0 -> a0 Source #

product :: Num a0 => Clown f a a0 -> a0 Source #

Bifoldable p => Foldable (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

fold :: Monoid m => Flip p a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Flip p a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Flip p a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Flip p a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Flip p a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Flip p a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Flip p a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 Source #

toList :: Flip p a a0 -> [a0] Source #

null :: Flip p a a0 -> Bool Source #

length :: Flip p a a0 -> Int Source #

elem :: Eq a0 => a0 -> Flip p a a0 -> Bool Source #

maximum :: Ord a0 => Flip p a a0 -> a0 Source #

minimum :: Ord a0 => Flip p a a0 -> a0 Source #

sum :: Num a0 => Flip p a a0 -> a0 Source #

product :: Num a0 => Flip p a a0 -> a0 Source #

Foldable g => Foldable (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

fold :: Monoid m => Joker g a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Joker g a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Joker g a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Joker g a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Joker g a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Joker g a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Joker g a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 Source #

toList :: Joker g a a0 -> [a0] Source #

null :: Joker g a a0 -> Bool Source #

length :: Joker g a a0 -> Int Source #

elem :: Eq a0 => a0 -> Joker g a a0 -> Bool Source #

maximum :: Ord a0 => Joker g a a0 -> a0 Source #

minimum :: Ord a0 => Joker g a a0 -> a0 Source #

sum :: Num a0 => Joker g a a0 -> a0 Source #

product :: Num a0 => Joker g a a0 -> a0 Source #

Bifoldable p => Foldable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

fold :: Monoid m => WrappedBifunctor p a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 Source #

toList :: WrappedBifunctor p a a0 -> [a0] Source #

null :: WrappedBifunctor p a a0 -> Bool Source #

length :: WrappedBifunctor p a a0 -> Int Source #

elem :: Eq a0 => a0 -> WrappedBifunctor p a a0 -> Bool Source #

maximum :: Ord a0 => WrappedBifunctor p a a0 -> a0 Source #

minimum :: Ord a0 => WrappedBifunctor p a a0 -> a0 Source #

sum :: Num a0 => WrappedBifunctor p a a0 -> a0 Source #

product :: Num a0 => WrappedBifunctor p a a0 -> a0 Source #

(Foldable (f a), Foldable (g a)) => Foldable (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

fold :: Monoid m => Product f g a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Product f g a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Product f g a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Product f g a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Product f g a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Product f g a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Product f g a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 Source #

toList :: Product f g a a0 -> [a0] Source #

null :: Product f g a a0 -> Bool Source #

length :: Product f g a a0 -> Int Source #

elem :: Eq a0 => a0 -> Product f g a a0 -> Bool Source #

maximum :: Ord a0 => Product f g a a0 -> a0 Source #

minimum :: Ord a0 => Product f g a a0 -> a0 Source #

sum :: Num a0 => Product f g a a0 -> a0 Source #

product :: Num a0 => Product f g a a0 -> a0 Source #

(Foldable (f a), Foldable (g a)) => Foldable (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

fold :: Monoid m => Sum f g a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 Source #

toList :: Sum f g a a0 -> [a0] Source #

null :: Sum f g a a0 -> Bool Source #

length :: Sum f g a a0 -> Int Source #

elem :: Eq a0 => a0 -> Sum f g a a0 -> Bool Source #

maximum :: Ord a0 => Sum f g a a0 -> a0 Source #

minimum :: Ord a0 => Sum f g a a0 -> a0 Source #

sum :: Num a0 => Sum f g a a0 -> a0 Source #

product :: Num a0 => Sum f g a a0 -> a0 Source #

(Foldable f, Bifoldable p) => Foldable (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

fold :: Monoid m => Tannen f p a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 Source #

toList :: Tannen f p a a0 -> [a0] Source #

null :: Tannen f p a a0 -> Bool Source #

length :: Tannen f p a a0 -> Int Source #

elem :: Eq a0 => a0 -> Tannen f p a a0 -> Bool Source #

maximum :: Ord a0 => Tannen f p a a0 -> a0 Source #

minimum :: Ord a0 => Tannen f p a a0 -> a0 Source #

sum :: Num a0 => Tannen f p a a0 -> a0 Source #

product :: Num a0 => Tannen f p a a0 -> a0 Source #

(Bifoldable p, Foldable g) => Foldable (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

fold :: Monoid m => Biff p f g a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 Source #

toList :: Biff p f g a a0 -> [a0] Source #

null :: Biff p f g a a0 -> Bool Source #

length :: Biff p f g a a0 -> Int Source #

elem :: Eq a0 => a0 -> Biff p f g a a0 -> Bool Source #

maximum :: Ord a0 => Biff p f g a a0 -> a0 Source #

minimum :: Ord a0 => Biff p f g a a0 -> a0 Source #

sum :: Num a0 => Biff p f g a a0 -> a0 Source #

product :: Num a0 => Biff p f g a a0 -> a0 Source #

class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where Source #

Functors representing data structures that can be transformed to structures of the same shape by performing an Applicative (or, therefore, Monad) action on each element from left to right.

A more detailed description of what same shape means, the various methods, how traversals are constructed, and example advanced use-cases can be found in the Overview section of Data.Traversable.

For the class laws see the Laws section of Data.Traversable.

Minimal complete definition

traverse | sequenceA

Methods

traverse :: Applicative f => (a -> f b) -> t a -> f (t b) 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_.

Examples

Expand

Basic usage:

In the first two examples we show each evaluated action mapping to the output structure.

>>> traverse Just [1,2,3,4]
Just [1,2,3,4]
>>> traverse id [Right 1, Right 2, Right 3, Right 4]
Right [1,2,3,4]

In the next examples, we show that Nothing and Left values short circuit the created structure.

>>> traverse (const Nothing) [1,2,3,4]
Nothing
>>> traverse (\x -> if odd x then Just x else Nothing)  [1,2,3,4]
Nothing
>>> traverse id [Right 1, Right 2, Right 3, Right 4, Left 0]
Left 0

sequenceA :: Applicative f => t (f a) -> f (t a) Source #

Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

Examples

Expand

Basic usage:

For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.

>>> sequenceA [Just 1, Just 2, Just 3]
Just [1,2,3]
>>> sequenceA [Right 1, Right 2, Right 3]
Right [1,2,3]

The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.

>>> sequenceA [Just 1, Just 2, Just 3, Nothing]
Nothing
>>> sequenceA [Right 1, Right 2, Right 3, Left 4]
Left 4

mapM :: Monad m => (a -> m b) -> t a -> m (t b) 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_.

Examples

Expand

mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.

sequence :: Monad m => t (m a) -> m (t a) 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_.

Examples

Expand

Basic usage:

The first two examples are instances where the input and and output of sequence are isomorphic.

>>> sequence $ Right [1,2,3,4]
[Right 1,Right 2,Right 3,Right 4]
>>> sequence $ [Right 1,Right 2,Right 3,Right 4]
Right [1,2,3,4]

The following examples demonstrate short circuit behavior for sequence.

>>> sequence $ Left [1,2,3,4]
Left [1,2,3,4]
>>> sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4]
Left 0

Instances

Instances details
Traversable KeyMap 
Instance details

Defined in Data.Aeson.KeyMap

Methods

traverse :: Applicative f => (a -> f b) -> KeyMap a -> f (KeyMap b) Source #

sequenceA :: Applicative f => KeyMap (f a) -> f (KeyMap a) Source #

mapM :: Monad m => (a -> m b) -> KeyMap a -> m (KeyMap b) Source #

sequence :: Monad m => KeyMap (m a) -> m (KeyMap a) Source #

Traversable IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

traverse :: Applicative f => (a -> f b) -> IResult a -> f (IResult b) Source #

sequenceA :: Applicative f => IResult (f a) -> f (IResult a) Source #

mapM :: Monad m => (a -> m b) -> IResult a -> m (IResult b) Source #

sequence :: Monad m => IResult (m a) -> m (IResult a) Source #

Traversable Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Result a -> f (Result b) Source #

sequenceA :: Applicative f => Result (f a) -> f (Result a) Source #

mapM :: Monad m => (a -> m b) -> Result a -> m (Result b) Source #

sequence :: Monad m => Result (m a) -> m (Result a) Source #

Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) Source #

sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) Source #

mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) Source #

sequence :: Monad m => ZipList (m a) -> m (ZipList a) Source #

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) Source #

sequenceA :: Applicative f => Identity (f a) -> f (Identity a) Source #

mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) Source #

sequence :: Monad m => Identity (m a) -> m (Identity a) Source #

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) Source #

sequenceA :: Applicative f => First (f a) -> f (First a) Source #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) Source #

sequence :: Monad m => First (m a) -> m (First a) Source #

Traversable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) Source #

sequenceA :: Applicative f => Last (f a) -> f (Last a) Source #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) Source #

sequence :: Monad m => Last (m a) -> m (Last a) Source #

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Down a -> f (Down b) Source #

sequenceA :: Applicative f => Down (f a) -> f (Down a) Source #

mapM :: Monad m => (a -> m b) -> Down a -> m (Down b) Source #

sequence :: Monad m => Down (m a) -> m (Down a) Source #

Traversable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) Source #

sequenceA :: Applicative f => First (f a) -> f (First a) Source #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) Source #

sequence :: Monad m => First (m a) -> m (First a) Source #

Traversable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) Source #

sequenceA :: Applicative f => Last (f a) -> f (Last a) Source #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) Source #

sequence :: Monad m => Last (m a) -> m (Last a) Source #

Traversable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) Source #

sequenceA :: Applicative f => Max (f a) -> f (Max a) Source #

mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) Source #

sequence :: Monad m => Max (m a) -> m (Max a) Source #

Traversable Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) Source #

sequenceA :: Applicative f => Min (f a) -> f (Min a) Source #

mapM :: Monad m => (a -> m b) -> Min a -> m (Min b) Source #

sequence :: Monad m => Min (m a) -> m (Min a) Source #

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) Source #

sequenceA :: Applicative f => Dual (f a) -> f (Dual a) Source #

mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) Source #

sequence :: Monad m => Dual (m a) -> m (Dual a) Source #

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) Source #

sequenceA :: Applicative f => Product (f a) -> f (Product a) Source #

mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) Source #

sequence :: Monad m => Product (m a) -> m (Product a) Source #

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) Source #

sequenceA :: Applicative f => Sum (f a) -> f (Sum a) Source #

mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) Source #

sequence :: Monad m => Sum (m a) -> m (Sum a) Source #

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) Source #

sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) Source #

mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) Source #

sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) Source #

Traversable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Par1 a -> f (Par1 b) Source #

sequenceA :: Applicative f => Par1 (f a) -> f (Par1 a) Source #

mapM :: Monad m => (a -> m b) -> Par1 a -> m (Par1 b) Source #

sequence :: Monad m => Par1 (m a) -> m (Par1 a) Source #

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> IntMap a -> f (IntMap b) Source #

sequenceA :: Applicative f => IntMap (f a) -> f (IntMap a) Source #

mapM :: Monad m => (a -> m b) -> IntMap a -> m (IntMap b) Source #

sequence :: Monad m => IntMap (m a) -> m (IntMap a) Source #

Traversable Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Digit a -> f (Digit b) Source #

sequenceA :: Applicative f => Digit (f a) -> f (Digit a) Source #

mapM :: Monad m => (a -> m b) -> Digit a -> m (Digit b) Source #

sequence :: Monad m => Digit (m a) -> m (Digit a) Source #

Traversable Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Elem a -> f (Elem b) Source #

sequenceA :: Applicative f => Elem (f a) -> f (Elem a) Source #

mapM :: Monad m => (a -> m b) -> Elem a -> m (Elem b) Source #

sequence :: Monad m => Elem (m a) -> m (Elem a) Source #

Traversable FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> FingerTree a -> f (FingerTree b) Source #

sequenceA :: Applicative f => FingerTree (f a) -> f (FingerTree a) Source #

mapM :: Monad m => (a -> m b) -> FingerTree a -> m (FingerTree b) Source #

sequence :: Monad m => FingerTree (m a) -> m (FingerTree a) Source #

Traversable Node 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Node a -> f (Node b) Source #

sequenceA :: Applicative f => Node (f a) -> f (Node a) Source #

mapM :: Monad m => (a -> m b) -> Node a -> m (Node b) Source #

sequence :: Monad m => Node (m a) -> m (Node a) Source #

Traversable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Seq a -> f (Seq b) Source #

sequenceA :: Applicative f => Seq (f a) -> f (Seq a) Source #

mapM :: Monad m => (a -> m b) -> Seq a -> m (Seq b) Source #

sequence :: Monad m => Seq (m a) -> m (Seq a) Source #

Traversable ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> ViewL a -> f (ViewL b) Source #

sequenceA :: Applicative f => ViewL (f a) -> f (ViewL a) Source #

mapM :: Monad m => (a -> m b) -> ViewL a -> m (ViewL b) Source #

sequence :: Monad m => ViewL (m a) -> m (ViewL a) Source #

Traversable ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> ViewR a -> f (ViewR b) Source #

sequenceA :: Applicative f => ViewR (f a) -> f (ViewR a) Source #

mapM :: Monad m => (a -> m b) -> ViewR a -> m (ViewR b) Source #

sequence :: Monad m => ViewR (m a) -> m (ViewR a) Source #

Traversable Tree 
Instance details

Defined in Data.Tree

Methods

traverse :: Applicative f => (a -> f b) -> Tree a -> f (Tree b) Source #

sequenceA :: Applicative f => Tree (f a) -> f (Tree a) Source #

mapM :: Monad m => (a -> m b) -> Tree a -> m (Tree b) Source #

sequence :: Monad m => Tree (m a) -> m (Tree a) Source #

Traversable DList 
Instance details

Defined in Data.DList.Internal

Methods

traverse :: Applicative f => (a -> f b) -> DList a -> f (DList b) Source #

sequenceA :: Applicative f => DList (f a) -> f (DList a) Source #

mapM :: Monad m => (a -> m b) -> DList a -> m (DList b) Source #

sequence :: Monad m => DList (m a) -> m (DList a) Source #

Traversable GenClosure 
Instance details

Defined in GHC.Exts.Heap.Closures

Methods

traverse :: Applicative f => (a -> f b) -> GenClosure a -> f (GenClosure b) Source #

sequenceA :: Applicative f => GenClosure (f a) -> f (GenClosure a) Source #

mapM :: Monad m => (a -> m b) -> GenClosure a -> m (GenClosure b) Source #

sequence :: Monad m => GenClosure (m a) -> m (GenClosure a) Source #

Traversable Array 
Instance details

Defined in Data.Primitive.Array

Methods

traverse :: Applicative f => (a -> f b) -> Array a -> f (Array b) Source #

sequenceA :: Applicative f => Array (f a) -> f (Array a) Source #

mapM :: Monad m => (a -> m b) -> Array a -> m (Array b) Source #

sequence :: Monad m => Array (m a) -> m (Array a) Source #

Traversable SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

traverse :: Applicative f => (a -> f b) -> SmallArray a -> f (SmallArray b) Source #

sequenceA :: Applicative f => SmallArray (f a) -> f (SmallArray a) Source #

mapM :: Monad m => (a -> m b) -> SmallArray a -> m (SmallArray b) Source #

sequence :: Monad m => SmallArray (m a) -> m (SmallArray a) Source #

Traversable Maybe 
Instance details

Defined in Data.Strict.Maybe

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) Source #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) Source #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) Source #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) Source #

Traversable Vector 
Instance details

Defined in Data.Vector

Methods

traverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) Source #

sequenceA :: Applicative f => Vector (f a) -> f (Vector a) Source #

mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) Source #

sequence :: Monad m => Vector (m a) -> m (Vector a) Source #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) Source #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) Source #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) Source #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) Source #

Traversable Solo

Since: base-4.15

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Solo a -> f (Solo b) Source #

sequenceA :: Applicative f => Solo (f a) -> f (Solo a) Source #

mapM :: Monad m => (a -> m b) -> Solo a -> m (Solo b) Source #

sequence :: Monad m => Solo (m a) -> m (Solo a) Source #

Traversable List

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 (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 (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Proxy a -> f (Proxy b) Source #

sequenceA :: Applicative f => Proxy (f a) -> f (Proxy a) Source #

mapM :: Monad m => (a -> m b) -> Proxy a -> m (Proxy b) Source #

sequence :: Monad m => Proxy (m a) -> m (Proxy a) Source #

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 #

Ix i => Traversable (Array i)

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Array i a -> f (Array i b) Source #

sequenceA :: Applicative f => Array i (f a) -> f (Array i a) Source #

mapM :: Monad m => (a -> m b) -> Array i a -> m (Array i b) Source #

sequence :: Monad m => Array i (m a) -> m (Array i a) Source #

Traversable (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> U1 a -> f (U1 b) Source #

sequenceA :: Applicative f => U1 (f a) -> f (U1 a) Source #

mapM :: Monad m => (a -> m b) -> U1 a -> m (U1 b) Source #

sequence :: Monad m => U1 (m a) -> m (U1 a) Source #

Traversable (UAddr :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UAddr a -> f (UAddr b) Source #

sequenceA :: Applicative f => UAddr (f a) -> f (UAddr a) Source #

mapM :: Monad m => (a -> m b) -> UAddr a -> m (UAddr b) Source #

sequence :: Monad m => UAddr (m a) -> m (UAddr a) Source #

Traversable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) Source #

sequenceA :: Applicative f => UChar (f a) -> f (UChar a) Source #

mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) Source #

sequence :: Monad m => UChar (m a) -> m (UChar a) Source #

Traversable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) Source #

sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) Source #

mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) Source #

sequence :: Monad m => UDouble (m a) -> m (UDouble a) Source #

Traversable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) Source #

sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) Source #

mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) Source #

sequence :: Monad m => UFloat (m a) -> m (UFloat a) Source #

Traversable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) Source #

sequenceA :: Applicative f => UInt (f a) -> f (UInt a) Source #

mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) Source #

sequence :: Monad m => UInt (m a) -> m (UInt a) Source #

Traversable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) Source #

sequenceA :: Applicative f => UWord (f a) -> f (UWord a) Source #

mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) Source #

sequence :: Monad m => UWord (m a) -> m (UWord a) Source #

Traversable (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> V1 a -> f (V1 b) Source #

sequenceA :: Applicative f => V1 (f a) -> f (V1 a) Source #

mapM :: Monad m => (a -> m b) -> V1 a -> m (V1 b) Source #

sequence :: Monad m => V1 (m a) -> m (V1 a) Source #

Traversable (Map k)

Traverses in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Map k a -> f (Map k b) Source #

sequenceA :: Applicative f => Map k (f a) -> f (Map k a) Source #

mapM :: Monad m => (a -> m b) -> Map k a -> m (Map k b) Source #

sequence :: Monad m => Map k (m a) -> m (Map k a) Source #

Traversable f => Traversable (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Cofree f a -> f0 (Cofree f b) Source #

sequenceA :: Applicative f0 => Cofree f (f0 a) -> f0 (Cofree f a) Source #

mapM :: Monad m => (a -> m b) -> Cofree f a -> m (Cofree f b) Source #

sequence :: Monad m => Cofree f (m a) -> m (Cofree f a) Source #

Traversable f => Traversable (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Free f a -> f0 (Free f b) Source #

sequenceA :: Applicative f0 => Free f (f0 a) -> f0 (Free f a) Source #

mapM :: Monad m => (a -> m b) -> Free f a -> m (Free f b) Source #

sequence :: Monad m => Free f (m a) -> m (Free f a) Source #

Traversable (ListF a) 
Instance details

Defined in Data.Functor.Base

Methods

traverse :: Applicative f => (a0 -> f b) -> ListF a a0 -> f (ListF a b) Source #

sequenceA :: Applicative f => ListF a (f a0) -> f (ListF a a0) Source #

mapM :: Monad m => (a0 -> m b) -> ListF a a0 -> m (ListF a b) Source #

sequence :: Monad m => ListF a (m a0) -> m (ListF a a0) Source #

Traversable (NonEmptyF a) 
Instance details

Defined in Data.Functor.Base

Methods

traverse :: Applicative f => (a0 -> f b) -> NonEmptyF a a0 -> f (NonEmptyF a b) Source #

sequenceA :: Applicative f => NonEmptyF a (f a0) -> f (NonEmptyF a a0) Source #

mapM :: Monad m => (a0 -> m b) -> NonEmptyF a a0 -> m (NonEmptyF a b) Source #

sequence :: Monad m => NonEmptyF a (m a0) -> m (NonEmptyF a a0) Source #

Traversable (TreeF a) 
Instance details

Defined in Data.Functor.Base

Methods

traverse :: Applicative f => (a0 -> f b) -> TreeF a a0 -> f (TreeF a b) Source #

sequenceA :: Applicative f => TreeF a (f a0) -> f (TreeF a a0) Source #

mapM :: Monad m => (a0 -> m b) -> TreeF a a0 -> m (TreeF a b) Source #

sequence :: Monad m => TreeF a (m a0) -> m (TreeF a a0) Source #

Traversable (Either e) 
Instance details

Defined in Data.Strict.Either

Methods

traverse :: Applicative f => (a -> f b) -> Either e a -> f (Either e b) Source #

sequenceA :: Applicative f => Either e (f a) -> f (Either e a) Source #

mapM :: Monad m => (a -> m b) -> Either e a -> m (Either e b) Source #

sequence :: Monad m => Either e (m a) -> m (Either e a) Source #

Traversable (These a) 
Instance details

Defined in Data.Strict.These

Methods

traverse :: Applicative f => (a0 -> f b) -> These a a0 -> f (These a b) Source #

sequenceA :: Applicative f => These a (f a0) -> f (These a a0) Source #

mapM :: Monad m => (a0 -> m b) -> These a a0 -> m (These a b) Source #

sequence :: Monad m => These a (m a0) -> m (These a a0) Source #

Traversable (Pair e) 
Instance details

Defined in Data.Strict.Tuple

Methods

traverse :: Applicative f => (a -> f b) -> Pair e a -> f (Pair e b) Source #

sequenceA :: Applicative f => Pair e (f a) -> f (Pair e a) Source #

mapM :: Monad m => (a -> m b) -> Pair e a -> m (Pair e b) Source #

sequence :: Monad m => Pair e (m a) -> m (Pair e a) Source #

Traversable (These a) 
Instance details

Defined in Data.These

Methods

traverse :: Applicative f => (a0 -> f b) -> These a a0 -> f (These a b) Source #

sequenceA :: Applicative f => These a (f a0) -> f (These a a0) Source #

mapM :: Monad m => (a0 -> m b) -> These a a0 -> m (These a b) Source #

sequence :: Monad m => These a (m a0) -> m (These a a0) Source #

Traversable f => Traversable (Lift f) 
Instance details

Defined in Control.Applicative.Lift

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Lift f a -> f0 (Lift f b) Source #

sequenceA :: Applicative f0 => Lift f (f0 a) -> f0 (Lift f a) Source #

mapM :: Monad m => (a -> m b) -> Lift f a -> m (Lift f b) Source #

sequence :: Monad m => Lift f (m a) -> m (Lift f a) Source #

Traversable f => Traversable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

traverse :: Applicative f0 => (a -> f0 b) -> MaybeT f a -> f0 (MaybeT f b) Source #

sequenceA :: Applicative f0 => MaybeT f (f0 a) -> f0 (MaybeT f a) Source #

mapM :: Monad m => (a -> m b) -> MaybeT f a -> m (MaybeT f b) Source #

sequence :: Monad m => MaybeT f (m a) -> m (MaybeT f a) Source #

Traversable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> HashMap k a -> f (HashMap k b) Source #

sequenceA :: Applicative f => HashMap k (f a) -> f (HashMap k a) Source #

mapM :: Monad m => (a -> m b) -> HashMap k a -> m (HashMap k b) Source #

sequence :: Monad m => HashMap k (m a) -> m (HashMap k a) Source #

Traversable ((,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> (a, a0) -> f (a, b) Source #

sequenceA :: Applicative f => (a, f a0) -> f (a, a0) Source #

mapM :: Monad m => (a0 -> m b) -> (a, a0) -> m (a, b) Source #

sequence :: Monad m => (a, m a0) -> m (a, a0) Source #

Traversable (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 (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 #

Bitraversable p => Traversable (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

traverse :: Applicative f => (a -> f b) -> Join p a -> f (Join p b) Source #

sequenceA :: Applicative f => Join p (f a) -> f (Join p a) Source #

mapM :: Monad m => (a -> m b) -> Join p a -> m (Join p b) Source #

sequence :: Monad m => Join p (m a) -> m (Join p a) Source #

Traversable f => Traversable (CofreeF f a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> CofreeF f a a0 -> f0 (CofreeF f a b) Source #

sequenceA :: Applicative f0 => CofreeF f a (f0 a0) -> f0 (CofreeF f a a0) Source #

mapM :: Monad m => (a0 -> m b) -> CofreeF f a a0 -> m (CofreeF f a b) Source #

sequence :: Monad m => CofreeF f a (m a0) -> m (CofreeF f a a0) Source #

(Traversable f, Traversable w) => Traversable (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

traverse :: Applicative f0 => (a -> f0 b) -> CofreeT f w a -> f0 (CofreeT f w b) Source #

sequenceA :: Applicative f0 => CofreeT f w (f0 a) -> f0 (CofreeT f w a) Source #

mapM :: Monad m => (a -> m b) -> CofreeT f w a -> m (CofreeT f w b) Source #

sequence :: Monad m => CofreeT f w (m a) -> m (CofreeT f w a) Source #

Traversable f => Traversable (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> FreeF f a a0 -> f0 (FreeF f a b) Source #

sequenceA :: Applicative f0 => FreeF f a (f0 a0) -> f0 (FreeF f a a0) Source #

mapM :: Monad m => (a0 -> m b) -> FreeF f a a0 -> m (FreeF f a b) Source #

sequence :: Monad m => FreeF f a (m a0) -> m (FreeF f a a0) Source #

(Monad m, Traversable m, Traversable f) => Traversable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

traverse :: Applicative f0 => (a -> f0 b) -> FreeT f m a -> f0 (FreeT f m b) Source #

sequenceA :: Applicative f0 => FreeT f m (f0 a) -> f0 (FreeT f m a) Source #

mapM :: Monad m0 => (a -> m0 b) -> FreeT f m a -> m0 (FreeT f m b) Source #

sequence :: Monad m0 => FreeT f m (m0 a) -> m0 (FreeT f m a) Source #

Traversable (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

traverse :: Applicative f => (a -> f b) -> Tagged s a -> f (Tagged s b) Source #

sequenceA :: Applicative f => Tagged s (f a) -> f (Tagged s a) Source #

mapM :: Monad m => (a -> m b) -> Tagged s a -> m (Tagged s b) Source #

sequence :: Monad m => Tagged s (m a) -> m (Tagged s a) Source #

(Traversable f, Traversable g) => Traversable (These1 f g) 
Instance details

Defined in Data.Functor.These

Methods

traverse :: Applicative f0 => (a -> f0 b) -> These1 f g a -> f0 (These1 f g b) Source #

sequenceA :: Applicative f0 => These1 f g (f0 a) -> f0 (These1 f g a) Source #

mapM :: Monad m => (a -> m b) -> These1 f g a -> m (These1 f g b) Source #

sequence :: Monad m => These1 f g (m a) -> m (These1 f g a) Source #

Traversable f => Traversable (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Backwards f a -> f0 (Backwards f b) Source #

sequenceA :: Applicative f0 => Backwards f (f0 a) -> f0 (Backwards f a) Source #

mapM :: Monad m => (a -> m b) -> Backwards f a -> m (Backwards f b) Source #

sequence :: Monad m => Backwards f (m a) -> m (Backwards 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 (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

traverse :: Applicative f0 => (a -> f0 b) -> IdentityT f a -> f0 (IdentityT f b) Source #

sequenceA :: Applicative f0 => IdentityT f (f0 a) -> f0 (IdentityT f a) Source #

mapM :: Monad m => (a -> m b) -> IdentityT f a -> m (IdentityT f b) Source #

sequence :: Monad m => IdentityT f (m a) -> m (IdentityT f a) Source #

Traversable (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

traverse :: Applicative f => (a0 -> f b) -> Constant a a0 -> f (Constant a b) Source #

sequenceA :: Applicative f => Constant a (f a0) -> f (Constant a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Constant a a0 -> m (Constant a b) Source #

sequence :: Monad m => Constant a (m a0) -> m (Constant a a0) Source #

Traversable f => Traversable (Reverse f)

Traverse from right to left.

Instance details

Defined in Data.Functor.Reverse

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Reverse f a -> f0 (Reverse f b) Source #

sequenceA :: Applicative f0 => Reverse f (f0 a) -> f0 (Reverse f a) Source #

mapM :: Monad m => (a -> m b) -> Reverse f a -> m (Reverse f b) Source #

sequence :: Monad m => Reverse f (m a) -> m (Reverse 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 (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 (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 (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 #

(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 (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 (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Clown f a a0 -> f0 (Clown f a b) Source #

sequenceA :: Applicative f0 => Clown f a (f0 a0) -> f0 (Clown f a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Clown f a a0 -> m (Clown f a b) Source #

sequence :: Monad m => Clown f a (m a0) -> m (Clown f a a0) Source #

Bitraversable p => Traversable (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

traverse :: Applicative f => (a0 -> f b) -> Flip p a a0 -> f (Flip p a b) Source #

sequenceA :: Applicative f => Flip p a (f a0) -> f (Flip p a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Flip p a a0 -> m (Flip p a b) Source #

sequence :: Monad m => Flip p a (m a0) -> m (Flip p a a0) Source #

Traversable g => Traversable (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

traverse :: Applicative f => (a0 -> f b) -> Joker g a a0 -> f (Joker g a b) Source #

sequenceA :: Applicative f => Joker g a (f a0) -> f (Joker g a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Joker g a a0 -> m (Joker g a b) Source #

sequence :: Monad m => Joker g a (m a0) -> m (Joker g a a0) Source #

Bitraversable p => Traversable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

traverse :: Applicative f => (a0 -> f b) -> WrappedBifunctor p a a0 -> f (WrappedBifunctor p a b) Source #

sequenceA :: Applicative f => WrappedBifunctor p a (f a0) -> f (WrappedBifunctor p a a0) Source #

mapM :: Monad m => (a0 -> m b) -> WrappedBifunctor p a a0 -> m (WrappedBifunctor p a b) Source #

sequence :: Monad m => WrappedBifunctor p a (m a0) -> m (WrappedBifunctor p a a0) Source #

(Traversable (f a), Traversable (g a)) => Traversable (Product f g a) 
Instance details

Defined in Data.Bifunctor.Product

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Product f g a a0 -> f0 (Product f g a b) Source #

sequenceA :: Applicative f0 => Product f g a (f0 a0) -> f0 (Product f g a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Product f g a a0 -> m (Product f g a b) Source #

sequence :: Monad m => Product f g a (m a0) -> m (Product f g a a0) Source #

(Traversable (f a), Traversable (g a)) => Traversable (Sum f g a) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Sum f g a a0 -> f0 (Sum f g a b) Source #

sequenceA :: Applicative f0 => Sum f g a (f0 a0) -> f0 (Sum f g a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Sum f g a a0 -> m (Sum f g a b) Source #

sequence :: Monad m => Sum f g a (m a0) -> m (Sum f g a a0) Source #

(Traversable f, Bitraversable p) => Traversable (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Tannen f p a a0 -> f0 (Tannen f p a b) Source #

sequenceA :: Applicative f0 => Tannen f p a (f0 a0) -> f0 (Tannen f p a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Tannen f p a a0 -> m (Tannen f p a b) Source #

sequence :: Monad m => Tannen f p a (m a0) -> m (Tannen f p a a0) Source #

(Bitraversable p, Traversable g) => Traversable (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Biff p f g a a0 -> f0 (Biff p f g a b) Source #

sequenceA :: Applicative f0 => Biff p f g a (f0 a0) -> f0 (Biff p f g a a0) Source #

mapM :: Monad m => (a0 -> m b) -> Biff p f g a a0 -> m (Biff p f g a b) Source #

sequence :: Monad m => Biff p f g a (m a0) -> m (Biff p f g a a0) Source #

class Generic a Source #

Representable types of kind *. This class is derivable in GHC with the DeriveGeneric flag on.

A Generic instance must satisfy the following laws:

from . toid
to . fromid

Minimal complete definition

from, to

Instances

Instances details
Generic Value 
Instance details

Defined in Data.Aeson.Types.Internal

Associated Types

type Rep Value :: Type -> Type Source #

Methods

from :: Value -> Rep Value x Source #

to :: Rep Value x -> Value Source #

Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type Source #

Methods

from :: All -> Rep All x Source #

to :: Rep All x -> All Source #

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type Source #

Methods

from :: Any -> Rep Any x Source #

to :: Rep Any x -> Any Source #

Generic Void 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Void :: Type -> Type Source #

Methods

from :: Void -> Rep Void x Source #

to :: Rep Void x -> Void Source #

Generic Fingerprint 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fingerprint :: Type -> Type Source #

Generic Associativity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Associativity :: Type -> Type Source #

Generic DecidedStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep DecidedStrictness :: Type -> Type Source #

Generic Fixity 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Fixity :: Type -> Type Source #

Generic SourceStrictness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceStrictness :: Type -> Type Source #

Generic SourceUnpackedness 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SourceUnpackedness :: Type -> Type Source #

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type Source #

Generic SrcLoc 
Instance details

Defined in GHC.Generics

Associated Types

type Rep SrcLoc :: Type -> Type Source #

Generic GCDetails 
Instance details

Defined in GHC.Stats

Associated Types

type Rep GCDetails :: Type -> Type Source #

Generic RTSStats 
Instance details

Defined in GHC.Stats

Associated Types

type Rep RTSStats :: Type -> Type Source #

Generic GeneralCategory 
Instance details

Defined in GHC.Generics

Associated Types

type Rep GeneralCategory :: Type -> Type Source #

Generic OsChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Associated Types

type Rep OsChar :: Type -> Type Source #

Generic OsString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Associated Types

type Rep OsString :: Type -> Type Source #

Generic PosixChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Associated Types

type Rep PosixChar :: Type -> Type Source #

Generic PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Associated Types

type Rep PosixString :: Type -> Type Source #

Generic WindowsChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Associated Types

type Rep WindowsChar :: Type -> Type Source #

Generic WindowsString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Associated Types

type Rep WindowsString :: Type -> Type Source #

Generic ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Associated Types

type Rep ForeignSrcLang :: Type -> Type Source #

Generic Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Associated Types

type Rep Extension :: Type -> Type Source #

Generic ClosureType 
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Associated Types

type Rep ClosureType :: Type -> Type Source #

Generic PrimType 
Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep PrimType :: Type -> Type Source #

Generic TsoFlags 
Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep TsoFlags :: Type -> Type Source #

Generic WhatNext 
Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep WhatNext :: Type -> Type Source #

Generic WhyBlocked 
Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep WhyBlocked :: Type -> Type Source #

Generic StgInfoTable 
Instance details

Defined in GHC.Exts.Heap.InfoTable.Types

Associated Types

type Rep StgInfoTable :: Type -> Type Source #

Generic CostCentre 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Associated Types

type Rep CostCentre :: Type -> Type Source #

Generic CostCentreStack 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Associated Types

type Rep CostCentreStack :: Type -> Type Source #

Generic IndexTable 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Associated Types

type Rep IndexTable :: Type -> Type Source #

Generic StgTSOProfInfo 
Instance details

Defined in GHC.Exts.Heap.ProfInfo.Types

Associated Types

type Rep StgTSOProfInfo :: Type -> Type Source #

Generic Ordering 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type Source #

Generic Half 
Instance details

Defined in Numeric.Half.Internal

Associated Types

type Rep Half :: Type -> Type Source #

Methods

from :: Half -> Rep Half x Source #

to :: Rep Half x -> Half Source #

Generic URI 
Instance details

Defined in Network.URI

Associated Types

type Rep URI :: Type -> Type Source #

Methods

from :: URI -> Rep URI x Source #

to :: Rep URI x -> URI Source #

Generic URIAuth 
Instance details

Defined in Network.URI

Associated Types

type Rep URIAuth :: Type -> Type Source #

Methods

from :: URIAuth -> Rep URIAuth x Source #

to :: Rep URIAuth x -> URIAuth Source #

Generic Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Mode :: Type -> Type Source #

Methods

from :: Mode -> Rep Mode x Source #

to :: Rep Mode x -> Mode Source #

Generic Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep Style :: Type -> Type Source #

Methods

from :: Style -> Rep Style x Source #

to :: Rep Style x -> Style Source #

Generic TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep TextDetails :: Type -> Type Source #

Generic Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Associated Types

type Rep Doc :: Type -> Type Source #

Methods

from :: Doc -> Rep Doc x Source #

to :: Rep Doc x -> Doc Source #

Generic Undefined 
Instance details

Defined in Relude.Debug

Associated Types

type Rep Undefined :: Type -> Type Source #

Generic Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

Associated Types

type Rep Time :: Type -> Type Source #

Methods

from :: Time -> Rep Time x Source #

to :: Rep Time x -> Time Source #

Generic AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnLookup :: Type -> Type Source #

Generic AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep AnnTarget :: Type -> Type Source #

Generic Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bang :: Type -> Type Source #

Methods

from :: Bang -> Rep Bang x Source #

to :: Rep Bang x -> Bang Source #

Generic Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Body :: Type -> Type Source #

Methods

from :: Body -> Rep Body x Source #

to :: Rep Body x -> Body Source #

Generic Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Bytes :: Type -> Type Source #

Methods

from :: Bytes -> Rep Bytes x Source #

to :: Rep Bytes x -> Bytes Source #

Generic Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Callconv :: Type -> Type Source #

Generic Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Clause :: Type -> Type Source #

Generic Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Con :: Type -> Type Source #

Methods

from :: Con -> Rep Con x Source #

to :: Rep Con x -> Con Source #

Generic Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Dec :: Type -> Type Source #

Methods

from :: Dec -> Rep Dec x Source #

to :: Rep Dec x -> Dec Source #

Generic DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DecidedStrictness :: Type -> Type Source #

Generic DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivClause :: Type -> Type Source #

Generic DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DerivStrategy :: Type -> Type Source #

Generic DocLoc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep DocLoc :: Type -> Type Source #

Generic Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Exp :: Type -> Type Source #

Methods

from :: Exp -> Rep Exp x Source #

to :: Rep Exp x -> Exp Source #

Generic FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FamilyResultSig :: Type -> Type Source #

Generic Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Fixity :: Type -> Type Source #

Generic FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FixityDirection :: Type -> Type Source #

Generic Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Foreign :: Type -> Type Source #

Generic FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep FunDep :: Type -> Type Source #

Generic Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Guard :: Type -> Type Source #

Methods

from :: Guard -> Rep Guard x Source #

to :: Rep Guard x -> Guard Source #

Generic Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Info :: Type -> Type Source #

Methods

from :: Info -> Rep Info x Source #

to :: Rep Info x -> Info Source #

Generic InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep InjectivityAnn :: Type -> Type Source #

Generic Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Inline :: Type -> Type Source #

Generic Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Lit :: Type -> Type Source #

Methods

from :: Lit -> Rep Lit x Source #

to :: Rep Lit x -> Lit Source #

Generic Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Loc :: Type -> Type Source #

Methods

from :: Loc -> Rep Loc x Source #

to :: Rep Loc x -> Loc Source #

Generic Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Match :: Type -> Type Source #

Methods

from :: Match -> Rep Match x Source #

to :: Rep Match x -> Match Source #

Generic ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModName :: Type -> Type Source #

Generic Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Module :: Type -> Type Source #

Generic ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep ModuleInfo :: Type -> Type Source #

Generic Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Name :: Type -> Type Source #

Methods

from :: Name -> Rep Name x Source #

to :: Rep Name x -> Name Source #

Generic NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameFlavour :: Type -> Type Source #

Generic NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep NameSpace :: Type -> Type Source #

Generic OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep OccName :: Type -> Type Source #

Generic Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Overlap :: Type -> Type Source #

Generic Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pat :: Type -> Type Source #

Methods

from :: Pat -> Rep Pat x Source #

to :: Rep Pat x -> Pat Source #

Generic PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynArgs :: Type -> Type Source #

Generic PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PatSynDir :: Type -> Type Source #

Generic Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Phases :: Type -> Type Source #

Generic PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep PkgName :: Type -> Type Source #

Generic Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Pragma :: Type -> Type Source #

Generic Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Range :: Type -> Type Source #

Methods

from :: Range -> Rep Range x Source #

to :: Rep Range x -> Range Source #

Generic Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Role :: Type -> Type Source #

Methods

from :: Role -> Rep Role x Source #

to :: Rep Role x -> Role Source #

Generic RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleBndr :: Type -> Type Source #

Generic RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep RuleMatch :: Type -> Type Source #

Generic Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Safety :: Type -> Type Source #

Generic SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceStrictness :: Type -> Type Source #

Generic SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep SourceUnpackedness :: Type -> Type Source #

Generic Specificity 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Specificity :: Type -> Type Source #

Generic Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Stmt :: Type -> Type Source #

Methods

from :: Stmt -> Rep Stmt x Source #

to :: Rep Stmt x -> Stmt Source #

Generic TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TyLit :: Type -> Type Source #

Methods

from :: TyLit -> Rep TyLit x Source #

to :: Rep TyLit x -> TyLit Source #

Generic TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TySynEqn :: Type -> Type Source #

Generic Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep Type :: Type -> Type Source #

Methods

from :: Type -> Rep Type x Source #

to :: Rep Type x -> Type Source #

Generic TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep TypeFamilyHead :: Type -> Type Source #

Generic () 
Instance details

Defined in GHC.Generics

Associated Types

type Rep () :: Type -> Type Source #

Methods

from :: () -> Rep () x Source #

to :: Rep () x -> () Source #

Generic Bool 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type Source #

Methods

from :: Bool -> Rep Bool x Source #

to :: Rep Bool x -> Bool Source #

Generic (ZipList a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (ZipList a) :: Type -> Type Source #

Methods

from :: ZipList a -> Rep (ZipList a) x Source #

to :: Rep (ZipList a) x -> ZipList a Source #

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type Source #

Methods

from :: Identity a -> Rep (Identity a) x Source #

to :: Rep (Identity a) x -> Identity a Source #

Generic (First a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a) :: Type -> Type Source #

Methods

from :: First a -> Rep (First a) x Source #

to :: Rep (First a) x -> First a Source #

Generic (Last a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Last a) :: Type -> Type Source #

Methods

from :: Last a -> Rep (Last a) x Source #

to :: Rep (Last a) x -> Last a Source #

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type Source #

Methods

from :: Down a -> Rep (Down a) x Source #

to :: Rep (Down a) x -> Down a Source #

Generic (First a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (First a) :: Type -> Type Source #

Methods

from :: First a -> Rep (First a) x Source #

to :: Rep (First a) x -> First a Source #

Generic (Last a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Last a) :: Type -> Type Source #

Methods

from :: Last a -> Rep (Last a) x Source #

to :: Rep (Last a) x -> Last a Source #

Generic (Max a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Max a) :: Type -> Type Source #

Methods

from :: Max a -> Rep (Max a) x Source #

to :: Rep (Max a) x -> Max a Source #

Generic (Min a) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Min a) :: Type -> Type Source #

Methods

from :: Min a -> Rep (Min a) x Source #

to :: Rep (Min a) x -> Min a Source #

Generic (WrappedMonoid m) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type Source #

Generic (Dual a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type Source #

Methods

from :: Dual a -> Rep (Dual a) x Source #

to :: Rep (Dual a) x -> Dual a Source #

Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type Source #

Methods

from :: Endo a -> Rep (Endo a) x Source #

to :: Rep (Endo a) x -> Endo a Source #

Generic (Product a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type Source #

Methods

from :: Product a -> Rep (Product a) x Source #

to :: Rep (Product a) x -> Product a Source #

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type Source #

Methods

from :: Sum a -> Rep (Sum a) x Source #

to :: Rep (Sum a) x -> Sum a Source #

Generic (NonEmpty a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a) :: Type -> Type Source #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x Source #

to :: Rep (NonEmpty a) x -> NonEmpty a Source #

Generic (Par1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Par1 p) :: Type -> Type Source #

Methods

from :: Par1 p -> Rep (Par1 p) x Source #

to :: Rep (Par1 p) x -> Par1 p Source #

Generic (Digit a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Digit a) :: Type -> Type Source #

Methods

from :: Digit a -> Rep (Digit a) x Source #

to :: Rep (Digit a) x -> Digit a Source #

Generic (Elem a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Elem a) :: Type -> Type Source #

Methods

from :: Elem a -> Rep (Elem a) x Source #

to :: Rep (Elem a) x -> Elem a Source #

Generic (FingerTree a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (FingerTree a) :: Type -> Type Source #

Methods

from :: FingerTree a -> Rep (FingerTree a) x Source #

to :: Rep (FingerTree a) x -> FingerTree a Source #

Generic (Node a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (Node a) :: Type -> Type Source #

Methods

from :: Node a -> Rep (Node a) x Source #

to :: Rep (Node a) x -> Node a Source #

Generic (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewL a) :: Type -> Type Source #

Methods

from :: ViewL a -> Rep (ViewL a) x Source #

to :: Rep (ViewL a) x -> ViewL a Source #

Generic (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Rep (ViewR a) :: Type -> Type Source #

Methods

from :: ViewR a -> Rep (ViewR a) x Source #

to :: Rep (ViewR a) x -> ViewR a Source #

Generic (Tree a) 
Instance details

Defined in Data.Tree

Associated Types

type Rep (Tree a) :: Type -> Type Source #

Methods

from :: Tree a -> Rep (Tree a) x Source #

to :: Rep (Tree a) x -> Tree a Source #

Generic (Fix f) 
Instance details

Defined in Data.Fix

Associated Types

type Rep (Fix f) :: Type -> Type Source #

Methods

from :: Fix f -> Rep (Fix f) x Source #

to :: Rep (Fix f) x -> Fix f Source #

Generic (GenClosure b) 
Instance details

Defined in GHC.Exts.Heap.Closures

Associated Types

type Rep (GenClosure b) :: Type -> Type Source #

Methods

from :: GenClosure b -> Rep (GenClosure b) x Source #

to :: Rep (GenClosure b) x -> GenClosure b Source #

Generic (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Associated Types

type Rep (Doc a) :: Type -> Type Source #

Methods

from :: Doc a -> Rep (Doc a) x Source #

to :: Rep (Doc a) x -> Doc a Source #

Generic (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Associated Types

type Rep (Maybe a) :: Type -> Type Source #

Methods

from :: Maybe a -> Rep (Maybe a) x Source #

to :: Rep (Maybe a) x -> Maybe a Source #

Generic (TyVarBndr flag) 
Instance details

Defined in Language.Haskell.TH.Syntax

Associated Types

type Rep (TyVarBndr flag) :: Type -> Type Source #

Methods

from :: TyVarBndr flag -> Rep (TyVarBndr flag) x Source #

to :: Rep (TyVarBndr flag) x -> TyVarBndr flag Source #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type Source #

Methods

from :: Maybe a -> Rep (Maybe a) x Source #

to :: Rep (Maybe a) x -> Maybe a Source #

Generic (a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a) :: Type -> Type Source #

Methods

from :: (a) -> Rep (a) x Source #

to :: Rep (a) x -> (a) Source #

Generic [a] 
Instance details

Defined in GHC.Generics

Associated Types

type Rep [a] :: Type -> Type Source #

Methods

from :: [a] -> Rep [a] x Source #

to :: Rep [a] x -> [a] Source #

Generic (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedMonad m a) :: Type -> Type Source #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x Source #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a Source #

Generic (Either a b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type Source #

Methods

from :: Either a b -> Rep (Either a b) x Source #

to :: Rep (Either a b) x -> Either a b Source #

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type Source #

Methods

from :: Proxy t -> Rep (Proxy t) x Source #

to :: Rep (Proxy t) x -> Proxy t Source #

Generic (Arg a b) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (Arg a b) :: Type -> Type Source #

Methods

from :: Arg a b -> Rep (Arg a b) x Source #

to :: Rep (Arg a b) x -> Arg a b Source #

Generic (U1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (U1 p) :: Type -> Type Source #

Methods

from :: U1 p -> Rep (U1 p) x Source #

to :: Rep (U1 p) x -> U1 p Source #

Generic (V1 p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (V1 p) :: Type -> Type Source #

Methods

from :: V1 p -> Rep (V1 p) x Source #

to :: Rep (V1 p) x -> V1 p Source #

Generic (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Associated Types

type Rep (Cofree f a) :: Type -> Type Source #

Methods

from :: Cofree f a -> Rep (Cofree f a) x Source #

to :: Rep (Cofree f a) x -> Cofree f a Source #

Generic (Free f a) 
Instance details

Defined in Control.Monad.Free

Associated Types

type Rep (Free f a) :: Type -> Type Source #

Methods

from :: Free f a -> Rep (Free f a) x Source #

to :: Rep (Free f a) x -> Free f a Source #

Generic (ListF a b) 
Instance details

Defined in Data.Functor.Base

Associated Types

type Rep (ListF a b) :: Type -> Type Source #

Methods

from :: ListF a b -> Rep (ListF a b) x Source #

to :: Rep (ListF a b) x -> ListF a b Source #

Generic (NonEmptyF a b) 
Instance details

Defined in Data.Functor.Base

Associated Types

type Rep (NonEmptyF a b) :: Type -> Type Source #

Methods

from :: NonEmptyF a b -> Rep (NonEmptyF a b) x Source #

to :: Rep (NonEmptyF a b) x -> NonEmptyF a b Source #

Generic (TreeF a b) 
Instance details

Defined in Data.Functor.Base

Associated Types

type Rep (TreeF a b) :: Type -> Type Source #

Methods

from :: TreeF a b -> Rep (TreeF a b) x Source #

to :: Rep (TreeF a b) x -> TreeF a b Source #

Generic (Either a b) 
Instance details

Defined in Data.Strict.Either

Associated Types

type Rep (Either a b) :: Type -> Type Source #

Methods

from :: Either a b -> Rep (Either a b) x Source #

to :: Rep (Either a b) x -> Either a b Source #

Generic (These a b) 
Instance details

Defined in Data.Strict.These

Associated Types

type Rep (These a b) :: Type -> Type Source #

Methods

from :: These a b -> Rep (These a b) x Source #

to :: Rep (These a b) x -> These a b Source #

Generic (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Associated Types

type Rep (Pair a b) :: Type -> Type Source #

Methods

from :: Pair a b -> Rep (Pair a b) x Source #

to :: Rep (Pair a b) x -> Pair a b Source #

Generic (These a b) 
Instance details

Defined in Data.These

Associated Types

type Rep (These a b) :: Type -> Type Source #

Methods

from :: These a b -> Rep (These a b) x Source #

to :: Rep (These a b) x -> These a b Source #

Generic (Lift f a) 
Instance details

Defined in Control.Applicative.Lift

Associated Types

type Rep (Lift f a) :: Type -> Type Source #

Methods

from :: Lift f a -> Rep (Lift f a) x Source #

to :: Rep (Lift f a) x -> Lift f a Source #

Generic (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Associated Types

type Rep (MaybeT m a) :: Type -> Type Source #

Methods

from :: MaybeT m a -> Rep (MaybeT m a) x Source #

to :: Rep (MaybeT m a) x -> MaybeT m a Source #

Generic (a, b) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b) :: Type -> Type Source #

Methods

from :: (a, b) -> Rep (a, b) x Source #

to :: Rep (a, b) x -> (a, b) Source #

Generic (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedArrow a b c) :: Type -> Type Source #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x Source #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c Source #

Generic (Kleisli m a b) 
Instance details

Defined in Control.Arrow

Associated Types

type Rep (Kleisli m a b) :: Type -> Type Source #

Methods

from :: Kleisli m a b -> Rep (Kleisli m a b) x Source #

to :: Rep (Kleisli m a b) x -> Kleisli m a b Source #

Generic (Const a b) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep (Const a b) :: Type -> Type Source #

Methods

from :: Const a b -> Rep (Const a b) x Source #

to :: Rep (Const a b) x -> Const a b Source #

Generic (Ap f a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type Source #

Methods

from :: Ap f a -> Rep (Ap f a) x Source #

to :: Rep (Ap f a) x -> Ap f a Source #

Generic (Alt f a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Alt f a) :: Type -> Type Source #

Methods

from :: Alt f a -> Rep (Alt f a) x Source #

to :: Rep (Alt f a) x -> Alt f a Source #

Generic (Rec1 f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Rec1 f p) :: Type -> Type Source #

Methods

from :: Rec1 f p -> Rep (Rec1 f p) x Source #

to :: Rep (Rec1 f p) x -> Rec1 f p Source #

Generic (URec (Ptr ()) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec (Ptr ()) p) :: Type -> Type Source #

Methods

from :: URec (Ptr ()) p -> Rep (URec (Ptr ()) p) x Source #

to :: Rep (URec (Ptr ()) p) x -> URec (Ptr ()) p Source #

Generic (URec Char p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type Source #

Methods

from :: URec Char p -> Rep (URec Char p) x Source #

to :: Rep (URec Char p) x -> URec Char p Source #

Generic (URec Double p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type Source #

Methods

from :: URec Double p -> Rep (URec Double p) x Source #

to :: Rep (URec Double p) x -> URec Double p Source #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type Source #

Methods

from :: URec Float p -> Rep (URec Float p) x Source #

to :: Rep (URec Float p) x -> URec Float p Source #

Generic (URec Int p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type Source #

Methods

from :: URec Int p -> Rep (URec Int p) x Source #

to :: Rep (URec Int p) x -> URec Int p Source #

Generic (URec Word p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type Source #

Methods

from :: URec Word p -> Rep (URec Word p) x Source #

to :: Rep (URec Word p) x -> URec Word p Source #

Generic (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Associated Types

type Rep (Join p a) :: Type -> Type Source #

Methods

from :: Join p a -> Rep (Join p a) x Source #

to :: Rep (Join p a) x -> Join p a Source #

Generic (CofreeF f a b) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Associated Types

type Rep (CofreeF f a b) :: Type -> Type Source #

Methods

from :: CofreeF f a b -> Rep (CofreeF f a b) x Source #

to :: Rep (CofreeF f a b) x -> CofreeF f a b Source #

Generic (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Associated Types

type Rep (FreeF f a b) :: Type -> Type Source #

Methods

from :: FreeF f a b -> Rep (FreeF f a b) x Source #

to :: Rep (FreeF f a b) x -> FreeF f a b Source #

Generic (Tagged s b) 
Instance details

Defined in Data.Tagged

Associated Types

type Rep (Tagged s b) :: Type -> Type Source #

Methods

from :: Tagged s b -> Rep (Tagged s b) x Source #

to :: Rep (Tagged s b) x -> Tagged s b Source #

Generic (These1 f g a) 
Instance details

Defined in Data.Functor.These

Associated Types

type Rep (These1 f g a) :: Type -> Type Source #

Methods

from :: These1 f g a -> Rep (These1 f g a) x Source #

to :: Rep (These1 f g a) x -> These1 f g a Source #

Generic (Backwards f a) 
Instance details

Defined in Control.Applicative.Backwards

Associated Types

type Rep (Backwards f a) :: Type -> Type Source #

Methods

from :: Backwards f a -> Rep (Backwards f a) x Source #

to :: Rep (Backwards f a) x -> Backwards f a Source #

Generic (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Associated Types

type Rep (ExceptT e m a) :: Type -> Type Source #

Methods

from :: ExceptT e m a -> Rep (ExceptT e m a) x Source #

to :: Rep (ExceptT e m a) x -> ExceptT e m a Source #

Generic (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Associated Types

type Rep (IdentityT f a) :: Type -> Type Source #

Methods

from :: IdentityT f a -> Rep (IdentityT f a) x Source #

to :: Rep (IdentityT f a) x -> IdentityT f a Source #

Generic (ReaderT r m a) 
Instance details

Defined in Control.Monad.Trans.Reader

Associated Types

type Rep (ReaderT r m a) :: Type -> Type Source #

Methods

from :: ReaderT r m a -> Rep (ReaderT r m a) x Source #

to :: Rep (ReaderT r m a) x -> ReaderT r m a Source #

Generic (StateT s m a) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Associated Types

type Rep (StateT s m a) :: Type -> Type Source #

Methods

from :: StateT s m a -> Rep (StateT s m a) x Source #

to :: Rep (StateT s m a) x -> StateT s m a Source #

Generic (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Associated Types

type Rep (Constant a b) :: Type -> Type Source #

Methods

from :: Constant a b -> Rep (Constant a b) x Source #

to :: Rep (Constant a b) x -> Constant a b Source #

Generic (Reverse f a) 
Instance details

Defined in Data.Functor.Reverse

Associated Types

type Rep (Reverse f a) :: Type -> Type Source #

Methods

from :: Reverse f a -> Rep (Reverse f a) x Source #

to :: Rep (Reverse f a) x -> Reverse f a Source #

Generic (a, b, c) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c) :: Type -> Type Source #

Methods

from :: (a, b, c) -> Rep (a, b, c) x Source #

to :: Rep (a, b, c) x -> (a, b, c) Source #

Generic ((f :*: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :*: g) p) :: Type -> Type Source #

Methods

from :: (f :*: g) p -> Rep ((f :*: g) p) x Source #

to :: Rep ((f :*: g) p) x -> (f :*: g) p Source #

Generic ((f :+: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :+: g) p) :: Type -> Type Source #

Methods

from :: (f :+: g) p -> Rep ((f :+: g) p) x Source #

to :: Rep ((f :+: g) p) x -> (f :+: g) p Source #

Generic (K1 i c p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (K1 i c p) :: Type -> Type Source #

Methods

from :: K1 i c p -> Rep (K1 i c p) x Source #

to :: Rep (K1 i c p) x -> K1 i c p Source #

Generic (a, b, c, d) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d) :: Type -> Type Source #

Methods

from :: (a, b, c, d) -> Rep (a, b, c, d) x Source #

to :: Rep (a, b, c, d) x -> (a, b, c, d) Source #

Generic (Compose f g a) 
Instance details

Defined in Data.Functor.Compose

Associated Types

type Rep (Compose f g a) :: Type -> Type Source #

Methods

from :: Compose f g a -> Rep (Compose f g a) x Source #

to :: Rep (Compose f g a) x -> Compose f g a Source #

Generic ((f :.: g) p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep ((f :.: g) p) :: Type -> Type Source #

Methods

from :: (f :.: g) p -> Rep ((f :.: g) p) x Source #

to :: Rep ((f :.: g) p) x -> (f :.: g) p Source #

Generic (M1 i c f p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (M1 i c f p) :: Type -> Type Source #

Methods

from :: M1 i c f p -> Rep (M1 i c f p) x Source #

to :: Rep (M1 i c f p) x -> M1 i c f p Source #

Generic (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Associated Types

type Rep (Clown f a b) :: Type -> Type Source #

Methods

from :: Clown f a b -> Rep (Clown f a b) x Source #

to :: Rep (Clown f a b) x -> Clown f a b Source #

Generic (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Associated Types

type Rep (Flip p a b) :: Type -> Type Source #

Methods

from :: Flip p a b -> Rep (Flip p a b) x Source #

to :: Rep (Flip p a b) x -> Flip p a b Source #

Generic (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Associated Types

type Rep (Joker g a b) :: Type -> Type Source #

Methods

from :: Joker g a b -> Rep (Joker g a b) x Source #

to :: Rep (Joker g a b) x -> Joker g a b Source #

Generic (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Associated Types

type Rep (WrappedBifunctor p a b) :: Type -> Type Source #

Methods

from :: WrappedBifunctor p a b -> Rep (WrappedBifunctor p a b) x Source #

to :: Rep (WrappedBifunctor p a b) x -> WrappedBifunctor p a b Source #

Generic (a, b, c, d, e) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e) -> Rep (a, b, c, d, e) x Source #

to :: Rep (a, b, c, d, e) x -> (a, b, c, d, e) Source #

Generic (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Associated Types

type Rep (Product f g a b) :: Type -> Type Source #

Methods

from :: Product f g a b -> Rep (Product f g a b) x Source #

to :: Rep (Product f g a b) x -> Product f g a b Source #

Generic (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Associated Types

type Rep (Sum p q a b) :: Type -> Type Source #

Methods

from :: Sum p q a b -> Rep (Sum p q a b) x Source #

to :: Rep (Sum p q a b) x -> Sum p q a b Source #

Generic (a, b, c, d, e, f) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f) -> Rep (a, b, c, d, e, f) x Source #

to :: Rep (a, b, c, d, e, f) x -> (a, b, c, d, e, f) Source #

Generic (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Associated Types

type Rep (Tannen f p a b) :: Type -> Type Source #

Methods

from :: Tannen f p a b -> Rep (Tannen f p a b) x Source #

to :: Rep (Tannen f p a b) x -> Tannen f p a b Source #

Generic (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g) -> Rep (a, b, c, d, e, f, g) x Source #

to :: Rep (a, b, c, d, e, f, g) x -> (a, b, c, d, e, f, g) Source #

Generic (a, b, c, d, e, f, g, h) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h) -> Rep (a, b, c, d, e, f, g, h) x Source #

to :: Rep (a, b, c, d, e, f, g, h) x -> (a, b, c, d, e, f, g, h) Source #

Generic (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Associated Types

type Rep (Biff p f g a b) :: Type -> Type Source #

Methods

from :: Biff p f g a b -> Rep (Biff p f g a b) x Source #

to :: Rep (Biff p f g a b) x -> Biff p f g a b Source #

Generic (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i) -> Rep (a, b, c, d, e, f, g, h, i) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i) x -> (a, b, c, d, e, f, g, h, i) Source #

Generic (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j) -> Rep (a, b, c, d, e, f, g, h, i, j) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j) x -> (a, b, c, d, e, f, g, h, i, j) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k) -> Rep (a, b, c, d, e, f, g, h, i, j, k) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k) x -> (a, b, c, d, e, f, g, h, i, j, k) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l) x -> (a, b, c, d, e, f, g, h, i, j, k, l) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

Generic (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) :: Type -> Type Source #

Methods

from :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x Source #

to :: Rep (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) x -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

class KnownNat (n :: Nat) Source #

This class gives the integer associated with a type-level natural. There are instances of the class for every concrete literal: 0, 1, 2, etc.

Since: base-4.7.0.0

Minimal complete definition

natSing

class 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

You can alternatively define sconcat instead of (<>), in which case the laws are:

Unit
sconcat (pure x) = x
Multiplication
sconcat (join xss) = sconcat (fmap sconcat xss)

Since: base-4.9.0.0

Minimal complete definition

(<>) | sconcat

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 (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 Series 
Instance details

Defined in Data.Aeson.Encoding.Internal

Methods

(<>) :: Series -> Series -> Series Source #

sconcat :: NonEmpty Series -> Series Source #

stimes :: Integral b => b -> Series -> Series Source #

Semigroup Key 
Instance details

Defined in Data.Aeson.Key

Methods

(<>) :: Key -> Key -> Key Source #

sconcat :: NonEmpty Key -> Key Source #

stimes :: Integral b => b -> Key -> Key Source #

Semigroup ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: All -> All -> All Source #

sconcat :: NonEmpty All -> All Source #

stimes :: Integral b => b -> All -> All Source #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Any -> Any -> Any Source #

sconcat :: NonEmpty Any -> Any Source #

stimes :: Integral b => b -> Any -> Any Source #

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Semigroup ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Semigroup OsString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Semigroup PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Semigroup WindowsString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

(<>) :: Doc -> Doc -> Doc Source #

sconcat :: NonEmpty Doc -> Doc Source #

stimes :: Integral b => b -> Doc -> Doc Source #

Semigroup ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

(<>) :: ShortText -> ShortText -> ShortText Source #

sconcat :: NonEmpty ShortText -> ShortText Source #

stimes :: Integral b => b -> ShortText -> ShortText Source #

Semigroup ()

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: () -> () -> () Source #

sconcat :: NonEmpty () -> () Source #

stimes :: Integral b => b -> () -> () Source #

Semigroup (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

(<>) :: KeyMap v -> KeyMap v -> KeyMap v Source #

sconcat :: NonEmpty (KeyMap v) -> KeyMap v Source #

stimes :: Integral b => b -> KeyMap v -> KeyMap v Source #

Semigroup (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(<>) :: IResult a -> IResult a -> IResult a Source #

sconcat :: NonEmpty (IResult a) -> IResult a Source #

stimes :: Integral b => b -> IResult a -> IResult a Source #

Semigroup (Parser a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(<>) :: Parser a -> Parser a -> Parser a Source #

sconcat :: NonEmpty (Parser a) -> Parser a Source #

stimes :: Integral b => b -> Parser a -> Parser a Source #

Semigroup (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(<>) :: Result a -> Result a -> Result a Source #

sconcat :: NonEmpty (Result a) -> Result a Source #

stimes :: Integral b => b -> Result a -> Result a Source #

Semigroup (Comparison a)

(<>) on comparisons combines results with (<>) @Ordering. Without newtypes this equals liftA2 (liftA2 (<>)).

(<>) :: Comparison a -> Comparison a -> Comparison a
Comparison cmp <> Comparison cmp' = Comparison a a' ->
  cmp a a' <> cmp a a'
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Equivalence a)

(<>) on equivalences uses logical conjunction (&&) on the results. Without newtypes this equals liftA2 (liftA2 (&&)).

(<>) :: Equivalence a -> Equivalence a -> Equivalence a
Equivalence equiv <> Equivalence equiv' = Equivalence a b ->
  equiv a b && equiv' a b
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Predicate a)

(<>) on predicates uses logical conjunction (&&) on the results. Without newtypes this equals liftA2 (&&).

(<>) :: Predicate a -> Predicate a -> Predicate a
Predicate pred <> Predicate pred' = Predicate a ->
  pred a && pred' a
Instance details

Defined in Data.Functor.Contravariant

Semigroup a => Semigroup (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: First a -> First a -> First a Source #

sconcat :: NonEmpty (First a) -> First a Source #

stimes :: Integral b => b -> First a -> First a Source #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Last a -> Last a -> Last a Source #

sconcat :: NonEmpty (Last a) -> Last a Source #

stimes :: Integral b => b -> Last a -> Last a Source #

Semigroup a => Semigroup (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(<>) :: Down a -> Down a -> Down a Source #

sconcat :: NonEmpty (Down a) -> Down a Source #

stimes :: Integral b => b -> Down a -> Down a Source #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: First a -> First a -> First a Source #

sconcat :: NonEmpty (First a) -> First a Source #

stimes :: Integral b => b -> First a -> First a Source #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Last a -> Last a -> Last a Source #

sconcat :: NonEmpty (Last a) -> Last a Source #

stimes :: Integral b => b -> Last a -> Last a Source #

Ord a => Semigroup (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Max a -> Max a -> Max a Source #

sconcat :: NonEmpty (Max a) -> Max a Source #

stimes :: Integral b => b -> Max a -> Max a Source #

Ord a => Semigroup (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(<>) :: Min a -> Min a -> Min a Source #

sconcat :: NonEmpty (Min a) -> Min a Source #

stimes :: Integral b => b -> Min a -> Min a Source #

Monoid m => Semigroup (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Semigroup (Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Dual a -> Dual a -> Dual a Source #

sconcat :: NonEmpty (Dual a) -> Dual a Source #

stimes :: Integral b => b -> Dual a -> Dual a Source #

Semigroup (Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Endo a -> Endo a -> Endo a Source #

sconcat :: NonEmpty (Endo a) -> Endo a Source #

stimes :: Integral b => b -> Endo a -> Endo a Source #

Num a => Semigroup (Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Product a -> Product a -> Product a Source #

sconcat :: NonEmpty (Product a) -> Product a Source #

stimes :: Integral b => b -> Product a -> Product a Source #

Num a => Semigroup (Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Sum a -> Sum a -> Sum a Source #

sconcat :: NonEmpty (Sum a) -> Sum a Source #

stimes :: Integral b => b -> Sum a -> Sum a Source #

Semigroup (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

(Generic a, Semigroup (Rep a ())) => Semigroup (Generically a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Semigroup p => Semigroup (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Par1 p -> Par1 p -> Par1 p Source #

sconcat :: NonEmpty (Par1 p) -> Par1 p Source #

stimes :: Integral b => b -> Par1 p -> Par1 p Source #

Semigroup (IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Methods

(<>) :: IntMap a -> IntMap a -> IntMap a Source #

sconcat :: NonEmpty (IntMap a) -> IntMap a Source #

stimes :: Integral b => b -> IntMap a -> IntMap a Source #

Semigroup (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

(<>) :: Seq a -> Seq a -> Seq a Source #

sconcat :: NonEmpty (Seq a) -> Seq a Source #

stimes :: Integral b => b -> Seq a -> Seq a Source #

Ord a => Semigroup (Intersection a) 
Instance details

Defined in Data.Set.Internal

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 #

Ord a => Semigroup (Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Methods

(<>) :: Set a -> Set a -> Set a Source #

sconcat :: NonEmpty (Set a) -> Set a Source #

stimes :: Integral b => b -> Set a -> Set a Source #

Semigroup (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

(<>) :: DNonEmpty a -> DNonEmpty a -> DNonEmpty a Source #

sconcat :: NonEmpty (DNonEmpty a) -> DNonEmpty a Source #

stimes :: Integral b => b -> DNonEmpty a -> DNonEmpty a Source #

Semigroup (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

(<>) :: DList a -> DList a -> DList a Source #

sconcat :: NonEmpty (DList a) -> DList a Source #

stimes :: Integral b => b -> DList a -> DList a Source #

Semigroup a => Semigroup (IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: IO a -> IO a -> IO a Source #

sconcat :: NonEmpty (IO a) -> IO a Source #

stimes :: Integral b => b -> IO a -> IO a Source #

Semigroup (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(<>) :: Doc a -> Doc a -> Doc a Source #

sconcat :: NonEmpty (Doc a) -> Doc a Source #

stimes :: Integral b => b -> Doc a -> Doc a Source #

Semigroup (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

(<>) :: Array a -> Array a -> Array a Source #

sconcat :: NonEmpty (Array a) -> Array a Source #

stimes :: Integral b => b -> Array a -> Array a Source #

Semigroup (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

(<>) :: PrimArray a -> PrimArray a -> PrimArray a Source #

sconcat :: NonEmpty (PrimArray a) -> PrimArray a Source #

stimes :: Integral b => b -> PrimArray a -> PrimArray a Source #

Semigroup (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

(<>) :: SmallArray a -> SmallArray a -> SmallArray a Source #

sconcat :: NonEmpty (SmallArray a) -> SmallArray a Source #

stimes :: Integral b => b -> SmallArray a -> SmallArray a Source #

Semigroup a => Semigroup (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a Source #

sconcat :: NonEmpty (Maybe a) -> Maybe a Source #

stimes :: Integral b => b -> Maybe a -> Maybe a Source #

Semigroup a => Semigroup (Q a)

Since: template-haskell-2.17.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(<>) :: Q a -> Q a -> Q a Source #

sconcat :: NonEmpty (Q a) -> Q a Source #

stimes :: Integral b => b -> Q a -> Q a Source #

(Hashable a, Eq a) => Semigroup (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

(<>) :: HashSet a -> HashSet a -> HashSet a Source #

sconcat :: NonEmpty (HashSet a) -> HashSet a Source #

stimes :: Integral b => b -> HashSet a -> HashSet a Source #

Semigroup (Vector a) 
Instance details

Defined in Data.Vector

Methods

(<>) :: Vector a -> Vector a -> Vector a Source #

sconcat :: NonEmpty (Vector a) -> Vector a Source #

stimes :: Integral b => b -> Vector a -> Vector a Source #

Prim a => Semigroup (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

(<>) :: Vector a -> Vector a -> Vector a Source #

sconcat :: NonEmpty (Vector a) -> Vector a Source #

stimes :: Integral b => b -> Vector a -> Vector a Source #

Storable a => Semigroup (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

(<>) :: Vector a -> Vector a -> Vector a Source #

sconcat :: NonEmpty (Vector a) -> Vector a Source #

stimes :: Integral b => b -> Vector a -> Vector a Source #

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a Source #

sconcat :: NonEmpty (Maybe a) -> Maybe a Source #

stimes :: Integral b => b -> Maybe a -> Maybe a Source #

Semigroup a => Semigroup (a)

Since: base-4.15

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]

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 (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b Source #

sconcat :: NonEmpty (Either a b) -> Either a b Source #

stimes :: Integral b0 => b0 -> Either a b -> Either a b Source #

Semigroup a => Semigroup (Op a b)

(<>) @(Op a b) without newtypes is (<>) @(b->a) = liftA2 (<>). This lifts the Semigroup operation (<>) over the output of a.

(<>) :: Op a b -> Op a b -> Op a b
Op f <> Op g = Op a -> f a <> g a
Instance details

Defined in Data.Functor.Contravariant

Methods

(<>) :: Op a b -> Op a b -> Op a b Source #

sconcat :: NonEmpty (Op a b) -> Op a b Source #

stimes :: Integral b0 => b0 -> Op a b -> Op a b Source #

Semigroup (Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

(<>) :: Proxy s -> Proxy s -> Proxy s Source #

sconcat :: NonEmpty (Proxy s) -> Proxy s Source #

stimes :: Integral b => b -> Proxy s -> Proxy s Source #

Semigroup (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: U1 p -> U1 p -> U1 p Source #

sconcat :: NonEmpty (U1 p) -> U1 p Source #

stimes :: Integral b => b -> U1 p -> U1 p Source #

Semigroup (V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: V1 p -> V1 p -> V1 p Source #

sconcat :: NonEmpty (V1 p) -> V1 p Source #

stimes :: Integral b => b -> V1 p -> V1 p Source #

Ord k => Semigroup (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

(<>) :: Map k v -> Map k v -> Map k v Source #

sconcat :: NonEmpty (Map k v) -> Map k v Source #

stimes :: Integral b => b -> Map k v -> Map k v Source #

(Semigroup a, MonadAsync m) => Semigroup (Concurrently m a) 
Instance details

Defined in Control.Monad.Class.MonadAsync

Methods

(<>) :: Concurrently m a -> Concurrently m a -> Concurrently m a Source #

sconcat :: NonEmpty (Concurrently m a) -> Concurrently m a Source #

stimes :: Integral b => b -> Concurrently m a -> Concurrently m a Source #

Semigroup (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b Source #

sconcat :: NonEmpty (Either a b) -> Either a b Source #

stimes :: Integral b0 => b0 -> Either a b -> Either a b Source #

(Semigroup a, Semigroup b) => Semigroup (These a b) 
Instance details

Defined in Data.Strict.These

Methods

(<>) :: These a b -> These a b -> These a b Source #

sconcat :: NonEmpty (These a b) -> These a b Source #

stimes :: Integral b0 => b0 -> These a b -> These a b Source #

(Semigroup a, Semigroup b) => Semigroup (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

(<>) :: Pair a b -> Pair a b -> Pair a b Source #

sconcat :: NonEmpty (Pair a b) -> Pair a b Source #

stimes :: Integral b0 => b0 -> Pair a b -> Pair a b Source #

(Semigroup a, Semigroup b) => Semigroup (These a b) 
Instance details

Defined in Data.These

Methods

(<>) :: These a b -> These a b -> These a b Source #

sconcat :: NonEmpty (These a b) -> These a b Source #

stimes :: Integral b0 => b0 -> These a b -> These a b Source #

(Eq k, Hashable k) => Semigroup (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

(<>) :: HashMap k v -> HashMap k v -> HashMap k v Source #

sconcat :: NonEmpty (HashMap k v) -> HashMap k v Source #

stimes :: Integral b => b -> HashMap k v -> HashMap k v Source #

(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 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 (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(<>) :: Const a b -> Const a b -> Const a b Source #

sconcat :: NonEmpty (Const a b) -> Const a b Source #

stimes :: Integral b0 => b0 -> Const a b -> Const a b Source #

(Applicative f, Semigroup a) => Semigroup (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Ap f a -> Ap f a -> Ap f a Source #

sconcat :: NonEmpty (Ap f a) -> Ap f a Source #

stimes :: Integral b => b -> Ap f a -> Ap f a Source #

Alternative f => Semigroup (Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Alt f a -> Alt f a -> Alt f a Source #

sconcat :: NonEmpty (Alt f a) -> Alt f a Source #

stimes :: Integral b => b -> Alt f a -> Alt f a Source #

Semigroup (f p) => Semigroup (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Rec1 f p -> Rec1 f p -> Rec1 f p Source #

sconcat :: NonEmpty (Rec1 f p) -> Rec1 f p Source #

stimes :: Integral b => b -> Rec1 f p -> Rec1 f p Source #

Semigroup a => Semigroup (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(<>) :: Tagged s a -> Tagged s a -> Tagged s a Source #

sconcat :: NonEmpty (Tagged s a) -> Tagged s a Source #

stimes :: Integral b => b -> Tagged s a -> Tagged s a Source #

Semigroup a => Semigroup (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

(<>) :: Constant a b -> Constant a b -> Constant a b Source #

sconcat :: NonEmpty (Constant a b) -> Constant a b Source #

stimes :: Integral b0 => b0 -> Constant a b -> Constant a b Source #

(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 (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 c => Semigroup (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: K1 i c p -> K1 i c p -> K1 i c p Source #

sconcat :: NonEmpty (K1 i c p) -> K1 i c p Source #

stimes :: Integral b => b -> K1 i c p -> K1 i c 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 (g a)) => Semigroup (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(<>) :: Compose f g a -> Compose f g a -> Compose f g a Source #

sconcat :: NonEmpty (Compose f g a) -> Compose f g a Source #

stimes :: Integral b => b -> Compose f g a -> Compose f g a 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 (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 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

You can alternatively define mconcat instead of mempty, in which case the laws are:

Unit
mconcat (pure x) = x
Multiplication
mconcat (join xss) = mconcat (fmap mconcat xss)
Subclass
mconcat (toList xs) = sconcat xs

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtypes and make those instances of Monoid, e.g. Sum and Product.

NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.

Minimal complete definition

mempty | mconcat

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 Series 
Instance details

Defined in Data.Aeson.Encoding.Internal

Methods

mempty :: Series Source #

mappend :: Series -> Series -> Series Source #

mconcat :: [Series] -> Series Source #

Monoid Key 
Instance details

Defined in Data.Aeson.Key

Methods

mempty :: Key Source #

mappend :: Key -> Key -> Key Source #

mconcat :: [Key] -> Key Source #

Monoid ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

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 ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Monoid ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Monoid OsString

"String-Concatenation" for OsString. This is not the same as (</>).

Instance details

Defined in System.OsString.Internal.Types.Hidden

Monoid PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Monoid WindowsString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Monoid ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

mempty :: ShortText Source #

mappend :: ShortText -> ShortText -> ShortText Source #

mconcat :: [ShortText] -> ShortText Source #

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: () Source #

mappend :: () -> () -> () Source #

mconcat :: [()] -> () Source #

Monoid (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

mempty :: KeyMap v Source #

mappend :: KeyMap v -> KeyMap v -> KeyMap v Source #

mconcat :: [KeyMap v] -> KeyMap v Source #

Monoid (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mempty :: IResult a Source #

mappend :: IResult a -> IResult a -> IResult a Source #

mconcat :: [IResult a] -> IResult a Source #

Monoid (Parser a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mempty :: Parser a Source #

mappend :: Parser a -> Parser a -> Parser a Source #

mconcat :: [Parser a] -> Parser a Source #

Monoid (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mempty :: Result a Source #

mappend :: Result a -> Result a -> Result a Source #

mconcat :: [Result a] -> Result a Source #

Monoid (Comparison a)

mempty on comparisons always returns EQ. Without newtypes this equals pure (pure EQ).

mempty :: Comparison a
mempty = Comparison _ _ -> EQ
Instance details

Defined in Data.Functor.Contravariant

Monoid (Equivalence a)

mempty on equivalences always returns True. Without newtypes this equals pure (pure True).

mempty :: Equivalence a
mempty = Equivalence _ _ -> True
Instance details

Defined in Data.Functor.Contravariant

Monoid (Predicate a)

mempty on predicates always returns True. Without newtypes this equals pure True.

mempty :: Predicate a
mempty = _ -> True
Instance details

Defined in Data.Functor.Contravariant

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a Source #

mappend :: First a -> First a -> First a Source #

mconcat :: [First a] -> First a Source #

Monoid (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: Last a Source #

mappend :: Last a -> Last a -> Last a Source #

mconcat :: [Last a] -> Last a Source #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a Source #

mappend :: Down a -> Down a -> Down a Source #

mconcat :: [Down a] -> Down a Source #

(Ord a, Bounded a) => Monoid (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Max a Source #

mappend :: Max a -> Max a -> Max a Source #

mconcat :: [Max a] -> Max a Source #

(Ord a, Bounded a) => Monoid (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Min a Source #

mappend :: Min a -> Min a -> Min a Source #

mconcat :: [Min a] -> Min a Source #

Monoid m => Monoid (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a Source #

mappend :: Dual a -> Dual a -> Dual a Source #

mconcat :: [Dual a] -> Dual a Source #

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a Source #

mappend :: Endo a -> Endo a -> Endo a Source #

mconcat :: [Endo a] -> Endo a Source #

Num a => Monoid (Product 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

Methods

mempty :: Sum a Source #

mappend :: Sum a -> Sum a -> Sum a Source #

mconcat :: [Sum a] -> Sum a Source #

(Generic a, Monoid (Rep a ())) => Monoid (Generically a)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Monoid p => Monoid (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Par1 p Source #

mappend :: Par1 p -> Par1 p -> Par1 p Source #

mconcat :: [Par1 p] -> Par1 p Source #

Monoid (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a Source #

mappend :: Seq a -> Seq a -> Seq a Source #

mconcat :: [Seq a] -> Seq a Source #

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 #

Ord a => Monoid (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: Set a Source #

mappend :: Set a -> Set a -> Set a Source #

mconcat :: [Set a] -> Set a Source #

Monoid (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

mempty :: DList a Source #

mappend :: DList a -> DList a -> DList a Source #

mconcat :: [DList a] -> DList a Source #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a Source #

mappend :: IO a -> IO a -> IO a Source #

mconcat :: [IO a] -> IO a Source #

Monoid (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

mempty :: Doc a Source #

mappend :: Doc a -> Doc a -> Doc a Source #

mconcat :: [Doc a] -> Doc a Source #

Monoid (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

mempty :: Array a Source #

mappend :: Array a -> Array a -> Array a Source #

mconcat :: [Array a] -> Array a Source #

Monoid (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

mempty :: PrimArray a Source #

mappend :: PrimArray a -> PrimArray a -> PrimArray a Source #

mconcat :: [PrimArray a] -> PrimArray a Source #

Monoid (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

mempty :: SmallArray a Source #

mappend :: SmallArray a -> SmallArray a -> SmallArray a Source #

mconcat :: [SmallArray a] -> SmallArray a Source #

Semigroup a => Monoid (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

mempty :: Maybe a Source #

mappend :: Maybe a -> Maybe a -> Maybe a Source #

mconcat :: [Maybe a] -> Maybe a Source #

Monoid a => Monoid (Q a)

Since: template-haskell-2.17.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

mempty :: Q a Source #

mappend :: Q a -> Q a -> Q a Source #

mconcat :: [Q a] -> Q a Source #

(Hashable a, Eq a) => Monoid (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Monoid (Vector a) 
Instance details

Defined in Data.Vector

Methods

mempty :: Vector a Source #

mappend :: Vector a -> Vector a -> Vector a Source #

mconcat :: [Vector a] -> Vector a Source #

Prim a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

mempty :: Vector a Source #

mappend :: Vector a -> Vector a -> Vector a Source #

mconcat :: [Vector a] -> Vector a Source #

Storable a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

mempty :: Vector a Source #

mappend :: Vector a -> Vector a -> Vector a Source #

mconcat :: [Vector a] -> Vector 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

Methods

mempty :: Maybe a Source #

mappend :: Maybe a -> Maybe a -> Maybe a Source #

mconcat :: [Maybe a] -> Maybe a Source #

Monoid a => Monoid (a)

Since: base-4.15

Instance details

Defined in GHC.Base

Methods

mempty :: (a) Source #

mappend :: (a) -> (a) -> (a) Source #

mconcat :: [(a)] -> (a) Source #

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 #

Monoid a => Monoid (Op a b)

mempty @(Op a b) without newtypes is mempty @(b->a) = _ -> mempty.

mempty :: Op a b
mempty = Op _ -> mempty
Instance details

Defined in Data.Functor.Contravariant

Methods

mempty :: Op a b Source #

mappend :: Op a b -> Op a b -> Op a b Source #

mconcat :: [Op a b] -> Op a b Source #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s Source #

mappend :: Proxy s -> Proxy s -> Proxy s Source #

mconcat :: [Proxy s] -> Proxy s Source #

Monoid (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: U1 p Source #

mappend :: U1 p -> U1 p -> U1 p Source #

mconcat :: [U1 p] -> U1 p Source #

Ord k => Monoid (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

mempty :: Map k v Source #

mappend :: Map k v -> Map k v -> Map k v Source #

mconcat :: [Map k v] -> Map k v Source #

(Monoid a, MonadAsync m) => Monoid (Concurrently m a) 
Instance details

Defined in Control.Monad.Class.MonadAsync

Methods

mempty :: Concurrently m a Source #

mappend :: Concurrently m a -> Concurrently m a -> Concurrently m a Source #

mconcat :: [Concurrently m a] -> Concurrently m a Source #

(Monoid a, Monoid b) => Monoid (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

mempty :: Pair a b Source #

mappend :: Pair a b -> Pair a b -> Pair a b Source #

mconcat :: [Pair a b] -> Pair a b Source #

(Eq k, Hashable k) => Monoid (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

mempty :: HashMap k v Source #

mappend :: HashMap k v -> HashMap k v -> HashMap k v Source #

mconcat :: [HashMap k v] -> HashMap k v Source #

(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 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 (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: Const a b Source #

mappend :: Const a b -> Const a b -> Const a b Source #

mconcat :: [Const a b] -> Const a b Source #

(Applicative f, Monoid a) => Monoid (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mempty :: Ap f a Source #

mappend :: Ap f a -> Ap f a -> Ap f a Source #

mconcat :: [Ap f a] -> Ap f a Source #

Alternative f => Monoid (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Alt f a Source #

mappend :: Alt f a -> Alt f a -> Alt f a Source #

mconcat :: [Alt f a] -> Alt f a Source #

Monoid (f p) => Monoid (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Rec1 f p Source #

mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p Source #

mconcat :: [Rec1 f p] -> Rec1 f p Source #

(Semigroup a, Monoid a) => Monoid (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

mempty :: Tagged s a Source #

mappend :: Tagged s a -> Tagged s a -> Tagged s a Source #

mconcat :: [Tagged s a] -> Tagged s a Source #

Monoid a => Monoid (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

mempty :: Constant a b Source #

mappend :: Constant a b -> Constant a b -> Constant a b Source #

mconcat :: [Constant a b] -> Constant a b Source #

(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 (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 c => Monoid (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: K1 i c p Source #

mappend :: K1 i c p -> K1 i c p -> K1 i c p Source #

mconcat :: [K1 i c p] -> K1 i c 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 (g a)) => Monoid (Compose f g a)

Since: base-4.16.0.0

Instance details

Defined in Data.Functor.Compose

Methods

mempty :: Compose f g a Source #

mappend :: Compose f g a -> Compose f g a -> Compose f g a Source #

mconcat :: [Compose f g a] -> Compose f g a 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 (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 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 Ratio a Source #

Rational numbers, with numerator and denominator of some Integral type.

Note that Ratio's instances inherit the deficiencies from the type parameter's. For example, Ratio Natural's Num instance has similar problems to Natural's.

Instances

Instances details
FromCBOR Rational 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Rational #

label :: Proxy Rational -> Text #

NFData1 Ratio

Available on base >=4.9

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Ratio a -> () Source #

Integral a => Lift (Ratio a :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Ratio a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Ratio a -> Code m (Ratio a) Source #

Integral a => Arbitrary (Ratio a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Ratio a) #

shrink :: Ratio a -> [Ratio a] #

(Integral a, CoArbitrary a) => CoArbitrary (Ratio a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Ratio a -> Gen b -> Gen b

(FromJSON a, Integral a) => FromJSON (Ratio a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Ratio a) #

parseJSONList :: Value -> Parser [Ratio a] #

omittedField :: Maybe (Ratio a) #

(ToJSON a, Integral a) => ToJSON (Ratio a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Ratio a -> Value #

toEncoding :: Ratio a -> Encoding #

toJSONList :: [Ratio a] -> Value #

toEncodingList :: [Ratio a] -> Encoding #

omitField :: Ratio a -> Bool #

Integral a => Enum (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

succ :: Ratio a -> Ratio a Source #

pred :: Ratio a -> Ratio a Source #

toEnum :: Int -> Ratio a Source #

fromEnum :: Ratio a -> Int Source #

enumFrom :: Ratio a -> [Ratio a] Source #

enumFromThen :: Ratio a -> Ratio a -> [Ratio a] Source #

enumFromTo :: Ratio a -> Ratio a -> [Ratio a] Source #

enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] Source #

Integral a => Num (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(+) :: Ratio a -> Ratio a -> Ratio a Source #

(-) :: Ratio a -> Ratio a -> Ratio a Source #

(*) :: Ratio a -> Ratio a -> Ratio a Source #

negate :: Ratio a -> Ratio a Source #

abs :: Ratio a -> Ratio a Source #

signum :: Ratio a -> Ratio a Source #

fromInteger :: Integer -> Ratio a Source #

(Integral a, Read a) => Read (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Read

Integral a => Fractional (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(/) :: Ratio a -> Ratio a -> Ratio a Source #

recip :: Ratio a -> Ratio a Source #

fromRational :: Rational -> Ratio a Source #

Integral a => Real (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral a => RealFrac (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

properFraction :: Integral b => Ratio a -> (b, Ratio a) Source #

truncate :: Integral b => Ratio a -> b Source #

round :: Integral b => Ratio a -> b Source #

ceiling :: Integral b => Ratio a -> b Source #

floor :: Integral b => Ratio a -> b Source #

Show a => Show (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

ToCBOR a => ToCBOR (Ratio a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Ratio a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Ratio a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Ratio a] -> Size #

NFData a => NFData (Ratio a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ratio a -> () Source #

Eq a => Eq (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

(==) :: Ratio a -> Ratio a -> Bool Source #

(/=) :: Ratio a -> Ratio a -> Bool Source #

Integral a => Ord (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

compare :: Ratio a -> Ratio a -> Ordering Source #

(<) :: Ratio a -> Ratio a -> Bool Source #

(<=) :: Ratio a -> Ratio a -> Bool Source #

(>) :: Ratio a -> Ratio a -> Bool Source #

(>=) :: Ratio a -> Ratio a -> Bool Source #

max :: Ratio a -> Ratio a -> Ratio a Source #

min :: Ratio a -> Ratio a -> Ratio a Source #

Hashable a => Hashable (Ratio a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ratio a -> Int #

hash :: Ratio a -> Int

data Void Source #

Uninhabited data type

Since: base-4.8.0.0

Instances

Instances details
FromJSON Void 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Void #

parseJSONList :: Value -> Parser [Void] #

omittedField :: Maybe Void #

FromJSONKey Void 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Void

fromJSONKeyList :: FromJSONKeyFunction [Void]

ToJSON Void 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Void -> Value #

toEncoding :: Void -> Encoding #

toJSONList :: [Void] -> Value #

toEncodingList :: [Void] -> Encoding #

omitField :: Void -> Bool #

ToJSONKey Void 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Void

toJSONKeyList :: ToJSONKeyFunction [Void]

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Exception Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Exception.Type

Generic Void 
Instance details

Defined in GHC.Generics

Associated Types

type Rep Void :: Type -> Type Source #

Methods

from :: Void -> Rep Void x Source #

to :: Rep Void x -> Void Source #

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 GHC.Read

Show Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

FromCBOR Void 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Void #

label :: Proxy Void -> Text #

ToCBOR Void 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Void -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Void -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Void] -> Size #

NFData Void

Defined as rnf = absurd.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Void -> () Source #

Eq Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Base

Methods

(==) :: Void -> Void -> Bool Source #

(/=) :: Void -> Void -> Bool Source #

Ord Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Base

Hashable Void 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Void -> Int #

hash :: Void -> Int

Lift Void

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => Void -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Void -> Code m Void Source #

type Rep Void

Since: base-4.8.0.0

Instance details

Defined in GHC.Generics

type Rep Void = D1 ('MetaData "Void" "GHC.Base" "base" 'False) (V1 :: Type -> Type)

data NonEmpty a Source #

Non-empty (and non-strict) list type.

Since: base-4.9.0.0

Constructors

a :| [a] infixr 5 

Instances

Instances details
FromJSON1 NonEmpty 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (NonEmpty a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [NonEmpty a]

liftOmittedField :: Maybe a -> Maybe (NonEmpty a)

ToJSON1 NonEmpty 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> NonEmpty a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [NonEmpty a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> NonEmpty a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [NonEmpty a] -> Encoding

liftOmitField :: (a -> Bool) -> NonEmpty a -> Bool

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => NonEmpty m -> m Source #

foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m Source #

foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m Source #

foldr :: (a -> b -> b) -> b -> NonEmpty a -> b Source #

foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b Source #

foldl :: (b -> a -> b) -> b -> NonEmpty a -> b Source #

foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b Source #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a Source #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a Source #

toList :: NonEmpty a -> [a] Source #

null :: NonEmpty a -> Bool Source #

length :: NonEmpty a -> Int Source #

elem :: Eq a => a -> NonEmpty a -> Bool Source #

maximum :: Ord a => NonEmpty a -> a Source #

minimum :: Ord a => NonEmpty a -> a Source #

sum :: Num a => NonEmpty a -> a Source #

product :: Num a => NonEmpty a -> a Source #

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) Source #

sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) Source #

mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) Source #

sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) Source #

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a -> NonEmpty a Source #

(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b Source #

liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source #

(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source #

(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a Source #

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> NonEmpty a -> NonEmpty b Source #

(<$) :: a -> NonEmpty b -> NonEmpty a Source #

Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b Source #

(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source #

return :: a -> NonEmpty a Source #

NFData1 NonEmpty

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> NonEmpty a -> () Source #

Hashable1 NonEmpty 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> NonEmpty a -> Int

Generic1 NonEmpty 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 NonEmpty :: k -> Type Source #

Methods

from1 :: forall (a :: k). NonEmpty a -> Rep1 NonEmpty a Source #

to1 :: forall (a :: k). Rep1 NonEmpty a -> NonEmpty a Source #

Lift a => Lift (NonEmpty a :: Type)

Since: template-haskell-2.15.0.0

Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Quote m => NonEmpty a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => NonEmpty a -> Code m (NonEmpty a) Source #

FromJSON a => FromJSON (NonEmpty a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (NonEmpty a) #

parseJSONList :: Value -> Parser [NonEmpty a] #

omittedField :: Maybe (NonEmpty a) #

ToJSON a => ToJSON (NonEmpty a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: NonEmpty a -> Value #

toEncoding :: NonEmpty a -> Encoding #

toJSONList :: [NonEmpty a] -> Value #

toEncodingList :: [NonEmpty a] -> Encoding #

omitField :: NonEmpty a -> Bool #

Semigroup (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Generic (NonEmpty a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (NonEmpty a) :: Type -> Type Source #

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x Source #

to :: Rep (NonEmpty a) x -> NonEmpty a Source #

IsList (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.IsList

Associated Types

type Item (NonEmpty a) Source #

Read a => Read (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Show a => Show (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

FromCBOR a => FromCBOR (NonEmpty a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (NonEmpty a) #

label :: Proxy (NonEmpty a) -> Text #

ToCBOR a => ToCBOR (NonEmpty a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: NonEmpty a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (NonEmpty a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [NonEmpty a] -> Size #

NFData a => NFData (NonEmpty a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: NonEmpty a -> () Source #

Eq a => Eq (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(==) :: NonEmpty a -> NonEmpty a -> Bool Source #

(/=) :: NonEmpty a -> NonEmpty a -> Bool Source #

Ord a => Ord (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Hashable a => Hashable (NonEmpty a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> NonEmpty a -> Int #

hash :: NonEmpty a -> Int

Corecursive (NonEmpty a) 
Instance details

Defined in Data.Functor.Foldable

Methods

embed :: Base (NonEmpty a) (NonEmpty a) -> NonEmpty a

ana :: (a0 -> Base (NonEmpty a) a0) -> a0 -> NonEmpty a

apo :: (a0 -> Base (NonEmpty a) (Either (NonEmpty a) a0)) -> a0 -> NonEmpty a

postpro :: Recursive (NonEmpty a) => (forall b. Base (NonEmpty a) b -> Base (NonEmpty a) b) -> (a0 -> Base (NonEmpty a) a0) -> a0 -> NonEmpty a

gpostpro :: (Recursive (NonEmpty a), Monad m) => (forall b. m (Base (NonEmpty a) b) -> Base (NonEmpty a) (m b)) -> (forall c. Base (NonEmpty a) c -> Base (NonEmpty a) c) -> (a0 -> Base (NonEmpty a) (m a0)) -> a0 -> NonEmpty a

Recursive (NonEmpty a) 
Instance details

Defined in Data.Functor.Foldable

Methods

project :: NonEmpty a -> Base (NonEmpty a) (NonEmpty a)

cata :: (Base (NonEmpty a) a0 -> a0) -> NonEmpty a -> a0

para :: (Base (NonEmpty a) (NonEmpty a, a0) -> a0) -> NonEmpty a -> a0

gpara :: (Corecursive (NonEmpty a), Comonad w) => (forall b. Base (NonEmpty a) (w b) -> w (Base (NonEmpty a) b)) -> (Base (NonEmpty a) (EnvT (NonEmpty a) w a0) -> a0) -> NonEmpty a -> a0

prepro :: Corecursive (NonEmpty a) => (forall b. Base (NonEmpty a) b -> Base (NonEmpty a) b) -> (Base (NonEmpty a) a0 -> a0) -> NonEmpty a -> a0

gprepro :: (Corecursive (NonEmpty a), Comonad w) => (forall b. Base (NonEmpty a) (w b) -> w (Base (NonEmpty a) b)) -> (forall c. Base (NonEmpty a) c -> Base (NonEmpty a) c) -> (Base (NonEmpty a) (w a0) -> a0) -> NonEmpty a -> a0

One (NonEmpty a) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (NonEmpty a) #

Methods

one :: OneItem (NonEmpty a) -> NonEmpty a #

type Rep1 NonEmpty

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (NonEmpty a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Item (NonEmpty a) 
Instance details

Defined in GHC.IsList

type Item (NonEmpty a) = a
type Base (NonEmpty a) 
Instance details

Defined in Data.Functor.Foldable

type Base (NonEmpty a) = NonEmptyF a
type OneItem (NonEmpty a) 
Instance details

Defined in Relude.Container.One

type OneItem (NonEmpty a) = a

data CallStack Source #

CallStacks are a lightweight method of obtaining a partial call-stack at any point in the program.

A function can request its call-site with the HasCallStack constraint. For example, we can define

putStrLnWithCallStack :: HasCallStack => String -> IO ()

as a variant of putStrLn that will get its call-site and print it, along with the string given as argument. We can access the call-stack inside putStrLnWithCallStack with callStack.

>>> :{
putStrLnWithCallStack :: HasCallStack => String -> IO ()
putStrLnWithCallStack msg = do
  putStrLn msg
  putStrLn (prettyCallStack callStack)
:}

Thus, if we call putStrLnWithCallStack we will get a formatted call-stack alongside our string.

>>> putStrLnWithCallStack "hello"
hello
CallStack (from HasCallStack):
  putStrLnWithCallStack, called at <interactive>:... in interactive:Ghci...

GHC solves HasCallStack constraints in three steps:

  1. If there is a CallStack in scope -- i.e. the enclosing function has a HasCallStack constraint -- GHC will append the new call-site to the existing CallStack.
  2. If there is no CallStack in scope -- e.g. in the GHCi session above -- and the enclosing definition does not have an explicit type signature, GHC will infer a HasCallStack constraint for the enclosing definition (subject to the monomorphism restriction).
  3. If there is no CallStack in scope and the enclosing definition has an explicit type signature, GHC will solve the HasCallStack constraint for the singleton CallStack containing just the current call-site.

CallStacks do not interact with the RTS and do not require compilation with -prof. On the other hand, as they are built up explicitly via the HasCallStack constraints, they will generally not contain as much information as the simulated call-stacks maintained by the RTS.

A CallStack is a [(String, SrcLoc)]. The String is the name of function that was called, the SrcLoc is the call-site. The list is ordered with the most recently called function at the head.

NOTE: The intrepid user may notice that HasCallStack is just an alias for an implicit parameter ?callStack :: CallStack. This is an implementation detail and should not be considered part of the CallStack API, we may decide to change the implementation in the future.

Since: base-4.8.1.0

Instances

Instances details
IsList CallStack

Be aware that 'fromList . toList = id' only for unfrozen CallStacks, since toList removes frozenness information.

Since: base-4.9.0.0

Instance details

Defined in GHC.IsList

Associated Types

type Item CallStack Source #

Show CallStack

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

NFData CallStack

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CallStack -> () Source #

type Item CallStack 
Instance details

Defined in GHC.IsList

type family CmpNat (a :: Natural) (b :: Natural) :: Ordering where ... Source #

Comparison of type-level naturals, as a function.

Since: base-4.7.0.0

data Text Source #

A space efficient, packed, unboxed Unicode text type.

Instances

Instances details
FromJSON Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Text #

parseJSONList :: Value -> Parser [Text] #

omittedField :: Maybe Text #

FromJSONKey Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction Text

fromJSONKeyList :: FromJSONKeyFunction [Text]

ToJSON Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Text -> Value #

toEncoding :: Text -> Encoding #

toJSONList :: [Text] -> Value #

toEncodingList :: [Text] -> Encoding #

omitField :: Text -> Bool #

ToJSONKey Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction Text

toJSONKeyList :: ToJSONKeyFunction [Text]

FromCBOR Text 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Text #

label :: Proxy Text -> Text #

ToCBOR Text 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Text -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Text -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Text] -> Size #

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int

One Text 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem Text #

Methods

one :: OneItem Text -> Text #

ToLText Text 
Instance details

Defined in Relude.String.Conversion

Methods

toLText :: Text -> LText #

ToString Text 
Instance details

Defined in Relude.String.Conversion

Methods

toString :: Text -> String #

ToText Text 
Instance details

Defined in Relude.String.Conversion

Methods

toText :: Text -> Text #

ConvertUtf8 Text ByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 Text ShortByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 Text LByteString 
Instance details

Defined in Relude.String.Conversion

LazyStrict LText Text 
Instance details

Defined in Relude.String.Conversion

Methods

toLazy :: Text -> LText #

toStrict :: LText -> Text #

type Item Text 
Instance details

Defined in Data.Text

type Item Text = Char
type OneItem Text 
Instance details

Defined in Relude.Container.One

type HasCallStack = ?callStack :: CallStack Source #

Request a CallStack.

NOTE: The implicit parameter ?callStack :: CallStack is an implementation detail and should not be considered part of the CallStack API, we may decide to change the implementation in the future.

Since: base-4.9.0.0

data SomeException Source #

The SomeException type is the root of the exception type hierarchy. When an exception of type e is thrown, behind the scenes it is encapsulated in a SomeException.

Constructors

Exception e => SomeException e 

class Applicative f => Alternative (f :: Type -> Type) where Source #

A monoid on applicative functors.

If defined, some and many should be the least solutions of the equations:

Minimal complete definition

empty, (<|>)

Methods

empty :: f a Source #

The identity of <|>

(<|>) :: f a -> f a -> f a infixl 3 Source #

An associative binary operation

some :: f a -> f [a] Source #

One or more.

many :: f a -> f [a] Source #

Zero or more.

Instances

Instances details
Alternative IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

empty :: IResult a Source #

(<|>) :: IResult a -> IResult a -> IResult a Source #

some :: IResult a -> IResult [a] Source #

many :: IResult a -> IResult [a] Source #

Alternative Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

empty :: Parser a Source #

(<|>) :: Parser a -> Parser a -> Parser a Source #

some :: Parser a -> Parser [a] Source #

many :: Parser a -> Parser [a] Source #

Alternative Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

empty :: Result a Source #

(<|>) :: Result a -> Result a -> Result a Source #

some :: Result a -> Result [a] Source #

many :: Result a -> Result [a] Source #

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Alternative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: P a Source #

(<|>) :: P a -> P a -> P a Source #

some :: P a -> P [a] Source #

many :: P a -> P [a] Source #

Alternative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: ReadP a Source #

(<|>) :: ReadP a -> ReadP a -> ReadP a Source #

some :: ReadP a -> ReadP [a] Source #

many :: ReadP a -> ReadP [a] Source #

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a Source #

(<|>) :: Seq a -> Seq a -> Seq a Source #

some :: Seq a -> Seq [a] Source #

many :: Seq a -> Seq [a] Source #

Alternative DList 
Instance details

Defined in Data.DList.Internal

Methods

empty :: DList a Source #

(<|>) :: DList a -> DList a -> DList a Source #

some :: DList a -> DList [a] Source #

many :: DList a -> DList [a] Source #

Alternative Weighted 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

empty :: Weighted a Source #

(<|>) :: Weighted a -> Weighted a -> Weighted a Source #

some :: Weighted a -> Weighted [a] Source #

many :: Weighted a -> Weighted [a] Source #

Alternative IO

Takes the first non-throwing IO action's result. empty throws an exception.

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a Source #

(<|>) :: IO a -> IO a -> IO a Source #

some :: IO a -> IO [a] Source #

many :: IO a -> IO [a] Source #

Alternative Array 
Instance details

Defined in Data.Primitive.Array

Methods

empty :: Array a Source #

(<|>) :: Array a -> Array a -> Array a Source #

some :: Array a -> Array [a] Source #

many :: Array a -> Array [a] Source #

Alternative SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

empty :: SmallArray a Source #

(<|>) :: SmallArray a -> SmallArray a -> SmallArray a Source #

some :: SmallArray a -> SmallArray [a] Source #

many :: SmallArray a -> SmallArray [a] Source #

Alternative Vector 
Instance details

Defined in Data.Vector

Methods

empty :: Vector a Source #

(<|>) :: Vector a -> Vector a -> Vector a Source #

some :: Vector a -> Vector [a] Source #

many :: Vector a -> Vector [a] Source #

Alternative Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a Source #

(<|>) :: Maybe a -> Maybe a -> Maybe a Source #

some :: Maybe a -> Maybe [a] Source #

many :: Maybe a -> Maybe [a] Source #

Alternative List

Combines lists by concatenation, starting from the empty list.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: [a] Source #

(<|>) :: [a] -> [a] -> [a] Source #

some :: [a] -> [[a]] Source #

many :: [a] -> [[a]] Source #

MonadPlus m => Alternative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

ArrowPlus a => Alternative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: ArrowMonad a a0 Source #

(<|>) :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 Source #

some :: ArrowMonad a a0 -> ArrowMonad a [a0] Source #

many :: ArrowMonad a a0 -> ArrowMonad a [a0] Source #

Alternative (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

empty :: Proxy a Source #

(<|>) :: Proxy a -> Proxy a -> Proxy a Source #

some :: Proxy a -> Proxy [a] Source #

many :: Proxy a -> Proxy [a] Source #

Alternative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: U1 a Source #

(<|>) :: U1 a -> U1 a -> U1 a Source #

some :: U1 a -> U1 [a] Source #

many :: U1 a -> U1 [a] Source #

Alternative v => Alternative (Free v) 
Instance details

Defined in Control.Monad.Free

Methods

empty :: Free v a Source #

(<|>) :: Free v a -> Free v a -> Free v a Source #

some :: Free v a -> Free v [a] Source #

many :: Free v a -> Free v [a] Source #

(MonadAsync m, MonadTimer m) => Alternative (Concurrently m) 
Instance details

Defined in Control.Monad.Class.MonadAsync

Methods

empty :: Concurrently m a Source #

(<|>) :: Concurrently m a -> Concurrently m a -> Concurrently m a Source #

some :: Concurrently m a -> Concurrently m [a] Source #

many :: Concurrently m a -> Concurrently m [a] Source #

Alternative f => Alternative (Lift f)

A combination is Pure only either part is.

Instance details

Defined in Control.Applicative.Lift

Methods

empty :: Lift f a Source #

(<|>) :: Lift f a -> Lift f a -> Lift f a Source #

some :: Lift f a -> Lift f [a] Source #

many :: Lift f a -> Lift f [a] Source #

(Functor m, Monad m) => Alternative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

empty :: MaybeT m a Source #

(<|>) :: MaybeT m a -> MaybeT m a -> MaybeT m a Source #

some :: MaybeT m a -> MaybeT m [a] Source #

many :: MaybeT m a -> MaybeT m [a] Source #

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 Source #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 Source #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] Source #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] Source #

Alternative m => Alternative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: Kleisli m a a0 Source #

(<|>) :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 Source #

some :: Kleisli m a a0 -> Kleisli m a [a0] Source #

many :: Kleisli m a a0 -> Kleisli m a [a0] Source #

Alternative f => Alternative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

empty :: Ap f a Source #

(<|>) :: Ap f a -> Ap f a -> Ap f a Source #

some :: Ap f a -> Ap f [a] Source #

many :: Ap f a -> Ap f [a] Source #

Alternative f => Alternative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

empty :: Alt f a Source #

(<|>) :: Alt f a -> Alt f a -> Alt f a Source #

some :: Alt f a -> Alt f [a] Source #

many :: Alt f a -> Alt f [a] Source #

(Generic1 f, Alternative (Rep1 f)) => Alternative (Generically1 f)

Since: base-4.17.0.0

Instance details

Defined in GHC.Generics

Alternative f => Alternative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: Rec1 f a Source #

(<|>) :: Rec1 f a -> Rec1 f a -> Rec1 f a Source #

some :: Rec1 f a -> Rec1 f [a] Source #

many :: Rec1 f a -> Rec1 f [a] Source #

(Functor f, MonadPlus m) => Alternative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

empty :: FreeT f m a Source #

(<|>) :: FreeT f m a -> FreeT f m a -> FreeT f m a Source #

some :: FreeT f m a -> FreeT f m [a] Source #

many :: FreeT f m a -> FreeT f m [a] Source #

Alternative f => Alternative (Backwards f)

Try alternatives in the same order as f.

Instance details

Defined in Control.Applicative.Backwards

Methods

empty :: Backwards f a Source #

(<|>) :: Backwards f a -> Backwards f a -> Backwards f a Source #

some :: Backwards f a -> Backwards f [a] Source #

many :: Backwards f a -> Backwards f [a] Source #

(Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

empty :: ExceptT e m a Source #

(<|>) :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

some :: ExceptT e m a -> ExceptT e m [a] Source #

many :: ExceptT e m a -> ExceptT e m [a] Source #

Alternative m => Alternative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

empty :: IdentityT m a Source #

(<|>) :: IdentityT m a -> IdentityT m a -> IdentityT m a Source #

some :: IdentityT m a -> IdentityT m [a] Source #

many :: IdentityT m a -> IdentityT m [a] Source #

Alternative m => Alternative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a Source #

(<|>) :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a Source #

some :: ReaderT r m a -> ReaderT r m [a] Source #

many :: ReaderT r m a -> ReaderT r m [a] Source #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

empty :: StateT s m a Source #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a Source #

some :: StateT s m a -> StateT s m [a] Source #

many :: StateT s m a -> StateT s m [a] Source #

Alternative f => Alternative (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

empty :: Reverse f a Source #

(<|>) :: Reverse f a -> Reverse f a -> Reverse f a Source #

some :: Reverse f a -> Reverse f [a] Source #

many :: Reverse f a -> Reverse f [a] Source #

(Alternative f, Alternative g) => Alternative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :*: g) a Source #

(<|>) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a Source #

some :: (f :*: g) a -> (f :*: g) [a] Source #

many :: (f :*: g) a -> (f :*: g) [a] Source #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a Source #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a Source #

some :: Compose f g a -> Compose f g [a] Source #

many :: Compose f g a -> Compose f g [a] Source #

(Alternative f, Applicative g) => Alternative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :.: g) a Source #

(<|>) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a Source #

some :: (f :.: g) a -> (f :.: g) [a] Source #

many :: (f :.: g) a -> (f :.: g) [a] Source #

Alternative f => Alternative (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: M1 i c f a Source #

(<|>) :: M1 i c f a -> M1 i c f a -> M1 i c f a Source #

some :: M1 i c f a -> M1 i c f [a] Source #

many :: M1 i c f a -> M1 i c f [a] Source #

newtype Down a Source #

The Down type allows you to reverse sort order conveniently. A value of type Down a contains a value of type a (represented as Down a).

If a has an Ord instance associated with it then comparing two values thus wrapped will give you the opposite of their normal sort order. This is particularly useful when sorting in generalised list comprehensions, as in: then sortWith by Down x.

>>> compare True False
GT
>>> compare (Down True) (Down False)
LT

If a has a Bounded instance then the wrapped instance also respects the reversed ordering by exchanging the values of minBound and maxBound.

>>> minBound :: Int
-9223372036854775808
>>> minBound :: Down Int
Down 9223372036854775807

All other instances of Down a behave as they do for a.

Since: base-4.6.0.0

Constructors

Down 

Fields

Instances

Instances details
FromJSON1 Down 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Down a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Down a]

liftOmittedField :: Maybe a -> Maybe (Down a)

ToJSON1 Down 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Down a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Down a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Down a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Down a] -> Encoding

liftOmitField :: (a -> Bool) -> Down a -> Bool

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Down m -> m Source #

foldMap :: Monoid m => (a -> m) -> Down a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Down a -> m Source #

foldr :: (a -> b -> b) -> b -> Down a -> b Source #

foldr' :: (a -> b -> b) -> b -> Down a -> b Source #

foldl :: (b -> a -> b) -> b -> Down a -> b Source #

foldl' :: (b -> a -> b) -> b -> Down a -> b Source #

foldr1 :: (a -> a -> a) -> Down a -> a Source #

foldl1 :: (a -> a -> a) -> Down a -> a Source #

toList :: Down a -> [a] Source #

null :: Down a -> Bool Source #

length :: Down a -> Int Source #

elem :: Eq a => a -> Down a -> Bool Source #

maximum :: Ord a => Down a -> a Source #

minimum :: Ord a => Down a -> a Source #

sum :: Num a => Down a -> a Source #

product :: Num a => Down a -> a Source #

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Down a -> f (Down b) Source #

sequenceA :: Applicative f => Down (f a) -> f (Down a) Source #

mapM :: Monad m => (a -> m b) -> Down a -> m (Down b) Source #

sequence :: Monad m => Down (m a) -> m (Down a) Source #

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

pure :: a -> Down a Source #

(<*>) :: Down (a -> b) -> Down a -> Down b Source #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c Source #

(*>) :: Down a -> Down b -> Down b Source #

(<*) :: Down a -> Down b -> Down a Source #

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

fmap :: (a -> b) -> Down a -> Down b Source #

(<$) :: a -> Down b -> Down a Source #

Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(>>=) :: Down a -> (a -> Down b) -> Down b Source #

(>>) :: Down a -> Down b -> Down b Source #

return :: a -> Down a Source #

NFData1 Down

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Down a -> () Source #

Generic1 Down 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Down :: k -> Type Source #

Methods

from1 :: forall (a :: k). Down a -> Rep1 Down a Source #

to1 :: forall (a :: k). Rep1 Down a -> Down a Source #

Unbox a => Vector Vector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Down a) -> ST s (Vector (Down a))

basicUnsafeThaw :: Vector (Down a) -> ST s (Mutable Vector s (Down a))

basicLength :: Vector (Down a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Down a) -> Vector (Down a)

basicUnsafeIndexM :: Vector (Down a) -> Int -> Box (Down a)

basicUnsafeCopy :: Mutable Vector s (Down a) -> Vector (Down a) -> ST s ()

elemseq :: Vector (Down a) -> Down a -> b -> b

Unbox a => MVector MVector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Down a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Down a) -> MVector s (Down a)

basicOverlaps :: MVector s (Down a) -> MVector s (Down a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Down a))

basicInitialize :: MVector s (Down a) -> ST s ()

basicUnsafeReplicate :: Int -> Down a -> ST s (MVector s (Down a))

basicUnsafeRead :: MVector s (Down a) -> Int -> ST s (Down a)

basicUnsafeWrite :: MVector s (Down a) -> Int -> Down a -> ST s ()

basicClear :: MVector s (Down a) -> ST s ()

basicSet :: MVector s (Down a) -> Down a -> ST s ()

basicUnsafeCopy :: MVector s (Down a) -> MVector s (Down a) -> ST s ()

basicUnsafeMove :: MVector s (Down a) -> MVector s (Down a) -> ST s ()

basicUnsafeGrow :: MVector s (Down a) -> Int -> ST s (MVector s (Down a))

FromJSON a => FromJSON (Down a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Down a) #

parseJSONList :: Value -> Parser [Down a] #

omittedField :: Maybe (Down a) #

ToJSON a => ToJSON (Down a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Down a -> Value #

toEncoding :: Down a -> Encoding #

toJSONList :: [Down a] -> Value #

toEncodingList :: [Down a] -> Encoding #

omitField :: Down a -> Bool #

Storable a => Storable (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

sizeOf :: Down a -> Int Source #

alignment :: Down a -> Int Source #

peekElemOff :: Ptr (Down a) -> Int -> IO (Down a) Source #

pokeElemOff :: Ptr (Down a) -> Int -> Down a -> IO () Source #

peekByteOff :: Ptr b -> Int -> IO (Down a) Source #

pokeByteOff :: Ptr b -> Int -> Down a -> IO () Source #

peek :: Ptr (Down a) -> IO (Down a) Source #

poke :: Ptr (Down a) -> Down a -> IO () Source #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a Source #

mappend :: Down a -> Down a -> Down a Source #

mconcat :: [Down a] -> Down a Source #

Semigroup a => Semigroup (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(<>) :: Down a -> Down a -> Down a Source #

sconcat :: NonEmpty (Down a) -> Down a Source #

stimes :: Integral b => b -> Down a -> Down a Source #

Bits a => Bits (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(.&.) :: Down a -> Down a -> Down a Source #

(.|.) :: Down a -> Down a -> Down a Source #

xor :: Down a -> Down a -> Down a Source #

complement :: Down a -> Down a Source #

shift :: Down a -> Int -> Down a Source #

rotate :: Down a -> Int -> Down a Source #

zeroBits :: Down a Source #

bit :: Int -> Down a Source #

setBit :: Down a -> Int -> Down a Source #

clearBit :: Down a -> Int -> Down a Source #

complementBit :: Down a -> Int -> Down a Source #

testBit :: Down a -> Int -> Bool Source #

bitSizeMaybe :: Down a -> Maybe Int Source #

bitSize :: Down a -> Int Source #

isSigned :: Down a -> Bool Source #

shiftL :: Down a -> Int -> Down a Source #

unsafeShiftL :: Down a -> Int -> Down a Source #

shiftR :: Down a -> Int -> Down a Source #

unsafeShiftR :: Down a -> Int -> Down a Source #

rotateL :: Down a -> Int -> Down a Source #

rotateR :: Down a -> Int -> Down a Source #

popCount :: Down a -> Int Source #

FiniteBits a => FiniteBits (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Bounded a => Bounded (Down a)

Swaps minBound and maxBound of the underlying type.

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

(Enum a, Bounded a, Eq a) => Enum (Down a)

Swaps succ and pred of the underlying type.

Since: base-4.18.0.0

Instance details

Defined in Data.Ord

Methods

succ :: Down a -> Down a Source #

pred :: Down a -> Down a Source #

toEnum :: Int -> Down a Source #

fromEnum :: Down a -> Int Source #

enumFrom :: Down a -> [Down a] Source #

enumFromThen :: Down a -> Down a -> [Down a] Source #

enumFromTo :: Down a -> Down a -> [Down a] Source #

enumFromThenTo :: Down a -> Down a -> Down a -> [Down a] Source #

Floating a => Floating (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

pi :: Down a Source #

exp :: Down a -> Down a Source #

log :: Down a -> Down a Source #

sqrt :: Down a -> Down a Source #

(**) :: Down a -> Down a -> Down a Source #

logBase :: Down a -> Down a -> Down a Source #

sin :: Down a -> Down a Source #

cos :: Down a -> Down a Source #

tan :: Down a -> Down a Source #

asin :: Down a -> Down a Source #

acos :: Down a -> Down a Source #

atan :: Down a -> Down a Source #

sinh :: Down a -> Down a Source #

cosh :: Down a -> Down a Source #

tanh :: Down a -> Down a Source #

asinh :: Down a -> Down a Source #

acosh :: Down a -> Down a Source #

atanh :: Down a -> Down a Source #

log1p :: Down a -> Down a Source #

expm1 :: Down a -> Down a Source #

log1pexp :: Down a -> Down a Source #

log1mexp :: Down a -> Down a Source #

RealFloat a => RealFloat (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Generic (Down a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type Source #

Methods

from :: Down a -> Rep (Down a) x Source #

to :: Rep (Down a) x -> Down a Source #

Ix a => Ix (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

range :: (Down a, Down a) -> [Down a] Source #

index :: (Down a, Down a) -> Down a -> Int Source #

unsafeIndex :: (Down a, Down a) -> Down a -> Int Source #

inRange :: (Down a, Down a) -> Down a -> Bool Source #

rangeSize :: (Down a, Down a) -> Int Source #

unsafeRangeSize :: (Down a, Down a) -> Int Source #

Num a => Num (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(+) :: Down a -> Down a -> Down a Source #

(-) :: Down a -> Down a -> Down a Source #

(*) :: Down a -> Down a -> Down a Source #

negate :: Down a -> Down a Source #

abs :: Down a -> Down a Source #

signum :: Down a -> Down a Source #

fromInteger :: Integer -> Down a Source #

Read a => Read (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Fractional a => Fractional (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(/) :: Down a -> Down a -> Down a Source #

recip :: Down a -> Down a Source #

fromRational :: Rational -> Down a Source #

Real a => Real (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

RealFrac a => RealFrac (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

properFraction :: Integral b => Down a -> (b, Down a) Source #

truncate :: Integral b => Down a -> b Source #

round :: Integral b => Down a -> b Source #

ceiling :: Integral b => Down a -> b Source #

floor :: Integral b => Down a -> b Source #

Show a => Show (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Methods

showsPrec :: Int -> Down a -> ShowS Source #

show :: Down a -> String Source #

showList :: [Down a] -> ShowS Source #

NFData a => NFData (Down a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Down a -> () Source #

Eq a => Eq (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

(==) :: Down a -> Down a -> Bool Source #

(/=) :: Down a -> Down a -> Bool Source #

Ord a => Ord (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

compare :: Down a -> Down a -> Ordering Source #

(<) :: Down a -> Down a -> Bool Source #

(<=) :: Down a -> Down a -> Bool Source #

(>) :: Down a -> Down a -> Bool Source #

(>=) :: Down a -> Down a -> Bool Source #

max :: Down a -> Down a -> Down a Source #

min :: Down a -> Down a -> Down a Source #

Unbox a => Unbox (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Down

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

type Rep1 Down = D1 ('MetaData "Down" "Data.Ord" "base" 'True) (C1 ('MetaCons "Down" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Down a) = MV_Down (MVector s a)
type Rep (Down a)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

type Rep (Down a) = D1 ('MetaData "Down" "Data.Ord" "base" 'True) (C1 ('MetaCons "Down" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Down a) = V_Down (Vector a)

data Proxy (t :: k) Source #

Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).

Historically, Proxy :: Proxy a is a safer alternative to the undefined :: a idiom.

>>> Proxy :: Proxy (Void, Int -> Int)
Proxy

Proxy can even hold types of higher kinds,

>>> Proxy :: Proxy Either
Proxy
>>> Proxy :: Proxy Functor
Proxy
>>> Proxy :: Proxy complicatedStructure
Proxy

Constructors

Proxy 

Instances

Instances details
Generic1 (Proxy :: k -> Type) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a Source #

to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a Source #

FromJSON1 (Proxy :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Proxy a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Proxy a]

liftOmittedField :: Maybe a -> Maybe (Proxy a)

ToJSON1 (Proxy :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Proxy a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Proxy a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Proxy a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Proxy a] -> Encoding

liftOmitField :: (a -> Bool) -> Proxy a -> Bool

Foldable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Proxy m -> m Source #

foldMap :: Monoid m => (a -> m) -> Proxy a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Proxy a -> m Source #

foldr :: (a -> b -> b) -> b -> Proxy a -> b Source #

foldr' :: (a -> b -> b) -> b -> Proxy a -> b Source #

foldl :: (b -> a -> b) -> b -> Proxy a -> b Source #

foldl' :: (b -> a -> b) -> b -> Proxy a -> b Source #

foldr1 :: (a -> a -> a) -> Proxy a -> a Source #

foldl1 :: (a -> a -> a) -> Proxy a -> a Source #

toList :: Proxy a -> [a] Source #

null :: Proxy a -> Bool Source #

length :: Proxy a -> Int Source #

elem :: Eq a => a -> Proxy a -> Bool Source #

maximum :: Ord a => Proxy a -> a Source #

minimum :: Ord a => Proxy a -> a Source #

sum :: Num a => Proxy a -> a Source #

product :: Num a => Proxy a -> a Source #

Contravariant (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Proxy a -> Proxy a' Source #

(>$) :: b -> Proxy b -> Proxy a Source #

Traversable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Proxy a -> f (Proxy b) Source #

sequenceA :: Applicative f => Proxy (f a) -> f (Proxy a) Source #

mapM :: Monad m => (a -> m b) -> Proxy a -> m (Proxy b) Source #

sequence :: Monad m => Proxy (m a) -> m (Proxy a) Source #

Alternative (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

empty :: Proxy a Source #

(<|>) :: Proxy a -> Proxy a -> Proxy a Source #

some :: Proxy a -> Proxy [a] Source #

many :: Proxy a -> Proxy [a] Source #

Applicative (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

pure :: a -> Proxy a Source #

(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b Source #

liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c Source #

(*>) :: Proxy a -> Proxy b -> Proxy b Source #

(<*) :: Proxy a -> Proxy b -> Proxy a Source #

Functor (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

fmap :: (a -> b) -> Proxy a -> Proxy b Source #

(<$) :: a -> Proxy b -> Proxy a Source #

Monad (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b Source #

(>>) :: Proxy a -> Proxy b -> Proxy b Source #

return :: a -> Proxy a Source #

MonadPlus (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

mzero :: Proxy a Source #

mplus :: Proxy a -> Proxy a -> Proxy a Source #

NFData1 (Proxy :: Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Proxy a -> () Source #

Hashable1 (Proxy :: Type -> Type) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Proxy a -> Int

FromJSON (Proxy a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Proxy a) #

parseJSONList :: Value -> Parser [Proxy a] #

omittedField :: Maybe (Proxy a) #

ToJSON (Proxy a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Proxy a -> Value #

toEncoding :: Proxy a -> Encoding #

toJSONList :: [Proxy a] -> Value #

toEncodingList :: [Proxy a] -> Encoding #

omitField :: Proxy a -> Bool #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s Source #

mappend :: Proxy s -> Proxy s -> Proxy s Source #

mconcat :: [Proxy s] -> Proxy s Source #

Semigroup (Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

(<>) :: Proxy s -> Proxy s -> Proxy s Source #

sconcat :: NonEmpty (Proxy s) -> Proxy s Source #

stimes :: Integral b => b -> Proxy s -> Proxy s Source #

Bounded (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Enum (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

succ :: Proxy s -> Proxy s Source #

pred :: Proxy s -> Proxy s Source #

toEnum :: Int -> Proxy s Source #

fromEnum :: Proxy s -> Int Source #

enumFrom :: Proxy s -> [Proxy s] Source #

enumFromThen :: Proxy s -> Proxy s -> [Proxy s] Source #

enumFromTo :: Proxy s -> Proxy s -> [Proxy s] Source #

enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] Source #

Generic (Proxy t) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Proxy t) :: Type -> Type Source #

Methods

from :: Proxy t -> Rep (Proxy t) x Source #

to :: Rep (Proxy t) x -> Proxy t Source #

Ix (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

range :: (Proxy s, Proxy s) -> [Proxy s] Source #

index :: (Proxy s, Proxy s) -> Proxy s -> Int Source #

unsafeIndex :: (Proxy s, Proxy s) -> Proxy s -> Int Source #

inRange :: (Proxy s, Proxy s) -> Proxy s -> Bool Source #

rangeSize :: (Proxy s, Proxy s) -> Int Source #

unsafeRangeSize :: (Proxy s, Proxy s) -> Int Source #

Read (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Show (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

NFData (Proxy a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Proxy a -> () Source #

Eq (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(==) :: Proxy s -> Proxy s -> Bool Source #

(/=) :: Proxy s -> Proxy s -> Bool Source #

Ord (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

compare :: Proxy s -> Proxy s -> Ordering Source #

(<) :: Proxy s -> Proxy s -> Bool Source #

(<=) :: Proxy s -> Proxy s -> Bool Source #

(>) :: Proxy s -> Proxy s -> Bool Source #

(>=) :: Proxy s -> Proxy s -> Bool Source #

max :: Proxy s -> Proxy s -> Proxy s Source #

min :: Proxy s -> Proxy s -> Proxy s Source #

Hashable (Proxy a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Proxy a -> Int #

hash :: Proxy a -> Int

type Rep1 (Proxy :: k -> Type)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep1 (Proxy :: k -> Type) = D1 ('MetaData "Proxy" "Data.Proxy" "base" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: k -> Type))
type Rep (Proxy t)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

type Rep (Proxy t) = D1 ('MetaData "Proxy" "Data.Proxy" "base" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: Type -> Type))

data IOMode Source #

Instances

Instances details
Enum IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ix IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Read IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Show IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Eq IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Ord IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

data SomeNat Source #

This type represents unknown type-level natural numbers.

Since: base-4.10.0.0

Constructors

KnownNat n => SomeNat (Proxy n) 

Instances

Instances details
Read SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Show SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Eq SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

Ord SomeNat

Since: base-4.7.0.0

Instance details

Defined in GHC.TypeNats

newtype Alt (f :: k -> Type) (a :: k) Source #

Monoid under <|>.

>>> getAlt (Alt (Just 12) <> Alt (Just 24))
Just 12
>>> getAlt $ Alt Nothing <> Alt (Just 24)
Just 24

Since: base-4.8.0.0

Constructors

Alt 

Fields

Instances

Instances details
Generic1 (Alt f :: k -> Type) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 (Alt f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Alt f a -> Rep1 (Alt f) a Source #

to1 :: forall (a :: k0). Rep1 (Alt f) a -> Alt f a Source #

Unbox (f a) => Vector Vector (Alt f a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Alt f a) -> ST s (Vector (Alt f a))

basicUnsafeThaw :: Vector (Alt f a) -> ST s (Mutable Vector s (Alt f a))

basicLength :: Vector (Alt f a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Alt f a) -> Vector (Alt f a)

basicUnsafeIndexM :: Vector (Alt f a) -> Int -> Box (Alt f a)

basicUnsafeCopy :: Mutable Vector s (Alt f a) -> Vector (Alt f a) -> ST s ()

elemseq :: Vector (Alt f a) -> Alt f a -> b -> b

Unbox (f a) => MVector MVector (Alt f a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Alt f a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Alt f a) -> MVector s (Alt f a)

basicOverlaps :: MVector s (Alt f a) -> MVector s (Alt f a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Alt f a))

basicInitialize :: MVector s (Alt f a) -> ST s ()

basicUnsafeReplicate :: Int -> Alt f a -> ST s (MVector s (Alt f a))

basicUnsafeRead :: MVector s (Alt f a) -> Int -> ST s (Alt f a)

basicUnsafeWrite :: MVector s (Alt f a) -> Int -> Alt f a -> ST s ()

basicClear :: MVector s (Alt f a) -> ST s ()

basicSet :: MVector s (Alt f a) -> Alt f a -> ST s ()

basicUnsafeCopy :: MVector s (Alt f a) -> MVector s (Alt f a) -> ST s ()

basicUnsafeMove :: MVector s (Alt f a) -> MVector s (Alt f a) -> ST s ()

basicUnsafeGrow :: MVector s (Alt f a) -> Int -> ST s (MVector s (Alt f a))

Foldable f => Foldable (Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Alt f m -> m 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 #

Contravariant f => Contravariant (Alt f) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Alt f a -> Alt f a' Source #

(>$) :: b -> Alt f b -> Alt 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 #

Alternative f => Alternative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

empty :: Alt f a Source #

(<|>) :: Alt f a -> Alt f a -> Alt f a Source #

some :: Alt f a -> Alt f [a] Source #

many :: Alt f a -> Alt f [a] Source #

Applicative f => Applicative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Alt f a Source #

(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b Source #

liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c Source #

(*>) :: Alt f a -> Alt f b -> Alt f b Source #

(<*) :: Alt f a -> Alt f b -> Alt 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 #

Monad f => Monad (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b Source #

(>>) :: Alt f a -> Alt f b -> Alt f b Source #

return :: a -> Alt f a Source #

MonadPlus f => MonadPlus (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mzero :: Alt f a Source #

mplus :: Alt f a -> Alt f a -> Alt f a Source #

Arbitrary (f a) => Arbitrary (Alt f a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Alt f a) #

shrink :: Alt f a -> [Alt f a] #

CoArbitrary (f a) => CoArbitrary (Alt f a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Alt f a -> Gen b -> Gen b

Alternative f => Monoid (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Alt f a Source #

mappend :: Alt f a -> Alt f a -> Alt f a Source #

mconcat :: [Alt f a] -> Alt f a Source #

Alternative f => Semigroup (Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Alt f a -> Alt f a -> Alt f a Source #

sconcat :: NonEmpty (Alt f a) -> Alt f a Source #

stimes :: Integral b => b -> Alt f a -> Alt f a Source #

Enum (f a) => Enum (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

succ :: Alt f a -> Alt f a Source #

pred :: Alt f a -> Alt f a Source #

toEnum :: Int -> Alt f a Source #

fromEnum :: Alt f a -> Int Source #

enumFrom :: Alt f a -> [Alt f a] Source #

enumFromThen :: Alt f a -> Alt f a -> [Alt f a] Source #

enumFromTo :: Alt f a -> Alt f a -> [Alt f a] Source #

enumFromThenTo :: Alt f a -> Alt f a -> Alt f a -> [Alt f a] Source #

Generic (Alt f a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Alt f a) :: Type -> Type Source #

Methods

from :: Alt f a -> Rep (Alt f a) x Source #

to :: Rep (Alt f a) x -> Alt f a Source #

Num (f a) => Num (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Alt f a -> Alt f a -> Alt f a Source #

(-) :: Alt f a -> Alt f a -> Alt f a Source #

(*) :: Alt f a -> Alt f a -> Alt f a Source #

negate :: Alt f a -> Alt f a Source #

abs :: Alt f a -> Alt f a Source #

signum :: Alt f a -> Alt f a Source #

fromInteger :: Integer -> Alt f a Source #

Read (f a) => Read (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Show (f a) => Show (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Alt f a -> ShowS Source #

show :: Alt f a -> String Source #

showList :: [Alt f a] -> ShowS Source #

Eq (f a) => Eq (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Alt f a -> Alt f a -> Bool Source #

(/=) :: Alt f a -> Alt f a -> Bool Source #

Ord (f a) => Ord (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Alt f a -> Alt f a -> Ordering Source #

(<) :: Alt f a -> Alt f a -> Bool Source #

(<=) :: Alt f a -> Alt f a -> Bool Source #

(>) :: Alt f a -> Alt f a -> Bool Source #

(>=) :: Alt f a -> Alt f a -> Bool Source #

max :: Alt f a -> Alt f a -> Alt f a Source #

min :: Alt f a -> Alt f a -> Alt f a Source #

Unbox (f a) => Unbox (Alt f a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 (Alt f :: k -> Type)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 (Alt f :: k -> Type) = D1 ('MetaData "Alt" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Alt" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAlt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f)))
newtype MVector s (Alt f a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Alt f a) = MV_Alt (MVector s (f a))
type Rep (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Alt f a) = D1 ('MetaData "Alt" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Alt" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAlt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a))))
newtype Vector (Alt f a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Alt f a) = V_Alt (Vector (f a))

newtype All Source #

Boolean monoid under conjunction (&&).

>>> getAll (All True <> mempty <> All False)
False
>>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8]))
False

Constructors

All 

Fields

Instances

Instances details
Arbitrary All 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen All #

shrink :: All -> [All] #

CoArbitrary All 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: All -> Gen b -> Gen b

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: All -> All -> All Source #

sconcat :: NonEmpty All -> All Source #

stimes :: Integral b => b -> All -> All Source #

Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type Source #

Methods

from :: All -> Rep All x Source #

to :: Rep All x -> All Source #

Read All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

NFData All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () Source #

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: All -> All -> Bool Source #

(/=) :: All -> All -> Bool Source #

Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: All -> All -> Ordering Source #

(<) :: All -> All -> Bool Source #

(<=) :: All -> All -> Bool Source #

(>) :: All -> All -> Bool Source #

(>=) :: All -> All -> Bool Source #

max :: All -> All -> All Source #

min :: All -> All -> All Source #

Unbox All 
Instance details

Defined in Data.Vector.Unboxed.Base

Vector Vector All 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s All -> ST s (Vector All)

basicUnsafeThaw :: Vector All -> ST s (Mutable Vector s All)

basicLength :: Vector All -> Int

basicUnsafeSlice :: Int -> Int -> Vector All -> Vector All

basicUnsafeIndexM :: Vector All -> Int -> Box All

basicUnsafeCopy :: Mutable Vector s All -> Vector All -> ST s ()

elemseq :: Vector All -> All -> b -> b

MVector MVector All 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s All -> Int

basicUnsafeSlice :: Int -> Int -> MVector s All -> MVector s All

basicOverlaps :: MVector s All -> MVector s All -> Bool

basicUnsafeNew :: Int -> ST s (MVector s All)

basicInitialize :: MVector s All -> ST s ()

basicUnsafeReplicate :: Int -> All -> ST s (MVector s All)

basicUnsafeRead :: MVector s All -> Int -> ST s All

basicUnsafeWrite :: MVector s All -> Int -> All -> ST s ()

basicClear :: MVector s All -> ST s ()

basicSet :: MVector s All -> All -> ST s ()

basicUnsafeCopy :: MVector s All -> MVector s All -> ST s ()

basicUnsafeMove :: MVector s All -> MVector s All -> ST s ()

basicUnsafeGrow :: MVector s All -> Int -> ST s (MVector s All)

type Rep All

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep All = D1 ('MetaData "All" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "All" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAll") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
newtype Vector All 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector All = V_All (Vector Bool)
newtype MVector s All 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s All = MV_All (MVector s Bool)

newtype Endo a Source #

The monoid of endomorphisms under composition.

>>> let computation = Endo ("Hello, " ++) <> Endo (++ "!")
>>> appEndo computation "Haskell"
"Hello, Haskell!"

Constructors

Endo 

Fields

Instances

Instances details
(Arbitrary a, CoArbitrary a) => Arbitrary (Endo a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Endo a) #

shrink :: Endo a -> [Endo a] #

(Arbitrary a, CoArbitrary a) => CoArbitrary (Endo a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Endo a -> Gen b -> Gen b

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a Source #

mappend :: Endo a -> Endo a -> Endo a Source #

mconcat :: [Endo a] -> Endo a Source #

Semigroup (Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Endo a -> Endo a -> Endo a Source #

sconcat :: NonEmpty (Endo a) -> Endo a Source #

stimes :: Integral b => b -> Endo a -> Endo a Source #

Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type Source #

Methods

from :: Endo a -> Rep (Endo a) x Source #

to :: Rep (Endo a) x -> Endo a Source #

type Rep (Endo a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Endo a) = D1 ('MetaData "Endo" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Endo" 'PrefixI 'True) (S1 ('MetaSel ('Just "appEndo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a -> a))))

newtype Dual a Source #

The dual of a Monoid, obtained by swapping the arguments of mappend.

>>> getDual (mappend (Dual "Hello") (Dual "World"))
"WorldHello"

Constructors

Dual 

Fields

Instances

Instances details
FromJSON1 Dual 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Dual a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Dual a]

liftOmittedField :: Maybe a -> Maybe (Dual a)

ToJSON1 Dual 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Dual a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Dual a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Dual a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Dual a] -> Encoding

liftOmitField :: (a -> Bool) -> Dual a -> Bool

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Dual m -> m Source #

foldMap :: Monoid m => (a -> m) -> Dual a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Dual a -> m Source #

foldr :: (a -> b -> b) -> b -> Dual a -> b Source #

foldr' :: (a -> b -> b) -> b -> Dual a -> b Source #

foldl :: (b -> a -> b) -> b -> Dual a -> b Source #

foldl' :: (b -> a -> b) -> b -> Dual a -> b Source #

foldr1 :: (a -> a -> a) -> Dual a -> a Source #

foldl1 :: (a -> a -> a) -> Dual a -> a Source #

toList :: Dual a -> [a] Source #

null :: Dual a -> Bool Source #

length :: Dual a -> Int Source #

elem :: Eq a => a -> Dual a -> Bool Source #

maximum :: Ord a => Dual a -> a Source #

minimum :: Ord a => Dual a -> a Source #

sum :: Num a => Dual a -> a Source #

product :: Num a => Dual a -> a Source #

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) Source #

sequenceA :: Applicative f => Dual (f a) -> f (Dual a) Source #

mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) Source #

sequence :: Monad m => Dual (m a) -> m (Dual a) Source #

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Dual a Source #

(<*>) :: Dual (a -> b) -> Dual a -> Dual b Source #

liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c Source #

(*>) :: Dual a -> Dual b -> Dual b Source #

(<*) :: Dual a -> Dual b -> Dual a Source #

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Dual a -> Dual b Source #

(<$) :: a -> Dual b -> Dual a Source #

Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Dual a -> (a -> Dual b) -> Dual b Source #

(>>) :: Dual a -> Dual b -> Dual b Source #

return :: a -> Dual a Source #

NFData1 Dual

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Dual a -> () Source #

Generic1 Dual 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Dual :: k -> Type Source #

Methods

from1 :: forall (a :: k). Dual a -> Rep1 Dual a Source #

to1 :: forall (a :: k). Rep1 Dual a -> Dual a Source #

Unbox a => Vector Vector (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Dual a) -> ST s (Vector (Dual a))

basicUnsafeThaw :: Vector (Dual a) -> ST s (Mutable Vector s (Dual a))

basicLength :: Vector (Dual a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Dual a) -> Vector (Dual a)

basicUnsafeIndexM :: Vector (Dual a) -> Int -> Box (Dual a)

basicUnsafeCopy :: Mutable Vector s (Dual a) -> Vector (Dual a) -> ST s ()

elemseq :: Vector (Dual a) -> Dual a -> b -> b

Unbox a => MVector MVector (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Dual a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Dual a) -> MVector s (Dual a)

basicOverlaps :: MVector s (Dual a) -> MVector s (Dual a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Dual a))

basicInitialize :: MVector s (Dual a) -> ST s ()

basicUnsafeReplicate :: Int -> Dual a -> ST s (MVector s (Dual a))

basicUnsafeRead :: MVector s (Dual a) -> Int -> ST s (Dual a)

basicUnsafeWrite :: MVector s (Dual a) -> Int -> Dual a -> ST s ()

basicClear :: MVector s (Dual a) -> ST s ()

basicSet :: MVector s (Dual a) -> Dual a -> ST s ()

basicUnsafeCopy :: MVector s (Dual a) -> MVector s (Dual a) -> ST s ()

basicUnsafeMove :: MVector s (Dual a) -> MVector s (Dual a) -> ST s ()

basicUnsafeGrow :: MVector s (Dual a) -> Int -> ST s (MVector s (Dual a))

Arbitrary a => Arbitrary (Dual a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Dual a) #

shrink :: Dual a -> [Dual a] #

CoArbitrary a => CoArbitrary (Dual a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Dual a -> Gen b -> Gen b

FromJSON a => FromJSON (Dual a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Dual a) #

parseJSONList :: Value -> Parser [Dual a] #

omittedField :: Maybe (Dual a) #

ToJSON a => ToJSON (Dual a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Dual a -> Value #

toEncoding :: Dual a -> Encoding #

toJSONList :: [Dual a] -> Value #

toEncodingList :: [Dual a] -> Encoding #

omitField :: Dual a -> Bool #

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a Source #

mappend :: Dual a -> Dual a -> Dual a Source #

mconcat :: [Dual a] -> Dual a Source #

Semigroup a => Semigroup (Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Dual a -> Dual a -> Dual a Source #

sconcat :: NonEmpty (Dual a) -> Dual a Source #

stimes :: Integral b => b -> Dual a -> Dual a Source #

Bounded a => Bounded (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Generic (Dual a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type Source #

Methods

from :: Dual a -> Rep (Dual a) x Source #

to :: Rep (Dual a) x -> Dual a Source #

Read a => Read (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Dual a -> ShowS Source #

show :: Dual a -> String Source #

showList :: [Dual a] -> ShowS Source #

NFData a => NFData (Dual a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Dual a -> () Source #

Eq a => Eq (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Dual a -> Dual a -> Bool Source #

(/=) :: Dual a -> Dual a -> Bool Source #

Ord a => Ord (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Dual a -> Dual a -> Ordering Source #

(<) :: Dual a -> Dual a -> Bool Source #

(<=) :: Dual a -> Dual a -> Bool Source #

(>) :: Dual a -> Dual a -> Bool Source #

(>=) :: Dual a -> Dual a -> Bool Source #

max :: Dual a -> Dual a -> Dual a Source #

min :: Dual a -> Dual a -> Dual a Source #

Unbox a => Unbox (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Dual

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Dual = D1 ('MetaData "Dual" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Dual" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Dual a) = MV_Dual (MVector s a)
type Rep (Dual a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Dual a) = D1 ('MetaData "Dual" "Data.Semigroup.Internal" "base" 'True) (C1 ('MetaCons "Dual" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDual") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Dual a) = V_Dual (Vector a)

newtype Ap (f :: k -> Type) (a :: k) Source #

This data type witnesses the lifting of a Monoid into an Applicative pointwise.

Since: base-4.12.0.0

Constructors

Ap 

Fields

Instances

Instances details
Generic1 (Ap f :: k -> Type) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 (Ap f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Ap f a -> Rep1 (Ap f) a Source #

to1 :: forall (a :: k0). Rep1 (Ap f) a -> Ap f a Source #

MonadFail f => MonadFail (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fail :: String -> Ap f a Source #

Foldable f => Foldable (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Ap f m -> m Source #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Ap f a -> m Source #

foldr :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b Source #

foldl :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b Source #

foldr1 :: (a -> a -> a) -> Ap f a -> a Source #

foldl1 :: (a -> a -> a) -> Ap f a -> a Source #

toList :: Ap f a -> [a] Source #

null :: Ap f a -> Bool Source #

length :: Ap f a -> Int Source #

elem :: Eq a => a -> Ap f a -> Bool Source #

maximum :: Ord a => Ap f a -> a Source #

minimum :: Ord a => Ap f a -> a Source #

sum :: Num a => Ap f a -> a Source #

product :: Num a => Ap f a -> a Source #

Traversable f => Traversable (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Ap f a -> f0 (Ap f b) Source #

sequenceA :: Applicative f0 => Ap f (f0 a) -> f0 (Ap f a) Source #

mapM :: Monad m => (a -> m b) -> Ap f a -> m (Ap f b) Source #

sequence :: Monad m => Ap f (m a) -> m (Ap f a) Source #

Alternative f => Alternative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

empty :: Ap f a Source #

(<|>) :: Ap f a -> Ap f a -> Ap f a Source #

some :: Ap f a -> Ap f [a] Source #

many :: Ap f a -> Ap f [a] Source #

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 #

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 #

Monad f => Monad (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b Source #

(>>) :: Ap f a -> Ap f b -> Ap f b Source #

return :: a -> Ap f a Source #

MonadPlus f => MonadPlus (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mzero :: Ap f a Source #

mplus :: Ap f a -> Ap f a -> Ap f a Source #

(Applicative f, Monoid a) => Monoid (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mempty :: Ap f a Source #

mappend :: Ap f a -> Ap f a -> Ap f a Source #

mconcat :: [Ap f a] -> Ap f a Source #

(Applicative f, Semigroup a) => Semigroup (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Ap f a -> Ap f a -> Ap f a Source #

sconcat :: NonEmpty (Ap f a) -> Ap f a Source #

stimes :: Integral b => b -> Ap f a -> Ap f a Source #

(Applicative f, Bounded a) => Bounded (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

minBound :: Ap f a Source #

maxBound :: Ap f a Source #

Enum (f a) => Enum (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

succ :: Ap f a -> Ap f a Source #

pred :: Ap f a -> Ap f a Source #

toEnum :: Int -> Ap f a Source #

fromEnum :: Ap f a -> Int Source #

enumFrom :: Ap f a -> [Ap f a] Source #

enumFromThen :: Ap f a -> Ap f a -> [Ap f a] Source #

enumFromTo :: Ap f a -> Ap f a -> [Ap f a] Source #

enumFromThenTo :: Ap f a -> Ap f a -> Ap f a -> [Ap f a] Source #

Generic (Ap f a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type Source #

Methods

from :: Ap f a -> Rep (Ap f a) x Source #

to :: Rep (Ap f a) x -> Ap f a Source #

(Applicative f, Num a) => Num (Ap f a)

Note that even if the underlying Num and Applicative instances are lawful, for most Applicatives, this instance will not be lawful. If you use this instance with the list Applicative, the following customary laws will not hold:

Commutativity:

>>> Ap [10,20] + Ap [1,2]
Ap {getAp = [11,12,21,22]}
>>> Ap [1,2] + Ap [10,20]
Ap {getAp = [11,21,12,22]}

Additive inverse:

>>> Ap [] + negate (Ap [])
Ap {getAp = []}
>>> fromInteger 0 :: Ap [] Int
Ap {getAp = [0]}

Distributivity:

>>> Ap [1,2] * (3 + 4)
Ap {getAp = [7,14]}
>>> (Ap [1,2] * 3) + (Ap [1,2] * 4)
Ap {getAp = [7,11,10,14]}

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(+) :: Ap f a -> Ap f a -> Ap f a Source #

(-) :: Ap f a -> Ap f a -> Ap f a Source #

(*) :: Ap f a -> Ap f a -> Ap f a Source #

negate :: Ap f a -> Ap f a Source #

abs :: Ap f a -> Ap f a Source #

signum :: Ap f a -> Ap f a Source #

fromInteger :: Integer -> Ap f a Source #

Read (f a) => Read (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Show (f a) => Show (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Ap f a -> ShowS Source #

show :: Ap f a -> String Source #

showList :: [Ap f a] -> ShowS Source #

Eq (f a) => Eq (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(==) :: Ap f a -> Ap f a -> Bool Source #

(/=) :: Ap f a -> Ap f a -> Bool Source #

Ord (f a) => Ord (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

compare :: Ap f a -> Ap f a -> Ordering Source #

(<) :: Ap f a -> Ap f a -> Bool Source #

(<=) :: Ap f a -> Ap f a -> Bool Source #

(>) :: Ap f a -> Ap f a -> Bool Source #

(>=) :: Ap f a -> Ap f a -> Bool Source #

max :: Ap f a -> Ap f a -> Ap f a Source #

min :: Ap f a -> Ap f a -> Ap f a Source #

type Rep1 (Ap f :: k -> Type)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

type Rep1 (Ap f :: k -> Type) = D1 ('MetaData "Ap" "Data.Monoid" "base" 'True) (C1 ('MetaCons "Ap" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f)))
type Rep (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

type Rep (Ap f a) = D1 ('MetaData "Ap" "Data.Monoid" "base" 'True) (C1 ('MetaCons "Ap" 'PrefixI 'True) (S1 ('MetaSel ('Just "getAp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a))))

newtype Const a (b :: k) Source #

The Const functor.

Constructors

Const 

Fields

Instances

Instances details
Generic1 (Const a :: k -> Type) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep1 (Const a) :: k -> Type Source #

Methods

from1 :: forall (a0 :: k0). Const a a0 -> Rep1 (Const a) a0 Source #

to1 :: forall (a0 :: k0). Rep1 (Const a) a0 -> Const a a0 Source #

Unbox a => Vector Vector (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Const a b) -> ST s (Vector (Const a b))

basicUnsafeThaw :: Vector (Const a b) -> ST s (Mutable Vector s (Const a b))

basicLength :: Vector (Const a b) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Const a b) -> Vector (Const a b)

basicUnsafeIndexM :: Vector (Const a b) -> Int -> Box (Const a b)

basicUnsafeCopy :: Mutable Vector s (Const a b) -> Vector (Const a b) -> ST s ()

elemseq :: Vector (Const a b) -> Const a b -> b0 -> b0

Unbox a => MVector MVector (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Const a b) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Const a b) -> MVector s (Const a b)

basicOverlaps :: MVector s (Const a b) -> MVector s (Const a b) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Const a b))

basicInitialize :: MVector s (Const a b) -> ST s ()

basicUnsafeReplicate :: Int -> Const a b -> ST s (MVector s (Const a b))

basicUnsafeRead :: MVector s (Const a b) -> Int -> ST s (Const a b)

basicUnsafeWrite :: MVector s (Const a b) -> Int -> Const a b -> ST s ()

basicClear :: MVector s (Const a b) -> ST s ()

basicSet :: MVector s (Const a b) -> Const a b -> ST s ()

basicUnsafeCopy :: MVector s (Const a b) -> MVector s (Const a b) -> ST s ()

basicUnsafeMove :: MVector s (Const a b) -> MVector s (Const a b) -> ST s ()

basicUnsafeGrow :: MVector s (Const a b) -> Int -> ST s (MVector s (Const a b))

Arbitrary2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary2 :: Gen a -> Gen b -> Gen (Const a b)

liftShrink2 :: (a -> [a]) -> (b -> [b]) -> Const a b -> [Const a b]

FromJSON2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser (Const a b)

liftParseJSONList2 :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Maybe b -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser [Const a b]

liftOmittedField2 :: Maybe a -> Maybe b -> Maybe (Const a b)

ToJSON2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> Const a b -> Value

liftToJSONList2 :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> (b -> Bool) -> (b -> Value) -> ([b] -> Value) -> [Const a b] -> Value

liftToEncoding2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> Const a b -> Encoding

liftToEncodingList2 :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> (b -> Bool) -> (b -> Encoding) -> ([b] -> Encoding) -> [Const a b] -> Encoding

liftOmitField2 :: (a -> Bool) -> (b -> Bool) -> Const a b -> Bool

Bifoldable (Const :: Type -> Type -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => Const m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Const a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Const a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Const a b -> c Source #

Bifunctor (Const :: Type -> Type -> Type)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d Source #

first :: (a -> b) -> Const a c -> Const b c Source #

second :: (b -> c) -> Const a b -> Const a c Source #

Bitraversable (Const :: Type -> Type -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d) Source #

NFData2 (Const :: Type -> Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Const a b -> () Source #

Hashable2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Const a b -> Int

Arbitrary a => Arbitrary1 (Const a :: Type -> Type) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a0 -> Gen (Const a a0)

liftShrink :: (a0 -> [a0]) -> Const a a0 -> [Const a a0]

FromJSON a => FromJSON1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a0 -> (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser (Const a a0)

liftParseJSONList :: Maybe a0 -> (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser [Const a a0]

liftOmittedField :: Maybe a0 -> Maybe (Const a a0)

ToJSON a => ToJSON1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> Const a a0 -> Value

liftToJSONList :: (a0 -> Bool) -> (a0 -> Value) -> ([a0] -> Value) -> [Const a a0] -> Value

liftToEncoding :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> Const a a0 -> Encoding

liftToEncodingList :: (a0 -> Bool) -> (a0 -> Encoding) -> ([a0] -> Encoding) -> [Const a a0] -> Encoding

liftOmitField :: (a0 -> Bool) -> Const a a0 -> Bool

Foldable (Const m :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Functor.Const

Methods

fold :: Monoid m0 => Const m m0 -> m0 Source #

foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 Source #

foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 Source #

foldr :: (a -> b -> b) -> b -> Const m a -> b Source #

foldr' :: (a -> b -> b) -> b -> Const m a -> b Source #

foldl :: (b -> a -> b) -> b -> Const m a -> b Source #

foldl' :: (b -> a -> b) -> b -> Const m a -> b Source #

foldr1 :: (a -> a -> a) -> Const m a -> a Source #

foldl1 :: (a -> a -> a) -> Const m a -> a Source #

toList :: Const m a -> [a] Source #

null :: Const m a -> Bool Source #

length :: Const m a -> Int Source #

elem :: Eq a => a -> Const m a -> Bool Source #

maximum :: Ord a => Const m a -> a Source #

minimum :: Ord a => Const m a -> a Source #

sum :: Num a => Const m a -> a Source #

product :: Num a => Const m a -> a Source #

Contravariant (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a0) -> Const a a0 -> Const a a' Source #

(>$) :: b -> Const a b -> Const a a0 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 #

Monoid m => Applicative (Const m :: Type -> Type)

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Methods

pure :: a -> Const m a Source #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b Source #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c Source #

(*>) :: Const m a -> Const m b -> Const m b Source #

(<*) :: Const m a -> Const m b -> Const m a 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 #

NFData a => NFData1 (Const a :: Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Const a a0 -> () Source #

Hashable a => Hashable1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Const a a0 -> Int

Arbitrary a => Arbitrary (Const a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Const a b) #

shrink :: Const a b -> [Const a b] #

CoArbitrary a => CoArbitrary (Const a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Const a b -> Gen b0 -> Gen b0

FromJSON a => FromJSON (Const a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Const a b) #

parseJSONList :: Value -> Parser [Const a b] #

omittedField :: Maybe (Const a b) #

(FromJSON a, FromJSONKey a) => FromJSONKey (Const a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction (Const a b)

fromJSONKeyList :: FromJSONKeyFunction [Const a b]

ToJSON a => ToJSON (Const a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Const a b -> Value #

toEncoding :: Const a b -> Encoding #

toJSONList :: [Const a b] -> Value #

toEncodingList :: [Const a b] -> Encoding #

omitField :: Const a b -> Bool #

(ToJSON a, ToJSONKey a) => ToJSONKey (Const a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction (Const a b)

toJSONKeyList :: ToJSONKeyFunction [Const a b]

IsString a => IsString (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Const a b Source #

Storable a => Storable (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

sizeOf :: Const a b -> Int Source #

alignment :: Const a b -> Int Source #

peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) Source #

pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () Source #

peekByteOff :: Ptr b0 -> Int -> IO (Const a b) Source #

pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () Source #

peek :: Ptr (Const a b) -> IO (Const a b) Source #

poke :: Ptr (Const a b) -> Const a b -> IO () Source #

Monoid a => Monoid (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: Const a b Source #

mappend :: Const a b -> Const a b -> Const a b Source #

mconcat :: [Const a b] -> Const a b Source #

Semigroup a => Semigroup (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(<>) :: Const a b -> Const a b -> Const a b Source #

sconcat :: NonEmpty (Const a b) -> Const a b Source #

stimes :: Integral b0 => b0 -> Const a b -> Const a b Source #

Bits a => Bits (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(.&.) :: Const a b -> Const a b -> Const a b Source #

(.|.) :: Const a b -> Const a b -> Const a b Source #

xor :: Const a b -> Const a b -> Const a b Source #

complement :: Const a b -> Const a b Source #

shift :: Const a b -> Int -> Const a b Source #

rotate :: Const a b -> Int -> Const a b Source #

zeroBits :: Const a b Source #

bit :: Int -> Const a b Source #

setBit :: Const a b -> Int -> Const a b Source #

clearBit :: Const a b -> Int -> Const a b Source #

complementBit :: Const a b -> Int -> Const a b Source #

testBit :: Const a b -> Int -> Bool Source #

bitSizeMaybe :: Const a b -> Maybe Int Source #

bitSize :: Const a b -> Int Source #

isSigned :: Const a b -> Bool Source #

shiftL :: Const a b -> Int -> Const a b Source #

unsafeShiftL :: Const a b -> Int -> Const a b Source #

shiftR :: Const a b -> Int -> Const a b Source #

unsafeShiftR :: Const a b -> Int -> Const a b Source #

rotateL :: Const a b -> Int -> Const a b Source #

rotateR :: Const a b -> Int -> Const a b Source #

popCount :: Const a b -> Int Source #

FiniteBits a => FiniteBits (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Bounded a => Bounded (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

minBound :: Const a b Source #

maxBound :: Const a b Source #

Enum a => Enum (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

succ :: Const a b -> Const a b Source #

pred :: Const a b -> Const a b Source #

toEnum :: Int -> Const a b Source #

fromEnum :: Const a b -> Int Source #

enumFrom :: Const a b -> [Const a b] Source #

enumFromThen :: Const a b -> Const a b -> [Const a b] Source #

enumFromTo :: Const a b -> Const a b -> [Const a b] Source #

enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] Source #

Floating a => Floating (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

pi :: Const a b Source #

exp :: Const a b -> Const a b Source #

log :: Const a b -> Const a b Source #

sqrt :: Const a b -> Const a b Source #

(**) :: Const a b -> Const a b -> Const a b Source #

logBase :: Const a b -> Const a b -> Const a b Source #

sin :: Const a b -> Const a b Source #

cos :: Const a b -> Const a b Source #

tan :: Const a b -> Const a b Source #

asin :: Const a b -> Const a b Source #

acos :: Const a b -> Const a b Source #

atan :: Const a b -> Const a b Source #

sinh :: Const a b -> Const a b Source #

cosh :: Const a b -> Const a b Source #

tanh :: Const a b -> Const a b Source #

asinh :: Const a b -> Const a b Source #

acosh :: Const a b -> Const a b Source #

atanh :: Const a b -> Const a b Source #

log1p :: Const a b -> Const a b Source #

expm1 :: Const a b -> Const a b Source #

log1pexp :: Const a b -> Const a b Source #

log1mexp :: Const a b -> Const a b Source #

RealFloat a => RealFloat (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Generic (Const a b) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep (Const a b) :: Type -> Type Source #

Methods

from :: Const a b -> Rep (Const a b) x Source #

to :: Rep (Const a b) x -> Const a b Source #

Ix a => Ix (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

range :: (Const a b, Const a b) -> [Const a b] Source #

index :: (Const a b, Const a b) -> Const a b -> Int Source #

unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int Source #

inRange :: (Const a b, Const a b) -> Const a b -> Bool Source #

rangeSize :: (Const a b, Const a b) -> Int Source #

unsafeRangeSize :: (Const a b, Const a b) -> Int Source #

Num a => Num (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(+) :: Const a b -> Const a b -> Const a b Source #

(-) :: Const a b -> Const a b -> Const a b Source #

(*) :: Const a b -> Const a b -> Const a b Source #

negate :: Const a b -> Const a b Source #

abs :: Const a b -> Const a b Source #

signum :: Const a b -> Const a b Source #

fromInteger :: Integer -> Const a b Source #

Read a => Read (Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Fractional a => Fractional (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(/) :: Const a b -> Const a b -> Const a b Source #

recip :: Const a b -> Const a b Source #

fromRational :: Rational -> Const a b Source #

Integral a => Integral (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

quot :: Const a b -> Const a b -> Const a b Source #

rem :: Const a b -> Const a b -> Const a b Source #

div :: Const a b -> Const a b -> Const a b Source #

mod :: Const a b -> Const a b -> Const a b Source #

quotRem :: Const a b -> Const a b -> (Const a b, Const a b) Source #

divMod :: Const a b -> Const a b -> (Const a b, Const a b) Source #

toInteger :: Const a b -> Integer Source #

Real a => Real (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

toRational :: Const a b -> Rational Source #

RealFrac a => RealFrac (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

properFraction :: Integral b0 => Const a b -> (b0, Const a b) Source #

truncate :: Integral b0 => Const a b -> b0 Source #

round :: Integral b0 => Const a b -> b0 Source #

ceiling :: Integral b0 => Const a b -> b0 Source #

floor :: Integral b0 => Const a b -> b0 Source #

Show a => Show (Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Methods

showsPrec :: Int -> Const a b -> ShowS Source #

show :: Const a b -> String Source #

showList :: [Const a b] -> ShowS Source #

NFData a => NFData (Const a b)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Const a b -> () Source #

Eq a => Eq (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(==) :: Const a b -> Const a b -> Bool Source #

(/=) :: Const a b -> Const a b -> Bool Source #

Ord a => Ord (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

compare :: Const a b -> Const a b -> Ordering Source #

(<) :: Const a b -> Const a b -> Bool Source #

(<=) :: Const a b -> Const a b -> Bool Source #

(>) :: Const a b -> Const a b -> Bool Source #

(>=) :: Const a b -> Const a b -> Bool Source #

max :: Const a b -> Const a b -> Const a b Source #

min :: Const a b -> Const a b -> Const a b Source #

Hashable a => Hashable (Const a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Const a b -> Int #

hash :: Const a b -> Int

Unbox a => Unbox (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 (Const a :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

type Rep1 (Const a :: k -> Type) = D1 ('MetaData "Const" "Data.Functor.Const" "base" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype MVector s (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Const a b) = MV_Const (MVector s a)
type Rep (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

type Rep (Const a b) = D1 ('MetaData "Const" "Data.Functor.Const" "base" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Const a b) = V_Const (Vector a)

type FilePath = String Source #

File and directory names are values of type String, whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.

data IORef a Source #

A mutable variable in the IO monad.

>>> import Data.IORef
>>> r <- newIORef 0
>>> readIORef r
0
>>> writeIORef r 1
>>> readIORef r
1
>>> atomicWriteIORef r 2
>>> readIORef r
2
>>> modifyIORef' r (+ 1)
>>> readIORef r
3
>>> atomicModifyIORef' r (\a -> (a + 1, ()))
>>> readIORef r
4

See also STRef and MVar.

Instances

Instances details
NFData1 IORef

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> IORef a -> () Source #

NFData (IORef a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: IORef a -> () Source #

Eq (IORef a)

Pointer equality.

Since: base-4.0.0.0

Instance details

Defined in GHC.IORef

Methods

(==) :: IORef a -> IORef a -> Bool Source #

(/=) :: IORef a -> IORef a -> Bool Source #

data BufferMode Source #

Three kinds of buffering are supported: line-buffering, block-buffering or no-buffering. These modes have the following effects. For output, items are written out, or flushed, from the internal buffer according to the buffer mode:

  • line-buffering: the entire output buffer is flushed whenever a newline is output, the buffer overflows, a hFlush is issued, or the handle is closed.
  • block-buffering: the entire buffer is written out whenever it overflows, a hFlush is issued, or the handle is closed.
  • no-buffering: output is written immediately, and never stored in the buffer.

An implementation is free to flush the buffer more frequently, but not less frequently, than specified above. The output buffer is emptied as soon as it has been written out.

Similarly, input occurs according to the buffer mode for the handle:

  • line-buffering: when the buffer for the handle is not empty, the next item is obtained from the buffer; otherwise, when the buffer is empty, characters up to and including the next newline character are read into the buffer. No characters are available until the newline character is available or the buffer is full.
  • block-buffering: when the buffer for the handle becomes empty, the next block of data is read into the buffer.
  • no-buffering: the next input item is read and returned. The hLookAhead operation implies that even a no-buffered handle may require a one-character buffer.

The default buffering mode when a handle is opened is implementation-dependent and may depend on the file system object which is attached to that handle. For most implementations, physical files will normally be block-buffered and terminals will normally be line-buffered.

Constructors

NoBuffering

buffering is disabled if possible.

LineBuffering

line-buffering should be enabled if possible.

BlockBuffering (Maybe Int)

block-buffering should be enabled if possible. The size of the buffer is n items if the argument is Just n and is otherwise implementation-dependent.

newtype Identity a Source #

Identity functor and monad. (a non-strict monad)

Since: base-4.8.0.0

Constructors

Identity 

Fields

Instances

Instances details
Arbitrary1 Identity 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (Identity a)

liftShrink :: (a -> [a]) -> Identity a -> [Identity a]

FromJSON1 Identity 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Identity a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Identity a]

liftOmittedField :: Maybe a -> Maybe (Identity a)

ToJSON1 Identity 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Identity a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Identity a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Identity a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Identity a] -> Encoding

liftOmitField :: (a -> Bool) -> Identity a -> Bool

MonadFix Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mfix :: (a -> Identity a) -> Identity a Source #

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fold :: Monoid m => Identity m -> m Source #

foldMap :: Monoid m => (a -> m) -> Identity a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Identity a -> m Source #

foldr :: (a -> b -> b) -> b -> Identity a -> b Source #

foldr' :: (a -> b -> b) -> b -> Identity a -> b Source #

foldl :: (b -> a -> b) -> b -> Identity a -> b Source #

foldl' :: (b -> a -> b) -> b -> Identity a -> b Source #

foldr1 :: (a -> a -> a) -> Identity a -> a Source #

foldl1 :: (a -> a -> a) -> Identity a -> a Source #

toList :: Identity a -> [a] Source #

null :: Identity a -> Bool Source #

length :: Identity a -> Int Source #

elem :: Eq a => a -> Identity a -> Bool Source #

maximum :: Ord a => Identity a -> a Source #

minimum :: Ord a => Identity a -> a Source #

sum :: Num a => Identity a -> a Source #

product :: Num a => Identity a -> a Source #

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Identity a -> f (Identity b) Source #

sequenceA :: Applicative f => Identity (f a) -> f (Identity a) Source #

mapM :: Monad m => (a -> m b) -> Identity a -> m (Identity b) Source #

sequence :: Monad m => Identity (m a) -> m (Identity a) Source #

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

pure :: a -> Identity a Source #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b Source #

liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c Source #

(*>) :: Identity a -> Identity b -> Identity b Source #

(<*) :: Identity a -> Identity b -> Identity a Source #

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fmap :: (a -> b) -> Identity a -> Identity b Source #

(<$) :: a -> Identity b -> Identity a Source #

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(>>=) :: Identity a -> (a -> Identity b) -> Identity b Source #

(>>) :: Identity a -> Identity b -> Identity b Source #

return :: a -> Identity a Source #

NFData1 Identity

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Identity a -> () Source #

Hashable1 Identity 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Identity a -> Int

Generic1 Identity 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep1 Identity :: k -> Type Source #

Methods

from1 :: forall (a :: k). Identity a -> Rep1 Identity a Source #

to1 :: forall (a :: k). Rep1 Identity a -> Identity a Source #

Unbox a => Vector Vector (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (Identity a) -> ST s (Vector (Identity a))

basicUnsafeThaw :: Vector (Identity a) -> ST s (Mutable Vector s (Identity a))

basicLength :: Vector (Identity a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Identity a) -> Vector (Identity a)

basicUnsafeIndexM :: Vector (Identity a) -> Int -> Box (Identity a)

basicUnsafeCopy :: Mutable Vector s (Identity a) -> Vector (Identity a) -> ST s ()

elemseq :: Vector (Identity a) -> Identity a -> b -> b

Unbox a => MVector MVector (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Identity a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Identity a) -> MVector s (Identity a)

basicOverlaps :: MVector s (Identity a) -> MVector s (Identity a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Identity a))

basicInitialize :: MVector s (Identity a) -> ST s ()

basicUnsafeReplicate :: Int -> Identity a -> ST s (MVector s (Identity a))

basicUnsafeRead :: MVector s (Identity a) -> Int -> ST s (Identity a)

basicUnsafeWrite :: MVector s (Identity a) -> Int -> Identity a -> ST s ()

basicClear :: MVector s (Identity a) -> ST s ()

basicSet :: MVector s (Identity a) -> Identity a -> ST s ()

basicUnsafeCopy :: MVector s (Identity a) -> MVector s (Identity a) -> ST s ()

basicUnsafeMove :: MVector s (Identity a) -> MVector s (Identity a) -> ST s ()

basicUnsafeGrow :: MVector s (Identity a) -> Int -> ST s (MVector s (Identity a))

Arbitrary a => Arbitrary (Identity a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Identity a) #

shrink :: Identity a -> [Identity a] #

CoArbitrary a => CoArbitrary (Identity a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Identity a -> Gen b -> Gen b

FromJSON a => FromJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Identity a) #

parseJSONList :: Value -> Parser [Identity a] #

omittedField :: Maybe (Identity a) #

FromJSONKey a => FromJSONKey (Identity a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction (Identity a)

fromJSONKeyList :: FromJSONKeyFunction [Identity a]

ToJSON a => ToJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Identity a -> Value #

toEncoding :: Identity a -> Encoding #

toJSONList :: [Identity a] -> Value #

toEncodingList :: [Identity a] -> Encoding #

omitField :: Identity a -> Bool #

ToJSONKey a => ToJSONKey (Identity a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction (Identity a)

toJSONKeyList :: ToJSONKeyFunction [Identity a]

IsString a => IsString (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Storable a => Storable (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Semigroup a => Semigroup (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bits a => Bits (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

FiniteBits a => FiniteBits (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Enum a => Enum (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Floating a => Floating (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => RealFloat (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Generic (Identity a) 
Instance details

Defined in Data.Functor.Identity

Associated Types

type Rep (Identity a) :: Type -> Type Source #

Methods

from :: Identity a -> Rep (Identity a) x Source #

to :: Rep (Identity a) x -> Identity a Source #

Ix a => Ix (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Read a => Read (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Fractional a => Fractional (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Integral a => Integral (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Real a => Real (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFrac a => RealFrac (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

properFraction :: Integral b => Identity a -> (b, Identity a) Source #

truncate :: Integral b => Identity a -> b Source #

round :: Integral b => Identity a -> b Source #

ceiling :: Integral b => Identity a -> b Source #

floor :: Integral b => Identity a -> b Source #

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

NFData a => NFData (Identity a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Identity a -> () Source #

Eq a => Eq (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(==) :: Identity a -> Identity a -> Bool Source #

(/=) :: Identity a -> Identity a -> Bool Source #

Ord a => Ord (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Hashable a => Hashable (Identity a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Identity a -> Int #

hash :: Identity a -> Int

Unbox a => Unbox (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

type Rep1 Identity = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Identity a) = MV_Identity (MVector s a)
type Rep (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

type Rep (Identity a) = D1 ('MetaData "Identity" "Data.Functor.Identity" "base" 'True) (C1 ('MetaCons "Identity" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Identity a) = V_Identity (Vector a)

newtype ZipList a Source #

Lists, but with an Applicative functor based on zipping.

Constructors

ZipList 

Fields

Instances

Instances details
Arbitrary1 ZipList 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (ZipList a)

liftShrink :: (a -> [a]) -> ZipList a -> [ZipList a]

Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Methods

fold :: Monoid m => ZipList m -> m Source #

foldMap :: Monoid m => (a -> m) -> ZipList a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ZipList a -> m Source #

foldr :: (a -> b -> b) -> b -> ZipList a -> b Source #

foldr' :: (a -> b -> b) -> b -> ZipList a -> b Source #

foldl :: (b -> a -> b) -> b -> ZipList a -> b Source #

foldl' :: (b -> a -> b) -> b -> ZipList a -> b Source #

foldr1 :: (a -> a -> a) -> ZipList a -> a Source #

foldl1 :: (a -> a -> a) -> ZipList a -> a Source #

toList :: ZipList a -> [a] Source #

null :: ZipList a -> Bool Source #

length :: ZipList a -> Int Source #

elem :: Eq a => a -> ZipList a -> Bool Source #

maximum :: Ord a => ZipList a -> a Source #

minimum :: Ord a => ZipList a -> a Source #

sum :: Num a => ZipList a -> a Source #

product :: Num a => ZipList a -> a Source #

Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) Source #

sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) Source #

mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) Source #

sequence :: Monad m => ZipList (m a) -> m (ZipList a) Source #

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Applicative ZipList
f <$> ZipList xs1 <*> ... <*> ZipList xsN
    = ZipList (zipWithN f xs1 ... xsN)

where zipWithN refers to the zipWith function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example:

(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
    = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
    = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> ZipList a Source #

(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b Source #

liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c Source #

(*>) :: ZipList a -> ZipList b -> ZipList b Source #

(<*) :: ZipList a -> ZipList b -> ZipList a Source #

Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> ZipList a -> ZipList b Source #

(<$) :: a -> ZipList b -> ZipList a Source #

NFData1 ZipList

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> ZipList a -> () Source #

Generic1 ZipList 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 ZipList :: k -> Type Source #

Methods

from1 :: forall (a :: k). ZipList a -> Rep1 ZipList a Source #

to1 :: forall (a :: k). Rep1 ZipList a -> ZipList a Source #

Arbitrary a => Arbitrary (ZipList a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (ZipList a) #

shrink :: ZipList a -> [ZipList a] #

CoArbitrary a => CoArbitrary (ZipList a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: ZipList a -> Gen b -> Gen b

Generic (ZipList a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (ZipList a) :: Type -> Type Source #

Methods

from :: ZipList a -> Rep (ZipList a) x Source #

to :: Rep (ZipList a) x -> ZipList a Source #

IsList (ZipList a)

Since: base-4.15.0.0

Instance details

Defined in GHC.IsList

Associated Types

type Item (ZipList a) Source #

Methods

fromList :: [Item (ZipList a)] -> ZipList a Source #

fromListN :: Int -> [Item (ZipList a)] -> ZipList a Source #

toList :: ZipList a -> [Item (ZipList a)] Source #

Read a => Read (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Show a => Show (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

NFData a => NFData (ZipList a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ZipList a -> () Source #

Eq a => Eq (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(==) :: ZipList a -> ZipList a -> Bool Source #

(/=) :: ZipList a -> ZipList a -> Bool Source #

Ord a => Ord (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

type Rep1 ZipList

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

type Rep1 ZipList = D1 ('MetaData "ZipList" "Control.Applicative" "base" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 List)))
type Rep (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

type Rep (ZipList a) = D1 ('MetaData "ZipList" "Control.Applicative" "base" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))
type Item (ZipList a) 
Instance details

Defined in GHC.IsList

type Item (ZipList a) = a

class IsLabel (x :: Symbol) a where Source #

Methods

fromLabel :: a Source #

class Bifoldable (p :: Type -> Type -> Type) where Source #

Bifoldable identifies foldable structures with two different varieties of elements (as opposed to Foldable, which has one variety of element). Common examples are Either and (,):

instance Bifoldable Either where
  bifoldMap f _ (Left  a) = f a
  bifoldMap _ g (Right b) = g b

instance Bifoldable (,) where
  bifoldr f g z (a, b) = f a (g b z)

Some examples below also use the following BiList to showcase empty Bifoldable behaviors when relevant (Either and (,) containing always exactly resp. 1 and 2 elements):

data BiList a b = BiList [a] [b]

instance Bifoldable BiList where
  bifoldr f g z (BiList as bs) = foldr f (foldr g z bs) as

A minimal Bifoldable definition consists of either bifoldMap or bifoldr. When defining more than this minimal set, one should ensure that the following identities hold:

bifoldbifoldMap id id
bifoldMap f g ≡ bifoldr (mappend . f) (mappend . g) mempty
bifoldr f g z t ≡ appEndo (bifoldMap (Endo . f) (Endo . g) t) z

If the type is also a Bifunctor instance, it should satisfy:

bifoldMap f g ≡ bifold . bimap f g

which implies that

bifoldMap f g . bimap h i ≡ bifoldMap (f . h) (g . i)

Since: base-4.10.0.0

Minimal complete definition

bifoldr | bifoldMap

Methods

bifold :: Monoid m => p m m -> m Source #

Combines the elements of a structure using a monoid.

bifoldbifoldMap id id

Examples

Expand

Basic usage:

>>> bifold (Right [1, 2, 3])
[1,2,3]
>>> bifold (Left [5, 6])
[5,6]
>>> bifold ([1, 2, 3], [4, 5])
[1,2,3,4,5]
>>> bifold (Product 6, Product 7)
Product {getProduct = 42}
>>> bifold (Sum 6, Sum 7)
Sum {getSum = 13}

Since: base-4.10.0.0

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> p a b -> m Source #

Combines the elements of a structure, given ways of mapping them to a common monoid.

bifoldMap f g ≡ bifoldr (mappend . f) (mappend . g) mempty

Examples

Expand

Basic usage:

>>> bifoldMap (take 3) (fmap digitToInt) ([1..], "89")
[1,2,3,8,9]
>>> bifoldMap (take 3) (fmap digitToInt) (Left [1..])
[1,2,3]
>>> bifoldMap (take 3) (fmap digitToInt) (Right "89")
[8,9]

Since: base-4.10.0.0

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c Source #

Combines the elements of a structure in a right associative manner. Given a hypothetical function toEitherList :: p a b -> [Either a b] yielding a list of all elements of a structure in order, the following would hold:

bifoldr f g z ≡ foldr (either f g) z . toEitherList

Examples

Expand

Basic usage:

> bifoldr (+) (*) 3 (5, 7)
26 -- 5 + (7 * 3)

> bifoldr (+) (*) 3 (7, 5)
22 -- 7 + (5 * 3)

> bifoldr (+) (*) 3 (Right 5)
15 -- 5 * 3

> bifoldr (+) (*) 3 (Left 5)
8 -- 5 + 3

Since: base-4.10.0.0

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c Source #

Combines the elements of a structure in a left associative manner. Given a hypothetical function toEitherList :: p a b -> [Either a b] yielding a list of all elements of a structure in order, the following would hold:

bifoldl f g z
     ≡ foldl (acc -> either (f acc) (g acc)) z . toEitherList

Note that if you want an efficient left-fold, you probably want to use bifoldl' instead of bifoldl. The reason is that the latter does not force the "inner" results, resulting in a thunk chain which then must be evaluated from the outside-in.

Examples

Expand

Basic usage:

> bifoldl (+) (*) 3 (5, 7)
56 -- (5 + 3) * 7

> bifoldl (+) (*) 3 (7, 5)
50 -- (7 + 3) * 5

> bifoldl (+) (*) 3 (Right 5)
15 -- 5 * 3

> bifoldl (+) (*) 3 (Left 5)
8 -- 5 + 3

Since: base-4.10.0.0

Instances

Instances details
Bifoldable Either

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => Either m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Either a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Either a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Either a b -> c Source #

Bifoldable Arg

Since: base-4.10.0.0

Instance details

Defined in Data.Semigroup

Methods

bifold :: Monoid m => Arg m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Arg a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Arg a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Arg a b -> c Source #

Bifoldable Map

Since: containers-0.6.3.1

Instance details

Defined in Data.Map.Internal

Methods

bifold :: Monoid m => Map m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Map a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Map a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Map a b -> c Source #

Bifoldable ListF 
Instance details

Defined in Data.Functor.Base

Methods

bifold :: Monoid m => ListF m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> ListF a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> ListF a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> ListF a b -> c Source #

Bifoldable NonEmptyF 
Instance details

Defined in Data.Functor.Base

Methods

bifold :: Monoid m => NonEmptyF m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> NonEmptyF a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> NonEmptyF a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> NonEmptyF a b -> c Source #

Bifoldable TreeF 
Instance details

Defined in Data.Functor.Base

Methods

bifold :: Monoid m => TreeF m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> TreeF a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> TreeF a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> TreeF a b -> c Source #

Bifoldable Either 
Instance details

Defined in Data.Strict.Either

Methods

bifold :: Monoid m => Either m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Either a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Either a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Either a b -> c Source #

Bifoldable These 
Instance details

Defined in Data.Strict.These

Methods

bifold :: Monoid m => These m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> These a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> These a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> These a b -> c Source #

Bifoldable Pair 
Instance details

Defined in Data.Strict.Tuple

Methods

bifold :: Monoid m => Pair m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Pair a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Pair a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Pair a b -> c Source #

Bifoldable These 
Instance details

Defined in Data.These

Methods

bifold :: Monoid m => These m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> These a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> These a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> These a b -> c Source #

Bifoldable HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

bifold :: Monoid m => HashMap m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> HashMap a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> HashMap a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> HashMap a b -> c Source #

Bifoldable (,)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => (m, m) -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (a, b) -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> (a, b) -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> (a, b) -> c Source #

Bifoldable (Const :: Type -> Type -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => Const m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Const a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Const a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Const a b -> c Source #

Foldable f => Bifoldable (CofreeF f) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

bifold :: Monoid m => CofreeF f m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> CofreeF f a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> CofreeF f a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> CofreeF f a b -> c Source #

Foldable f => Bifoldable (FreeF f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

bifold :: Monoid m => FreeF f m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> FreeF f a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> FreeF f a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> FreeF f a b -> c Source #

Bifoldable (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Tagged

Methods

bifold :: Monoid m => Tagged m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Tagged a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Tagged a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Tagged a b -> c Source #

Bifoldable (Constant :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

bifold :: Monoid m => Constant m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Constant a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Constant a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Constant a b -> c Source #

Bifoldable ((,,) x)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => (x, m, m) -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (x, a, b) -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> (x, a, b) -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> (x, a, b) -> c Source #

Bifoldable (K1 i :: Type -> Type -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => K1 i m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> K1 i a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> K1 i a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> K1 i a b -> c Source #

Bifoldable ((,,,) x y)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => (x, y, m, m) -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (x, y, a, b) -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> (x, y, a, b) -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> (x, y, a, b) -> c Source #

Foldable f => Bifoldable (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

bifold :: Monoid m => Clown f m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Clown f a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Clown f a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Clown f a b -> c Source #

Bifoldable p => Bifoldable (Flip p) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bifold :: Monoid m => Flip p m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Flip p a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Flip p a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Flip p a b -> c Source #

Foldable g => Bifoldable (Joker g :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

bifold :: Monoid m => Joker g m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Joker g a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Joker g a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Joker g a b -> c Source #

Bifoldable p => Bifoldable (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bifold :: Monoid m => WrappedBifunctor p m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> WrappedBifunctor p a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> WrappedBifunctor p a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> WrappedBifunctor p a b -> c Source #

Bifoldable ((,,,,) x y z)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => (x, y, z, m, m) -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (x, y, z, a, b) -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> (x, y, z, a, b) -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> (x, y, z, a, b) -> c Source #

(Bifoldable f, Bifoldable g) => Bifoldable (Product f g) 
Instance details

Defined in Data.Bifunctor.Product

Methods

bifold :: Monoid m => Product f g m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Product f g a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Product f g a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Product f g a b -> c Source #

(Bifoldable p, Bifoldable q) => Bifoldable (Sum p q) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

bifold :: Monoid m => Sum p q m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Sum p q a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Sum p q a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Sum p q a b -> c Source #

Bifoldable ((,,,,,) x y z w)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => (x, y, z, w, m, m) -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (x, y, z, w, a, b) -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> (x, y, z, w, a, b) -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> (x, y, z, w, a, b) -> c Source #

(Foldable f, Bifoldable p) => Bifoldable (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

bifold :: Monoid m => Tannen f p m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Tannen f p a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Tannen f p a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Tannen f p a b -> c Source #

Bifoldable ((,,,,,,) x y z w v)

Since: base-4.10.0.0

Instance details

Defined in Data.Bifoldable

Methods

bifold :: Monoid m => (x, y, z, w, v, m, m) -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> (x, y, z, w, v, a, b) -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> (x, y, z, w, v, a, b) -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> (x, y, z, w, v, a, b) -> c Source #

(Bifoldable p, Foldable f, Foldable g) => Bifoldable (Biff p f g) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

bifold :: Monoid m => Biff p f g m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Biff p f g a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Biff p f g a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Biff p f g a b -> c Source #

class (Bifunctor t, Bifoldable t) => Bitraversable (t :: Type -> Type -> Type) where Source #

Bitraversable identifies bifunctorial data structures whose elements can be traversed in order, performing Applicative or Monad actions at each element, and collecting a result structure with the same shape.

As opposed to Traversable data structures, which have one variety of element on which an action can be performed, Bitraversable data structures have two such varieties of elements.

A definition of bitraverse must satisfy the following laws:

Naturality
bitraverse (t . f) (t . g) ≡ t . bitraverse f g for every applicative transformation t
Identity
bitraverse Identity IdentityIdentity
Composition
Compose . fmap (bitraverse g1 g2) . bitraverse f1 f2 ≡ bitraverse (Compose . fmap g1 . f1) (Compose . fmap g2 . f2)

where an applicative transformation is a function

t :: (Applicative f, Applicative g) => f a -> g a

preserving the Applicative operations:

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.

Some simple examples are Either and (,):

instance Bitraversable Either where
  bitraverse f _ (Left x) = Left <$> f x
  bitraverse _ g (Right y) = Right <$> g y

instance Bitraversable (,) where
  bitraverse f g (x, y) = (,) <$> f x <*> g y

Bitraversable relates to its superclasses in the following ways:

bimap f g ≡ runIdentity . bitraverse (Identity . f) (Identity . g)
bifoldMap f g = getConst . bitraverse (Const . f) (Const . g)

These are available as bimapDefault and bifoldMapDefault respectively.

Since: base-4.10.0.0

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> t a b -> f (t c d) Source #

Evaluates the relevant functions at each element in the structure, running the action, and builds a new structure with the same shape, using the results produced from sequencing the actions.

bitraverse f g ≡ bisequenceA . bimap f g

For a version that ignores the results, see bitraverse_.

Examples

Expand

Basic usage:

>>> bitraverse listToMaybe (find odd) (Left [])
Nothing
>>> bitraverse listToMaybe (find odd) (Left [1, 2, 3])
Just (Left 1)
>>> bitraverse listToMaybe (find odd) (Right [4, 5])
Just (Right 5)
>>> bitraverse listToMaybe (find odd) ([1, 2, 3], [4, 5])
Just (1,5)
>>> bitraverse listToMaybe (find odd) ([], [4, 5])
Nothing

Since: base-4.10.0.0

Instances

Instances details
Bitraversable Either

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) Source #

Bitraversable Arg

Since: base-4.10.0.0

Instance details

Defined in Data.Semigroup

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Arg a b -> f (Arg c d) Source #

Bitraversable ListF 
Instance details

Defined in Data.Functor.Base

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> ListF a b -> f (ListF c d) Source #

Bitraversable NonEmptyF 
Instance details

Defined in Data.Functor.Base

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> NonEmptyF a b -> f (NonEmptyF c d) Source #

Bitraversable TreeF 
Instance details

Defined in Data.Functor.Base

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> TreeF a b -> f (TreeF c d) Source #

Bitraversable Either 
Instance details

Defined in Data.Strict.Either

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) Source #

Bitraversable These 
Instance details

Defined in Data.Strict.These

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> These a b -> f (These c d) Source #

Bitraversable Pair 
Instance details

Defined in Data.Strict.Tuple

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Pair a b -> f (Pair c d) Source #

Bitraversable These 
Instance details

Defined in Data.These

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> These a b -> f (These c d) Source #

Bitraversable (,)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (a, b) -> f (c, d) Source #

Bitraversable (Const :: Type -> Type -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d) Source #

Traversable f => Bitraversable (CofreeF f) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> CofreeF f a b -> f0 (CofreeF f c d) Source #

Traversable f => Bitraversable (FreeF f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> FreeF f a b -> f0 (FreeF f c d) Source #

Bitraversable (Tagged :: Type -> Type -> Type) 
Instance details

Defined in Data.Tagged

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Tagged a b -> f (Tagged c d) Source #

Bitraversable (Constant :: Type -> Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Constant a b -> f (Constant c d) Source #

Bitraversable ((,,) x)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, a, b) -> f (x, c, d) Source #

Bitraversable (K1 i :: Type -> Type -> Type)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> K1 i a b -> f (K1 i c d) Source #

Bitraversable ((,,,) x y)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, a, b) -> f (x, y, c, d) Source #

Traversable f => Bitraversable (Clown f :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Clown f a b -> f0 (Clown f c d) Source #

Bitraversable p => Bitraversable (Flip p) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Flip p a b -> f (Flip p c d) Source #

Traversable g => Bitraversable (Joker g :: Type -> Type -> Type) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Joker g a b -> f (Joker g c d) Source #

Bitraversable p => Bitraversable (WrappedBifunctor p) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> WrappedBifunctor p a b -> f (WrappedBifunctor p c d) Source #

Bitraversable ((,,,,) x y z)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, z, a, b) -> f (x, y, z, c, d) Source #

(Bitraversable f, Bitraversable g) => Bitraversable (Product f g) 
Instance details

Defined in Data.Bifunctor.Product

Methods

bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Product f g a b -> f0 (Product f g c d) Source #

(Bitraversable p, Bitraversable q) => Bitraversable (Sum p q) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Sum p q a b -> f (Sum p q c d) Source #

Bitraversable ((,,,,,) x y z w)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, z, w, a, b) -> f (x, y, z, w, c, d) Source #

(Traversable f, Bitraversable p) => Bitraversable (Tannen f p) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Tannen f p a b -> f0 (Tannen f p c d) Source #

Bitraversable ((,,,,,,) x y z w v)

Since: base-4.10.0.0

Instance details

Defined in Data.Bitraversable

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, z, w, v, a, b) -> f (x, y, z, w, v, c, d) Source #

(Bitraversable p, Traversable f, Traversable g) => Bitraversable (Biff p f g) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

bitraverse :: Applicative f0 => (a -> f0 c) -> (b -> f0 d) -> Biff p f g a b -> f0 (Biff p f g c d) Source #

data WrappedMonoid m Source #

Provide a Semigroup for an arbitrary Monoid.

NOTE: This is not needed anymore since Semigroup became a superclass of Monoid in base-4.11 and this newtype be deprecated at some point in the future.

Instances

Instances details
FromJSON1 WrappedMonoid 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (WrappedMonoid a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [WrappedMonoid a]

liftOmittedField :: Maybe a -> Maybe (WrappedMonoid a)

ToJSON1 WrappedMonoid 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> WrappedMonoid a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [WrappedMonoid a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> WrappedMonoid a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [WrappedMonoid a] -> Encoding

liftOmitField :: (a -> Bool) -> WrappedMonoid a -> Bool

NFData1 WrappedMonoid

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> WrappedMonoid a -> () Source #

Generic1 WrappedMonoid 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep1 WrappedMonoid :: k -> Type Source #

Methods

from1 :: forall (a :: k). WrappedMonoid a -> Rep1 WrappedMonoid a Source #

to1 :: forall (a :: k). Rep1 WrappedMonoid a -> WrappedMonoid a Source #

Unbox a => Vector Vector (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: Mutable Vector s (WrappedMonoid a) -> ST s (Vector (WrappedMonoid a))

basicUnsafeThaw :: Vector (WrappedMonoid a) -> ST s (Mutable Vector s (WrappedMonoid a))

basicLength :: Vector (WrappedMonoid a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (WrappedMonoid a) -> Vector (WrappedMonoid a)

basicUnsafeIndexM :: Vector (WrappedMonoid a) -> Int -> Box (WrappedMonoid a)

basicUnsafeCopy :: Mutable Vector s (WrappedMonoid a) -> Vector (WrappedMonoid a) -> ST s ()

elemseq :: Vector (WrappedMonoid a) -> WrappedMonoid a -> b -> b

Unbox a => MVector MVector (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (WrappedMonoid a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (WrappedMonoid a) -> MVector s (WrappedMonoid a)

basicOverlaps :: MVector s (WrappedMonoid a) -> MVector s (WrappedMonoid a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (WrappedMonoid a))

basicInitialize :: MVector s (WrappedMonoid a) -> ST s ()

basicUnsafeReplicate :: Int -> WrappedMonoid a -> ST s (MVector s (WrappedMonoid a))

basicUnsafeRead :: MVector s (WrappedMonoid a) -> Int -> ST s (WrappedMonoid a)

basicUnsafeWrite :: MVector s (WrappedMonoid a) -> Int -> WrappedMonoid a -> ST s ()

basicClear :: MVector s (WrappedMonoid a) -> ST s ()

basicSet :: MVector s (WrappedMonoid a) -> WrappedMonoid a -> ST s ()

basicUnsafeCopy :: MVector s (WrappedMonoid a) -> MVector s (WrappedMonoid a) -> ST s ()

basicUnsafeMove :: MVector s (WrappedMonoid a) -> MVector s (WrappedMonoid a) -> ST s ()

basicUnsafeGrow :: MVector s (WrappedMonoid a) -> Int -> ST s (MVector s (WrappedMonoid a))

FromJSON a => FromJSON (WrappedMonoid a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (WrappedMonoid a) #

parseJSONList :: Value -> Parser [WrappedMonoid a] #

omittedField :: Maybe (WrappedMonoid a) #

ToJSON a => ToJSON (WrappedMonoid a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: WrappedMonoid a -> Value #

toEncoding :: WrappedMonoid a -> Encoding #

toJSONList :: [WrappedMonoid a] -> Value #

toEncodingList :: [WrappedMonoid a] -> Encoding #

omitField :: WrappedMonoid a -> Bool #

Data m => Data (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonoid m -> c (WrappedMonoid m) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonoid m) Source #

toConstr :: WrappedMonoid m -> Constr Source #

dataTypeOf :: WrappedMonoid m -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonoid m)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonoid m)) Source #

gmapT :: (forall b. Data b => b -> b) -> WrappedMonoid m -> WrappedMonoid m Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> WrappedMonoid m -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonoid m -> u Source #

gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) Source #

gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) Source #

gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) Source #

Monoid m => Monoid (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Monoid m => Semigroup (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded m => Bounded (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum (WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Generic (WrappedMonoid m) 
Instance details

Defined in Data.Semigroup

Associated Types

type Rep (WrappedMonoid m) :: Type -> Type Source #

Read m => Read (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show m => Show (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

NFData m => NFData (WrappedMonoid m)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: WrappedMonoid m -> () Source #

Eq m => Eq (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord m => Ord (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Hashable a => Hashable (WrappedMonoid a) 
Instance details

Defined in Data.Hashable.Class

Unbox a => Unbox (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

type Rep1 WrappedMonoid

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep1 WrappedMonoid = D1 ('MetaData "WrappedMonoid" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "WrapMonoid" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonoid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
newtype MVector s (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (WrappedMonoid a) = MV_WrappedMonoid (MVector s a)
type Rep (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

type Rep (WrappedMonoid m) = D1 ('MetaData "WrappedMonoid" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "WrapMonoid" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonoid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m)))
newtype Vector (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (WrappedMonoid a) = V_WrappedMonoid (Vector a)

newtype Op a b Source #

Dual function arrows.

Constructors

Op 

Fields

Instances

Instances details
Category Op 
Instance details

Defined in Data.Functor.Contravariant

Methods

id :: forall (a :: k). Op a a Source #

(.) :: forall (b :: k) (c :: k) (a :: k). Op b c -> Op a b -> Op a c Source #

Contravariant (Op a) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a0) -> Op a a0 -> Op a a' Source #

(>$) :: b -> Op a b -> Op a a0 Source #

Monoid a => Monoid (Op a b)

mempty @(Op a b) without newtypes is mempty @(b->a) = _ -> mempty.

mempty :: Op a b
mempty = Op _ -> mempty
Instance details

Defined in Data.Functor.Contravariant

Methods

mempty :: Op a b Source #

mappend :: Op a b -> Op a b -> Op a b Source #

mconcat :: [Op a b] -> Op a b Source #

Semigroup a => Semigroup (Op a b)

(<>) @(Op a b) without newtypes is (<>) @(b->a) = liftA2 (<>). This lifts the Semigroup operation (<>) over the output of a.

(<>) :: Op a b -> Op a b -> Op a b
Op f <> Op g = Op a -> f a <> g a
Instance details

Defined in Data.Functor.Contravariant

Methods

(<>) :: Op a b -> Op a b -> Op a b Source #

sconcat :: NonEmpty (Op a b) -> Op a b Source #

stimes :: Integral b0 => b0 -> Op a b -> Op a b Source #

Floating a => Floating (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

pi :: Op a b Source #

exp :: Op a b -> Op a b Source #

log :: Op a b -> Op a b Source #

sqrt :: Op a b -> Op a b Source #

(**) :: Op a b -> Op a b -> Op a b Source #

logBase :: Op a b -> Op a b -> Op a b Source #

sin :: Op a b -> Op a b Source #

cos :: Op a b -> Op a b Source #

tan :: Op a b -> Op a b Source #

asin :: Op a b -> Op a b Source #

acos :: Op a b -> Op a b Source #

atan :: Op a b -> Op a b Source #

sinh :: Op a b -> Op a b Source #

cosh :: Op a b -> Op a b Source #

tanh :: Op a b -> Op a b Source #

asinh :: Op a b -> Op a b Source #

acosh :: Op a b -> Op a b Source #

atanh :: Op a b -> Op a b Source #

log1p :: Op a b -> Op a b Source #

expm1 :: Op a b -> Op a b Source #

log1pexp :: Op a b -> Op a b Source #

log1mexp :: Op a b -> Op a b Source #

Num a => Num (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

(+) :: Op a b -> Op a b -> Op a b Source #

(-) :: Op a b -> Op a b -> Op a b Source #

(*) :: Op a b -> Op a b -> Op a b Source #

negate :: Op a b -> Op a b Source #

abs :: Op a b -> Op a b Source #

signum :: Op a b -> Op a b Source #

fromInteger :: Integer -> Op a b Source #

Fractional a => Fractional (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

(/) :: Op a b -> Op a b -> Op a b Source #

recip :: Op a b -> Op a b Source #

fromRational :: Rational -> Op a b Source #

newtype Equivalence a Source #

This data type represents an equivalence relation.

Equivalence relations are expected to satisfy three laws:

Reflexivity
getEquivalence f a a = True
Symmetry
getEquivalence f a b = getEquivalence f b a
Transitivity
If getEquivalence f a b and getEquivalence f b c are both True then so is getEquivalence f a c.

The types alone do not enforce these laws, so you'll have to check them yourself.

Constructors

Equivalence 

Fields

Instances

Instances details
Contravariant Equivalence

Equivalence relations are Contravariant, because you can apply the contramapped function to each input to the equivalence relation.

Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Equivalence a -> Equivalence a' Source #

(>$) :: b -> Equivalence b -> Equivalence a Source #

Monoid (Equivalence a)

mempty on equivalences always returns True. Without newtypes this equals pure (pure True).

mempty :: Equivalence a
mempty = Equivalence _ _ -> True
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Equivalence a)

(<>) on equivalences uses logical conjunction (&&) on the results. Without newtypes this equals liftA2 (liftA2 (&&)).

(<>) :: Equivalence a -> Equivalence a -> Equivalence a
Equivalence equiv <> Equivalence equiv' = Equivalence a b ->
  equiv a b && equiv' a b
Instance details

Defined in Data.Functor.Contravariant

newtype Comparison a Source #

Defines a total ordering on a type as per compare.

This condition is not checked by the types. You must ensure that the supplied values are valid total orderings yourself.

Constructors

Comparison 

Fields

Instances

Instances details
Contravariant Comparison

A Comparison is a Contravariant Functor, because contramap can apply its function argument to each input of the comparison function.

Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Comparison a -> Comparison a' Source #

(>$) :: b -> Comparison b -> Comparison a Source #

Monoid (Comparison a)

mempty on comparisons always returns EQ. Without newtypes this equals pure (pure EQ).

mempty :: Comparison a
mempty = Comparison _ _ -> EQ
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Comparison a)

(<>) on comparisons combines results with (<>) @Ordering. Without newtypes this equals liftA2 (liftA2 (<>)).

(<>) :: Comparison a -> Comparison a -> Comparison a
Comparison cmp <> Comparison cmp' = Comparison a a' ->
  cmp a a' <> cmp a a'
Instance details

Defined in Data.Functor.Contravariant

newtype Predicate a Source #

Constructors

Predicate 

Fields

Instances

Instances details
Contravariant Predicate

A Predicate is a Contravariant Functor, because contramap can apply its function argument to the input of the predicate.

Without newtypes contramap f equals precomposing with f (= (. f)).

contramap :: (a' -> a) -> (Predicate a -> Predicate a')
contramap f (Predicate g) = Predicate (g . f)
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Predicate a -> Predicate a' Source #

(>$) :: b -> Predicate b -> Predicate a Source #

Monoid (Predicate a)

mempty on predicates always returns True. Without newtypes this equals pure True.

mempty :: Predicate a
mempty = _ -> True
Instance details

Defined in Data.Functor.Contravariant

Semigroup (Predicate a)

(<>) on predicates uses logical conjunction (&&) on the results. Without newtypes this equals liftA2 (&&).

(<>) :: Predicate a -> Predicate a -> Predicate a
Predicate pred <> Predicate pred' = Predicate a ->
  pred a && pred' a
Instance details

Defined in Data.Functor.Contravariant

class Contravariant (f :: Type -> Type) where Source #

The class of contravariant functors.

Whereas in Haskell, one can think of a Functor as containing or producing values, a contravariant functor is a functor that can be thought of as consuming values.

As an example, consider the type of predicate functions a -> Bool. One such predicate might be negative x = x < 0, which classifies integers as to whether they are negative. However, given this predicate, we can re-use it in other situations, providing we have a way to map values to integers. For instance, we can use the negative predicate on a person's bank balance to work out if they are currently overdrawn:

newtype Predicate a = Predicate { getPredicate :: a -> Bool }

instance Contravariant Predicate where
  contramap :: (a' -> a) -> (Predicate a -> Predicate a')
  contramap f (Predicate p) = Predicate (p . f)
                                         |   `- First, map the input...
                                         `----- then apply the predicate.

overdrawn :: Predicate Person
overdrawn = contramap personBankBalance negative

Any instance should be subject to the following laws:

Identity
contramap id = id
Composition
contramap (g . f) = contramap f . contramap g

Note, that the second law follows from the free theorem of the type of contramap and the first law, so you need only check that the former condition holds.

Minimal complete definition

contramap

Methods

contramap :: (a' -> a) -> f a -> f a' Source #

(>$) :: b -> f b -> f a infixl 4 Source #

Replace all locations in the output with the same value. The default definition is contramap . const, but this may be overridden with a more efficient version.

Instances

Instances details
Contravariant ToJSONKeyFunction 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

contramap :: (a' -> a) -> ToJSONKeyFunction a -> ToJSONKeyFunction a' Source #

(>$) :: b -> ToJSONKeyFunction b -> ToJSONKeyFunction a Source #

Contravariant Comparison

A Comparison is a Contravariant Functor, because contramap can apply its function argument to each input of the comparison function.

Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Comparison a -> Comparison a' Source #

(>$) :: b -> Comparison b -> Comparison a Source #

Contravariant Equivalence

Equivalence relations are Contravariant, because you can apply the contramapped function to each input to the equivalence relation.

Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Equivalence a -> Equivalence a' Source #

(>$) :: b -> Equivalence b -> Equivalence a Source #

Contravariant Predicate

A Predicate is a Contravariant Functor, because contramap can apply its function argument to the input of the predicate.

Without newtypes contramap f equals precomposing with f (= (. f)).

contramap :: (a' -> a) -> (Predicate a -> Predicate a')
contramap f (Predicate g) = Predicate (g . f)
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Predicate a -> Predicate a' Source #

(>$) :: b -> Predicate b -> Predicate a Source #

Contravariant (Op a) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a0) -> Op a a0 -> Op a a' Source #

(>$) :: b -> Op a b -> Op a a0 Source #

Contravariant (Proxy :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Proxy a -> Proxy a' Source #

(>$) :: b -> Proxy b -> Proxy a Source #

Contravariant (U1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> U1 a -> U1 a' Source #

(>$) :: b -> U1 b -> U1 a Source #

Contravariant (V1 :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> V1 a -> V1 a' Source #

(>$) :: b -> V1 b -> V1 a Source #

Contravariant m => Contravariant (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

contramap :: (a' -> a) -> MaybeT m a -> MaybeT m a' Source #

(>$) :: b -> MaybeT m b -> MaybeT m a Source #

Contravariant (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a0) -> Const a a0 -> Const a a' Source #

(>$) :: b -> Const a b -> Const a a0 Source #

Contravariant f => Contravariant (Alt f) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Alt f a -> Alt f a' Source #

(>$) :: b -> Alt f b -> Alt f a Source #

Contravariant f => Contravariant (Rec1 f) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Rec1 f a -> Rec1 f a' Source #

(>$) :: b -> Rec1 f b -> Rec1 f a Source #

Contravariant f => Contravariant (Backwards f)

Derived instance.

Instance details

Defined in Control.Applicative.Backwards

Methods

contramap :: (a' -> a) -> Backwards f a -> Backwards f a' Source #

(>$) :: b -> Backwards f b -> Backwards f a Source #

Contravariant m => Contravariant (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

contramap :: (a' -> a) -> ExceptT e m a -> ExceptT e m a' Source #

(>$) :: b -> ExceptT e m b -> ExceptT e m a Source #

Contravariant f => Contravariant (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

contramap :: (a' -> a) -> IdentityT f a -> IdentityT f a' Source #

(>$) :: b -> IdentityT f b -> IdentityT f a Source #

Contravariant m => Contravariant (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

contramap :: (a' -> a) -> ReaderT r m a -> ReaderT r m a' Source #

(>$) :: b -> ReaderT r m b -> ReaderT r m a Source #

Contravariant m => Contravariant (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

contramap :: (a' -> a) -> StateT s m a -> StateT s m a' Source #

(>$) :: b -> StateT s m b -> StateT s m a Source #

Contravariant (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

contramap :: (a' -> a0) -> Constant a a0 -> Constant a a' Source #

(>$) :: b -> Constant a b -> Constant a a0 Source #

Contravariant f => Contravariant (Reverse f)

Derived instance.

Instance details

Defined in Data.Functor.Reverse

Methods

contramap :: (a' -> a) -> Reverse f a -> Reverse f a' Source #

(>$) :: b -> Reverse f b -> Reverse f a Source #

(Contravariant f, Contravariant g) => Contravariant (Product f g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Product f g a -> Product f g a' Source #

(>$) :: b -> Product f g b -> Product f g a Source #

(Contravariant f, Contravariant g) => Contravariant (Sum f g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Sum f g a -> Sum f g a' Source #

(>$) :: b -> Sum f g b -> Sum f g a Source #

(Contravariant f, Contravariant g) => Contravariant (f :*: g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> (f :*: g) a -> (f :*: g) a' Source #

(>$) :: b -> (f :*: g) b -> (f :*: g) a Source #

(Contravariant f, Contravariant g) => Contravariant (f :+: g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> (f :+: g) a -> (f :+: g) a' Source #

(>$) :: b -> (f :+: g) b -> (f :+: g) a Source #

Contravariant (K1 i c :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> K1 i c a -> K1 i c a' Source #

(>$) :: b -> K1 i c b -> K1 i c a Source #

(Functor f, Contravariant g) => Contravariant (Compose f g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> Compose f g a -> Compose f g a' Source #

(>$) :: b -> Compose f g b -> Compose f g a Source #

(Functor f, Contravariant g) => Contravariant (f :.: g) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> (f :.: g) a -> (f :.: g) a' Source #

(>$) :: b -> (f :.: g) b -> (f :.: g) a Source #

Contravariant f => Contravariant (M1 i c f) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a' -> a) -> M1 i c f a -> M1 i c f a' Source #

(>$) :: b -> M1 i c f b -> M1 i c f a Source #

newtype StateT s (m :: Type -> Type) a Source #

A state transformer monad parameterized by:

  • s - The state.
  • m - The inner monad.

The return function leaves the state unchanged, while >>= uses the final state of the first computation as the initial state of the second.

Constructors

StateT 

Fields

Instances

Instances details
MonadReader r m => MonadReader r (StateT s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: StateT s m r Source #

local :: (r -> r) -> StateT s m a -> StateT s m a Source #

reader :: (r -> a) -> StateT s m a Source #

Monad m => MonadState s (StateT s m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: StateT s m s Source #

put :: s -> StateT s m () Source #

state :: (s -> (a, s)) -> StateT s m a Source #

MonadTrans (StateT s) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

lift :: Monad m => m a -> StateT s m a Source #

MonadFail m => MonadFail (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

fail :: String -> StateT s m a Source #

MonadFix m => MonadFix (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

mfix :: (a -> StateT s m a) -> StateT s m a Source #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a Source #

Contravariant m => Contravariant (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

contramap :: (a' -> a) -> StateT s m a -> StateT s m a' Source #

(>$) :: b -> StateT s m b -> StateT s m a Source #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

empty :: StateT s m a Source #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a Source #

some :: StateT s m a -> StateT s m [a] Source #

many :: StateT s m a -> StateT s m [a] Source #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

pure :: a -> StateT s m a Source #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b Source #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c Source #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b Source #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a Source #

Functor m => Functor (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

fmap :: (a -> b) -> StateT s m a -> StateT s m b Source #

(<$) :: a -> StateT s m b -> StateT s m a Source #

Monad m => Monad (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b Source #

(>>) :: StateT s m a -> StateT s m b -> StateT s m b Source #

return :: a -> StateT s m a Source #

MonadPlus m => MonadPlus (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

mzero :: StateT s m a Source #

mplus :: StateT s m a -> StateT s m a -> StateT s m a Source #

PrimMonad m => PrimMonad (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (StateT s m)

Methods

primitive :: (State# (PrimState (StateT s m)) -> (# State# (PrimState (StateT s m)), a #)) -> StateT s m a

Generic (StateT s m a) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Associated Types

type Rep (StateT s m a) :: Type -> Type Source #

Methods

from :: StateT s m a -> Rep (StateT s m a) x Source #

to :: Rep (StateT s m a) x -> StateT s m a Source #

type PrimState (StateT s m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (StateT s m) = PrimState m
type Rep (StateT s m a) 
Instance details

Defined in Control.Monad.Trans.State.Strict

type Rep (StateT s m a) = D1 ('MetaData "StateT" "Control.Monad.Trans.State.Strict" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "StateT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runStateT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (s -> m (a, s)))))

data ByteString Source #

A space-efficient representation of a Word8 vector, supporting many efficient operations.

A ByteString contains 8-bit bytes, or by using the operations from Data.ByteString.Char8 it can be interpreted as containing 8-bit characters.

Instances

Instances details
Data ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteString -> c ByteString Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString Source #

toConstr :: ByteString -> Constr Source #

dataTypeOf :: ByteString -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) Source #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString Source #

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal.Type

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Internal.Type

Associated Types

type Item ByteString Source #

Read ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Show ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

FromCBOR ByteString 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s ByteString #

label :: Proxy ByteString -> Text #

ToCBOR ByteString 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: ByteString -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ByteString -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ByteString] -> Size #

NFData ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

rnf :: ByteString -> () Source #

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

One ByteString 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem ByteString #

EncodingError ToLText "ByteString" "LText" => ToLText ByteString 
Instance details

Defined in Relude.String.Conversion

Methods

toLText :: ByteString -> LText #

EncodingError ToString "ByteString" "String" => ToString ByteString 
Instance details

Defined in Relude.String.Conversion

EncodingError ToText "ByteString" "Text" => ToText ByteString 
Instance details

Defined in Relude.String.Conversion

Methods

toText :: ByteString -> Text #

ConvertUtf8 LText ByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 Text ByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 String ByteString 
Instance details

Defined in Relude.String.Conversion

LazyStrict LByteString ByteString 
Instance details

Defined in Relude.String.Conversion

Lift ByteString

Since: bytestring-0.11.2.0

Instance details

Defined in Data.ByteString.Internal.Type

Methods

lift :: Quote m => ByteString -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => ByteString -> Code m ByteString Source #

type Item ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

type OneItem ByteString 
Instance details

Defined in Relude.Container.One

data ShortByteString Source #

A compact representation of a Word8 vector.

It has a lower memory overhead than a ByteString and does not contribute to heap fragmentation. It can be converted to or from a ByteString (at the cost of copying the string data). It supports very few other operations.

Instances

Instances details
Data ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ShortByteString -> c ShortByteString Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ShortByteString Source #

toConstr :: ShortByteString -> Constr Source #

dataTypeOf :: ShortByteString -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ShortByteString) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ShortByteString) Source #

gmapT :: (forall b. Data b => b -> b) -> ShortByteString -> ShortByteString Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ShortByteString -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ShortByteString -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ShortByteString -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ShortByteString -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ShortByteString -> m ShortByteString Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ShortByteString -> m ShortByteString Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ShortByteString -> m ShortByteString Source #

IsString ShortByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Short.Internal

Monoid ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Semigroup ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

IsList ShortByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Short.Internal

Associated Types

type Item ShortByteString Source #

Read ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Show ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

FromCBOR ShortByteString 
Instance details

Defined in Cardano.Binary.FromCBOR

ToCBOR ShortByteString 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: ShortByteString -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ShortByteString -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ShortByteString] -> Size #

NFData ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Methods

rnf :: ShortByteString -> () Source #

Eq ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Ord ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Hashable ShortByteString 
Instance details

Defined in Data.Hashable.Class

One ShortByteString 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem ShortByteString #

EncodingError ToLText "ShortByteString" "LText" => ToLText ShortByteString 
Instance details

Defined in Relude.String.Conversion

EncodingError ToString "ShortByteString" "String" => ToString ShortByteString 
Instance details

Defined in Relude.String.Conversion

EncodingError ToText "ShortByteString" "Text" => ToText ShortByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 LText ShortByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 Text ShortByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 String ShortByteString 
Instance details

Defined in Relude.String.Conversion

Lift ShortByteString

Since: bytestring-0.11.2.0

Instance details

Defined in Data.ByteString.Short.Internal

type Item ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

type OneItem ShortByteString 
Instance details

Defined in Relude.Container.One

data Map k a Source #

A Map from keys k to values a.

The Semigroup operation for Map is union, which prefers values from the left operand. If m1 maps a key k to a value a1, and m2 maps the same key to a different value a2, then their union m1 <> m2 maps k to a1.

Instances

Instances details
Bifoldable Map

Since: containers-0.6.3.1

Instance details

Defined in Data.Map.Internal

Methods

bifold :: Monoid m => Map m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Map a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Map a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Map a b -> c Source #

Eq2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Map a c -> Map b d -> Bool Source #

Ord2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Map a c -> Map b d -> Ordering Source #

Show2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Map a b -> ShowS Source #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Map a b] -> ShowS Source #

Hashable2 Map 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Map a b -> Int

(Lift k, Lift a) => Lift (Map k a :: Type)

Since: containers-0.6.6

Instance details

Defined in Data.Map.Internal

Methods

lift :: Quote m => Map k a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Map k a -> Code m (Map k a) Source #

(Ord k, Arbitrary k) => Arbitrary1 (Map k) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (Map k a)

liftShrink :: (a -> [a]) -> Map k a -> [Map k a]

(FromJSONKey k, Ord k) => FromJSON1 (Map k) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Map k a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Map k a]

liftOmittedField :: Maybe a -> Maybe (Map k a)

ToJSONKey k => ToJSON1 (Map k) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Map k a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Map k a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Map k a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Map k a] -> Encoding

liftOmitField :: (a -> Bool) -> Map k a -> Bool

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 #

Eq k => Eq1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftEq :: (a -> b -> Bool) -> Map k a -> Map k b -> Bool Source #

Ord k => Ord1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Map k a -> Map k b -> Ordering Source #

(Ord k, Read k) => Read1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Map k a) Source #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Map k a] Source #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Map k a) Source #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Map k a] Source #

Show k => Show1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Map k a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Map k a] -> ShowS Source #

Traversable (Map k)

Traverses in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Map k a -> f (Map k b) Source #

sequenceA :: Applicative f => Map k (f a) -> f (Map k a) Source #

mapM :: Monad m => (a -> m b) -> Map k a -> m (Map k b) Source #

sequence :: Monad m => Map k (m a) -> m (Map k a) Source #

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 #

Hashable k => Hashable1 (Map k) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Map k a -> Int

(Ord k, Arbitrary k, Arbitrary v) => Arbitrary (Map k v) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Map k v) #

shrink :: Map k v -> [Map k v] #

(CoArbitrary k, CoArbitrary v) => CoArbitrary (Map k v) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Map k v -> Gen b -> Gen b

(FromJSONKey k, Ord k, FromJSON v) => FromJSON (Map k v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Map k v) #

parseJSONList :: Value -> Parser [Map k v] #

omittedField :: Maybe (Map k v) #

(ToJSON v, ToJSONKey k) => ToJSON (Map k v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Map k v -> Value #

toEncoding :: Map k v -> Encoding #

toJSONList :: [Map k v] -> Value #

toEncodingList :: [Map k v] -> Encoding #

omitField :: Map k v -> Bool #

(Data k, Data a, Ord k) => Data (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Map k a -> c (Map k a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k a) Source #

toConstr :: Map k a -> Constr Source #

dataTypeOf :: Map k a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k a)) Source #

gmapT :: (forall b. Data b => b -> b) -> Map k a -> Map k a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Map k a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) Source #

Ord k => Monoid (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

mempty :: Map k v Source #

mappend :: Map k v -> Map k v -> Map k v Source #

mconcat :: [Map k v] -> Map k v Source #

Ord k => Semigroup (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

(<>) :: Map k v -> Map k v -> Map k v Source #

sconcat :: NonEmpty (Map k v) -> Map k v Source #

stimes :: Integral b => b -> Map k v -> Map k v Source #

Ord k => IsList (Map k v)

Since: containers-0.5.6.2

Instance details

Defined in Data.Map.Internal

Associated Types

type Item (Map k v) Source #

Methods

fromList :: [Item (Map k v)] -> Map k v Source #

fromListN :: Int -> [Item (Map k v)] -> Map k v Source #

toList :: Map k v -> [Item (Map k v)] Source #

(Ord k, Read k, Read e) => Read (Map k e) 
Instance details

Defined in Data.Map.Internal

(Show k, Show a) => Show (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

showsPrec :: Int -> Map k a -> ShowS Source #

show :: Map k a -> String Source #

showList :: [Map k a] -> ShowS Source #

(Ord k, FromCBOR k, FromCBOR v) => FromCBOR (Map k v) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Map k v) #

label :: Proxy (Map k v) -> Text #

(Ord k, ToCBOR k, ToCBOR v) => ToCBOR (Map k v) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Map k v -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Map k v) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Map k v] -> Size #

(NFData k, NFData a) => NFData (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

rnf :: Map k a -> () Source #

(Eq k, Eq a) => Eq (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

(==) :: Map k a -> Map k a -> Bool Source #

(/=) :: Map k a -> Map k a -> Bool Source #

(Ord k, Ord v) => Ord (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

compare :: Map k v -> Map k v -> Ordering Source #

(<) :: Map k v -> Map k v -> Bool Source #

(<=) :: Map k v -> Map k v -> Bool Source #

(>) :: Map k v -> Map k v -> Bool Source #

(>=) :: Map k v -> Map k v -> Bool Source #

max :: Map k v -> Map k v -> Map k v Source #

min :: Map k v -> Map k v -> Map k v Source #

(Hashable k, Hashable v) => Hashable (Map k v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Map k v -> Int #

hash :: Map k v -> Int

One (Map k v) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (Map k v) #

Methods

one :: OneItem (Map k v) -> Map k v #

Ord k => DynamicMap (Map k v) 
Instance details

Defined in Relude.Extra.Map

Methods

insert :: Key (Map k v) -> Val (Map k v) -> Map k v -> Map k v #

insertWith :: (Val (Map k v) -> Val (Map k v) -> Val (Map k v)) -> Key (Map k v) -> Val (Map k v) -> Map k v -> Map k v #

delete :: Key (Map k v) -> Map k v -> Map k v #

alter :: (Maybe (Val (Map k v)) -> Maybe (Val (Map k v))) -> Key (Map k v) -> Map k v -> Map k v #

Ord k => StaticMap (Map k v) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (Map k v) #

type Val (Map k v) #

Methods

size :: Map k v -> Int #

lookup :: Key (Map k v) -> Map k v -> Maybe (Val (Map k v)) #

member :: Key (Map k v) -> Map k v -> Bool #

type Item (Map k v) 
Instance details

Defined in Data.Map.Internal

type Item (Map k v) = (k, v)
type OneItem (Map k v) 
Instance details

Defined in Relude.Container.One

type OneItem (Map k v) = (k, v)
type Key (Map k v) 
Instance details

Defined in Relude.Extra.Map

type Key (Map k v) = k
type Val (Map k v) 
Instance details

Defined in Relude.Extra.Map

type Val (Map k v) = v

data Set a Source #

A set of values a.

Instances

Instances details
ToJSON1 Set 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Set a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Set a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Set a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Set a] -> Encoding

liftOmitField :: (a -> Bool) -> Set a -> Bool

Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Methods

fold :: Monoid m => Set m -> m Source #

foldMap :: Monoid m => (a -> m) -> Set a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Set a -> m Source #

foldr :: (a -> b -> b) -> b -> Set a -> b Source #

foldr' :: (a -> b -> b) -> b -> Set a -> b Source #

foldl :: (b -> a -> b) -> b -> Set a -> b Source #

foldl' :: (b -> a -> b) -> b -> Set a -> b Source #

foldr1 :: (a -> a -> a) -> Set a -> a Source #

foldl1 :: (a -> a -> a) -> Set a -> a Source #

toList :: Set a -> [a] Source #

null :: Set a -> Bool Source #

length :: Set a -> Int Source #

elem :: Eq a => a -> Set a -> Bool Source #

maximum :: Ord a => Set a -> a Source #

minimum :: Ord a => Set a -> a Source #

sum :: Num a => Set a -> a Source #

product :: Num a => Set a -> a Source #

Eq1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftEq :: (a -> b -> Bool) -> Set a -> Set b -> Bool Source #

Ord1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Set a -> Set b -> Ordering Source #

Show1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Set a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Set a] -> ShowS Source #

Hashable1 Set 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Set a -> Int

Lift a => Lift (Set a :: Type)

Since: containers-0.6.6

Instance details

Defined in Data.Set.Internal

Methods

lift :: Quote m => Set a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Set a -> Code m (Set a) Source #

(Ord a, Arbitrary a) => Arbitrary (Set a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Set a) #

shrink :: Set a -> [Set a] #

CoArbitrary a => CoArbitrary (Set a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Set a -> Gen b -> Gen b

(Ord a, FromJSON a) => FromJSON (Set a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Set a) #

parseJSONList :: Value -> Parser [Set a] #

omittedField :: Maybe (Set a) #

ToJSON a => ToJSON (Set a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Set a -> Value #

toEncoding :: Set a -> Encoding #

toJSONList :: [Set a] -> Value #

toEncodingList :: [Set a] -> Encoding #

omitField :: Set a -> Bool #

(Data a, Ord a) => Data (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Set a -> c (Set a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Set a) Source #

toConstr :: Set a -> Constr Source #

dataTypeOf :: Set a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Set a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Set a)) Source #

gmapT :: (forall b. Data b => b -> b) -> Set a -> Set a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Set a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Set a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) Source #

Ord a => Monoid (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: Set a Source #

mappend :: Set a -> Set a -> Set a Source #

mconcat :: [Set a] -> Set a Source #

Ord a => Semigroup (Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Methods

(<>) :: Set a -> Set a -> Set a Source #

sconcat :: NonEmpty (Set a) -> Set a Source #

stimes :: Integral b => b -> Set a -> Set a Source #

Ord a => IsList (Set a)

Since: containers-0.5.6.2

Instance details

Defined in Data.Set.Internal

Associated Types

type Item (Set a) Source #

Methods

fromList :: [Item (Set a)] -> Set a Source #

fromListN :: Int -> [Item (Set a)] -> Set a Source #

toList :: Set a -> [Item (Set a)] Source #

(Read a, Ord a) => Read (Set a) 
Instance details

Defined in Data.Set.Internal

Show a => Show (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

showsPrec :: Int -> Set a -> ShowS Source #

show :: Set a -> String Source #

showList :: [Set a] -> ShowS Source #

(Ord a, FromCBOR a) => FromCBOR (Set a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Set a) #

label :: Proxy (Set a) -> Text #

(Ord a, ToCBOR a) => ToCBOR (Set a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Set a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Set a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Set a] -> Size #

NFData a => NFData (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

rnf :: Set a -> () Source #

Eq a => Eq (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

(==) :: Set a -> Set a -> Bool Source #

(/=) :: Set a -> Set a -> Bool Source #

Ord a => Ord (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

compare :: Set a -> Set a -> Ordering Source #

(<) :: Set a -> Set a -> Bool Source #

(<=) :: Set a -> Set a -> Bool Source #

(>) :: Set a -> Set a -> Bool Source #

(>=) :: Set a -> Set a -> Bool Source #

max :: Set a -> Set a -> Set a Source #

min :: Set a -> Set a -> Set a Source #

Hashable v => Hashable (Set v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Set v -> Int #

hash :: Set v -> Int

One (Set a) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (Set a) #

Methods

one :: OneItem (Set a) -> Set a #

Ord a => StaticMap (Set a) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (Set a) #

type Val (Set a) #

Methods

size :: Set a -> Int #

lookup :: Key (Set a) -> Set a -> Maybe (Val (Set a)) #

member :: Key (Set a) -> Set a -> Bool #

type Item (Set a) 
Instance details

Defined in Data.Set.Internal

type Item (Set a) = a
type OneItem (Set a) 
Instance details

Defined in Relude.Container.One

type OneItem (Set a) = a
type Key (Set a) 
Instance details

Defined in Relude.Extra.Map

type Key (Set a) = a
type Val (Set a) 
Instance details

Defined in Relude.Extra.Map

type Val (Set a) = a

type State s = StateT s Identity Source #

A state monad parameterized by the type s of the state to carry.

The return function leaves the state unchanged, while >>= uses the final state of the first computation as the initial state of the second.

data Seq a Source #

General-purpose finite sequences.

Instances

Instances details
Arbitrary1 Seq 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (Seq a)

liftShrink :: (a -> [a]) -> Seq a -> [Seq a]

FromJSON1 Seq 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Seq a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Seq a]

liftOmittedField :: Maybe a -> Maybe (Seq a)

ToJSON1 Seq 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Seq a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Seq a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Seq a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Seq a] -> Encoding

liftOmitField :: (a -> Bool) -> Seq a -> Bool

MonadFix Seq

Since: containers-0.5.11

Instance details

Defined in Data.Sequence.Internal

Methods

mfix :: (a -> Seq a) -> Seq a Source #

MonadZip Seq
 mzipWith = zipWith
 munzip = unzip
Instance details

Defined in Data.Sequence.Internal

Methods

mzip :: Seq a -> Seq b -> Seq (a, b) Source #

mzipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c Source #

munzip :: Seq (a, b) -> (Seq a, Seq b) Source #

Foldable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Seq m -> m Source #

foldMap :: Monoid m => (a -> m) -> Seq a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Seq a -> m Source #

foldr :: (a -> b -> b) -> b -> Seq a -> b Source #

foldr' :: (a -> b -> b) -> b -> Seq a -> b Source #

foldl :: (b -> a -> b) -> b -> Seq a -> b Source #

foldl' :: (b -> a -> b) -> b -> Seq a -> b Source #

foldr1 :: (a -> a -> a) -> Seq a -> a Source #

foldl1 :: (a -> a -> a) -> Seq a -> a Source #

toList :: Seq a -> [a] Source #

null :: Seq a -> Bool Source #

length :: Seq a -> Int Source #

elem :: Eq a => a -> Seq a -> Bool Source #

maximum :: Ord a => Seq a -> a Source #

minimum :: Ord a => Seq a -> a Source #

sum :: Num a => Seq a -> a Source #

product :: Num a => Seq a -> a Source #

Eq1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftEq :: (a -> b -> Bool) -> Seq a -> Seq b -> Bool Source #

Ord1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Seq a -> Seq b -> Ordering Source #

Read1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Seq a) Source #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Seq a] Source #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Seq a) Source #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Seq a] Source #

Show1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Seq a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Seq a] -> ShowS Source #

Traversable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Seq a -> f (Seq b) Source #

sequenceA :: Applicative f => Seq (f a) -> f (Seq a) Source #

mapM :: Monad m => (a -> m b) -> Seq a -> m (Seq b) Source #

sequence :: Monad m => Seq (m a) -> m (Seq a) Source #

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a Source #

(<|>) :: Seq a -> Seq a -> Seq a Source #

some :: Seq a -> Seq [a] Source #

many :: Seq a -> Seq [a] Source #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a Source #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b Source #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c Source #

(*>) :: Seq a -> Seq b -> Seq b Source #

(<*) :: Seq a -> Seq b -> Seq a Source #

Functor Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b Source #

(<$) :: a -> Seq b -> Seq a Source #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

(>>=) :: Seq a -> (a -> Seq b) -> Seq b Source #

(>>) :: Seq a -> Seq b -> Seq b Source #

return :: a -> Seq a Source #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a Source #

mplus :: Seq a -> Seq a -> Seq a Source #

UnzipWith Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b)

Hashable1 Seq 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Seq a -> Int

Lift a => Lift (Seq a :: Type)

Since: containers-0.6.6

Instance details

Defined in Data.Sequence.Internal

Methods

lift :: Quote m => Seq a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => Seq a -> Code m (Seq a) Source #

Arbitrary a => Arbitrary (Seq a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Seq a) #

shrink :: Seq a -> [Seq a] #

CoArbitrary a => CoArbitrary (Seq a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Seq a -> Gen b -> Gen b

FromJSON a => FromJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Seq a) #

parseJSONList :: Value -> Parser [Seq a] #

omittedField :: Maybe (Seq a) #

ToJSON a => ToJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Seq a -> Value #

toEncoding :: Seq a -> Encoding #

toJSONList :: [Seq a] -> Value #

toEncodingList :: [Seq a] -> Encoding #

omitField :: Seq a -> Bool #

Data a => Data (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seq a -> c (Seq a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) Source #

toConstr :: Seq a -> Constr Source #

dataTypeOf :: Seq a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) Source #

gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) Source #

a ~ Char => IsString (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

fromString :: String -> Seq a Source #

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a Source #

mappend :: Seq a -> Seq a -> Seq a Source #

mconcat :: [Seq a] -> Seq a Source #

Semigroup (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

(<>) :: Seq a -> Seq a -> Seq a Source #

sconcat :: NonEmpty (Seq a) -> Seq a Source #

stimes :: Integral b => b -> Seq a -> Seq a Source #

IsList (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Item (Seq a) Source #

Methods

fromList :: [Item (Seq a)] -> Seq a Source #

fromListN :: Int -> [Item (Seq a)] -> Seq a Source #

toList :: Seq a -> [Item (Seq a)] Source #

Read a => Read (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS Source #

show :: Seq a -> String Source #

showList :: [Seq a] -> ShowS Source #

FromCBOR a => FromCBOR (Seq a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Seq a) #

label :: Proxy (Seq a) -> Text #

ToCBOR a => ToCBOR (Seq a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Seq a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Seq a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Seq a] -> Size #

NFData a => NFData (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () Source #

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: Seq a -> Seq a -> Bool Source #

(/=) :: Seq a -> Seq a -> Bool Source #

Ord a => Ord (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: Seq a -> Seq a -> Ordering Source #

(<) :: Seq a -> Seq a -> Bool Source #

(<=) :: Seq a -> Seq a -> Bool Source #

(>) :: Seq a -> Seq a -> Bool Source #

(>=) :: Seq a -> Seq a -> Bool Source #

max :: Seq a -> Seq a -> Seq a Source #

min :: Seq a -> Seq a -> Seq a Source #

Hashable v => Hashable (Seq v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Seq v -> Int #

hash :: Seq v -> Int

One (Seq a) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (Seq a) #

Methods

one :: OneItem (Seq a) -> Seq a #

type Item (Seq a) 
Instance details

Defined in Data.Sequence.Internal

type Item (Seq a) = a
type OneItem (Seq a) 
Instance details

Defined in Relude.Container.One

type OneItem (Seq a) = a

data IntSet Source #

A set of integers.

Instances

Instances details
Arbitrary IntSet 
Instance details

Defined in Test.QuickCheck.Arbitrary

CoArbitrary IntSet 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: IntSet -> Gen b -> Gen b

FromJSON IntSet 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser IntSet #

parseJSONList :: Value -> Parser [IntSet] #

omittedField :: Maybe IntSet #

ToJSON IntSet 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: IntSet -> Value #

toEncoding :: IntSet -> Encoding #

toJSONList :: [IntSet] -> Value #

toEncodingList :: [IntSet] -> Encoding #

omitField :: IntSet -> Bool #

Data IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntSet -> c IntSet Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntSet Source #

toConstr :: IntSet -> Constr Source #

dataTypeOf :: IntSet -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntSet) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntSet) Source #

gmapT :: (forall b. Data b => b -> b) -> IntSet -> IntSet Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> IntSet -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntSet -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet Source #

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

IsList IntSet

Since: containers-0.5.6.2

Instance details

Defined in Data.IntSet.Internal

Associated Types

type Item IntSet Source #

Read IntSet 
Instance details

Defined in Data.IntSet.Internal

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

NFData IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

rnf :: IntSet -> () Source #

Eq IntSet 
Instance details

Defined in Data.IntSet.Internal

Ord IntSet 
Instance details

Defined in Data.IntSet.Internal

Hashable IntSet 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntSet -> Int #

hash :: IntSet -> Int

One IntSet 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem IntSet #

Methods

one :: OneItem IntSet -> IntSet #

StaticMap IntSet 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key IntSet #

type Val IntSet #

Lift IntSet

Since: containers-0.6.6

Instance details

Defined in Data.IntSet.Internal

Methods

lift :: Quote m => IntSet -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => IntSet -> Code m IntSet Source #

type Item IntSet 
Instance details

Defined in Data.IntSet.Internal

type Item IntSet = Key
type OneItem IntSet 
Instance details

Defined in Relude.Container.One

type Key IntSet 
Instance details

Defined in Relude.Extra.Map

type Key IntSet = Int
type Val IntSet 
Instance details

Defined in Relude.Extra.Map

type Val IntSet = Int

data IntMap a Source #

A map of integers to values a.

Instances

Instances details
Arbitrary1 IntMap 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (IntMap a)

liftShrink :: (a -> [a]) -> IntMap a -> [IntMap a]

FromJSON1 IntMap 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (IntMap a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [IntMap a]

liftOmittedField :: Maybe a -> Maybe (IntMap a)

ToJSON1 IntMap 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> IntMap a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [IntMap a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> IntMap a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [IntMap a] -> Encoding

liftOmitField :: (a -> Bool) -> IntMap a -> Bool

Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

fold :: Monoid m => IntMap m -> m Source #

foldMap :: Monoid m => (a -> m) -> IntMap a -> m Source #

foldMap' :: Monoid m => (a -> m) -> IntMap a -> m Source #

foldr :: (a -> b -> b) -> b -> IntMap a -> b Source #

foldr' :: (a -> b -> b) -> b -> IntMap a -> b Source #

foldl :: (b -> a -> b) -> b -> IntMap a -> b Source #

foldl' :: (b -> a -> b) -> b -> IntMap a -> b Source #

foldr1 :: (a -> a -> a) -> IntMap a -> a Source #

foldl1 :: (a -> a -> a) -> IntMap a -> a Source #

toList :: IntMap a -> [a] Source #

null :: IntMap a -> Bool Source #

length :: IntMap a -> Int Source #

elem :: Eq a => a -> IntMap a -> Bool Source #

maximum :: Ord a => IntMap a -> a Source #

minimum :: Ord a => IntMap a -> a Source #

sum :: Num a => IntMap a -> a Source #

product :: Num a => IntMap a -> a Source #

Eq1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool Source #

Ord1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> IntMap a -> IntMap b -> Ordering Source #

Read1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Show1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> IntMap a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [IntMap a] -> ShowS Source #

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> IntMap a -> f (IntMap b) Source #

sequenceA :: Applicative f => IntMap (f a) -> f (IntMap a) Source #

mapM :: Monad m => (a -> m b) -> IntMap a -> m (IntMap b) Source #

sequence :: Monad m => IntMap (m a) -> m (IntMap a) Source #

Functor IntMap 
Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> IntMap a -> IntMap b Source #

(<$) :: a -> IntMap b -> IntMap a Source #

Hashable1 IntMap 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> IntMap a -> Int

Lift a => Lift (IntMap a :: Type)

Since: containers-0.6.6

Instance details

Defined in Data.IntMap.Internal

Methods

lift :: Quote m => IntMap a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => IntMap a -> Code m (IntMap a) Source #

Arbitrary a => Arbitrary (IntMap a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (IntMap a) #

shrink :: IntMap a -> [IntMap a] #

CoArbitrary a => CoArbitrary (IntMap a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: IntMap a -> Gen b -> Gen b

FromJSON a => FromJSON (IntMap a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (IntMap a) #

parseJSONList :: Value -> Parser [IntMap a] #

omittedField :: Maybe (IntMap a) #

ToJSON a => ToJSON (IntMap a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: IntMap a -> Value #

toEncoding :: IntMap a -> Encoding #

toJSONList :: [IntMap a] -> Value #

toEncodingList :: [IntMap a] -> Encoding #

omitField :: IntMap a -> Bool #

Data a => Data (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntMap a -> c (IntMap a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IntMap a) Source #

toConstr :: IntMap a -> Constr Source #

dataTypeOf :: IntMap a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IntMap a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IntMap a)) Source #

gmapT :: (forall b. Data b => b -> b) -> IntMap a -> IntMap a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> IntMap a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntMap a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) Source #

Monoid (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Semigroup (IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Methods

(<>) :: IntMap a -> IntMap a -> IntMap a Source #

sconcat :: NonEmpty (IntMap a) -> IntMap a Source #

stimes :: Integral b => b -> IntMap a -> IntMap a Source #

IsList (IntMap a)

Since: containers-0.5.6.2

Instance details

Defined in Data.IntMap.Internal

Associated Types

type Item (IntMap a) Source #

Methods

fromList :: [Item (IntMap a)] -> IntMap a Source #

fromListN :: Int -> [Item (IntMap a)] -> IntMap a Source #

toList :: IntMap a -> [Item (IntMap a)] Source #

Read e => Read (IntMap e) 
Instance details

Defined in Data.IntMap.Internal

Show a => Show (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

NFData a => NFData (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

rnf :: IntMap a -> () Source #

Eq a => Eq (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

(==) :: IntMap a -> IntMap a -> Bool Source #

(/=) :: IntMap a -> IntMap a -> Bool Source #

Ord a => Ord (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

compare :: IntMap a -> IntMap a -> Ordering Source #

(<) :: IntMap a -> IntMap a -> Bool Source #

(<=) :: IntMap a -> IntMap a -> Bool Source #

(>) :: IntMap a -> IntMap a -> Bool Source #

(>=) :: IntMap a -> IntMap a -> Bool Source #

max :: IntMap a -> IntMap a -> IntMap a Source #

min :: IntMap a -> IntMap a -> IntMap a Source #

Hashable v => Hashable (IntMap v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntMap v -> Int #

hash :: IntMap v -> Int

One (IntMap v) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (IntMap v) #

Methods

one :: OneItem (IntMap v) -> IntMap v #

DynamicMap (IntMap v) 
Instance details

Defined in Relude.Extra.Map

Methods

insert :: Key (IntMap v) -> Val (IntMap v) -> IntMap v -> IntMap v #

insertWith :: (Val (IntMap v) -> Val (IntMap v) -> Val (IntMap v)) -> Key (IntMap v) -> Val (IntMap v) -> IntMap v -> IntMap v #

delete :: Key (IntMap v) -> IntMap v -> IntMap v #

alter :: (Maybe (Val (IntMap v)) -> Maybe (Val (IntMap v))) -> Key (IntMap v) -> IntMap v -> IntMap v #

StaticMap (IntMap v) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (IntMap v) #

type Val (IntMap v) #

Methods

size :: IntMap v -> Int #

lookup :: Key (IntMap v) -> IntMap v -> Maybe (Val (IntMap v)) #

member :: Key (IntMap v) -> IntMap v -> Bool #

type Item (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

type Item (IntMap a) = (Key, a)
type OneItem (IntMap v) 
Instance details

Defined in Relude.Container.One

type OneItem (IntMap v) = (Int, v)
type Key (IntMap v) 
Instance details

Defined in Relude.Extra.Map

type Key (IntMap v) = Int
type Val (IntMap v) 
Instance details

Defined in Relude.Extra.Map

type Val (IntMap v) = v

class NFData a where Source #

A class of types that can be fully evaluated.

Since: deepseq-1.1.0.0

Minimal complete definition

Nothing

Methods

rnf :: a -> () Source #

rnf should reduce its argument to normal form (that is, fully evaluate all sub-components), and then return ().

Generic NFData deriving

Starting with GHC 7.2, you can automatically derive instances for types possessing a Generic instance.

Note: Generic1 can be auto-derived starting with GHC 7.4

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics (Generic, Generic1)
import Control.DeepSeq

data Foo a = Foo a String
             deriving (Eq, Generic, Generic1)

instance NFData a => NFData (Foo a)
instance NFData1 Foo

data Colour = Red | Green | Blue
              deriving Generic

instance NFData Colour

Starting with GHC 7.10, the example above can be written more concisely by enabling the new DeriveAnyClass extension:

{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}

import GHC.Generics (Generic)
import Control.DeepSeq

data Foo a = Foo a String
             deriving (Eq, Generic, Generic1, NFData, NFData1)

data Colour = Red | Green | Blue
              deriving (Generic, NFData)

Compatibility with previous deepseq versions

Prior to version 1.4.0.0, the default implementation of the rnf method was defined as

rnf a = seq a ()

However, starting with deepseq-1.4.0.0, the default implementation is based on DefaultSignatures allowing for more accurate auto-derived NFData instances. If you need the previously used exact default rnf method implementation semantics, use

instance NFData Colour where rnf x = seq x ()

or alternatively

instance NFData Colour where rnf = rwhnf

or

{-# LANGUAGE BangPatterns #-}
instance NFData Colour where rnf !_ = ()

Instances

Instances details
NFData Key 
Instance details

Defined in Data.Aeson.Key

Methods

rnf :: Key -> () Source #

NFData JSONPathElement 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: JSONPathElement -> () Source #

NFData Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: Value -> () Source #

NFData ByteArray

Since: deepseq-1.4.7.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ByteArray -> () Source #

NFData All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () Source #

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () Source #

NFData TypeRep

NOTE: Prior to deepseq-1.4.4.0 this instance was only defined for base-4.8.0.0 and later.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: TypeRep -> () Source #

NFData Unique

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Unique -> () Source #

NFData Version

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Version -> () Source #

NFData CBool

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CBool -> () Source #

NFData CChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CChar -> () Source #

NFData CClock

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CClock -> () Source #

NFData CDouble

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CDouble -> () Source #

NFData CFile

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CFile -> () Source #

NFData CFloat

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CFloat -> () Source #

NFData CFpos

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CFpos -> () Source #

NFData CInt

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CInt -> () Source #

NFData CIntMax

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CIntMax -> () Source #

NFData CIntPtr

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CIntPtr -> () Source #

NFData CJmpBuf

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CJmpBuf -> () Source #

NFData CLLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CLLong -> () Source #

NFData CLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CLong -> () Source #

NFData CPtrdiff

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CPtrdiff -> () Source #

NFData CSChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSChar -> () Source #

NFData CSUSeconds

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSUSeconds -> () Source #

NFData CShort

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CShort -> () Source #

NFData CSigAtomic

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSigAtomic -> () Source #

NFData CSize

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CSize -> () Source #

NFData CTime

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CTime -> () Source #

NFData CUChar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUChar -> () Source #

NFData CUInt

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUInt -> () Source #

NFData CUIntMax

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUIntMax -> () Source #

NFData CUIntPtr

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUIntPtr -> () Source #

NFData CULLong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CULLong -> () Source #

NFData CULong

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CULong -> () Source #

NFData CUSeconds

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUSeconds -> () Source #

NFData CUShort

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CUShort -> () Source #

NFData CWchar

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CWchar -> () Source #

NFData Void

Defined as rnf = absurd.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Void -> () Source #

NFData ThreadId

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ThreadId -> () Source #

NFData Fingerprint

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Fingerprint -> () Source #

NFData MaskingState

Since: deepseq-1.4.4.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MaskingState -> () Source #

NFData ExitCode

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ExitCode -> () Source #

NFData Int16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int16 -> () Source #

NFData Int32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int32 -> () Source #

NFData Int64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int64 -> () Source #

NFData Int8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int8 -> () Source #

NFData CallStack

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: CallStack -> () Source #

NFData SrcLoc

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: SrcLoc -> () Source #

NFData Word16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word16 -> () Source #

NFData Word32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word32 -> () Source #

NFData Word64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word64 -> () Source #

NFData Word8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word8 -> () Source #

NFData ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

rnf :: ByteString -> () Source #

NFData ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Methods

rnf :: ByteString -> () Source #

NFData ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Methods

rnf :: ShortByteString -> () Source #

NFData IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

rnf :: IntSet -> () Source #

NFData OsChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Methods

rnf :: OsChar -> () Source #

NFData OsString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Methods

rnf :: OsString -> () Source #

NFData PosixChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Methods

rnf :: PosixChar -> () Source #

NFData PosixString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Methods

rnf :: PosixString -> () Source #

NFData WindowsChar 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Methods

rnf :: WindowsChar -> () Source #

NFData WindowsString 
Instance details

Defined in System.OsString.Internal.Types.Hidden

Methods

rnf :: WindowsString -> () Source #

NFData Module

Since: deepseq-1.4.8.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Module -> () Source #

NFData Ordering 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ordering -> () Source #

NFData TyCon

NOTE: Prior to deepseq-1.4.4.0 this instance was only defined for base-4.8.0.0 and later.

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: TyCon -> () Source #

NFData Half 
Instance details

Defined in Numeric.Half.Internal

Methods

rnf :: Half -> () Source #

NFData URI 
Instance details

Defined in Network.URI

Methods

rnf :: URI -> () Source #

NFData URIAuth 
Instance details

Defined in Network.URI

Methods

rnf :: URIAuth -> () Source #

NFData TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: TextDetails -> () Source #

NFData Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

rnf :: Doc -> () Source #

NFData StdGen 
Instance details

Defined in System.Random.Internal

Methods

rnf :: StdGen -> () Source #

NFData Scientific 
Instance details

Defined in Data.Scientific

Methods

rnf :: Scientific -> () Source #

NFData Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

Methods

rnf :: Time -> () Source #

NFData SMGen 
Instance details

Defined in System.Random.SplitMix

Methods

rnf :: SMGen -> () Source #

NFData UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

Methods

rnf :: UnicodeException -> () Source #

NFData ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

rnf :: ShortText -> () Source #

NFData Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

rnf :: Day -> () Source #

NFData DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

rnf :: DiffTime -> () Source #

NFData NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Methods

rnf :: NominalDiffTime -> () Source #

NFData UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

rnf :: UTCTime -> () Source #

NFData LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Methods

rnf :: LocalTime -> () Source #

NFData ZonedTime 
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Methods

rnf :: ZonedTime -> () Source #

NFData UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

rnf :: UUID -> () Source #

NFData Integer 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Integer -> () Source #

NFData Natural

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Natural -> () Source #

NFData () 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: () -> () Source #

NFData Bool 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Bool -> () Source #

NFData Char 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Char -> () Source #

NFData Double 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Double -> () Source #

NFData Float 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Float -> () Source #

NFData Int 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () Source #

NFData Word 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word -> () Source #

NFData v => NFData (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

rnf :: KeyMap v -> () Source #

NFData a => NFData (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: IResult a -> () Source #

NFData a => NFData (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

rnf :: Result a -> () Source #

NFData a => NFData (ZipList a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ZipList a -> () Source #

NFData (MutableByteArray s)

Since: deepseq-1.4.8.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MutableByteArray s -> () Source #

NFData a => NFData (Complex a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Complex a -> () Source #

NFData a => NFData (Identity a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Identity a -> () Source #

NFData a => NFData (First a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () Source #

NFData a => NFData (Last a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () Source #

NFData a => NFData (Down a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Down a -> () Source #

NFData a => NFData (First a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () Source #

NFData a => NFData (Last a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () Source #

NFData a => NFData (Max a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Max a -> () Source #

NFData a => NFData (Min a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Min a -> () Source #

NFData m => NFData (WrappedMonoid m)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: WrappedMonoid m -> () Source #

NFData a => NFData (Dual a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Dual a -> () Source #

NFData a => NFData (Product a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Product a -> () Source #

NFData a => NFData (Sum a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum a -> () Source #

NFData a => NFData (NonEmpty a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: NonEmpty a -> () Source #

NFData (IORef a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: IORef a -> () Source #

NFData (MVar a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MVar a -> () Source #

NFData (FunPtr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: FunPtr a -> () Source #

NFData (Ptr a)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ptr a -> () Source #

NFData a => NFData (Ratio a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Ratio a -> () Source #

NFData (StableName a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: StableName a -> () Source #

NFData a => NFData (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

rnf :: IntMap a -> () Source #

NFData a => NFData (Digit a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Digit a -> () Source #

NFData a => NFData (Elem a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Elem a -> () Source #

NFData a => NFData (FingerTree a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: FingerTree a -> () Source #

NFData a => NFData (Node a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Node a -> () Source #

NFData a => NFData (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () Source #

NFData a => NFData (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

rnf :: Set a -> () Source #

NFData a => NFData (Tree a) 
Instance details

Defined in Data.Tree

Methods

rnf :: Tree a -> () Source #

NFData1 f => NFData (Fix f) 
Instance details

Defined in Data.Fix

Methods

rnf :: Fix f -> () Source #

NFData a => NFData (DNonEmpty a) 
Instance details

Defined in Data.DList.DNonEmpty.Internal

Methods

rnf :: DNonEmpty a -> () Source #

NFData a => NFData (DList a) 
Instance details

Defined in Data.DList.Internal

Methods

rnf :: DList a -> () Source #

NFData a => NFData (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

rnf :: Hashed a -> () Source #

NFData a => NFData (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: AnnotDetails a -> () Source #

NFData a => NFData (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

rnf :: Doc a -> () Source #

NFData a => NFData (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

rnf :: Array a -> () Source #

NFData (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

rnf :: PrimArray a -> () Source #

NFData a => NFData (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

rnf :: SmallArray a -> () Source #

NFData g => NFData (StateGen g) 
Instance details

Defined in System.Random.Internal

Methods

rnf :: StateGen g -> () Source #

NFData g => NFData (AtomicGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: AtomicGen g -> () Source #

NFData g => NFData (IOGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: IOGen g -> () Source #

NFData g => NFData (STGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: STGen g -> () Source #

NFData g => NFData (TGen g) 
Instance details

Defined in System.Random.Stateful

Methods

rnf :: TGen g -> () Source #

NFData a => NFData (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

rnf :: Maybe a -> () Source #

NFData a => NFData (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

rnf :: HashSet a -> () Source #

NFData a => NFData (Vector a) 
Instance details

Defined in Data.Vector

Methods

rnf :: Vector a -> () Source #

NFData (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

rnf :: Vector a -> () Source #

NFData (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

rnf :: Vector a -> () Source #

NFData (Vector a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

rnf :: Vector a -> () Source #

NFData a => NFData (Maybe a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () Source #

NFData a => NFData (a)

Since: deepseq-1.4.6.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a) -> () Source #

NFData a => NFData [a] 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: [a] -> () Source #

(NFData a, NFData b) => NFData (Either a b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Either a b -> () Source #

NFData (Fixed a)

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Fixed a -> () Source #

NFData (Proxy a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Proxy a -> () Source #

(NFData a, NFData b) => NFData (Arg a b)

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Arg a b -> () Source #

NFData (TypeRep a)

Since: deepseq-1.4.8.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: TypeRep a -> () Source #

(NFData a, NFData b) => NFData (Array a b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Array a b -> () Source #

NFData (STRef s a)

NOTE: Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: STRef s a -> () Source #

(NFData k, NFData a) => NFData (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

rnf :: Map k a -> () Source #

NFData (MutablePrimArray s a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

rnf :: MutablePrimArray s a -> () Source #

(NFData a, NFData b) => NFData (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

rnf :: Either a b -> () Source #

(NFData a, NFData b) => NFData (These a b) 
Instance details

Defined in Data.Strict.These

Methods

rnf :: These a b -> () Source #

(NFData a, NFData b) => NFData (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

rnf :: Pair a b -> () Source #

(NFData a, NFData b) => NFData (These a b) 
Instance details

Defined in Data.These

Methods

rnf :: These a b -> () Source #

(NFData k, NFData v) => NFData (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: HashMap k v -> () Source #

(NFData k, NFData v) => NFData (Leaf k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: Leaf k v -> () Source #

NFData (MVector s a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

rnf :: MVector s a -> () Source #

(NFData a, NFData b) => NFData (a, b) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a, b) -> () Source #

NFData (a -> b)

This instance is for convenience and consistency with seq. This assumes that WHNF is equivalent to NF for functions.

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a -> b) -> () Source #

NFData a => NFData (Const a b)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Const a b -> () Source #

NFData (a :~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~: b) -> () Source #

NFData b => NFData (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

rnf :: Tagged s b -> () Source #

(NFData (f a), NFData (g a), NFData a) => NFData (These1 f g a) 
Instance details

Defined in Data.Functor.These

Methods

rnf :: These1 f g a -> () Source #

(NFData a1, NFData a2, NFData a3) => NFData (a1, a2, a3) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3) -> () Source #

(NFData1 f, NFData1 g, NFData a) => NFData (Product f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Product f g a -> () Source #

(NFData1 f, NFData1 g, NFData a) => NFData (Sum f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum f g a -> () Source #

NFData (a :~~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~~: b) -> () Source #

(NFData a1, NFData a2, NFData a3, NFData a4) => NFData (a1, a2, a3, a4) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4) -> () Source #

(NFData1 f, NFData1 g, NFData a) => NFData (Compose f g a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Compose f g a -> () Source #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5) => NFData (a1, a2, a3, a4, a5) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5) -> () Source #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6) => NFData (a1, a2, a3, a4, a5, a6) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6) -> () Source #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7) => NFData (a1, a2, a3, a4, a5, a6, a7) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6, a7) -> () Source #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8) => NFData (a1, a2, a3, a4, a5, a6, a7, a8) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6, a7, a8) -> () Source #

(NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8, NFData a9) => NFData (a1, a2, a3, a4, a5, a6, a7, a8, a9) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a1, a2, a3, a4, a5, a6, a7, a8, a9) -> () Source #

newtype ExceptT e (m :: Type -> Type) a Source #

A monad transformer that adds exceptions to other monads.

ExceptT constructs a monad parameterized over two things:

  • e - The exception type.
  • m - The inner monad.

The return function yields a computation that produces the given value, while >>= sequences two subcomputations, exiting on the first exception.

Constructors

ExceptT (m (Either e a)) 

Instances

Instances details
Functor m => Generic1 (ExceptT e m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Except

Associated Types

type Rep1 (ExceptT e m) :: k -> Type Source #

Methods

from1 :: forall (a :: k). ExceptT e m a -> Rep1 (ExceptT e m) a Source #

to1 :: forall (a :: k). Rep1 (ExceptT e m) a -> ExceptT e m a Source #

MonadReader r m => MonadReader r (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ExceptT e m r Source #

local :: (r -> r) -> ExceptT e m a -> ExceptT e m a Source #

reader :: (r -> a) -> ExceptT e m a Source #

MonadState s m => MonadState s (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.State.Class

Methods

get :: ExceptT e m s Source #

put :: s -> ExceptT e m () Source #

state :: (s -> (a, s)) -> ExceptT e m a Source #

MonadTrans (ExceptT e) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

lift :: Monad m => m a -> ExceptT e m a Source #

MonadFail m => MonadFail (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fail :: String -> ExceptT e m a Source #

MonadFix m => MonadFix (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mfix :: (a -> ExceptT e m a) -> ExceptT e m a Source #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a Source #

MonadZip m => MonadZip (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mzip :: ExceptT e m a -> ExceptT e m b -> ExceptT e m (a, b) Source #

mzipWith :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c Source #

munzip :: ExceptT e m (a, b) -> (ExceptT e m a, ExceptT e m b) Source #

Foldable f => Foldable (ExceptT e f) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fold :: Monoid m => ExceptT e f m -> m Source #

foldMap :: Monoid m => (a -> m) -> ExceptT e f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ExceptT e f a -> m Source #

foldr :: (a -> b -> b) -> b -> ExceptT e f a -> b Source #

foldr' :: (a -> b -> b) -> b -> ExceptT e f a -> b Source #

foldl :: (b -> a -> b) -> b -> ExceptT e f a -> b Source #

foldl' :: (b -> a -> b) -> b -> ExceptT e f a -> b Source #

foldr1 :: (a -> a -> a) -> ExceptT e f a -> a Source #

foldl1 :: (a -> a -> a) -> ExceptT e f a -> a Source #

toList :: ExceptT e f a -> [a] Source #

null :: ExceptT e f a -> Bool Source #

length :: ExceptT e f a -> Int Source #

elem :: Eq a => a -> ExceptT e f a -> Bool Source #

maximum :: Ord a => ExceptT e f a -> a Source #

minimum :: Ord a => ExceptT e f a -> a Source #

sum :: Num a => ExceptT e f a -> a Source #

product :: Num a => ExceptT e f a -> a Source #

(Eq e, Eq1 m) => Eq1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftEq :: (a -> b -> Bool) -> ExceptT e m a -> ExceptT e m b -> Bool Source #

(Ord e, Ord1 m) => Ord1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftCompare :: (a -> b -> Ordering) -> ExceptT e m a -> ExceptT e m b -> Ordering Source #

(Read e, Read1 m) => Read1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (ExceptT e m a) Source #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [ExceptT e m a] Source #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (ExceptT e m a) Source #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [ExceptT e m a] Source #

(Show e, Show1 m) => Show1 (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> ExceptT e m a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [ExceptT e m a] -> ShowS Source #

Contravariant m => Contravariant (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

contramap :: (a' -> a) -> ExceptT e m a -> ExceptT e m a' Source #

(>$) :: b -> ExceptT e m b -> ExceptT e m 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 #

(Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

empty :: ExceptT e m a Source #

(<|>) :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

some :: ExceptT e m a -> ExceptT e m [a] Source #

many :: ExceptT e m a -> ExceptT e m [a] Source #

(Functor m, Monad m) => Applicative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

pure :: a -> ExceptT e m a Source #

(<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b Source #

liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c Source #

(*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b Source #

(<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a Source #

Functor m => Functor (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b Source #

(<$) :: a -> ExceptT e m b -> ExceptT e m a Source #

Monad m => Monad (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

(>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b Source #

(>>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b Source #

return :: a -> ExceptT e m a Source #

(Monad m, Monoid e) => MonadPlus (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mzero :: ExceptT e m a Source #

mplus :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

PrimMonad m => PrimMonad (ExceptT e m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ExceptT e m)

Methods

primitive :: (State# (PrimState (ExceptT e m)) -> (# State# (PrimState (ExceptT e m)), a #)) -> ExceptT e m a

Generic (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Associated Types

type Rep (ExceptT e m a) :: Type -> Type Source #

Methods

from :: ExceptT e m a -> Rep (ExceptT e m a) x Source #

to :: Rep (ExceptT e m a) x -> ExceptT e m a Source #

(Read e, Read1 m, Read a) => Read (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

(Show e, Show1 m, Show a) => Show (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

showsPrec :: Int -> ExceptT e m a -> ShowS Source #

show :: ExceptT e m a -> String Source #

showList :: [ExceptT e m a] -> ShowS Source #

(Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

(==) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(/=) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

compare :: ExceptT e m a -> ExceptT e m a -> Ordering Source #

(<) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(<=) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(>) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

(>=) :: ExceptT e m a -> ExceptT e m a -> Bool Source #

max :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

min :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a Source #

type Rep1 (ExceptT e m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Except

type Rep1 (ExceptT e m :: Type -> Type) = D1 ('MetaData "ExceptT" "Control.Monad.Trans.Except" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "ExceptT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (m :.: Rec1 (Either e))))
type PrimState (ExceptT e m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ExceptT e m) = PrimState m
type Rep (ExceptT e m a) 
Instance details

Defined in Control.Monad.Trans.Except

type Rep (ExceptT e m a) = D1 ('MetaData "ExceptT" "Control.Monad.Trans.Except" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "ExceptT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (Either e a)))))

newtype MaybeT (m :: Type -> Type) a Source #

The parameterizable maybe monad, obtained by composing an arbitrary monad with the Maybe monad.

Computations are actions that may produce a value or exit.

The return function yields a computation that produces that value, while >>= sequences two subcomputations, exiting if either computation does.

Constructors

MaybeT 

Fields

Instances

Instances details
MonadTrans MaybeT 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

lift :: Monad m => m a -> MaybeT m a Source #

Functor m => Generic1 (MaybeT m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Maybe

Associated Types

type Rep1 (MaybeT m) :: k -> Type Source #

Methods

from1 :: forall (a :: k). MaybeT m a -> Rep1 (MaybeT m) a Source #

to1 :: forall (a :: k). Rep1 (MaybeT m) a -> MaybeT m a Source #

MonadReader r m => MonadReader r (MaybeT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: MaybeT m r Source #

local :: (r -> r) -> MaybeT m a -> MaybeT m a Source #

reader :: (r -> a) -> MaybeT m a Source #

MonadState s m => MonadState s (MaybeT m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: MaybeT m s Source #

put :: s -> MaybeT m () Source #

state :: (s -> (a, s)) -> MaybeT m a Source #

Monad m => MonadFail (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fail :: String -> MaybeT m a Source #

MonadFix m => MonadFix (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mfix :: (a -> MaybeT m a) -> MaybeT m a Source #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a Source #

MonadZip m => MonadZip (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzip :: MaybeT m a -> MaybeT m b -> MaybeT m (a, b) Source #

mzipWith :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c Source #

munzip :: MaybeT m (a, b) -> (MaybeT m a, MaybeT m b) Source #

Foldable f => Foldable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fold :: Monoid m => MaybeT f m -> m Source #

foldMap :: Monoid m => (a -> m) -> MaybeT f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> MaybeT f a -> m Source #

foldr :: (a -> b -> b) -> b -> MaybeT f a -> b Source #

foldr' :: (a -> b -> b) -> b -> MaybeT f a -> b Source #

foldl :: (b -> a -> b) -> b -> MaybeT f a -> b Source #

foldl' :: (b -> a -> b) -> b -> MaybeT f a -> b Source #

foldr1 :: (a -> a -> a) -> MaybeT f a -> a Source #

foldl1 :: (a -> a -> a) -> MaybeT f a -> a Source #

toList :: MaybeT f a -> [a] Source #

null :: MaybeT f a -> Bool Source #

length :: MaybeT f a -> Int Source #

elem :: Eq a => a -> MaybeT f a -> Bool Source #

maximum :: Ord a => MaybeT f a -> a Source #

minimum :: Ord a => MaybeT f a -> a Source #

sum :: Num a => MaybeT f a -> a Source #

product :: Num a => MaybeT f a -> a Source #

Eq1 m => Eq1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftEq :: (a -> b -> Bool) -> MaybeT m a -> MaybeT m b -> Bool Source #

Ord1 m => Ord1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftCompare :: (a -> b -> Ordering) -> MaybeT m a -> MaybeT m b -> Ordering Source #

Read1 m => Read1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (MaybeT m a) Source #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [MaybeT m a] Source #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (MaybeT m a) Source #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [MaybeT m a] Source #

Show1 m => Show1 (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> MaybeT m a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [MaybeT m a] -> ShowS Source #

Contravariant m => Contravariant (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

contramap :: (a' -> a) -> MaybeT m a -> MaybeT m a' Source #

(>$) :: b -> MaybeT m b -> MaybeT m a Source #

Traversable f => Traversable (MaybeT f) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

traverse :: Applicative f0 => (a -> f0 b) -> MaybeT f a -> f0 (MaybeT f b) Source #

sequenceA :: Applicative f0 => MaybeT f (f0 a) -> f0 (MaybeT f a) Source #

mapM :: Monad m => (a -> m b) -> MaybeT f a -> m (MaybeT f b) Source #

sequence :: Monad m => MaybeT f (m a) -> m (MaybeT f a) Source #

(Functor m, Monad m) => Alternative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

empty :: MaybeT m a Source #

(<|>) :: MaybeT m a -> MaybeT m a -> MaybeT m a Source #

some :: MaybeT m a -> MaybeT m [a] Source #

many :: MaybeT m a -> MaybeT m [a] Source #

(Functor m, Monad m) => Applicative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

pure :: a -> MaybeT m a Source #

(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b Source #

liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c Source #

(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b Source #

(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m 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 => Monad (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b Source #

(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b Source #

return :: a -> MaybeT m a Source #

Monad m => MonadPlus (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzero :: MaybeT m a Source #

mplus :: MaybeT m a -> MaybeT m a -> MaybeT m a Source #

PrimMonad m => PrimMonad (MaybeT m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (MaybeT m)

Methods

primitive :: (State# (PrimState (MaybeT m)) -> (# State# (PrimState (MaybeT m)), a #)) -> MaybeT m a

Generic (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Associated Types

type Rep (MaybeT m a) :: Type -> Type Source #

Methods

from :: MaybeT m a -> Rep (MaybeT m a) x Source #

to :: Rep (MaybeT m a) x -> MaybeT m a Source #

(Read1 m, Read a) => Read (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

(Show1 m, Show a) => Show (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

showsPrec :: Int -> MaybeT m a -> ShowS Source #

show :: MaybeT m a -> String Source #

showList :: [MaybeT m a] -> ShowS Source #

(Eq1 m, Eq a) => Eq (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(==) :: MaybeT m a -> MaybeT m a -> Bool Source #

(/=) :: MaybeT m a -> MaybeT m a -> Bool Source #

(Ord1 m, Ord a) => Ord (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

compare :: MaybeT m a -> MaybeT m a -> Ordering Source #

(<) :: MaybeT m a -> MaybeT m a -> Bool Source #

(<=) :: MaybeT m a -> MaybeT m a -> Bool Source #

(>) :: MaybeT m a -> MaybeT m a -> Bool Source #

(>=) :: MaybeT m a -> MaybeT m a -> Bool Source #

max :: MaybeT m a -> MaybeT m a -> MaybeT m a Source #

min :: MaybeT m a -> MaybeT m a -> MaybeT m a Source #

type Rep1 (MaybeT m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Maybe

type Rep1 (MaybeT m :: Type -> Type) = D1 ('MetaData "MaybeT" "Control.Monad.Trans.Maybe" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "MaybeT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runMaybeT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (m :.: Rec1 Maybe)))
type PrimState (MaybeT m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (MaybeT m) = PrimState m
type Rep (MaybeT m a) 
Instance details

Defined in Control.Monad.Trans.Maybe

type Rep (MaybeT m a) = D1 ('MetaData "MaybeT" "Control.Monad.Trans.Maybe" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "MaybeT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runMaybeT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m (Maybe a)))))

class Monad m => MonadState s (m :: Type -> Type) | m -> s where Source #

Minimal definition is either both of get and put or just state

Minimal complete definition

state | get, put

Methods

get :: m s Source #

Return the state from the internals of the monad.

put :: s -> m () Source #

Replace the state inside the monad.

state :: (s -> (a, s)) -> m a Source #

Embed a simple state action into the monad.

Instances

Instances details
MonadState s m => MonadState s (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

get :: Free m s Source #

put :: s -> Free m () Source #

state :: (s -> (a, s)) -> Free m a Source #

MonadState s m => MonadState s (MaybeT m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: MaybeT m s Source #

put :: s -> MaybeT m () Source #

state :: (s -> (a, s)) -> MaybeT m a Source #

(Functor f, MonadState s m) => MonadState s (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

get :: FreeT f m s Source #

put :: s -> FreeT f m () Source #

state :: (s -> (a, s)) -> FreeT f m a Source #

(Monoid w, MonadState s m) => MonadState s (AccumT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.State.Class

Methods

get :: AccumT w m s Source #

put :: s -> AccumT w m () Source #

state :: (s -> (a, s)) -> AccumT w m a Source #

MonadState s m => MonadState s (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.State.Class

Methods

get :: ExceptT e m s Source #

put :: s -> ExceptT e m () Source #

state :: (s -> (a, s)) -> ExceptT e m a Source #

MonadState s m => MonadState s (IdentityT m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: IdentityT m s Source #

put :: s -> IdentityT m () Source #

state :: (s -> (a, s)) -> IdentityT m a Source #

MonadState s m => MonadState s (ReaderT r m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: ReaderT r m s Source #

put :: s -> ReaderT r m () Source #

state :: (s -> (a, s)) -> ReaderT r m a Source #

MonadState s m => MonadState s (SelectT r m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.State.Class

Methods

get :: SelectT r m s Source #

put :: s -> SelectT r m () Source #

state :: (s -> (a, s)) -> SelectT r m a Source #

Monad m => MonadState s (StateT s m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: StateT s m s Source #

put :: s -> StateT s m () Source #

state :: (s -> (a, s)) -> StateT s m a Source #

Monad m => MonadState s (StateT s m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: StateT s m s Source #

put :: s -> StateT s m () Source #

state :: (s -> (a, s)) -> StateT s m a Source #

(Monoid w, MonadState s m) => MonadState s (WriterT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.State.Class

Methods

get :: WriterT w m s Source #

put :: s -> WriterT w m () Source #

state :: (s -> (a, s)) -> WriterT w m a Source #

(Monoid w, MonadState s m) => MonadState s (WriterT w m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: WriterT w m s Source #

put :: s -> WriterT w m () Source #

state :: (s -> (a, s)) -> WriterT w m a Source #

(Monoid w, MonadState s m) => MonadState s (WriterT w m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: WriterT w m s Source #

put :: s -> WriterT w m () Source #

state :: (s -> (a, s)) -> WriterT w m a Source #

MonadState s m => MonadState s (ContT r m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: ContT r m s Source #

put :: s -> ContT r m () Source #

state :: (s -> (a, s)) -> ContT r m a Source #

(Monad m, Monoid w) => MonadState s (RWST r w s m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.State.Class

Methods

get :: RWST r w s m s Source #

put :: s -> RWST r w s m () Source #

state :: (s -> (a, s)) -> RWST r w s m a Source #

(Monad m, Monoid w) => MonadState s (RWST r w s m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: RWST r w s m s Source #

put :: s -> RWST r w s m () Source #

state :: (s -> (a, s)) -> RWST r w s m a Source #

(Monad m, Monoid w) => MonadState s (RWST r w s m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: RWST r w s m s Source #

put :: s -> RWST r w s m () Source #

state :: (s -> (a, s)) -> RWST r w s m a Source #

newtype ReaderT r (m :: Type -> Type) a Source #

The reader monad transformer, which adds a read-only environment to the given monad.

The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.

Constructors

ReaderT 

Fields

Instances

Instances details
Generic1 (ReaderT r m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Reader

Associated Types

type Rep1 (ReaderT r m) :: k -> Type Source #

Methods

from1 :: forall (a :: k). ReaderT r m a -> Rep1 (ReaderT r m) a Source #

to1 :: forall (a :: k). Rep1 (ReaderT r m) a -> ReaderT r m a Source #

Monad m => MonadReader r (ReaderT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ReaderT r m r Source #

local :: (r -> r) -> ReaderT r m a -> ReaderT r m a Source #

reader :: (r -> a) -> ReaderT r m a Source #

MonadState s m => MonadState s (ReaderT r m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: ReaderT r m s Source #

put :: s -> ReaderT r m () Source #

state :: (s -> (a, s)) -> ReaderT r m a Source #

MonadTrans (ReaderT r) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

lift :: Monad m => m a -> ReaderT r m a Source #

MonadFail m => MonadFail (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fail :: String -> ReaderT r m a Source #

MonadFix m => MonadFix (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mfix :: (a -> ReaderT r m a) -> ReaderT r m a Source #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a Source #

MonadZip m => MonadZip (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzip :: ReaderT r m a -> ReaderT r m b -> ReaderT r m (a, b) Source #

mzipWith :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c Source #

munzip :: ReaderT r m (a, b) -> (ReaderT r m a, ReaderT r m b) Source #

Contravariant m => Contravariant (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

contramap :: (a' -> a) -> ReaderT r m a -> ReaderT r m a' Source #

(>$) :: b -> ReaderT r m b -> ReaderT r m a Source #

Alternative m => Alternative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a Source #

(<|>) :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a Source #

some :: ReaderT r m a -> ReaderT r m [a] Source #

many :: ReaderT r m a -> ReaderT r m [a] Source #

Applicative m => Applicative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a Source #

(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b Source #

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c Source #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b Source #

(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r 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 #

Monad m => Monad (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b Source #

(>>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b Source #

return :: a -> ReaderT r m a Source #

MonadPlus m => MonadPlus (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzero :: ReaderT r m a Source #

mplus :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a Source #

(MonadAsync m, MonadCatch (STM m), MonadFork m, MonadMask m) => MonadAsync (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadAsync

Associated Types

type Async (ReaderT r m) = (async :: Type -> Type)

Methods

async :: ReaderT r m a -> ReaderT r m (Async (ReaderT r m) a)

asyncBound :: ReaderT r m a -> ReaderT r m (Async (ReaderT r m) a)

asyncOn :: Int -> ReaderT r m a -> ReaderT r m (Async (ReaderT r m) a)

asyncThreadId :: Async (ReaderT r m) a -> ThreadId (ReaderT r m)

withAsync :: ReaderT r m a -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b #

withAsyncBound :: ReaderT r m a -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b

withAsyncOn :: Int -> ReaderT r m a -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b

waitSTM :: Async (ReaderT r m) a -> STM (ReaderT r m) a

pollSTM :: Async (ReaderT r m) a -> STM (ReaderT r m) (Maybe (Either SomeException a))

waitCatchSTM :: Async (ReaderT r m) a -> STM (ReaderT r m) (Either SomeException a)

waitAnySTM :: [Async (ReaderT r m) a] -> STM (ReaderT r m) (Async (ReaderT r m) a, a)

waitAnyCatchSTM :: [Async (ReaderT r m) a] -> STM (ReaderT r m) (Async (ReaderT r m) a, Either SomeException a)

waitEitherSTM :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> STM (ReaderT r m) (Either a b)

waitEitherSTM_ :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> STM (ReaderT r m) ()

waitEitherCatchSTM :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> STM (ReaderT r m) (Either (Either SomeException a) (Either SomeException b))

waitBothSTM :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> STM (ReaderT r m) (a, b)

wait :: Async (ReaderT r m) a -> ReaderT r m a

poll :: Async (ReaderT r m) a -> ReaderT r m (Maybe (Either SomeException a))

waitCatch :: Async (ReaderT r m) a -> ReaderT r m (Either SomeException a)

cancel :: Async (ReaderT r m) a -> ReaderT r m ()

cancelWith :: Exception e => Async (ReaderT r m) a -> e -> ReaderT r m ()

uninterruptibleCancel :: Async (ReaderT r m) a -> ReaderT r m ()

waitAny :: [Async (ReaderT r m) a] -> ReaderT r m (Async (ReaderT r m) a, a)

waitAnyCatch :: [Async (ReaderT r m) a] -> ReaderT r m (Async (ReaderT r m) a, Either SomeException a)

waitAnyCancel :: [Async (ReaderT r m) a] -> ReaderT r m (Async (ReaderT r m) a, a)

waitAnyCatchCancel :: [Async (ReaderT r m) a] -> ReaderT r m (Async (ReaderT r m) a, Either SomeException a)

waitEither :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (Either a b)

waitEitherCatch :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (Either (Either SomeException a) (Either SomeException b))

waitEitherCancel :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (Either a b)

waitEitherCatchCancel :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (Either (Either SomeException a) (Either SomeException b))

waitEither_ :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m ()

waitBoth :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (a, b)

race :: ReaderT r m a -> ReaderT r m b -> ReaderT r m (Either a b) #

race_ :: ReaderT r m a -> ReaderT r m b -> ReaderT r m () #

concurrently :: ReaderT r m a -> ReaderT r m b -> ReaderT r m (a, b) #

concurrently_ :: ReaderT r m a -> ReaderT r m b -> ReaderT r m () #

asyncWithUnmask :: ((forall b. ReaderT r m b -> ReaderT r m b) -> ReaderT r m a) -> ReaderT r m (Async (ReaderT r m) a)

asyncOnWithUnmask :: Int -> ((forall b. ReaderT r m b -> ReaderT r m b) -> ReaderT r m a) -> ReaderT r m (Async (ReaderT r m) a)

withAsyncWithUnmask :: ((forall c. ReaderT r m c -> ReaderT r m c) -> ReaderT r m a) -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b

withAsyncOnWithUnmask :: Int -> ((forall c. ReaderT r m c -> ReaderT r m c) -> ReaderT r m a) -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b

compareAsyncs :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> Ordering

MonadEventlog m => MonadEventlog (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadEventlog

Methods

traceEventIO :: String -> ReaderT r m ()

traceMarkerIO :: String -> ReaderT r m ()

MonadFork m => MonadFork (ReaderT e m) 
Instance details

Defined in Control.Monad.Class.MonadFork

Methods

forkIO :: ReaderT e m () -> ReaderT e m (ThreadId (ReaderT e m))

forkOn :: Int -> ReaderT e m () -> ReaderT e m (ThreadId (ReaderT e m))

forkIOWithUnmask :: ((forall a. ReaderT e m a -> ReaderT e m a) -> ReaderT e m ()) -> ReaderT e m (ThreadId (ReaderT e m))

forkFinally :: ReaderT e m a -> (Either SomeException a -> ReaderT e m ()) -> ReaderT e m (ThreadId (ReaderT e m))

throwTo :: Exception e0 => ThreadId (ReaderT e m) -> e0 -> ReaderT e m ()

killThread :: ThreadId (ReaderT e m) -> ReaderT e m ()

yield :: ReaderT e m ()

MonadThread m => MonadThread (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadFork

Associated Types

type ThreadId (ReaderT r m)

Methods

myThreadId :: ReaderT r m (ThreadId (ReaderT r m))

labelThread :: ThreadId (ReaderT r m) -> String -> ReaderT r m ()

(MonadST m, PrimMonad m) => MonadST (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadST

Methods

stToIO :: ST (PrimState (ReaderT r m)) a -> ReaderT r m a

withLiftST :: (forall s. (forall a. ST s a -> ReaderT r m a) -> b) -> b

MonadSTM m => MonadSTM (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Associated Types

type STM (ReaderT r m) = (stm :: Type -> Type) #

type TVar (ReaderT r m) :: Type -> Type #

type TMVar (ReaderT r m) :: Type -> Type #

type TQueue (ReaderT r m) :: Type -> Type #

type TBQueue (ReaderT r m) :: Type -> Type #

type TArray (ReaderT r m) :: Type -> Type -> Type

type TSem (ReaderT r m)

type TChan (ReaderT r m) :: Type -> Type

Methods

atomically :: HasCallStack => STM (ReaderT r m) a -> ReaderT r m a #

newTVar :: a -> STM (ReaderT r m) (TVar (ReaderT r m) a)

readTVar :: TVar (ReaderT r m) a -> STM (ReaderT r m) a #

writeTVar :: TVar (ReaderT r m) a -> a -> STM (ReaderT r m) ()

retry :: STM (ReaderT r m) a

orElse :: STM (ReaderT r m) a -> STM (ReaderT r m) a -> STM (ReaderT r m) a

modifyTVar :: TVar (ReaderT r m) a -> (a -> a) -> STM (ReaderT r m) ()

modifyTVar' :: TVar (ReaderT r m) a -> (a -> a) -> STM (ReaderT r m) ()

stateTVar :: TVar (ReaderT r m) s -> (s -> (a, s)) -> STM (ReaderT r m) a

swapTVar :: TVar (ReaderT r m) a -> a -> STM (ReaderT r m) a

check :: Bool -> STM (ReaderT r m) ()

newTMVar :: a -> STM (ReaderT r m) (TMVar (ReaderT r m) a)

newEmptyTMVar :: STM (ReaderT r m) (TMVar (ReaderT r m) a)

takeTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) a

tryTakeTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

putTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) ()

tryPutTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) Bool

readTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) a

tryReadTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

swapTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) a

isEmptyTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) Bool

newTQueue :: STM (ReaderT r m) (TQueue (ReaderT r m) a)

readTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) a

tryReadTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

peekTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) a

tryPeekTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

flushTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) [a]

writeTQueue :: TQueue (ReaderT r m) a -> a -> STM (ReaderT r m) ()

isEmptyTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) Bool

unGetTQueue :: TQueue (ReaderT r m) a -> a -> STM (ReaderT r m) ()

newTBQueue :: Natural -> STM (ReaderT r m) (TBQueue (ReaderT r m) a)

readTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) a

tryReadTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

peekTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) a

tryPeekTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

flushTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) [a]

writeTBQueue :: TBQueue (ReaderT r m) a -> a -> STM (ReaderT r m) ()

lengthTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) Natural

isEmptyTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) Bool

isFullTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) Bool

unGetTBQueue :: TBQueue (ReaderT r m) a -> a -> STM (ReaderT r m) ()

newTSem :: Integer -> STM (ReaderT r m) (TSem (ReaderT r m))

waitTSem :: TSem (ReaderT r m) -> STM (ReaderT r m) ()

signalTSem :: TSem (ReaderT r m) -> STM (ReaderT r m) ()

signalTSemN :: Natural -> TSem (ReaderT r m) -> STM (ReaderT r m) ()

newTChan :: STM (ReaderT r m) (TChan (ReaderT r m) a)

newBroadcastTChan :: STM (ReaderT r m) (TChan (ReaderT r m) a)

dupTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (TChan (ReaderT r m) a)

cloneTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (TChan (ReaderT r m) a)

readTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) a

tryReadTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

peekTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) a

tryPeekTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

writeTChan :: TChan (ReaderT r m) a -> a -> STM (ReaderT r m) ()

unGetTChan :: TChan (ReaderT r m) a -> a -> STM (ReaderT r m) ()

isEmptyTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) Bool

newTVarIO :: a -> ReaderT r m (TVar (ReaderT r m) a)

readTVarIO :: TVar (ReaderT r m) a -> ReaderT r m a

newTMVarIO :: a -> ReaderT r m (TMVar (ReaderT r m) a)

newEmptyTMVarIO :: ReaderT r m (TMVar (ReaderT r m) a)

newTQueueIO :: ReaderT r m (TQueue (ReaderT r m) a)

newTBQueueIO :: Natural -> ReaderT r m (TBQueue (ReaderT r m) a)

newTChanIO :: ReaderT r m (TChan (ReaderT r m) a)

newBroadcastTChanIO :: ReaderT r m (TChan (ReaderT r m) a)

MonadCatch m => MonadCatch (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

catch :: Exception e => ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

catchJust :: Exception e => (e -> Maybe b) -> ReaderT r m a -> (b -> ReaderT r m a) -> ReaderT r m a #

try :: Exception e => ReaderT r m a -> ReaderT r m (Either e a) #

tryJust :: Exception e => (e -> Maybe b) -> ReaderT r m a -> ReaderT r m (Either b a) #

handle :: Exception e => (e -> ReaderT r m a) -> ReaderT r m a -> ReaderT r m a #

handleJust :: Exception e => (e -> Maybe b) -> (b -> ReaderT r m a) -> ReaderT r m a -> ReaderT r m a #

onException :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

bracketOnError :: ReaderT r m a -> (a -> ReaderT r m b) -> (a -> ReaderT r m c) -> ReaderT r m c #

generalBracket :: ReaderT r m a -> (a -> ExitCase b -> ReaderT r m c) -> (a -> ReaderT r m b) -> ReaderT r m (b, c) #

MonadEvaluate m => MonadEvaluate (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

evaluate :: a -> ReaderT r m a #

MonadMask m => MonadMask (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

mask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

uninterruptibleMask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

mask_ :: ReaderT r m a -> ReaderT r m a #

uninterruptibleMask_ :: ReaderT r m a -> ReaderT r m a #

MonadThrow m => MonadThrow (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

throwIO :: Exception e => e -> ReaderT r m a #

bracket :: ReaderT r m a -> (a -> ReaderT r m b) -> (a -> ReaderT r m c) -> ReaderT r m c #

bracket_ :: ReaderT r m a -> ReaderT r m b -> ReaderT r m c -> ReaderT r m c #

finally :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

MonadMonotonicTimeNSec m => MonadMonotonicTimeNSec (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadTime

MonadTime m => MonadTime (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadTime

PrimMonad m => PrimMonad (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ReaderT r m)

Methods

primitive :: (State# (PrimState (ReaderT r m)) -> (# State# (PrimState (ReaderT r m)), a #)) -> ReaderT r m a

MonadMonotonicTime m => MonadMonotonicTime (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

MonadDelay m => MonadDelay (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadTimer.SI

Methods

threadDelay :: DiffTime -> ReaderT r m () #

MonadTimer m => MonadTimer (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadTimer.SI

Methods

registerDelay :: DiffTime -> ReaderT r m (TVar (ReaderT r m) Bool) #

registerDelayCancellable :: DiffTime -> ReaderT r m (STM (ReaderT r m) TimeoutState, ReaderT r m ()) #

timeout :: DiffTime -> ReaderT r m a -> ReaderT r m (Maybe a) #

Generic (ReaderT r m a) 
Instance details

Defined in Control.Monad.Trans.Reader

Associated Types

type Rep (ReaderT r m a) :: Type -> Type Source #

Methods

from :: ReaderT r m a -> Rep (ReaderT r m a) x Source #

to :: Rep (ReaderT r m a) x -> ReaderT r m a Source #

type Rep1 (ReaderT r m :: Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Reader

type Rep1 (ReaderT r m :: Type -> Type) = D1 ('MetaData "ReaderT" "Control.Monad.Trans.Reader" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "ReaderT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runReaderT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ((FUN 'Many r :: Type -> Type) :.: Rec1 m)))
type Async (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadAsync

type Async (ReaderT r m) = AsyncReaderT r m
type ThreadId (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadFork

type ThreadId (ReaderT r m) = ThreadId m
type STM (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type STM (ReaderT r m) = ReaderT r (STM m)
type TArray (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TArray (ReaderT r m) = TArray m
type TBQueue (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TBQueue (ReaderT r m) = TBQueue m
type TChan (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TChan (ReaderT r m) = TChan m
type TMVar (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TMVar (ReaderT r m) = TMVar m
type TQueue (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TQueue (ReaderT r m) = TQueue m
type TSem (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TSem (ReaderT r m) = TSem m
type TVar (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TVar (ReaderT r m) = TVar m
type PrimState (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ReaderT r m) = PrimState m
type Rep (ReaderT r m a) 
Instance details

Defined in Control.Monad.Trans.Reader

type Rep (ReaderT r m a) = D1 ('MetaData "ReaderT" "Control.Monad.Trans.Reader" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "ReaderT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runReaderT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (r -> m a))))

type Reader r = ReaderT r Identity Source #

The parameterizable reader monad.

Computations are functions of a shared environment.

The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.

class Monad m => MonadReader r (m :: Type -> Type) | m -> r where Source #

See examples in Control.Monad.Reader. Note, the partially applied function type (->) r is a simple reader monad. See the instance declaration below.

Minimal complete definition

(ask | reader), local

Methods

ask :: m r Source #

Retrieves the monad environment.

local Source #

Arguments

:: (r -> r)

The function to modify the environment.

-> m a

Reader to run in the modified environment.

-> m a 

Executes a computation in a modified environment.

reader Source #

Arguments

:: (r -> a)

The selector function to apply to the environment.

-> m a 

Retrieves a function of the current environment.

Instances

Instances details
MonadReader e m => MonadReader e (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

ask :: Free m e Source #

local :: (e -> e) -> Free m a -> Free m a Source #

reader :: (e -> a) -> Free m a Source #

MonadReader r m => MonadReader r (MaybeT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: MaybeT m r Source #

local :: (r -> r) -> MaybeT m a -> MaybeT m a Source #

reader :: (r -> a) -> MaybeT m a Source #

(Functor f, MonadReader r m) => MonadReader r (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

ask :: FreeT f m r Source #

local :: (r -> r) -> FreeT f m a -> FreeT f m a Source #

reader :: (r -> a) -> FreeT f m a Source #

(Monoid w, MonadReader r m) => MonadReader r (AccumT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: AccumT w m r Source #

local :: (r -> r) -> AccumT w m a -> AccumT w m a Source #

reader :: (r -> a) -> AccumT w m a Source #

MonadReader r m => MonadReader r (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ExceptT e m r Source #

local :: (r -> r) -> ExceptT e m a -> ExceptT e m a Source #

reader :: (r -> a) -> ExceptT e m a Source #

MonadReader r m => MonadReader r (IdentityT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: IdentityT m r Source #

local :: (r -> r) -> IdentityT m a -> IdentityT m a Source #

reader :: (r -> a) -> IdentityT m a Source #

Monad m => MonadReader r (ReaderT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ReaderT r m r Source #

local :: (r -> r) -> ReaderT r m a -> ReaderT r m a Source #

reader :: (r -> a) -> ReaderT r m a Source #

MonadReader r m => MonadReader r (StateT s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: StateT s m r Source #

local :: (r -> r) -> StateT s m a -> StateT s m a Source #

reader :: (r -> a) -> StateT s m a Source #

MonadReader r m => MonadReader r (StateT s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: StateT s m r Source #

local :: (r -> r) -> StateT s m a -> StateT s m a Source #

reader :: (r -> a) -> StateT s m a Source #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: WriterT w m r Source #

local :: (r -> r) -> WriterT w m a -> WriterT w m a Source #

reader :: (r -> a) -> WriterT w m a Source #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: WriterT w m r Source #

local :: (r -> r) -> WriterT w m a -> WriterT w m a Source #

reader :: (r -> a) -> WriterT w m a Source #

(Monoid w, MonadReader r m) => MonadReader r (WriterT w m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: WriterT w m r Source #

local :: (r -> r) -> WriterT w m a -> WriterT w m a Source #

reader :: (r -> a) -> WriterT w m a Source #

MonadReader r' m => MonadReader r' (SelectT r m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: SelectT r m r' Source #

local :: (r' -> r') -> SelectT r m a -> SelectT r m a Source #

reader :: (r' -> a) -> SelectT r m a Source #

MonadReader r ((->) r) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: r -> r Source #

local :: (r -> r) -> (r -> a) -> r -> a Source #

reader :: (r -> a) -> r -> a Source #

MonadReader r' m => MonadReader r' (ContT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ContT r m r' Source #

local :: (r' -> r') -> ContT r m a -> ContT r m a Source #

reader :: (r' -> a) -> ContT r m a Source #

(Monad m, Monoid w) => MonadReader r (RWST r w s m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: RWST r w s m r Source #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a Source #

reader :: (r -> a) -> RWST r w s m a Source #

(Monad m, Monoid w) => MonadReader r (RWST r w s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: RWST r w s m r Source #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a Source #

reader :: (r -> a) -> RWST r w s m a Source #

(Monad m, Monoid w) => MonadReader r (RWST r w s m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: RWST r w s m r Source #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a Source #

reader :: (r -> a) -> RWST r w s m a Source #

class (forall (m :: Type -> Type). Monad m => Monad (t m)) => MonadTrans (t :: (Type -> Type) -> Type -> Type) where Source #

The class of monad transformers. For any monad m, the result t m should also be a monad, and lift should be a monad transformation from m to t m, i.e. it should satisfy the following laws:

Since 0.6.0.0 and for GHC 8.6 and later, the requirement that t m be a Monad is enforced by the implication constraint forall m. Monad m => Monad (t m) enabled by the QuantifiedConstraints extension.

Ambiguity error with GHC 9.0 to 9.2.2

Expand

These versions of GHC have a bug (https://gitlab.haskell.org/ghc/ghc/-/issues/20582) which causes constraints like

(MonadTrans t, forall m. Monad m => Monad (t m)) => ...

to be reported as ambiguous. For transformers 0.6 and later, this can be fixed by removing the second constraint, which is implied by the first.

Methods

lift :: Monad m => m a -> t m a Source #

Lift a computation from the argument monad to the constructed monad.

Instances

Instances details
MonadTrans Free 
Instance details

Defined in Control.Monad.Free

Methods

lift :: Monad m => m a -> Free m a Source #

MonadTrans MaybeT 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

lift :: Monad m => m a -> MaybeT m a Source #

Alternative f => MonadTrans (CofreeT f) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

lift :: Monad m => m a -> CofreeT f m a Source #

Functor f => MonadTrans (FreeT f) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

lift :: Monad m => m a -> FreeT f m a Source #

MonadTrans (ExceptT e) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

lift :: Monad m => m a -> ExceptT e m a Source #

MonadTrans (IdentityT :: (Type -> Type) -> Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

lift :: Monad m => m a -> IdentityT m a Source #

MonadTrans (ReaderT r) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

lift :: Monad m => m a -> ReaderT r m a Source #

MonadTrans (StateT s) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

lift :: Monad m => m a -> StateT s m a Source #

data IdentityT (f :: k -> Type) (a :: k) Source #

The trivial monad transformer, which maps a monad to an equivalent monad.

Instances

Instances details
Generic1 (IdentityT f :: k -> Type) 
Instance details

Defined in Control.Monad.Trans.Identity

Associated Types

type Rep1 (IdentityT f) :: k -> Type Source #

Methods

from1 :: forall (a :: k0). IdentityT f a -> Rep1 (IdentityT f) a Source #

to1 :: forall (a :: k0). Rep1 (IdentityT f) a -> IdentityT f a Source #

MonadReader r m => MonadReader r (IdentityT m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: IdentityT m r Source #

local :: (r -> r) -> IdentityT m a -> IdentityT m a Source #

reader :: (r -> a) -> IdentityT m a Source #

MonadState s m => MonadState s (IdentityT m) 
Instance details

Defined in Control.Monad.State.Class

Methods

get :: IdentityT m s Source #

put :: s -> IdentityT m () Source #

state :: (s -> (a, s)) -> IdentityT m a Source #

MonadTrans (IdentityT :: (Type -> Type) -> Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

lift :: Monad m => m a -> IdentityT m a Source #

MonadFail m => MonadFail (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fail :: String -> IdentityT m a Source #

MonadFix m => MonadFix (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mfix :: (a -> IdentityT m a) -> IdentityT m a Source #

MonadIO m => MonadIO (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftIO :: IO a -> IdentityT m a Source #

MonadZip m => MonadZip (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mzip :: IdentityT m a -> IdentityT m b -> IdentityT m (a, b) Source #

mzipWith :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c Source #

munzip :: IdentityT m (a, b) -> (IdentityT m a, IdentityT m b) Source #

Foldable f => Foldable (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fold :: Monoid m => IdentityT f m -> m Source #

foldMap :: Monoid m => (a -> m) -> IdentityT f a -> m Source #

foldMap' :: Monoid m => (a -> m) -> IdentityT f a -> m Source #

foldr :: (a -> b -> b) -> b -> IdentityT f a -> b Source #

foldr' :: (a -> b -> b) -> b -> IdentityT f a -> b Source #

foldl :: (b -> a -> b) -> b -> IdentityT f a -> b Source #

foldl' :: (b -> a -> b) -> b -> IdentityT f a -> b Source #

foldr1 :: (a -> a -> a) -> IdentityT f a -> a Source #

foldl1 :: (a -> a -> a) -> IdentityT f a -> a Source #

toList :: IdentityT f a -> [a] Source #

null :: IdentityT f a -> Bool Source #

length :: IdentityT f a -> Int Source #

elem :: Eq a => a -> IdentityT f a -> Bool Source #

maximum :: Ord a => IdentityT f a -> a Source #

minimum :: Ord a => IdentityT f a -> a Source #

sum :: Num a => IdentityT f a -> a Source #

product :: Num a => IdentityT f a -> a Source #

Foldable1 m => Foldable1 (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fold1 :: Semigroup m0 => IdentityT m m0 -> m0 Source #

foldMap1 :: Semigroup m0 => (a -> m0) -> IdentityT m a -> m0 Source #

foldMap1' :: Semigroup m0 => (a -> m0) -> IdentityT m a -> m0 Source #

toNonEmpty :: IdentityT m a -> NonEmpty a Source #

maximum :: Ord a => IdentityT m a -> a Source #

minimum :: Ord a => IdentityT m a -> a Source #

head :: IdentityT m a -> a Source #

last :: IdentityT m a -> a Source #

foldrMap1 :: (a -> b) -> (a -> b -> b) -> IdentityT m a -> b Source #

foldlMap1' :: (a -> b) -> (b -> a -> b) -> IdentityT m a -> b Source #

foldlMap1 :: (a -> b) -> (b -> a -> b) -> IdentityT m a -> b Source #

foldrMap1' :: (a -> b) -> (a -> b -> b) -> IdentityT m a -> b Source #

Eq1 f => Eq1 (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftEq :: (a -> b -> Bool) -> IdentityT f a -> IdentityT f b -> Bool Source #

Ord1 f => Ord1 (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftCompare :: (a -> b -> Ordering) -> IdentityT f a -> IdentityT f b -> Ordering Source #

Read1 f => Read1 (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Show1 f => Show1 (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> IdentityT f a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [IdentityT f a] -> ShowS Source #

Contravariant f => Contravariant (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

contramap :: (a' -> a) -> IdentityT f a -> IdentityT f a' Source #

(>$) :: b -> IdentityT f b -> IdentityT f a Source #

Traversable f => Traversable (IdentityT f) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

traverse :: Applicative f0 => (a -> f0 b) -> IdentityT f a -> f0 (IdentityT f b) Source #

sequenceA :: Applicative f0 => IdentityT f (f0 a) -> f0 (IdentityT f a) Source #

mapM :: Monad m => (a -> m b) -> IdentityT f a -> m (IdentityT f b) Source #

sequence :: Monad m => IdentityT f (m a) -> m (IdentityT f a) Source #

Alternative m => Alternative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

empty :: IdentityT m a Source #

(<|>) :: IdentityT m a -> IdentityT m a -> IdentityT m a Source #

some :: IdentityT m a -> IdentityT m [a] Source #

many :: IdentityT m a -> IdentityT m [a] Source #

Applicative m => Applicative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

pure :: a -> IdentityT m a Source #

(<*>) :: IdentityT m (a -> b) -> IdentityT m a -> IdentityT m b Source #

liftA2 :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c Source #

(*>) :: IdentityT m a -> IdentityT m b -> IdentityT m b Source #

(<*) :: IdentityT m a -> IdentityT m b -> IdentityT m a Source #

Functor m => Functor (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fmap :: (a -> b) -> IdentityT m a -> IdentityT m b Source #

(<$) :: a -> IdentityT m b -> IdentityT m a Source #

Monad m => Monad (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

(>>=) :: IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b Source #

(>>) :: IdentityT m a -> IdentityT m b -> IdentityT m b Source #

return :: a -> IdentityT m a Source #

MonadPlus m => MonadPlus (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mzero :: IdentityT m a Source #

mplus :: IdentityT m a -> IdentityT m a -> IdentityT m a Source #

PrimBase m => PrimBase (IdentityT m) 
Instance details

Defined in Control.Monad.Primitive

Methods

internal :: IdentityT m a -> State# (PrimState (IdentityT m)) -> (# State# (PrimState (IdentityT m)), a #)

PrimMonad m => PrimMonad (IdentityT m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (IdentityT m)

Methods

primitive :: (State# (PrimState (IdentityT m)) -> (# State# (PrimState (IdentityT m)), a #)) -> IdentityT m a

Generic (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Associated Types

type Rep (IdentityT f a) :: Type -> Type Source #

Methods

from :: IdentityT f a -> Rep (IdentityT f a) x Source #

to :: Rep (IdentityT f a) x -> IdentityT f a Source #

(Read1 f, Read a) => Read (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

(Show1 f, Show a) => Show (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

(Eq1 f, Eq a) => Eq (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

(==) :: IdentityT f a -> IdentityT f a -> Bool Source #

(/=) :: IdentityT f a -> IdentityT f a -> Bool Source #

(Ord1 f, Ord a) => Ord (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

compare :: IdentityT f a -> IdentityT f a -> Ordering Source #

(<) :: IdentityT f a -> IdentityT f a -> Bool Source #

(<=) :: IdentityT f a -> IdentityT f a -> Bool Source #

(>) :: IdentityT f a -> IdentityT f a -> Bool Source #

(>=) :: IdentityT f a -> IdentityT f a -> Bool Source #

max :: IdentityT f a -> IdentityT f a -> IdentityT f a Source #

min :: IdentityT f a -> IdentityT f a -> IdentityT f a Source #

type Rep1 (IdentityT f :: k -> Type) 
Instance details

Defined in Control.Monad.Trans.Identity

type Rep1 (IdentityT f :: k -> Type) = D1 ('MetaData "IdentityT" "Control.Monad.Trans.Identity" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "IdentityT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentityT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 f)))
type PrimState (IdentityT m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (IdentityT m) = PrimState m
type Rep (IdentityT f a) 
Instance details

Defined in Control.Monad.Trans.Identity

type Rep (IdentityT f a) = D1 ('MetaData "IdentityT" "Control.Monad.Trans.Identity" "transformers-0.6.1.0" 'True) (C1 ('MetaCons "IdentityT" 'PrefixI 'True) (S1 ('MetaSel ('Just "runIdentityT") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f a))))

type OnDecodeError = OnError Word8 Char Source #

A handler for a decoding error.

type OnError a b = String -> Maybe a -> Maybe b Source #

Function type for handling a coding error. It is supplied with two inputs:

  • A String that describes the error.
  • The input value that caused the error. If the error arose because the end of input was reached or could not be identified precisely, this value will be Nothing.

If the handler returns a value wrapped with Just, that value will be used in the output as the replacement for the invalid input. If it returns Nothing, no value will be used in the output.

Should the handler need to abort processing, it should use error or throw an exception (preferably a UnicodeException). It may use the description provided to construct a more helpful error report.

type family OneItem x #

Instances

Instances details
type OneItem ByteString 
Instance details

Defined in Relude.Container.One

type OneItem ByteString 
Instance details

Defined in Relude.Container.One

type OneItem ShortByteString 
Instance details

Defined in Relude.Container.One

type OneItem IntSet 
Instance details

Defined in Relude.Container.One

type OneItem Text 
Instance details

Defined in Relude.Container.One

type OneItem Text 
Instance details

Defined in Relude.Container.One

type OneItem (NonEmpty a) 
Instance details

Defined in Relude.Container.One

type OneItem (NonEmpty a) = a
type OneItem (IntMap v) 
Instance details

Defined in Relude.Container.One

type OneItem (IntMap v) = (Int, v)
type OneItem (Seq a) 
Instance details

Defined in Relude.Container.One

type OneItem (Seq a) = a
type OneItem (Set a) 
Instance details

Defined in Relude.Container.One

type OneItem (Set a) = a
type OneItem (HashSet a) 
Instance details

Defined in Relude.Container.One

type OneItem (HashSet a) = a
type OneItem [a] 
Instance details

Defined in Relude.Container.One

type OneItem [a] = a
type OneItem (Map k v) 
Instance details

Defined in Relude.Container.One

type OneItem (Map k v) = (k, v)
type OneItem (HashMap k v) 
Instance details

Defined in Relude.Container.One

type OneItem (HashMap k v) = (k, v)

data Undefined #

Constructors

Undefined 

Instances

Instances details
Data Undefined 
Instance details

Defined in Relude.Debug

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Undefined -> c Undefined Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Undefined Source #

toConstr :: Undefined -> Constr Source #

dataTypeOf :: Undefined -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Undefined) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Undefined) Source #

gmapT :: (forall b. Data b => b -> b) -> Undefined -> Undefined Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Undefined -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Undefined -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Undefined -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Undefined -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Undefined -> m Undefined Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Undefined -> m Undefined Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Undefined -> m Undefined Source #

Bounded Undefined 
Instance details

Defined in Relude.Debug

Enum Undefined 
Instance details

Defined in Relude.Debug

Generic Undefined 
Instance details

Defined in Relude.Debug

Associated Types

type Rep Undefined :: Type -> Type Source #

Read Undefined 
Instance details

Defined in Relude.Debug

Show Undefined 
Instance details

Defined in Relude.Debug

Eq Undefined 
Instance details

Defined in Relude.Debug

Ord Undefined 
Instance details

Defined in Relude.Debug

type Rep Undefined 
Instance details

Defined in Relude.Debug

type Rep Undefined = D1 ('MetaData "Undefined" "Relude.Debug" "relude-1.2.1.0-4zTgKNAhk5s7DOCHNH9BCF" 'False) (C1 ('MetaCons "Undefined" 'PrefixI 'False) (U1 :: Type -> Type))

data Bug #

Instances

Instances details
Exception Bug 
Instance details

Defined in Relude.Exception

Show Bug 
Instance details

Defined in Relude.Exception

class ConvertUtf8 a b where #

Methods

encodeUtf8 :: a -> b #

decodeUtf8 :: b -> a #

decodeUtf8Strict :: b -> Either UnicodeException a #

Instances

Instances details
ConvertUtf8 LText ByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 LText ShortByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 LText LByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 Text ByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 Text ShortByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 Text LByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 String ByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 String ShortByteString 
Instance details

Defined in Relude.String.Conversion

ConvertUtf8 String LByteString 
Instance details

Defined in Relude.String.Conversion

type LText = Text #

class LazyStrict l s | l -> s, s -> l where #

Methods

toLazy :: s -> l #

toStrict :: l -> s #

Instances

Instances details
LazyStrict LByteString ByteString 
Instance details

Defined in Relude.String.Conversion

LazyStrict LText Text 
Instance details

Defined in Relude.String.Conversion

Methods

toLazy :: Text -> LText #

toStrict :: LText -> Text #

class ToLText a where #

Methods

toLText :: a -> LText #

Instances

Instances details
EncodingError ToLText "ByteString" "LText" => ToLText ByteString 
Instance details

Defined in Relude.String.Conversion

Methods

toLText :: ByteString -> LText #

EncodingError ToLText "ShortByteString" "LText" => ToLText ShortByteString 
Instance details

Defined in Relude.String.Conversion

EncodingError ToLText "LByteString" "LText" => ToLText LByteString 
Instance details

Defined in Relude.String.Conversion

Methods

toLText :: LByteString -> LText #

ToLText Text 
Instance details

Defined in Relude.String.Conversion

Methods

toLText :: Text -> LText #

ToLText Text 
Instance details

Defined in Relude.String.Conversion

Methods

toLText :: Text -> LText #

ToLText String 
Instance details

Defined in Relude.String.Conversion

Methods

toLText :: String -> LText #

class ToString a where #

Methods

toString :: a -> String #

Instances

Instances details
EncodingError ToString "ByteString" "String" => ToString ByteString 
Instance details

Defined in Relude.String.Conversion

EncodingError ToString "ShortByteString" "String" => ToString ShortByteString 
Instance details

Defined in Relude.String.Conversion

EncodingError ToString "LByteString" "String" => ToString LByteString 
Instance details

Defined in Relude.String.Conversion

ToString LText 
Instance details

Defined in Relude.String.Conversion

Methods

toString :: LText -> String #

ToString Text 
Instance details

Defined in Relude.String.Conversion

Methods

toString :: Text -> String #

ToString String 
Instance details

Defined in Relude.String.Conversion

Methods

toString :: String -> String #

class ToText a where #

Methods

toText :: a -> Text #

Instances

Instances details
EncodingError ToText "ByteString" "Text" => ToText ByteString 
Instance details

Defined in Relude.String.Conversion

Methods

toText :: ByteString -> Text #

EncodingError ToText "ShortByteString" "Text" => ToText ShortByteString 
Instance details

Defined in Relude.String.Conversion

EncodingError ToText "LByteString" "Text" => ToText LByteString 
Instance details

Defined in Relude.String.Conversion

Methods

toText :: LByteString -> Text #

ToText LText 
Instance details

Defined in Relude.String.Conversion

Methods

toText :: LText -> Text #

ToText Text 
Instance details

Defined in Relude.String.Conversion

Methods

toText :: Text -> Text #

ToText String 
Instance details

Defined in Relude.String.Conversion

Methods

toText :: String -> Text #

class Eq a => Hashable a where #

Minimal complete definition

Nothing

Methods

hashWithSalt :: Int -> a -> Int #

Instances

Instances details
Hashable Key 
Instance details

Defined in Data.Aeson.Key

Methods

hashWithSalt :: Int -> Key -> Int #

hash :: Key -> Int

Hashable Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

hashWithSalt :: Int -> Value -> Int #

hash :: Value -> Int

Hashable ByteArray 
Instance details

Defined in Data.Hashable.Class

Hashable SomeTypeRep 
Instance details

Defined in Data.Hashable.Class

Hashable Unique 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Unique -> Int #

hash :: Unique -> Int

Hashable Version 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Version -> Int #

hash :: Version -> Int

Hashable IntPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntPtr -> Int #

hash :: IntPtr -> Int

Hashable WordPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> WordPtr -> Int #

hash :: WordPtr -> Int

Hashable Void 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Void -> Int #

hash :: Void -> Int

Hashable ThreadId 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> ThreadId -> Int #

hash :: ThreadId -> Int

Hashable Fingerprint 
Instance details

Defined in Data.Hashable.Class

Hashable Int16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int16 -> Int #

hash :: Int16 -> Int

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int #

hash :: Int64 -> Int

Hashable Int8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int8 -> Int #

hash :: Int8 -> Int

Hashable Word16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word16 -> Int #

hash :: Word16 -> Int

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int #

hash :: Word32 -> Int

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int #

hash :: Word64 -> Int

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int #

hash :: Word8 -> Int

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Hashable ShortByteString 
Instance details

Defined in Data.Hashable.Class

Hashable IntSet 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntSet -> Int #

hash :: IntSet -> Int

Hashable OsString 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> OsString -> Int #

hash :: OsString -> Int

Hashable PosixString 
Instance details

Defined in Data.Hashable.Class

Hashable WindowsString 
Instance details

Defined in Data.Hashable.Class

Hashable BigNat 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> BigNat -> Int #

hash :: BigNat -> Int

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ordering -> Int #

hash :: Ordering -> Int

Hashable Scientific 
Instance details

Defined in Data.Scientific

Methods

hashWithSalt :: Int -> Scientific -> Int #

hash :: Scientific -> Int

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int

Hashable ShortText 
Instance details

Defined in Data.Text.Short.Internal

Methods

hashWithSalt :: Int -> ShortText -> Int #

hash :: ShortText -> Int

Hashable UUID 
Instance details

Defined in Data.UUID.Types.Internal

Methods

hashWithSalt :: Int -> UUID -> Int #

hash :: UUID -> Int

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int #

hash :: Integer -> Int

Hashable Natural 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Natural -> Int #

hash :: Natural -> Int

Hashable () 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> () -> Int #

hash :: () -> Int

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int #

hash :: Bool -> Int

Hashable Char 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Char -> Int #

hash :: Char -> Int

Hashable Double 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Double -> Int #

hash :: Double -> Int

Hashable Float 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Float -> Int #

hash :: Float -> Int

Hashable Int 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int -> Int #

hash :: Int -> Int

Hashable Word 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word -> Int #

hash :: Word -> Int

Hashable v => Hashable (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

hashWithSalt :: Int -> KeyMap v -> Int #

hash :: KeyMap v -> Int

Hashable a => Hashable (Complex a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Complex a -> Int #

hash :: Complex a -> Int

Hashable a => Hashable (Identity a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Identity a -> Int #

hash :: Identity a -> Int

Hashable a => Hashable (First a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> First a -> Int #

hash :: First a -> Int

Hashable a => Hashable (Last a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Last a -> Int #

hash :: Last a -> Int

Hashable a => Hashable (Max a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Max a -> Int #

hash :: Max a -> Int

Hashable a => Hashable (Min a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Min a -> Int #

hash :: Min a -> Int

Hashable a => Hashable (WrappedMonoid a) 
Instance details

Defined in Data.Hashable.Class

Hashable a => Hashable (NonEmpty a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> NonEmpty a -> Int #

hash :: NonEmpty a -> Int

Hashable (FunPtr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> FunPtr a -> Int #

hash :: FunPtr a -> Int

Hashable (Ptr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ptr a -> Int #

hash :: Ptr a -> Int

Hashable a => Hashable (Ratio a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ratio a -> Int #

hash :: Ratio a -> Int

Hashable (StableName a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> StableName a -> Int #

hash :: StableName a -> Int

Hashable v => Hashable (IntMap v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntMap v -> Int #

hash :: IntMap v -> Int

Hashable v => Hashable (Seq v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Seq v -> Int #

hash :: Seq v -> Int

Hashable v => Hashable (Set v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Set v -> Int #

hash :: Set v -> Int

Hashable v => Hashable (Tree v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Tree v -> Int #

hash :: Tree v -> Int

Hashable1 f => Hashable (Fix f) 
Instance details

Defined in Data.Fix

Methods

hashWithSalt :: Int -> Fix f -> Int #

hash :: Fix f -> Int

Eq a => Hashable (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Hashed a -> Int #

hash :: Hashed a -> Int

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Strict.Maybe

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int

Hashable a => Hashable (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

hashWithSalt :: Int -> HashSet a -> Int #

hash :: HashSet a -> Int

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int

Hashable a => Hashable (a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a) -> Int #

hash :: (a) -> Int

Hashable a => Hashable [a] 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> [a] -> Int #

hash :: [a] -> Int

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int

Hashable (Fixed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Fixed a -> Int #

hash :: Fixed a -> Int

Hashable (Proxy a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Proxy a -> Int #

hash :: Proxy a -> Int

Hashable a => Hashable (Arg a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Arg a b -> Int #

hash :: Arg a b -> Int

Hashable (TypeRep a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> TypeRep a -> Int #

hash :: TypeRep a -> Int

(Hashable k, Hashable v) => Hashable (Map k v) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Map k v -> Int #

hash :: Map k v -> Int

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Strict.Either

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int

(Hashable a, Hashable b) => Hashable (These a b) 
Instance details

Defined in Data.Strict.These

Methods

hashWithSalt :: Int -> These a b -> Int #

hash :: These a b -> Int

(Hashable a, Hashable b) => Hashable (Pair a b) 
Instance details

Defined in Data.Strict.Tuple

Methods

hashWithSalt :: Int -> Pair a b -> Int #

hash :: Pair a b -> Int

(Hashable a, Hashable b) => Hashable (These a b) 
Instance details

Defined in Data.These

Methods

hashWithSalt :: Int -> These a b -> Int #

hash :: These a b -> Int

(Hashable k, Hashable v) => Hashable (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

hashWithSalt :: Int -> HashMap k v -> Int #

hash :: HashMap k v -> Int

(Hashable a1, Hashable a2) => Hashable (a1, a2) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2) -> Int #

hash :: (a1, a2) -> Int

Hashable a => Hashable (Const a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Const a b -> Int #

hash :: Const a b -> Int

(Hashable a1, Hashable a2, Hashable a3) => Hashable (a1, a2, a3) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3) -> Int #

hash :: (a1, a2, a3) -> Int

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Product f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Product f g a -> Int #

hash :: Product f g a -> Int

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Sum f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Sum f g a -> Int #

hash :: Sum f g a -> Int

(Hashable a1, Hashable a2, Hashable a3, Hashable a4) => Hashable (a1, a2, a3, a4) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4) -> Int #

hash :: (a1, a2, a3, a4) -> Int

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Compose f g a -> Int #

hash :: Compose f g a -> Int

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5) => Hashable (a1, a2, a3, a4, a5) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5) -> Int #

hash :: (a1, a2, a3, a4, a5) -> Int

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable (a1, a2, a3, a4, a5, a6) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6) -> Int #

hash :: (a1, a2, a3, a4, a5, a6) -> Int

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6, Hashable a7) => Hashable (a1, a2, a3, a4, a5, a6, a7) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6, a7) -> Int #

hash :: (a1, a2, a3, a4, a5, a6, a7) -> Int

data HashMap k v #

Instances

Instances details
Bifoldable HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

bifold :: Monoid m => HashMap m m -> m Source #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> HashMap a b -> m Source #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> HashMap a b -> c Source #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> HashMap a b -> c Source #

Eq2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> HashMap a c -> HashMap b d -> Bool Source #

Ord2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> HashMap a c -> HashMap b d -> Ordering Source #

Show2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> HashMap a b -> ShowS Source #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [HashMap a b] -> ShowS Source #

NFData2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> HashMap a b -> () Source #

Hashable2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> HashMap a b -> Int

(Lift k, Lift v) => Lift (HashMap k v :: Type) 
Instance details

Defined in Data.HashMap.Internal

Methods

lift :: Quote m => HashMap k v -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => HashMap k v -> Code m (HashMap k v) Source #

(FromJSONKey k, Eq k, Hashable k) => FromJSON1 (HashMap k) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (HashMap k a)

liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [HashMap k a]

liftOmittedField :: Maybe a -> Maybe (HashMap k a)

ToJSONKey k => ToJSON1 (HashMap k) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> HashMap k a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [HashMap k a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> HashMap k a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [HashMap k a] -> Encoding

liftOmitField :: (a -> Bool) -> HashMap k a -> Bool

Foldable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fold :: Monoid m => HashMap k m -> m Source #

foldMap :: Monoid m => (a -> m) -> HashMap k a -> m Source #

foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m Source #

foldr :: (a -> b -> b) -> b -> HashMap k a -> b Source #

foldr' :: (a -> b -> b) -> b -> HashMap k a -> b Source #

foldl :: (b -> a -> b) -> b -> HashMap k a -> b Source #

foldl' :: (b -> a -> b) -> b -> HashMap k a -> b Source #

foldr1 :: (a -> a -> a) -> HashMap k a -> a Source #

foldl1 :: (a -> a -> a) -> HashMap k a -> a Source #

toList :: HashMap k a -> [a] Source #

null :: HashMap k a -> Bool Source #

length :: HashMap k a -> Int Source #

elem :: Eq a => a -> HashMap k a -> Bool Source #

maximum :: Ord a => HashMap k a -> a Source #

minimum :: Ord a => HashMap k a -> a Source #

sum :: Num a => HashMap k a -> a Source #

product :: Num a => HashMap k a -> a Source #

Eq k => Eq1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashMap k a -> HashMap k b -> Bool Source #

Ord k => Ord1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashMap k a -> HashMap k b -> Ordering Source #

(Eq k, Hashable k, Read k) => Read1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (HashMap k a) Source #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [HashMap k a] Source #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (HashMap k a) Source #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [HashMap k a] Source #

Show k => Show1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashMap k a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashMap k a] -> ShowS Source #

Traversable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> HashMap k a -> f (HashMap k b) Source #

sequenceA :: Applicative f => HashMap k (f a) -> f (HashMap k a) Source #

mapM :: Monad m => (a -> m b) -> HashMap k a -> m (HashMap k b) Source #

sequence :: Monad m => HashMap k (m a) -> m (HashMap k a) Source #

Functor (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fmap :: (a -> b) -> HashMap k a -> HashMap k b Source #

(<$) :: a -> HashMap k b -> HashMap k a Source #

NFData k => NFData1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf :: (a -> ()) -> HashMap k a -> () Source #

Hashable k => Hashable1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> HashMap k a -> Int

(FromJSON v, FromJSONKey k, Eq k, Hashable k) => FromJSON (HashMap k v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (HashMap k v) #

parseJSONList :: Value -> Parser [HashMap k v] #

omittedField :: Maybe (HashMap k v) #

(ToJSON v, ToJSONKey k) => ToJSON (HashMap k v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: HashMap k v -> Value #

toEncoding :: HashMap k v -> Encoding #

toJSONList :: [HashMap k v] -> Value #

toEncodingList :: [HashMap k v] -> Encoding #

omitField :: HashMap k v -> Bool #

(Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashMap k v -> c (HashMap k v) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashMap k v) Source #

toConstr :: HashMap k v -> Constr Source #

dataTypeOf :: HashMap k v -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashMap k v)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashMap k v)) Source #

gmapT :: (forall b. Data b => b -> b) -> HashMap k v -> HashMap k v Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> HashMap k v -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashMap k v -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) Source #

(Eq k, Hashable k) => Monoid (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

mempty :: HashMap k v Source #

mappend :: HashMap k v -> HashMap k v -> HashMap k v Source #

mconcat :: [HashMap k v] -> HashMap k v Source #

(Eq k, Hashable k) => Semigroup (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

(<>) :: HashMap k v -> HashMap k v -> HashMap k v Source #

sconcat :: NonEmpty (HashMap k v) -> HashMap k v Source #

stimes :: Integral b => b -> HashMap k v -> HashMap k v Source #

(Eq k, Hashable k) => IsList (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Associated Types

type Item (HashMap k v) Source #

Methods

fromList :: [Item (HashMap k v)] -> HashMap k v Source #

fromListN :: Int -> [Item (HashMap k v)] -> HashMap k v Source #

toList :: HashMap k v -> [Item (HashMap k v)] Source #

(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) 
Instance details

Defined in Data.HashMap.Internal

(Show k, Show v) => Show (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

showsPrec :: Int -> HashMap k v -> ShowS Source #

show :: HashMap k v -> String Source #

showList :: [HashMap k v] -> ShowS Source #

(NFData k, NFData v) => NFData (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: HashMap k v -> () Source #

(Eq k, Eq v) => Eq (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

(==) :: HashMap k v -> HashMap k v -> Bool Source #

(/=) :: HashMap k v -> HashMap k v -> Bool Source #

(Ord k, Ord v) => Ord (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

compare :: HashMap k v -> HashMap k v -> Ordering Source #

(<) :: HashMap k v -> HashMap k v -> Bool Source #

(<=) :: HashMap k v -> HashMap k v -> Bool Source #

(>) :: HashMap k v -> HashMap k v -> Bool Source #

(>=) :: HashMap k v -> HashMap k v -> Bool Source #

max :: HashMap k v -> HashMap k v -> HashMap k v Source #

min :: HashMap k v -> HashMap k v -> HashMap k v Source #

(Hashable k, Hashable v) => Hashable (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

hashWithSalt :: Int -> HashMap k v -> Int #

hash :: HashMap k v -> Int

Hashable k => One (HashMap k v) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (HashMap k v) #

Methods

one :: OneItem (HashMap k v) -> HashMap k v #

Hashable k => DynamicMap (HashMap k v) 
Instance details

Defined in Relude.Extra.Map

Methods

insert :: Key (HashMap k v) -> Val (HashMap k v) -> HashMap k v -> HashMap k v #

insertWith :: (Val (HashMap k v) -> Val (HashMap k v) -> Val (HashMap k v)) -> Key (HashMap k v) -> Val (HashMap k v) -> HashMap k v -> HashMap k v #

delete :: Key (HashMap k v) -> HashMap k v -> HashMap k v #

alter :: (Maybe (Val (HashMap k v)) -> Maybe (Val (HashMap k v))) -> Key (HashMap k v) -> HashMap k v -> HashMap k v #

Hashable k => StaticMap (HashMap k v) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (HashMap k v) #

type Val (HashMap k v) #

Methods

size :: HashMap k v -> Int #

lookup :: Key (HashMap k v) -> HashMap k v -> Maybe (Val (HashMap k v)) #

member :: Key (HashMap k v) -> HashMap k v -> Bool #

type Item (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

type Item (HashMap k v) = (k, v)
type OneItem (HashMap k v) 
Instance details

Defined in Relude.Container.One

type OneItem (HashMap k v) = (k, v)
type Key (HashMap k v) 
Instance details

Defined in Relude.Extra.Map

type Key (HashMap k v) = k
type Val (HashMap k v) 
Instance details

Defined in Relude.Extra.Map

type Val (HashMap k v) = v

data HashSet a #

Instances

Instances details
ToJSON1 HashSet 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> HashSet a -> Value

liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [HashSet a] -> Value

liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> HashSet a -> Encoding

liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [HashSet a] -> Encoding

liftOmitField :: (a -> Bool) -> HashSet a -> Bool

Foldable HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

fold :: Monoid m => HashSet m -> m Source #

foldMap :: Monoid m => (a -> m) -> HashSet a -> m Source #

foldMap' :: Monoid m => (a -> m) -> HashSet a -> m Source #

foldr :: (a -> b -> b) -> b -> HashSet a -> b Source #

foldr' :: (a -> b -> b) -> b -> HashSet a -> b Source #

foldl :: (b -> a -> b) -> b -> HashSet a -> b Source #

foldl' :: (b -> a -> b) -> b -> HashSet a -> b Source #

foldr1 :: (a -> a -> a) -> HashSet a -> a Source #

foldl1 :: (a -> a -> a) -> HashSet a -> a Source #

toList :: HashSet a -> [a] Source #

null :: HashSet a -> Bool Source #

length :: HashSet a -> Int Source #

elem :: Eq a => a -> HashSet a -> Bool Source #

maximum :: Ord a => HashSet a -> a Source #

minimum :: Ord a => HashSet a -> a Source #

sum :: Num a => HashSet a -> a Source #

product :: Num a => HashSet a -> a Source #

Eq1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashSet a -> HashSet b -> Bool Source #

Ord1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashSet a -> HashSet b -> Ordering Source #

Show1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashSet a -> ShowS Source #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashSet a] -> ShowS Source #

NFData1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftRnf :: (a -> ()) -> HashSet a -> () Source #

Hashable1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> HashSet a -> Int

Lift a => Lift (HashSet a :: Type) 
Instance details

Defined in Data.HashSet.Internal

Methods

lift :: Quote m => HashSet a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => HashSet a -> Code m (HashSet a) Source #

(Eq a, Hashable a, FromJSON a) => FromJSON (HashSet a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (HashSet a) #

parseJSONList :: Value -> Parser [HashSet a] #

omittedField :: Maybe (HashSet a) #

ToJSON a => ToJSON (HashSet a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: HashSet a -> Value #

toEncoding :: HashSet a -> Encoding #

toJSONList :: [HashSet a] -> Value #

toEncodingList :: [HashSet a] -> Encoding #

omitField :: HashSet a -> Bool #

(Data a, Eq a, Hashable a) => Data (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashSet a -> c (HashSet a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashSet a) Source #

toConstr :: HashSet a -> Constr Source #

dataTypeOf :: HashSet a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashSet a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashSet a)) Source #

gmapT :: (forall b. Data b => b -> b) -> HashSet a -> HashSet a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> HashSet a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashSet a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) Source #

(Hashable a, Eq a) => Monoid (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

(Hashable a, Eq a) => Semigroup (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

(<>) :: HashSet a -> HashSet a -> HashSet a Source #

sconcat :: NonEmpty (HashSet a) -> HashSet a Source #

stimes :: Integral b => b -> HashSet a -> HashSet a Source #

(Eq a, Hashable a) => IsList (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Associated Types

type Item (HashSet a) Source #

Methods

fromList :: [Item (HashSet a)] -> HashSet a Source #

fromListN :: Int -> [Item (HashSet a)] -> HashSet a Source #

toList :: HashSet a -> [Item (HashSet a)] Source #

(Eq a, Hashable a, Read a) => Read (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Show a => Show (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

NFData a => NFData (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

rnf :: HashSet a -> () Source #

Eq a => Eq (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

(==) :: HashSet a -> HashSet a -> Bool Source #

(/=) :: HashSet a -> HashSet a -> Bool Source #

Ord a => Ord (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Hashable a => Hashable (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

hashWithSalt :: Int -> HashSet a -> Int #

hash :: HashSet a -> Int

Hashable a => One (HashSet a) 
Instance details

Defined in Relude.Container.One

Associated Types

type OneItem (HashSet a) #

Methods

one :: OneItem (HashSet a) -> HashSet a #

Hashable a => StaticMap (HashSet a) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (HashSet a) #

type Val (HashSet a) #

Methods

size :: HashSet a -> Int #

lookup :: Key (HashSet a) -> HashSet a -> Maybe (Val (HashSet a)) #

member :: Key (HashSet a) -> HashSet a -> Bool #

type Item (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

type Item (HashSet a) = a
type OneItem (HashSet a) 
Instance details

Defined in Relude.Container.One

type OneItem (HashSet a) = a
type Key (HashSet a) 
Instance details

Defined in Relude.Extra.Map

type Key (HashSet a) = a
type Val (HashSet a) 
Instance details

Defined in Relude.Extra.Map

type Val (HashSet a) = a

pattern Exc :: Exception e => e -> SomeException #

deepseq :: NFData a => a -> b -> b infixr 0 Source #

deepseq: fully evaluates the first argument, before returning the second.

The name deepseq is used to illustrate the relationship to seq: where seq is shallow in the sense that it only evaluates the top level of its argument, deepseq traverses the entire data structure evaluating it completely.

deepseq can be useful for forcing pending exceptions, eradicating space leaks, or forcing lazy I/O to happen. It is also useful in conjunction with parallel Strategies (see the parallel package).

There is no guarantee about the ordering of evaluation. The implementation may evaluate the components of the structure in any order or in parallel. To impose an actual order on evaluation, use pseq from Control.Parallel in the parallel package.

Since: deepseq-1.1.0.0

error :: forall (r :: RuntimeRep) (a :: TYPE r) t. (HasCallStack, IsText t) => t -> a #

callStack :: HasCallStack => CallStack Source #

Return the current CallStack.

Does *not* include the call-site of callStack.

Since: base-4.9.0.0

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.

zipWith (,) xs ys == zip xs ys
zipWith f [x1,x2,x3..] [y1,y2,y3..] == [f x1 y1, f x2 y2, f x3 y3..]

For example, zipWith (+) is applied to two lists to produce the list of corresponding sums:

>>> zipWith (+) [1, 2, 3] [4, 5, 6]
[5,7,9]

zipWith is right-lazy:

>>> let f = undefined
>>> zipWith f [] undefined
[]

zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

show :: forall b a. (Show a, IsString b) => a -> b #

even :: Integral a => a -> Bool Source #

(<$>) :: 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)

stimesIdempotent :: Integral b => b -> a -> a Source #

This is a valid definition of stimes for an idempotent Semigroup.

When x <> x = x, this definition should be preferred, because it works in \(\mathcal{O}(1)\) rather than \(\mathcal{O}(\log n)\).

($) :: 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 representation-polymorphic in its result type, so that foo $ True where foo :: Bool -> Int# is well-typed.

sortBy :: (a -> a -> Ordering) -> [a] -> [a] Source #

The sortBy function is the non-overloaded version of sort. The argument must be finite.

>>> sortBy (\(a,_) (b,_) -> compare a b) [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]

The supplied comparison relation is supposed to be reflexive and antisymmetric, otherwise, e. g., for _ _ -> GT, the ordered list simply does not exist. The relation is also expected to be transitive: if it is not then sortBy might fail to find an ordered permutation, even if it exists.

fst :: (a, b) -> a Source #

Extract the first component of a pair.

bool :: a -> a -> Bool -> a Source #

Case analysis for the Bool type. bool x y p evaluates to x when p is False, and evaluates to y when p is True.

This is equivalent to if p then y else x; that is, one can think of it as an if-then-else construct with its arguments reordered.

Examples

Expand

Basic usage:

>>> bool "foo" "bar" True
"bar"
>>> bool "foo" "bar" False
"foo"

Confirm that bool x y p and if p then y else x are equivalent:

>>> let p = True; x = "bar"; y = "foo"
>>> bool x y p == if p then y else x
True
>>> let p = False
>>> bool x y p == if p then y else x
True

Since: base-4.7.0.0

readMaybe :: Read a => String -> Maybe a Source #

Parse a string using the Read instance. Succeeds if there is exactly one valid result.

>>> readMaybe "123" :: Maybe Int
Just 123
>>> readMaybe "hello" :: Maybe Int
Nothing

Since: base-4.6.0.0

genericLength :: Num i => [a] -> i Source #

\(\mathcal{O}(n)\). The genericLength function is an overloaded version of length. In particular, instead of returning an Int, it returns any type which is an instance of Num. It is, however, less efficient than length.

>>> genericLength [1, 2, 3] :: Int
3
>>> genericLength [1, 2, 3] :: Float
3.0

Users should take care to pick a return type that is wide enough to contain the full length of the list. If the width is insufficient, the overflow behaviour will depend on the (+) implementation in the selected Num instance. The following example overflows because the actual list length of 200 lies outside of the Int8 range of -128..127.

>>> genericLength [1..200] :: Int8
-56

genericReplicate :: Integral i => i -> a -> [a] Source #

The genericReplicate function is an overloaded version of replicate, which accepts any Integral value as the number of repetitions to make.

genericTake :: Integral i => i -> [a] -> [a] Source #

The genericTake function is an overloaded version of take, which accepts any Integral value as the number of elements to take.

genericDrop :: Integral i => i -> [a] -> [a] Source #

The genericDrop function is an overloaded version of drop, which accepts any Integral value as the number of elements to drop.

genericSplitAt :: Integral i => i -> [a] -> ([a], [a]) Source #

The genericSplitAt function is an overloaded version of splitAt, which accepts any Integral value as the position at which to split.

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]

coerce :: forall {k :: RuntimeRep} (a :: TYPE k) (b :: TYPE k). Coercible a b => a -> b Source #

The function coerce allows you to safely convert between values of types that have the same representation with no run-time overhead. In the simplest case you can use it instead of a newtype constructor, to go from the newtype's concrete type to the abstract type. But it also works in more complicated settings, e.g. converting a list of newtypes to a list of concrete types.

This function is representation-polymorphic, but the RuntimeRep type argument is marked as Inferred, meaning that it is not available for visible type application. This means the typechecker will accept coerce Int Age 42.

ord :: Char -> Int Source #

The fromEnum method restricted to the type Char.

chr :: Int -> Char Source #

The toEnum method restricted to the type Char.

id :: a -> a Source #

Identity function.

id x = x

head :: IsNonEmpty f a a "head" => f a -> a #

group :: Eq a => [a] -> [[a]] Source #

The group function takes a list and returns a list of lists such that the concatenation of the result is equal to the argument. Moreover, each sublist in the result is non-empty and all elements are equal to the first one. For example,

>>> group "Mississippi"
["M","i","ss","i","ss","i","pp","i"]

group is a special case of groupBy, which allows the programmer to supply their own equality test.

It's often preferable to use Data.List.NonEmpty.group, which provides type-level guarantees of non-emptiness of inner lists.

forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) Source #

forM is mapM with its arguments flipped. For a version that ignores the results see forM_.

atomicWriteIORef :: MonadIO m => IORef a -> a -> m () #

atomicModifyIORef :: MonadIO m => IORef a -> (a -> (a, b)) -> m b #

forever :: Applicative f => f a -> f b Source #

Repeat an action indefinitely.

Examples

Expand

A common use of forever is to process input from network sockets, Handles, and channels (e.g. MVar and Chan).

For example, here is how we might implement an echo server, using forever both to listen for client connections on a network socket and to echo client input on client connection handles:

echoServer :: Socket -> IO ()
echoServer socket = forever $ do
  client <- accept socket
  forkFinally (echo client) (\_ -> hClose client)
  where
    echo :: Handle -> IO ()
    echo client = forever $
      hGetLine client >>= hPutStrLn client

Note that "forever" isn't necessarily non-terminating. If the action is in a MonadPlus and short-circuits after some number of iterations. then forever actually returns mzero, effectively short-circuiting its caller.

hFlush :: MonadIO m => Handle -> m () #

writeFile :: MonadIO m => FilePath -> String -> m () #

getLine :: MonadIO m => m Text #

putStrLn :: MonadIO m => String -> m () #

getArgs :: MonadIO m => m [String] #

filter :: (a -> Bool) -> [a] -> [a] Source #

\(\mathcal{O}(n)\). filter, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e.,

filter p xs = [ x | x <- xs, p x]
>>> filter odd [1, 2, 3]
[1,3]

unfoldr :: (b -> Maybe (a, b)) -> b -> [a] Source #

The unfoldr function is a `dual' to foldr: while foldr reduces a list to a summary value, unfoldr builds a list from a seed value. The function takes the element and returns Nothing if it is done producing the list or returns Just (a,b), in which case, a is a prepended to the list and b is used as the next element in a recursive call. For example,

iterate f == unfoldr (\x -> Just (x, f x))

In some cases, unfoldr can undo a foldr operation:

unfoldr f' (foldr f z xs) == xs

if the following holds:

f' (f x y) = Just (x,y)
f' z       = Nothing

A simple use of unfoldr:

>>> unfoldr (\b -> if b == 0 then Nothing else Just (b, b-1)) 10
[10,9,8,7,6,5,4,3,2,1]

transpose :: [[a]] -> [[a]] Source #

The transpose function transposes the rows and columns of its argument. For example,

>>> transpose [[1,2,3],[4,5,6]]
[[1,4],[2,5],[3,6]]

If some of the rows are shorter than the following rows, their elements are skipped:

>>> transpose [[10,11],[20],[],[30,31,32]]
[[10,20,30],[11,31],[32]]

For this reason the outer list must be finite; otherwise transpose hangs:

>>> transpose (repeat [])
* Hangs forever *

bifor :: (Bitraversable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f (t c d) Source #

bifor is bitraverse with the structure as the first argument. For a version that ignores the results, see bifor_.

Examples

Expand

Basic usage:

>>> bifor (Left []) listToMaybe (find even)
Nothing
>>> bifor (Left [1, 2, 3]) listToMaybe (find even)
Just (Left 1)
>>> bifor (Right [4, 5]) listToMaybe (find even)
Just (Right 4)
>>> bifor ([1, 2, 3], [4, 5]) listToMaybe (find even)
Just (1,4)
>>> bifor ([], [4, 5]) listToMaybe (find even)
Nothing

Since: base-4.10.0.0

bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b) Source #

Sequences all the actions in a structure, building a new structure with the same shape using the results of the actions. For a version that ignores the results, see bisequence_.

bisequencebitraverse id id

Examples

Expand

Basic usage:

>>> bisequence (Just 4, Nothing)
Nothing
>>> bisequence (Just 4, Just 5)
Just (4,5)
>>> bisequence ([1, 2, 3], [4, 5])
[(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]

Since: base-4.10.0.0

exitWith :: MonadIO m => ExitCode -> m a #

sortOn :: Ord b => (a -> b) -> [a] -> [a] Source #

Sort a list by comparing the results of a key function applied to each element. sortOn f is equivalent to sortBy (comparing f), but has the performance advantage of only evaluating f once for each element in the input list. This is called the decorate-sort-undecorate paradigm, or Schwartzian transform.

Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.

>>> sortOn fst [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]

The argument must be finite.

Since: base-4.8.0.0

cycle :: [a] -> [a] #

(++) :: [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.

WARNING: This function takes linear time in the number of elements of 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.

concat :: Foldable t => t [a] -> [a] Source #

The concatenation of all the elements of a container of lists.

Examples

Expand

Basic usage:

>>> concat (Just [1, 2, 3])
[1,2,3]
>>> concat (Left 42)
[]
>>> concat [[1, 2, 3], [4, 5], [6], []]
[1,2,3,4,5,6]

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 shorter than the other, excess elements of the longer list are discarded, even if one of the lists is infinite:

>>> zip [1] ['a', 'b']
[(1,'a')]
>>> zip [1, 2] ['a']
[(1,'a')]
>>> zip [] [1..]
[]
>>> zip [1..] []
[]

zip is right-lazy:

>>> zip [] undefined
[]
>>> zip undefined []
*** Exception: Prelude.undefined
...

zip is capable of list fusion, but it is restricted to its first list argument and its resulting list.

print :: forall a m. (MonadIO m, Show a) => a -> m () #

otherwise :: Bool Source #

otherwise is defined as the value True. It helps to make guards more readable. eg.

 f x | x < 0     = ...
     | otherwise = ...

trace :: String -> a -> a #

map :: (a -> b) -> [a] -> [b] Source #

\(\mathcal{O}(n)\). map f xs is the list obtained by applying f to each element of xs, i.e.,

map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
map f [x1, x2, ...] == [f x1, f x2, ...]
>>> map (+1) [1, 2, 3]
[2,3,4]

(>>>) :: forall {k} cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c infixr 1 Source #

Left-to-right composition

fromIntegral :: (Integral a, Num b) => a -> b Source #

General coercion from Integral types.

WARNING: This function performs silent truncation if the result type is not at least as big as the argument's type.

realToFrac :: (Real a, Fractional b) => a -> b Source #

General coercion to Fractional types.

WARNING: This function goes through the Rational type, which does not have values for NaN for example. This means it does not round-trip.

For Double it also behaves differently with or without -O0:

Prelude> realToFrac nan -- With -O0
-Infinity
Prelude> realToFrac nan
NaN

guard :: Alternative f => Bool -> f () Source #

Conditional failure of Alternative computations. Defined by

guard True  = pure ()
guard False = empty

Examples

Expand

Common uses of guard include conditionally signaling an error in an error monad and conditionally rejecting the current choice in an Alternative-based parser.

As an example of signaling an error in the error monad Maybe, consider a safe division function safeDiv x y that returns Nothing when the denominator y is zero and Just (x `div` y) otherwise. For example:

>>> safeDiv 4 0
Nothing
>>> safeDiv 4 2
Just 2

A definition of safeDiv using guards, but not guard:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y | y /= 0    = Just (x `div` y)
            | otherwise = Nothing

A definition of safeDiv using guard and Monad do-notation:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y = do
  guard (y /= 0)
  return (x `div` y)

join :: Monad m => m (m a) -> m a Source #

The join function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.

'join bss' can be understood as the do expression

do bs <- bss
   bs

Examples

Expand

A common use of join is to run an IO computation returned from an STM transaction, since STM transactions can't perform IO directly. Recall that

atomically :: STM a -> IO a

is used to run STM transactions atomically. So, by specializing the types of atomically and join to

atomically :: STM (IO b) -> IO (IO b)
join       :: IO (IO b)  -> IO b

we can compose them as

join . atomically :: STM (IO b) -> IO b

to run an STM transaction and the IO action it returns.

(^) :: (Num a, Integral b) => a -> b -> a infixr 8 Source #

raise a number to a non-negative integral power

(&&) :: 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

not :: Bool -> Bool Source #

Boolean "not"

getCallStack :: CallStack -> [([Char], SrcLoc)] Source #

Extract a list of call-sites from the CallStack.

The list is ordered by most recent call.

Since: base-4.8.1.0

undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a #

stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a Source #

This is a valid definition of stimes for an idempotent Monoid.

When mappend x x = x, this definition should be preferred, because it works in \(\mathcal{O}(1)\) rather than \(\mathcal{O}(\log n)\)

absurd :: Void -> a Source #

Since Void values logically don't exist, this witnesses the logical reasoning tool of "ex falso quodlibet".

>>> let x :: Either Void Int; x = Right 5
>>> :{
case x of
    Right r -> r
    Left l  -> absurd l
:}
5

Since: base-4.8.0.0

vacuous :: Functor f => f Void -> f a Source #

If Void is uninhabited then any Functor that holds only values of type Void is holding no values. It is implemented in terms of fmap absurd.

Since: base-4.8.0.0

(<**>) :: Applicative f => f a -> f (a -> b) -> f b infixl 4 Source #

A variant of <*> with the arguments reversed.

liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source #

Lift a ternary function to actions.

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 Source #

Same as >>=, but with the arguments interchanged.

when :: Applicative f => Bool -> f () -> f () Source #

Conditional execution of Applicative expressions. For example,

when debug (putStrLn "Debugging")

will output the string Debugging if the Boolean value debug is True, and otherwise do nothing.

const :: a -> b -> a Source #

const x y always evaluates to x, ignoring its second argument.

>>> const 42 "hello"
42
>>> map (const 42) [0..3]
[42,42,42,42]

(.) :: (b -> c) -> (a -> b) -> a -> c infixr 9 Source #

Function composition.

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"

($!) :: 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.

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.

currentCallStack :: IO [String] Source #

Returns a [String] representing the current call stack. This can be useful for debugging.

The implementation uses the call-stack simulation maintained by the profiler, so it only works if the program was compiled with -prof and contains suitable SCC annotations (e.g. by using -fprof-auto). Otherwise, the list returned is likely to be empty or uninformative.

Since: base-4.5.0.0

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.

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
""

isJust :: Maybe a -> Bool Source #

The isJust function returns True iff its argument is of the form Just _.

Examples

Expand

Basic usage:

>>> isJust (Just 3)
True
>>> isJust (Just ())
True
>>> isJust Nothing
False

Only the outer constructor is taken into consideration:

>>> isJust (Just Nothing)
True

isNothing :: Maybe a -> Bool Source #

The isNothing function returns True iff its argument is Nothing.

Examples

Expand

Basic usage:

>>> isNothing (Just 3)
False
>>> isNothing (Just ())
False
>>> isNothing Nothing
True

Only the outer constructor is taken into consideration:

>>> isNothing (Just Nothing)
False

fromMaybe :: a -> Maybe a -> a Source #

The fromMaybe function takes a default value and a Maybe value. If the Maybe is Nothing, it returns the default value; otherwise, it returns the value contained in the Maybe.

Examples

Expand

Basic usage:

>>> fromMaybe "" (Just "Hello, World!")
"Hello, World!"
>>> fromMaybe "" Nothing
""

Read an integer from a string using readMaybe. If we fail to parse an integer, we want to return 0 by default:

>>> import Text.Read ( readMaybe )
>>> fromMaybe 0 (readMaybe "5")
5
>>> fromMaybe 0 (readMaybe "")
0

maybeToList :: Maybe a -> [a] Source #

The maybeToList function returns an empty list when given Nothing or a singleton list when given Just.

Examples

Expand

Basic usage:

>>> maybeToList (Just 7)
[7]
>>> maybeToList Nothing
[]

One can use maybeToList to avoid pattern matching when combined with a function that (safely) works on lists:

>>> import Text.Read ( readMaybe )
>>> sum $ maybeToList (readMaybe "3")
3
>>> sum $ maybeToList (readMaybe "")
0

listToMaybe :: [a] -> Maybe a Source #

The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

Examples

Expand

Basic usage:

>>> listToMaybe []
Nothing
>>> listToMaybe [9]
Just 9
>>> listToMaybe [1,2,3]
Just 1

Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:

>>> maybeToList $ listToMaybe [5]
[5]
>>> maybeToList $ listToMaybe []
[]

But not on lists with more than one element:

>>> maybeToList $ listToMaybe [1,2,3]
[1]

catMaybes :: [Maybe a] -> [a] Source #

The catMaybes function takes a list of Maybes and returns a list of all the Just values.

Examples

Expand

Basic usage:

>>> catMaybes [Just 1, Nothing, Just 3]
[1,3]

When constructing a list of Maybe values, catMaybes can be used to return all of the "success" results (if the list is the result of a map, then mapMaybe would be more appropriate):

>>> import Text.Read ( readMaybe )
>>> [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
[Just 1,Nothing,Just 3]
>>> catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
[1,3]

mapMaybe :: (a -> Maybe b) -> [a] -> [b] Source #

The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

Examples

Expand

Using mapMaybe f x is a shortcut for catMaybes $ map f x in most cases:

>>> import Text.Read ( readMaybe )
>>> let readMaybeInt = readMaybe :: String -> Maybe Int
>>> mapMaybe readMaybeInt ["1", "Foo", "3"]
[1,3]
>>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
[1,3]

If we map the Just constructor, the entire list should be returned:

>>> mapMaybe Just [1,2,3]
[1,2,3]

uncons :: [a] -> Maybe (a, [a]) Source #

\(\mathcal{O}(1)\). Decompose a list into its head and tail.

  • If the list is empty, returns Nothing.
  • If the list is non-empty, returns Just (x, xs), where x is the head of the list and xs its tail.
>>> uncons []
Nothing
>>> uncons [1]
Just (1,[])
>>> uncons [1, 2, 3]
Just (1,[2,3])

Since: base-4.8.0.0

tail :: IsNonEmpty f a [a] "tail" => f a -> [a] #

last :: IsNonEmpty f a a "last" => f a -> a #

init :: IsNonEmpty f a [a] "init" => f a -> [a] #

sum :: forall a f. (Foldable f, Num a) => f a -> a #

product :: forall a f. (Foldable f, Num a) => f a -> a #

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
>>> scanl (+) 0 [1..4]
[0,1,3,6,10]
>>> scanl (+) 42 []
[42]
>>> scanl (-) 100 [1..4]
[100,99,97,94,90]
>>> scanl (\reversedString nextChar -> nextChar : reversedString) "foo" ['a', 'b', 'c', 'd']
["foo","afoo","bafoo","cbafoo","dcbafoo"]
>>> scanl (+) 0 [1..]
* Hangs forever *

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, ...]
>>> scanl1 (+) [1..4]
[1,3,6,10]
>>> scanl1 (+) []
[]
>>> scanl1 (-) [1..4]
[1,-1,-4,-8]
>>> scanl1 (&&) [True, False, True, True]
[True,False,False,False]
>>> scanl1 (||) [False, False, True, True]
[False,False,True,True]
>>> scanl1 (+) [1..]
* Hangs forever *

scanl' :: (b -> a -> b) -> b -> [a] -> [b] Source #

\(\mathcal{O}(n)\). A strict version of scanl.

scanr :: (a -> b -> b) -> b -> [a] -> [b] Source #

\(\mathcal{O}(n)\). scanr is the right-to-left dual of scanl. Note that the order of parameters on the accumulating function are reversed compared to scanl. Also note that

head (scanr f z xs) == foldr f z xs.
>>> scanr (+) 0 [1..4]
[10,9,7,4,0]
>>> scanr (+) 42 []
[42]
>>> scanr (-) 100 [1..4]
[98,-97,99,-96,100]
>>> scanr (\nextChar reversedString -> nextChar : reversedString) "foo" ['a', 'b', 'c', 'd']
["abcdfoo","bcdfoo","cdfoo","dfoo","foo"]
>>> force $ scanr (+) 0 [1..]
*** Exception: stack overflow

scanr1 :: (a -> a -> a) -> [a] -> [a] Source #

\(\mathcal{O}(n)\). scanr1 is a variant of scanr that has no starting value argument.

>>> scanr1 (+) [1..4]
[10,9,7,4]
>>> scanr1 (+) []
[]
>>> scanr1 (-) [1..4]
[-2,3,-1,4]
>>> scanr1 (&&) [True, False, True, True]
[False,False,True,True]
>>> scanr1 (||) [True, True, False, False]
[True,True,False,False]
>>> force $ scanr1 (+) [1..]
*** Exception: stack overflow

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.

>>> take 10 $ iterate not True
[True,False,True,False...
>>> take 10 $ iterate (+3) 42
[42,45,48,51,54,57,60,63...

repeat :: a -> [a] Source #

repeat x is an infinite list, with x the value of every element.

>>> repeat 17
[17,17,17,17,17,17,17,17,17...

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.

>>> replicate 0 True
[]
>>> replicate (-1) True
[]
>>> replicate 4 True
[True,True,True,True]

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]
[]

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]

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.

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.

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.

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)

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).

reverse :: [a] -> [a] Source #

reverse xs returns the elements of xs in reverse order. xs must be finite.

>>> reverse []
[]
>>> reverse [42]
[42]
>>> reverse [2,5,7]
[7,5,2]
>>> reverse [1..]
* Hangs forever *

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.

Examples

Expand

Basic usage:

>>> and []
True
>>> and [True]
True
>>> and [False]
False
>>> and [True, True, False]
False
>>> and (False : repeat True) -- Infinite list [False,True,True,True,...
False
>>> and (repeat True)
* Hangs forever *

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.

Examples

Expand

Basic usage:

>>> or []
False
>>> or [True]
True
>>> or [False]
False
>>> or [True, True, False]
True
>>> or (True : repeat False) -- Infinite list [True,False,False,False,...
True
>>> or (repeat False)
* Hangs forever *

any :: Foldable t => (a -> Bool) -> t a -> Bool Source #

Determines whether any element of the structure satisfies the predicate.

Examples

Expand

Basic usage:

>>> any (> 3) []
False
>>> any (> 3) [1,2]
False
>>> any (> 3) [1,2,3,4,5]
True
>>> any (> 3) [1..]
True
>>> any (> 3) [0, -1..]
* Hangs forever *

all :: Foldable t => (a -> Bool) -> t a -> Bool Source #

Determines whether all elements of the structure satisfy the predicate.

Examples

Expand

Basic usage:

>>> all (> 3) []
True
>>> all (> 3) [1,2]
False
>>> all (> 3) [1,2,3,4,5]
False
>>> all (> 3) [1..]
False
>>> all (> 3) [4..]
* Hangs forever *

elem :: (Foldable f, DisallowElem f, Eq a) => a -> f a -> Bool #

notElem :: (Foldable f, DisallowElem f, Eq a) => a -> f a -> Bool #

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] Source #

Map a function over all the elements of a container and concatenate the resulting lists.

Examples

Expand

Basic usage:

>>> concatMap (take 3) [[1..], [10..], [100..], [1000..]]
[1,2,3,10,11,12,100,101,102,1000,1001,1002]
>>> concatMap (take 3) (Just [1..])
[1,2,3]

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.

unzip :: [(a, b)] -> ([a], [b]) Source #

unzip transforms a list of pairs into a list of first components and a list of second components.

>>> unzip []
([],[])
>>> unzip [(1, 'a'), (2, 'b')]
([1,2],"ab")

unzip3 :: [(a, b, c)] -> ([a], [b], [c]) Source #

The unzip3 function takes a list of triples and returns three lists, analogous to unzip.

>>> unzip3 []
([],[],[])
>>> unzip3 [(1, 'a', True), (2, 'b', False)]
([1,2],"ab",[True,False])

boundedEnumFrom :: (Enum a, Bounded a) => a -> [a] Source #

boundedEnumFromThen :: (Enum a, Bounded a) => a -> a -> [a] Source #

numerator :: Ratio a -> a Source #

Extract the numerator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.

denominator :: Ratio a -> a Source #

Extract the denominator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.

odd :: Integral a => a -> Bool Source #

(^^) :: (Fractional a, Integral b) => a -> b -> a infixr 8 Source #

raise a number to an integral power

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.

lcm :: Integral a => a -> a -> a Source #

lcm x y is the smallest positive integer that both x and y divide.

xor :: Bits a => a -> a -> a infixl 6 Source #

Bitwise "xor"

toIntegralSized :: (Integral a, Integral b, Bits a, Bits b) => a -> Maybe b Source #

Attempt to convert an Integral type a to an Integral type b using the size of the types as measured by Bits methods.

A simpler version of this function is:

toIntegral :: (Integral a, Integral b) => a -> Maybe b
toIntegral x
  | toInteger x == toInteger y = Just y
  | otherwise                  = Nothing
  where
    y = fromIntegral x

This version requires going through Integer, which can be inefficient. However, toIntegralSized is optimized to allow GHC to statically determine the relative type sizes (as measured by bitSizeMaybe and isSigned) and avoid going through Integer for many types. (The implementation uses fromIntegral, which is itself optimized with rules for base types but may go through Integer for some type pairs.)

Since: base-4.8.0.0

byteSwap16 :: Word16 -> Word16 Source #

Reverse order of bytes in Word16.

Since: base-4.7.0.0

byteSwap32 :: Word32 -> Word32 Source #

Reverse order of bytes in Word32.

Since: base-4.7.0.0

byteSwap64 :: Word64 -> Word64 Source #

Reverse order of bytes in Word64.

Since: base-4.7.0.0

snd :: (a, b) -> b Source #

Extract the second component of a pair.

curry :: ((a, b) -> c) -> a -> b -> c Source #

curry converts an uncurried function to a curried function.

Examples

Expand
>>> curry fst 1 2
1

swap :: (a, b) -> (b, a) Source #

Swap the components of a pair.

(<&>) :: Functor f => f a -> (a -> b) -> f b infixl 1 Source #

Flipped version of <$>.

(<&>) = flip fmap

Examples

Expand

Apply (+1) to a list, a Just and a Right:

>>> Just 2 <&> (+1)
Just 3
>>> [1,2,3] <&> (+1)
[2,3,4]
>>> Right 3 <&> (+1)
Right 4

Since: base-4.11.0.0

($>) :: Functor f => f a -> b -> f b infixl 4 Source #

Flipped version of <$.

Examples

Expand

Replace the contents of a Maybe Int with a constant String:

>>> Nothing $> "foo"
Nothing
>>> Just 90210 $> "foo"
Just "foo"

Replace the contents of an Either Int Int with a constant String, resulting in an Either Int String:

>>> Left 8675309 $> "foo"
Left 8675309
>>> Right 8675309 $> "foo"
Right "foo"

Replace each element of a list with a constant String:

>>> [1,2,3] $> "foo"
["foo","foo","foo"]

Replace the second element of a pair with a constant String:

>>> (1,2) $> "foo"
(1,"foo")

Since: base-4.7.0.0

void :: Functor f => f a -> f () Source #

void value discards or ignores the result of evaluation, such as the return value of an IO action.

Examples

Expand

Replace the contents of a Maybe Int with unit:

>>> void Nothing
Nothing
>>> void (Just 3)
Just ()

Replace the contents of an Either Int Int with unit, resulting in an Either Int ():

>>> void (Left 8675309)
Left 8675309
>>> void (Right 8675309)
Right ()

Replace every element of a list with unit:

>>> void [1,2,3]
[(),(),()]

Replace the second element of a pair with unit:

>>> void (1,2)
(1,())

Discard the result of an IO action:

>>> mapM print [1,2]
1
2
[(),()]
>>> void $ mapM print [1,2]
1
2

fix :: (a -> a) -> a Source #

fix f is the least fixed point of the function f, i.e. the least defined x such that f x = x.

For example, we can write the factorial function using direct recursion as

>>> let fac n = if n <= 1 then 1 else n * fac (n-1) in fac 5
120

This uses the fact that Haskell’s let introduces recursive bindings. We can rewrite this definition using fix,

>>> fix (\rec n -> if n <= 1 then 1 else n * rec (n-1)) 5
120

Instead of making a recursive call, we introduce a dummy parameter rec; when used within fix, this parameter then refers to fix’s argument, hence the recursion is reintroduced.

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c infixl 0 Source #

on b u x y runs the binary function b on the results of applying unary function u to two arguments x and y. From the opposite perspective, it transforms two inputs and combines the outputs.

((+) `on` f) x y = f x + f y

Typical usage: sortBy (compare `on` fst).

Algebraic properties:

  • (*) `on` id = (*) -- (if (*) ∉ {⊥, const ⊥})
  • ((*) `on` f) `on` g = (*) `on` (f . g)
  • flip on f . flip on g = flip on (g . f)

(&) :: a -> (a -> b) -> b infixl 1 Source #

& is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator $, which allows & to be nested in $.

>>> 5 & (+1) & show
"6"

Since: base-4.8.0.0

optional :: Alternative f => f a -> f (Maybe a) Source #

One or none.

It is useful for modelling any computation that is allowed to fail.

Examples

Expand

Using the Alternative instance of Control.Monad.Except, the following functions:

>>> import Control.Monad.Except
>>> canFail = throwError "it failed" :: Except String Int
>>> final = return 42                :: Except String Int

Can be combined by allowing the first function to fail:

>>> runExcept $ canFail *> final
Left "it failed"
>>> runExcept $ optional canFail *> final
Right 42

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

lefts :: [Either a b] -> [a] Source #

Extracts from a list of Either all the Left elements. All the Left elements are extracted in order.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> lefts list
["foo","bar","baz"]

rights :: [Either a b] -> [b] Source #

Extracts from a list of Either all the Right elements. All the Right elements are extracted in order.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> rights list
[3,7]

partitionEithers :: [Either a b] -> ([a], [b]) Source #

Partitions a list of Either into two lists. All the Left elements are extracted, in order, to the first component of the output. Similarly the Right elements are extracted to the second component of the output.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> partitionEithers list
(["foo","bar","baz"],[3,7])

The pair returned by partitionEithers x should be the same pair as (lefts x, rights x):

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> partitionEithers list == (lefts list, rights list)
True

isLeft :: Either a b -> Bool Source #

Return True if the given value is a Left-value, False otherwise.

Examples

Expand

Basic usage:

>>> isLeft (Left "foo")
True
>>> isLeft (Right 3)
False

Assuming a Left value signifies some sort of error, we can use isLeft to write a very simple error-reporting function that does absolutely nothing in the case of success, and outputs "ERROR" if any error occurred.

This example shows how isLeft might be used to avoid pattern matching when one does not care about the value contained in the constructor:

>>> import Control.Monad ( when )
>>> let report e = when (isLeft e) $ putStrLn "ERROR"
>>> report (Right 1)
>>> report (Left "parse error")
ERROR

Since: base-4.7.0.0

isRight :: Either a b -> Bool Source #

Return True if the given value is a Right-value, False otherwise.

Examples

Expand

Basic usage:

>>> isRight (Left "foo")
False
>>> isRight (Right 3)
True

Assuming a Left value signifies some sort of error, we can use isRight to write a very simple reporting function that only outputs "SUCCESS" when a computation has succeeded.

This example shows how isRight might be used to avoid pattern matching when one does not care about the value contained in the constructor:

>>> import Control.Monad ( when )
>>> let report e = when (isRight e) $ putStrLn "SUCCESS"
>>> report (Left "parse error")
>>> report (Right 1)
SUCCESS

Since: base-4.7.0.0

fromLeft :: a -> Either a b -> a Source #

Return the contents of a Left-value or a default value otherwise.

Examples

Expand

Basic usage:

>>> fromLeft 1 (Left 3)
3
>>> fromLeft 1 (Right "foo")
1

Since: base-4.10.0.0

fromRight :: b -> Either a b -> b Source #

Return the contents of a Right-value or a default value otherwise.

Examples

Expand

Basic usage:

>>> fromRight 1 (Right 3)
3
>>> fromRight 1 (Left "foo")
1

Since: base-4.10.0.0

reads :: Read a => ReadS a Source #

equivalent to readsPrec with a precedence of 0.

comparing :: Ord a => (b -> a) -> b -> b -> Ordering Source #

comparing p x y = compare (p x) (p y)

Useful combinator for use in conjunction with the xxxBy family of functions from Data.List, for example:

  ... sortBy (comparing fst) ...

(<<<) :: forall {k} cat (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c infixr 1 Source #

Right-to-left composition

natVal :: forall (n :: Nat) proxy. KnownNat n => proxy n -> Natural Source #

Since: base-4.10.0.0

someNatVal :: Natural -> SomeNat Source #

Convert an integer into an unknown type-level natural.

Since: base-4.10.0.0

stimesMonoid :: (Integral b, Monoid a) => b -> a -> a Source #

This is a valid definition of stimes for a Monoid.

Unlike the default definition of stimes, it is defined for 0 and so it should be preferred where possible.

foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b Source #

Left-to-right monadic fold over the elements of a structure.

Given a structure t with elements (a, b, ..., w, x, y), the result of a fold with an operator function f is equivalent to:

foldlM f z t = do
    aa <- f z a
    bb <- f aa b
    ...
    xx <- f ww x
    yy <- f xx y
    return yy -- Just @return z@ when the structure is empty

For a Monad m, given two functions f1 :: a -> m b and f2 :: b -> m c, their Kleisli composition (f1 >=> f2) :: a -> m c is defined by:

(f1 >=> f2) a = f1 a >>= f2

Another way of thinking about foldlM is that it amounts to an application to z of a Kleisli composition:

foldlM f z t =
    flip f a >=> flip f b >=> ... >=> flip f x >=> flip f y $ z

The monadic effects of foldlM are sequenced from left to right.

If at some step the bind operator (>>=) short-circuits (as with, e.g., mzero in a MonadPlus), the evaluated effects will be from an initial segment of the element sequence. If you want to evaluate the monadic effects in right-to-left order, or perhaps be able to short-circuit after processing a tail of the sequence of elements, you'll need to use foldrM instead.

If the monadic effects don't short-circuit, the outermost application of f is to the rightmost element y, so that, ignoring effects, the result looks like a left fold:

((((z `f` a) `f` b) ... `f` w) `f` x) `f` y

Examples

Expand

Basic usage:

>>> let f a e = do { print e ; return $ e : a }
>>> foldlM f [] [0..3]
0
1
2
3
[3,2,1,0]

traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () Source #

Map each element of a structure to an Applicative action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see traverse.

traverse_ is just like mapM_, but generalised to Applicative actions.

Examples

Expand

Basic usage:

>>> traverse_ print ["Hello", "world", "!"]
"Hello"
"world"
"!"

for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f () Source #

for_ is traverse_ with its arguments flipped. For a version that doesn't ignore the results see for. This is forM_ generalised to Applicative actions.

for_ is just like forM_, but generalised to Applicative actions.

Examples

Expand

Basic usage:

>>> for_ [1..4] print
1
2
3
4

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.

mapM_ is just like traverse_, but specialised to monadic actions.

forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m () Source #

forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM.

forM_ is just like for_, but specialised to monadic actions.

sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f () Source #

Evaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequenceA.

sequenceA_ is just like sequence_, but generalised to Applicative actions.

Examples

Expand

Basic usage:

>>> sequenceA_ [print "Hello", print "world", print "!"]
"Hello"
"world"
"!"

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.

sequence_ is just like sequenceA_, but specialised to monadic actions.

asum :: (Foldable t, Alternative f) => t (f a) -> f a Source #

The sum of a collection of actions using (<|>), generalizing concat.

asum is just like msum, but generalised to Alternative.

Examples

Expand

Basic usage:

>>> asum [Just "Hello", Nothing, Just "World"]
Just "Hello"

find :: Foldable t => (a -> Bool) -> t a -> Maybe a Source #

The find function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Nothing if there is no such element.

Examples

Expand

Basic usage:

>>> find (> 42) [0, 5..]
Just 45
>>> find (> 12) [1..7]
Nothing

isPrefixOf :: Eq a => [a] -> [a] -> Bool Source #

\(\mathcal{O}(\min(m,n))\). The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.

>>> "Hello" `isPrefixOf` "Hello World!"
True
>>> "Hello" `isPrefixOf` "Wello Horld!"
False

For the result to be True, the first list must be finite; False, however, results from any mismatch:

>>> [0..] `isPrefixOf` [1..]
False
>>> [0..] `isPrefixOf` [0..99]
False
>>> [0..99] `isPrefixOf` [0..]
True
>>> [0..] `isPrefixOf` [0..]
* Hangs forever *

intersperse :: a -> [a] -> [a] Source #

\(\mathcal{O}(n)\). The intersperse function takes an element and a list and `intersperses' that element between the elements of the list. For example,

>>> intersperse ',' "abcde"
"a,b,c,d,e"

intercalate :: [a] -> [[a]] -> [a] Source #

intercalate xs xss is equivalent to (concat (intersperse xs xss)). It inserts the list xs in between the lists in xss and concatenates the result.

>>> intercalate ", " ["Lorem", "ipsum", "dolor"]
"Lorem, ipsum, dolor"

mapAccumL :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b) Source #

The mapAccumL function behaves like a combination of fmap and foldl; it applies a function to each element of a structure, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new structure.

Examples

Expand

Basic usage:

>>> mapAccumL (\a b -> (a + b, a)) 0 [1..10]
(55,[0,1,3,6,10,15,21,28,36,45])
>>> mapAccumL (\a b -> (a <> show b, a)) "0" [1..5]
("012345",["0","01","012","0123","01234"])

mapAccumR :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b) Source #

The mapAccumR function behaves like a combination of fmap and foldr; it applies a function to each element of a structure, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new structure.

Examples

Expand

Basic usage:

>>> mapAccumR (\a b -> (a + b, a)) 0 [1..10]
(55,[54,52,49,45,40,34,27,19,10,0])
>>> mapAccumR (\a b -> (a <> show b, a)) "0" [1..5]
("054321",["05432","0543","054","05","0"])

inits :: [a] -> [[a]] Source #

The inits function returns all initial segments of the argument, shortest first. For example,

>>> inits "abc"
["","a","ab","abc"]

Note that inits has the following strictness property: inits (xs ++ _|_) = inits xs ++ _|_

In particular, inits _|_ = [] : _|_

inits is semantically equivalent to map reverse . scanl (flip (:)) [], but under the hood uses a queue to amortize costs of reverse.

tails :: [a] -> [[a]] Source #

\(\mathcal{O}(n)\). The tails function returns all final segments of the argument, longest first. For example,

>>> tails "abc"
["abc","bc","c",""]

Note that tails has the following strictness property: tails _|_ = _|_ : _|_

subsequences :: [a] -> [[a]] Source #

The subsequences function returns the list of all subsequences of the argument.

>>> subsequences "abc"
["","a","b","ab","c","ac","bc","abc"]

This function is productive on infinite inputs:

>>> take 8 $ subsequences ['a'..]
["","a","b","ab","c","ac","bc","abc"]

permutations :: [a] -> [[a]] Source #

The permutations function returns the list of all permutations of the argument.

>>> permutations "abc"
["abc","bac","cba","bca","cab","acb"]

The permutations function is maximally lazy: for each n, the value of permutations xs starts with those permutations that permute take n xs and keep drop n xs.

This function is productive on infinite inputs:

>>> take 6 $ map (take 3) $ permutations ['a'..]
["abc","bac","cba","bca","cab","acb"]

Note that the order of permutations is not lexicographic. It satisfies the following property:

map (take n) (take (product [1..n]) (permutations ([1..n] ++ undefined))) == permutations [1..n]

sort :: Ord a => [a] -> [a] Source #

The sort function implements a stable sorting algorithm. It is a special case of sortBy, which allows the programmer to supply their own comparison function.

Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.

>>> sort [1,6,4,3,2,5]
[1,2,3,4,5,6]

The argument must be finite.

lines :: IsText t "lines" => t -> [t] #

unlines :: IsText t "unlines" => [t] -> t #

words :: IsText t "words" => t -> [t] #

unwords :: IsText t "unwords" => [t] -> t #

prettySrcLoc :: SrcLoc -> String Source #

Pretty print a SrcLoc.

Since: base-4.9.0.0

prettyCallStack :: CallStack -> String Source #

Pretty print a CallStack.

Since: base-4.9.0.0

newIORef :: MonadIO m => a -> m (IORef a) #

readIORef :: MonadIO m => IORef a -> m a #

writeIORef :: MonadIO m => IORef a -> a -> m () #

atomicModifyIORef'_ :: MonadIO m => IORef a -> (a -> a) -> m () #

atomicModifyIORef' :: MonadIO m => IORef a -> (a -> (a, b)) -> m b #

modifyIORef :: MonadIO m => IORef a -> (a -> a) -> m () #

modifyIORef' :: MonadIO m => IORef a -> (a -> a) -> m () #

hIsEOF :: MonadIO m => Handle -> m Bool #

putStr :: MonadIO m => String -> m () #

appendFile :: MonadIO m => FilePath -> String -> m () #

(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c') infixr 3 Source #

Fanout: send the input to both argument arrows and combine their output.

The default definition may be overridden with a more efficient version if desired.

filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a] Source #

This generalizes the list-based filter function.

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 Source #

Left-to-right composition of Kleisli arrows.

'(bs >=> cs) a' can be understood as the do expression

do b <- bs a
   cs b

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 Source #

Right-to-left composition of Kleisli arrows. (>=>), with the arguments flipped.

Note how this operator resembles function composition (.):

(.)   ::            (b ->   c) -> (a ->   b) -> a ->   c
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c

mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) Source #

The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state monad.

zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] Source #

The zipWithM function generalizes zipWith to arbitrary applicative functors.

zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () Source #

zipWithM_ is the extension of zipWithM which ignores the final result.

replicateM :: Applicative m => Int -> m a -> m [a] Source #

replicateM n act performs the action act n times, and then returns the list of results:

Examples

Expand
>>> import Control.Monad.State
>>> runState (replicateM 3 $ state $ \s -> (s, s + 1)) 1
([1,2,3],4)

replicateM_ :: Applicative m => Int -> m a -> m () Source #

Like replicateM, but discards the result.

Examples

Expand
>>> replicateM_ 3 (putStrLn "a")
a
a
a

unless :: Applicative f => Bool -> f () -> f () Source #

The reverse of when.

(<$!>) :: Monad m => (a -> b) -> m a -> m b infixl 4 Source #

Strict version of <$>.

Since: base-4.8.0.0

mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a Source #

Direct MonadPlus equivalent of filter.

Examples

Expand

The filter function is just mfilter specialized to the list monad:

filter = ( mfilter :: (a -> Bool) -> [a] -> [a] )

An example using mfilter with the Maybe monad:

>>> mfilter odd (Just 1)
Just 1
>>> mfilter odd (Just 2)
Nothing

exitFailure :: MonadIO m => m a #

exitSuccess :: MonadIO m => m a #

die :: MonadIO m => String -> m a #

withFrozenCallStack :: HasCallStack => (HasCallStack => a) -> a Source #

Perform some computation without adding new entries to the CallStack.

Since: base-4.9.0.0

traceShowM :: (Show a, Applicative f) => a -> f () #

traceShowId :: Show a => a -> a #

traceShow :: Show a => a -> b -> b #

traceShowWith :: Show b => (a -> b) -> a -> a #

getStackTrace :: IO (Maybe [Location]) Source #

Get a trace of the current execution stack state.

Returns Nothing if stack trace support isn't available on host machine.

showStackTrace :: IO (Maybe String) Source #

Get a string representation of the current execution stack state.

nonEmpty :: [a] -> Maybe (NonEmpty a) Source #

nonEmpty efficiently turns a normal list into a NonEmpty stream, producing Nothing if the input is empty.

sortWith :: Ord b => (a -> b) -> [a] -> [a] Source #

The sortWith function sorts a list of elements using the user supplied function to project something out of each element

In general if the user supplied function is expensive to compute then you should probably be using sortOn, as it only needs to compute it once for each element. sortWith, on the other hand must compute the mapping function for every comparison that it performs.

bifoldr' :: Bifoldable t => (a -> c -> c) -> (b -> c -> c) -> c -> t a b -> c Source #

As bifoldr, but strict in the result of the reduction functions at each step.

Since: base-4.10.0.0

bifoldrM :: (Bifoldable t, Monad m) => (a -> c -> m c) -> (b -> c -> m c) -> c -> t a b -> m c Source #

Right associative monadic bifold over a structure.

Since: base-4.10.0.0

bifoldl' :: Bifoldable t => (a -> b -> a) -> (a -> c -> a) -> a -> t b c -> a Source #

As bifoldl, but strict in the result of the reduction functions at each step.

This ensures that each step of the bifold is forced to weak head normal form before being applied, avoiding the collection of thunks that would otherwise occur. This is often what you want to strictly reduce a finite structure to a single, monolithic result (e.g., bilength).

Since: base-4.10.0.0

bifoldlM :: (Bifoldable t, Monad m) => (a -> b -> m a) -> (a -> c -> m a) -> a -> t b c -> m a Source #

Left associative monadic bifold over a structure.

Examples

Expand

Basic usage:

>>> bifoldlM (\a b -> print b >> pure a) (\a c -> print (show c) >> pure a) 42 ("Hello", True)
"Hello"
"True"
42
>>> bifoldlM (\a b -> print b >> pure a) (\a c -> print (show c) >> pure a) 42 (Right True)
"True"
42
>>> bifoldlM (\a b -> print b >> pure a) (\a c -> print (show c) >> pure a) 42 (Left "Hello")
"Hello"
42

Since: base-4.10.0.0

bitraverse_ :: (Bifoldable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f () Source #

Map each element of a structure using one of two actions, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results, see bitraverse.

Examples

Expand

Basic usage:

>>> bitraverse_ print (print . show) ("Hello", True)
"Hello"
"True"
>>> bitraverse_ print (print . show) (Right True)
"True"
>>> bitraverse_ print (print . show) (Left "Hello")
"Hello"

Since: base-4.10.0.0

bifor_ :: (Bifoldable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f () Source #

As bitraverse_, but with the structure as the primary argument. For a version that doesn't ignore the results, see bifor.

Examples

Expand

Basic usage:

>>> bifor_ ("Hello", True) print (print . show)
"Hello"
"True"
>>> bifor_ (Right True) print (print . show)
"True"
>>> bifor_ (Left "Hello") print (print . show)
"Hello"

Since: base-4.10.0.0

bisequence_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f () Source #

Evaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results, see bisequence.

Examples

Expand

Basic usage:

>>> bisequence_ (print "Hello", print "World")
"Hello"
"World"
>>> bisequence_ (Left (print "Hello"))
"Hello"
>>> bisequence_ (Right (print "World"))
"World"

Since: base-4.10.0.0

biasum :: (Bifoldable t, Alternative f) => t (f a) (f a) -> f a Source #

The sum of a collection of actions, generalizing biconcat.

Examples

Expand

Basic usage:

>>> biasum (Nothing, Nothing)
Nothing
>>> biasum (Nothing, Just 42)
Just 42
>>> biasum (Just 18, Nothing)
Just 18
>>> biasum (Just 18, Just 42)
Just 18

Since: base-4.10.0.0

biList :: Bifoldable t => t a a -> [a] Source #

Collects the list of elements of a structure, from left to right.

Examples

Expand

Basic usage:

>>> biList (18, 42)
[18,42]
>>> biList (Left 18)
[18]

Since: base-4.10.0.0

binull :: Bifoldable t => t a b -> Bool Source #

Test whether the structure is empty.

Examples

Expand

Basic usage:

>>> binull (18, 42)
False
>>> binull (Right 42)
False
>>> binull (BiList [] [])
True

Since: base-4.10.0.0

bilength :: Bifoldable t => t a b -> Int Source #

Returns the size/length of a finite structure as an Int.

Examples

Expand

Basic usage:

>>> bilength (True, 42)
2
>>> bilength (Right 42)
1
>>> bilength (BiList [1,2,3] [4,5])
5
>>> bilength (BiList [] [])
0

On infinite structures, this function hangs:

> bilength (BiList [1..] [])
* Hangs forever *

Since: base-4.10.0.0

bielem :: (Bifoldable t, Eq a) => a -> t a a -> Bool Source #

Does the element occur in the structure?

Examples

Expand

Basic usage:

>>> bielem 42 (17, 42)
True
>>> bielem 42 (17, 43)
False
>>> bielem 42 (Left 42)
True
>>> bielem 42 (Right 13)
False
>>> bielem 42 (BiList [1..5] [1..100])
True
>>> bielem 42 (BiList [1..5] [1..41])
False

Since: base-4.10.0.0

biand :: Bifoldable t => t Bool Bool -> Bool Source #

biand returns the conjunction of a container of Bools. For the result to be True, the container must be finite; False, however, results from a False value finitely far from the left end.

Examples

Expand

Basic usage:

>>> biand (True, False)
False
>>> biand (True, True)
True
>>> biand (Left True)
True

Empty structures yield True:

>>> biand (BiList [] [])
True

A False value finitely far from the left end yields False (short circuit):

>>> biand (BiList [True, True, False, True] (repeat True))
False

A False value infinitely far from the left end hangs:

> biand (BiList (repeat True) [False])
* Hangs forever *

An infinitely True value hangs:

> biand (BiList (repeat True) [])
* Hangs forever *

Since: base-4.10.0.0

bior :: Bifoldable t => t Bool Bool -> Bool Source #

bior returns the disjunction of a container of Bools. For the result to be False, the container must be finite; True, however, results from a True value finitely far from the left end.

Examples

Expand

Basic usage:

>>> bior (True, False)
True
>>> bior (False, False)
False
>>> bior (Left True)
True

Empty structures yield False:

>>> bior (BiList [] [])
False

A True value finitely far from the left end yields True (short circuit):

>>> bior (BiList [False, False, True, False] (repeat False))
True

A True value infinitely far from the left end hangs:

> bior (BiList (repeat False) [True])
* Hangs forever *

An infinitely False value hangs:

> bior (BiList (repeat False) [])
* Hangs forever *

Since: base-4.10.0.0

biany :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool Source #

Determines whether any element of the structure satisfies its appropriate predicate argument. Empty structures yield False.

Examples

Expand

Basic usage:

>>> biany even isDigit (27, 't')
False
>>> biany even isDigit (27, '8')
True
>>> biany even isDigit (26, 't')
True
>>> biany even isDigit (Left 27)
False
>>> biany even isDigit (Left 26)
True
>>> biany even isDigit (BiList [27, 53] ['t', '8'])
True

Empty structures yield False:

>>> biany even isDigit (BiList [] [])
False

Since: base-4.10.0.0

biall :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool Source #

Determines whether all elements of the structure satisfy their appropriate predicate argument. Empty structures yield True.

Examples

Expand

Basic usage:

>>> biall even isDigit (27, 't')
False
>>> biall even isDigit (26, '8')
True
>>> biall even isDigit (Left 27)
False
>>> biall even isDigit (Left 26)
True
>>> biall even isDigit (BiList [26, 52] ['3', '8'])
True

Empty structures yield True:

>>> biall even isDigit (BiList [] [])
True

Since: base-4.10.0.0

bifind :: Bifoldable t => (a -> Bool) -> t a a -> Maybe a Source #

The bifind function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Nothing if there is no such element.

Examples

Expand

Basic usage:

>>> bifind even (27, 53)
Nothing
>>> bifind even (27, 52)
Just 52
>>> bifind even (26, 52)
Just 26

Empty structures always yield Nothing:

>>> bifind even (BiList [] [])
Nothing

Since: base-4.10.0.0

bimapDefault :: Bitraversable t => (a -> b) -> (c -> d) -> t a c -> t b d Source #

A default definition of bimap in terms of the Bitraversable operations.

bimapDefault f g ≡
     runIdentity . bitraverse (Identity . f) (Identity . g)

Since: base-4.10.0.0

bifoldMapDefault :: (Bitraversable t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> m Source #

A default definition of bifoldMap in terms of the Bitraversable operations.

bifoldMapDefault f g ≡
    getConst . bitraverse (Const . f) (Const . g)

Since: base-4.10.0.0

cycle1 :: Semigroup m => m -> m Source #

A generalization of cycle to an arbitrary Semigroup. May fail to terminate for some values in some semigroups.

mtimesDefault :: (Integral b, Monoid a) => b -> a -> a Source #

Repeat a value n times.

mtimesDefault n a = a <> a <> ... <> a  -- using <> (n-1) times

In many cases, `stimes 0 a` for a Monoid will produce mempty. However, there are situations when it cannot do so. In particular, the following situation is fairly common:

data T a = ...

class Constraint1 a
class Constraint1 a => Constraint2 a

instance Constraint1 a => Semigroup (T a) instance Constraint2 a => Monoid (T a) @

Since Constraint1 is insufficient to implement mempty, stimes for T a cannot do so.

When working with such a type, or when working polymorphically with Semigroup instances, mtimesDefault should be used when the multiplier might be zero. It is implemented using stimes when the multiplier is nonzero and mempty when it is zero.

phantom :: (Functor f, Contravariant f) => f a -> f b Source #

If f is both Functor and Contravariant then by the time you factor in the laws of each of those classes, it can't actually use its argument in any meaningful capacity.

This method is surprisingly useful. Where both instances exist and are lawful we have the following laws:

fmap      f ≡ phantom
contramap f ≡ phantom

($<) :: Contravariant f => f b -> b -> f a infixl 4 Source #

This is >$ with its arguments flipped.

(>$<) :: Contravariant f => (a -> b) -> f b -> f a infixl 4 Source #

This is an infix alias for contramap.

(>$$<) :: Contravariant f => f b -> (a -> b) -> f a infixl 4 Source #

This is an infix version of contramap with the arguments flipped.

defaultEquivalence :: Eq a => Equivalence a Source #

Check for equivalence with ==.

Note: The instances for Double and Float violate reflexivity for NaN.

fromStrict :: LazyStrict l s => s -> l #

toShort :: ByteString -> ShortByteString Source #

O(n). Convert a ByteString into a ShortByteString.

This makes a copy, so does not retain the input string.

runState Source #

Arguments

:: State s a

state-passing computation to execute

-> s

initial state

-> (a, s)

return value and final state

Unwrap a state monad computation as a function. (The inverse of state.)

execState Source #

Arguments

:: State s a

state-passing computation to execute

-> s

initial value

-> s

final state

Evaluate a state computation with the given initial state and return the final state, discarding the final value.

($!!) :: NFData a => (a -> b) -> a -> b infixr 0 Source #

the deep analogue of $!. In the expression f $!! x, x is fully evaluated before the function f is applied to it.

Since: deepseq-1.2.0.0

force :: NFData a => a -> a Source #

a variant of deepseq that is useful in some circumstances:

force x = x `deepseq` x

force x fully evaluates x, and then returns it. Note that force x only performs evaluation when the value of force x itself is demanded, so essentially it turns shallow evaluation into deep evaluation.

force can be conveniently used in combination with ViewPatterns:

{-# LANGUAGE BangPatterns, ViewPatterns #-}
import Control.DeepSeq

someFun :: ComplexData -> SomeResult
someFun (force -> !arg) = {- 'arg' will be fully evaluated -}

Another useful application is to combine force with evaluate in order to force deep evaluation relative to other IO operations:

import Control.Exception (evaluate)
import Control.DeepSeq

main = do
  result <- evaluate $ force $ pureComputation
  {- 'result' will be fully evaluated at this point -}
  return ()

Finally, here's an exception safe variant of the readFile' example:

readFile' :: FilePath -> IO String
readFile' fn = bracket (openFile fn ReadMode) hClose $ \h ->
                       evaluate . force =<< hGetContents h

Since: deepseq-1.2.0.0

andM :: (Foldable f, Monad m) => f (m Bool) -> m Bool #

runExceptT :: ExceptT e m a -> m (Either e a) Source #

The inverse of ExceptT.

runReader Source #

Arguments

:: Reader r a

A Reader to run.

-> r

An initial environment.

-> a 

Runs a Reader and extracts the final value from it. (The inverse of reader.)

withReader Source #

Arguments

:: (r' -> r)

The function to modify the environment.

-> Reader r a

Computation to run in the modified environment.

-> Reader r' a 

Execute a computation in a modified environment (a specialization of withReaderT).

withReaderT Source #

Arguments

:: forall r' r (m :: Type -> Type) a. (r' -> r)

The function to modify the environment.

-> ReaderT r m a

Computation to run in the modified environment.

-> ReaderT r' m a 

Execute a computation in a modified environment (a more general version of local).

evalState Source #

Arguments

:: State s a

state-passing computation to execute

-> s

initial value

-> a

return value of the state computation

Evaluate a state computation with the given initial state and return the final value, discarding the final state.

withState :: (s -> s) -> State s a -> State s a Source #

withState f m executes action m on a state modified by applying f.

evalStateT :: Monad m => StateT s m a -> s -> m a Source #

Evaluate a state computation with the given initial state and return the final value, discarding the final state.

execStateT :: Monad m => StateT s m a -> s -> m s Source #

Evaluate a state computation with the given initial state and return the final state, discarding the final value.

asks Source #

Arguments

:: MonadReader r m 
=> (r -> a)

The selector function to apply to the environment.

-> m a 

Retrieves a function of the current environment.

modify :: MonadState s m => (s -> s) -> m () Source #

Monadic state transformer.

Maps an old state to a new state inside a state monad. The old state is thrown away.

     Main> :t modify ((+1) :: Int -> Int)
     modify (...) :: (MonadState Int a) => a ()

This says that modify (+1) acts over any Monad that is a member of the MonadState class, with an Int state.

modify' :: MonadState s m => (s -> s) -> m () Source #

A variant of modify in which the computation is strict in the new state.

Since: mtl-2.2

gets :: MonadState s m => (s -> a) -> m a Source #

Gets specific component of the state, using a projection function supplied.

pass :: Applicative f => f () #

decodeUtf8With :: OnDecodeError -> ByteString -> Text Source #

Decode a ByteString containing UTF-8 encoded text.

Surrogate code points in replacement character returned by OnDecodeError will be automatically remapped to the replacement char U+FFFD.

strictDecode :: OnDecodeError Source #

Throw a UnicodeException if decoding fails.

lenientDecode :: OnDecodeError Source #

Replace an invalid input byte with the Unicode replacement character U+FFFD.

decodeUtf8' :: ByteString -> Either UnicodeException Text Source #

Decode a ByteString containing UTF-8 encoded text.

If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.

hoistMaybe :: forall (m :: Type -> Type) a. Applicative m => Maybe a -> MaybeT m a #

maybeToExceptT :: forall (m :: Type -> Type) e a. Functor m => e -> MaybeT m a -> ExceptT e m a Source #

Convert a MaybeT computation to ExceptT, with a default exception value.

exceptToMaybeT :: forall (m :: Type -> Type) e a. Functor m => ExceptT e m a -> MaybeT m a Source #

Convert a ExceptT computation to MaybeT, discarding the value of any exception.

appliedTo :: Applicative f => f a -> f (a -> b) -> f b #

(&&^) :: Monad m => m Bool -> m Bool -> m Bool #

guardM :: MonadPlus m => m Bool -> m () #

guarded :: Alternative f => (a -> Bool) -> a -> f a #

ifM :: Monad m => m Bool -> m a -> m a -> m a #

unlessM :: Monad m => m Bool -> m () -> m () #

whenM :: Monad m => m Bool -> m () -> m () #

(||^) :: Monad m => m Bool -> m Bool -> m Bool #

evaluateNF :: (NFData a, MonadIO m) => a -> m a #

evaluateNF_ :: (NFData a, MonadIO m) => a -> m () #

evaluateWHNF :: MonadIO m => a -> m a #

evaluateWHNF_ :: MonadIO m => a -> m () #

inverseMap :: (Bounded a, Enum a, Ord k) => (a -> k) -> k -> Maybe a #

universe :: (Bounded a, Enum a) => [a] #

bug :: (HasCallStack, Exception e) => e -> a #

appendFileText :: MonadIO m => FilePath -> Text -> m () #

writeFileText :: MonadIO m => FilePath -> Text -> m () #

allM :: (Foldable f, Monad m) => (a -> m Bool) -> f a -> m Bool #

anyM :: (Foldable f, Monad m) => (a -> m Bool) -> f a -> m Bool #

asumMap :: forall b m f a. (Foldable f, Alternative m) => (a -> m b) -> f a -> m b #

flipfoldl' :: Foldable f => (a -> b -> b) -> b -> f a -> b #

foldMapA :: (Semigroup b, Monoid b, Applicative m, Foldable f) => (a -> m b) -> f a -> m b #

foldMapM :: (Monoid b, Monad m, Foldable f) => (a -> m b) -> f a -> m b #

orM :: (Foldable f, Monad m) => f (m Bool) -> m Bool #

identity :: a -> a #

(<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b) #

(??) :: Functor f => f (a -> b) -> a -> f b #

flap :: Functor f => f (a -> b) -> a -> f b #

atomicModifyIORef_ :: MonadIO m => IORef a -> (a -> a) -> m () #

(!!?) :: [a] -> Int -> Maybe a #

maybeAt :: Int -> [a] -> Maybe a #

partitionWith :: (a -> Either b c) -> [a] -> ([b], [c]) #

viaNonEmpty :: (NonEmpty a -> b) -> [a] -> Maybe b #

whenNotNull :: Applicative f => [a] -> (NonEmpty a -> f ()) -> f () #

whenNotNullM :: Monad m => m [a] -> (NonEmpty a -> m ()) -> m () #

chainedTo :: Monad m => (a -> m b) -> m a -> m b #

infinitely :: Applicative f => f a -> f Void #

maybeToLeft :: r -> Maybe l -> Either l r #

maybeToRight :: l -> Maybe r -> Either l r #

whenLeft :: Applicative f => a -> Either l r -> (l -> f a) -> f a #

whenLeftM :: Monad m => a -> m (Either l r) -> (l -> m a) -> m a #

whenLeftM_ :: Monad m => m (Either l r) -> (l -> m ()) -> m () #

whenLeft_ :: Applicative f => Either l r -> (l -> f ()) -> f () #

whenRight :: Applicative f => a -> Either l r -> (r -> f a) -> f a #

whenRightM :: Monad m => a -> m (Either l r) -> (r -> m a) -> m a #

whenRightM_ :: Monad m => m (Either l r) -> (r -> m ()) -> m () #

whenRight_ :: Applicative f => Either l r -> (r -> f ()) -> f () #

(?:) :: Maybe a -> a -> a #

mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b] #

whenJust :: Applicative f => Maybe a -> (a -> f ()) -> f () #

whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m () #

whenNothing :: Applicative f => Maybe a -> f a -> f a #

whenNothingM :: Monad m => m (Maybe a) -> m a -> m a #

whenNothingM_ :: Monad m => m (Maybe a) -> m () -> m () #

whenNothing_ :: Applicative f => Maybe a -> f () -> f () #

etaReaderT :: forall r (m :: Type -> Type) a. ReaderT r m a -> ReaderT r m a #

evaluatingState :: s -> State s a -> a #

evaluatingStateT :: Functor f => s -> StateT s f a -> f a #

executingState :: s -> State s a -> s #

executingStateT :: Functor f => s -> StateT s f a -> f s #

hoistEither :: forall (m :: Type -> Type) e a. Applicative m => Either e a -> ExceptT e m a #

usingReader :: r -> Reader r a -> a #

usingReaderT :: r -> ReaderT r m a -> m a #

usingState :: s -> State s a -> (a, s) #

usingStateT :: s -> StateT s m a -> m (a, s) #

maybeToMonoid :: Monoid m => Maybe m -> m #

memptyIfFalse :: Monoid m => Bool -> m -> m #

memptyIfTrue :: Monoid m => Bool -> m -> m #

hashNub :: Hashable a => [a] -> [a] #

intNub :: [Int] -> [Int] #

intNubOn :: (a -> Int) -> [a] -> [a] #

ordNub :: Ord a => [a] -> [a] #

ordNubOn :: Ord b => (a -> b) -> [a] -> [a] #

sortNub :: Ord a => [a] -> [a] #

unstableNub :: Hashable a => [a] -> [a] #

putBS :: MonadIO m => ByteString -> m () #

putBSLn :: MonadIO m => ByteString -> m () #

putLBS :: MonadIO m => LByteString -> m () #

putLBSLn :: MonadIO m => LByteString -> m () #

putLText :: MonadIO m => LText -> m () #

putLTextLn :: MonadIO m => LText -> m () #

putText :: MonadIO m => Text -> m () #

putTextLn :: MonadIO m => Text -> m () #

fromLazy :: LazyStrict l s => l -> s #

class (Monad m, Monad (STM m)) => MonadSTM (m :: Type -> Type) where #

Minimal complete definition

atomically, newTVar, readTVar, writeTVar, retry, orElse, newTMVar, newEmptyTMVar, takeTMVar, tryTakeTMVar, putTMVar, tryPutTMVar, readTMVar, tryReadTMVar, swapTMVar, isEmptyTMVar, newTQueue, readTQueue, tryReadTQueue, peekTQueue, tryPeekTQueue, flushTQueue, writeTQueue, isEmptyTQueue, unGetTQueue, newTBQueue, readTBQueue, tryReadTBQueue, peekTBQueue, tryPeekTBQueue, flushTBQueue, writeTBQueue, lengthTBQueue, isEmptyTBQueue, isFullTBQueue, unGetTBQueue, newTSem, waitTSem, signalTSem, signalTSemN, newTChan, newBroadcastTChan, dupTChan, cloneTChan, readTChan, tryReadTChan, peekTChan, tryPeekTChan, writeTChan, unGetTChan, isEmptyTChan

Associated Types

type STM (m :: Type -> Type) = (stm :: Type -> Type) | stm -> m #

Methods

atomically :: HasCallStack => STM m a -> m a #

Instances

Instances details
MonadSTM IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Associated Types

type STM IO = (stm :: Type -> Type) #

type TVar IO :: Type -> Type #

type TMVar IO :: Type -> Type #

type TQueue IO :: Type -> Type #

type TBQueue IO :: Type -> Type #

type TArray IO :: Type -> Type -> Type

type TSem IO

type TChan IO :: Type -> Type

Methods

atomically :: HasCallStack => STM IO a -> IO a #

newTVar :: a -> STM IO (TVar IO a)

readTVar :: TVar IO a -> STM IO a #

writeTVar :: TVar IO a -> a -> STM IO ()

retry :: STM IO a

orElse :: STM IO a -> STM IO a -> STM IO a

modifyTVar :: TVar IO a -> (a -> a) -> STM IO ()

modifyTVar' :: TVar IO a -> (a -> a) -> STM IO ()

stateTVar :: TVar IO s -> (s -> (a, s)) -> STM IO a

swapTVar :: TVar IO a -> a -> STM IO a

check :: Bool -> STM IO ()

newTMVar :: a -> STM IO (TMVar IO a)

newEmptyTMVar :: STM IO (TMVar IO a)

takeTMVar :: TMVar IO a -> STM IO a

tryTakeTMVar :: TMVar IO a -> STM IO (Maybe a)

putTMVar :: TMVar IO a -> a -> STM IO ()

tryPutTMVar :: TMVar IO a -> a -> STM IO Bool

readTMVar :: TMVar IO a -> STM IO a

tryReadTMVar :: TMVar IO a -> STM IO (Maybe a)

swapTMVar :: TMVar IO a -> a -> STM IO a

isEmptyTMVar :: TMVar IO a -> STM IO Bool

newTQueue :: STM IO (TQueue IO a)

readTQueue :: TQueue IO a -> STM IO a

tryReadTQueue :: TQueue IO a -> STM IO (Maybe a)

peekTQueue :: TQueue IO a -> STM IO a

tryPeekTQueue :: TQueue IO a -> STM IO (Maybe a)

flushTQueue :: TQueue IO a -> STM IO [a]

writeTQueue :: TQueue IO a -> a -> STM IO ()

isEmptyTQueue :: TQueue IO a -> STM IO Bool

unGetTQueue :: TQueue IO a -> a -> STM IO ()

newTBQueue :: Natural -> STM IO (TBQueue IO a)

readTBQueue :: TBQueue IO a -> STM IO a

tryReadTBQueue :: TBQueue IO a -> STM IO (Maybe a)

peekTBQueue :: TBQueue IO a -> STM IO a

tryPeekTBQueue :: TBQueue IO a -> STM IO (Maybe a)

flushTBQueue :: TBQueue IO a -> STM IO [a]

writeTBQueue :: TBQueue IO a -> a -> STM IO ()

lengthTBQueue :: TBQueue IO a -> STM IO Natural

isEmptyTBQueue :: TBQueue IO a -> STM IO Bool

isFullTBQueue :: TBQueue IO a -> STM IO Bool

unGetTBQueue :: TBQueue IO a -> a -> STM IO ()

newTSem :: Integer -> STM IO (TSem IO)

waitTSem :: TSem IO -> STM IO ()

signalTSem :: TSem IO -> STM IO ()

signalTSemN :: Natural -> TSem IO -> STM IO ()

newTChan :: STM IO (TChan IO a)

newBroadcastTChan :: STM IO (TChan IO a)

dupTChan :: TChan IO a -> STM IO (TChan IO a)

cloneTChan :: TChan IO a -> STM IO (TChan IO a)

readTChan :: TChan IO a -> STM IO a

tryReadTChan :: TChan IO a -> STM IO (Maybe a)

peekTChan :: TChan IO a -> STM IO a

tryPeekTChan :: TChan IO a -> STM IO (Maybe a)

writeTChan :: TChan IO a -> a -> STM IO ()

unGetTChan :: TChan IO a -> a -> STM IO ()

isEmptyTChan :: TChan IO a -> STM IO Bool

newTVarIO :: a -> IO (TVar IO a)

readTVarIO :: TVar IO a -> IO a

newTMVarIO :: a -> IO (TMVar IO a)

newEmptyTMVarIO :: IO (TMVar IO a)

newTQueueIO :: IO (TQueue IO a)

newTBQueueIO :: Natural -> IO (TBQueue IO a)

newTChanIO :: IO (TChan IO a)

newBroadcastTChanIO :: IO (TChan IO a)

MonadSTM m => MonadSTM (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

Associated Types

type STM (ReaderT r m) = (stm :: Type -> Type) #

type TVar (ReaderT r m) :: Type -> Type #

type TMVar (ReaderT r m) :: Type -> Type #

type TQueue (ReaderT r m) :: Type -> Type #

type TBQueue (ReaderT r m) :: Type -> Type #

type TArray (ReaderT r m) :: Type -> Type -> Type

type TSem (ReaderT r m)

type TChan (ReaderT r m) :: Type -> Type

Methods

atomically :: HasCallStack => STM (ReaderT r m) a -> ReaderT r m a #

newTVar :: a -> STM (ReaderT r m) (TVar (ReaderT r m) a)

readTVar :: TVar (ReaderT r m) a -> STM (ReaderT r m) a #

writeTVar :: TVar (ReaderT r m) a -> a -> STM (ReaderT r m) ()

retry :: STM (ReaderT r m) a

orElse :: STM (ReaderT r m) a -> STM (ReaderT r m) a -> STM (ReaderT r m) a

modifyTVar :: TVar (ReaderT r m) a -> (a -> a) -> STM (ReaderT r m) ()

modifyTVar' :: TVar (ReaderT r m) a -> (a -> a) -> STM (ReaderT r m) ()

stateTVar :: TVar (ReaderT r m) s -> (s -> (a, s)) -> STM (ReaderT r m) a

swapTVar :: TVar (ReaderT r m) a -> a -> STM (ReaderT r m) a

check :: Bool -> STM (ReaderT r m) ()

newTMVar :: a -> STM (ReaderT r m) (TMVar (ReaderT r m) a)

newEmptyTMVar :: STM (ReaderT r m) (TMVar (ReaderT r m) a)

takeTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) a

tryTakeTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

putTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) ()

tryPutTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) Bool

readTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) a

tryReadTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

swapTMVar :: TMVar (ReaderT r m) a -> a -> STM (ReaderT r m) a

isEmptyTMVar :: TMVar (ReaderT r m) a -> STM (ReaderT r m) Bool

newTQueue :: STM (ReaderT r m) (TQueue (ReaderT r m) a)

readTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) a

tryReadTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

peekTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) a

tryPeekTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

flushTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) [a]

writeTQueue :: TQueue (ReaderT r m) a -> a -> STM (ReaderT r m) ()

isEmptyTQueue :: TQueue (ReaderT r m) a -> STM (ReaderT r m) Bool

unGetTQueue :: TQueue (ReaderT r m) a -> a -> STM (ReaderT r m) ()

newTBQueue :: Natural -> STM (ReaderT r m) (TBQueue (ReaderT r m) a)

readTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) a

tryReadTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

peekTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) a

tryPeekTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

flushTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) [a]

writeTBQueue :: TBQueue (ReaderT r m) a -> a -> STM (ReaderT r m) ()

lengthTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) Natural

isEmptyTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) Bool

isFullTBQueue :: TBQueue (ReaderT r m) a -> STM (ReaderT r m) Bool

unGetTBQueue :: TBQueue (ReaderT r m) a -> a -> STM (ReaderT r m) ()

newTSem :: Integer -> STM (ReaderT r m) (TSem (ReaderT r m))

waitTSem :: TSem (ReaderT r m) -> STM (ReaderT r m) ()

signalTSem :: TSem (ReaderT r m) -> STM (ReaderT r m) ()

signalTSemN :: Natural -> TSem (ReaderT r m) -> STM (ReaderT r m) ()

newTChan :: STM (ReaderT r m) (TChan (ReaderT r m) a)

newBroadcastTChan :: STM (ReaderT r m) (TChan (ReaderT r m) a)

dupTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (TChan (ReaderT r m) a)

cloneTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (TChan (ReaderT r m) a)

readTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) a

tryReadTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

peekTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) a

tryPeekTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) (Maybe a)

writeTChan :: TChan (ReaderT r m) a -> a -> STM (ReaderT r m) ()

unGetTChan :: TChan (ReaderT r m) a -> a -> STM (ReaderT r m) ()

isEmptyTChan :: TChan (ReaderT r m) a -> STM (ReaderT r m) Bool

newTVarIO :: a -> ReaderT r m (TVar (ReaderT r m) a)

readTVarIO :: TVar (ReaderT r m) a -> ReaderT r m a

newTMVarIO :: a -> ReaderT r m (TMVar (ReaderT r m) a)

newEmptyTMVarIO :: ReaderT r m (TMVar (ReaderT r m) a)

newTQueueIO :: ReaderT r m (TQueue (ReaderT r m) a)

newTBQueueIO :: Natural -> ReaderT r m (TBQueue (ReaderT r m) a)

newTChanIO :: ReaderT r m (TChan (ReaderT r m) a)

newBroadcastTChanIO :: ReaderT r m (TChan (ReaderT r m) a)

type family STM (m :: Type -> Type) = (stm :: Type -> Type) | stm -> m #

Instances

Instances details
type STM IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type STM IO = STM
type STM (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type STM (ReaderT r m) = ReaderT r (STM m)

data DiffTime Source #

This is a length of time, as measured by a clock. Conversion functions such as fromInteger and realToFrac will treat it as seconds. For example, (0.010 :: DiffTime) corresponds to 10 milliseconds.

It has a precision of one picosecond (= 10^-12 s). Enumeration functions will treat it as picoseconds.

Instances

Instances details
FromJSON DiffTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser DiffTime #

parseJSONList :: Value -> Parser [DiffTime] #

omittedField :: Maybe DiffTime #

ToJSON DiffTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: DiffTime -> Value #

toEncoding :: DiffTime -> Encoding #

toJSONList :: [DiffTime] -> Value #

toEncodingList :: [DiffTime] -> Encoding #

omitField :: DiffTime -> Bool #

Data DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DiffTime -> c DiffTime Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DiffTime Source #

toConstr :: DiffTime -> Constr Source #

dataTypeOf :: DiffTime -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DiffTime) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DiffTime) Source #

gmapT :: (forall b. Data b => b -> b) -> DiffTime -> DiffTime Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> DiffTime -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DiffTime -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime Source #

Enum DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Num DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Read DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Fractional DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Real DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

RealFrac DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Show DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

NFData DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

rnf :: DiffTime -> () Source #

Eq DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Ord DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

data NominalDiffTime Source #

This is a length of time, as measured by UTC. It has a precision of 10^-12 s.

Conversion functions such as fromInteger and realToFrac will treat it as seconds. For example, (0.010 :: NominalDiffTime) corresponds to 10 milliseconds.

It has a precision of one picosecond (= 10^-12 s). Enumeration functions will treat it as picoseconds.

It ignores leap-seconds, so it's not necessarily a fixed amount of clock time. For instance, 23:00 UTC + 2 hours of NominalDiffTime = 01:00 UTC (+ 1 day), regardless of whether a leap-second intervened.

Instances

Instances details
FromJSON NominalDiffTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

ToJSON NominalDiffTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Data NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NominalDiffTime -> c NominalDiffTime Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NominalDiffTime Source #

toConstr :: NominalDiffTime -> Constr Source #

dataTypeOf :: NominalDiffTime -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NominalDiffTime) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NominalDiffTime) Source #

gmapT :: (forall b. Data b => b -> b) -> NominalDiffTime -> NominalDiffTime Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NominalDiffTime -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NominalDiffTime -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> NominalDiffTime -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NominalDiffTime -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NominalDiffTime -> m NominalDiffTime Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NominalDiffTime -> m NominalDiffTime Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NominalDiffTime -> m NominalDiffTime Source #

Enum NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Num NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Read NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Fractional NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Real NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

RealFrac NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Show NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

NFData NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Methods

rnf :: NominalDiffTime -> () Source #

Eq NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Ord NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

data UTCTime Source #

This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.

Instances

Instances details
FromJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser UTCTime #

parseJSONList :: Value -> Parser [UTCTime] #

omittedField :: Maybe UTCTime #

FromJSONKey UTCTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

fromJSONKey :: FromJSONKeyFunction UTCTime

fromJSONKeyList :: FromJSONKeyFunction [UTCTime]

ToJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: UTCTime -> Value #

toEncoding :: UTCTime -> Encoding #

toJSONList :: [UTCTime] -> Value #

toEncodingList :: [UTCTime] -> Encoding #

omitField :: UTCTime -> Bool #

ToJSONKey UTCTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSONKey :: ToJSONKeyFunction UTCTime

toJSONKeyList :: ToJSONKeyFunction [UTCTime]

Data UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime Source #

toConstr :: UTCTime -> Constr Source #

dataTypeOf :: UTCTime -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) Source #

gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime Source #

FromCBOR UTCTime 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s UTCTime #

label :: Proxy UTCTime -> Text #

ToCBOR UTCTime 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: UTCTime -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy UTCTime -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [UTCTime] -> Size #

NFData UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

rnf :: UTCTime -> () Source #

Eq UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Ord UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

class MonadMonotonicTimeNSec m => MonadMonotonicTime (m :: Type -> Type) where #

Minimal complete definition

Nothing

Methods

getMonotonicTime :: m Time #

Instances

Instances details
MonadMonotonicTime IO 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

MonadMonotonicTime m => MonadMonotonicTime (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

class Monad m => MonadTime (m :: Type -> Type) where #

Instances

Instances details
MonadTime IO 
Instance details

Defined in Control.Monad.Class.MonadTime

MonadTime m => MonadTime (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadTime

newtype Time #

Constructors

Time DiffTime 

Instances

Instances details
Generic Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

Associated Types

type Rep Time :: Type -> Type Source #

Methods

from :: Time -> Rep Time x Source #

to :: Rep Time x -> Time Source #

Show Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

NFData Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

Methods

rnf :: Time -> () Source #

Eq Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

Methods

(==) :: Time -> Time -> Bool Source #

(/=) :: Time -> Time -> Bool Source #

Ord Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

NoThunks Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

Methods

noThunks :: Context -> Time -> IO (Maybe ThunkInfo)

wNoThunks :: Context -> Time -> IO (Maybe ThunkInfo)

showTypeOf :: Proxy Time -> String

type Rep Time 
Instance details

Defined in Control.Monad.Class.MonadTime.SI

type Rep Time = D1 ('MetaData "Time" "Control.Monad.Class.MonadTime.SI" "si-timers-1.4.0.0-Kb1aMrCOInB5cEquaz0KL4" 'True) (C1 ('MetaCons "Time" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DiffTime)))

addUTCTime :: NominalDiffTime -> UTCTime -> UTCTime Source #

addUTCTime a b = a + b

diffUTCTime :: UTCTime -> UTCTime -> NominalDiffTime Source #

diffUTCTime a b = a - b

class Monad m => MonadST (m :: Type -> Type) #

Minimal complete definition

stToIO, withLiftST

Instances

Instances details
MonadST IO 
Instance details

Defined in Control.Monad.Class.MonadST

Methods

stToIO :: ST (PrimState IO) a -> IO a

withLiftST :: (forall s. (forall a. ST s a -> IO a) -> b) -> b

MonadST (ST s) 
Instance details

Defined in Control.Monad.Class.MonadST

Methods

stToIO :: ST (PrimState (ST s)) a -> ST s a

withLiftST :: (forall s0. (forall a. ST s0 a -> ST s a) -> b) -> b

(MonadST m, PrimMonad m) => MonadST (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadST

Methods

stToIO :: ST (PrimState (ReaderT r m)) a -> ReaderT r m a

withLiftST :: (forall s. (forall a. ST s a -> ReaderT r m a) -> b) -> b

class (MonadSTM m, MonadThread m) => MonadAsync (m :: Type -> Type) where #

Minimal complete definition

async, asyncBound, asyncOn, asyncThreadId, cancel, cancelWith, asyncWithUnmask, asyncOnWithUnmask, waitCatchSTM, pollSTM

Methods

withAsync :: m a -> (Async m a -> m b) -> m b #

race :: m a -> m b -> m (Either a b) #

race_ :: m a -> m b -> m () #

concurrently :: m a -> m b -> m (a, b) #

concurrently_ :: m a -> m b -> m () #

Instances

Instances details
MonadAsync IO 
Instance details

Defined in Control.Monad.Class.MonadAsync

Associated Types

type Async IO = (async :: Type -> Type)

Methods

async :: IO a -> IO (Async IO a)

asyncBound :: IO a -> IO (Async IO a)

asyncOn :: Int -> IO a -> IO (Async IO a)

asyncThreadId :: Async IO a -> ThreadId IO

withAsync :: IO a -> (Async IO a -> IO b) -> IO b #

withAsyncBound :: IO a -> (Async IO a -> IO b) -> IO b

withAsyncOn :: Int -> IO a -> (Async IO a -> IO b) -> IO b

waitSTM :: Async IO a -> STM IO a

pollSTM :: Async IO a -> STM IO (Maybe (Either SomeException a))

waitCatchSTM :: Async IO a -> STM IO (Either SomeException a)

waitAnySTM :: [Async IO a] -> STM IO (Async IO a, a)

waitAnyCatchSTM :: [Async IO a] -> STM IO (Async IO a, Either SomeException a)

waitEitherSTM :: Async IO a -> Async IO b -> STM IO (Either a b)

waitEitherSTM_ :: Async IO a -> Async IO b -> STM IO ()

waitEitherCatchSTM :: Async IO a -> Async IO b -> STM IO (Either (Either SomeException a) (Either SomeException b))

waitBothSTM :: Async IO a -> Async IO b -> STM IO (a, b)

wait :: Async IO a -> IO a

poll :: Async IO a -> IO (Maybe (Either SomeException a))

waitCatch :: Async IO a -> IO (Either SomeException a)

cancel :: Async IO a -> IO ()

cancelWith :: Exception e => Async IO a -> e -> IO ()

uninterruptibleCancel :: Async IO a -> IO ()

waitAny :: [Async IO a] -> IO (Async IO a, a)

waitAnyCatch :: [Async IO a] -> IO (Async IO a, Either SomeException a)

waitAnyCancel :: [Async IO a] -> IO (Async IO a, a)

waitAnyCatchCancel :: [Async IO a] -> IO (Async IO a, Either SomeException a)

waitEither :: Async IO a -> Async IO b -> IO (Either a b)

waitEitherCatch :: Async IO a -> Async IO b -> IO (Either (Either SomeException a) (Either SomeException b))

waitEitherCancel :: Async IO a -> Async IO b -> IO (Either a b)

waitEitherCatchCancel :: Async IO a -> Async IO b -> IO (Either (Either SomeException a) (Either SomeException b))

waitEither_ :: Async IO a -> Async IO b -> IO ()

waitBoth :: Async IO a -> Async IO b -> IO (a, b)

race :: IO a -> IO b -> IO (Either a b) #

race_ :: IO a -> IO b -> IO () #

concurrently :: IO a -> IO b -> IO (a, b) #

concurrently_ :: IO a -> IO b -> IO () #

asyncWithUnmask :: ((forall b. IO b -> IO b) -> IO a) -> IO (Async IO a)

asyncOnWithUnmask :: Int -> ((forall b. IO b -> IO b) -> IO a) -> IO (Async IO a)

withAsyncWithUnmask :: ((forall c. IO c -> IO c) -> IO a) -> (Async IO a -> IO b) -> IO b

withAsyncOnWithUnmask :: Int -> ((forall c. IO c -> IO c) -> IO a) -> (Async IO a -> IO b) -> IO b

compareAsyncs :: Async IO a -> Async IO b -> Ordering

(MonadAsync m, MonadCatch (STM m), MonadFork m, MonadMask m) => MonadAsync (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadAsync

Associated Types

type Async (ReaderT r m) = (async :: Type -> Type)

Methods

async :: ReaderT r m a -> ReaderT r m (Async (ReaderT r m) a)

asyncBound :: ReaderT r m a -> ReaderT r m (Async (ReaderT r m) a)

asyncOn :: Int -> ReaderT r m a -> ReaderT r m (Async (ReaderT r m) a)

asyncThreadId :: Async (ReaderT r m) a -> ThreadId (ReaderT r m)

withAsync :: ReaderT r m a -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b #

withAsyncBound :: ReaderT r m a -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b

withAsyncOn :: Int -> ReaderT r m a -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b

waitSTM :: Async (ReaderT r m) a -> STM (ReaderT r m) a

pollSTM :: Async (ReaderT r m) a -> STM (ReaderT r m) (Maybe (Either SomeException a))

waitCatchSTM :: Async (ReaderT r m) a -> STM (ReaderT r m) (Either SomeException a)

waitAnySTM :: [Async (ReaderT r m) a] -> STM (ReaderT r m) (Async (ReaderT r m) a, a)

waitAnyCatchSTM :: [Async (ReaderT r m) a] -> STM (ReaderT r m) (Async (ReaderT r m) a, Either SomeException a)

waitEitherSTM :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> STM (ReaderT r m) (Either a b)

waitEitherSTM_ :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> STM (ReaderT r m) ()

waitEitherCatchSTM :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> STM (ReaderT r m) (Either (Either SomeException a) (Either SomeException b))

waitBothSTM :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> STM (ReaderT r m) (a, b)

wait :: Async (ReaderT r m) a -> ReaderT r m a

poll :: Async (ReaderT r m) a -> ReaderT r m (Maybe (Either SomeException a))

waitCatch :: Async (ReaderT r m) a -> ReaderT r m (Either SomeException a)

cancel :: Async (ReaderT r m) a -> ReaderT r m ()

cancelWith :: Exception e => Async (ReaderT r m) a -> e -> ReaderT r m ()

uninterruptibleCancel :: Async (ReaderT r m) a -> ReaderT r m ()

waitAny :: [Async (ReaderT r m) a] -> ReaderT r m (Async (ReaderT r m) a, a)

waitAnyCatch :: [Async (ReaderT r m) a] -> ReaderT r m (Async (ReaderT r m) a, Either SomeException a)

waitAnyCancel :: [Async (ReaderT r m) a] -> ReaderT r m (Async (ReaderT r m) a, a)

waitAnyCatchCancel :: [Async (ReaderT r m) a] -> ReaderT r m (Async (ReaderT r m) a, Either SomeException a)

waitEither :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (Either a b)

waitEitherCatch :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (Either (Either SomeException a) (Either SomeException b))

waitEitherCancel :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (Either a b)

waitEitherCatchCancel :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (Either (Either SomeException a) (Either SomeException b))

waitEither_ :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m ()

waitBoth :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> ReaderT r m (a, b)

race :: ReaderT r m a -> ReaderT r m b -> ReaderT r m (Either a b) #

race_ :: ReaderT r m a -> ReaderT r m b -> ReaderT r m () #

concurrently :: ReaderT r m a -> ReaderT r m b -> ReaderT r m (a, b) #

concurrently_ :: ReaderT r m a -> ReaderT r m b -> ReaderT r m () #

asyncWithUnmask :: ((forall b. ReaderT r m b -> ReaderT r m b) -> ReaderT r m a) -> ReaderT r m (Async (ReaderT r m) a)

asyncOnWithUnmask :: Int -> ((forall b. ReaderT r m b -> ReaderT r m b) -> ReaderT r m a) -> ReaderT r m (Async (ReaderT r m) a)

withAsyncWithUnmask :: ((forall c. ReaderT r m c -> ReaderT r m c) -> ReaderT r m a) -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b

withAsyncOnWithUnmask :: Int -> ((forall c. ReaderT r m c -> ReaderT r m c) -> ReaderT r m a) -> (Async (ReaderT r m) a -> ReaderT r m b) -> ReaderT r m b

compareAsyncs :: Async (ReaderT r m) a -> Async (ReaderT r m) b -> Ordering

class Monad m => MonadEventlog (m :: Type -> Type) #

Minimal complete definition

traceEventIO, traceMarkerIO

Instances

Instances details
MonadEventlog IO 
Instance details

Defined in Control.Monad.Class.MonadEventlog

Methods

traceEventIO :: String -> IO ()

traceMarkerIO :: String -> IO ()

MonadEventlog m => MonadEventlog (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadEventlog

Methods

traceEventIO :: String -> ReaderT r m ()

traceMarkerIO :: String -> ReaderT r m ()

class (MonadDelay m, MonadMonotonicTime m) => MonadDelay (m :: Type -> Type) where #

Methods

threadDelay :: DiffTime -> m () #

Instances

Instances details
MonadDelay IO 
Instance details

Defined in Control.Monad.Class.MonadTimer.SI

Methods

threadDelay :: DiffTime -> IO () #

MonadDelay m => MonadDelay (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadTimer.SI

Methods

threadDelay :: DiffTime -> ReaderT r m () #

class (MonadTimer m, MonadMonotonicTime m) => MonadTimer (m :: Type -> Type) where #

Methods

registerDelay :: DiffTime -> m (TVar m Bool) #

registerDelayCancellable :: DiffTime -> m (STM m TimeoutState, m ()) #

timeout :: DiffTime -> m a -> m (Maybe a) #

Instances

Instances details
MonadTimer IO 
Instance details

Defined in Control.Monad.Class.MonadTimer.SI

Methods

registerDelay :: DiffTime -> IO (TVar IO Bool) #

registerDelayCancellable :: DiffTime -> IO (STM IO TimeoutState, IO ()) #

timeout :: DiffTime -> IO a -> IO (Maybe a) #

MonadTimer m => MonadTimer (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadTimer.SI

Methods

registerDelay :: DiffTime -> ReaderT r m (TVar (ReaderT r m) Bool) #

registerDelayCancellable :: DiffTime -> ReaderT r m (STM (ReaderT r m) TimeoutState, ReaderT r m ()) #

timeout :: DiffTime -> ReaderT r m a -> ReaderT r m (Maybe a) #

class MonadThread m => MonadFork (m :: Type -> Type) #

Minimal complete definition

forkIO, forkOn, forkIOWithUnmask, forkFinally, throwTo, yield

Instances

Instances details
MonadFork IO 
Instance details

Defined in Control.Monad.Class.MonadFork

Methods

forkIO :: IO () -> IO (ThreadId IO)

forkOn :: Int -> IO () -> IO (ThreadId IO)

forkIOWithUnmask :: ((forall a. IO a -> IO a) -> IO ()) -> IO (ThreadId IO)

forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO (ThreadId IO)

throwTo :: Exception e => ThreadId IO -> e -> IO ()

killThread :: ThreadId IO -> IO ()

yield :: IO ()

MonadFork m => MonadFork (ReaderT e m) 
Instance details

Defined in Control.Monad.Class.MonadFork

Methods

forkIO :: ReaderT e m () -> ReaderT e m (ThreadId (ReaderT e m))

forkOn :: Int -> ReaderT e m () -> ReaderT e m (ThreadId (ReaderT e m))

forkIOWithUnmask :: ((forall a. ReaderT e m a -> ReaderT e m a) -> ReaderT e m ()) -> ReaderT e m (ThreadId (ReaderT e m))

forkFinally :: ReaderT e m a -> (Either SomeException a -> ReaderT e m ()) -> ReaderT e m (ThreadId (ReaderT e m))

throwTo :: Exception e0 => ThreadId (ReaderT e m) -> e0 -> ReaderT e m ()

killThread :: ThreadId (ReaderT e m) -> ReaderT e m ()

yield :: ReaderT e m ()

class (Monad m, Eq (ThreadId m), Ord (ThreadId m), Show (ThreadId m)) => MonadThread (m :: Type -> Type) #

Minimal complete definition

myThreadId, labelThread

Instances

Instances details
MonadThread IO 
Instance details

Defined in Control.Monad.Class.MonadFork

Associated Types

type ThreadId IO

Methods

myThreadId :: IO (ThreadId IO)

labelThread :: ThreadId IO -> String -> IO ()

MonadThread m => MonadThread (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadFork

Associated Types

type ThreadId (ReaderT r m)

Methods

myThreadId :: ReaderT r m (ThreadId (ReaderT r m))

labelThread :: ThreadId (ReaderT r m) -> String -> ReaderT r m ()

class MonadCatch m => MonadMask (m :: Type -> Type) where #

Minimal complete definition

mask, uninterruptibleMask

Methods

mask :: ((forall a. m a -> m a) -> m b) -> m b #

uninterruptibleMask :: ((forall a. m a -> m a) -> m b) -> m b #

mask_ :: m a -> m a #

uninterruptibleMask_ :: m a -> m a #

Instances

Instances details
MonadMask IO 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b #

mask_ :: IO a -> IO a #

uninterruptibleMask_ :: IO a -> IO a #

MonadMask m => MonadMask (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

mask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

uninterruptibleMask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

mask_ :: ReaderT r m a -> ReaderT r m a #

uninterruptibleMask_ :: ReaderT r m a -> ReaderT r m a #

class MonadThrow m => MonadCatch (m :: Type -> Type) where #

Minimal complete definition

catch

Methods

catch :: Exception e => m a -> (e -> m a) -> m a #

catchJust :: Exception e => (e -> Maybe b) -> m a -> (b -> m a) -> m a #

try :: Exception e => m a -> m (Either e a) #

tryJust :: Exception e => (e -> Maybe b) -> m a -> m (Either b a) #

handle :: Exception e => (e -> m a) -> m a -> m a #

handleJust :: Exception e => (e -> Maybe b) -> (b -> m a) -> m a -> m a #

onException :: m a -> m b -> m a #

bracketOnError :: m a -> (a -> m b) -> (a -> m c) -> m c #

generalBracket :: m a -> (a -> ExitCase b -> m c) -> (a -> m b) -> m (b, c) #

Instances

Instances details
MonadCatch STM 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

catch :: Exception e => STM a -> (e -> STM a) -> STM a #

catchJust :: Exception e => (e -> Maybe b) -> STM a -> (b -> STM a) -> STM a #

try :: Exception e => STM a -> STM (Either e a) #

tryJust :: Exception e => (e -> Maybe b) -> STM a -> STM (Either b a) #

handle :: Exception e => (e -> STM a) -> STM a -> STM a #

handleJust :: Exception e => (e -> Maybe b) -> (b -> STM a) -> STM a -> STM a #

onException :: STM a -> STM b -> STM a #

bracketOnError :: STM a -> (a -> STM b) -> (a -> STM c) -> STM c #

generalBracket :: STM a -> (a -> ExitCase b -> STM c) -> (a -> STM b) -> STM (b, c) #

MonadCatch IO 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

catch :: Exception e => IO a -> (e -> IO a) -> IO a #

catchJust :: Exception e => (e -> Maybe b) -> IO a -> (b -> IO a) -> IO a #

try :: Exception e => IO a -> IO (Either e a) #

tryJust :: Exception e => (e -> Maybe b) -> IO a -> IO (Either b a) #

handle :: Exception e => (e -> IO a) -> IO a -> IO a #

handleJust :: Exception e => (e -> Maybe b) -> (b -> IO a) -> IO a -> IO a #

onException :: IO a -> IO b -> IO a #

bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c #

generalBracket :: IO a -> (a -> ExitCase b -> IO c) -> (a -> IO b) -> IO (b, c) #

MonadCatch m => MonadCatch (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

catch :: Exception e => ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

catchJust :: Exception e => (e -> Maybe b) -> ReaderT r m a -> (b -> ReaderT r m a) -> ReaderT r m a #

try :: Exception e => ReaderT r m a -> ReaderT r m (Either e a) #

tryJust :: Exception e => (e -> Maybe b) -> ReaderT r m a -> ReaderT r m (Either b a) #

handle :: Exception e => (e -> ReaderT r m a) -> ReaderT r m a -> ReaderT r m a #

handleJust :: Exception e => (e -> Maybe b) -> (b -> ReaderT r m a) -> ReaderT r m a -> ReaderT r m a #

onException :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

bracketOnError :: ReaderT r m a -> (a -> ReaderT r m b) -> (a -> ReaderT r m c) -> ReaderT r m c #

generalBracket :: ReaderT r m a -> (a -> ExitCase b -> ReaderT r m c) -> (a -> ReaderT r m b) -> ReaderT r m (b, c) #

class Monad m => MonadThrow (m :: Type -> Type) where #

Minimal complete definition

throwIO

Methods

throwIO :: Exception e => e -> m a #

bracket :: m a -> (a -> m b) -> (a -> m c) -> m c #

bracket_ :: m a -> m b -> m c -> m c #

finally :: m a -> m b -> m a #

Instances

Instances details
MonadThrow STM 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

throwIO :: Exception e => e -> STM a #

bracket :: STM a -> (a -> STM b) -> (a -> STM c) -> STM c #

bracket_ :: STM a -> STM b -> STM c -> STM c #

finally :: STM a -> STM b -> STM a #

MonadThrow IO 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

throwIO :: Exception e => e -> IO a #

bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c #

bracket_ :: IO a -> IO b -> IO c -> IO c #

finally :: IO a -> IO b -> IO a #

MonadThrow m => MonadThrow (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

throwIO :: Exception e => e -> ReaderT r m a #

bracket :: ReaderT r m a -> (a -> ReaderT r m b) -> (a -> ReaderT r m c) -> ReaderT r m c #

bracket_ :: ReaderT r m a -> ReaderT r m b -> ReaderT r m c -> ReaderT r m c #

finally :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

class MonadThrow m => MonadEvaluate (m :: Type -> Type) where #

Methods

evaluate :: a -> m a #

Instances

Instances details
MonadEvaluate IO 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

evaluate :: a -> IO a #

MonadEvaluate m => MonadEvaluate (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadThrow

Methods

evaluate :: a -> ReaderT r m a #

type family TBQueue (m :: Type -> Type) :: Type -> Type #

Instances

Instances details
type TBQueue IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TBQueue (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TBQueue (ReaderT r m) = TBQueue m

type family TBQueue (m :: Type -> Type) :: Type -> Type #

Instances

Instances details
type TBQueue IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TBQueue (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TBQueue (ReaderT r m) = TBQueue m

type family TMVar (m :: Type -> Type) :: Type -> Type #

Instances

Instances details
type TMVar IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TMVar IO = TMVar
type TMVar (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TMVar (ReaderT r m) = TMVar m

type family TMVar (m :: Type -> Type) :: Type -> Type #

Instances

Instances details
type TMVar IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TMVar IO = TMVar
type TMVar (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TMVar (ReaderT r m) = TMVar m

type family TQueue (m :: Type -> Type) :: Type -> Type #

Instances

Instances details
type TQueue IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TQueue (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TQueue (ReaderT r m) = TQueue m

type family TQueue (m :: Type -> Type) :: Type -> Type #

Instances

Instances details
type TQueue IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TQueue (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TQueue (ReaderT r m) = TQueue m

type family TVar (m :: Type -> Type) :: Type -> Type #

Instances

Instances details
type TVar IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TVar IO = TVar
type TVar (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TVar (ReaderT r m) = TVar m

readTVar :: MonadSTM m => TVar m a -> STM m a #

type family TVar (m :: Type -> Type) :: Type -> Type #

Instances

Instances details
type TVar IO 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TVar IO = TVar
type TVar (ReaderT r m) 
Instance details

Defined in Control.Monad.Class.MonadSTM.Internal

type TVar (ReaderT r m) = TVar m

class StaticMap t where #

Associated Types

type Key t #

type Val t #

Methods

size :: t -> Int #

lookup :: Key t -> t -> Maybe (Val t) #

member :: Key t -> t -> Bool #

Instances

Instances details
StaticMap IntSet 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key IntSet #

type Val IntSet #

StaticMap (IntMap v) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (IntMap v) #

type Val (IntMap v) #

Methods

size :: IntMap v -> Int #

lookup :: Key (IntMap v) -> IntMap v -> Maybe (Val (IntMap v)) #

member :: Key (IntMap v) -> IntMap v -> Bool #

Ord a => StaticMap (Set a) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (Set a) #

type Val (Set a) #

Methods

size :: Set a -> Int #

lookup :: Key (Set a) -> Set a -> Maybe (Val (Set a)) #

member :: Key (Set a) -> Set a -> Bool #

Hashable a => StaticMap (HashSet a) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (HashSet a) #

type Val (HashSet a) #

Methods

size :: HashSet a -> Int #

lookup :: Key (HashSet a) -> HashSet a -> Maybe (Val (HashSet a)) #

member :: Key (HashSet a) -> HashSet a -> Bool #

Ord k => StaticMap (Map k v) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (Map k v) #

type Val (Map k v) #

Methods

size :: Map k v -> Int #

lookup :: Key (Map k v) -> Map k v -> Maybe (Val (Map k v)) #

member :: Key (Map k v) -> Map k v -> Bool #

Hashable k => StaticMap (HashMap k v) 
Instance details

Defined in Relude.Extra.Map

Associated Types

type Key (HashMap k v) #

type Val (HashMap k v) #

Methods

size :: HashMap k v -> Int #

lookup :: Key (HashMap k v) -> HashMap k v -> Maybe (Val (HashMap k v)) #

member :: Key (HashMap k v) -> HashMap k v -> Bool #

class StaticMap t => DynamicMap t where #

Methods

insert :: Key t -> Val t -> t -> t #

insertWith :: (Val t -> Val t -> Val t) -> Key t -> Val t -> t -> t #

delete :: Key t -> t -> t #

alter :: (Maybe (Val t) -> Maybe (Val t)) -> Key t -> t -> t #

Instances

Instances details
DynamicMap (IntMap v) 
Instance details

Defined in Relude.Extra.Map

Methods

insert :: Key (IntMap v) -> Val (IntMap v) -> IntMap v -> IntMap v #

insertWith :: (Val (IntMap v) -> Val (IntMap v) -> Val (IntMap v)) -> Key (IntMap v) -> Val (IntMap v) -> IntMap v -> IntMap v #

delete :: Key (IntMap v) -> IntMap v -> IntMap v #

alter :: (Maybe (Val (IntMap v)) -> Maybe (Val (IntMap v))) -> Key (IntMap v) -> IntMap v -> IntMap v #

Ord k => DynamicMap (Map k v) 
Instance details

Defined in Relude.Extra.Map

Methods

insert :: Key (Map k v) -> Val (Map k v) -> Map k v -> Map k v #

insertWith :: (Val (Map k v) -> Val (Map k v) -> Val (Map k v)) -> Key (Map k v) -> Val (Map k v) -> Map k v -> Map k v #

delete :: Key (Map k v) -> Map k v -> Map k v #

alter :: (Maybe (Val (Map k v)) -> Maybe (Val (Map k v))) -> Key (Map k v) -> Map k v -> Map k v #

Hashable k => DynamicMap (HashMap k v) 
Instance details

Defined in Relude.Extra.Map

Methods

insert :: Key (HashMap k v) -> Val (HashMap k v) -> HashMap k v -> HashMap k v #

insertWith :: (Val (HashMap k v) -> Val (HashMap k v) -> Val (HashMap k v)) -> Key (HashMap k v) -> Val (HashMap k v) -> HashMap k v -> HashMap k v #

delete :: Key (HashMap k v) -> HashMap k v -> HashMap k v #

alter :: (Maybe (Val (HashMap k v)) -> Maybe (Val (HashMap k v))) -> Key (HashMap k v) -> HashMap k v -> HashMap k v #

keys :: (IsList t, Item t ~ (a, b)) => t -> [a] #

elems :: (IsList t, Item t ~ (a, b)) => t -> [b] #

class Typeable a => FromCBOR a where #

Minimal complete definition

fromCBOR

Methods

fromCBOR :: Decoder s a #

label :: Proxy a -> Text #

Instances

Instances details
FromCBOR Void 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Void #

label :: Proxy Void -> Text #

FromCBOR Int32 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Int32 #

label :: Proxy Int32 -> Text #

FromCBOR Int64 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Int64 #

label :: Proxy Int64 -> Text #

FromCBOR Rational 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Rational #

label :: Proxy Rational -> Text #

FromCBOR Word16 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word16 #

label :: Proxy Word16 -> Text #

FromCBOR Word32 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word32 #

label :: Proxy Word32 -> Text #

FromCBOR Word64 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word64 #

label :: Proxy Word64 -> Text #

FromCBOR Word8 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word8 #

label :: Proxy Word8 -> Text #

FromCBOR ByteString 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s ByteString #

label :: Proxy ByteString -> Text #

FromCBOR ByteString 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s ByteString #

label :: Proxy ByteString -> Text #

FromCBOR ShortByteString 
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR TermToken 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s TermToken #

label :: Proxy TermToken -> Text #

FromCBOR Term 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Term #

label :: Proxy Term -> Text #

FromCBOR Text 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Text #

label :: Proxy Text -> Text #

FromCBOR UTCTime 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s UTCTime #

label :: Proxy UTCTime -> Text #

FromCBOR Integer 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Integer #

label :: Proxy Integer -> Text #

FromCBOR Natural 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Natural #

label :: Proxy Natural -> Text #

FromCBOR () 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s () #

label :: Proxy () -> Text #

FromCBOR Bool 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Bool #

label :: Proxy Bool -> Text #

FromCBOR Double 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Double #

label :: Proxy Double -> Text #

FromCBOR Float 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Float #

label :: Proxy Float -> Text #

FromCBOR Int 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Int #

label :: Proxy Int -> Text #

FromCBOR Word 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s Word #

label :: Proxy Word -> Text #

FromCBOR a => FromCBOR (NonEmpty a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (NonEmpty a) #

label :: Proxy (NonEmpty a) -> Text #

FromCBOR a => FromCBOR (Seq a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Seq a) #

label :: Proxy (Seq a) -> Text #

(Ord a, FromCBOR a) => FromCBOR (Set a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Set a) #

label :: Proxy (Set a) -> Text #

FromCBOR a => FromCBOR (Vector a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Vector a) #

label :: Proxy (Vector a) -> Text #

FromCBOR a => FromCBOR (Maybe a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Maybe a) #

label :: Proxy (Maybe a) -> Text #

FromCBOR a => FromCBOR [a] 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s [a] #

label :: Proxy [a] -> Text #

(FromCBOR a, FromCBOR b) => FromCBOR (Either a b) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Either a b) #

label :: Proxy (Either a b) -> Text #

Typeable a => FromCBOR (Fixed a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Fixed a) #

label :: Proxy (Fixed a) -> Text #

(Ord k, FromCBOR k, FromCBOR v) => FromCBOR (Map k v) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (Map k v) #

label :: Proxy (Map k v) -> Text #

(FromCBOR a, FromCBOR b) => FromCBOR (a, b) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (a, b) #

label :: Proxy (a, b) -> Text #

(Typeable s, FromCBOR a) => FromCBOR (Tagged s a) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s0 (Tagged s a) #

label :: Proxy (Tagged s a) -> Text #

(FromCBOR a, FromCBOR b, FromCBOR c) => FromCBOR (a, b, c) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (a, b, c) #

label :: Proxy (a, b, c) -> Text #

(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d) => FromCBOR (a, b, c, d) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (a, b, c, d) #

label :: Proxy (a, b, c, d) -> Text #

(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e) => FromCBOR (a, b, c, d, e) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (a, b, c, d, e) #

label :: Proxy (a, b, c, d, e) -> Text #

(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f) => FromCBOR (a, b, c, d, e, f) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (a, b, c, d, e, f) #

label :: Proxy (a, b, c, d, e, f) -> Text #

(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f, FromCBOR g) => FromCBOR (a, b, c, d, e, f, g) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (a, b, c, d, e, f, g) #

label :: Proxy (a, b, c, d, e, f, g) -> Text #

(FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f, FromCBOR g, FromCBOR h) => FromCBOR (a, b, c, d, e, f, g, h) 
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (a, b, c, d, e, f, g, h) #

label :: Proxy (a, b, c, d, e, f, g, h) -> Text #

class Typeable a => ToCBOR a where #

Minimal complete definition

toCBOR

Methods

toCBOR :: a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy a -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [a] -> Size #

Instances

Instances details
ToCBOR Void 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Void -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Void -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Void] -> Size #

ToCBOR Int32 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Int32 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Int32 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Int32] -> Size #

ToCBOR Int64 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Int64 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Int64 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Int64] -> Size #

ToCBOR Word16 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word16 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word16 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word16] -> Size #

ToCBOR Word32 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word32 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word32 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word32] -> Size #

ToCBOR Word64 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word64 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word64 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word64] -> Size #

ToCBOR Word8 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word8 -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word8 -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word8] -> Size #

ToCBOR ByteString 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: ByteString -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ByteString -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ByteString] -> Size #

ToCBOR ByteString 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: ByteString -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ByteString -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ByteString] -> Size #

ToCBOR ShortByteString 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: ShortByteString -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ShortByteString -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ShortByteString] -> Size #

ToCBOR Encoding 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Encoding -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Encoding -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Encoding] -> Size #

ToCBOR Term 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Term -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Term -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Term] -> Size #

ToCBOR Text 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Text -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Text -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Text] -> Size #

ToCBOR UTCTime 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: UTCTime -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy UTCTime -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [UTCTime] -> Size #

ToCBOR Integer 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Integer -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Integer -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Integer] -> Size #

ToCBOR Natural 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Natural -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Natural -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Natural] -> Size #

ToCBOR () 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: () -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy () -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [()] -> Size #

ToCBOR Bool 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Bool -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Bool -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Bool] -> Size #

ToCBOR Double 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Double -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Double -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Double] -> Size #

ToCBOR Float 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Float -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Float -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Float] -> Size #

ToCBOR Int 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Int -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Int -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Int] -> Size #

ToCBOR Word 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Word -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Word -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Word] -> Size #

ToCBOR a => ToCBOR (NonEmpty a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: NonEmpty a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (NonEmpty a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [NonEmpty a] -> Size #

ToCBOR a => ToCBOR (Ratio a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Ratio a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Ratio a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Ratio a] -> Size #

Typeable xs => ToCBOR (LengthOf xs) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: LengthOf xs -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (LengthOf xs) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [LengthOf xs] -> Size #

ToCBOR a => ToCBOR (Seq a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Seq a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Seq a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Seq a] -> Size #

(Ord a, ToCBOR a) => ToCBOR (Set a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Set a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Set a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Set a] -> Size #

ToCBOR a => ToCBOR (Vector a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Vector a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Vector a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Vector a] -> Size #

ToCBOR a => ToCBOR (Maybe a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Maybe a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Maybe a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Maybe a] -> Size #

ToCBOR a => ToCBOR [a] 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: [a] -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [a] -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [[a]] -> Size #

(ToCBOR a, ToCBOR b) => ToCBOR (Either a b) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Either a b -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Either a b) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Either a b] -> Size #

Typeable a => ToCBOR (Fixed a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Fixed a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Fixed a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Fixed a] -> Size #

(Ord k, ToCBOR k, ToCBOR v) => ToCBOR (Map k v) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Map k v -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Map k v) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Map k v] -> Size #

(ToCBOR a, ToCBOR b) => ToCBOR (a, b) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (a, b) -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (a, b) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [(a, b)] -> Size #

ToCBOR (Tokens -> Tokens) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (Tokens -> Tokens) -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Tokens -> Tokens) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Tokens -> Tokens] -> Size #

(Typeable s, ToCBOR a) => ToCBOR (Tagged s a) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: Tagged s a -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Tagged s a) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Tagged s a] -> Size #

(ToCBOR a, ToCBOR b, ToCBOR c) => ToCBOR (a, b, c) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (a, b, c) -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (a, b, c) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [(a, b, c)] -> Size #

(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d) => ToCBOR (a, b, c, d) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (a, b, c, d) -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (a, b, c, d) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [(a, b, c, d)] -> Size #

(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e) => ToCBOR (a, b, c, d, e) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (a, b, c, d, e) -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (a, b, c, d, e) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [(a, b, c, d, e)] -> Size #

(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e, ToCBOR f) => ToCBOR (a, b, c, d, e, f) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (a, b, c, d, e, f) -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (a, b, c, d, e, f) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [(a, b, c, d, e, f)] -> Size #

(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e, ToCBOR f, ToCBOR g) => ToCBOR (a, b, c, d, e, f, g) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (a, b, c, d, e, f, g) -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (a, b, c, d, e, f, g) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [(a, b, c, d, e, f, g)] -> Size #

(ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e, ToCBOR f, ToCBOR g, ToCBOR h) => ToCBOR (a, b, c, d, e, f, g, h) 
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (a, b, c, d, e, f, g, h) -> Encoding #

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (a, b, c, d, e, f, g, h) -> Size #

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [(a, b, c, d, e, f, g, h)] -> Size #

class FromJSON a where #

Minimal complete definition

Nothing

Methods

parseJSON :: Value -> Parser a #

parseJSONList :: Value -> Parser [a] #

omittedField :: Maybe a #

Instances

Instances details
FromJSON Key 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Key #

parseJSONList :: Value -> Parser [Key] #

omittedField :: Maybe Key #

FromJSON DotNetTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser DotNetTime #

parseJSONList :: Value -> Parser [DotNetTime] #

omittedField :: Maybe DotNetTime #

FromJSON Value 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Value #

parseJSONList :: Value -> Parser [Value] #

omittedField :: Maybe Value #

FromJSON Version 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Version #

parseJSONList :: Value -> Parser [Version] #

omittedField :: Maybe Version #

FromJSON CTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser CTime #

parseJSONList :: Value -> Parser [CTime] #

omittedField :: Maybe CTime #

FromJSON Void 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Void #

parseJSONList :: Value -> Parser [Void] #

omittedField :: Maybe Void #

FromJSON Int16 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int16 #

parseJSONList :: Value -> Parser [Int16] #

omittedField :: Maybe Int16 #

FromJSON Int32 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int32 #

parseJSONList :: Value -> Parser [Int32] #

omittedField :: Maybe Int32 #

FromJSON Int64 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int64 #

parseJSONList :: Value -> Parser [Int64] #

omittedField :: Maybe Int64 #

FromJSON Int8 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int8 #

parseJSONList :: Value -> Parser [Int8] #

omittedField :: Maybe Int8 #

FromJSON Word16 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word16 #

parseJSONList :: Value -> Parser [Word16] #

omittedField :: Maybe Word16 #

FromJSON Word32 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word32 #

parseJSONList :: Value -> Parser [Word32] #

omittedField :: Maybe Word32 #

FromJSON Word64 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word64 #

parseJSONList :: Value -> Parser [Word64] #

omittedField :: Maybe Word64 #

FromJSON Word8 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word8 #

parseJSONList :: Value -> Parser [Word8] #

omittedField :: Maybe Word8 #

FromJSON IntSet 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser IntSet #

parseJSONList :: Value -> Parser [IntSet] #

omittedField :: Maybe IntSet #

FromJSON Ordering 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Ordering #

parseJSONList :: Value -> Parser [Ordering] #

omittedField :: Maybe Ordering #

FromJSON URI 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser URI #

parseJSONList :: Value -> Parser [URI] #

omittedField :: Maybe URI #

FromJSON Scientific 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Scientific #

parseJSONList :: Value -> Parser [Scientific] #

omittedField :: Maybe Scientific #

FromJSON Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Text #

parseJSONList :: Value -> Parser [Text] #

omittedField :: Maybe Text #

FromJSON Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Text #

parseJSONList :: Value -> Parser [Text] #

omittedField :: Maybe Text #

FromJSON ShortText 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser ShortText #

parseJSONList :: Value -> Parser [ShortText] #

omittedField :: Maybe ShortText #

FromJSON CalendarDiffDays 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Day 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Day #

parseJSONList :: Value -> Parser [Day] #

omittedField :: Maybe Day #

FromJSON Month 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Month #

parseJSONList :: Value -> Parser [Month] #

omittedField :: Maybe Month #

FromJSON Quarter 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Quarter #

parseJSONList :: Value -> Parser [Quarter] #

omittedField :: Maybe Quarter #

FromJSON QuarterOfYear 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser QuarterOfYear #

parseJSONList :: Value -> Parser [QuarterOfYear] #

omittedField :: Maybe QuarterOfYear #

FromJSON DayOfWeek 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser DayOfWeek #

parseJSONList :: Value -> Parser [DayOfWeek] #

omittedField :: Maybe DayOfWeek #

FromJSON DiffTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser DiffTime #

parseJSONList :: Value -> Parser [DiffTime] #

omittedField :: Maybe DiffTime #

FromJSON NominalDiffTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON SystemTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser SystemTime #

parseJSONList :: Value -> Parser [SystemTime] #

omittedField :: Maybe SystemTime #

FromJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser UTCTime #

parseJSONList :: Value -> Parser [UTCTime] #

omittedField :: Maybe UTCTime #

FromJSON CalendarDiffTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON LocalTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser LocalTime #

parseJSONList :: Value -> Parser [LocalTime] #

omittedField :: Maybe LocalTime #

FromJSON TimeOfDay 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser TimeOfDay #

parseJSONList :: Value -> Parser [TimeOfDay] #

omittedField :: Maybe TimeOfDay #

FromJSON ZonedTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser ZonedTime #

parseJSONList :: Value -> Parser [ZonedTime] #

omittedField :: Maybe ZonedTime #

FromJSON UUID 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser UUID #

parseJSONList :: Value -> Parser [UUID] #

omittedField :: Maybe UUID #

FromJSON Integer 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Integer #

parseJSONList :: Value -> Parser [Integer] #

omittedField :: Maybe Integer #

FromJSON Natural 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Natural #

parseJSONList :: Value -> Parser [Natural] #

omittedField :: Maybe Natural #

FromJSON () 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser () #

parseJSONList :: Value -> Parser [()] #

omittedField :: Maybe () #

FromJSON Bool 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Bool #

parseJSONList :: Value -> Parser [Bool] #

omittedField :: Maybe Bool #

FromJSON Char 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Char #

parseJSONList :: Value -> Parser [Char] #

omittedField :: Maybe Char #

FromJSON Double 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Double #

parseJSONList :: Value -> Parser [Double] #

omittedField :: Maybe Double #

FromJSON Float 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Float #

parseJSONList :: Value -> Parser [Float] #

omittedField :: Maybe Float #

FromJSON Int 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Int #

parseJSONList :: Value -> Parser [Int] #

omittedField :: Maybe Int #

FromJSON Word 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser Word #

parseJSONList :: Value -> Parser [Word] #

omittedField :: Maybe Word #

FromJSON v => FromJSON (KeyMap v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (KeyMap v) #

parseJSONList :: Value -> Parser [KeyMap v] #

omittedField :: Maybe (KeyMap v) #

FromJSON a => FromJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Identity a) #

parseJSONList :: Value -> Parser [Identity a] #

omittedField :: Maybe (Identity a) #

FromJSON a => FromJSON (First a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (First a) #

parseJSONList :: Value -> Parser [First a] #

omittedField :: Maybe (First a) #

FromJSON a => FromJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Last a) #

parseJSONList :: Value -> Parser [Last a] #

omittedField :: Maybe (Last a) #

FromJSON a => FromJSON (Down a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Down a) #

parseJSONList :: Value -> Parser [Down a] #

omittedField :: Maybe (Down a) #

FromJSON a => FromJSON (First a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (First a) #

parseJSONList :: Value -> Parser [First a] #

omittedField :: Maybe (First a) #

FromJSON a => FromJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Last a) #

parseJSONList :: Value -> Parser [Last a] #

omittedField :: Maybe (Last a) #

FromJSON a => FromJSON (Max a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Max a) #

parseJSONList :: Value -> Parser [Max a] #

omittedField :: Maybe (Max a) #

FromJSON a => FromJSON (Min a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Min a) #

parseJSONList :: Value -> Parser [Min a] #

omittedField :: Maybe (Min a) #

FromJSON a => FromJSON (WrappedMonoid a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (WrappedMonoid a) #

parseJSONList :: Value -> Parser [WrappedMonoid a] #

omittedField :: Maybe (WrappedMonoid a) #

FromJSON a => FromJSON (Dual a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Dual a) #

parseJSONList :: Value -> Parser [Dual a] #

omittedField :: Maybe (Dual a) #

FromJSON a => FromJSON (NonEmpty a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (NonEmpty a) #

parseJSONList :: Value -> Parser [NonEmpty a] #

omittedField :: Maybe (NonEmpty a) #

(Generic a, GFromJSON Zero (Rep a)) => FromJSON (Generically a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Generically a) #

parseJSONList :: Value -> Parser [Generically a] #

omittedField :: Maybe (Generically a) #

(FromJSON a, Integral a) => FromJSON (Ratio a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Ratio a) #

parseJSONList :: Value -> Parser [Ratio a] #

omittedField :: Maybe (Ratio a) #

FromJSON a => FromJSON (IntMap a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (IntMap a) #

parseJSONList :: Value -> Parser [IntMap a] #

omittedField :: Maybe (IntMap a) #

FromJSON a => FromJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Seq a) #

parseJSONList :: Value -> Parser [Seq a] #

omittedField :: Maybe (Seq a) #

(Ord a, FromJSON a) => FromJSON (Set a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Set a) #

parseJSONList :: Value -> Parser [Set a] #

omittedField :: Maybe (Set a) #

FromJSON v => FromJSON (Tree v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Tree v) #

parseJSONList :: Value -> Parser [Tree v] #

omittedField :: Maybe (Tree v) #

FromJSON1 f => FromJSON (Fix f) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Fix f) #

parseJSONList :: Value -> Parser [Fix f] #

omittedField :: Maybe (Fix f) #

(FromJSON1 f, Functor f) => FromJSON (Mu f) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Mu f) #

parseJSONList :: Value -> Parser [Mu f] #

omittedField :: Maybe (Mu f) #

(FromJSON1 f, Functor f) => FromJSON (Nu f) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Nu f) #

parseJSONList :: Value -> Parser [Nu f] #

omittedField :: Maybe (Nu f) #

FromJSON a => FromJSON (DNonEmpty a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (DNonEmpty a) #

parseJSONList :: Value -> Parser [DNonEmpty a] #

omittedField :: Maybe (DNonEmpty a) #

FromJSON a => FromJSON (DList a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (DList a) #

parseJSONList :: Value -> Parser [DList a] #

omittedField :: Maybe (DList a) #

FromJSON a => FromJSON (ReasonablySized a) Source # 
Instance details

Defined in Hydra.Prelude

Methods

parseJSON :: Value -> Parser (ReasonablySized a) #

parseJSONList :: Value -> Parser [ReasonablySized a] #

omittedField :: Maybe (ReasonablySized a) #

FromJSON a => FromJSON (Array a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Array a) #

parseJSONList :: Value -> Parser [Array a] #

omittedField :: Maybe (Array a) #

(Prim a, FromJSON a) => FromJSON (PrimArray a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (PrimArray a) #

parseJSONList :: Value -> Parser [PrimArray a] #

omittedField :: Maybe (PrimArray a) #

FromJSON a => FromJSON (SmallArray a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (SmallArray a) #

parseJSONList :: Value -> Parser [SmallArray a] #

omittedField :: Maybe (SmallArray a) #

FromJSON a => FromJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Maybe a) #

parseJSONList :: Value -> Parser [Maybe a] #

omittedField :: Maybe0 (Maybe a) #

(Eq a, Hashable a, FromJSON a) => FromJSON (HashSet a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (HashSet a) #

parseJSONList :: Value -> Parser [HashSet a] #

omittedField :: Maybe (HashSet a) #

FromJSON a => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Vector a) #

parseJSONList :: Value -> Parser [Vector a] #

omittedField :: Maybe (Vector a) #

(Prim a, FromJSON a) => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Vector a) #

parseJSONList :: Value -> Parser [Vector a] #

omittedField :: Maybe (Vector a) #

(Storable a, FromJSON a) => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Vector a) #

parseJSONList :: Value -> Parser [Vector a] #

omittedField :: Maybe (Vector a) #

(Vector Vector a, FromJSON a) => FromJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Vector a) #

parseJSONList :: Value -> Parser [Vector a] #

omittedField :: Maybe (Vector a) #

FromJSON a => FromJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Maybe a) #

parseJSONList :: Value -> Parser [Maybe a] #

omittedField :: Maybe (Maybe a) #

FromJSON a => FromJSON (a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a) #

parseJSONList :: Value -> Parser [(a)] #

omittedField :: Maybe (a) #

FromJSON a => FromJSON [a] 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser [a] #

parseJSONList :: Value -> Parser [[a]] #

omittedField :: Maybe [a] #

(FromJSON a, FromJSON b) => FromJSON (Either a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Either a b) #

parseJSONList :: Value -> Parser [Either a b] #

omittedField :: Maybe (Either a b) #

HasResolution a => FromJSON (Fixed a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Fixed a) #

parseJSONList :: Value -> Parser [Fixed a] #

omittedField :: Maybe (Fixed a) #

FromJSON (Proxy a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Proxy a) #

parseJSONList :: Value -> Parser [Proxy a] #

omittedField :: Maybe (Proxy a) #

(FromJSONKey k, Ord k, FromJSON v) => FromJSON (Map k v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Map k v) #

parseJSONList :: Value -> Parser [Map k v] #

omittedField :: Maybe (Map k v) #

(FromJSON a, FromJSON b) => FromJSON (Either a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Either a b) #

parseJSONList :: Value -> Parser [Either a b] #

omittedField :: Maybe (Either a b) #

(FromJSON a, FromJSON b) => FromJSON (These a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (These a b) #

parseJSONList :: Value -> Parser [These a b] #

omittedField :: Maybe (These a b) #

(FromJSON a, FromJSON b) => FromJSON (Pair a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Pair a b) #

parseJSONList :: Value -> Parser [Pair a b] #

omittedField :: Maybe (Pair a b) #

(FromJSON a, FromJSON b) => FromJSON (These a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (These a b) #

parseJSONList :: Value -> Parser [These a b] #

omittedField :: Maybe (These a b) #

(FromJSON v, FromJSONKey k, Eq k, Hashable k) => FromJSON (HashMap k v) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (HashMap k v) #

parseJSONList :: Value -> Parser [HashMap k v] #

omittedField :: Maybe (HashMap k v) #

(FromJSON a, FromJSON b) => FromJSON (a, b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b) #

parseJSONList :: Value -> Parser [(a, b)] #

omittedField :: Maybe (a, b) #

FromJSON a => FromJSON (Const a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Const a b) #

parseJSONList :: Value -> Parser [Const a b] #

omittedField :: Maybe (Const a b) #

FromJSON b => FromJSON (Tagged a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Tagged a b) #

parseJSONList :: Value -> Parser [Tagged a b] #

omittedField :: Maybe (Tagged a b) #

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (These1 f g a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (These1 f g a) #

parseJSONList :: Value -> Parser [These1 f g a] #

omittedField :: Maybe (These1 f g a) #

(FromJSON a, FromJSON b, FromJSON c) => FromJSON (a, b, c) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c) #

parseJSONList :: Value -> Parser [(a, b, c)] #

omittedField :: Maybe (a, b, c) #

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (Product f g a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Product f g a) #

parseJSONList :: Value -> Parser [Product f g a] #

omittedField :: Maybe (Product f g a) #

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (Sum f g a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Sum f g a) #

parseJSONList :: Value -> Parser [Sum f g a] #

omittedField :: Maybe (Sum f g a) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d) => FromJSON (a, b, c, d) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d) #

parseJSONList :: Value -> Parser [(a, b, c, d)] #

omittedField :: Maybe (a, b, c, d) #

(FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON (Compose f g a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Compose f g a) #

parseJSONList :: Value -> Parser [Compose f g a] #

omittedField :: Maybe (Compose f g a) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e) => FromJSON (a, b, c, d, e) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e) #

parseJSONList :: Value -> Parser [(a, b, c, d, e)] #

omittedField :: Maybe (a, b, c, d, e) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f) => FromJSON (a, b, c, d, e, f) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f)] #

omittedField :: Maybe (a, b, c, d, e, f) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g) => FromJSON (a, b, c, d, e, f, g) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g)] #

omittedField :: Maybe (a, b, c, d, e, f, g) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h) => FromJSON (a, b, c, d, e, f, g, h) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i) => FromJSON (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j) => FromJSON (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k) => FromJSON (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k, l) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l, m)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k, l, m) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m, FromJSON n) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

(FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m, FromJSON n, FromJSON o) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] #

omittedField :: Maybe (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

class ToJSON a where #

Minimal complete definition

Nothing

Methods

toJSON :: a -> Value #

toEncoding :: a -> Encoding #

toJSONList :: [a] -> Value #

toEncodingList :: [a] -> Encoding #

omitField :: a -> Bool #

Instances

Instances details
ToJSON Key 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Key -> Value #

toEncoding :: Key -> Encoding #

toJSONList :: [Key] -> Value #

toEncodingList :: [Key] -> Encoding #

omitField :: Key -> Bool #

ToJSON DotNetTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: DotNetTime -> Value #

toEncoding :: DotNetTime -> Encoding #

toJSONList :: [DotNetTime] -> Value #

toEncodingList :: [DotNetTime] -> Encoding #

omitField :: DotNetTime -> Bool #

ToJSON Value 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Value -> Value #

toEncoding :: Value -> Encoding #

toJSONList :: [Value] -> Value #

toEncodingList :: [Value] -> Encoding #

omitField :: Value -> Bool #

ToJSON Version 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Version -> Value #

toEncoding :: Version -> Encoding #

toJSONList :: [Version] -> Value #

toEncodingList :: [Version] -> Encoding #

omitField :: Version -> Bool #

ToJSON CTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: CTime -> Value #

toEncoding :: CTime -> Encoding #

toJSONList :: [CTime] -> Value #

toEncodingList :: [CTime] -> Encoding #

omitField :: CTime -> Bool #

ToJSON Void 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Void -> Value #

toEncoding :: Void -> Encoding #

toJSONList :: [Void] -> Value #

toEncodingList :: [Void] -> Encoding #

omitField :: Void -> Bool #

ToJSON Int16 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int16 -> Value #

toEncoding :: Int16 -> Encoding #

toJSONList :: [Int16] -> Value #

toEncodingList :: [Int16] -> Encoding #

omitField :: Int16 -> Bool #

ToJSON Int32 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int32 -> Value #

toEncoding :: Int32 -> Encoding #

toJSONList :: [Int32] -> Value #

toEncodingList :: [Int32] -> Encoding #

omitField :: Int32 -> Bool #

ToJSON Int64 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int64 -> Value #

toEncoding :: Int64 -> Encoding #

toJSONList :: [Int64] -> Value #

toEncodingList :: [Int64] -> Encoding #

omitField :: Int64 -> Bool #

ToJSON Int8 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int8 -> Value #

toEncoding :: Int8 -> Encoding #

toJSONList :: [Int8] -> Value #

toEncodingList :: [Int8] -> Encoding #

omitField :: Int8 -> Bool #

ToJSON Word16 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word16 -> Value #

toEncoding :: Word16 -> Encoding #

toJSONList :: [Word16] -> Value #

toEncodingList :: [Word16] -> Encoding #

omitField :: Word16 -> Bool #

ToJSON Word32 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word32 -> Value #

toEncoding :: Word32 -> Encoding #

toJSONList :: [Word32] -> Value #

toEncodingList :: [Word32] -> Encoding #

omitField :: Word32 -> Bool #

ToJSON Word64 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word64 -> Value #

toEncoding :: Word64 -> Encoding #

toJSONList :: [Word64] -> Value #

toEncodingList :: [Word64] -> Encoding #

omitField :: Word64 -> Bool #

ToJSON Word8 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word8 -> Value #

toEncoding :: Word8 -> Encoding #

toJSONList :: [Word8] -> Value #

toEncodingList :: [Word8] -> Encoding #

omitField :: Word8 -> Bool #

ToJSON IntSet 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: IntSet -> Value #

toEncoding :: IntSet -> Encoding #

toJSONList :: [IntSet] -> Value #

toEncodingList :: [IntSet] -> Encoding #

omitField :: IntSet -> Bool #

ToJSON Ordering 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Ordering -> Value #

toEncoding :: Ordering -> Encoding #

toJSONList :: [Ordering] -> Value #

toEncodingList :: [Ordering] -> Encoding #

omitField :: Ordering -> Bool #

ToJSON URI 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: URI -> Value #

toEncoding :: URI -> Encoding #

toJSONList :: [URI] -> Value #

toEncodingList :: [URI] -> Encoding #

omitField :: URI -> Bool #

ToJSON Scientific 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Scientific -> Value #

toEncoding :: Scientific -> Encoding #

toJSONList :: [Scientific] -> Value #

toEncodingList :: [Scientific] -> Encoding #

omitField :: Scientific -> Bool #

ToJSON Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Text -> Value #

toEncoding :: Text -> Encoding #

toJSONList :: [Text] -> Value #

toEncodingList :: [Text] -> Encoding #

omitField :: Text -> Bool #

ToJSON Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Text -> Value #

toEncoding :: Text -> Encoding #

toJSONList :: [Text] -> Value #

toEncodingList :: [Text] -> Encoding #

omitField :: Text -> Bool #

ToJSON ShortText 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: ShortText -> Value #

toEncoding :: ShortText -> Encoding #

toJSONList :: [ShortText] -> Value #

toEncodingList :: [ShortText] -> Encoding #

omitField :: ShortText -> Bool #

ToJSON CalendarDiffDays 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Day 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Day -> Value #

toEncoding :: Day -> Encoding #

toJSONList :: [Day] -> Value #

toEncodingList :: [Day] -> Encoding #

omitField :: Day -> Bool #

ToJSON Month 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Month -> Value #

toEncoding :: Month -> Encoding #

toJSONList :: [Month] -> Value #

toEncodingList :: [Month] -> Encoding #

omitField :: Month -> Bool #

ToJSON Quarter 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Quarter -> Value #

toEncoding :: Quarter -> Encoding #

toJSONList :: [Quarter] -> Value #

toEncodingList :: [Quarter] -> Encoding #

omitField :: Quarter -> Bool #

ToJSON QuarterOfYear 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: QuarterOfYear -> Value #

toEncoding :: QuarterOfYear -> Encoding #

toJSONList :: [QuarterOfYear] -> Value #

toEncodingList :: [QuarterOfYear] -> Encoding #

omitField :: QuarterOfYear -> Bool #

ToJSON DayOfWeek 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: DayOfWeek -> Value #

toEncoding :: DayOfWeek -> Encoding #

toJSONList :: [DayOfWeek] -> Value #

toEncodingList :: [DayOfWeek] -> Encoding #

omitField :: DayOfWeek -> Bool #

ToJSON DiffTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: DiffTime -> Value #

toEncoding :: DiffTime -> Encoding #

toJSONList :: [DiffTime] -> Value #

toEncodingList :: [DiffTime] -> Encoding #

omitField :: DiffTime -> Bool #

ToJSON NominalDiffTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON SystemTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: SystemTime -> Value #

toEncoding :: SystemTime -> Encoding #

toJSONList :: [SystemTime] -> Value #

toEncodingList :: [SystemTime] -> Encoding #

omitField :: SystemTime -> Bool #

ToJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: UTCTime -> Value #

toEncoding :: UTCTime -> Encoding #

toJSONList :: [UTCTime] -> Value #

toEncodingList :: [UTCTime] -> Encoding #

omitField :: UTCTime -> Bool #

ToJSON CalendarDiffTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON LocalTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: LocalTime -> Value #

toEncoding :: LocalTime -> Encoding #

toJSONList :: [LocalTime] -> Value #

toEncodingList :: [LocalTime] -> Encoding #

omitField :: LocalTime -> Bool #

ToJSON TimeOfDay 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: TimeOfDay -> Value #

toEncoding :: TimeOfDay -> Encoding #

toJSONList :: [TimeOfDay] -> Value #

toEncodingList :: [TimeOfDay] -> Encoding #

omitField :: TimeOfDay -> Bool #

ToJSON ZonedTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: ZonedTime -> Value #

toEncoding :: ZonedTime -> Encoding #

toJSONList :: [ZonedTime] -> Value #

toEncodingList :: [ZonedTime] -> Encoding #

omitField :: ZonedTime -> Bool #

ToJSON UUID 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: UUID -> Value #

toEncoding :: UUID -> Encoding #

toJSONList :: [UUID] -> Value #

toEncodingList :: [UUID] -> Encoding #

omitField :: UUID -> Bool #

ToJSON Integer 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Integer -> Value #

toEncoding :: Integer -> Encoding #

toJSONList :: [Integer] -> Value #

toEncodingList :: [Integer] -> Encoding #

omitField :: Integer -> Bool #

ToJSON Natural 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Natural -> Value #

toEncoding :: Natural -> Encoding #

toJSONList :: [Natural] -> Value #

toEncodingList :: [Natural] -> Encoding #

omitField :: Natural -> Bool #

ToJSON () 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: () -> Value #

toEncoding :: () -> Encoding #

toJSONList :: [()] -> Value #

toEncodingList :: [()] -> Encoding #

omitField :: () -> Bool #

ToJSON Bool 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Bool -> Value #

toEncoding :: Bool -> Encoding #

toJSONList :: [Bool] -> Value #

toEncodingList :: [Bool] -> Encoding #

omitField :: Bool -> Bool #

ToJSON Char 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Char -> Value #

toEncoding :: Char -> Encoding #

toJSONList :: [Char] -> Value #

toEncodingList :: [Char] -> Encoding #

omitField :: Char -> Bool #

ToJSON Double 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Double -> Value #

toEncoding :: Double -> Encoding #

toJSONList :: [Double] -> Value #

toEncodingList :: [Double] -> Encoding #

omitField :: Double -> Bool #

ToJSON Float 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Float -> Value #

toEncoding :: Float -> Encoding #

toJSONList :: [Float] -> Value #

toEncodingList :: [Float] -> Encoding #

omitField :: Float -> Bool #

ToJSON Int 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Int -> Value #

toEncoding :: Int -> Encoding #

toJSONList :: [Int] -> Value #

toEncodingList :: [Int] -> Encoding #

omitField :: Int -> Bool #

ToJSON Word 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Word -> Value #

toEncoding :: Word -> Encoding #

toJSONList :: [Word] -> Value #

toEncodingList :: [Word] -> Encoding #

omitField :: Word -> Bool #

ToJSON v => ToJSON (KeyMap v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: KeyMap v -> Value #

toEncoding :: KeyMap v -> Encoding #

toJSONList :: [KeyMap v] -> Value #

toEncodingList :: [KeyMap v] -> Encoding #

omitField :: KeyMap v -> Bool #

ToJSON a => ToJSON (Identity a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Identity a -> Value #

toEncoding :: Identity a -> Encoding #

toJSONList :: [Identity a] -> Value #

toEncodingList :: [Identity a] -> Encoding #

omitField :: Identity a -> Bool #

ToJSON a => ToJSON (First a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: First a -> Value #

toEncoding :: First a -> Encoding #

toJSONList :: [First a] -> Value #

toEncodingList :: [First a] -> Encoding #

omitField :: First a -> Bool #

ToJSON a => ToJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Last a -> Value #

toEncoding :: Last a -> Encoding #

toJSONList :: [Last a] -> Value #

toEncodingList :: [Last a] -> Encoding #

omitField :: Last a -> Bool #

ToJSON a => ToJSON (Down a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Down a -> Value #

toEncoding :: Down a -> Encoding #

toJSONList :: [Down a] -> Value #

toEncodingList :: [Down a] -> Encoding #

omitField :: Down a -> Bool #

ToJSON a => ToJSON (First a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: First a -> Value #

toEncoding :: First a -> Encoding #

toJSONList :: [First a] -> Value #

toEncodingList :: [First a] -> Encoding #

omitField :: First a -> Bool #

ToJSON a => ToJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Last a -> Value #

toEncoding :: Last a -> Encoding #

toJSONList :: [Last a] -> Value #

toEncodingList :: [Last a] -> Encoding #

omitField :: Last a -> Bool #

ToJSON a => ToJSON (Max a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Max a -> Value #

toEncoding :: Max a -> Encoding #

toJSONList :: [Max a] -> Value #

toEncodingList :: [Max a] -> Encoding #

omitField :: Max a -> Bool #

ToJSON a => ToJSON (Min a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Min a -> Value #

toEncoding :: Min a -> Encoding #

toJSONList :: [Min a] -> Value #

toEncodingList :: [Min a] -> Encoding #

omitField :: Min a -> Bool #

ToJSON a => ToJSON (WrappedMonoid a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: WrappedMonoid a -> Value #

toEncoding :: WrappedMonoid a -> Encoding #

toJSONList :: [WrappedMonoid a] -> Value #

toEncodingList :: [WrappedMonoid a] -> Encoding #

omitField :: WrappedMonoid a -> Bool #

ToJSON a => ToJSON (Dual a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Dual a -> Value #

toEncoding :: Dual a -> Encoding #

toJSONList :: [Dual a] -> Value #

toEncodingList :: [Dual a] -> Encoding #

omitField :: Dual a -> Bool #

ToJSON a => ToJSON (NonEmpty a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: NonEmpty a -> Value #

toEncoding :: NonEmpty a -> Encoding #

toJSONList :: [NonEmpty a] -> Value #

toEncodingList :: [NonEmpty a] -> Encoding #

omitField :: NonEmpty a -> Bool #

(Generic a, GToJSON' Value Zero (Rep a), GToJSON' Encoding Zero (Rep a)) => ToJSON (Generically a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Generically a -> Value #

toEncoding :: Generically a -> Encoding #

toJSONList :: [Generically a] -> Value #

toEncodingList :: [Generically a] -> Encoding #

omitField :: Generically a -> Bool #

(ToJSON a, Integral a) => ToJSON (Ratio a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Ratio a -> Value #

toEncoding :: Ratio a -> Encoding #

toJSONList :: [Ratio a] -> Value #

toEncodingList :: [Ratio a] -> Encoding #

omitField :: Ratio a -> Bool #

ToJSON a => ToJSON (IntMap a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: IntMap a -> Value #

toEncoding :: IntMap a -> Encoding #

toJSONList :: [IntMap a] -> Value #

toEncodingList :: [IntMap a] -> Encoding #

omitField :: IntMap a -> Bool #

ToJSON a => ToJSON (Seq a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Seq a -> Value #

toEncoding :: Seq a -> Encoding #

toJSONList :: [Seq a] -> Value #

toEncodingList :: [Seq a] -> Encoding #

omitField :: Seq a -> Bool #

ToJSON a => ToJSON (Set a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Set a -> Value #

toEncoding :: Set a -> Encoding #

toJSONList :: [Set a] -> Value #

toEncodingList :: [Set a] -> Encoding #

omitField :: Set a -> Bool #

ToJSON v => ToJSON (Tree v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Tree v -> Value #

toEncoding :: Tree v -> Encoding #

toJSONList :: [Tree v] -> Value #

toEncodingList :: [Tree v] -> Encoding #

omitField :: Tree v -> Bool #

ToJSON1 f => ToJSON (Fix f) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Fix f -> Value #

toEncoding :: Fix f -> Encoding #

toJSONList :: [Fix f] -> Value #

toEncodingList :: [Fix f] -> Encoding #

omitField :: Fix f -> Bool #

(ToJSON1 f, Functor f) => ToJSON (Mu f) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Mu f -> Value #

toEncoding :: Mu f -> Encoding #

toJSONList :: [Mu f] -> Value #

toEncodingList :: [Mu f] -> Encoding #

omitField :: Mu f -> Bool #

(ToJSON1 f, Functor f) => ToJSON (Nu f) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Nu f -> Value #

toEncoding :: Nu f -> Encoding #

toJSONList :: [Nu f] -> Value #

toEncodingList :: [Nu f] -> Encoding #

omitField :: Nu f -> Bool #

ToJSON a => ToJSON (DNonEmpty a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: DNonEmpty a -> Value #

toEncoding :: DNonEmpty a -> Encoding #

toJSONList :: [DNonEmpty a] -> Value #

toEncodingList :: [DNonEmpty a] -> Encoding #

omitField :: DNonEmpty a -> Bool #

ToJSON a => ToJSON (DList a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: DList a -> Value #

toEncoding :: DList a -> Encoding #

toJSONList :: [DList a] -> Value #

toEncodingList :: [DList a] -> Encoding #

omitField :: DList a -> Bool #

ToJSON a => ToJSON (ReasonablySized a) Source # 
Instance details

Defined in Hydra.Prelude

Methods

toJSON :: ReasonablySized a -> Value #

toEncoding :: ReasonablySized a -> Encoding #

toJSONList :: [ReasonablySized a] -> Value #

toEncodingList :: [ReasonablySized a] -> Encoding #

omitField :: ReasonablySized a -> Bool #

ToJSON a => ToJSON (Array a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Array a -> Value #

toEncoding :: Array a -> Encoding #

toJSONList :: [Array a] -> Value #

toEncodingList :: [Array a] -> Encoding #

omitField :: Array a -> Bool #

(Prim a, ToJSON a) => ToJSON (PrimArray a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: PrimArray a -> Value #

toEncoding :: PrimArray a -> Encoding #

toJSONList :: [PrimArray a] -> Value #

toEncodingList :: [PrimArray a] -> Encoding #

omitField :: PrimArray a -> Bool #

ToJSON a => ToJSON (SmallArray a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: SmallArray a -> Value #

toEncoding :: SmallArray a -> Encoding #

toJSONList :: [SmallArray a] -> Value #

toEncodingList :: [SmallArray a] -> Encoding #

omitField :: SmallArray a -> Bool #

ToJSON a => ToJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Maybe a -> Value #

toEncoding :: Maybe a -> Encoding #

toJSONList :: [Maybe a] -> Value #

toEncodingList :: [Maybe a] -> Encoding #

omitField :: Maybe a -> Bool #

ToJSON a => ToJSON (HashSet a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: HashSet a -> Value #

toEncoding :: HashSet a -> Encoding #

toJSONList :: [HashSet a] -> Value #

toEncodingList :: [HashSet a] -> Encoding #

omitField :: HashSet a -> Bool #

ToJSON a => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Vector a -> Value #

toEncoding :: Vector a -> Encoding #

toJSONList :: [Vector a] -> Value #

toEncodingList :: [Vector a] -> Encoding #

omitField :: Vector a -> Bool #

(Prim a, ToJSON a) => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Vector a -> Value #

toEncoding :: Vector a -> Encoding #

toJSONList :: [Vector a] -> Value #

toEncodingList :: [Vector a] -> Encoding #

omitField :: Vector a -> Bool #

(Storable a, ToJSON a) => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Vector a -> Value #

toEncoding :: Vector a -> Encoding #

toJSONList :: [Vector a] -> Value #

toEncodingList :: [Vector a] -> Encoding #

omitField :: Vector a -> Bool #

(Vector Vector a, ToJSON a) => ToJSON (Vector a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Vector a -> Value #

toEncoding :: Vector a -> Encoding #

toJSONList :: [Vector a] -> Value #

toEncodingList :: [Vector a] -> Encoding #

omitField :: Vector a -> Bool #

ToJSON a => ToJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Maybe a -> Value #

toEncoding :: Maybe a -> Encoding #

toJSONList :: [Maybe a] -> Value #

toEncodingList :: [Maybe a] -> Encoding #

omitField :: Maybe a -> Bool #

ToJSON a => ToJSON (a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a) -> Value #

toEncoding :: (a) -> Encoding #

toJSONList :: [(a)] -> Value #

toEncodingList :: [(a)] -> Encoding #

omitField :: (a) -> Bool #

ToJSON a => ToJSON [a] 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: [a] -> Value #

toEncoding :: [a] -> Encoding #

toJSONList :: [[a]] -> Value #

toEncodingList :: [[a]] -> Encoding #

omitField :: [a] -> Bool #

(ToJSON a, ToJSON b) => ToJSON (Either a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Either a b -> Value #

toEncoding :: Either a b -> Encoding #

toJSONList :: [Either a b] -> Value #

toEncodingList :: [Either a b] -> Encoding #

omitField :: Either a b -> Bool #

HasResolution a => ToJSON (Fixed a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Fixed a -> Value #

toEncoding :: Fixed a -> Encoding #

toJSONList :: [Fixed a] -> Value #

toEncodingList :: [Fixed a] -> Encoding #

omitField :: Fixed a -> Bool #

ToJSON (Proxy a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Proxy a -> Value #

toEncoding :: Proxy a -> Encoding #

toJSONList :: [Proxy a] -> Value #

toEncodingList :: [Proxy a] -> Encoding #

omitField :: Proxy a -> Bool #

(ToJSON v, ToJSONKey k) => ToJSON (Map k v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Map k v -> Value #

toEncoding :: Map k v -> Encoding #

toJSONList :: [Map k v] -> Value #

toEncodingList :: [Map k v] -> Encoding #

omitField :: Map k v -> Bool #

(ToJSON a, ToJSON b) => ToJSON (Either a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Either a b -> Value #

toEncoding :: Either a b -> Encoding #

toJSONList :: [Either a b] -> Value #

toEncodingList :: [Either a b] -> Encoding #

omitField :: Either a b -> Bool #

(ToJSON a, ToJSON b) => ToJSON (These a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: These a b -> Value #

toEncoding :: These a b -> Encoding #

toJSONList :: [These a b] -> Value #

toEncodingList :: [These a b] -> Encoding #

omitField :: These a b -> Bool #

(ToJSON a, ToJSON b) => ToJSON (Pair a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Pair a b -> Value #

toEncoding :: Pair a b -> Encoding #

toJSONList :: [Pair a b] -> Value #

toEncodingList :: [Pair a b] -> Encoding #

omitField :: Pair a b -> Bool #

(ToJSON a, ToJSON b) => ToJSON (These a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: These a b -> Value #

toEncoding :: These a b -> Encoding #

toJSONList :: [These a b] -> Value #

toEncodingList :: [These a b] -> Encoding #

omitField :: These a b -> Bool #

(ToJSON v, ToJSONKey k) => ToJSON (HashMap k v) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: HashMap k v -> Value #

toEncoding :: HashMap k v -> Encoding #

toJSONList :: [HashMap k v] -> Value #

toEncodingList :: [HashMap k v] -> Encoding #

omitField :: HashMap k v -> Bool #

(ToJSON a, ToJSON b) => ToJSON (a, b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b) -> Value #

toEncoding :: (a, b) -> Encoding #

toJSONList :: [(a, b)] -> Value #

toEncodingList :: [(a, b)] -> Encoding #

omitField :: (a, b) -> Bool #

ToJSON a => ToJSON (Const a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Const a b -> Value #

toEncoding :: Const a b -> Encoding #

toJSONList :: [Const a b] -> Value #

toEncodingList :: [Const a b] -> Encoding #

omitField :: Const a b -> Bool #

ToJSON b => ToJSON (Tagged a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Tagged a b -> Value #

toEncoding :: Tagged a b -> Encoding #

toJSONList :: [Tagged a b] -> Value #

toEncodingList :: [Tagged a b] -> Encoding #

omitField :: Tagged a b -> Bool #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (These1 f g a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: These1 f g a -> Value #

toEncoding :: These1 f g a -> Encoding #

toJSONList :: [These1 f g a] -> Value #

toEncodingList :: [These1 f g a] -> Encoding #

omitField :: These1 f g a -> Bool #

(ToJSON a, ToJSON b, ToJSON c) => ToJSON (a, b, c) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c) -> Value #

toEncoding :: (a, b, c) -> Encoding #

toJSONList :: [(a, b, c)] -> Value #

toEncodingList :: [(a, b, c)] -> Encoding #

omitField :: (a, b, c) -> Bool #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Product f g a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Product f g a -> Value #

toEncoding :: Product f g a -> Encoding #

toJSONList :: [Product f g a] -> Value #

toEncodingList :: [Product f g a] -> Encoding #

omitField :: Product f g a -> Bool #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Sum f g a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Sum f g a -> Value #

toEncoding :: Sum f g a -> Encoding #

toJSONList :: [Sum f g a] -> Value #

toEncodingList :: [Sum f g a] -> Encoding #

omitField :: Sum f g a -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON (a, b, c, d) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d) -> Value #

toEncoding :: (a, b, c, d) -> Encoding #

toJSONList :: [(a, b, c, d)] -> Value #

toEncodingList :: [(a, b, c, d)] -> Encoding #

omitField :: (a, b, c, d) -> Bool #

(ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON (Compose f g a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Compose f g a -> Value #

toEncoding :: Compose f g a -> Encoding #

toJSONList :: [Compose f g a] -> Value #

toEncodingList :: [Compose f g a] -> Encoding #

omitField :: Compose f g a -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON (a, b, c, d, e) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e) -> Value #

toEncoding :: (a, b, c, d, e) -> Encoding #

toJSONList :: [(a, b, c, d, e)] -> Value #

toEncodingList :: [(a, b, c, d, e)] -> Encoding #

omitField :: (a, b, c, d, e) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON (a, b, c, d, e, f) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f) -> Value #

toEncoding :: (a, b, c, d, e, f) -> Encoding #

toJSONList :: [(a, b, c, d, e, f)] -> Value #

toEncodingList :: [(a, b, c, d, e, f)] -> Encoding #

omitField :: (a, b, c, d, e, f) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) => ToJSON (a, b, c, d, e, f, g) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g) -> Value #

toEncoding :: (a, b, c, d, e, f, g) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g)] -> Encoding #

omitField :: (a, b, c, d, e, f, g) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) => ToJSON (a, b, c, d, e, f, g, h) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) => ToJSON (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) => ToJSON (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) => ToJSON (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n, ToJSON o) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Value #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Encoding #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> Value #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> Encoding #

omitField :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

data Gen a #

Instances

Instances details
MonadFix Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

mfix :: (a -> Gen a) -> Gen a Source #

Applicative Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

pure :: a -> Gen a Source #

(<*>) :: Gen (a -> b) -> Gen a -> Gen b Source #

liftA2 :: (a -> b -> c) -> Gen a -> Gen b -> Gen c Source #

(*>) :: Gen a -> Gen b -> Gen b Source #

(<*) :: Gen a -> Gen b -> Gen a Source #

Functor Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

fmap :: (a -> b) -> Gen a -> Gen b Source #

(<$) :: a -> Gen b -> Gen a Source #

Monad Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

(>>=) :: Gen a -> (a -> Gen b) -> Gen b Source #

(>>) :: Gen a -> Gen b -> Gen b Source #

return :: a -> Gen a Source #

Arbitrary a => TypeLevelGenList (Gen a :: Type) 
Instance details

Defined in Generic.Random.DerivingVia

Associated Types

type TypeLevelGenList' (Gen a)

Methods

toGenList :: Proxy (Gen a) -> TypeLevelGenList' (Gen a)

FindGen ('Match 'INCOHERENT) s (Gen a) gs a 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

findGen :: (Proxy ('Match 'INCOHERENT), Proxy s, FullGenListOf s) -> Gen a -> gs -> Gen a

a ~ a' => FindGen ('MatchCoh 'True) s (Gen a) gs a' 
Instance details

Defined in Generic.Random.Internal.Generic

Methods

findGen :: (Proxy ('MatchCoh 'True), Proxy s, FullGenListOf s) -> Gen a -> gs -> Gen a'

type TypeLevelGenList' (Gen a :: Type) 
Instance details

Defined in Generic.Random.DerivingVia

type TypeLevelGenList' (Gen a :: Type) = Gen a

class Arbitrary a where #

Minimal complete definition

arbitrary

Methods

arbitrary :: Gen a #

shrink :: a -> [a] #

Instances

Instances details
Arbitrary QCGen 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen QCGen #

shrink :: QCGen -> [QCGen] #

Arbitrary Key 
Instance details

Defined in Data.Aeson.Key

Methods

arbitrary :: Gen Key #

shrink :: Key -> [Key] #

Arbitrary Value 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

arbitrary :: Gen Value #

shrink :: Value -> [Value] #

Arbitrary All 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen All #

shrink :: All -> [All] #

Arbitrary Any 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Any #

shrink :: Any -> [Any] #

Arbitrary Version 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CChar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen CChar #

shrink :: CChar -> [CChar] #

Arbitrary CClock 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CDouble 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CFloat 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CInt 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen CInt #

shrink :: CInt -> [CInt] #

Arbitrary CIntMax 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CIntPtr 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CLLong 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CLong 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen CLong #

shrink :: CLong -> [CLong] #

Arbitrary CPtrdiff 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CSChar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CSUSeconds 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CShort 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CSigAtomic 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CSize 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen CSize #

shrink :: CSize -> [CSize] #

Arbitrary CTime 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen CTime #

shrink :: CTime -> [CTime] #

Arbitrary CUChar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CUInt 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen CUInt #

shrink :: CUInt -> [CUInt] #

Arbitrary CUIntMax 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CUIntPtr 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CULLong 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CULong 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CUSeconds 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CUShort 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary CWchar 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary ExitCode 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Newline 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary NewlineMode 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Int16 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int16 #

shrink :: Int16 -> [Int16] #

Arbitrary Int32 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int32 #

shrink :: Int32 -> [Int32] #

Arbitrary Int64 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int64 #

shrink :: Int64 -> [Int64] #

Arbitrary Int8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int8 #

shrink :: Int8 -> [Int8] #

Arbitrary Word16 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Word32 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Word64 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Word8 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Word8 #

shrink :: Word8 -> [Word8] #

Arbitrary IntSet 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Ordering 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Integer 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary () 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen () #

shrink :: () -> [()] #

Arbitrary Bool 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Bool #

shrink :: Bool -> [Bool] #

Arbitrary Char 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Char #

shrink :: Char -> [Char] #

Arbitrary Double 
Instance details

Defined in Test.QuickCheck.Arbitrary

Arbitrary Float 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Float #

shrink :: Float -> [Float] #

Arbitrary Int 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Int #

shrink :: Int -> [Int] #

Arbitrary Word 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Word #

shrink :: Word -> [Word] #

Arbitrary v => Arbitrary (KeyMap v) 
Instance details

Defined in Data.Aeson.KeyMap

Methods

arbitrary :: Gen (KeyMap v) #

shrink :: KeyMap v -> [KeyMap v] #

Arbitrary a => Arbitrary (ZipList a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (ZipList a) #

shrink :: ZipList a -> [ZipList a] #

Arbitrary a => Arbitrary (Complex a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Complex a) #

shrink :: Complex a -> [Complex a] #

Arbitrary a => Arbitrary (Identity a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Identity a) #

shrink :: Identity a -> [Identity a] #

Arbitrary a => Arbitrary (First a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (First a) #

shrink :: First a -> [First a] #

Arbitrary a => Arbitrary (Last a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Last a) #

shrink :: Last a -> [Last a] #

Arbitrary a => Arbitrary (Dual a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Dual a) #

shrink :: Dual a -> [Dual a] #

(Arbitrary a, CoArbitrary a) => Arbitrary (Endo a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Endo a) #

shrink :: Endo a -> [Endo a] #

Arbitrary a => Arbitrary (Product a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Product a) #

shrink :: Product a -> [Product a] #

Arbitrary a => Arbitrary (Sum a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Sum a) #

shrink :: Sum a -> [Sum a] #

Integral a => Arbitrary (Ratio a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Ratio a) #

shrink :: Ratio a -> [Ratio a] #

Arbitrary a => Arbitrary (IntMap a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (IntMap a) #

shrink :: IntMap a -> [IntMap a] #

Arbitrary a => Arbitrary (Seq a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Seq a) #

shrink :: Seq a -> [Seq a] #

(Ord a, Arbitrary a) => Arbitrary (Set a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Set a) #

shrink :: Set a -> [Set a] #

Arbitrary a => Arbitrary (Tree a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Tree a) #

shrink :: Tree a -> [Tree a] #

(GArbitrary UnsizedOpts a, Weights_ (Rep a) ~ L c0) => Arbitrary (GenericArbitrarySingle a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (GenericArbitrarySingle a) #

shrink :: GenericArbitrarySingle a -> [GenericArbitrarySingle a] #

(GArbitrary UnsizedOpts a, GUniformWeight a) => Arbitrary (GenericArbitraryU a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (GenericArbitraryU a) #

shrink :: GenericArbitraryU a -> [GenericArbitraryU a] #

Arbitrary a => Arbitrary (ReasonablySized a) Source # 
Instance details

Defined in Hydra.Prelude

Arbitrary a => Arbitrary (Maybe a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Maybe a) #

shrink :: Maybe a -> [Maybe a] #

Arbitrary a => Arbitrary [a] 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen [a] #

shrink :: [a] -> [[a]] #

Arbitrary (m a) => Arbitrary (WrappedMonad m a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (WrappedMonad m a) #

shrink :: WrappedMonad m a -> [WrappedMonad m a] #

(Arbitrary a, Arbitrary b) => Arbitrary (Either a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Either a b) #

shrink :: Either a b -> [Either a b] #

HasResolution a => Arbitrary (Fixed a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Fixed a) #

shrink :: Fixed a -> [Fixed a] #

(Ord k, Arbitrary k, Arbitrary v) => Arbitrary (Map k v) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Map k v) #

shrink :: Map k v -> [Map k v] #

(Arbitrary a, Arbitrary b) => Arbitrary (a, b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a, b) #

shrink :: (a, b) -> [(a, b)] #

(CoArbitrary a, Arbitrary b) => Arbitrary (a -> b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a -> b) #

shrink :: (a -> b) -> [a -> b] #

Arbitrary (a b c) => Arbitrary (WrappedArrow a b c) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (WrappedArrow a b c) #

shrink :: WrappedArrow a b c -> [WrappedArrow a b c] #

Arbitrary a => Arbitrary (Const a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Const a b) #

shrink :: Const a b -> [Const a b] #

Arbitrary (f a) => Arbitrary (Alt f a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Alt f a) #

shrink :: Alt f a -> [Alt f a] #

(Arbitrary (f a), Coercible (f a) a, Generic a, RecursivelyShrink (Rep a), GSubterms (Rep a) a) => Arbitrary (AndShrinking f a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (AndShrinking f a) #

shrink :: AndShrinking f a -> [AndShrinking f a] #

(GArbitrary UnsizedOpts a, TypeLevelWeights' weights a) => Arbitrary (GenericArbitrary weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (GenericArbitrary weights a) #

shrink :: GenericArbitrary weights a -> [GenericArbitrary weights a] #

(GArbitrary SizedOptsDef a, TypeLevelWeights' weights a) => Arbitrary (GenericArbitraryRec weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (GenericArbitraryRec weights a) #

shrink :: GenericArbitraryRec weights a -> [GenericArbitraryRec weights a] #

(GArbitrary (SetGens genList UnsizedOpts) a, Weights_ (Rep a) ~ L c0, TypeLevelGenList genList', genList ~ TypeLevelGenList' genList') => Arbitrary (GenericArbitrarySingleG genList' a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (GenericArbitrarySingleG genList' a) #

shrink :: GenericArbitrarySingleG genList' a -> [GenericArbitrarySingleG genList' a] #

(GArbitrary (SetGens genList UnsizedOpts) a, GUniformWeight a, TypeLevelGenList genList', genList ~ TypeLevelGenList' genList') => Arbitrary (GenericArbitraryUG genList' a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (GenericArbitraryUG genList' a) #

shrink :: GenericArbitraryUG genList' a -> [GenericArbitraryUG genList' a] #

Arbitrary a => Arbitrary (Constant a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Constant a b) #

shrink :: Constant a b -> [Constant a b] #

(Arbitrary a, Arbitrary b, Arbitrary c) => Arbitrary (a, b, c) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a, b, c) #

shrink :: (a, b, c) -> [(a, b, c)] #

(Arbitrary1 f, Arbitrary1 g, Arbitrary a) => Arbitrary (Product f g a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Product f g a) #

shrink :: Product f g a -> [Product f g a] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d) => Arbitrary (a, b, c, d) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a, b, c, d) #

shrink :: (a, b, c, d) -> [(a, b, c, d)] #

(Arbitrary1 f, Arbitrary1 g, Arbitrary a) => Arbitrary (Compose f g a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Compose f g a) #

shrink :: Compose f g a -> [Compose f g a] #

(GArbitrary (SetGens genList UnsizedOpts) a, GUniformWeight a, TypeLevelWeights' weights a, TypeLevelGenList genList', genList ~ TypeLevelGenList' genList') => Arbitrary (GenericArbitraryG genList' weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (GenericArbitraryG genList' weights a) #

shrink :: GenericArbitraryG genList' weights a -> [GenericArbitraryG genList' weights a] #

(GArbitrary (SetGens genList SizedOpts) a, TypeLevelWeights' weights a, TypeLevelGenList genList', genList ~ TypeLevelGenList' genList') => Arbitrary (GenericArbitraryRecG genList' weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (GenericArbitraryRecG genList' weights a) #

shrink :: GenericArbitraryRecG genList' weights a -> [GenericArbitraryRecG genList' weights a] #

(GArbitrary opts a, TypeLevelWeights' weights a, TypeLevelOpts opts', opts ~ TypeLevelOpts' opts') => Arbitrary (GenericArbitraryWith opts' weights a) 
Instance details

Defined in Generic.Random.DerivingVia

Methods

arbitrary :: Gen (GenericArbitraryWith opts' weights a) #

shrink :: GenericArbitraryWith opts' weights a -> [GenericArbitraryWith opts' weights a] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e) => Arbitrary (a, b, c, d, e) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a, b, c, d, e) #

shrink :: (a, b, c, d, e) -> [(a, b, c, d, e)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f) => Arbitrary (a, b, c, d, e, f) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a, b, c, d, e, f) #

shrink :: (a, b, c, d, e, f) -> [(a, b, c, d, e, f)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g) => Arbitrary (a, b, c, d, e, f, g) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a, b, c, d, e, f, g) #

shrink :: (a, b, c, d, e, f, g) -> [(a, b, c, d, e, f, g)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h) => Arbitrary (a, b, c, d, e, f, g, h) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a, b, c, d, e, f, g, h) #

shrink :: (a, b, c, d, e, f, g, h) -> [(a, b, c, d, e, f, g, h)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h, Arbitrary i) => Arbitrary (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a, b, c, d, e, f, g, h, i) #

shrink :: (a, b, c, d, e, f, g, h, i) -> [(a, b, c, d, e, f, g, h, i)] #

(Arbitrary a, Arbitrary b, Arbitrary c, Arbitrary d, Arbitrary e, Arbitrary f, Arbitrary g, Arbitrary h, Arbitrary i, Arbitrary j) => Arbitrary (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (a, b, c, d, e, f, g, h, i, j) #

shrink :: (a, b, c, d, e, f, g, h, i, j) -> [(a, b, c, d, e, f, g, h, i, j)] #

genericArbitrary :: (Generic a, GA UnsizedOpts (Rep a), UniformWeight (Weights_ (Rep a))) => Gen a Source #

Provides a sensible way of automatically deriving generic Arbitrary instances for data-types. In the case where more advanced or tailored generators are needed, custom hand-written generators should be used with functions such as forAll or forAllShrink.

genericShrink :: (Generic a, RecursivelyShrink (Rep a), GSubterms (Rep a) a) => a -> [a] #

generateWith :: Gen a -> Int -> a Source #

A seeded, deterministic, generator

shrinkListAggressively :: [a] -> [[a]] Source #

Like shrinkList, but more aggressive :)

Useful for shrinking large nested Map or Lists where the shrinker "don't have time" to go through many cases.

reasonablySized :: Gen a -> Gen a Source #

Resize a generator to grow with the size parameter, but remains reasonably sized. That is handy when testing on data-structures that can be arbitrarily large and, when large entities don't really bring any value to the test itself.

It uses a square root function which makes the size parameter grows quadratically slower than normal. That is,

Normal Size ----------- 0 1 10 100 1000Reasonable Size ---------------- 0 1 3 10 31

newtype ReasonablySized a Source #

A QuickCheck modifier to make use of reasonablySized on existing types.

Constructors

ReasonablySized a 

Instances

Instances details
Arbitrary a => Arbitrary (ReasonablySized a) Source # 
Instance details

Defined in Hydra.Prelude

FromJSON a => FromJSON (ReasonablySized a) Source # 
Instance details

Defined in Hydra.Prelude

Methods

parseJSON :: Value -> Parser (ReasonablySized a) #

parseJSONList :: Value -> Parser [ReasonablySized a] #

omittedField :: Maybe (ReasonablySized a) #

ToJSON a => ToJSON (ReasonablySized a) Source # 
Instance details

Defined in Hydra.Prelude

Methods

toJSON :: ReasonablySized a -> Value #

toEncoding :: ReasonablySized a -> Encoding #

toJSONList :: [ReasonablySized a] -> Value #

toEncodingList :: [ReasonablySized a] -> Encoding #

omitField :: ReasonablySized a -> Bool #

Show a => Show (ReasonablySized a) Source # 
Instance details

Defined in Hydra.Prelude

padLeft :: Char -> Int -> Text -> Text Source #

Pad a text-string to left with the given character until it reaches the given length.

NOTE: Truncate the string if longer than the given length.

padRight :: Char -> Int -> Text -> Text Source #

Pad a text-string to right with the given character until it reaches the given length.

NOTE: Truncate the string if longer than the given length.

type Except e = ExceptT e Identity Source #

The parameterizable exception monad.

Computations are either exceptions or normal values.

The return function returns a normal value, while >>= exits on the first exception. For a variant that continues after an error and collects all the errors, see Errors.

decodeBase16 :: MonadFail f => Text -> f ByteString Source #

Decode some hex-encoded text string to raw bytes.

>>> decodeBase16 "dflkgjdjgdh"
Left "Not base 16"

(?>) :: Maybe a -> e -> Either e a infixl 4 Source #

If Nothing use given e as Left. Infix version of maybeToEither.

withFile :: FilePath -> IOMode -> (Handle -> IO a) -> IO a Source #

Like withFile from base, but without annotating errors originating from enclosed action.

XXX: This should be fixed upstream in base.