mixed-types-num-0.5.11: Alternative Prelude with numeric and logic expressions typed bottom-up
Copyright(c) Michal Konecny
LicenseBSD3
Maintainermikkonecny@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numeric.MixedTypes.PreludeHiding

Description

Prelude without operations that clash with MixedTypes

Synopsis

Documentation

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

Append two lists, i.e.,

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

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

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

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

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

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

\(\mathcal{O}(n)\). filter, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e.,

filter p xs = [ x | x <- xs, p x]
>>> filter odd [1, 2, 3]
[1,3]

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

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

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

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

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

zip is right-lazy:

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

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

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

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

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

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

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

Extract the first component of a pair.

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

Extract the second component of a pair.

otherwise :: Bool #

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

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

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

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

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

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

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

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

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

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

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

general coercion from integral types

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

general coercion to fractional types

class Bounded a where #

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

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

Methods

minBound :: a #

maxBound :: a #

Instances

Instances details
Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: Int #

maxBound :: Int #

Bounded Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Bounded VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Bounded ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: () #

maxBound :: () #

Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: All #

maxBound :: All #

Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Any #

maxBound :: Any #

Bounded Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Bounded CChar 
Instance details

Defined in Foreign.C.Types

Bounded CSChar 
Instance details

Defined in Foreign.C.Types

Bounded CUChar 
Instance details

Defined in Foreign.C.Types

Bounded CShort 
Instance details

Defined in Foreign.C.Types

Bounded CUShort 
Instance details

Defined in Foreign.C.Types

Bounded CInt 
Instance details

Defined in Foreign.C.Types

Bounded CUInt 
Instance details

Defined in Foreign.C.Types

Bounded CLong 
Instance details

Defined in Foreign.C.Types

Bounded CULong 
Instance details

Defined in Foreign.C.Types

Bounded CLLong 
Instance details

Defined in Foreign.C.Types

Bounded CULLong 
Instance details

Defined in Foreign.C.Types

Bounded CBool 
Instance details

Defined in Foreign.C.Types

Bounded CPtrdiff 
Instance details

Defined in Foreign.C.Types

Bounded CSize 
Instance details

Defined in Foreign.C.Types

Bounded CWchar 
Instance details

Defined in Foreign.C.Types

Bounded CSigAtomic 
Instance details

Defined in Foreign.C.Types

Bounded CIntPtr 
Instance details

Defined in Foreign.C.Types

Bounded CUIntPtr 
Instance details

Defined in Foreign.C.Types

Bounded CIntMax 
Instance details

Defined in Foreign.C.Types

Bounded CUIntMax 
Instance details

Defined in Foreign.C.Types

Bounded TimeSpec 
Instance details

Defined in System.Clock

Bounded Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Bounded a => Bounded (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Dual a #

maxBound :: Dual a #

Bounded a => Bounded (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Sum a #

maxBound :: Sum a #

Bounded a => Bounded (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

(Num a, Bounded a) => Bounded (Positive a) 
Instance details

Defined in Test.SmallCheck.Series

(Num a, Bounded a) => Bounded (NonNegative a) 
Instance details

Defined in Test.SmallCheck.Series

(Eq a, Num a, Bounded a) => Bounded (NonZero a) 
Instance details

Defined in Test.SmallCheck.Series

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b) #

maxBound :: (a, b) #

Bounded (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

minBound :: Proxy t #

maxBound :: Proxy t #

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b, c) #

maxBound :: (a, b, c) #

Bounded a => Bounded (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

minBound :: Const a b #

maxBound :: Const a b #

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

minBound :: Ap f a #

maxBound :: Ap f a #

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

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound :: a :~: b #

maxBound :: a :~: b #

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

minBound :: a :~~: b #

maxBound :: a :~~: b #

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

class Enum a where #

Class Enum defines operations on sequentially ordered types.

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

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

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

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

Minimal complete definition

toEnum, fromEnum

Methods

succ :: a -> a #

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

pred :: a -> a #

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

toEnum :: Int -> a #

Convert from an Int.

fromEnum :: a -> Int #

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

enumFrom :: a -> [a] #

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

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

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

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

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

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

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

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

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

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

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

Instances

Instances details
Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Bool -> Bool #

pred :: Bool -> Bool #

toEnum :: Int -> Bool #

fromEnum :: Bool -> Int #

enumFrom :: Bool -> [Bool] #

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

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

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

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Char -> Char #

pred :: Char -> Char #

toEnum :: Int -> Char #

fromEnum :: Char -> Int #

enumFrom :: Char -> [Char] #

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

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

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

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Int -> Int #

pred :: Int -> Int #

toEnum :: Int -> Int #

fromEnum :: Int -> Int #

enumFrom :: Int -> [Int] #

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

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

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

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

succ :: Int8 -> Int8 #

pred :: Int8 -> Int8 #

toEnum :: Int -> Int8 #

fromEnum :: Int8 -> Int #

enumFrom :: Int8 -> [Int8] #

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

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

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

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Word -> Word #

pred :: Word -> Word #

toEnum :: Int -> Word #

fromEnum :: Word -> Int #

enumFrom :: Word -> [Word] #

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

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

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

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: () -> () #

pred :: () -> () #

toEnum :: Int -> () #

fromEnum :: () -> Int #

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

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

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

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

Enum Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum CChar 
Instance details

Defined in Foreign.C.Types

Enum CSChar 
Instance details

Defined in Foreign.C.Types

Enum CUChar 
Instance details

Defined in Foreign.C.Types

Enum CShort 
Instance details

Defined in Foreign.C.Types

Enum CUShort 
Instance details

Defined in Foreign.C.Types

Enum CInt 
Instance details

Defined in Foreign.C.Types

Methods

succ :: CInt -> CInt #

pred :: CInt -> CInt #

toEnum :: Int -> CInt #

fromEnum :: CInt -> Int #

enumFrom :: CInt -> [CInt] #

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

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

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

Enum CUInt 
Instance details

Defined in Foreign.C.Types

Enum CLong 
Instance details

Defined in Foreign.C.Types

Enum CULong 
Instance details

Defined in Foreign.C.Types

Enum CLLong 
Instance details

Defined in Foreign.C.Types

Enum CULLong 
Instance details

Defined in Foreign.C.Types

Enum CBool 
Instance details

Defined in Foreign.C.Types

Enum CFloat 
Instance details

Defined in Foreign.C.Types

Enum CDouble 
Instance details

Defined in Foreign.C.Types

Enum CPtrdiff 
Instance details

Defined in Foreign.C.Types

Enum CSize 
Instance details

Defined in Foreign.C.Types

Enum CWchar 
Instance details

Defined in Foreign.C.Types

Enum CSigAtomic 
Instance details

Defined in Foreign.C.Types

Enum CClock 
Instance details

Defined in Foreign.C.Types

Enum CTime 
Instance details

Defined in Foreign.C.Types

Enum CUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CSUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CUIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CIntMax 
Instance details

Defined in Foreign.C.Types

Enum CUIntMax 
Instance details

Defined in Foreign.C.Types

Enum Clock 
Instance details

Defined in System.Clock

Enum TimeSpec 
Instance details

Defined in System.Clock

Enum Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Enum ClosureType 
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Enum THResultType 
Instance details

Defined in GHCi.Message

Enum TestQuality 
Instance details

Defined in Test.SmallCheck.Property

Enum Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

succ :: Day -> Day #

pred :: Day -> Day #

toEnum :: Int -> Day #

fromEnum :: Day -> Int #

enumFrom :: Day -> [Day] #

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

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

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

Integral a => Enum (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

succ :: Ratio a -> Ratio a #

pred :: Ratio a -> Ratio a #

toEnum :: Int -> Ratio a #

fromEnum :: Ratio a -> Int #

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

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

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

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

Enum a => Enum (Blind a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

succ :: Blind a -> Blind a #

pred :: Blind a -> Blind a #

toEnum :: Int -> Blind a #

fromEnum :: Blind a -> Int #

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

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

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

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

Enum a => Enum (Fixed a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

succ :: Fixed a -> Fixed a #

pred :: Fixed a -> Fixed a #

toEnum :: Int -> Fixed a #

fromEnum :: Fixed a -> Int #

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

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

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

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

Enum a => Enum (Positive a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Enum a => Enum (Negative a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Enum a => Enum (NonZero a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

succ :: NonZero a -> NonZero a #

pred :: NonZero a -> NonZero a #

toEnum :: Int -> NonZero a #

fromEnum :: NonZero a -> Int #

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

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

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

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

Enum a => Enum (NonNegative a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Enum a => Enum (NonPositive a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Enum a => Enum (Large a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

succ :: Large a -> Large a #

pred :: Large a -> Large a #

toEnum :: Int -> Large a #

fromEnum :: Large a -> Int #

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

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

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

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

Enum a => Enum (Small a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

succ :: Small a -> Small a #

pred :: Small a -> Small a #

toEnum :: Int -> Small a #

fromEnum :: Small a -> Int #

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

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

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

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

Enum a => Enum (Shrink2 a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

succ :: Shrink2 a -> Shrink2 a #

pred :: Shrink2 a -> Shrink2 a #

toEnum :: Int -> Shrink2 a #

fromEnum :: Shrink2 a -> Int #

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

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

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

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

Enum a => Enum (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Enum a => Enum (Positive a) 
Instance details

Defined in Test.SmallCheck.Series

Enum a => Enum (NonNegative a) 
Instance details

Defined in Test.SmallCheck.Series

Enum a => Enum (NonZero a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

succ :: NonZero a -> NonZero a #

pred :: NonZero a -> NonZero a #

toEnum :: Int -> NonZero a #

fromEnum :: NonZero a -> Int #

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

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

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

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

Enum a => Enum (M a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

succ :: M a -> M a #

pred :: M a -> M a #

toEnum :: Int -> M a #

fromEnum :: M a -> Int #

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

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

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

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

Enum a => Enum (N a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

succ :: N a -> N a #

pred :: N a -> N a #

toEnum :: Int -> N a #

fromEnum :: N a -> Int #

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

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

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

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

Enum (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

succ :: Fixed a -> Fixed a #

pred :: Fixed a -> Fixed a #

toEnum :: Int -> Fixed a #

fromEnum :: Fixed a -> Int #

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

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

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

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

Enum (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

succ :: Proxy s -> Proxy s #

pred :: Proxy s -> Proxy s #

toEnum :: Int -> Proxy s #

fromEnum :: Proxy s -> Int #

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

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

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

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

Enum a => Enum (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

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

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

toEnum :: Int -> Const a b #

fromEnum :: Const a b -> Int #

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

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

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

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

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

toEnum :: Int -> Ap f a #

fromEnum :: Ap f a -> Int #

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

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

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

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

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

toEnum :: Int -> Alt f a #

fromEnum :: Alt f a -> Int #

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

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

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

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

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

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

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

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

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

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

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

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

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

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

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

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

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

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

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

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

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

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

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

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

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

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

Instances of Monad should satisfy the following:

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

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

The above laws imply:

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

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

Minimal complete definition

(>>=)

Methods

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

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

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

do a <- as
   bs a

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

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

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

do as
   bs

return :: a -> m a #

Inject a value into the monadic type.

Instances

Instances details
Monad []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> [a] #

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> Maybe a #

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> IO a #

Monad Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b #

(>>) :: Par1 a -> Par1 b -> Par1 b #

return :: a -> Par1 a #

Monad Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(>>=) :: Q a -> (a -> Q b) -> Q b #

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

return :: a -> Q a #

Monad Rose 
Instance details

Defined in Test.QuickCheck.Property

Methods

(>>=) :: Rose a -> (a -> Rose b) -> Rose b #

(>>) :: Rose a -> Rose b -> Rose b #

return :: a -> Rose a #

Monad Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

(>>=) :: Gen a -> (a -> Gen b) -> Gen b #

(>>) :: Gen a -> Gen b -> Gen b #

return :: a -> Gen a #

Monad Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

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

(>>) :: Complex a -> Complex b -> Complex b #

return :: a -> Complex a #

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

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

(>>) :: Identity a -> Identity b -> Identity b #

return :: a -> Identity a #

Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

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

(>>) :: First a -> First b -> First b #

return :: a -> First a #

Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

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

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

(>>) :: Dual a -> Dual b -> Dual b #

return :: a -> Dual a #

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

return :: a -> Sum a #

Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

(>>) :: Product a -> Product b -> Product b #

return :: a -> Product a #

Monad ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

(>>=) :: ReadPrec a -> (a -> ReadPrec b) -> ReadPrec b #

(>>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

return :: a -> ReadPrec a #

Monad ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

(>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b #

(>>) :: ReadP a -> ReadP b -> ReadP b #

return :: a -> ReadP a #

Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> NonEmpty a #

Monad Tree 
Instance details

Defined in Data.Tree

Methods

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

(>>) :: Tree a -> Tree b -> Tree b #

return :: a -> Tree a #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

return :: a -> Seq a #

Monad PV 
Instance details

Defined in RdrHsSyn

Methods

(>>=) :: PV a -> (a -> PV b) -> PV b #

(>>) :: PV a -> PV b -> PV b #

return :: a -> PV a #

Monad P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

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

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

return :: a -> P a #

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

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

(>>) :: Either e a -> Either e b -> Either e b #

return :: a -> Either e a #

Monad (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: U1 a -> (a -> U1 b) -> U1 b #

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

return :: a -> U1 a #

Monoid a => Monad ((,) a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

Monad m => Monad (WrappedMonad m)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #

(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

return :: a -> WrappedMonad m a #

Monad (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b #

(>>) :: Proxy a -> Proxy b -> Proxy b #

return :: a -> Proxy a #

Monoid es => Monad (CollectErrors es) 
Instance details

Defined in Control.CollectErrors.Type

Methods

(>>=) :: CollectErrors es a -> (a -> CollectErrors es b) -> CollectErrors es b #

(>>) :: CollectErrors es a -> CollectErrors es b -> CollectErrors es b #

return :: a -> CollectErrors es a #

Monad (SpecM a) 
Instance details

Defined in Test.Hspec.Core.Spec.Monad

Methods

(>>=) :: SpecM a a0 -> (a0 -> SpecM a b) -> SpecM a b #

(>>) :: SpecM a a0 -> SpecM a b -> SpecM a b #

return :: a0 -> SpecM a a0 #

Monad (SetM s) 
Instance details

Defined in Data.Graph

Methods

(>>=) :: SetM s a -> (a -> SetM s b) -> SetM s b #

(>>) :: SetM s a -> SetM s b -> SetM s b #

return :: a -> SetM s a #

Monad f => Monad (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Rec1 f a -> (a -> Rec1 f b) -> Rec1 f b #

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

return :: a -> Rec1 f a #

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

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

Monad f => Monad (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

return :: a -> Ap f a #

Monad f => Monad (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

return :: a -> Alt f a #

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

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

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

(>>=) :: WhenMissing f x a -> (a -> WhenMissing f x b) -> WhenMissing f x b #

(>>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

return :: a -> WhenMissing f x a #

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

Defined in Control.Monad.Trans.Error

Methods

(>>=) :: ErrorT e m a -> (a -> ErrorT e m b) -> ErrorT e m b #

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

return :: a -> ErrorT e m a #

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

Defined in Control.Monad.Trans.Reader

Methods

(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b #

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

return :: a -> ReaderT r m a #

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

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

return :: a -> WriterT w m a #

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

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

return :: a -> r -> a #

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

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

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

(>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b #

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

return :: a -> Product f g a #

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

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

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

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

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

return :: a -> WhenMatched f x y a #

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

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

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

return :: a -> WhenMissing f k x a #

Monad f => Monad (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

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

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

return :: a -> WhenMatched f k x y a #

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

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

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

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

Minimal complete definition

fmap

Methods

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

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

do a <- as
   pure (f a)

with an inferred Functor constraint.

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

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

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

do bs
   pure a

with an inferred Functor constraint.

Instances

Instances details
Functor []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Par1 a -> Par1 b #

(<$) :: a -> Par1 b -> Par1 a #

Functor Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Functor Rose 
Instance details

Defined in Test.QuickCheck.Property

Methods

fmap :: (a -> b) -> Rose a -> Rose b #

(<$) :: a -> Rose b -> Rose a #

Functor Blind 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Blind a -> Blind b #

(<$) :: a -> Blind b -> Blind a #

Functor Fixed 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Fixed a -> Fixed b #

(<$) :: a -> Fixed b -> Fixed a #

Functor OrderedList 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> OrderedList a -> OrderedList b #

(<$) :: a -> OrderedList b -> OrderedList a #

Functor NonEmptyList 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> NonEmptyList a -> NonEmptyList b #

(<$) :: a -> NonEmptyList b -> NonEmptyList a #

Functor SortedList 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> SortedList a -> SortedList b #

(<$) :: a -> SortedList b -> SortedList a #

Functor Positive 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Positive a -> Positive b #

(<$) :: a -> Positive b -> Positive a #

Functor Negative 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Negative a -> Negative b #

(<$) :: a -> Negative b -> Negative a #

Functor NonZero 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> NonZero a -> NonZero b #

(<$) :: a -> NonZero b -> NonZero a #

Functor NonNegative 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> NonNegative a -> NonNegative b #

(<$) :: a -> NonNegative b -> NonNegative a #

Functor NonPositive 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> NonPositive a -> NonPositive b #

(<$) :: a -> NonPositive b -> NonPositive a #

Functor Large 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Large a -> Large b #

(<$) :: a -> Large b -> Large a #

Functor Small 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Small a -> Small b #

(<$) :: a -> Small b -> Small a #

Functor Shrink2 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Shrink2 a -> Shrink2 b #

(<$) :: a -> Shrink2 b -> Shrink2 a #

Functor Smart 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Smart a -> Smart b #

(<$) :: a -> Smart b -> Smart a #

Functor Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

fmap :: (a -> b) -> Gen a -> Gen b #

(<$) :: a -> Gen b -> Gen a #

Functor Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

fmap :: (a -> b) -> Complex a -> Complex b #

(<$) :: a -> Complex b -> Complex a #

Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> ZipList a -> ZipList b #

(<$) :: a -> ZipList b -> ZipList a #

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fmap :: (a -> b) -> Identity a -> Identity b #

(<$) :: a -> Identity b -> Identity a #

Functor Handler

Since: base-4.6.0.0

Instance details

Defined in Control.Exception

Methods

fmap :: (a -> b) -> Handler a -> Handler b #

(<$) :: a -> Handler b -> Handler a #

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Last a -> Last b #

(<$) :: a -> Last b -> Last a #

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Dual a -> Dual b #

(<$) :: a -> Dual b -> Dual a #

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Product a -> Product b #

(<$) :: a -> Product b -> Product a #

Functor ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

fmap :: (a -> b) -> ReadPrec a -> ReadPrec b #

(<$) :: a -> ReadPrec b -> ReadPrec a #

Functor ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> ReadP a -> ReadP b #

(<$) :: a -> ReadP b -> ReadP a #

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> NonEmpty a -> NonEmpty b #

(<$) :: a -> NonEmpty b -> NonEmpty a #

Functor IntMap 
Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> IntMap a -> IntMap b #

(<$) :: a -> IntMap b -> IntMap a #

Functor SCC

Since: containers-0.5.4

Instance details

Defined in Data.Graph

Methods

fmap :: (a -> b) -> SCC a -> SCC b #

(<$) :: a -> SCC b -> SCC a #

Functor Tree 
Instance details

Defined in Data.Tree

Methods

fmap :: (a -> b) -> Tree a -> Tree b #

(<$) :: a -> Tree b -> Tree a #

Functor Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Functor FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> FingerTree a -> FingerTree b #

(<$) :: a -> FingerTree b -> FingerTree a #

Functor Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Digit a -> Digit b #

(<$) :: a -> Digit b -> Digit a #

Functor Node 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Node a -> Node b #

(<$) :: a -> Node b -> Node a #

Functor Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Elem a -> Elem b #

(<$) :: a -> Elem b -> Elem a #

Functor ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewL a -> ViewL b #

(<$) :: a -> ViewL b -> ViewL a #

Functor ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewR a -> ViewR b #

(<$) :: a -> ViewR b -> ViewR a #

Functor PV 
Instance details

Defined in RdrHsSyn

Methods

fmap :: (a -> b) -> PV a -> PV b #

(<$) :: a -> PV b -> PV a #

Functor HsMatchContext 
Instance details

Defined in GHC.Hs.Expr

Methods

fmap :: (a -> b) -> HsMatchContext a -> HsMatchContext b #

(<$) :: a -> HsMatchContext b -> HsMatchContext a #

Functor HsStmtContext 
Instance details

Defined in GHC.Hs.Expr

Methods

fmap :: (a -> b) -> HsStmtContext a -> HsStmtContext b #

(<$) :: a -> HsStmtContext b -> HsStmtContext a #

Functor AnnProvenance 
Instance details

Defined in GHC.Hs.Decls

Methods

fmap :: (a -> b) -> AnnProvenance a -> AnnProvenance b #

(<$) :: a -> AnnProvenance b -> AnnProvenance a #

Functor RecordPatSynField 
Instance details

Defined in GHC.Hs.Binds

Functor SizedSeq 
Instance details

Defined in SizedSeq

Methods

fmap :: (a -> b) -> SizedSeq a -> SizedSeq b #

(<$) :: a -> SizedSeq b -> SizedSeq a #

Functor GenClosure 
Instance details

Defined in GHC.Exts.Heap.Closures

Methods

fmap :: (a -> b) -> GenClosure a -> GenClosure b #

(<$) :: a -> GenClosure b -> GenClosure a #

Functor Positive 
Instance details

Defined in Test.SmallCheck.Series

Methods

fmap :: (a -> b) -> Positive a -> Positive b #

(<$) :: a -> Positive b -> Positive a #

Functor NonNegative 
Instance details

Defined in Test.SmallCheck.Series

Methods

fmap :: (a -> b) -> NonNegative a -> NonNegative b #

(<$) :: a -> NonNegative b -> NonNegative a #

Functor NonZero 
Instance details

Defined in Test.SmallCheck.Series

Methods

fmap :: (a -> b) -> NonZero a -> NonZero b #

(<$) :: a -> NonZero b -> NonZero a #

Functor P

Since: base-4.8.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

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

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

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

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

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

Functor (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor ((,) a)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

Functor ((:->) a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

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

Functor (Fun a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

fmap :: (a0 -> b) -> Fun a a0 -> Fun a b #

(<$) :: a0 -> Fun a b -> Fun a a0 #

Functor (Shrinking s) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Shrinking s a -> Shrinking s b #

(<$) :: a -> Shrinking s b -> Shrinking s a #

Monad m => Functor (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

(<$) :: a -> WrappedMonad m b -> WrappedMonad m a #

Functor (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

fmap :: (a -> b) -> Proxy a -> Proxy b #

(<$) :: a -> Proxy b -> Proxy a #

Functor (CollectErrors es) 
Instance details

Defined in Control.CollectErrors.Type

Methods

fmap :: (a -> b) -> CollectErrors es a -> CollectErrors es b #

(<$) :: a -> CollectErrors es b -> CollectErrors es a #

Functor (Map k) 
Instance details

Defined in Data.Map.Internal

Methods

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

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

Functor (HsRecFields p) 
Instance details

Defined in GHC.Hs.Pat

Methods

fmap :: (a -> b) -> HsRecFields p a -> HsRecFields p b #

(<$) :: a -> HsRecFields p b -> HsRecFields p a #

Functor (HsRecField' id) 
Instance details

Defined in GHC.Hs.Pat

Methods

fmap :: (a -> b) -> HsRecField' id a -> HsRecField' id b #

(<$) :: a -> HsRecField' id b -> HsRecField' id a #

Functor (GenLocated l) 
Instance details

Defined in SrcLoc

Methods

fmap :: (a -> b) -> GenLocated l a -> GenLocated l b #

(<$) :: a -> GenLocated l b -> GenLocated l a #

Functor (SpecM a) 
Instance details

Defined in Test.Hspec.Core.Spec.Monad

Methods

fmap :: (a0 -> b) -> SpecM a a0 -> SpecM a b #

(<$) :: a0 -> SpecM a b -> SpecM a a0 #

Functor (Tree c) 
Instance details

Defined in Test.Hspec.Core.Tree

Methods

fmap :: (a -> b) -> Tree c a -> Tree c b #

(<$) :: a -> Tree c b -> Tree c a #

Functor (SetM s) 
Instance details

Defined in Data.Graph

Methods

fmap :: (a -> b) -> SetM s a -> SetM s b #

(<$) :: a -> SetM s b -> SetM s a #

Functor f => Functor (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor (URec 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 #

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

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 #

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

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 #

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

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 #

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

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 #

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

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 #

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

Functor ((,,) a b)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

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

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

Arrow a => Functor (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

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

Functor (Const m :: Type -> Type)

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

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

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

Functor f => Functor (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

Functor f => Functor (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

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

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

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

Defined in Control.Monad.Trans.Error

Methods

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

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

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

Defined in Control.Monad.Trans.Reader

Methods

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

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

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

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

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

Functor (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

fmap :: (a0 -> b) -> Constant a a0 -> Constant a b #

(<$) :: a0 -> Constant a b -> Constant a a0 #

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

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

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

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

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 #

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor ((,,,) a b c)

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

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

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

Functor f => Functor (WhenMatched f x y)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

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

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

Functor f => Functor (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

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

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

class Read a where #

Parsing of Strings, producing values.

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

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

For example, given the declarations

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

the derived instance of Read in Haskell 2010 is equivalent to

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

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

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

          where app_prec = 10
                up_prec = 5

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

The derived instance in GHC is equivalent to

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

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

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

          where app_prec = 10
                up_prec = 5

        readListPrec = readListPrecDefault

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

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

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

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

Minimal complete definition

readsPrec | readPrec

Methods

readsPrec #

Arguments

:: Int

the operator precedence of the enclosing context (a number from 0 to 11). Function application has precedence 10.

-> ReadS a 

attempts to parse a value from the front of the string, returning a list of (parsed value, remaining string) pairs. If there is no successful parse, the returned list is empty.

Derived instances of Read and Show satisfy the following:

That is, readsPrec parses the string produced by showsPrec, and delivers the value that showsPrec started with.

readList :: ReadS [a] #

The method readList is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined Read instance of the Char type, where values of type String should be are expected to use double quotes, rather than square brackets.

Instances

Instances details
Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Read Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word16

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Read ()

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS () #

readList :: ReadS [()] #

readPrec :: ReadPrec () #

readListPrec :: ReadPrec [()] #

Read Version

Since: base-2.1

Instance details

Defined in Data.Version

Read QCGen 
Instance details

Defined in Test.QuickCheck.Random

Methods

readsPrec :: Int -> ReadS QCGen #

readList :: ReadS [QCGen] #

readPrec :: ReadPrec QCGen #

readListPrec :: ReadPrec [QCGen] #

Read Args 
Instance details

Defined in Test.QuickCheck.Test

Read ASCIIString 
Instance details

Defined in Test.QuickCheck.Modifiers

Read UnicodeString 
Instance details

Defined in Test.QuickCheck.Modifiers

Read PrintableString 
Instance details

Defined in Test.QuickCheck.Modifiers

Read Void

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

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Read ExitCode 
Instance details

Defined in GHC.IO.Exception

Read All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Read SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read CChar 
Instance details

Defined in Foreign.C.Types

Read CSChar 
Instance details

Defined in Foreign.C.Types

Read CUChar 
Instance details

Defined in Foreign.C.Types

Read CShort 
Instance details

Defined in Foreign.C.Types

Read CUShort 
Instance details

Defined in Foreign.C.Types

Read CInt 
Instance details

Defined in Foreign.C.Types

Read CUInt 
Instance details

Defined in Foreign.C.Types

Read CLong 
Instance details

Defined in Foreign.C.Types

Read CULong 
Instance details

Defined in Foreign.C.Types

Read CLLong 
Instance details

Defined in Foreign.C.Types

Read CULLong 
Instance details

Defined in Foreign.C.Types

Read CBool 
Instance details

Defined in Foreign.C.Types

Read CFloat 
Instance details

Defined in Foreign.C.Types

Read CDouble 
Instance details

Defined in Foreign.C.Types

Read CPtrdiff 
Instance details

Defined in Foreign.C.Types

Read CSize 
Instance details

Defined in Foreign.C.Types

Read CWchar 
Instance details

Defined in Foreign.C.Types

Read CSigAtomic 
Instance details

Defined in Foreign.C.Types

Read CClock 
Instance details

Defined in Foreign.C.Types

Read CTime 
Instance details

Defined in Foreign.C.Types

Read CUSeconds 
Instance details

Defined in Foreign.C.Types

Read CSUSeconds 
Instance details

Defined in Foreign.C.Types

Read CIntPtr 
Instance details

Defined in Foreign.C.Types

Read CUIntPtr 
Instance details

Defined in Foreign.C.Types

Read CIntMax 
Instance details

Defined in Foreign.C.Types

Read CUIntMax 
Instance details

Defined in Foreign.C.Types

Read Lexeme

Since: base-2.1

Instance details

Defined in GHC.Read

Read GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Read

Read Clock 
Instance details

Defined in System.Clock

Read TimeSpec 
Instance details

Defined in System.Clock

Read IntSet 
Instance details

Defined in Data.IntSet.Internal

Read ConvertError Source # 
Instance details

Defined in Data.Convertible.Base

Read a => Read [a]

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS [a] #

readList :: ReadS [[a]] #

readPrec :: ReadPrec [a] #

readListPrec :: ReadPrec [[a]] #

Read a => Read (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

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

Since: base-2.1

Instance details

Defined in GHC.Read

Read p => Read (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Read a => Read (Fixed a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (OrderedList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (NonEmptyList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (SortedList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (Positive a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (Negative a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (NonZero a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (NonNegative a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (NonPositive a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (Large a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (Small a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (Shrink2 a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Read a => Read (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Read a => Read (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Read a => Read (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Read a => Read (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Read e => Read (IntMap e) 
Instance details

Defined in Data.IntMap.Internal

Read vertex => Read (SCC vertex)

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

readsPrec :: Int -> ReadS (SCC vertex) #

readList :: ReadS [SCC vertex] #

readPrec :: ReadPrec (SCC vertex) #

readListPrec :: ReadPrec [SCC vertex] #

Read a => Read (Tree a) 
Instance details

Defined in Data.Tree

Read a => Read (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Read a => Read (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Read a => Read (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

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

Defined in Data.Set.Internal

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

Since: base-3.0

Instance details

Defined in Data.Either

Read (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Read (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b) #

readList :: ReadS [(a, b)] #

readPrec :: ReadPrec (a, b) #

readListPrec :: ReadPrec [(a, b)] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

HasResolution a => Read (Fixed a)

Since: base-4.3.0.0

Instance details

Defined in Data.Fixed

Read (Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

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

Defined in Data.Map.Internal

Methods

readsPrec :: Int -> ReadS (Map k e) #

readList :: ReadS [Map k e] #

readPrec :: ReadPrec (Map k e) #

readListPrec :: ReadPrec [Map k e] #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (Rec1 f p) #

readList :: ReadS [Rec1 f p] #

readPrec :: ReadPrec (Rec1 f p) #

readListPrec :: ReadPrec [Rec1 f p] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c) #

readList :: ReadS [(a, b, c)] #

readPrec :: ReadPrec (a, b, c) #

readListPrec :: ReadPrec [(a, b, c)] #

Read a => Read (Const a b)

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

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

readsPrec :: Int -> ReadS (Ap f a) #

readList :: ReadS [Ap f a] #

readPrec :: ReadPrec (Ap f a) #

readListPrec :: ReadPrec [Ap f a] #

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

readsPrec :: Int -> ReadS (Alt f a) #

readList :: ReadS [Alt f a] #

readPrec :: ReadPrec (Alt f a) #

readListPrec :: ReadPrec [Alt f a] #

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

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

readsPrec :: Int -> ReadS (a :~: b) #

readList :: ReadS [a :~: b] #

readPrec :: ReadPrec (a :~: b) #

readListPrec :: ReadPrec [a :~: b] #

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

Defined in Control.Monad.Trans.Error

Methods

readsPrec :: Int -> ReadS (ErrorT e m a) #

readList :: ReadS [ErrorT e m a] #

readPrec :: ReadPrec (ErrorT e m a) #

readListPrec :: ReadPrec [ErrorT e m a] #

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

readsPrec :: Int -> ReadS (WriterT w m a) #

readList :: ReadS [WriterT w m a] #

readPrec :: ReadPrec (WriterT w m a) #

readListPrec :: ReadPrec [WriterT w m a] #

Read a => Read (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Read c => Read (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (K1 i c p) #

readList :: ReadS [K1 i c p] #

readPrec :: ReadPrec (K1 i c p) #

readListPrec :: ReadPrec [K1 i c p] #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :+: g) p) #

readList :: ReadS [(f :+: g) p] #

readPrec :: ReadPrec ((f :+: g) p) #

readListPrec :: ReadPrec [(f :+: g) p] #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :*: g) p) #

readList :: ReadS [(f :*: g) p] #

readPrec :: ReadPrec ((f :*: g) p) #

readListPrec :: ReadPrec [(f :*: g) p] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

readPrec :: ReadPrec (a, b, c, d) #

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

readsPrec :: Int -> ReadS (Product f g a) #

readList :: ReadS [Product f g a] #

readPrec :: ReadPrec (Product f g a) #

readListPrec :: ReadPrec [Product f g a] #

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

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

readsPrec :: Int -> ReadS (a :~~: b) #

readList :: ReadS [a :~~: b] #

readPrec :: ReadPrec (a :~~: b) #

readListPrec :: ReadPrec [a :~~: b] #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS (M1 i c f p) #

readList :: ReadS [M1 i c f p] #

readPrec :: ReadPrec (M1 i c f p) #

readListPrec :: ReadPrec [M1 i c f p] #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

readsPrec :: Int -> ReadS ((f :.: g) p) #

readList :: ReadS [(f :.: g) p] #

readPrec :: ReadPrec ((f :.: g) p) #

readListPrec :: ReadPrec [(f :.: g) p] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

readsPrec :: Int -> ReadS (Compose f g a) #

readList :: ReadS [Compose f g a] #

readPrec :: ReadPrec (Compose f g a) #

readListPrec :: ReadPrec [Compose f g a] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i)] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j)] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k)] #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k)] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f, g, h, i, j, k, l) #

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l)] #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l)] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m)] #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m)] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

readList :: ReadS [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] #

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

readListPrec :: ReadPrec [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] #

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

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

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

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

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

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

class (Num a, Ord a) => Real a where #

Methods

toRational :: a -> Rational #

the rational equivalent of its real argument with full precision

Instances

Instances details
Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Int -> Rational #

Real Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int8 -> Rational #

Real Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int16 -> Rational #

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int32 -> Rational #

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int64 -> Rational #

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

toRational :: Word -> Rational #

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

toRational :: Word8 -> Rational #

Real Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Real CChar 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CChar -> Rational #

Real CSChar 
Instance details

Defined in Foreign.C.Types

Real CUChar 
Instance details

Defined in Foreign.C.Types

Real CShort 
Instance details

Defined in Foreign.C.Types

Real CUShort 
Instance details

Defined in Foreign.C.Types

Real CInt 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CInt -> Rational #

Real CUInt 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CUInt -> Rational #

Real CLong 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CLong -> Rational #

Real CULong 
Instance details

Defined in Foreign.C.Types

Real CLLong 
Instance details

Defined in Foreign.C.Types

Real CULLong 
Instance details

Defined in Foreign.C.Types

Real CBool 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CBool -> Rational #

Real CFloat 
Instance details

Defined in Foreign.C.Types

Real CDouble 
Instance details

Defined in Foreign.C.Types

Real CPtrdiff 
Instance details

Defined in Foreign.C.Types

Real CSize 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CSize -> Rational #

Real CWchar 
Instance details

Defined in Foreign.C.Types

Real CSigAtomic 
Instance details

Defined in Foreign.C.Types

Real CClock 
Instance details

Defined in Foreign.C.Types

Real CTime 
Instance details

Defined in Foreign.C.Types

Methods

toRational :: CTime -> Rational #

Real CUSeconds 
Instance details

Defined in Foreign.C.Types

Real CSUSeconds 
Instance details

Defined in Foreign.C.Types

Real CIntPtr 
Instance details

Defined in Foreign.C.Types

Real CUIntPtr 
Instance details

Defined in Foreign.C.Types

Real CIntMax 
Instance details

Defined in Foreign.C.Types

Real CUIntMax 
Instance details

Defined in Foreign.C.Types

Real TimeSpec 
Instance details

Defined in System.Clock

Integral a => Real (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Ratio a -> Rational #

Real a => Real (Blind a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

toRational :: Blind a -> Rational #

Real a => Real (Fixed a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

toRational :: Fixed a -> Rational #

Real a => Real (Large a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

toRational :: Large a -> Rational #

Real a => Real (Small a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

toRational :: Small a -> Rational #

Real a => Real (Shrink2 a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

toRational :: Shrink2 a -> Rational #

Real a => Real (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

toRational :: Identity a -> Rational #

Real a => Real (Positive a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

toRational :: Positive a -> Rational #

Real a => Real (NonNegative a) 
Instance details

Defined in Test.SmallCheck.Series

Real a => Real (NonZero a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

toRational :: NonZero a -> Rational #

Real a => Real (M a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

toRational :: M a -> Rational #

Real a => Real (N a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

toRational :: N a -> Rational #

HasResolution a => Real (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

toRational :: Fixed a -> Rational #

Real a => Real (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

toRational :: Const a b -> Rational #

class (RealFrac a, Floating a) => RealFloat a where #

Efficient, machine-independent access to the components of a floating-point number.

Methods

floatRadix :: a -> Integer #

a constant function, returning the radix of the representation (often 2)

floatDigits :: a -> Int #

a constant function, returning the number of digits of floatRadix in the significand

floatRange :: a -> (Int, Int) #

a constant function, returning the lowest and highest values the exponent may assume

decodeFloat :: a -> (Integer, Int) #

The function decodeFloat applied to a real floating-point number returns the significand expressed as an Integer and an appropriately scaled exponent (an Int). If decodeFloat x yields (m,n), then x is equal in value to m*b^^n, where b is the floating-point radix, and furthermore, either m and n are both zero or else b^(d-1) <= abs m < b^d, where d is the value of floatDigits x. In particular, decodeFloat 0 = (0,0). If the type contains a negative zero, also decodeFloat (-0.0) = (0,0). The result of decodeFloat x is unspecified if either of isNaN x or isInfinite x is True.

encodeFloat :: Integer -> Int -> a #

encodeFloat performs the inverse of decodeFloat in the sense that for finite x with the exception of -0.0, uncurry encodeFloat (decodeFloat x) = x. encodeFloat m n is one of the two closest representable floating-point numbers to m*b^^n (or ±Infinity if overflow occurs); usually the closer, but if m contains too many bits, the result may be rounded in the wrong direction.

exponent :: a -> Int #

exponent corresponds to the second component of decodeFloat. exponent 0 = 0 and for finite nonzero x, exponent x = snd (decodeFloat x) + floatDigits x. If x is a finite floating-point number, it is equal in value to significand x * b ^^ exponent x, where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

significand :: a -> a #

The first component of decodeFloat, scaled to lie in the open interval (-1,1), either 0.0 or of absolute value >= 1/b, where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

scaleFloat :: Int -> a -> a #

multiplies a floating-point number by an integer power of the radix

isDenormalized :: a -> Bool #

True if the argument is too small to be represented in normalized format

isNegativeZero :: a -> Bool #

True if the argument is an IEEE negative zero

isIEEE :: a -> Bool #

True if the argument is an IEEE floating point number

atan2 :: a -> a -> a #

a version of arctangent taking two real floating-point arguments. For real floating x and y, atan2 y x computes the angle (from the positive x-axis) of the vector from the origin to the point (x,y). atan2 y x returns a value in the range [-pi, pi]. It follows the Common Lisp semantics for the origin when signed zeroes are supported. atan2 y 1, with y in a type that is RealFloat, should return the same value as atan y. A default definition of atan2 is provided, but implementors can provide a more accurate implementation.

Instances

Instances details
RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat CFloat 
Instance details

Defined in Foreign.C.Types

RealFloat CDouble 
Instance details

Defined in Foreign.C.Types

RealFloat a => RealFloat (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => RealFloat (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

floatRadix :: Const a b -> Integer #

floatDigits :: Const a b -> Int #

floatRange :: Const a b -> (Int, Int) #

decodeFloat :: Const a b -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Const a b #

exponent :: Const a b -> Int #

significand :: Const a b -> Const a b #

scaleFloat :: Int -> Const a b -> Const a b #

isNaN :: Const a b -> Bool #

isInfinite :: Const a b -> Bool #

isDenormalized :: Const a b -> Bool #

isNegativeZero :: Const a b -> Bool #

isIEEE :: Const a b -> Bool #

atan2 :: Const a b -> Const a b -> Const a b #

class Show a where #

Conversion of values to readable Strings.

Derived instances of Show have the following properties, which are compatible with derived instances of Read:

  • The result of show is a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used.
  • If the constructor is defined to be an infix operator, then showsPrec will produce infix applications of the constructor.
  • the representation will be enclosed in parentheses if the precedence of the top-level constructor in x is less than d (associativity is ignored). Thus, if d is 0 then the result is never surrounded in parentheses; if d is 11 it is always surrounded in parentheses, unless it is an atomic expression.
  • If the constructor is defined using record syntax, then show will produce the record-syntax form, with the fields given in the same order as the original declaration.

For example, given the declarations

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

the derived instance of Show is equivalent to

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

       showsPrec d (Leaf m) = showParen (d > app_prec) $
            showString "Leaf " . showsPrec (app_prec+1) m
         where app_prec = 10

       showsPrec d (u :^: v) = showParen (d > up_prec) $
            showsPrec (up_prec+1) u .
            showString " :^: "      .
            showsPrec (up_prec+1) v
         where up_prec = 5

Note that right-associativity of :^: is ignored. For example,

  • show (Leaf 1 :^: Leaf 2 :^: Leaf 3) produces the string "Leaf 1 :^: (Leaf 2 :^: Leaf 3)".

Minimal complete definition

showsPrec | show

Methods

showsPrec #

Arguments

:: Int

the operator precedence of the enclosing context (a number from 0 to 11). Function application has precedence 10.

-> a

the value to be converted to a String

-> ShowS 

Convert a value to a readable String.

showsPrec should satisfy the law

showsPrec d x r ++ s  ==  showsPrec d x (r ++ s)

Derived instances of Read and Show satisfy the following:

That is, readsPrec parses the string produced by showsPrec, and delivers the value that showsPrec started with.

show :: a -> String #

A specialised variant of showsPrec, using precedence context zero, and returning an ordinary String.

showList :: [a] -> ShowS #

The method showList is provided to allow the programmer to give a specialised way of showing lists of values. For example, this is used by the predefined Show instance of the Char type, where values of type String should be shown in double quotes, rather than between square brackets.

Instances

Instances details
Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Bool -> ShowS #

show :: Bool -> String #

showList :: [Bool] -> ShowS #

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Char -> ShowS #

show :: Char -> String #

showList :: [Char] -> ShowS #

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Int -> ShowS #

show :: Int -> String #

showList :: [Int] -> ShowS #

Show Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int8 -> ShowS #

show :: Int8 -> String #

showList :: [Int8] -> ShowS #

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int16 -> ShowS #

show :: Int16 -> String #

showList :: [Int16] -> ShowS #

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

Show Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show RuntimeRep

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecCount

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show VecElem

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show CallStack

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SomeTypeRep

Since: base-4.10.0.0

Instance details

Defined in Data.Typeable.Internal

Show Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Exp -> ShowS #

show :: Exp -> String #

showList :: [Exp] -> ShowS #

Show Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Match -> ShowS #

show :: Match -> String #

showList :: [Match] -> ShowS #

Show Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Pat -> ShowS #

show :: Pat -> String #

showList :: [Pat] -> ShowS #

Show Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

Show Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Dec -> ShowS #

show :: Dec -> String #

showList :: [Dec] -> ShowS #

Show Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

Show FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Show InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Show ()

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> () -> ShowS #

show :: () -> String #

showList :: [()] -> ShowS #

Show TyCon

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> TyCon -> ShowS #

show :: TyCon -> String #

showList :: [TyCon] -> ShowS #

Show Module

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show TrName

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show KindRep 
Instance details

Defined in GHC.Show

Show TypeLitSort

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Show HUnitFailure 
Instance details

Defined in Test.HUnit.Lang

Show FailureReason 
Instance details

Defined in Test.HUnit.Lang

Show Result 
Instance details

Defined in Test.HUnit.Lang

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

Show QCGen 
Instance details

Defined in Test.QuickCheck.Random

Methods

showsPrec :: Int -> QCGen -> ShowS #

show :: QCGen -> String #

showList :: [QCGen] -> ShowS #

Show Args 
Instance details

Defined in Test.QuickCheck.Test

Methods

showsPrec :: Int -> Args -> ShowS #

show :: Args -> String #

showList :: [Args] -> ShowS #

Show Result 
Instance details

Defined in Test.QuickCheck.Test

Show Confidence 
Instance details

Defined in Test.QuickCheck.State

Show ASCIIString 
Instance details

Defined in Test.QuickCheck.Modifiers

Show UnicodeString 
Instance details

Defined in Test.QuickCheck.Modifiers

Show PrintableString 
Instance details

Defined in Test.QuickCheck.Modifiers

Show Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

showsPrec :: Int -> Void -> ShowS #

show :: Void -> String #

showList :: [Void] -> ShowS #

Show BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show AllocationLimitExceeded

Since: base-4.7.1.0

Instance details

Defined in GHC.IO.Exception

Show CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Show AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Show AsyncException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Show ExitCode 
Instance details

Defined in GHC.IO.Exception

Show IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Show IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> All -> ShowS #

show :: All -> String #

showList :: [All] -> ShowS #

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Any -> ShowS #

show :: Any -> String #

showList :: [Any] -> ShowS #

Show Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Show SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Show CChar 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CChar -> ShowS #

show :: CChar -> String #

showList :: [CChar] -> ShowS #

Show CSChar 
Instance details

Defined in Foreign.C.Types

Show CUChar 
Instance details

Defined in Foreign.C.Types

Show CShort 
Instance details

Defined in Foreign.C.Types

Show CUShort 
Instance details

Defined in Foreign.C.Types

Show CInt 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CInt -> ShowS #

show :: CInt -> String #

showList :: [CInt] -> ShowS #

Show CUInt 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CUInt -> ShowS #

show :: CUInt -> String #

showList :: [CUInt] -> ShowS #

Show CLong 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CLong -> ShowS #

show :: CLong -> String #

showList :: [CLong] -> ShowS #

Show CULong 
Instance details

Defined in Foreign.C.Types

Show CLLong 
Instance details

Defined in Foreign.C.Types

Show CULLong 
Instance details

Defined in Foreign.C.Types

Show CBool 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CBool -> ShowS #

show :: CBool -> String #

showList :: [CBool] -> ShowS #

Show CFloat 
Instance details

Defined in Foreign.C.Types

Show CDouble 
Instance details

Defined in Foreign.C.Types

Show CPtrdiff 
Instance details

Defined in Foreign.C.Types

Show CSize 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CSize -> ShowS #

show :: CSize -> String #

showList :: [CSize] -> ShowS #

Show CWchar 
Instance details

Defined in Foreign.C.Types

Show CSigAtomic 
Instance details

Defined in Foreign.C.Types

Show CClock 
Instance details

Defined in Foreign.C.Types

Show CTime 
Instance details

Defined in Foreign.C.Types

Methods

showsPrec :: Int -> CTime -> ShowS #

show :: CTime -> String #

showList :: [CTime] -> ShowS #

Show CUSeconds 
Instance details

Defined in Foreign.C.Types

Show CSUSeconds 
Instance details

Defined in Foreign.C.Types

Show CIntPtr 
Instance details

Defined in Foreign.C.Types

Show CUIntPtr 
Instance details

Defined in Foreign.C.Types

Show CIntMax 
Instance details

Defined in Foreign.C.Types

Show CUIntMax 
Instance details

Defined in Foreign.C.Types

Show Lexeme

Since: base-2.1

Instance details

Defined in Text.Read.Lex

Show Number

Since: base-4.6.0.0

Instance details

Defined in Text.Read.Lex

Show SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Show Clock 
Instance details

Defined in System.Clock

Methods

showsPrec :: Int -> Clock -> ShowS #

show :: Clock -> String #

showList :: [Clock] -> ShowS #

Show TimeSpec 
Instance details

Defined in System.Clock

Show NumErrors 
Instance details

Defined in Numeric.CollectErrors.Type

Show NumError 
Instance details

Defined in Numeric.CollectErrors.Type

Show ErrorCertaintyLevel 
Instance details

Defined in Numeric.CollectErrors.Type

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

Show Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Show SpliceDecoration 
Instance details

Defined in GHC.Hs.Expr

Show RealSrcLoc 
Instance details

Defined in SrcLoc

Show SrcLoc 
Instance details

Defined in SrcLoc

Show RealSrcSpan 
Instance details

Defined in SrcLoc

Show SrcSpan 
Instance details

Defined in SrcLoc

Show Box 
Instance details

Defined in GHC.Exts.Heap.Closures

Methods

showsPrec :: Int -> Box -> ShowS #

show :: Box -> String #

showList :: [Box] -> ShowS #

Show PrimType 
Instance details

Defined in GHC.Exts.Heap.Closures

Show StgInfoTable 
Instance details

Defined in GHC.Exts.Heap.InfoTable.Types

Show ClosureType 
Instance details

Defined in GHC.Exts.Heap.ClosureTypes

Show EvalOpts 
Instance details

Defined in GHCi.Message

Show SerializableException 
Instance details

Defined in GHCi.Message

Show THResultType 
Instance details

Defined in GHCi.Message

Show QState 
Instance details

Defined in GHCi.Message

Show FFIType 
Instance details

Defined in GHCi.FFI

Show FFIConv 
Instance details

Defined in GHCi.FFI

Show UnicodeMode 
Instance details

Defined in Test.Hspec.Core.Config.Definition

Show ColorMode 
Instance details

Defined in Test.Hspec.Core.Config.Definition

Show FailureReason 
Instance details

Defined in Test.Hspec.Core.Example

Show Params 
Instance details

Defined in Test.Hspec.Core.Example

Show Result 
Instance details

Defined in Test.Hspec.Core.Example

Show ResultStatus 
Instance details

Defined in Test.Hspec.Core.Example

Show TestQuality 
Instance details

Defined in Test.SmallCheck.Property

Show PropertySuccess 
Instance details

Defined in Test.SmallCheck.Property.Result

Show PropertyFailure 
Instance details

Defined in Test.SmallCheck.Property.Result

Show ForallVisFlag 
Instance details

Defined in Language.Haskell.TH.Ppr

Show ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Show OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Show NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Loc -> ShowS #

show :: Loc -> String #

showList :: [Loc] -> ShowS #

Show Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Info -> ShowS #

show :: Info -> String #

showList :: [Info] -> ShowS #

Show ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Show FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Lit -> ShowS #

show :: Lit -> String #

showList :: [Lit] -> ShowS #

Show Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Bytes -> ShowS #

show :: Bytes -> String #

showList :: [Bytes] -> ShowS #

Show Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Body -> ShowS #

show :: Body -> String #

showList :: [Body] -> ShowS #

Show Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Guard -> ShowS #

show :: Guard -> String #

showList :: [Guard] -> ShowS #

Show Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Stmt -> ShowS #

show :: Stmt -> String #

showList :: [Stmt] -> ShowS #

Show Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

Show DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Show DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Show TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Show TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Show RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Show AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Show Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Con -> ShowS #

show :: Con -> String #

showList :: [Con] -> ShowS #

Show Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Bang -> ShowS #

show :: Bang -> String #

showList :: [Bang] -> ShowS #

Show PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Show PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Show TyVarBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Show FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Show TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> TyLit -> ShowS #

show :: TyLit -> String #

showList :: [TyLit] -> ShowS #

Show Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

showsPrec :: Int -> Role -> ShowS #

show :: Role -> String #

showList :: [Role] -> ShowS #

Show AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Show ZonedTime 
Instance details

Defined in Data.Time.LocalTime.Internal.ZonedTime

Show LocalTime 
Instance details

Defined in Data.Time.LocalTime.Internal.LocalTime

Show ConvertError Source # 
Instance details

Defined in Data.Convertible.Base

Show a => Show [a]

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> [a] -> ShowS #

show :: [a] -> String #

showList :: [[a]] -> ShowS #

Show a => Show (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Show a => Show (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

showsPrec :: Int -> Ratio a -> ShowS #

show :: Ratio a -> String #

showList :: [Ratio a] -> ShowS #

Show (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

showsPrec :: Int -> Ptr a -> ShowS #

show :: Ptr a -> String #

showList :: [Ptr a] -> ShowS #

Show (FunPtr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

showsPrec :: Int -> FunPtr a -> ShowS #

show :: FunPtr a -> String #

showList :: [FunPtr a] -> ShowS #

Show p => Show (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> Par1 p -> ShowS #

show :: Par1 p -> String #

showList :: [Par1 p] -> ShowS #

Show (Blind a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> Blind a -> ShowS #

show :: Blind a -> String #

showList :: [Blind a] -> ShowS #

Show a => Show (Fixed a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> Fixed a -> ShowS #

show :: Fixed a -> String #

showList :: [Fixed a] -> ShowS #

Show a => Show (OrderedList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Show a => Show (NonEmptyList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Show a => Show (InfiniteList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Show a => Show (SortedList a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Show a => Show (Positive a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> Positive a -> ShowS #

show :: Positive a -> String #

showList :: [Positive a] -> ShowS #

Show a => Show (Negative a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> Negative a -> ShowS #

show :: Negative a -> String #

showList :: [Negative a] -> ShowS #

Show a => Show (NonZero a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> NonZero a -> ShowS #

show :: NonZero a -> String #

showList :: [NonZero a] -> ShowS #

Show a => Show (NonNegative a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Show a => Show (NonPositive a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Show a => Show (Large a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> Large a -> ShowS #

show :: Large a -> String #

showList :: [Large a] -> ShowS #

Show a => Show (Small a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> Small a -> ShowS #

show :: Small a -> String #

showList :: [Small a] -> ShowS #

Show a => Show (Shrink2 a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> Shrink2 a -> ShowS #

show :: Shrink2 a -> String #

showList :: [Shrink2 a] -> ShowS #

Show a => Show (Smart a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> Smart a -> ShowS #

show :: Smart a -> String #

showList :: [Smart a] -> ShowS #

Show a => Show (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

showsPrec :: Int -> Complex a -> ShowS #

show :: Complex a -> String #

showList :: [Complex a] -> ShowS #

Show a => Show (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

showsPrec :: Int -> ZipList a -> ShowS #

show :: ZipList a -> String #

showList :: [ZipList a] -> ShowS #

Show a => Show (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

showsPrec :: Int -> Identity a -> ShowS #

show :: Identity a -> String #

showList :: [Identity a] -> ShowS #

Show a => Show (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Show a => Show (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

Show a => Show (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Dual a -> ShowS #

show :: Dual a -> String #

showList :: [Dual a] -> ShowS #

Show a => Show (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Sum a -> ShowS #

show :: Sum a -> String #

showList :: [Sum a] -> ShowS #

Show a => Show (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Product a -> ShowS #

show :: Product a -> String #

showList :: [Product a] -> ShowS #

Show a => Show (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

Show a => Show (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

showsPrec :: Int -> IntMap a -> ShowS #

show :: IntMap a -> String #

showList :: [IntMap a] -> ShowS #

Show vertex => Show (SCC vertex)

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

showsPrec :: Int -> SCC vertex -> ShowS #

show :: SCC vertex -> String #

showList :: [SCC vertex] -> ShowS #

Show a => Show (Tree a) 
Instance details

Defined in Data.Tree

Methods

showsPrec :: Int -> Tree a -> ShowS #

show :: Tree a -> String #

showList :: [Tree a] -> ShowS #

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS #

show :: Seq a -> String #

showList :: [Seq a] -> ShowS #

Show a => Show (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> ViewL a -> ShowS #

show :: ViewL a -> String #

showList :: [ViewL a] -> ShowS #

Show a => Show (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> ViewR a -> ShowS #

show :: ViewR a -> String #

showList :: [ViewR a] -> ShowS #

Show a => Show (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

Show a => Show (EvalResult a) 
Instance details

Defined in GHCi.Message

Show a => Show (EvalExpr a) 
Instance details

Defined in GHCi.Message

Methods

showsPrec :: Int -> EvalExpr a -> ShowS #

show :: EvalExpr a -> String #

showList :: [EvalExpr a] -> ShowS #

Show (Message a) 
Instance details

Defined in GHCi.Message

Methods

showsPrec :: Int -> Message a -> ShowS #

show :: Message a -> String #

showList :: [Message a] -> ShowS #

Show a => Show (SizedSeq a) 
Instance details

Defined in SizedSeq

Methods

showsPrec :: Int -> SizedSeq a -> ShowS #

show :: SizedSeq a -> String #

showList :: [SizedSeq a] -> ShowS #

Show b => Show (GenClosure b) 
Instance details

Defined in GHC.Exts.Heap.Closures

Show a => Show (QResult a) 
Instance details

Defined in GHCi.Message

Methods

showsPrec :: Int -> QResult a -> ShowS #

show :: QResult a -> String #

showList :: [QResult a] -> ShowS #

Show (THMessage a) 
Instance details

Defined in GHCi.Message

Show a => Show (THResult a) 
Instance details

Defined in GHCi.Message

Methods

showsPrec :: Int -> THResult a -> ShowS #

show :: THResult a -> String #

showList :: [THResult a] -> ShowS #

Show a => Show (Positive a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

showsPrec :: Int -> Positive a -> ShowS #

show :: Positive a -> String #

showList :: [Positive a] -> ShowS #

Show a => Show (NonNegative a) 
Instance details

Defined in Test.SmallCheck.Series

Show a => Show (NonZero a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

showsPrec :: Int -> NonZero a -> ShowS #

show :: NonZero a -> String #

showList :: [NonZero a] -> ShowS #

Show a => Show (NonEmpty a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

Show a => Show (M a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

showsPrec :: Int -> M a -> ShowS #

show :: M a -> String #

showList :: [M a] -> ShowS #

Show a => Show (N a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

showsPrec :: Int -> N a -> ShowS #

show :: N a -> String #

showList :: [N a] -> ShowS #

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

Since: base-3.0

Instance details

Defined in Data.Either

Methods

showsPrec :: Int -> Either a b -> ShowS #

show :: Either a b -> String #

showList :: [Either a b] -> ShowS #

Show (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> V1 p -> ShowS #

show :: V1 p -> String #

showList :: [V1 p] -> ShowS #

Show (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> U1 p -> ShowS #

show :: U1 p -> String #

showList :: [U1 p] -> ShowS #

Show (TypeRep a) 
Instance details

Defined in Data.Typeable.Internal

Methods

showsPrec :: Int -> TypeRep a -> ShowS #

show :: TypeRep a -> String #

showList :: [TypeRep a] -> ShowS #

(Show a, Show b) => Show (a, b)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b) -> ShowS #

show :: (a, b) -> String #

showList :: [(a, b)] -> ShowS #

(Show a, Show b) => Show (a :-> b) 
Instance details

Defined in Test.QuickCheck.Function

Methods

showsPrec :: Int -> (a :-> b) -> ShowS #

show :: (a :-> b) -> String #

showList :: [a :-> b] -> ShowS #

(Show a, Show b) => Show (Fun a b) 
Instance details

Defined in Test.QuickCheck.Function

Methods

showsPrec :: Int -> Fun a b -> ShowS #

show :: Fun a b -> String #

showList :: [Fun a b] -> ShowS #

Show a => Show (Shrinking s a) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

showsPrec :: Int -> Shrinking s a -> ShowS #

show :: Shrinking s a -> String #

showList :: [Shrinking s a] -> ShowS #

HasResolution a => Show (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

showsPrec :: Int -> Fixed a -> ShowS #

show :: Fixed a -> String #

showList :: [Fixed a] -> ShowS #

Show (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

showsPrec :: Int -> Proxy s -> ShowS #

show :: Proxy s -> String #

showList :: [Proxy s] -> ShowS #

(Show v, CanBeErrors es) => Show (CollectErrors es v) 
Instance details

Defined in Control.CollectErrors.Type

Methods

showsPrec :: Int -> CollectErrors es v -> ShowS #

show :: CollectErrors es v -> String #

showList :: [CollectErrors es v] -> ShowS #

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

Defined in Data.Map.Internal

Methods

showsPrec :: Int -> Map k a -> ShowS #

show :: Map k a -> String #

showList :: [Map k a] -> ShowS #

Show a => Show (EvalStatus_ a b) 
Instance details

Defined in GHCi.Message

Methods

showsPrec :: Int -> EvalStatus_ a b -> ShowS #

show :: EvalStatus_ a b -> String #

showList :: [EvalStatus_ a b] -> ShowS #

(Show c, Show a) => Show (Tree c a) 
Instance details

Defined in Test.Hspec.Core.Tree

Methods

showsPrec :: Int -> Tree c a -> ShowS #

show :: Tree c a -> String #

showList :: [Tree c a] -> ShowS #

Show (f p) => Show (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> Rec1 f p -> ShowS #

show :: Rec1 f p -> String #

showList :: [Rec1 f p] -> ShowS #

Show (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Char p -> ShowS #

show :: URec Char p -> String #

showList :: [URec Char p] -> ShowS #

Show (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Double p -> ShowS #

show :: URec Double p -> String #

showList :: [URec Double p] -> ShowS #

Show (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Float p -> ShowS #

show :: URec Float p -> String #

showList :: [URec Float p] -> ShowS #

Show (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Int p -> ShowS #

show :: URec Int p -> String #

showList :: [URec Int p] -> ShowS #

Show (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Word p -> ShowS #

show :: URec Word p -> String #

showList :: [URec Word p] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c) -> ShowS #

show :: (a, b, c) -> String #

showList :: [(a, b, c)] -> ShowS #

Show a => Show (Const a b)

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

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Methods

showsPrec :: Int -> Const a b -> ShowS #

show :: Const a b -> String #

showList :: [Const a b] -> ShowS #

Show (f a) => Show (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Ap f a -> ShowS #

show :: Ap f a -> String #

showList :: [Ap f a] -> ShowS #

Show (f a) => Show (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Alt f a -> ShowS #

show :: Alt f a -> String #

showList :: [Alt f a] -> ShowS #

Show (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

showsPrec :: Int -> (a :~: b) -> ShowS #

show :: (a :~: b) -> String #

showList :: [a :~: b] -> ShowS #

(Show e, Show1 m, Show a) => Show (ErrorT e m a) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

showsPrec :: Int -> ErrorT e m a -> ShowS #

show :: ErrorT e m a -> String #

showList :: [ErrorT e m a] -> ShowS #

(Show w, Show1 m, Show a) => Show (WriterT w m a) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

showsPrec :: Int -> WriterT w m a -> ShowS #

show :: WriterT w m a -> String #

showList :: [WriterT w m a] -> ShowS #

Show a => Show (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

showsPrec :: Int -> Constant a b -> ShowS #

show :: Constant a b -> String #

showList :: [Constant a b] -> ShowS #

Show c => Show (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> K1 i c p -> ShowS #

show :: K1 i c p -> String #

showList :: [K1 i c p] -> ShowS #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :+: g) p -> ShowS #

show :: (f :+: g) p -> String #

showList :: [(f :+: g) p] -> ShowS #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :*: g) p -> ShowS #

show :: (f :*: g) p -> String #

showList :: [(f :*: g) p] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d) -> ShowS #

show :: (a, b, c, d) -> String #

showList :: [(a, b, c, d)] -> ShowS #

(Show1 f, Show1 g, Show a) => Show (Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

showsPrec :: Int -> Product f g a -> ShowS #

show :: Product f g a -> String #

showList :: [Product f g a] -> ShowS #

Show (a :~~: b)

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

showsPrec :: Int -> (a :~~: b) -> ShowS #

show :: (a :~~: b) -> String #

showList :: [a :~~: b] -> ShowS #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> M1 i c f p -> ShowS #

show :: M1 i c f p -> String #

showList :: [M1 i c f p] -> ShowS #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> (f :.: g) p -> ShowS #

show :: (f :.: g) p -> String #

showList :: [(f :.: g) p] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e) -> ShowS #

show :: (a, b, c, d, e) -> String #

showList :: [(a, b, c, d, e)] -> ShowS #

(Show1 f, Show1 g, Show a) => Show (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

showsPrec :: Int -> Compose f g a -> ShowS #

show :: Compose f g a -> String #

showList :: [Compose f g a] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS #

show :: (a, b, c, d, e, f) -> String #

showList :: [(a, b, c, d, e, f)] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS #

show :: (a, b, c, d, e, f, g) -> String #

showList :: [(a, b, c, d, e, f, g)] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h) -> ShowS #

show :: (a, b, c, d, e, f, g, h) -> String #

showList :: [(a, b, c, d, e, f, g, h)] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i) -> ShowS #

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

showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j) -> ShowS #

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

showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k) -> ShowS #

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

showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l) -> ShowS #

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

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> ShowS #

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

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

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

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

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> ShowS #

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

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

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

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

fail s >>= f  =  fail s

If your Monad is also MonadPlus, a popular definition is

fail _ = mzero

Since: base-4.9.0.0

Methods

fail :: String -> m a #

Instances

Instances details
MonadFail []

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> [a] #

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> Maybe a #

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> IO a #

MonadFail Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fail :: String -> Q a #

MonadFail ReadPrec

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

fail :: String -> ReadPrec a #

MonadFail ReadP

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> ReadP a #

MonadFail P

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> P a #

MonadFail f => MonadFail (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fail :: String -> Ap f a #

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

Defined in Control.Monad.Trans.Error

Methods

fail :: String -> ErrorT e m a #

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

Defined in Control.Monad.Trans.Reader

Methods

fail :: String -> ReaderT r m a #

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fail :: String -> WriterT w m a #

class Functor f => Applicative (f :: Type -> Type) where #

A functor with application, providing operations to

  • embed pure expressions (pure), and
  • sequence computations and combine their results (<*> and liftA2).

A minimal complete definition must include implementations of pure and of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:

(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y

Further, any definition must satisfy the following:

Identity
pure id <*> v = v
Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
Homomorphism
pure f <*> pure x = pure (f x)
Interchange
u <*> pure y = pure ($ y) <*> u

The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:

As a consequence of these laws, the Functor instance for f will satisfy

It may be useful to note that supposing

forall x y. p (q x y) = f x . g y

it follows from the above that

liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v

If f is also a Monad, it should satisfy

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

Minimal complete definition

pure, ((<*>) | liftA2)

Methods

pure :: a -> f a #

Lift a value.

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

Sequential application.

A few functors support an implementation of <*> that is more efficient than the default one.

Using ApplicativeDo: 'fs <*> as' can be understood as the do expression

do f <- fs
   a <- as
   pure (f a)

(*>) :: f a -> f b -> f b infixl 4 #

Sequence actions, discarding the value of the first argument.

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

do as
   bs

This is a tad complicated for our ApplicativeDo extension which will give it a Monad constraint. For an Applicative constraint we write it of the form

do _ <- as
   b <- bs
   pure b

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

Sequence actions, discarding the value of the second argument.

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

do a <- as
   bs
   pure a

Instances

Instances details
Applicative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> [a] #

(<*>) :: [a -> b] -> [a] -> [b] #

liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] #

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

(<*) :: [a] -> [b] -> [a] #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> Maybe a #

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

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

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

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

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> IO a #

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

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

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

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

Applicative Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Par1 a #

(<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b #

liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c #

(*>) :: Par1 a -> Par1 b -> Par1 b #

(<*) :: Par1 a -> Par1 b -> Par1 a #

Applicative Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

pure :: a -> Q a #

(<*>) :: Q (a -> b) -> Q a -> Q b #

liftA2 :: (a -> b -> c) -> Q a -> Q b -> Q c #

(*>) :: Q a -> Q b -> Q b #

(<*) :: Q a -> Q b -> Q a #

Applicative Rose 
Instance details

Defined in Test.QuickCheck.Property

Methods

pure :: a -> Rose a #

(<*>) :: Rose (a -> b) -> Rose a -> Rose b #

liftA2 :: (a -> b -> c) -> Rose a -> Rose b -> Rose c #

(*>) :: Rose a -> Rose b -> Rose b #

(<*) :: Rose a -> Rose b -> Rose a #

Applicative Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

pure :: a -> Gen a #

(<*>) :: Gen (a -> b) -> Gen a -> Gen b #

liftA2 :: (a -> b -> c) -> Gen a -> Gen b -> Gen c #

(*>) :: Gen a -> Gen b -> Gen b #

(<*) :: Gen a -> Gen b -> Gen a #

Applicative Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

pure :: a -> Complex a #

(<*>) :: Complex (a -> b) -> Complex a -> Complex b #

liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

(*>) :: Complex a -> Complex b -> Complex b #

(<*) :: Complex a -> Complex b -> Complex a #

Applicative ZipList
f <$> ZipList xs1 <*> ... <*> ZipList xsN
    = ZipList (zipWithN f xs1 ... xsN)

where zipWithN refers to the zipWith function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example:

(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
    = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
    = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> ZipList a #

(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

(*>) :: ZipList a -> ZipList b -> ZipList b #

(<*) :: ZipList a -> ZipList b -> ZipList a #

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

pure :: a -> Identity a #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b #

liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

(*>) :: Identity a -> Identity b -> Identity b #

(<*) :: Identity a -> Identity b -> Identity a #

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Dual a #

(<*>) :: Dual (a -> b) -> Dual a -> Dual b #

liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

(*>) :: Dual a -> Dual b -> Dual b #

(<*) :: Dual a -> Dual b -> Dual a #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Sum a #

(<*>) :: Sum (a -> b) -> Sum a -> Sum b #

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

(*>) :: Sum a -> Sum b -> Sum b #

(<*) :: Sum a -> Sum b -> Sum a #

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Product a #

(<*>) :: Product (a -> b) -> Product a -> Product b #

liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c #

(*>) :: Product a -> Product b -> Product b #

(<*) :: Product a -> Product b -> Product a #

Applicative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

pure :: a -> ReadPrec a #

(<*>) :: ReadPrec (a -> b) -> ReadPrec a -> ReadPrec b #

liftA2 :: (a -> b -> c) -> ReadPrec a -> ReadPrec b -> ReadPrec c #

(*>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

(<*) :: ReadPrec a -> ReadPrec b -> ReadPrec a #

Applicative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> ReadP a #

(<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b #

liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c #

(*>) :: ReadP a -> ReadP b -> ReadP b #

(<*) :: ReadP a -> ReadP b -> ReadP a #

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a -> NonEmpty a #

(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

Applicative Tree 
Instance details

Defined in Data.Tree

Methods

pure :: a -> Tree a #

(<*>) :: Tree (a -> b) -> Tree a -> Tree b #

liftA2 :: (a -> b -> c) -> Tree a -> Tree b -> Tree c #

(*>) :: Tree a -> Tree b -> Tree b #

(<*) :: Tree a -> Tree b -> Tree a #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

(*>) :: Seq a -> Seq b -> Seq b #

(<*) :: Seq a -> Seq b -> Seq a #

Applicative PV 
Instance details

Defined in RdrHsSyn

Methods

pure :: a -> PV a #

(<*>) :: PV (a -> b) -> PV a -> PV b #

liftA2 :: (a -> b -> c) -> PV a -> PV b -> PV c #

(*>) :: PV a -> PV b -> PV b #

(<*) :: PV a -> PV b -> PV a #

Applicative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> P a #

(<*>) :: P (a -> b) -> P a -> P b #

liftA2 :: (a -> b -> c) -> P a -> P b -> P c #

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

(<*) :: P a -> P b -> P a #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Applicative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> U1 a #

(<*>) :: U1 (a -> b) -> U1 a -> U1 b #

liftA2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c #

(*>) :: U1 a -> U1 b -> U1 b #

(<*) :: U1 a -> U1 b -> U1 a #

Monoid a => Applicative ((,) a)

For tuples, the Monoid constraint on a determines how the first values merge. For example, Strings concatenate:

("hello ", (+15)) <*> ("world!", 2002)
("hello world!",2017)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, a0) #

(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) #

liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) #

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

(<*) :: (a, a0) -> (a, b) -> (a, a0) #

Monad m => Applicative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

Applicative (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

pure :: a -> Proxy a #

(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b #

liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

(*>) :: Proxy a -> Proxy b -> Proxy b #

(<*) :: Proxy a -> Proxy b -> Proxy a #

Monoid es => Applicative (CollectErrors es) 
Instance details

Defined in Control.CollectErrors.Type

Methods

pure :: a -> CollectErrors es a #

(<*>) :: CollectErrors es (a -> b) -> CollectErrors es a -> CollectErrors es b #

liftA2 :: (a -> b -> c) -> CollectErrors es a -> CollectErrors es b -> CollectErrors es c #

(*>) :: CollectErrors es a -> CollectErrors es b -> CollectErrors es b #

(<*) :: CollectErrors es a -> CollectErrors es b -> CollectErrors es a #

Applicative (SpecM a) 
Instance details

Defined in Test.Hspec.Core.Spec.Monad

Methods

pure :: a0 -> SpecM a a0 #

(<*>) :: SpecM a (a0 -> b) -> SpecM a a0 -> SpecM a b #

liftA2 :: (a0 -> b -> c) -> SpecM a a0 -> SpecM a b -> SpecM a c #

(*>) :: SpecM a a0 -> SpecM a b -> SpecM a b #

(<*) :: SpecM a a0 -> SpecM a b -> SpecM a a0 #

Applicative (SetM s) 
Instance details

Defined in Data.Graph

Methods

pure :: a -> SetM s a #

(<*>) :: SetM s (a -> b) -> SetM s a -> SetM s b #

liftA2 :: (a -> b -> c) -> SetM s a -> SetM s b -> SetM s c #

(*>) :: SetM s a -> SetM s b -> SetM s b #

(<*) :: SetM s a -> SetM s b -> SetM s a #

Applicative f => Applicative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Rec1 f a #

(<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b #

liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c #

(*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #

(<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a #

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

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

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

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

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

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

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

Arrow a => Applicative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Monoid m => Applicative (Const m :: Type -> Type)

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

(*>) :: Const m a -> Const m b -> Const m b #

(<*) :: Const m a -> Const m b -> Const m a #

Applicative f => Applicative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #

(*>) :: Ap f a -> Ap f b -> Ap f b #

(<*) :: Ap f a -> Ap f b -> Ap f a #

Applicative f => Applicative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Alt f a #

(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b #

liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c #

(*>) :: Alt f a -> Alt f b -> Alt f b #

(<*) :: Alt f a -> Alt f b -> Alt f a #

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

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

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMissing f x a #

(<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b #

liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c #

(*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

(<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a #

(Functor m, Monad m) => Applicative (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

pure :: a -> ErrorT e m a #

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

liftA2 :: (a -> b -> c) -> ErrorT e m a -> ErrorT e m b -> ErrorT e m c #

(*>) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m b #

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

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

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a #

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

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

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

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

Defined in Control.Monad.Trans.Writer.Lazy

Methods

pure :: a -> WriterT w m a #

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

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

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

Monoid a => Applicative (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

pure :: a0 -> Constant a a0 #

(<*>) :: Constant a (a0 -> b) -> Constant a a0 -> Constant a b #

liftA2 :: (a0 -> b -> c) -> Constant a a0 -> Constant a b -> Constant a c #

(*>) :: Constant a a0 -> Constant a b -> Constant a b #

(<*) :: Constant a a0 -> Constant a b -> Constant a a0 #

Applicative ((->) r :: Type -> Type)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> r -> a #

(<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b #

liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c #

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

(<*) :: (r -> a) -> (r -> b) -> r -> a #

Monoid c => Applicative (K1 i c :: Type -> Type)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> K1 i c a #

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

liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 #

(*>) :: K1 i c a -> K1 i c b -> K1 i c b #

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :*: g) a #

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

liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c #

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

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

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

Since: base-4.14.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> (a, b, c, a0) #

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

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

pure :: a -> Product f g a #

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

liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

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

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMatched f x y a #

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

liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c #

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

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMissing f k x a #

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

liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c #

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

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

Applicative f => Applicative (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> M1 i c f a #

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

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

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

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

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :.: g) a #

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

liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c #

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a #

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

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

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

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

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

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

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMatched f k x y a #

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

liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c #

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

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

class Foldable (t :: Type -> Type) where #

Data structures that can be folded.

For example, given a data type

data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

instance Foldable Tree where
   foldMap f Empty = mempty
   foldMap f (Leaf x) = f x
   foldMap f (Node l k r) = foldMap f l `mappend` f k `mappend` foldMap f r

This is suitable even for abstract types, as the monoid is assumed to satisfy the monoid laws. Alternatively, one could define foldr:

instance Foldable Tree where
   foldr f z Empty = z
   foldr f z (Leaf x) = f x z
   foldr f z (Node l k r) = foldr f (f k (foldr f z r)) l

Foldable instances are expected to satisfy the following laws:

foldr f z t = appEndo (foldMap (Endo . f) t ) z
foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z
fold = foldMap id
length = getSum . foldMap (Sum . const  1)

sum, product, maximum, and minimum should all be essentially equivalent to foldMap forms, such as

sum = getSum . foldMap Sum

but may be less defined.

If the type is also a Functor instance, it should satisfy

foldMap f = fold . fmap f

which implies that

foldMap f . fmap g = foldMap (f . g)

Minimal complete definition

foldMap | foldr

Methods

foldMap :: Monoid m => (a -> m) -> t a -> m #

Map each element of the structure to a monoid, and combine the results.

foldr :: (a -> b -> b) -> b -> t a -> b #

Right-associative fold of a structure.

In the case of lists, foldr, when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left:

foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)

Note that, since the head of the resulting expression is produced by an application of the operator to the first element of the list, foldr can produce a terminating expression from an infinite list.

For a general Foldable structure this should be semantically identical to,

foldr f z = foldr f z . toList

foldl :: (b -> a -> b) -> b -> t a -> b #

Left-associative fold of a structure.

In the case of lists, foldl, when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn

Note that to produce the outermost application of the operator the entire input list must be traversed. This means that foldl' will diverge if given an infinite list.

Also note that if you want an efficient left-fold, you probably want to use foldl' instead of foldl. The reason for this is that latter does not force the "inner" results (e.g. z `f` x1 in the above example) before applying them to the operator (e.g. to (`f` x2)). This results in a thunk chain \(\mathcal{O}(n)\) elements long, which then must be evaluated from the outside-in.

For a general Foldable structure this should be semantically identical to,

foldl f z = foldl f z . toList

foldr1 :: (a -> a -> a) -> t a -> a #

A variant of foldr that has no base case, and thus may only be applied to non-empty structures.

foldr1 f = foldr1 f . toList

foldl1 :: (a -> a -> a) -> t a -> a #

A variant of foldl that has no base case, and thus may only be applied to non-empty structures.

foldl1 f = foldl1 f . toList

null :: t a -> Bool #

Test whether the structure is empty. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

Since: base-4.8.0.0

elem :: Eq a => a -> t a -> Bool infix 4 #

Does the element occur in the structure?

Since: base-4.8.0.0

Instances

Instances details
Foldable []

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => [m] -> m #

foldMap :: Monoid m => (a -> m) -> [a] -> m #

foldMap' :: Monoid m => (a -> m) -> [a] -> m #

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

foldr' :: (a -> b -> b) -> b -> [a] -> b #

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

foldl' :: (b -> a -> b) -> b -> [a] -> b #

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

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

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

null :: [a] -> Bool #

length :: [a] -> Int #

elem :: Eq a => a -> [a] -> Bool #

maximum :: Ord a => [a] -> a #

minimum :: Ord a => [a] -> a #

sum :: Num a => [a] -> a #

product :: Num a => [a] -> a #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

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

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

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

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

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

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

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

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

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

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

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

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

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

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

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

Foldable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Par1 m -> m #

foldMap :: Monoid m => (a -> m) -> Par1 a -> m #

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

foldr :: (a -> b -> b) -> b -> Par1 a -> b #

foldr' :: (a -> b -> b) -> b -> Par1 a -> b #

foldl :: (b -> a -> b) -> b -> Par1 a -> b #

foldl' :: (b -> a -> b) -> b -> Par1 a -> b #

foldr1 :: (a -> a -> a) -> Par1 a -> a #

foldl1 :: (a -> a -> a) -> Par1 a -> a #

toList :: Par1 a -> [a] #

null :: Par1 a -> Bool #

length :: Par1 a -> Int #

elem :: Eq a => a -> Par1 a -> Bool #

maximum :: Ord a => Par1 a -> a #

minimum :: Ord a => Par1 a -> a #

sum :: Num a => Par1 a -> a #

product :: Num a => Par1 a -> a #

Foldable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

fold :: Monoid m => Complex m -> m #

foldMap :: Monoid m => (a -> m) -> Complex a -> m #

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

foldr :: (a -> b -> b) -> b -> Complex a -> b #

foldr' :: (a -> b -> b) -> b -> Complex a -> b #

foldl :: (b -> a -> b) -> b -> Complex a -> b #

foldl' :: (b -> a -> b) -> b -> Complex a -> b #

foldr1 :: (a -> a -> a) -> Complex a -> a #

foldl1 :: (a -> a -> a) -> Complex a -> a #

toList :: Complex a -> [a] #

null :: Complex a -> Bool #

length :: Complex a -> Int #

elem :: Eq a => a -> Complex a -> Bool #

maximum :: Ord a => Complex a -> a #

minimum :: Ord a => Complex a -> a #

sum :: Num a => Complex a -> a #

product :: Num a => Complex a -> a #

Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Methods

fold :: Monoid m => ZipList m -> m #

foldMap :: Monoid m => (a -> m) -> ZipList a -> m #

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

foldr :: (a -> b -> b) -> b -> ZipList a -> b #

foldr' :: (a -> b -> b) -> b -> ZipList a -> b #

foldl :: (b -> a -> b) -> b -> ZipList a -> b #

foldl' :: (b -> a -> b) -> b -> ZipList a -> b #

foldr1 :: (a -> a -> a) -> ZipList a -> a #

foldl1 :: (a -> a -> a) -> ZipList a -> a #

toList :: ZipList a -> [a] #

null :: ZipList a -> Bool #

length :: ZipList a -> Int #

elem :: Eq a => a -> ZipList a -> Bool #

maximum :: Ord a => ZipList a -> a #

minimum :: Ord a => ZipList a -> a #

sum :: Num a => ZipList a -> a #

product :: Num a => ZipList a -> a #

Foldable Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fold :: Monoid m => Identity m -> m #

foldMap :: Monoid m => (a -> m) -> Identity a -> m #

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

foldr :: (a -> b -> b) -> b -> Identity a -> b #

foldr' :: (a -> b -> b) -> b -> Identity a -> b #

foldl :: (b -> a -> b) -> b -> Identity a -> b #

foldl' :: (b -> a -> b) -> b -> Identity a -> b #

foldr1 :: (a -> a -> a) -> Identity a -> a #

foldl1 :: (a -> a -> a) -> Identity a -> a #

toList :: Identity a -> [a] #

null :: Identity a -> Bool #

length :: Identity a -> Int #

elem :: Eq a => a -> Identity a -> Bool #

maximum :: Ord a => Identity a -> a #

minimum :: Ord a => Identity a -> a #

sum :: Num a => Identity a -> a #

product :: Num a => Identity a -> a #

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

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

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Foldable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

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

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Dual m -> m #

foldMap :: Monoid m => (a -> m) -> Dual a -> m #

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

foldr :: (a -> b -> b) -> b -> Dual a -> b #

foldr' :: (a -> b -> b) -> b -> Dual a -> b #

foldl :: (b -> a -> b) -> b -> Dual a -> b #

foldl' :: (b -> a -> b) -> b -> Dual a -> b #

foldr1 :: (a -> a -> a) -> Dual a -> a #

foldl1 :: (a -> a -> a) -> Dual a -> a #

toList :: Dual a -> [a] #

null :: Dual a -> Bool #

length :: Dual a -> Int #

elem :: Eq a => a -> Dual a -> Bool #

maximum :: Ord a => Dual a -> a #

minimum :: Ord a => Dual a -> a #

sum :: Num a => Dual a -> a #

product :: Num a => Dual a -> a #

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Sum m -> m #

foldMap :: Monoid m => (a -> m) -> Sum a -> m #

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

foldr :: (a -> b -> b) -> b -> Sum a -> b #

foldr' :: (a -> b -> b) -> b -> Sum a -> b #

foldl :: (b -> a -> b) -> b -> Sum a -> b #

foldl' :: (b -> a -> b) -> b -> Sum a -> b #

foldr1 :: (a -> a -> a) -> Sum a -> a #

foldl1 :: (a -> a -> a) -> Sum a -> a #

toList :: Sum a -> [a] #

null :: Sum a -> Bool #

length :: Sum a -> Int #

elem :: Eq a => a -> Sum a -> Bool #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

sum :: Num a => Sum a -> a #

product :: Num a => Sum a -> a #

Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Product m -> m #

foldMap :: Monoid m => (a -> m) -> Product a -> m #

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

foldr :: (a -> b -> b) -> b -> Product a -> b #

foldr' :: (a -> b -> b) -> b -> Product a -> b #

foldl :: (b -> a -> b) -> b -> Product a -> b #

foldl' :: (b -> a -> b) -> b -> Product a -> b #

foldr1 :: (a -> a -> a) -> Product a -> a #

foldl1 :: (a -> a -> a) -> Product a -> a #

toList :: Product a -> [a] #

null :: Product a -> Bool #

length :: Product a -> Int #

elem :: Eq a => a -> Product a -> Bool #

maximum :: Ord a => Product a -> a #

minimum :: Ord a => Product a -> a #

sum :: Num a => Product a -> a #

product :: Num a => Product a -> a #

Foldable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Down m -> m #

foldMap :: Monoid m => (a -> m) -> Down a -> m #

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

foldr :: (a -> b -> b) -> b -> Down a -> b #

foldr' :: (a -> b -> b) -> b -> Down a -> b #

foldl :: (b -> a -> b) -> b -> Down a -> b #

foldl' :: (b -> a -> b) -> b -> Down a -> b #

foldr1 :: (a -> a -> a) -> Down a -> a #

foldl1 :: (a -> a -> a) -> Down a -> a #

toList :: Down a -> [a] #

null :: Down a -> Bool #

length :: Down a -> Int #

elem :: Eq a => a -> Down a -> Bool #

maximum :: Ord a => Down a -> a #

minimum :: Ord a => Down a -> a #

sum :: Num a => Down a -> a #

product :: Num a => Down a -> a #

Foldable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => NonEmpty m -> m #

foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m #

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

foldr :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b #

foldl :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a #

toList :: NonEmpty a -> [a] #

null :: NonEmpty a -> Bool #

length :: NonEmpty a -> Int #

elem :: Eq a => a -> NonEmpty a -> Bool #

maximum :: Ord a => NonEmpty a -> a #

minimum :: Ord a => NonEmpty a -> a #

sum :: Num a => NonEmpty a -> a #

product :: Num a => NonEmpty a -> a #

Foldable IntMap

Folds in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

fold :: Monoid m => IntMap m -> m #

foldMap :: Monoid m => (a -> m) -> IntMap a -> m #

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

foldr :: (a -> b -> b) -> b -> IntMap a -> b #

foldr' :: (a -> b -> b) -> b -> IntMap a -> b #

foldl :: (b -> a -> b) -> b -> IntMap a -> b #

foldl' :: (b -> a -> b) -> b -> IntMap a -> b #

foldr1 :: (a -> a -> a) -> IntMap a -> a #

foldl1 :: (a -> a -> a) -> IntMap a -> a #

toList :: IntMap a -> [a] #

null :: IntMap a -> Bool #

length :: IntMap a -> Int #

elem :: Eq a => a -> IntMap a -> Bool #

maximum :: Ord a => IntMap a -> a #

minimum :: Ord a => IntMap a -> a #

sum :: Num a => IntMap a -> a #

product :: Num a => IntMap a -> a #

Foldable SCC

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

fold :: Monoid m => SCC m -> m #

foldMap :: Monoid m => (a -> m) -> SCC a -> m #

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

foldr :: (a -> b -> b) -> b -> SCC a -> b #

foldr' :: (a -> b -> b) -> b -> SCC a -> b #

foldl :: (b -> a -> b) -> b -> SCC a -> b #

foldl' :: (b -> a -> b) -> b -> SCC a -> b #

foldr1 :: (a -> a -> a) -> SCC a -> a #

foldl1 :: (a -> a -> a) -> SCC a -> a #

toList :: SCC a -> [a] #

null :: SCC a -> Bool #

length :: SCC a -> Int #

elem :: Eq a => a -> SCC a -> Bool #

maximum :: Ord a => SCC a -> a #

minimum :: Ord a => SCC a -> a #

sum :: Num a => SCC a -> a #

product :: Num a => SCC a -> a #

Foldable Tree 
Instance details

Defined in Data.Tree

Methods

fold :: Monoid m => Tree m -> m #

foldMap :: Monoid m => (a -> m) -> Tree a -> m #

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

foldr :: (a -> b -> b) -> b -> Tree a -> b #

foldr' :: (a -> b -> b) -> b -> Tree a -> b #

foldl :: (b -> a -> b) -> b -> Tree a -> b #

foldl' :: (b -> a -> b) -> b -> Tree a -> b #

foldr1 :: (a -> a -> a) -> Tree a -> a #

foldl1 :: (a -> a -> a) -> Tree a -> a #

toList :: Tree a -> [a] #

null :: Tree a -> Bool #

length :: Tree a -> Int #

elem :: Eq a => a -> Tree a -> Bool #

maximum :: Ord a => Tree a -> a #

minimum :: Ord a => Tree a -> a #

sum :: Num a => Tree a -> a #

product :: Num a => Tree a -> a #

Foldable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Seq m -> m #

foldMap :: Monoid m => (a -> m) -> Seq a -> m #

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

foldr :: (a -> b -> b) -> b -> Seq a -> b #

foldr' :: (a -> b -> b) -> b -> Seq a -> b #

foldl :: (b -> a -> b) -> b -> Seq a -> b #

foldl' :: (b -> a -> b) -> b -> Seq a -> b #

foldr1 :: (a -> a -> a) -> Seq a -> a #

foldl1 :: (a -> a -> a) -> Seq a -> a #

toList :: Seq a -> [a] #

null :: Seq a -> Bool #

length :: Seq a -> Int #

elem :: Eq a => a -> Seq a -> Bool #

maximum :: Ord a => Seq a -> a #

minimum :: Ord a => Seq a -> a #

sum :: Num a => Seq a -> a #

product :: Num a => Seq a -> a #

Foldable FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => FingerTree m -> m #

foldMap :: Monoid m => (a -> m) -> FingerTree a -> m #

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

foldr :: (a -> b -> b) -> b -> FingerTree a -> b #

foldr' :: (a -> b -> b) -> b -> FingerTree a -> b #

foldl :: (b -> a -> b) -> b -> FingerTree a -> b #

foldl' :: (b -> a -> b) -> b -> FingerTree a -> b #

foldr1 :: (a -> a -> a) -> FingerTree a -> a #

foldl1 :: (a -> a -> a) -> FingerTree a -> a #

toList :: FingerTree a -> [a] #

null :: FingerTree a -> Bool #

length :: FingerTree a -> Int #

elem :: Eq a => a -> FingerTree a -> Bool #

maximum :: Ord a => FingerTree a -> a #

minimum :: Ord a => FingerTree a -> a #

sum :: Num a => FingerTree a -> a #

product :: Num a => FingerTree a -> a #

Foldable Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Digit m -> m #

foldMap :: Monoid m => (a -> m) -> Digit a -> m #

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

foldr :: (a -> b -> b) -> b -> Digit a -> b #

foldr' :: (a -> b -> b) -> b -> Digit a -> b #

foldl :: (b -> a -> b) -> b -> Digit a -> b #

foldl' :: (b -> a -> b) -> b -> Digit a -> b #

foldr1 :: (a -> a -> a) -> Digit a -> a #

foldl1 :: (a -> a -> a) -> Digit a -> a #

toList :: Digit a -> [a] #

null :: Digit a -> Bool #

length :: Digit a -> Int #

elem :: Eq a => a -> Digit a -> Bool #

maximum :: Ord a => Digit a -> a #

minimum :: Ord a => Digit a -> a #

sum :: Num a => Digit a -> a #

product :: Num a => Digit a -> a #

Foldable Node 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Node m -> m #

foldMap :: Monoid m => (a -> m) -> Node a -> m #

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

foldr :: (a -> b -> b) -> b -> Node a -> b #

foldr' :: (a -> b -> b) -> b -> Node a -> b #

foldl :: (b -> a -> b) -> b -> Node a -> b #

foldl' :: (b -> a -> b) -> b -> Node a -> b #

foldr1 :: (a -> a -> a) -> Node a -> a #

foldl1 :: (a -> a -> a) -> Node a -> a #

toList :: Node a -> [a] #

null :: Node a -> Bool #

length :: Node a -> Int #

elem :: Eq a => a -> Node a -> Bool #

maximum :: Ord a => Node a -> a #

minimum :: Ord a => Node a -> a #

sum :: Num a => Node a -> a #

product :: Num a => Node a -> a #

Foldable Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => Elem m -> m #

foldMap :: Monoid m => (a -> m) -> Elem a -> m #

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

foldr :: (a -> b -> b) -> b -> Elem a -> b #

foldr' :: (a -> b -> b) -> b -> Elem a -> b #

foldl :: (b -> a -> b) -> b -> Elem a -> b #

foldl' :: (b -> a -> b) -> b -> Elem a -> b #

foldr1 :: (a -> a -> a) -> Elem a -> a #

foldl1 :: (a -> a -> a) -> Elem a -> a #

toList :: Elem a -> [a] #

null :: Elem a -> Bool #

length :: Elem a -> Int #

elem :: Eq a => a -> Elem a -> Bool #

maximum :: Ord a => Elem a -> a #

minimum :: Ord a => Elem a -> a #

sum :: Num a => Elem a -> a #

product :: Num a => Elem a -> a #

Foldable ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => ViewL m -> m #

foldMap :: Monoid m => (a -> m) -> ViewL a -> m #

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

foldr :: (a -> b -> b) -> b -> ViewL a -> b #

foldr' :: (a -> b -> b) -> b -> ViewL a -> b #

foldl :: (b -> a -> b) -> b -> ViewL a -> b #

foldl' :: (b -> a -> b) -> b -> ViewL a -> b #

foldr1 :: (a -> a -> a) -> ViewL a -> a #

foldl1 :: (a -> a -> a) -> ViewL a -> a #

toList :: ViewL a -> [a] #

null :: ViewL a -> Bool #

length :: ViewL a -> Int #

elem :: Eq a => a -> ViewL a -> Bool #

maximum :: Ord a => ViewL a -> a #

minimum :: Ord a => ViewL a -> a #

sum :: Num a => ViewL a -> a #

product :: Num a => ViewL a -> a #

Foldable ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

fold :: Monoid m => ViewR m -> m #

foldMap :: Monoid m => (a -> m) -> ViewR a -> m #

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

foldr :: (a -> b -> b) -> b -> ViewR a -> b #

foldr' :: (a -> b -> b) -> b -> ViewR a -> b #

foldl :: (b -> a -> b) -> b -> ViewR a -> b #

foldl' :: (b -> a -> b) -> b -> ViewR a -> b #

foldr1 :: (a -> a -> a) -> ViewR a -> a #

foldl1 :: (a -> a -> a) -> ViewR a -> a #

toList :: ViewR a -> [a] #

null :: ViewR a -> Bool #

length :: ViewR a -> Int #

elem :: Eq a => a -> ViewR a -> Bool #

maximum :: Ord a => ViewR a -> a #

minimum :: Ord a => ViewR a -> a #

sum :: Num a => ViewR a -> a #

product :: Num a => ViewR a -> a #

Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Methods

fold :: Monoid m => Set m -> m #

foldMap :: Monoid m => (a -> m) -> Set a -> m #

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

foldr :: (a -> b -> b) -> b -> Set a -> b #

foldr' :: (a -> b -> b) -> b -> Set a -> b #

foldl :: (b -> a -> b) -> b -> Set a -> b #

foldl' :: (b -> a -> b) -> b -> Set a -> b #

foldr1 :: (a -> a -> a) -> Set a -> a #

foldl1 :: (a -> a -> a) -> Set a -> a #

toList :: Set a -> [a] #

null :: Set a -> Bool #

length :: Set a -> Int #

elem :: Eq a => a -> Set a -> Bool #

maximum :: Ord a => Set a -> a #

minimum :: Ord a => Set a -> a #

sum :: Num a => Set a -> a #

product :: Num a => Set a -> a #

Foldable AnnProvenance 
Instance details

Defined in GHC.Hs.Decls

Methods

fold :: Monoid m => AnnProvenance m -> m #

foldMap :: Monoid m => (a -> m) -> AnnProvenance a -> m #

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

foldr :: (a -> b -> b) -> b -> AnnProvenance a -> b #

foldr' :: (a -> b -> b) -> b -> AnnProvenance a -> b #

foldl :: (b -> a -> b) -> b -> AnnProvenance a -> b #

foldl' :: (b -> a -> b) -> b -> AnnProvenance a -> b #

foldr1 :: (a -> a -> a) -> AnnProvenance a -> a #

foldl1 :: (a -> a -> a) -> AnnProvenance a -> a #

toList :: AnnProvenance a -> [a] #

null :: AnnProvenance a -> Bool #

length :: AnnProvenance a -> Int #

elem :: Eq a => a -> AnnProvenance a -> Bool #

maximum :: Ord a => AnnProvenance a -> a #

minimum :: Ord a => AnnProvenance a -> a #

sum :: Num a => AnnProvenance a -> a #

product :: Num a => AnnProvenance a -> a #

Foldable RecordPatSynField 
Instance details

Defined in GHC.Hs.Binds

Methods

fold :: Monoid m => RecordPatSynField m -> m #

foldMap :: Monoid m => (a -> m) -> RecordPatSynField a -> m #

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

foldr :: (a -> b -> b) -> b -> RecordPatSynField a -> b #

foldr' :: (a -> b -> b) -> b -> RecordPatSynField a -> b #

foldl :: (b -> a -> b) -> b -> RecordPatSynField a -> b #

foldl' :: (b -> a -> b) -> b -> RecordPatSynField a -> b #

foldr1 :: (a -> a -> a) -> RecordPatSynField a -> a #

foldl1 :: (a -> a -> a) -> RecordPatSynField a -> a #

toList :: RecordPatSynField a -> [a] #

null :: RecordPatSynField a -> Bool #

length :: RecordPatSynField a -> Int #

elem :: Eq a => a -> RecordPatSynField a -> Bool #

maximum :: Ord a => RecordPatSynField a -> a #

minimum :: Ord a => RecordPatSynField a -> a #

sum :: Num a => RecordPatSynField a -> a #

product :: Num a => RecordPatSynField a -> a #

Foldable SizedSeq 
Instance details

Defined in SizedSeq

Methods

fold :: Monoid m => SizedSeq m -> m #

foldMap :: Monoid m => (a -> m) -> SizedSeq a -> m #

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

foldr :: (a -> b -> b) -> b -> SizedSeq a -> b #

foldr' :: (a -> b -> b) -> b -> SizedSeq a -> b #

foldl :: (b -> a -> b) -> b -> SizedSeq a -> b #

foldl' :: (b -> a -> b) -> b -> SizedSeq a -> b #

foldr1 :: (a -> a -> a) -> SizedSeq a -> a #

foldl1 :: (a -> a -> a) -> SizedSeq a -> a #

toList :: SizedSeq a -> [a] #

null :: SizedSeq a -> Bool #

length :: SizedSeq a -> Int #

elem :: Eq a => a -> SizedSeq a -> Bool #

maximum :: Ord a => SizedSeq a -> a #

minimum :: Ord a => SizedSeq a -> a #

sum :: Num a => SizedSeq a -> a #

product :: Num a => SizedSeq a -> a #

Foldable GenClosure 
Instance details

Defined in GHC.Exts.Heap.Closures

Methods

fold :: Monoid m => GenClosure m -> m #

foldMap :: Monoid m => (a -> m) -> GenClosure a -> m #

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

foldr :: (a -> b -> b) -> b -> GenClosure a -> b #

foldr' :: (a -> b -> b) -> b -> GenClosure a -> b #

foldl :: (b -> a -> b) -> b -> GenClosure a -> b #

foldl' :: (b -> a -> b) -> b -> GenClosure a -> b #

foldr1 :: (a -> a -> a) -> GenClosure a -> a #

foldl1 :: (a -> a -> a) -> GenClosure a -> a #

toList :: GenClosure a -> [a] #

null :: GenClosure a -> Bool #

length :: GenClosure a -> Int #

elem :: Eq a => a -> GenClosure a -> Bool #

maximum :: Ord a => GenClosure a -> a #

minimum :: Ord a => GenClosure a -> a #

sum :: Num a => GenClosure a -> a #

product :: Num a => GenClosure a -> a #

Foldable Positive 
Instance details

Defined in Test.SmallCheck.Series

Methods

fold :: Monoid m => Positive m -> m #

foldMap :: Monoid m => (a -> m) -> Positive a -> m #

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

foldr :: (a -> b -> b) -> b -> Positive a -> b #

foldr' :: (a -> b -> b) -> b -> Positive a -> b #

foldl :: (b -> a -> b) -> b -> Positive a -> b #

foldl' :: (b -> a -> b) -> b -> Positive a -> b #

foldr1 :: (a -> a -> a) -> Positive a -> a #

foldl1 :: (a -> a -> a) -> Positive a -> a #

toList :: Positive a -> [a] #

null :: Positive a -> Bool #

length :: Positive a -> Int #

elem :: Eq a => a -> Positive a -> Bool #

maximum :: Ord a => Positive a -> a #

minimum :: Ord a => Positive a -> a #

sum :: Num a => Positive a -> a #

product :: Num a => Positive a -> a #

Foldable NonNegative 
Instance details

Defined in Test.SmallCheck.Series

Methods

fold :: Monoid m => NonNegative m -> m #

foldMap :: Monoid m => (a -> m) -> NonNegative a -> m #

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

foldr :: (a -> b -> b) -> b -> NonNegative a -> b #

foldr' :: (a -> b -> b) -> b -> NonNegative a -> b #

foldl :: (b -> a -> b) -> b -> NonNegative a -> b #

foldl' :: (b -> a -> b) -> b -> NonNegative a -> b #

foldr1 :: (a -> a -> a) -> NonNegative a -> a #

foldl1 :: (a -> a -> a) -> NonNegative a -> a #

toList :: NonNegative a -> [a] #

null :: NonNegative a -> Bool #

length :: NonNegative a -> Int #

elem :: Eq a => a -> NonNegative a -> Bool #

maximum :: Ord a => NonNegative a -> a #

minimum :: Ord a => NonNegative a -> a #

sum :: Num a => NonNegative a -> a #

product :: Num a => NonNegative a -> a #

Foldable NonZero 
Instance details

Defined in Test.SmallCheck.Series

Methods

fold :: Monoid m => NonZero m -> m #

foldMap :: Monoid m => (a -> m) -> NonZero a -> m #

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

foldr :: (a -> b -> b) -> b -> NonZero a -> b #

foldr' :: (a -> b -> b) -> b -> NonZero a -> b #

foldl :: (b -> a -> b) -> b -> NonZero a -> b #

foldl' :: (b -> a -> b) -> b -> NonZero a -> b #

foldr1 :: (a -> a -> a) -> NonZero a -> a #

foldl1 :: (a -> a -> a) -> NonZero a -> a #

toList :: NonZero a -> [a] #

null :: NonZero a -> Bool #

length :: NonZero a -> Int #

elem :: Eq a => a -> NonZero a -> Bool #

maximum :: Ord a => NonZero a -> a #

minimum :: Ord a => NonZero a -> a #

sum :: Num a => NonZero a -> a #

product :: Num a => NonZero a -> a #

Foldable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

toList :: Either a a0 -> [a0] #

null :: Either a a0 -> Bool #

length :: Either a a0 -> Int #

elem :: Eq a0 => a0 -> Either a a0 -> Bool #

maximum :: Ord a0 => Either a a0 -> a0 #

minimum :: Ord a0 => Either a a0 -> a0 #

sum :: Num a0 => Either a a0 -> a0 #

product :: Num a0 => Either a a0 -> a0 #

Foldable (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => V1 m -> m #

foldMap :: Monoid m => (a -> m) -> V1 a -> m #

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

foldr :: (a -> b -> b) -> b -> V1 a -> b #

foldr' :: (a -> b -> b) -> b -> V1 a -> b #

foldl :: (b -> a -> b) -> b -> V1 a -> b #

foldl' :: (b -> a -> b) -> b -> V1 a -> b #

foldr1 :: (a -> a -> a) -> V1 a -> a #

foldl1 :: (a -> a -> a) -> V1 a -> a #

toList :: V1 a -> [a] #

null :: V1 a -> Bool #

length :: V1 a -> Int #

elem :: Eq a => a -> V1 a -> Bool #

maximum :: Ord a => V1 a -> a #

minimum :: Ord a => V1 a -> a #

sum :: Num a => V1 a -> a #

product :: Num a => V1 a -> a #

Foldable (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => U1 m -> m #

foldMap :: Monoid m => (a -> m) -> U1 a -> m #

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

foldr :: (a -> b -> b) -> b -> U1 a -> b #

foldr' :: (a -> b -> b) -> b -> U1 a -> b #

foldl :: (b -> a -> b) -> b -> U1 a -> b #

foldl' :: (b -> a -> b) -> b -> U1 a -> b #

foldr1 :: (a -> a -> a) -> U1 a -> a #

foldl1 :: (a -> a -> a) -> U1 a -> a #

toList :: U1 a -> [a] #

null :: U1 a -> Bool #

length :: U1 a -> Int #

elem :: Eq a => a -> U1 a -> Bool #

maximum :: Ord a => U1 a -> a #

minimum :: Ord a => U1 a -> a #

sum :: Num a => U1 a -> a #

product :: Num a => U1 a -> a #

Foldable (UAddr :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UAddr m -> m #

foldMap :: Monoid m => (a -> m) -> UAddr a -> m #

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

foldr :: (a -> b -> b) -> b -> UAddr a -> b #

foldr' :: (a -> b -> b) -> b -> UAddr a -> b #

foldl :: (b -> a -> b) -> b -> UAddr a -> b #

foldl' :: (b -> a -> b) -> b -> UAddr a -> b #

foldr1 :: (a -> a -> a) -> UAddr a -> a #

foldl1 :: (a -> a -> a) -> UAddr a -> a #

toList :: UAddr a -> [a] #

null :: UAddr a -> Bool #

length :: UAddr a -> Int #

elem :: Eq a => a -> UAddr a -> Bool #

maximum :: Ord a => UAddr a -> a #

minimum :: Ord a => UAddr a -> a #

sum :: Num a => UAddr a -> a #

product :: Num a => UAddr a -> a #

Foldable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

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

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

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

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

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

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

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

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

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

toList :: UChar a -> [a] #

null :: UChar a -> Bool #

length :: UChar a -> Int #

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

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

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

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

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

Foldable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

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

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

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

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

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

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

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

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

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

toList :: UDouble a -> [a] #

null :: UDouble a -> Bool #

length :: UDouble a -> Int #

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

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

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

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

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

Foldable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

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

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

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

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

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

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

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

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

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

toList :: UFloat a -> [a] #

null :: UFloat a -> Bool #

length :: UFloat a -> Int #

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

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

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

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

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

Foldable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

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

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

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

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

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

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

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

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

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

toList :: UInt a -> [a] #

null :: UInt a -> Bool #

length :: UInt a -> Int #

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

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

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

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

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

Foldable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

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

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

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

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

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

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

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

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

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

toList :: UWord a -> [a] #

null :: UWord a -> Bool #

length :: UWord a -> Int #

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

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

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

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

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

Foldable ((,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (a, m) -> m #

foldMap :: Monoid m => (a0 -> m) -> (a, a0) -> m #

foldMap' :: Monoid m => (a0 -> m) -> (a, a0) -> m #

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

foldr' :: (a0 -> b -> b) -> b -> (a, a0) -> b #

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

foldl' :: (b -> a0 -> b) -> b -> (a, a0) -> b #

foldr1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 #

toList :: (a, a0) -> [a0] #

null :: (a, a0) -> Bool #

length :: (a, a0) -> Int #

elem :: Eq a0 => a0 -> (a, a0) -> Bool #

maximum :: Ord a0 => (a, a0) -> a0 #

minimum :: Ord a0 => (a, a0) -> a0 #

sum :: Num a0 => (a, a0) -> a0 #

product :: Num a0 => (a, a0) -> a0 #

Foldable (Array i)

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Array i m -> m #

foldMap :: Monoid m => (a -> m) -> Array i a -> m #

foldMap' :: Monoid m => (a -> m) -> Array i a -> m #

foldr :: (a -> b -> b) -> b -> Array i a -> b #

foldr' :: (a -> b -> b) -> b -> Array i a -> b #

foldl :: (b -> a -> b) -> b -> Array i a -> b #

foldl' :: (b -> a -> b) -> b -> Array i a -> b #

foldr1 :: (a -> a -> a) -> Array i a -> a #

foldl1 :: (a -> a -> a) -> Array i a -> a #

toList :: Array i a -> [a] #

null :: Array i a -> Bool #

length :: Array i a -> Int #

elem :: Eq a => a -> Array i a -> Bool #

maximum :: Ord a => Array i a -> a #

minimum :: Ord a => Array i a -> a #

sum :: Num a => Array i a -> a #

product :: Num a => Array i a -> a #

Foldable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Proxy m -> m #

foldMap :: Monoid m => (a -> m) -> Proxy a -> m #

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

foldr :: (a -> b -> b) -> b -> Proxy a -> b #

foldr' :: (a -> b -> b) -> b -> Proxy a -> b #

foldl :: (b -> a -> b) -> b -> Proxy a -> b #

foldl' :: (b -> a -> b) -> b -> Proxy a -> b #

foldr1 :: (a -> a -> a) -> Proxy a -> a #

foldl1 :: (a -> a -> a) -> Proxy a -> a #

toList :: Proxy a -> [a] #

null :: Proxy a -> Bool #

length :: Proxy a -> Int #

elem :: Eq a => a -> Proxy a -> Bool #

maximum :: Ord a => Proxy a -> a #

minimum :: Ord a => Proxy a -> a #

sum :: Num a => Proxy a -> a #

product :: Num a => Proxy a -> a #

Foldable (Map k)

Folds in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

fold :: Monoid m => Map k m -> m #

foldMap :: Monoid m => (a -> m) -> Map k a -> m #

foldMap' :: Monoid m => (a -> m) -> Map k a -> m #

foldr :: (a -> b -> b) -> b -> Map k a -> b #

foldr' :: (a -> b -> b) -> b -> Map k a -> b #

foldl :: (b -> a -> b) -> b -> Map k a -> b #

foldl' :: (b -> a -> b) -> b -> Map k a -> b #

foldr1 :: (a -> a -> a) -> Map k a -> a #

foldl1 :: (a -> a -> a) -> Map k a -> a #

toList :: Map k a -> [a] #

null :: Map k a -> Bool #

length :: Map k a -> Int #

elem :: Eq a => a -> Map k a -> Bool #

maximum :: Ord a => Map k a -> a #

minimum :: Ord a => Map k a -> a #

sum :: Num a => Map k a -> a #

product :: Num a => Map k a -> a #

Foldable (HsRecFields p) 
Instance details

Defined in GHC.Hs.Pat

Methods

fold :: Monoid m => HsRecFields p m -> m #

foldMap :: Monoid m => (a -> m) -> HsRecFields p a -> m #

foldMap' :: Monoid m => (a -> m) -> HsRecFields p a -> m #

foldr :: (a -> b -> b) -> b -> HsRecFields p a -> b #

foldr' :: (a -> b -> b) -> b -> HsRecFields p a -> b #

foldl :: (b -> a -> b) -> b -> HsRecFields p a -> b #

foldl' :: (b -> a -> b) -> b -> HsRecFields p a -> b #

foldr1 :: (a -> a -> a) -> HsRecFields p a -> a #

foldl1 :: (a -> a -> a) -> HsRecFields p a -> a #

toList :: HsRecFields p a -> [a] #

null :: HsRecFields p a -> Bool #

length :: HsRecFields p a -> Int #

elem :: Eq a => a -> HsRecFields p a -> Bool #

maximum :: Ord a => HsRecFields p a -> a #

minimum :: Ord a => HsRecFields p a -> a #

sum :: Num a => HsRecFields p a -> a #

product :: Num a => HsRecFields p a -> a #

Foldable (HsRecField' id) 
Instance details

Defined in GHC.Hs.Pat

Methods

fold :: Monoid m => HsRecField' id m -> m #

foldMap :: Monoid m => (a -> m) -> HsRecField' id a -> m #

foldMap' :: Monoid m => (a -> m) -> HsRecField' id a -> m #

foldr :: (a -> b -> b) -> b -> HsRecField' id a -> b #

foldr' :: (a -> b -> b) -> b -> HsRecField' id a -> b #

foldl :: (b -> a -> b) -> b -> HsRecField' id a -> b #

foldl' :: (b -> a -> b) -> b -> HsRecField' id a -> b #

foldr1 :: (a -> a -> a) -> HsRecField' id a -> a #

foldl1 :: (a -> a -> a) -> HsRecField' id a -> a #

toList :: HsRecField' id a -> [a] #

null :: HsRecField' id a -> Bool #

length :: HsRecField' id a -> Int #

elem :: Eq a => a -> HsRecField' id a -> Bool #

maximum :: Ord a => HsRecField' id a -> a #

minimum :: Ord a => HsRecField' id a -> a #

sum :: Num a => HsRecField' id a -> a #

product :: Num a => HsRecField' id a -> a #

Foldable (GenLocated l) 
Instance details

Defined in SrcLoc

Methods

fold :: Monoid m => GenLocated l m -> m #

foldMap :: Monoid m => (a -> m) -> GenLocated l a -> m #

foldMap' :: Monoid m => (a -> m) -> GenLocated l a -> m #

foldr :: (a -> b -> b) -> b -> GenLocated l a -> b #

foldr' :: (a -> b -> b) -> b -> GenLocated l a -> b #

foldl :: (b -> a -> b) -> b -> GenLocated l a -> b #

foldl' :: (b -> a -> b) -> b -> GenLocated l a -> b #

foldr1 :: (a -> a -> a) -> GenLocated l a -> a #

foldl1 :: (a -> a -> a) -> GenLocated l a -> a #

toList :: GenLocated l a -> [a] #

null :: GenLocated l a -> Bool #

length :: GenLocated l a -> Int #

elem :: Eq a => a -> GenLocated l a -> Bool #

maximum :: Ord a => GenLocated l a -> a #

minimum :: Ord a => GenLocated l a -> a #

sum :: Num a => GenLocated l a -> a #

product :: Num a => GenLocated l a -> a #

Foldable (Tree c) 
Instance details

Defined in Test.Hspec.Core.Tree

Methods

fold :: Monoid m => Tree c m -> m #

foldMap :: Monoid m => (a -> m) -> Tree c a -> m #

foldMap' :: Monoid m => (a -> m) -> Tree c a -> m #

foldr :: (a -> b -> b) -> b -> Tree c a -> b #

foldr' :: (a -> b -> b) -> b -> Tree c a -> b #

foldl :: (b -> a -> b) -> b -> Tree c a -> b #

foldl' :: (b -> a -> b) -> b -> Tree c a -> b #

foldr1 :: (a -> a -> a) -> Tree c a -> a #

foldl1 :: (a -> a -> a) -> Tree c a -> a #

toList :: Tree c a -> [a] #

null :: Tree c a -> Bool #

length :: Tree c a -> Int #

elem :: Eq a => a -> Tree c a -> Bool #

maximum :: Ord a => Tree c a -> a #

minimum :: Ord a => Tree c a -> a #

sum :: Num a => Tree c a -> a #

product :: Num a => Tree c a -> a #

Foldable f => Foldable (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Rec1 f m -> m #

foldMap :: Monoid m => (a -> m) -> Rec1 f a -> m #

foldMap' :: Monoid m => (a -> m) -> Rec1 f a -> m #

foldr :: (a -> b -> b) -> b -> Rec1 f a -> b #

foldr' :: (a -> b -> b) -> b -> Rec1 f a -> b #

foldl :: (b -> a -> b) -> b -> Rec1 f a -> b #

foldl' :: (b -> a -> b) -> b -> Rec1 f a -> b #

foldr1 :: (a -> a -> a) -> Rec1 f a -> a #

foldl1 :: (a -> a -> a) -> Rec1 f a -> a #

toList :: Rec1 f a -> [a] #

null :: Rec1 f a -> Bool #

length :: Rec1 f a -> Int #

elem :: Eq a => a -> Rec1 f a -> Bool #

maximum :: Ord a => Rec1 f a -> a #

minimum :: Ord a => Rec1 f a -> a #

sum :: Num a => Rec1 f a -> a #

product :: Num a => Rec1 f a -> a #

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 #

foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 #

foldr :: (a -> b -> b) -> b -> Const m a -> b #

foldr' :: (a -> b -> b) -> b -> Const m a -> b #

foldl :: (b -> a -> b) -> b -> Const m a -> b #

foldl' :: (b -> a -> b) -> b -> Const m a -> b #

foldr1 :: (a -> a -> a) -> Const m a -> a #

foldl1 :: (a -> a -> a) -> Const m a -> a #

toList :: Const m a -> [a] #

null :: Const m a -> Bool #

length :: Const m a -> Int #

elem :: Eq a => a -> Const m a -> Bool #

maximum :: Ord a => Const m a -> a #

minimum :: Ord a => Const m a -> a #

sum :: Num a => Const m a -> a #

product :: Num a => Const m a -> a #

Foldable f => Foldable (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Ap f m -> m #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m #

foldMap' :: Monoid m => (a -> m) -> Ap f a -> m #

foldr :: (a -> b -> b) -> b -> Ap f a -> b #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b #

foldl :: (b -> a -> b) -> b -> Ap f a -> b #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b #

foldr1 :: (a -> a -> a) -> Ap f a -> a #

foldl1 :: (a -> a -> a) -> Ap f a -> a #

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

null :: Ap f a -> Bool #

length :: Ap f a -> Int #

elem :: Eq a => a -> Ap f a -> Bool #

maximum :: Ord a => Ap f a -> a #

minimum :: Ord a => Ap f a -> a #

sum :: Num a => Ap f a -> a #

product :: Num a => Ap f a -> a #

Foldable f => Foldable (Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Alt f m -> m #

foldMap :: Monoid m => (a -> m) -> Alt f a -> m #

foldMap' :: Monoid m => (a -> m) -> Alt f a -> m #

foldr :: (a -> b -> b) -> b -> Alt f a -> b #

foldr' :: (a -> b -> b) -> b -> Alt f a -> b #

foldl :: (b -> a -> b) -> b -> Alt f a -> b #

foldl' :: (b -> a -> b) -> b -> Alt f a -> b #

foldr1 :: (a -> a -> a) -> Alt f a -> a #

foldl1 :: (a -> a -> a) -> Alt f a -> a #

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

null :: Alt f a -> Bool #

length :: Alt f a -> Int #

elem :: Eq a => a -> Alt f a -> Bool #

maximum :: Ord a => Alt f a -> a #

minimum :: Ord a => Alt f a -> a #

sum :: Num a => Alt f a -> a #

product :: Num a => Alt f a -> a #

Foldable f => Foldable (ErrorT e f) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

fold :: Monoid m => ErrorT e f m -> m #

foldMap :: Monoid m => (a -> m) -> ErrorT e f a -> m #

foldMap' :: Monoid m => (a -> m) -> ErrorT e f a -> m #

foldr :: (a -> b -> b) -> b -> ErrorT e f a -> b #

foldr' :: (a -> b -> b) -> b -> ErrorT e f a -> b #

foldl :: (b -> a -> b) -> b -> ErrorT e f a -> b #

foldl' :: (b -> a -> b) -> b -> ErrorT e f a -> b #

foldr1 :: (a -> a -> a) -> ErrorT e f a -> a #

foldl1 :: (a -> a -> a) -> ErrorT e f a -> a #

toList :: ErrorT e f a -> [a] #

null :: ErrorT e f a -> Bool #

length :: ErrorT e f a -> Int #

elem :: Eq a => a -> ErrorT e f a -> Bool #

maximum :: Ord a => ErrorT e f a -> a #

minimum :: Ord a => ErrorT e f a -> a #

sum :: Num a => ErrorT e f a -> a #

product :: Num a => ErrorT e f a -> a #

Foldable f => Foldable (WriterT w f) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fold :: Monoid m => WriterT w f m -> m #

foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m #

foldr :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b #

foldl :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b #

foldr1 :: (a -> a -> a) -> WriterT w f a -> a #

foldl1 :: (a -> a -> a) -> WriterT w f a -> a #

toList :: WriterT w f a -> [a] #

null :: WriterT w f a -> Bool #

length :: WriterT w f a -> Int #

elem :: Eq a => a -> WriterT w f a -> Bool #

maximum :: Ord a => WriterT w f a -> a #

minimum :: Ord a => WriterT w f a -> a #

sum :: Num a => WriterT w f a -> a #

product :: Num a => WriterT w f a -> a #

Foldable (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

fold :: Monoid m => Constant a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Constant a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Constant a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Constant a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Constant a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Constant a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Constant a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 #

toList :: Constant a a0 -> [a0] #

null :: Constant a a0 -> Bool #

length :: Constant a a0 -> Int #

elem :: Eq a0 => a0 -> Constant a a0 -> Bool #

maximum :: Ord a0 => Constant a a0 -> a0 #

minimum :: Ord a0 => Constant a a0 -> a0 #

sum :: Num a0 => Constant a a0 -> a0 #

product :: Num a0 => Constant a a0 -> a0 #

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

foldMap :: Monoid m => (a -> m) -> K1 i c a -> m #

foldMap' :: Monoid m => (a -> m) -> K1 i c a -> m #

foldr :: (a -> b -> b) -> b -> K1 i c a -> b #

foldr' :: (a -> b -> b) -> b -> K1 i c a -> b #

foldl :: (b -> a -> b) -> b -> K1 i c a -> b #

foldl' :: (b -> a -> b) -> b -> K1 i c a -> b #

foldr1 :: (a -> a -> a) -> K1 i c a -> a #

foldl1 :: (a -> a -> a) -> K1 i c a -> a #

toList :: K1 i c a -> [a] #

null :: K1 i c a -> Bool #

length :: K1 i c a -> Int #

elem :: Eq a => a -> K1 i c a -> Bool #

maximum :: Ord a => K1 i c a -> a #

minimum :: Ord a => K1 i c a -> a #

sum :: Num a => K1 i c a -> a #

product :: Num a => K1 i c a -> a #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :+: g) m -> m #

foldMap :: Monoid m => (a -> m) -> (f :+: g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f :+: g) a -> m #

foldr :: (a -> b -> b) -> b -> (f :+: g) a -> b #

foldr' :: (a -> b -> b) -> b -> (f :+: g) a -> b #

foldl :: (b -> a -> b) -> b -> (f :+: g) a -> b #

foldl' :: (b -> a -> b) -> b -> (f :+: g) a -> b #

foldr1 :: (a -> a -> a) -> (f :+: g) a -> a #

foldl1 :: (a -> a -> a) -> (f :+: g) a -> a #

toList :: (f :+: g) a -> [a] #

null :: (f :+: g) a -> Bool #

length :: (f :+: g) a -> Int #

elem :: Eq a => a -> (f :+: g) a -> Bool #

maximum :: Ord a => (f :+: g) a -> a #

minimum :: Ord a => (f :+: g) a -> a #

sum :: Num a => (f :+: g) a -> a #

product :: Num a => (f :+: g) a -> a #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :*: g) m -> m #

foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m #

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

foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b #

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

foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b #

foldr1 :: (a -> a -> a) -> (f :*: g) a -> a #

foldl1 :: (a -> a -> a) -> (f :*: g) a -> a #

toList :: (f :*: g) a -> [a] #

null :: (f :*: g) a -> Bool #

length :: (f :*: g) a -> Int #

elem :: Eq a => a -> (f :*: g) a -> Bool #

maximum :: Ord a => (f :*: g) a -> a #

minimum :: Ord a => (f :*: g) a -> a #

sum :: Num a => (f :*: g) a -> a #

product :: Num a => (f :*: g) a -> a #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

fold :: Monoid m => Product f g m -> m #

foldMap :: Monoid m => (a -> m) -> Product f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Product f g a -> m #

foldr :: (a -> b -> b) -> b -> Product f g a -> b #

foldr' :: (a -> b -> b) -> b -> Product f g a -> b #

foldl :: (b -> a -> b) -> b -> Product f g a -> b #

foldl' :: (b -> a -> b) -> b -> Product f g a -> b #

foldr1 :: (a -> a -> a) -> Product f g a -> a #

foldl1 :: (a -> a -> a) -> Product f g a -> a #

toList :: Product f g a -> [a] #

null :: Product f g a -> Bool #

length :: Product f g a -> Int #

elem :: Eq a => a -> Product f g a -> Bool #

maximum :: Ord a => Product f g a -> a #

minimum :: Ord a => Product f g a -> a #

sum :: Num a => Product f g a -> a #

product :: Num a => Product f g a -> a #

Foldable f => Foldable (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => M1 i c f m -> m #

foldMap :: Monoid m => (a -> m) -> M1 i c f a -> m #

foldMap' :: Monoid m => (a -> m) -> M1 i c f a -> m #

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

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

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

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

foldr1 :: (a -> a -> a) -> M1 i c f a -> a #

foldl1 :: (a -> a -> a) -> M1 i c f a -> a #

toList :: M1 i c f a -> [a] #

null :: M1 i c f a -> Bool #

length :: M1 i c f a -> Int #

elem :: Eq a => a -> M1 i c f a -> Bool #

maximum :: Ord a => M1 i c f a -> a #

minimum :: Ord a => M1 i c f a -> a #

sum :: Num a => M1 i c f a -> a #

product :: Num a => M1 i c f a -> a #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => (f :.: g) m -> m #

foldMap :: Monoid m => (a -> m) -> (f :.: g) a -> m #

foldMap' :: Monoid m => (a -> m) -> (f :.: g) a -> m #

foldr :: (a -> b -> b) -> b -> (f :.: g) a -> b #

foldr' :: (a -> b -> b) -> b -> (f :.: g) a -> b #

foldl :: (b -> a -> b) -> b -> (f :.: g) a -> b #

foldl' :: (b -> a -> b) -> b -> (f :.: g) a -> b #

foldr1 :: (a -> a -> a) -> (f :.: g) a -> a #

foldl1 :: (a -> a -> a) -> (f :.: g) a -> a #

toList :: (f :.: g) a -> [a] #

null :: (f :.: g) a -> Bool #

length :: (f :.: g) a -> Int #

elem :: Eq a => a -> (f :.: g) a -> Bool #

maximum :: Ord a => (f :.: g) a -> a #

minimum :: Ord a => (f :.: g) a -> a #

sum :: Num a => (f :.: g) a -> a #

product :: Num a => (f :.: g) a -> a #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fold :: Monoid m => Compose f g m -> m #

foldMap :: Monoid m => (a -> m) -> Compose f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m #

foldr :: (a -> b -> b) -> b -> Compose f g a -> b #

foldr' :: (a -> b -> b) -> b -> Compose f g a -> b #

foldl :: (b -> a -> b) -> b -> Compose f g a -> b #

foldl' :: (b -> a -> b) -> b -> Compose f g a -> b #

foldr1 :: (a -> a -> a) -> Compose f g a -> a #

foldl1 :: (a -> a -> a) -> Compose f g a -> a #

toList :: Compose f g a -> [a] #

null :: Compose f g a -> Bool #

length :: Compose f g a -> Int #

elem :: Eq a => a -> Compose f g a -> Bool #

maximum :: Ord a => Compose f g a -> a #

minimum :: Ord a => Compose f g a -> a #

sum :: Num a => Compose f g a -> a #

product :: Num a => Compose f g a -> a #

class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where #

Functors representing data structures that can be traversed from left to right.

A definition of traverse must satisfy the following laws:

Naturality
t . traverse f = traverse (t . f) for every applicative transformation t
Identity
traverse Identity = Identity
Composition
traverse (Compose . fmap g . f) = Compose . fmap (traverse g) . traverse f

A definition of sequenceA must satisfy the following laws:

Naturality
t . sequenceA = sequenceA . fmap t for every applicative transformation t
Identity
sequenceA . fmap Identity = Identity
Composition
sequenceA . fmap Compose = Compose . fmap sequenceA . sequenceA

where an applicative transformation is a function

t :: (Applicative f, Applicative g) => f a -> g a

preserving the Applicative operations, i.e.

t (pure x) = pure x
t (f <*> x) = t f <*> t x

and the identity functor Identity and composition functors Compose are from Data.Functor.Identity and Data.Functor.Compose.

A result of the naturality law is a purity law for traverse

traverse pure = pure

(The naturality law is implied by parametricity and thus so is the purity law [1, p15].)

Instances are similar to Functor, e.g. given a data type

data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)

a suitable instance would be

instance Traversable Tree where
   traverse f Empty = pure Empty
   traverse f (Leaf x) = Leaf <$> f x
   traverse f (Node l k r) = Node <$> traverse f l <*> f k <*> traverse f r

This is suitable even for abstract types, as the laws for <*> imply a form of associativity.

The superclass instances should satisfy the following:

References: [1] The Essence of the Iterator Pattern, Jeremy Gibbons and Bruno C. d. S. Oliveira

Minimal complete definition

traverse | sequenceA

Methods

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

Map each element of a structure to an action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see traverse_.

sequenceA :: Applicative f => t (f a) -> f (t a) #

Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

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

Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.

sequence :: Monad m => t (m a) -> m (t a) #

Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.

Instances

Instances details
Traversable []

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> [a] -> f [b] #

sequenceA :: Applicative f => [f a] -> f [a] #

mapM :: Monad m => (a -> m b) -> [a] -> m [b] #

sequence :: Monad m => [m a] -> m [a] #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

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

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

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

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

Traversable Par1

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => Par1 (f a) -> f (Par1 a) #

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

sequence :: Monad m => Par1 (m a) -> m (Par1 a) #

Traversable Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

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

sequenceA :: Applicative f => Complex (f a) -> f (Complex a) #

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

sequence :: Monad m => Complex (m a) -> m (Complex a) #

Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) #

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

sequence :: Monad m => ZipList (m a) -> m (ZipList a) #

Traversable Identity

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => Identity (f a) -> f (Identity a) #

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

sequence :: Monad m => Identity (m a) -> m (Identity a) #

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => First (f a) -> f (First a) #

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

sequence :: Monad m => First (m a) -> m (First a) #

Traversable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => Last (f a) -> f (Last a) #

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

sequence :: Monad m => Last (m a) -> m (Last a) #

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => Dual (f a) -> f (Dual a) #

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

sequence :: Monad m => Dual (m a) -> m (Dual a) #

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => Sum (f a) -> f (Sum a) #

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

sequence :: Monad m => Sum (m a) -> m (Sum a) #

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => Product (f a) -> f (Product a) #

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

sequence :: Monad m => Product (m a) -> m (Product a) #

Traversable Down

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => Down (f a) -> f (Down a) #

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

sequence :: Monad m => Down (m a) -> m (Down a) #

Traversable NonEmpty

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) #

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

sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) #

Traversable IntMap

Traverses in order of increasing key.

Instance details

Defined in Data.IntMap.Internal

Methods

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

sequenceA :: Applicative f => IntMap (f a) -> f (IntMap a) #

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

sequence :: Monad m => IntMap (m a) -> m (IntMap a) #

Traversable SCC

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

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

sequenceA :: Applicative f => SCC (f a) -> f (SCC a) #

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

sequence :: Monad m => SCC (m a) -> m (SCC a) #

Traversable Tree 
Instance details

Defined in Data.Tree

Methods

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

sequenceA :: Applicative f => Tree (f a) -> f (Tree a) #

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

sequence :: Monad m => Tree (m a) -> m (Tree a) #

Traversable Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

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

sequenceA :: Applicative f => Seq (f a) -> f (Seq a) #

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

sequence :: Monad m => Seq (m a) -> m (Seq a) #

Traversable FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

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

sequenceA :: Applicative f => FingerTree (f a) -> f (FingerTree a) #

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

sequence :: Monad m => FingerTree (m a) -> m (FingerTree a) #

Traversable Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

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

sequenceA :: Applicative f => Digit (f a) -> f (Digit a) #

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

sequence :: Monad m => Digit (m a) -> m (Digit a) #

Traversable Node 
Instance details

Defined in Data.Sequence.Internal

Methods

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

sequenceA :: Applicative f => Node (f a) -> f (Node a) #

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

sequence :: Monad m => Node (m a) -> m (Node a) #

Traversable Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

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

sequenceA :: Applicative f => Elem (f a) -> f (Elem a) #

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

sequence :: Monad m => Elem (m a) -> m (Elem a) #

Traversable ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

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

sequenceA :: Applicative f => ViewL (f a) -> f (ViewL a) #

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

sequence :: Monad m => ViewL (m a) -> m (ViewL a) #

Traversable ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

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

sequenceA :: Applicative f => ViewR (f a) -> f (ViewR a) #

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

sequence :: Monad m => ViewR (m a) -> m (ViewR a) #

Traversable AnnProvenance 
Instance details

Defined in GHC.Hs.Decls

Methods

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

sequenceA :: Applicative f => AnnProvenance (f a) -> f (AnnProvenance a) #

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

sequence :: Monad m => AnnProvenance (m a) -> m (AnnProvenance a) #

Traversable RecordPatSynField 
Instance details

Defined in GHC.Hs.Binds

Methods

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

sequenceA :: Applicative f => RecordPatSynField (f a) -> f (RecordPatSynField a) #

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

sequence :: Monad m => RecordPatSynField (m a) -> m (RecordPatSynField a) #

Traversable SizedSeq 
Instance details

Defined in SizedSeq

Methods

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

sequenceA :: Applicative f => SizedSeq (f a) -> f (SizedSeq a) #

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

sequence :: Monad m => SizedSeq (m a) -> m (SizedSeq a) #

Traversable GenClosure 
Instance details

Defined in GHC.Exts.Heap.Closures

Methods

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

sequenceA :: Applicative f => GenClosure (f a) -> f (GenClosure a) #

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

sequence :: Monad m => GenClosure (m a) -> m (GenClosure a) #

Traversable Positive 
Instance details

Defined in Test.SmallCheck.Series

Methods

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

sequenceA :: Applicative f => Positive (f a) -> f (Positive a) #

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

sequence :: Monad m => Positive (m a) -> m (Positive a) #

Traversable NonNegative 
Instance details

Defined in Test.SmallCheck.Series

Methods

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

sequenceA :: Applicative f => NonNegative (f a) -> f (NonNegative a) #

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

sequence :: Monad m => NonNegative (m a) -> m (NonNegative a) #

Traversable NonZero 
Instance details

Defined in Test.SmallCheck.Series

Methods

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

sequenceA :: Applicative f => NonZero (f a) -> f (NonZero a) #

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

sequence :: Monad m => NonZero (m a) -> m (NonZero a) #

Traversable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f (Either a b) #

sequenceA :: Applicative f => Either a (f a0) -> f (Either a a0) #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m (Either a b) #

sequence :: Monad m => Either a (m a0) -> m (Either a a0) #

Traversable (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => V1 (f a) -> f (V1 a) #

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

sequence :: Monad m => V1 (m a) -> m (V1 a) #

Traversable (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => U1 (f a) -> f (U1 a) #

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

sequence :: Monad m => U1 (m a) -> m (U1 a) #

Traversable (UAddr :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

sequenceA :: Applicative f => UAddr (f a) -> f (UAddr a) #

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

sequence :: Monad m => UAddr (m a) -> m (UAddr a) #

Traversable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

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

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

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

Traversable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

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

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

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

Traversable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

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

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

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

Traversable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

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

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

mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) #

sequence :: Monad m => UInt (m a) -> m (UInt a) #

Traversable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) #

sequenceA :: Applicative f => UWord (f a) -> f (UWord a) #

mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) #

sequence :: Monad m => UWord (m a) -> m (UWord a) #

Traversable ((,) a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> (a, a0) -> f (a, b) #

sequenceA :: Applicative f => (a, f a0) -> f (a, a0) #

mapM :: Monad m => (a0 -> m b) -> (a, a0) -> m (a, b) #

sequence :: Monad m => (a, m a0) -> m (a, a0) #

Ix i => Traversable (Array i)

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Array i a -> f (Array i b) #

sequenceA :: Applicative f => Array i (f a) -> f (Array i a) #

mapM :: Monad m => (a -> m b) -> Array i a -> m (Array i b) #

sequence :: Monad m => Array i (m a) -> m (Array i a) #

Traversable (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Proxy a -> f (Proxy b) #

sequenceA :: Applicative f => Proxy (f a) -> f (Proxy a) #

mapM :: Monad m => (a -> m b) -> Proxy a -> m (Proxy b) #

sequence :: Monad m => Proxy (m a) -> m (Proxy a) #

Traversable (Map k)

Traverses in order of increasing key.

Instance details

Defined in Data.Map.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Map k a -> f (Map k b) #

sequenceA :: Applicative f => Map k (f a) -> f (Map k a) #

mapM :: Monad m => (a -> m b) -> Map k a -> m (Map k b) #

sequence :: Monad m => Map k (m a) -> m (Map k a) #

Traversable (HsRecFields p) 
Instance details

Defined in GHC.Hs.Pat

Methods

traverse :: Applicative f => (a -> f b) -> HsRecFields p a -> f (HsRecFields p b) #

sequenceA :: Applicative f => HsRecFields p (f a) -> f (HsRecFields p a) #

mapM :: Monad m => (a -> m b) -> HsRecFields p a -> m (HsRecFields p b) #

sequence :: Monad m => HsRecFields p (m a) -> m (HsRecFields p a) #

Traversable (HsRecField' id) 
Instance details

Defined in GHC.Hs.Pat

Methods

traverse :: Applicative f => (a -> f b) -> HsRecField' id a -> f (HsRecField' id b) #

sequenceA :: Applicative f => HsRecField' id (f a) -> f (HsRecField' id a) #

mapM :: Monad m => (a -> m b) -> HsRecField' id a -> m (HsRecField' id b) #

sequence :: Monad m => HsRecField' id (m a) -> m (HsRecField' id a) #

Traversable (GenLocated l) 
Instance details

Defined in SrcLoc

Methods

traverse :: Applicative f => (a -> f b) -> GenLocated l a -> f (GenLocated l b) #

sequenceA :: Applicative f => GenLocated l (f a) -> f (GenLocated l a) #

mapM :: Monad m => (a -> m b) -> GenLocated l a -> m (GenLocated l b) #

sequence :: Monad m => GenLocated l (m a) -> m (GenLocated l a) #

Traversable (Tree c) 
Instance details

Defined in Test.Hspec.Core.Tree

Methods

traverse :: Applicative f => (a -> f b) -> Tree c a -> f (Tree c b) #

sequenceA :: Applicative f => Tree c (f a) -> f (Tree c a) #

mapM :: Monad m => (a -> m b) -> Tree c a -> m (Tree c b) #

sequence :: Monad m => Tree c (m a) -> m (Tree c a) #

Traversable f => Traversable (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Rec1 f a -> f0 (Rec1 f b) #

sequenceA :: Applicative f0 => Rec1 f (f0 a) -> f0 (Rec1 f a) #

mapM :: Monad m => (a -> m b) -> Rec1 f a -> m (Rec1 f b) #

sequence :: Monad m => Rec1 f (m a) -> m (Rec1 f a) #

Traversable (Const m :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Const m a -> f (Const m b) #

sequenceA :: Applicative f => Const m (f a) -> f (Const m a) #

mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 (Const m b) #

sequence :: Monad m0 => Const m (m0 a) -> m0 (Const m a) #

Traversable f => Traversable (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Ap f a -> f0 (Ap f b) #

sequenceA :: Applicative f0 => Ap f (f0 a) -> f0 (Ap f a) #

mapM :: Monad m => (a -> m b) -> Ap f a -> m (Ap f b) #

sequence :: Monad m => Ap f (m a) -> m (Ap f a) #

Traversable f => Traversable (Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Alt f a -> f0 (Alt f b) #

sequenceA :: Applicative f0 => Alt f (f0 a) -> f0 (Alt f a) #

mapM :: Monad m => (a -> m b) -> Alt f a -> m (Alt f b) #

sequence :: Monad m => Alt f (m a) -> m (Alt f a) #

Traversable f => Traversable (ErrorT e f) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

traverse :: Applicative f0 => (a -> f0 b) -> ErrorT e f a -> f0 (ErrorT e f b) #

sequenceA :: Applicative f0 => ErrorT e f (f0 a) -> f0 (ErrorT e f a) #

mapM :: Monad m => (a -> m b) -> ErrorT e f a -> m (ErrorT e f b) #

sequence :: Monad m => ErrorT e f (m a) -> m (ErrorT e f a) #

Traversable f => Traversable (WriterT w f) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

traverse :: Applicative f0 => (a -> f0 b) -> WriterT w f a -> f0 (WriterT w f b) #

sequenceA :: Applicative f0 => WriterT w f (f0 a) -> f0 (WriterT w f a) #

mapM :: Monad m => (a -> m b) -> WriterT w f a -> m (WriterT w f b) #

sequence :: Monad m => WriterT w f (m a) -> m (WriterT w f a) #

Traversable (Constant a :: Type -> Type) 
Instance details

Defined in Data.Functor.Constant

Methods

traverse :: Applicative f => (a0 -> f b) -> Constant a a0 -> f (Constant a b) #

sequenceA :: Applicative f => Constant a (f a0) -> f (Constant a a0) #

mapM :: Monad m => (a0 -> m b) -> Constant a a0 -> m (Constant a b) #

sequence :: Monad m => Constant a (m a0) -> m (Constant a a0) #

Traversable (K1 i c :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> K1 i c a -> f (K1 i c b) #

sequenceA :: Applicative f => K1 i c (f a) -> f (K1 i c a) #

mapM :: Monad m => (a -> m b) -> K1 i c a -> m (K1 i c b) #

sequence :: Monad m => K1 i c (m a) -> m (K1 i c a) #

(Traversable f, Traversable g) => Traversable (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :+: g) a -> f0 ((f :+: g) b) #

sequenceA :: Applicative f0 => (f :+: g) (f0 a) -> f0 ((f :+: g) a) #

mapM :: Monad m => (a -> m b) -> (f :+: g) a -> m ((f :+: g) b) #

sequence :: Monad m => (f :+: g) (m a) -> m ((f :+: g) a) #

(Traversable f, Traversable g) => Traversable (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :*: g) a -> f0 ((f :*: g) b) #

sequenceA :: Applicative f0 => (f :*: g) (f0 a) -> f0 ((f :*: g) a) #

mapM :: Monad m => (a -> m b) -> (f :*: g) a -> m ((f :*: g) b) #

sequence :: Monad m => (f :*: g) (m a) -> m ((f :*: g) a) #

(Traversable f, Traversable g) => Traversable (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Product f g a -> f0 (Product f g b) #

sequenceA :: Applicative f0 => Product f g (f0 a) -> f0 (Product f g a) #

mapM :: Monad m => (a -> m b) -> Product f g a -> m (Product f g b) #

sequence :: Monad m => Product f g (m a) -> m (Product f g a) #

Traversable f => Traversable (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> M1 i c f a -> f0 (M1 i c f b) #

sequenceA :: Applicative f0 => M1 i c f (f0 a) -> f0 (M1 i c f a) #

mapM :: Monad m => (a -> m b) -> M1 i c f a -> m (M1 i c f b) #

sequence :: Monad m => M1 i c f (m a) -> m (M1 i c f a) #

(Traversable f, Traversable g) => Traversable (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :.: g) a -> f0 ((f :.: g) b) #

sequenceA :: Applicative f0 => (f :.: g) (f0 a) -> f0 ((f :.: g) a) #

mapM :: Monad m => (a -> m b) -> (f :.: g) a -> m ((f :.: g) b) #

sequence :: Monad m => (f :.: g) (m a) -> m ((f :.: g) a) #

(Traversable f, Traversable g) => Traversable (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Compose f g a -> f0 (Compose f g b) #

sequenceA :: Applicative f0 => Compose f g (f0 a) -> f0 (Compose f g a) #

mapM :: Monad m => (a -> m b) -> Compose f g a -> m (Compose f g b) #

sequence :: Monad m => Compose f g (m a) -> m (Compose f g a) #

class Semigroup a where #

The class of semigroups (types with an associative binary operation).

Instances should satisfy the following:

Associativity
x <> (y <> z) = (x <> y) <> z

Since: base-4.9.0.0

Methods

(<>) :: a -> a -> a infixr 6 #

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

Instances

Instances details
Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Semigroup ()

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: () -> () -> () #

sconcat :: NonEmpty () -> () #

stimes :: Integral b => b -> () -> () #

Semigroup Void

Since: base-4.9.0.0

Instance details

Defined in Data.Void

Methods

(<>) :: Void -> Void -> Void #

sconcat :: NonEmpty Void -> Void #

stimes :: Integral b => b -> Void -> Void #

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: All -> All -> All #

sconcat :: NonEmpty All -> All #

stimes :: Integral b => b -> All -> All #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Any -> Any -> Any #

sconcat :: NonEmpty Any -> Any #

stimes :: Integral b => b -> Any -> Any #

Semigroup NumErrors 
Instance details

Defined in Numeric.CollectErrors.Type

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Semigroup [a]

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: [a] -> [a] -> [a] #

sconcat :: NonEmpty [a] -> [a] #

stimes :: Integral b => b -> [a] -> [a] #

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a #

sconcat :: NonEmpty (Maybe a) -> Maybe a #

stimes :: Integral b => b -> Maybe a -> Maybe a #

Semigroup a => Semigroup (IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: IO a -> IO a -> IO a #

sconcat :: NonEmpty (IO a) -> IO a #

stimes :: Integral b => b -> IO a -> IO a #

Semigroup p => Semigroup (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Par1 p -> Par1 p -> Par1 p #

sconcat :: NonEmpty (Par1 p) -> Par1 p #

stimes :: Integral b => b -> Par1 p -> Par1 p #

Semigroup a => Semigroup (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(<>) :: Identity a -> Identity a -> Identity a #

sconcat :: NonEmpty (Identity a) -> Identity a #

stimes :: Integral b => b -> Identity a -> Identity a #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Last a -> Last a -> Last a #

sconcat :: NonEmpty (Last a) -> Last a #

stimes :: Integral b => b -> Last a -> Last a #

Semigroup a => Semigroup (Dual a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Dual a -> Dual a -> Dual a #

sconcat :: NonEmpty (Dual a) -> Dual a #

stimes :: Integral b => b -> Dual a -> Dual a #

Semigroup (Endo a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Endo a -> Endo a -> Endo a #

sconcat :: NonEmpty (Endo a) -> Endo a #

stimes :: Integral b => b -> Endo a -> Endo a #

Num a => Semigroup (Sum a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Sum a -> Sum a -> Sum a #

sconcat :: NonEmpty (Sum a) -> Sum a #

stimes :: Integral b => b -> Sum a -> Sum a #

Num a => Semigroup (Product a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Product a -> Product a -> Product a #

sconcat :: NonEmpty (Product a) -> Product a #

stimes :: Integral b => b -> Product a -> Product a #

Semigroup (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a #

sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a #

stimes :: Integral b => b -> NonEmpty a -> NonEmpty a #

Num a => Semigroup (Colour a) 
Instance details

Defined in Data.Colour.Internal

Methods

(<>) :: Colour a -> Colour a -> Colour a #

sconcat :: NonEmpty (Colour a) -> Colour a #

stimes :: Integral b => b -> Colour a -> Colour a #

Num a => Semigroup (AlphaColour a)

AlphaColour forms a monoid with over and transparent.

Instance details

Defined in Data.Colour.Internal

Semigroup (IntMap a)

Since: containers-0.5.7

Instance details

Defined in Data.IntMap.Internal

Methods

(<>) :: IntMap a -> IntMap a -> IntMap a #

sconcat :: NonEmpty (IntMap a) -> IntMap a #

stimes :: Integral b => b -> IntMap a -> IntMap a #

Semigroup (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

(<>) :: Seq a -> Seq a -> Seq a #

sconcat :: NonEmpty (Seq a) -> Seq a #

stimes :: Integral b => b -> Seq a -> Seq a #

Ord a => Semigroup (Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Methods

(<>) :: Set a -> Set a -> Set a #

sconcat :: NonEmpty (Set a) -> Set a #

stimes :: Integral b => b -> Set a -> Set a #

Semigroup (MergeSet a) 
Instance details

Defined in Data.Set.Internal

Methods

(<>) :: MergeSet a -> MergeSet a -> MergeSet a #

sconcat :: NonEmpty (MergeSet a) -> MergeSet a #

stimes :: Integral b => b -> MergeSet a -> MergeSet a #

Semigroup b => Semigroup (a -> b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a -> b) -> (a -> b) -> a -> b #

sconcat :: NonEmpty (a -> b) -> a -> b #

stimes :: Integral b0 => b0 -> (a -> b) -> a -> b #

Semigroup (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b #

sconcat :: NonEmpty (Either a b) -> Either a b #

stimes :: Integral b0 => b0 -> Either a b -> Either a b #

Semigroup (V1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: V1 p -> V1 p -> V1 p #

sconcat :: NonEmpty (V1 p) -> V1 p #

stimes :: Integral b => b -> V1 p -> V1 p #

Semigroup (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: U1 p -> U1 p -> U1 p #

sconcat :: NonEmpty (U1 p) -> U1 p #

stimes :: Integral b => b -> U1 p -> U1 p #

(Semigroup a, Semigroup b) => Semigroup (a, b)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b) -> (a, b) -> (a, b) #

sconcat :: NonEmpty (a, b) -> (a, b) #

stimes :: Integral b0 => b0 -> (a, b) -> (a, b) #

Semigroup (Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

(<>) :: Proxy s -> Proxy s -> Proxy s #

sconcat :: NonEmpty (Proxy s) -> Proxy s #

stimes :: Integral b => b -> Proxy s -> Proxy s #

Ord k => Semigroup (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

(<>) :: Map k v -> Map k v -> Map k v #

sconcat :: NonEmpty (Map k v) -> Map k v #

stimes :: Integral b => b -> Map k v -> Map k v #

Semigroup (f p) => Semigroup (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: Rec1 f p -> Rec1 f p -> Rec1 f p #

sconcat :: NonEmpty (Rec1 f p) -> Rec1 f p #

stimes :: Integral b => b -> Rec1 f p -> Rec1 f p #

(Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

sconcat :: NonEmpty (a, b, c) -> (a, b, c) #

stimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) #

Semigroup a => Semigroup (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(<>) :: Const a b -> Const a b -> Const a b #

sconcat :: NonEmpty (Const a b) -> Const a b #

stimes :: Integral b0 => b0 -> Const a b -> Const a b #

(Applicative f, Semigroup a) => Semigroup (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Ap f a -> Ap f a -> Ap f a #

sconcat :: NonEmpty (Ap f a) -> Ap f a #

stimes :: Integral b => b -> Ap f a -> Ap f a #

Alternative f => Semigroup (Alt f a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Alt f a -> Alt f a -> Alt f a #

sconcat :: NonEmpty (Alt f a) -> Alt f a #

stimes :: Integral b => b -> Alt f a -> Alt f a #

Semigroup a => Semigroup (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

(<>) :: Constant a b -> Constant a b -> Constant a b #

sconcat :: NonEmpty (Constant a b) -> Constant a b #

stimes :: Integral b0 => b0 -> Constant a b -> Constant a b #

Semigroup c => Semigroup (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: K1 i c p -> K1 i c p -> K1 i c p #

sconcat :: NonEmpty (K1 i c p) -> K1 i c p #

stimes :: Integral b => b -> K1 i c p -> K1 i c p #

(Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p #

stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p #

(Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) #

stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) #

Semigroup (f p) => Semigroup (M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: M1 i c f p -> M1 i c f p -> M1 i c f p #

sconcat :: NonEmpty (M1 i c f p) -> M1 i c f p #

stimes :: Integral b => b -> M1 i c f p -> M1 i c f p #

Semigroup (f (g p)) => Semigroup ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

(<>) :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p #

stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p #

(Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) #

stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) #

class Semigroup a => Monoid a where #

The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:

Right identity
x <> mempty = x
Left identity
mempty <> x = x
Associativity
x <> (y <> z) = (x <> y) <> z (Semigroup law)
Concatenation
mconcat = foldr (<>) mempty

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtypes and make those instances of Monoid, e.g. Sum and Product.

NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.

Minimal complete definition

mempty

Methods

mempty :: a #

Identity of mappend

>>> "Hello world" <> mempty
"Hello world"

mappend :: a -> a -> a #

An associative operation

NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.

mconcat :: [a] -> a #

Fold a list using the monoid.

For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.

>>> mconcat ["Hello", " ", "Haskell", "!"]
"Hello Haskell!"

Instances

Instances details
Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: () #

mappend :: () -> () -> () #

mconcat :: [()] -> () #

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: All #

mappend :: All -> All -> All #

mconcat :: [All] -> All #

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Any #

mappend :: Any -> Any -> Any #

mconcat :: [Any] -> Any #

Monoid NumErrors 
Instance details

Defined in Numeric.CollectErrors.Type

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Monoid [a]

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: [a] #

mappend :: [a] -> [a] -> [a] #

mconcat :: [[a]] -> [a] #

Semigroup a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S."

Since 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

Monoid p => Monoid (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Par1 p #

mappend :: Par1 p -> Par1 p -> Par1 p #

mconcat :: [Par1 p] -> Par1 p #

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

mconcat :: [Identity a] -> Identity a #

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a #

mappend :: First a -> First a -> First a #

mconcat :: [First a] -> First a #

Monoid (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: Last a #

mappend :: Last a -> Last a -> Last a #

mconcat :: [Last a] -> Last a #

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a #

mappend :: Dual a -> Dual a -> Dual a #

mconcat :: [Dual a] -> Dual a #

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a #

mappend :: Endo a -> Endo a -> Endo a #

mconcat :: [Endo a] -> Endo a #

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a #

mappend :: Sum a -> Sum a -> Sum a #

mconcat :: [Sum a] -> Sum a #

Num a => Monoid (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Product a #

mappend :: Product a -> Product a -> Product a #

mconcat :: [Product a] -> Product a #

Num a => Monoid (Colour a) 
Instance details

Defined in Data.Colour.Internal

Methods

mempty :: Colour a #

mappend :: Colour a -> Colour a -> Colour a #

mconcat :: [Colour a] -> Colour a #

Num a => Monoid (AlphaColour a) 
Instance details

Defined in Data.Colour.Internal

Monoid (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

mempty :: IntMap a #

mappend :: IntMap a -> IntMap a -> IntMap a #

mconcat :: [IntMap a] -> IntMap a #

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a #

mappend :: Seq a -> Seq a -> Seq a #

mconcat :: [Seq a] -> Seq a #

Ord a => Monoid (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: Set a #

mappend :: Set a -> Set a -> Set a #

mconcat :: [Set a] -> Set a #

Monoid (MergeSet a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: MergeSet a #

mappend :: MergeSet a -> MergeSet a -> MergeSet a #

mconcat :: [MergeSet a] -> MergeSet a #

Monoid b => Monoid (a -> b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: a -> b #

mappend :: (a -> b) -> (a -> b) -> a -> b #

mconcat :: [a -> b] -> a -> b #

Monoid (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: U1 p #

mappend :: U1 p -> U1 p -> U1 p #

mconcat :: [U1 p] -> U1 p #

(Monoid a, Monoid b) => Monoid (a, b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b) #

mappend :: (a, b) -> (a, b) -> (a, b) #

mconcat :: [(a, b)] -> (a, b) #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s #

mappend :: Proxy s -> Proxy s -> Proxy s #

mconcat :: [Proxy s] -> Proxy s #

Ord k => Monoid (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

mempty :: Map k v #

mappend :: Map k v -> Map k v -> Map k v #

mconcat :: [Map k v] -> Map k v #

Monoid (f p) => Monoid (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Rec1 f p #

mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p #

mconcat :: [Rec1 f p] -> Rec1 f p #

(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c) #

mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) #

mconcat :: [(a, b, c)] -> (a, b, c) #

Monoid a => Monoid (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: Const a b #

mappend :: Const a b -> Const a b -> Const a b #

mconcat :: [Const a b] -> Const a b #

(Applicative f, Monoid a) => Monoid (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mempty :: Ap f a #

mappend :: Ap f a -> Ap f a -> Ap f a #

mconcat :: [Ap f a] -> Ap f a #

Alternative f => Monoid (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Alt f a #

mappend :: Alt f a -> Alt f a -> Alt f a #

mconcat :: [Alt f a] -> Alt f a #

Monoid a => Monoid (Constant a b) 
Instance details

Defined in Data.Functor.Constant

Methods

mempty :: Constant a b #

mappend :: Constant a b -> Constant a b -> Constant a b #

mconcat :: [Constant a b] -> Constant a b #

Monoid c => Monoid (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: K1 i c p #

mappend :: K1 i c p -> K1 i c p -> K1 i c p #

mconcat :: [K1 i c p] -> K1 i c p #

(Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :*: g) p #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

mconcat :: [(f :*: g) p] -> (f :*: g) p #

(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d) #

mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

mconcat :: [(a, b, c, d)] -> (a, b, c, d) #

Monoid (f p) => Monoid (M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: M1 i c f p #

mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p #

mconcat :: [M1 i c f p] -> M1 i c f p #

Monoid (f (g p)) => Monoid ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :.: g) p #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

mconcat :: [(f :.: g) p] -> (f :.: g) p #

(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d, e) #

mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) #

data Bool #

Constructors

False 
True 

Instances

Instances details
Bounded Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Bool

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Bool -> Bool #

pred :: Bool -> Bool #

toEnum :: Int -> Bool #

fromEnum :: Bool -> Int #

enumFrom :: Bool -> [Bool] #

enumFromThen :: Bool -> Bool -> [Bool] #

enumFromTo :: Bool -> Bool -> [Bool] #

enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

(==) :: Bool -> Bool -> Bool #

(/=) :: Bool -> Bool -> Bool #

Ord Bool 
Instance details

Defined in GHC.Classes

Methods

compare :: Bool -> Bool -> Ordering #

(<) :: Bool -> Bool -> Bool #

(<=) :: Bool -> Bool -> Bool #

(>) :: Bool -> Bool -> Bool #

(>=) :: Bool -> Bool -> Bool #

max :: Bool -> Bool -> Bool #

min :: Bool -> Bool -> Bool #

Read Bool

Since: base-2.1

Instance details

Defined in GHC.Read

Show Bool

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Bool -> ShowS #

show :: Bool -> String #

showList :: [Bool] -> ShowS #

Generic Bool

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Bool :: Type -> Type #

Methods

from :: Bool -> Rep Bool x #

to :: Rep Bool x -> Bool #

Testable Bool 
Instance details

Defined in Test.QuickCheck.Property

Methods

property :: Bool -> Property #

propertyForAllShrinkShow :: Gen a -> (a -> [a]) -> (a -> [String]) -> (a -> Bool) -> Property #

Function Bool 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Bool -> b) -> Bool :-> b #

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 #

Example Bool 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg Bool #

SingKind Bool

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep Bool

Methods

fromSing :: forall (a :: Bool). Sing a -> DemoteRep Bool

CanNeg Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

Associated Types

type NegType Bool Source #

CanTestCertainly Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

Lift Bool 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Bool -> Q Exp #

liftTyped :: Bool -> Q (TExp Bool) #

Monad m => Testable m Bool 
Instance details

Defined in Test.SmallCheck.Property

Methods

test :: Bool -> Property m #

Monad m => Serial m Bool 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m Bool #

Monad m => CoSerial m Bool 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b -> Series m (Bool -> b) #

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

ConvertibleExactly Bool Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

HasIfThenElse Bool t Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

Associated Types

type IfThenElseType Bool t Source #

Methods

ifThenElse :: Bool -> t -> t -> IfThenElseType Bool t Source #

CanAndOrAsymmetric Bool Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

Associated Types

type AndOrType Bool Bool Source #

HasEqAsymmetric Bool Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Bool Bool Source #

(ConvertibleExactly Bool t, Monoid es) => ConvertibleExactly Bool (CollectErrors es t) Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

(CanAndOrAsymmetric Bool t2, CanBeErrors es) => CanAndOrAsymmetric Bool (CollectErrors es t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

Associated Types

type AndOrType Bool (CollectErrors es t2) Source #

(HasEqAsymmetric Bool b, CanBeErrors es, CanTestCertainly (EqCompareType Bool b)) => HasEqAsymmetric Bool (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Bool (CollectErrors es b) Source #

(HasEqAsymmetric (Maybe Bool) b, CanBeErrors es, CanTestCertainly (EqCompareType (Maybe Bool) b)) => HasEqAsymmetric (Maybe Bool) (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (Maybe Bool) (CollectErrors es b) Source #

Example (a -> Bool) 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg (a -> Bool) #

Methods

evaluateExample :: (a -> Bool) -> Params -> (ActionWith (Arg (a -> Bool)) -> IO ()) -> ProgressCallback -> IO Result #

(CanAndOrAsymmetric t1 Bool, CanBeErrors es) => CanAndOrAsymmetric (CollectErrors es t1) Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

Associated Types

type AndOrType (CollectErrors es t1) Bool Source #

(HasEqAsymmetric a Bool, CanBeErrors es, CanTestCertainly (EqCompareType a Bool)) => HasEqAsymmetric (CollectErrors es a) Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (CollectErrors es a) Bool Source #

(HasEqAsymmetric a (Maybe Bool), CanBeErrors es, CanTestCertainly (EqCompareType a (Maybe Bool))) => HasEqAsymmetric (CollectErrors es a) (Maybe Bool) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (CollectErrors es a) (Maybe Bool) Source #

type Rep Bool 
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))
type Arg Bool 
Instance details

Defined in Test.Hspec.Core.Example

type Arg Bool = ()
type DemoteRep Bool 
Instance details

Defined in GHC.Generics

type DemoteRep Bool = Bool
data Sing (a :: Bool) 
Instance details

Defined in GHC.Generics

data Sing (a :: Bool) where
type NegType Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

type IfThenElseType Bool t Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

type IfThenElseType Bool t = t
type AndOrType Bool Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

type EqCompareType Bool Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type AndOrType Bool (CollectErrors es t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

type EqCompareType Bool (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType (Maybe Bool) (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type Arg (a -> Bool) 
Instance details

Defined in Test.Hspec.Core.Example

type Arg (a -> Bool) = a
type AndOrType (CollectErrors es t1) Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Bool

type EqCompareType (CollectErrors es a) Bool Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType (CollectErrors es a) (Maybe Bool) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

data Char #

The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) code points (i.e. characters, see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character set (the first 128 characters). A character literal in Haskell has type Char.

To convert a Char to or from the corresponding Int value defined by Unicode, use toEnum and fromEnum from the Enum class respectively (or equivalently ord and chr).

Instances

Instances details
Bounded Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Char

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Char -> Char #

pred :: Char -> Char #

toEnum :: Int -> Char #

fromEnum :: Char -> Int #

enumFrom :: Char -> [Char] #

enumFromThen :: Char -> Char -> [Char] #

enumFromTo :: Char -> Char -> [Char] #

enumFromThenTo :: Char -> Char -> Char -> [Char] #

Eq Char 
Instance details

Defined in GHC.Classes

Methods

(==) :: Char -> Char -> Bool #

(/=) :: Char -> Char -> Bool #

Ord Char 
Instance details

Defined in GHC.Classes

Methods

compare :: Char -> Char -> Ordering #

(<) :: Char -> Char -> Bool #

(<=) :: Char -> Char -> Bool #

(>) :: Char -> Char -> Bool #

(>=) :: Char -> Char -> Bool #

max :: Char -> Char -> Char #

min :: Char -> Char -> Char #

Read Char

Since: base-2.1

Instance details

Defined in GHC.Read

Show Char

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Char -> ShowS #

show :: Char -> String #

showList :: [Char] -> ShowS #

Function Char 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Char -> b) -> Char :-> b #

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 #

PrintfArg Char

Since: base-2.1

Instance details

Defined in Text.Printf

IsChar Char

Since: base-2.1

Instance details

Defined in Text.Printf

Methods

toChar :: Char -> Char #

fromChar :: Char -> Char #

ErrorList Char 
Instance details

Defined in Control.Monad.Trans.Error

Methods

listMsg :: String -> [Char] #

Lift Char 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Char -> Q Exp #

liftTyped :: Char -> Q (TExp Char) #

Monad m => Serial m Char 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m Char #

Monad m => CoSerial m Char 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b -> Series m (Char -> b) #

Convertible Char Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Int8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Int16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Int32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Int64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Word8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Word16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Word32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Char Word64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int8 Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int16 Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int32 Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int64 Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word8 Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word16 Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word32 Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word64 Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

HasEqAsymmetric Char Char Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Char Char Source #

Generic1 (URec Char :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Char) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Char a -> Rep1 (URec Char) a #

to1 :: forall (a :: k0). Rep1 (URec Char) a -> URec Char a #

Monad m => Testable m (Either Reason Reason)

Works like the Bool instance, but includes an explanation of the result.

Left and Right correspond to test failure and success respectively.

Instance details

Defined in Test.SmallCheck.Property

Foldable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UChar m -> m #

foldMap :: Monoid m => (a -> m) -> UChar a -> m #

foldMap' :: Monoid m => (a -> m) -> UChar a -> m #

foldr :: (a -> b -> b) -> b -> UChar a -> b #

foldr' :: (a -> b -> b) -> b -> UChar a -> b #

foldl :: (b -> a -> b) -> b -> UChar a -> b #

foldl' :: (b -> a -> b) -> b -> UChar a -> b #

foldr1 :: (a -> a -> a) -> UChar a -> a #

foldl1 :: (a -> a -> a) -> UChar a -> a #

toList :: UChar a -> [a] #

null :: UChar a -> Bool #

length :: UChar a -> Int #

elem :: Eq a => a -> UChar a -> Bool #

maximum :: Ord a => UChar a -> a #

minimum :: Ord a => UChar a -> a #

sum :: Num a => UChar a -> a #

product :: Num a => UChar a -> a #

Traversable (UChar :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) #

sequenceA :: Applicative f => UChar (f a) -> f (UChar a) #

mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) #

sequence :: Monad m => UChar (m a) -> m (UChar a) #

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 #

(<$) :: a -> URec Char b -> URec Char a #

Eq (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Char p -> URec Char p -> Bool #

(/=) :: URec Char p -> URec Char p -> Bool #

Ord (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Char p -> URec Char p -> Ordering #

(<) :: URec Char p -> URec Char p -> Bool #

(<=) :: URec Char p -> URec Char p -> Bool #

(>) :: URec Char p -> URec Char p -> Bool #

(>=) :: URec Char p -> URec Char p -> Bool #

max :: URec Char p -> URec Char p -> URec Char p #

min :: URec Char p -> URec Char p -> URec Char p #

Show (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Char p -> ShowS #

show :: URec Char p -> String #

showList :: [URec Char p] -> ShowS #

Generic (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Char p) :: Type -> Type #

Methods

from :: URec Char p -> Rep (URec Char p) x #

to :: Rep (URec Char p) x -> URec Char p #

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 {}
type EqCompareType Char Char Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type Rep1 (URec Char :: k -> Type) 
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) 
Instance details

Defined in GHC.Generics

type Rep (URec Char p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: Type -> Type)))

data Double #

Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.

Instances

Instances details
Eq Double

Note that due to the presence of NaN, Double's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Double)
False

Also note that Double's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Double)
True
>>> recip 0 == recip (-0 :: Double)
False
Instance details

Defined in GHC.Classes

Methods

(==) :: Double -> Double -> Bool #

(/=) :: Double -> Double -> Bool #

Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

Ord Double

Note that due to the presence of NaN, Double's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Double)
False

Also note that, due to the same, Ord's operator interactions are not respected by Double's instance:

>>> (0/0 :: Double) > 1
False
>>> compare (0/0 :: Double) 1
GT
Instance details

Defined in GHC.Classes

Read Double

Since: base-2.1

Instance details

Defined in GHC.Read

RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

Function Double 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Double -> b) -> Double :-> b #

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 #

PrintfArg Double

Since: base-2.1

Instance details

Defined in Text.Printf

CanNeg Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type NegType Double Source #

CanTestPosNeg Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

CanTestZero Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestInteger Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestFinite Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestNaN Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Methods

isNaN :: Double -> Bool Source #

CanGiveUpIfVeryInaccurate Double Source # 
Instance details

Defined in Numeric.MixedTypes.Reduce

CanAbs Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type AbsType Double Source #

HasIntegerBounds Double Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanRound Double Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type RoundType Double Source #

CanTestIsIntegerType Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanSinCos Double Source # 
Instance details

Defined in Numeric.MixedTypes.Elementary

Associated Types

type SinCosType Double Source #

CanLog Double Source # 
Instance details

Defined in Numeric.MixedTypes.Elementary

Associated Types

type LogType Double Source #

CanExp Double Source # 
Instance details

Defined in Numeric.MixedTypes.Elementary

Associated Types

type ExpType Double Source #

CanSqrt Double Source # 
Instance details

Defined in Numeric.MixedTypes.Elementary

Associated Types

type SqrtType Double Source #

Lift Double 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Double -> Q Exp #

liftTyped :: Double -> Q (TExp Double) #

Monad m => Serial m Double 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m Double #

Monad m => CoSerial m Double 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b -> Series m (Double -> b) #

Convertible Double Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Int8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Int16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Int32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Int64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Word8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Word16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Word32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Word64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int8 Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int16 Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int32 Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int64 Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word8 Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word16 Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word32 Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word64 Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

ConvertibleExactly Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

HasOrderAsymmetric Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double Double Source #

HasOrderAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double Int Source #

HasOrderAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double Integer Source #

HasOrderAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Double Source #

HasOrderAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer Double Source #

HasEqAsymmetric Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Double Double Source #

HasEqAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Double Int Source #

HasEqAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Double Integer Source #

HasEqAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Int Double Source #

HasEqAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Integer Double Source #

CanMinMaxAsymmetric Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Double Double Source #

CanMinMaxAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Double Int Source #

CanMinMaxAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Double Integer Source #

CanMinMaxAsymmetric Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Double Rational Source #

CanMinMaxAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Int Double Source #

CanMinMaxAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Integer Double Source #

CanMinMaxAsymmetric Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Rational Double Source #

CanSub Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Double Double Source #

CanSub Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Double Int Source #

CanSub Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Double Integer Source #

CanSub Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Double Rational Source #

CanSub Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Int Double Source #

CanSub Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Integer Double Source #

CanSub Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Rational Double Source #

CanAddAsymmetric Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Double Double Source #

CanAddAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Double Int Source #

CanAddAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Double Integer Source #

CanAddAsymmetric Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Double Rational Source #

CanAddAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Int Double Source #

CanAddAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Integer Double Source #

CanAddAsymmetric Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Rational Double Source #

CanMulAsymmetric Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Double Double Source #

CanMulAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Double Int Source #

CanMulAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Double Integer Source #

CanMulAsymmetric Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Double Rational Source #

CanMulAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Int Double Source #

CanMulAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Integer Double Source #

CanMulAsymmetric Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Rational Double Source #

CanDivIMod Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanDivIMod Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanPow Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanPow Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Double Int Source #

type PPowType Double Int Source #

CanPow Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanPow Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanPow Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int Double Source #

type PPowType Int Double Source #

CanPow Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanPow Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanDiv Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Double Double Source #

CanDiv Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Double Int Source #

CanDiv Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Double Integer Source #

CanDiv Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Double Rational Source #

CanDiv Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Int Double Source #

CanDiv Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Integer Double Source #

CanDiv Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Rational Double Source #

HasEqAsymmetric Double b => HasEqAsymmetric Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type EqCompareType Double (Complex b) Source #

CanSub Double b => CanSub Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type SubType Double (Complex b) Source #

Methods

sub :: Double -> Complex b -> SubType Double (Complex b) Source #

CanAddAsymmetric Double b => CanAddAsymmetric Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type AddType Double (Complex b) Source #

Methods

add :: Double -> Complex b -> AddType Double (Complex b) Source #

CanMulAsymmetric Double b => CanMulAsymmetric Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type MulType Double (Complex b) Source #

Methods

mul :: Double -> Complex b -> MulType Double (Complex b) Source #

(CanMulAsymmetric Double b, CanGiveUpIfVeryInaccurate (MulType Double b)) => CanMulAsymmetric Double (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Double (CN b) Source #

Methods

mul :: Double -> CN b -> MulType Double (CN b) Source #

(CanDivIMod Double t2, CanTestPosNeg t2) => CanDivIMod Double (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Double (CN t2) Source #

type ModType Double (CN t2) Source #

Methods

divIMod :: Double -> CN t2 -> (DivIType Double (CN t2), ModType Double (CN t2)) Source #

mod :: Double -> CN t2 -> ModType Double (CN t2) Source #

divI :: Double -> CN t2 -> DivIType Double (CN t2) Source #

(CanPow Double e, HasOrderCertainly e Integer, CanTestIsIntegerType e, CanTestInteger e) => CanPow Double (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Double (CN e) Source #

type PPowType Double (CN e) Source #

Methods

pow :: Double -> CN e -> PowType Double (CN e) Source #

ppow :: Double -> CN e -> PPowType Double (CN e) Source #

(CanMulAsymmetric Double b, CanMulAsymmetric b b, CanAddSameType (MulType b b), CanDiv (MulType Double b) (MulType b b)) => CanDiv Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type DivType Double (Complex b) Source #

(CanDiv Double b, CanTestZero b) => CanDiv Double (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Double (CN b) Source #

Methods

divide :: Double -> CN b -> DivType Double (CN b) Source #

Generic1 (URec Double :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Double) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Double a -> Rep1 (URec Double) a #

to1 :: forall (a :: k0). Rep1 (URec Double) a -> URec Double a #

(ConvertibleExactly Double t, Monoid es) => ConvertibleExactly Double (CollectErrors es t) Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

(HasOrderAsymmetric Double b, CanBeErrors es, CanTestCertainly (OrderCompareType Double b)) => HasOrderAsymmetric Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double (CollectErrors es b) Source #

(HasEqAsymmetric Double b, CanBeErrors es, CanTestCertainly (EqCompareType Double b)) => HasEqAsymmetric Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Double (CollectErrors es b) Source #

(CanMinMaxAsymmetric Double b, CanBeErrors es) => CanMinMaxAsymmetric Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Double (CollectErrors es b) Source #

(CanSub Double b, CanBeErrors es) => CanSub Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Double (CollectErrors es b) Source #

(CanAddAsymmetric Double b, CanBeErrors es) => CanAddAsymmetric Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Double (CollectErrors es b) Source #

Foldable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UDouble m -> m #

foldMap :: Monoid m => (a -> m) -> UDouble a -> m #

foldMap' :: Monoid m => (a -> m) -> UDouble a -> m #

foldr :: (a -> b -> b) -> b -> UDouble a -> b #

foldr' :: (a -> b -> b) -> b -> UDouble a -> b #

foldl :: (b -> a -> b) -> b -> UDouble a -> b #

foldl' :: (b -> a -> b) -> b -> UDouble a -> b #

foldr1 :: (a -> a -> a) -> UDouble a -> a #

foldl1 :: (a -> a -> a) -> UDouble a -> a #

toList :: UDouble a -> [a] #

null :: UDouble a -> Bool #

length :: UDouble a -> Int #

elem :: Eq a => a -> UDouble a -> Bool #

maximum :: Ord a => UDouble a -> a #

minimum :: Ord a => UDouble a -> a #

sum :: Num a => UDouble a -> a #

product :: Num a => UDouble a -> a #

Traversable (UDouble :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) #

sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) #

mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) #

sequence :: Monad m => UDouble (m a) -> m (UDouble a) #

HasEqAsymmetric a Double => HasEqAsymmetric (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type EqCompareType (Complex a) Double Source #

CanSub a Double => CanSub (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type SubType (Complex a) Double Source #

Methods

sub :: Complex a -> Double -> SubType (Complex a) Double Source #

CanAddAsymmetric a Double => CanAddAsymmetric (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type AddType (Complex a) Double Source #

Methods

add :: Complex a -> Double -> AddType (Complex a) Double Source #

CanMulAsymmetric a Double => CanMulAsymmetric (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type MulType (Complex a) Double Source #

Methods

mul :: Complex a -> Double -> MulType (Complex a) Double Source #

(CanMulAsymmetric a Double, CanGiveUpIfVeryInaccurate (MulType a Double)) => CanMulAsymmetric (CN a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType (CN a) Double Source #

Methods

mul :: CN a -> Double -> MulType (CN a) Double Source #

CanDivIMod t1 Double => CanDivIMod (CN t1) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType (CN t1) Double Source #

type ModType (CN t1) Double Source #

Methods

divIMod :: CN t1 -> Double -> (DivIType (CN t1) Double, ModType (CN t1) Double) Source #

mod :: CN t1 -> Double -> ModType (CN t1) Double Source #

divI :: CN t1 -> Double -> DivIType (CN t1) Double Source #

(CanPow b Double, HasOrderCertainly b Integer, HasEqCertainly b Integer, CanTestIsIntegerType b) => CanPow (CN b) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (CN b) Double Source #

type PPowType (CN b) Double Source #

Methods

pow :: CN b -> Double -> PowType (CN b) Double Source #

ppow :: CN b -> Double -> PPowType (CN b) Double Source #

CanDiv a Double => CanDiv (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type DivType (Complex a) Double Source #

CanDiv a Double => CanDiv (CN a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType (CN a) Double Source #

Methods

divide :: CN a -> Double -> DivType (CN a) Double 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 #

(<$) :: a -> URec Double b -> URec Double a #

(HasOrderAsymmetric a Double, CanBeErrors es, CanTestCertainly (OrderCompareType a Double)) => HasOrderAsymmetric (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType (CollectErrors es a) Double Source #

(HasEqAsymmetric a Double, CanBeErrors es, CanTestCertainly (EqCompareType a Double)) => HasEqAsymmetric (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (CollectErrors es a) Double Source #

(CanMinMaxAsymmetric a Double, CanBeErrors es) => CanMinMaxAsymmetric (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType (CollectErrors es a) Double Source #

(CanSub a Double, CanBeErrors es) => CanSub (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType (CollectErrors es a) Double Source #

(CanAddAsymmetric a Double, CanBeErrors es) => CanAddAsymmetric (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType (CollectErrors es a) Double 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 #

(/=) :: URec Double p -> URec Double p -> Bool #

Ord (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Double p -> URec Double p -> Ordering #

(<) :: URec Double p -> URec Double p -> Bool #

(<=) :: URec Double p -> URec Double p -> Bool #

(>) :: URec Double p -> URec Double p -> Bool #

(>=) :: URec Double p -> URec Double p -> Bool #

max :: URec Double p -> URec Double p -> URec Double p #

min :: URec Double p -> URec Double p -> URec Double p #

Show (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Double p -> ShowS #

show :: URec Double p -> String #

showList :: [URec Double p] -> ShowS #

Generic (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Double p) :: Type -> Type #

Methods

from :: URec Double p -> Rep (URec Double p) x #

to :: Rep (URec Double p) x -> URec Double p #

type NegType Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type AbsType Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type RoundType Double Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type SinCosType Double Source # 
Instance details

Defined in Numeric.MixedTypes.Elementary

type LogType Double Source # 
Instance details

Defined in Numeric.MixedTypes.Elementary

type ExpType Double Source # 
Instance details

Defined in Numeric.MixedTypes.Elementary

type SqrtType Double Source # 
Instance details

Defined in Numeric.MixedTypes.Elementary

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 {}
type OrderCompareType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type EqCompareType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type SubType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type MulType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type DivIType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type PowType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type DivType Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type EqCompareType Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type SubType Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type AddType Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType Double (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Double (CN b) = CN (MulType Double b)
type DivIType Double (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Double (CN t2) = CN (DivIType Double t2)
type ModType Double (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Double (CN t2) = CN (ModType Double t2)
type PowType Double (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Double (CN e) = CN (PowType Double e)
type PPowType Double (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type DivType Double (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type DivType Double (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Double (CN b) = CN (DivType Double b)
type Rep1 (URec Double :: k -> Type) 
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 OrderCompareType Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type EqCompareType Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type SubType Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type EqCompareType (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type SubType (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type AddType (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType (CN a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType (CN a) Double = CN (MulType a Double)
type DivIType (CN t1) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType (CN t1) Double = CN (DivIType t1 Double)
type ModType (CN t1) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType (CN t1) Double = CN (ModType t1 Double)
type PowType (CN b) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType (CN b) Double = CN (PowType b Double)
type PPowType (CN b) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type DivType (Complex a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type DivType (CN a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType (CN a) Double = CN (DivType a Double)
type OrderCompareType (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type EqCompareType (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type SubType (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type Rep (URec Double p) 
Instance details

Defined in GHC.Generics

type Rep (URec Double p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: Type -> Type)))

data Float #

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

Instances

Instances details
Eq Float

Note that due to the presence of NaN, Float's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Float)
False

Also note that Float's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Float)
True
>>> recip 0 == recip (-0 :: Float)
False
Instance details

Defined in GHC.Classes

Methods

(==) :: Float -> Float -> Bool #

(/=) :: Float -> Float -> Bool #

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

Ord Float

Note that due to the presence of NaN, Float's Ord instance does not satisfy reflexivity.

>>> 0/0 <= (0/0 :: Float)
False

Also note that, due to the same, Ord's operator interactions are not respected by Float's instance:

>>> (0/0 :: Float) > 1
False
>>> compare (0/0 :: Float) 1
GT
Instance details

Defined in GHC.Classes

Methods

compare :: Float -> Float -> Ordering #

(<) :: Float -> Float -> Bool #

(<=) :: Float -> Float -> Bool #

(>) :: Float -> Float -> Bool #

(>=) :: Float -> Float -> Bool #

max :: Float -> Float -> Float #

min :: Float -> Float -> Float #

Read Float

Since: base-2.1

Instance details

Defined in GHC.Read

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

Function Float 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Float -> b) -> Float :-> b #

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 #

PrintfArg Float

Since: base-2.1

Instance details

Defined in Text.Printf

Lift Float 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Float -> Q Exp #

liftTyped :: Float -> Q (TExp Float) #

Monad m => Serial m Float 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m Float #

Monad m => CoSerial m Float 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b -> Series m (Float -> b) #

Convertible Double Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Int8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Int16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Int32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Int64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Word8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Word16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Word32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Word64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int8 Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int16 Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int32 Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int64 Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word8 Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word16 Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word32 Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word64 Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Generic1 (URec Float :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Float) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Float a -> Rep1 (URec Float) a #

to1 :: forall (a :: k0). Rep1 (URec Float) a -> URec Float a #

Foldable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UFloat m -> m #

foldMap :: Monoid m => (a -> m) -> UFloat a -> m #

foldMap' :: Monoid m => (a -> m) -> UFloat a -> m #

foldr :: (a -> b -> b) -> b -> UFloat a -> b #

foldr' :: (a -> b -> b) -> b -> UFloat a -> b #

foldl :: (b -> a -> b) -> b -> UFloat a -> b #

foldl' :: (b -> a -> b) -> b -> UFloat a -> b #

foldr1 :: (a -> a -> a) -> UFloat a -> a #

foldl1 :: (a -> a -> a) -> UFloat a -> a #

toList :: UFloat a -> [a] #

null :: UFloat a -> Bool #

length :: UFloat a -> Int #

elem :: Eq a => a -> UFloat a -> Bool #

maximum :: Ord a => UFloat a -> a #

minimum :: Ord a => UFloat a -> a #

sum :: Num a => UFloat a -> a #

product :: Num a => UFloat a -> a #

Traversable (UFloat :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) #

sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) #

mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) #

sequence :: Monad m => UFloat (m a) -> m (UFloat a) #

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 #

(<$) :: a -> URec Float b -> URec Float a #

Eq (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

(==) :: URec Float p -> URec Float p -> Bool #

(/=) :: URec Float p -> URec Float p -> Bool #

Ord (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

compare :: URec Float p -> URec Float p -> Ordering #

(<) :: URec Float p -> URec Float p -> Bool #

(<=) :: URec Float p -> URec Float p -> Bool #

(>) :: URec Float p -> URec Float p -> Bool #

(>=) :: URec Float p -> URec Float p -> Bool #

max :: URec Float p -> URec Float p -> URec Float p #

min :: URec Float p -> URec Float p -> URec Float p #

Show (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Float p -> ShowS #

show :: URec Float p -> String #

showList :: [URec Float p] -> ShowS #

Generic (URec Float p) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Float p) :: Type -> Type #

Methods

from :: URec Float p -> Rep (URec Float p) x #

to :: Rep (URec Float p) x -> URec Float p #

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 {}
type Rep1 (URec Float :: k -> Type) 
Instance details

Defined in GHC.Generics

type Rep1 (URec Float :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: k -> Type)))
type Rep (URec Float p) 
Instance details

Defined in GHC.Generics

type Rep (URec Float p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: Type -> Type)))

data Int #

A fixed-precision integer type with at least the range [-2^29 .. 2^29-1]. The exact range for a given implementation can be determined by using minBound and maxBound from the Bounded class.

Instances

Instances details
Bounded Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: Int #

maxBound :: Int #

Enum Int

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Int -> Int #

pred :: Int -> Int #

toEnum :: Int -> Int #

fromEnum :: Int -> Int #

enumFrom :: Int -> [Int] #

enumFromThen :: Int -> Int -> [Int] #

enumFromTo :: Int -> Int -> [Int] #

enumFromThenTo :: Int -> Int -> Int -> [Int] #

Eq Int 
Instance details

Defined in GHC.Classes

Methods

(==) :: Int -> Int -> Bool #

(/=) :: Int -> Int -> Bool #

Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

quot :: Int -> Int -> Int #

rem :: Int -> Int -> Int #

div :: Int -> Int -> Int #

mod :: Int -> Int -> Int #

quotRem :: Int -> Int -> (Int, Int) #

divMod :: Int -> Int -> (Int, Int) #

toInteger :: Int -> Integer #

Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Int -> Int -> Int #

(-) :: Int -> Int -> Int #

(*) :: Int -> Int -> Int #

negate :: Int -> Int #

abs :: Int -> Int #

signum :: Int -> Int #

fromInteger :: Integer -> Int #

Ord Int 
Instance details

Defined in GHC.Classes

Methods

compare :: Int -> Int -> Ordering #

(<) :: Int -> Int -> Bool #

(<=) :: Int -> Int -> Bool #

(>) :: Int -> Int -> Bool #

(>=) :: Int -> Int -> Bool #

max :: Int -> Int -> Int #

min :: Int -> Int -> Int #

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Real Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Int -> Rational #

Show Int

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Int -> ShowS #

show :: Int -> String #

showList :: [Int] -> ShowS #

Function Int 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Int -> b) -> Int :-> b #

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 #

PrintfArg Int

Since: base-2.1

Instance details

Defined in Text.Printf

CanNeg Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type NegType Int Source #

Methods

negate :: Int -> NegType Int Source #

CanTestPosNeg Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

CanPickNonZero Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Methods

pickNonZero :: [(Int, s)] -> Maybe (Int, s) Source #

CanTestZero Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestInteger Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestFinite Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanGiveUpIfVeryInaccurate Int Source # 
Instance details

Defined in Numeric.MixedTypes.Reduce

CanAbs Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type AbsType Int Source #

Methods

abs :: Int -> AbsType Int Source #

HasIntegerBounds Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanTestIsIntegerType Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Lift Int 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int -> Q Exp #

liftTyped :: Int -> Q (TExp Int) #

Monad m => Serial m Int 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m Int #

Monad m => CoSerial m Int 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b -> Series m (Int -> b) #

Convertible Char Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Int8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Int16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Int32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Int64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Word8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Word16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Word32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Word64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int8 Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int16 Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int32 Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int64 Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word8 Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word16 Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word32 Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word64 Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

ConvertibleExactly Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

HasOrderAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double Int Source #

HasOrderAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Double Source #

HasOrderAsymmetric Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Int Source #

HasOrderAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Integer Source #

HasOrderAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Rational Source #

HasOrderAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer Int Source #

HasOrderAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Rational Int Source #

HasEqAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Double Int Source #

HasEqAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Int Double Source #

HasEqAsymmetric Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Int Int Source #

HasEqAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Int Integer Source #

HasEqAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Int Rational Source #

HasEqAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Integer Int Source #

HasEqAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Rational Int Source #

CanMinMaxAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Double Int Source #

CanMinMaxAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Int Double Source #

CanMinMaxAsymmetric Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Int Int Source #

CanMinMaxAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Int Integer Source #

CanMinMaxAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Int Rational Source #

CanMinMaxAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Integer Int Source #

CanMinMaxAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Rational Int Source #

CanSub Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Double Int Source #

CanSub Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Int Double Source #

CanSub Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Int Int Source #

Methods

sub :: Int -> Int -> SubType Int Int Source #

CanSub Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Int Integer Source #

CanSub Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Int Rational Source #

CanSub Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Integer Int Source #

CanSub Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Rational Int Source #

CanAddAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Double Int Source #

CanAddAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Int Double Source #

CanAddAsymmetric Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Int Int Source #

Methods

add :: Int -> Int -> AddType Int Int Source #

CanAddAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Int Integer Source #

CanAddAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Int Rational Source #

CanAddAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Integer Int Source #

CanAddAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Rational Int Source #

CanMulAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Double Int Source #

CanMulAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Int Double Source #

CanMulAsymmetric Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Int Int Source #

Methods

mul :: Int -> Int -> MulType Int Int Source #

CanMulAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Int Integer Source #

CanMulAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Int Rational Source #

CanMulAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Integer Int Source #

CanMulAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Rational Int Source #

CanDivIMod Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Int Int Source #

type ModType Int Int Source #

CanDivIMod Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Int Integer Source #

type ModType Int Integer Source #

CanDivIMod Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Int Rational Source #

type ModType Int Rational Source #

CanDivIMod Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Integer Int Source #

type ModType Integer Int Source #

CanDivIMod Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Rational Int Source #

type ModType Rational Int Source #

CanPow Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Double Int Source #

type PPowType Double Int Source #

CanPow Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int Double Source #

type PPowType Int Double Source #

CanPow Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int Int Source #

type PPowType Int Int Source #

CanPow Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int Integer Source #

type PPowType Int Integer Source #

CanPow Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Integer Int Source #

type PPowType Integer Int Source #

CanPow Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Rational Int Source #

type PPowType Rational Int Source #

CanDiv Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Double Int Source #

CanDiv Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Int Double Source #

CanDiv Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Int Int Source #

Methods

divide :: Int -> Int -> DivType Int Int Source #

CanDiv Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Int Integer Source #

CanDiv Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Int Rational Source #

CanDiv Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Integer Int Source #

CanDiv Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Rational Int Source #

ConvertibleExactly Int t => ConvertibleExactly Int (Complex t) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

HasEqAsymmetric Int b => HasEqAsymmetric Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type EqCompareType Int (Complex b) Source #

CanSub Int b => CanSub Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type SubType Int (Complex b) Source #

Methods

sub :: Int -> Complex b -> SubType Int (Complex b) Source #

CanAddAsymmetric Int b => CanAddAsymmetric Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type AddType Int (Complex b) Source #

Methods

add :: Int -> Complex b -> AddType Int (Complex b) Source #

CanMulAsymmetric Int b => CanMulAsymmetric Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type MulType Int (Complex b) Source #

Methods

mul :: Int -> Complex b -> MulType Int (Complex b) Source #

(CanMulAsymmetric Int b, CanGiveUpIfVeryInaccurate (MulType Int b)) => CanMulAsymmetric Int (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Int (CN b) Source #

Methods

mul :: Int -> CN b -> MulType Int (CN b) Source #

(CanDivIMod Int t2, CanTestPosNeg t2) => CanDivIMod Int (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Int (CN t2) Source #

type ModType Int (CN t2) Source #

Methods

divIMod :: Int -> CN t2 -> (DivIType Int (CN t2), ModType Int (CN t2)) Source #

mod :: Int -> CN t2 -> ModType Int (CN t2) Source #

divI :: Int -> CN t2 -> DivIType Int (CN t2) Source #

(CanPow Int e, HasOrderCertainly e Integer, CanTestIsIntegerType e, CanTestInteger e) => CanPow Int (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int (CN e) Source #

type PPowType Int (CN e) Source #

Methods

pow :: Int -> CN e -> PowType Int (CN e) Source #

ppow :: Int -> CN e -> PPowType Int (CN e) Source #

(CanMulAsymmetric Int b, CanMulAsymmetric b b, CanAddSameType (MulType b b), CanDiv (MulType Int b) (MulType b b)) => CanDiv Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type DivType Int (Complex b) Source #

Methods

divide :: Int -> Complex b -> DivType Int (Complex b) Source #

(CanDiv Int b, CanTestZero b) => CanDiv Int (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Int (CN b) Source #

Methods

divide :: Int -> CN b -> DivType Int (CN b) Source #

Generic1 (URec Int :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Int) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Int a -> Rep1 (URec Int) a #

to1 :: forall (a :: k0). Rep1 (URec Int) a -> URec Int a #

(ConvertibleExactly Int t, Monoid es) => ConvertibleExactly Int (CollectErrors es t) Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

(HasOrderAsymmetric Int b, CanBeErrors es, CanTestCertainly (OrderCompareType Int b)) => HasOrderAsymmetric Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int (CollectErrors es b) Source #

(HasEqAsymmetric Int b, CanBeErrors es, CanTestCertainly (EqCompareType Int b)) => HasEqAsymmetric Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Int (CollectErrors es b) Source #

(CanMinMaxAsymmetric Int b, CanBeErrors es) => CanMinMaxAsymmetric Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Int (CollectErrors es b) Source #

(CanSub Int b, CanBeErrors es) => CanSub Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Int (CollectErrors es b) Source #

Methods

sub :: Int -> CollectErrors es b -> SubType Int (CollectErrors es b) Source #

(CanAddAsymmetric Int b, CanBeErrors es) => CanAddAsymmetric Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Int (CollectErrors es b) Source #

Methods

add :: Int -> CollectErrors es b -> AddType Int (CollectErrors es b) Source #

Foldable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UInt m -> m #

foldMap :: Monoid m => (a -> m) -> UInt a -> m #

foldMap' :: Monoid m => (a -> m) -> UInt a -> m #

foldr :: (a -> b -> b) -> b -> UInt a -> b #

foldr' :: (a -> b -> b) -> b -> UInt a -> b #

foldl :: (b -> a -> b) -> b -> UInt a -> b #

foldl' :: (b -> a -> b) -> b -> UInt a -> b #

foldr1 :: (a -> a -> a) -> UInt a -> a #

foldl1 :: (a -> a -> a) -> UInt a -> a #

toList :: UInt a -> [a] #

null :: UInt a -> Bool #

length :: UInt a -> Int #

elem :: Eq a => a -> UInt a -> Bool #

maximum :: Ord a => UInt a -> a #

minimum :: Ord a => UInt a -> a #

sum :: Num a => UInt a -> a #

product :: Num a => UInt a -> a #

Traversable (UInt :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) #

sequenceA :: Applicative f => UInt (f a) -> f (UInt a) #

mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) #

sequence :: Monad m => UInt (m a) -> m (UInt a) #

HasEqAsymmetric a Int => HasEqAsymmetric (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type EqCompareType (Complex a) Int Source #

CanSub a Int => CanSub (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type SubType (Complex a) Int Source #

Methods

sub :: Complex a -> Int -> SubType (Complex a) Int Source #

CanAddAsymmetric a Int => CanAddAsymmetric (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type AddType (Complex a) Int Source #

Methods

add :: Complex a -> Int -> AddType (Complex a) Int Source #

CanMulAsymmetric a Int => CanMulAsymmetric (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type MulType (Complex a) Int Source #

Methods

mul :: Complex a -> Int -> MulType (Complex a) Int Source #

(CanMulAsymmetric a Int, CanGiveUpIfVeryInaccurate (MulType a Int)) => CanMulAsymmetric (CN a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType (CN a) Int Source #

Methods

mul :: CN a -> Int -> MulType (CN a) Int Source #

CanDivIMod t1 Int => CanDivIMod (CN t1) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType (CN t1) Int Source #

type ModType (CN t1) Int Source #

Methods

divIMod :: CN t1 -> Int -> (DivIType (CN t1) Int, ModType (CN t1) Int) Source #

mod :: CN t1 -> Int -> ModType (CN t1) Int Source #

divI :: CN t1 -> Int -> DivIType (CN t1) Int Source #

(CanPow b Int, HasOrderCertainly b Integer, HasEqCertainly b Integer, CanTestIsIntegerType b) => CanPow (CN b) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (CN b) Int Source #

type PPowType (CN b) Int Source #

Methods

pow :: CN b -> Int -> PowType (CN b) Int Source #

ppow :: CN b -> Int -> PPowType (CN b) Int Source #

CanDiv a Int => CanDiv (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type DivType (Complex a) Int Source #

Methods

divide :: Complex a -> Int -> DivType (Complex a) Int Source #

CanDiv a Int => CanDiv (CN a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType (CN a) Int Source #

Methods

divide :: CN a -> Int -> DivType (CN a) Int 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 #

(<$) :: a -> URec Int b -> URec Int a #

(HasOrderAsymmetric a Int, CanBeErrors es, CanTestCertainly (OrderCompareType a Int)) => HasOrderAsymmetric (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType (CollectErrors es a) Int Source #

(HasEqAsymmetric a Int, CanBeErrors es, CanTestCertainly (EqCompareType a Int)) => HasEqAsymmetric (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (CollectErrors es a) Int Source #

(CanMinMaxAsymmetric a Int, CanBeErrors es) => CanMinMaxAsymmetric (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType (CollectErrors es a) Int Source #

(CanSub a Int, CanBeErrors es) => CanSub (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType (CollectErrors es a) Int Source #

Methods

sub :: CollectErrors es a -> Int -> SubType (CollectErrors es a) Int Source #

(CanAddAsymmetric a Int, CanBeErrors es) => CanAddAsymmetric (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType (CollectErrors es a) Int Source #

Methods

add :: CollectErrors es a -> Int -> AddType (CollectErrors es a) Int 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 #

(/=) :: URec Int p -> URec Int p -> Bool #

Ord (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Int p -> URec Int p -> Ordering #

(<) :: URec Int p -> URec Int p -> Bool #

(<=) :: URec Int p -> URec Int p -> Bool #

(>) :: URec Int p -> URec Int p -> Bool #

(>=) :: URec Int p -> URec Int p -> Bool #

max :: URec Int p -> URec Int p -> URec Int p #

min :: URec Int p -> URec Int p -> URec Int p #

Show (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Int p -> ShowS #

show :: URec Int p -> String #

showList :: [URec Int p] -> ShowS #

Generic (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Int p) :: Type -> Type #

Methods

from :: URec Int p -> Rep (URec Int p) x #

to :: Rep (URec Int p) x -> URec Int p #

type NegType Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type NegType Int = Int
type AbsType Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type AbsType Int = 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 OrderCompareType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type EqCompareType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type SubType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type MulType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type DivIType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type PowType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type DivType Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type EqCompareType Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type SubType Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type AddType Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType Int (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Int (CN b) = CN (MulType Int b)
type DivIType Int (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Int (CN t2) = CN (DivIType Int t2)
type ModType Int (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Int (CN t2) = CN (ModType Int t2)
type PowType Int (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Int (CN e) = CN (PowType Int e)
type PPowType Int (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Int (CN e) = CN (PPowType Int e)
type DivType Int (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type DivType Int (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Int (CN b) = CN (DivType Int b)
type Rep1 (URec Int :: k -> Type) 
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 OrderCompareType Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type EqCompareType Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type SubType Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type EqCompareType (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type SubType (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type AddType (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType (CN a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType (CN a) Int = CN (MulType a Int)
type DivIType (CN t1) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType (CN t1) Int = CN (DivIType t1 Int)
type ModType (CN t1) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType (CN t1) Int = CN (ModType t1 Int)
type PowType (CN b) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType (CN b) Int = CN (PowType b Int)
type PPowType (CN b) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType (CN b) Int = CN (PPowType b Int)
type DivType (Complex a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type DivType (CN a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType (CN a) Int = CN (DivType a Int)
type OrderCompareType (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type EqCompareType (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type SubType (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type Rep (URec Int p) 
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 Integer #

Arbitrary precision integers. In contrast with fixed-size integral types such as Int, the Integer type represents the entire infinite range of integers.

For more information about this type's representation, see the comments in its implementation.

Instances

Instances details
Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Integer 
Instance details

Defined in GHC.Integer.Type

Methods

(==) :: Integer -> Integer -> Bool #

(/=) :: Integer -> Integer -> Bool #

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Ord Integer 
Instance details

Defined in GHC.Integer.Type

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Function Integer 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Integer -> b) -> Integer :-> b #

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 #

PrintfArg Integer

Since: base-2.1

Instance details

Defined in Text.Printf

CanNeg Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type NegType Integer Source #

CanNeg Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type NegType Rational Source #

CanTestPosNeg Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

CanTestPosNeg Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

CanPickNonZero Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Methods

pickNonZero :: [(Integer, s)] -> Maybe (Integer, s) Source #

CanPickNonZero Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Methods

pickNonZero :: [(Rational, s)] -> Maybe (Rational, s) Source #

CanTestZero Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestZero Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestInteger Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestInteger Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestFinite Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestFinite Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

CanTestNaN Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Methods

isNaN :: Integer -> Bool Source #

CanTestNaN Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Methods

isNaN :: Rational -> Bool Source #

CanGiveUpIfVeryInaccurate Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Reduce

CanGiveUpIfVeryInaccurate Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Reduce

CanAbs Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type AbsType Integer Source #

CanAbs Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type AbsType Rational Source #

HasIntegerBounds Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

HasIntegerBounds Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanRound Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type RoundType Rational Source #

OrderedCertainlyRing Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

OrderedCertainlyRing Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

OrderedRing Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

OrderedRing Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

Ring Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

Ring Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

CanTestIsIntegerType Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanTestIsIntegerType Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

OrderedCertainlyField Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Field

OrderedField Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Field

Field Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Field

Lift Integer 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Integer -> Q Exp #

liftTyped :: Integer -> Q (TExp Integer) #

Monad m => Serial m Integer 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m Integer #

Monad m => CoSerial m Integer 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b -> Series m (Integer -> b) #

Convertible Char Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int8 Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int8 Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int16 Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int16 Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int32 Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int32 Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int64 Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int64 Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Int8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Int16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Int32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Int64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Word8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Word16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Word32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Word64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Int8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Int16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Int32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Int64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Word8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Word16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Word32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Word64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word8 Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word8 Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word16 Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word16 Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word32 Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word32 Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word64 Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word64 Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

ConvertibleExactly Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

ConvertibleExactly Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

HasOrderAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double Integer Source #

HasOrderAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Integer Source #

HasOrderAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Rational Source #

HasOrderAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer Double Source #

HasOrderAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer Int Source #

HasOrderAsymmetric Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer Integer Source #

HasOrderAsymmetric Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

HasOrderAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Rational Int Source #

HasOrderAsymmetric Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

HasOrderAsymmetric Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

HasEqAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Double Integer Source #

HasEqAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Int Integer Source #

HasEqAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Int Rational Source #

HasEqAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Integer Double Source #

HasEqAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Integer Int Source #

HasEqAsymmetric Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Integer Integer Source #

HasEqAsymmetric Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Integer Rational Source #

HasEqAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Rational Int Source #

HasEqAsymmetric Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Rational Integer Source #

HasEqAsymmetric Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Rational Rational Source #

CanMinMaxAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Double Integer Source #

CanMinMaxAsymmetric Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Double Rational Source #

CanMinMaxAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Int Integer Source #

CanMinMaxAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Int Rational Source #

CanMinMaxAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Integer Double Source #

CanMinMaxAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Integer Int Source #

CanMinMaxAsymmetric Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Integer Integer Source #

CanMinMaxAsymmetric Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Integer Rational Source #

CanMinMaxAsymmetric Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Rational Double Source #

CanMinMaxAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Rational Int Source #

CanMinMaxAsymmetric Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Rational Integer Source #

CanMinMaxAsymmetric Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Rational Rational Source #

CanSub Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Double Integer Source #

CanSub Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Double Rational Source #

CanSub Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Int Integer Source #

CanSub Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Int Rational Source #

CanSub Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Integer Double Source #

CanSub Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Integer Int Source #

CanSub Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Integer Integer Source #

CanSub Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Integer Rational Source #

CanSub Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Rational Double Source #

CanSub Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Rational Int Source #

CanSub Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Rational Integer Source #

CanSub Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Rational Rational Source #

CanAddAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Double Integer Source #

CanAddAsymmetric Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Double Rational Source #

CanAddAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Int Integer Source #

CanAddAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Int Rational Source #

CanAddAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Integer Double Source #

CanAddAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Integer Int Source #

CanAddAsymmetric Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Integer Integer Source #

CanAddAsymmetric Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Integer Rational Source #

CanAddAsymmetric Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Rational Double Source #

CanAddAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Rational Int Source #

CanAddAsymmetric Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Rational Integer Source #

CanAddAsymmetric Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Rational Rational Source #

CanMulAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Double Integer Source #

CanMulAsymmetric Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Double Rational Source #

CanMulAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Int Integer Source #

CanMulAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Int Rational Source #

CanMulAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Integer Double Source #

CanMulAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Integer Int Source #

CanMulAsymmetric Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Integer Integer Source #

CanMulAsymmetric Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Integer Rational Source #

CanMulAsymmetric Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Rational Double Source #

CanMulAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Rational Int Source #

CanMulAsymmetric Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Rational Integer Source #

CanMulAsymmetric Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Rational Rational Source #

CanDivIMod Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanDivIMod Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Int Integer Source #

type ModType Int Integer Source #

CanDivIMod Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Int Rational Source #

type ModType Int Rational Source #

CanDivIMod Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Integer Int Source #

type ModType Integer Int Source #

CanDivIMod Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanDivIMod Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanDivIMod Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Rational Int Source #

type ModType Rational Int Source #

CanDivIMod Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanDivIMod Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

CanPow Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanPow Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanPow Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Int Integer Source #

type PPowType Int Integer Source #

CanPow Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanPow Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Integer Int Source #

type PPowType Integer Int Source #

CanPow Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanPow Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanPow Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Rational Int Source #

type PPowType Rational Int Source #

CanPow Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

CanDiv Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Double Integer Source #

CanDiv Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Double Rational Source #

CanDiv Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Int Integer Source #

CanDiv Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Int Rational Source #

CanDiv Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Integer Double Source #

CanDiv Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Integer Int Source #

CanDiv Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Integer Integer Source #

CanDiv Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Integer Rational Source #

CanDiv Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Rational Double Source #

CanDiv Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Rational Int Source #

CanDiv Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Rational Integer Source #

CanDiv Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Rational Rational Source #

ConvertibleExactly Integer t => ConvertibleExactly Integer (Complex t) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

ConvertibleExactly Rational t => ConvertibleExactly Rational (Complex t) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

HasEqAsymmetric Integer b => HasEqAsymmetric Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type EqCompareType Integer (Complex b) Source #

HasEqAsymmetric Rational b => HasEqAsymmetric Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type EqCompareType Rational (Complex b) Source #

CanSub Integer b => CanSub Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type SubType Integer (Complex b) Source #

CanSub Rational b => CanSub Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type SubType Rational (Complex b) Source #

CanAddAsymmetric Integer b => CanAddAsymmetric Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type AddType Integer (Complex b) Source #

CanAddAsymmetric Rational b => CanAddAsymmetric Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type AddType Rational (Complex b) Source #

CanMulAsymmetric Integer b => CanMulAsymmetric Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type MulType Integer (Complex b) Source #

(CanMulAsymmetric Integer b, CanGiveUpIfVeryInaccurate (MulType Integer b)) => CanMulAsymmetric Integer (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Integer (CN b) Source #

Methods

mul :: Integer -> CN b -> MulType Integer (CN b) Source #

CanMulAsymmetric Rational b => CanMulAsymmetric Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type MulType Rational (Complex b) Source #

(CanMulAsymmetric Rational b, CanGiveUpIfVeryInaccurate (MulType Rational b)) => CanMulAsymmetric Rational (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType Rational (CN b) Source #

Methods

mul :: Rational -> CN b -> MulType Rational (CN b) Source #

(CanDivIMod Integer t2, CanTestPosNeg t2) => CanDivIMod Integer (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Integer (CN t2) Source #

type ModType Integer (CN t2) Source #

Methods

divIMod :: Integer -> CN t2 -> (DivIType Integer (CN t2), ModType Integer (CN t2)) Source #

mod :: Integer -> CN t2 -> ModType Integer (CN t2) Source #

divI :: Integer -> CN t2 -> DivIType Integer (CN t2) Source #

(CanDivIMod Rational t2, CanTestPosNeg t2) => CanDivIMod Rational (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType Rational (CN t2) Source #

type ModType Rational (CN t2) Source #

Methods

divIMod :: Rational -> CN t2 -> (DivIType Rational (CN t2), ModType Rational (CN t2)) Source #

mod :: Rational -> CN t2 -> ModType Rational (CN t2) Source #

divI :: Rational -> CN t2 -> DivIType Rational (CN t2) Source #

(CanPow Integer e, HasOrderCertainly e Integer, CanTestIsIntegerType e, CanTestInteger e) => CanPow Integer (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Integer (CN e) Source #

type PPowType Integer (CN e) Source #

Methods

pow :: Integer -> CN e -> PowType Integer (CN e) Source #

ppow :: Integer -> CN e -> PPowType Integer (CN e) Source #

(CanPow Rational e, HasOrderCertainly e Integer, CanTestIsIntegerType e, CanTestInteger e) => CanPow Rational (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType Rational (CN e) Source #

type PPowType Rational (CN e) Source #

Methods

pow :: Rational -> CN e -> PowType Rational (CN e) Source #

ppow :: Rational -> CN e -> PPowType Rational (CN e) Source #

(CanMulAsymmetric Integer b, CanMulAsymmetric b b, CanAddSameType (MulType b b), CanDiv (MulType Integer b) (MulType b b)) => CanDiv Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type DivType Integer (Complex b) Source #

(CanDiv Integer b, CanTestZero b) => CanDiv Integer (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Integer (CN b) Source #

Methods

divide :: Integer -> CN b -> DivType Integer (CN b) Source #

(CanMulAsymmetric Rational b, CanMulAsymmetric b b, CanAddSameType (MulType b b), CanDiv (MulType Rational b) (MulType b b)) => CanDiv Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type DivType Rational (Complex b) Source #

(CanDiv Rational b, CanTestZero b) => CanDiv Rational (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType Rational (CN b) Source #

Methods

divide :: Rational -> CN b -> DivType Rational (CN b) Source #

(ConvertibleExactly Integer t, Monoid es) => ConvertibleExactly Integer (CollectErrors es t) Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

(ConvertibleExactly Rational t, Monoid es) => ConvertibleExactly Rational (CollectErrors es t) Source # 
Instance details

Defined in Numeric.MixedTypes.Literals

(HasOrderAsymmetric Integer b, CanBeErrors es, CanTestCertainly (OrderCompareType Integer b)) => HasOrderAsymmetric Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer (CollectErrors es b) Source #

(HasOrderAsymmetric Rational b, CanBeErrors es, CanTestCertainly (OrderCompareType Rational b)) => HasOrderAsymmetric Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Rational (CollectErrors es b) Source #

(HasEqAsymmetric Integer b, CanBeErrors es, CanTestCertainly (EqCompareType Integer b)) => HasEqAsymmetric Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Integer (CollectErrors es b) Source #

(HasEqAsymmetric Rational b, CanBeErrors es, CanTestCertainly (EqCompareType Rational b)) => HasEqAsymmetric Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType Rational (CollectErrors es b) Source #

(CanMinMaxAsymmetric Integer b, CanBeErrors es) => CanMinMaxAsymmetric Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Integer (CollectErrors es b) Source #

(CanMinMaxAsymmetric Rational b, CanBeErrors es) => CanMinMaxAsymmetric Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType Rational (CollectErrors es b) Source #

(CanSub Integer b, CanBeErrors es) => CanSub Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Integer (CollectErrors es b) Source #

(CanSub Rational b, CanBeErrors es) => CanSub Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType Rational (CollectErrors es b) Source #

(CanAddAsymmetric Integer b, CanBeErrors es) => CanAddAsymmetric Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Integer (CollectErrors es b) Source #

(CanAddAsymmetric Rational b, CanBeErrors es) => CanAddAsymmetric Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType Rational (CollectErrors es b) Source #

OrderedCertainlyRing (CN Integer) Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

OrderedCertainlyRing (CN Rational) Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

OrderedRing (CN Integer) Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

OrderedRing (CN Rational) Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

Ring (CN Integer) Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

Ring (CN Rational) Source # 
Instance details

Defined in Numeric.MixedTypes.Ring

OrderedCertainlyField (CN Rational) Source # 
Instance details

Defined in Numeric.MixedTypes.Field

OrderedField (CN Rational) Source # 
Instance details

Defined in Numeric.MixedTypes.Field

Field (CN Rational) Source # 
Instance details

Defined in Numeric.MixedTypes.Field

HasEqAsymmetric a Integer => HasEqAsymmetric (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type EqCompareType (Complex a) Integer Source #

HasEqAsymmetric a Rational => HasEqAsymmetric (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type EqCompareType (Complex a) Rational Source #

CanSub a Integer => CanSub (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type SubType (Complex a) Integer Source #

CanSub a Rational => CanSub (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type SubType (Complex a) Rational Source #

CanAddAsymmetric a Integer => CanAddAsymmetric (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type AddType (Complex a) Integer Source #

CanAddAsymmetric a Rational => CanAddAsymmetric (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type AddType (Complex a) Rational Source #

CanMulAsymmetric a Integer => CanMulAsymmetric (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type MulType (Complex a) Integer Source #

CanMulAsymmetric a Rational => CanMulAsymmetric (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type MulType (Complex a) Rational Source #

(CanMulAsymmetric a Integer, CanGiveUpIfVeryInaccurate (MulType a Integer)) => CanMulAsymmetric (CN a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType (CN a) Integer Source #

Methods

mul :: CN a -> Integer -> MulType (CN a) Integer Source #

(CanMulAsymmetric a Rational, CanGiveUpIfVeryInaccurate (MulType a Rational)) => CanMulAsymmetric (CN a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType (CN a) Rational Source #

Methods

mul :: CN a -> Rational -> MulType (CN a) Rational Source #

CanDivIMod t1 Integer => CanDivIMod (CN t1) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType (CN t1) Integer Source #

type ModType (CN t1) Integer Source #

Methods

divIMod :: CN t1 -> Integer -> (DivIType (CN t1) Integer, ModType (CN t1) Integer) Source #

mod :: CN t1 -> Integer -> ModType (CN t1) Integer Source #

divI :: CN t1 -> Integer -> DivIType (CN t1) Integer Source #

CanDivIMod t1 Rational => CanDivIMod (CN t1) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

Associated Types

type DivIType (CN t1) Rational Source #

type ModType (CN t1) Rational Source #

Methods

divIMod :: CN t1 -> Rational -> (DivIType (CN t1) Rational, ModType (CN t1) Rational) Source #

mod :: CN t1 -> Rational -> ModType (CN t1) Rational Source #

divI :: CN t1 -> Rational -> DivIType (CN t1) Rational Source #

(CanPow b Integer, HasOrderCertainly b Integer, HasEqCertainly b Integer, CanTestIsIntegerType b) => CanPow (CN b) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (CN b) Integer Source #

type PPowType (CN b) Integer Source #

Methods

pow :: CN b -> Integer -> PowType (CN b) Integer Source #

ppow :: CN b -> Integer -> PPowType (CN b) Integer Source #

(CanPow b Rational, HasOrderCertainly b Integer, HasEqCertainly b Integer, CanTestIsIntegerType b) => CanPow (CN b) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (CN b) Rational Source #

type PPowType (CN b) Rational Source #

Methods

pow :: CN b -> Rational -> PowType (CN b) Rational Source #

ppow :: CN b -> Rational -> PPowType (CN b) Rational Source #

CanDiv a Integer => CanDiv (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type DivType (Complex a) Integer Source #

CanDiv a Rational => CanDiv (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

Associated Types

type DivType (Complex a) Rational Source #

CanDiv a Integer => CanDiv (CN a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType (CN a) Integer Source #

Methods

divide :: CN a -> Integer -> DivType (CN a) Integer Source #

CanDiv a Rational => CanDiv (CN a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType (CN a) Rational Source #

Methods

divide :: CN a -> Rational -> DivType (CN a) Rational Source #

(HasOrderAsymmetric a Integer, CanBeErrors es, CanTestCertainly (OrderCompareType a Integer)) => HasOrderAsymmetric (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType (CollectErrors es a) Integer Source #

(HasOrderAsymmetric a Rational, CanBeErrors es, CanTestCertainly (OrderCompareType a Rational)) => HasOrderAsymmetric (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType (CollectErrors es a) Rational Source #

(HasEqAsymmetric a Integer, CanBeErrors es, CanTestCertainly (EqCompareType a Integer)) => HasEqAsymmetric (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (CollectErrors es a) Integer Source #

(HasEqAsymmetric a Rational, CanBeErrors es, CanTestCertainly (EqCompareType a Rational)) => HasEqAsymmetric (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (CollectErrors es a) Rational Source #

(CanMinMaxAsymmetric a Integer, CanBeErrors es) => CanMinMaxAsymmetric (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType (CollectErrors es a) Integer Source #

(CanMinMaxAsymmetric a Rational, CanBeErrors es) => CanMinMaxAsymmetric (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType (CollectErrors es a) Rational Source #

(CanSub a Integer, CanBeErrors es) => CanSub (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType (CollectErrors es a) Integer Source #

(CanSub a Rational, CanBeErrors es) => CanSub (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType (CollectErrors es a) Rational Source #

(CanAddAsymmetric a Integer, CanBeErrors es) => CanAddAsymmetric (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType (CollectErrors es a) Integer Source #

(CanAddAsymmetric a Rational, CanBeErrors es) => CanAddAsymmetric (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType (CollectErrors es a) Rational Source #

type NegType Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type NegType Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type AbsType Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type AbsType Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type RoundType Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type OrderCompareType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type EqCompareType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type SubType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type MulType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type DivIType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type PowType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type DivType Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Double Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Rational Double Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type EqCompareType Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type EqCompareType Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type SubType Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type SubType Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type AddType Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type AddType Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType Integer (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType Rational (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type DivIType Integer (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType Rational (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Integer (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType Integer (CN t2) = CN (ModType Integer t2)
type ModType Rational (CN t2) Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type PowType Integer (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType Rational (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Integer (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType Rational (CN e) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type DivType Integer (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type DivType Integer (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType Rational (Complex b) Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type DivType Rational (CN b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type OrderCompareType Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type EqCompareType Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type SubType Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type EqCompareType (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type EqCompareType (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type SubType (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type SubType (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type AddType (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type AddType (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type MulType (CN a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType (CN a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type DivIType (CN t1) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type DivIType (CN t1) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType (CN t1) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType (CN t1) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Round

type ModType (CN t1) Integer = CN (ModType t1 Integer)
type PowType (CN b) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType (CN b) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType (CN b) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType (CN b) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type DivType (Complex a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type DivType (Complex a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Complex

type DivType (CN a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType (CN a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type OrderCompareType (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type OrderCompareType (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

type EqCompareType (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type SubType (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

data Maybe a #

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error.

The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.

Constructors

Nothing 
Just a 

Instances

Instances details
Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #

(>>) :: Maybe a -> Maybe b -> Maybe b #

return :: a -> Maybe a #

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b #

(<$) :: a -> Maybe b -> Maybe a #

MonadFix Maybe

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Maybe a) -> Maybe a #

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> Maybe a #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> Maybe a #

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

(*>) :: Maybe a -> Maybe b -> Maybe b #

(<*) :: Maybe a -> Maybe b -> Maybe a #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Maybe m -> m #

foldMap :: Monoid m => (a -> m) -> Maybe a -> m #

foldMap' :: Monoid m => (a -> m) -> Maybe a -> m #

foldr :: (a -> b -> b) -> b -> Maybe a -> b #

foldr' :: (a -> b -> b) -> b -> Maybe a -> b #

foldl :: (b -> a -> b) -> b -> Maybe a -> b #

foldl' :: (b -> a -> b) -> b -> Maybe a -> b #

foldr1 :: (a -> a -> a) -> Maybe a -> a #

foldl1 :: (a -> a -> a) -> Maybe a -> a #

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

elem :: Eq a => a -> Maybe a -> Bool #

maximum :: Ord a => Maybe a -> a #

minimum :: Ord a => Maybe a -> a #

sum :: Num a => Maybe a -> a #

product :: Num a => Maybe a -> a #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) #

Arbitrary1 Maybe 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (Maybe a) #

liftShrink :: (a -> [a]) -> Maybe a -> [Maybe a] #

Eq1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool #

Ord1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering #

Read1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Maybe a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Maybe a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Maybe a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Maybe a] #

Show1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS #

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: () -> Maybe a #

catchError :: Maybe a -> (() -> Maybe a) -> Maybe a #

Lift a => Lift (Maybe a :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Maybe a -> Q Exp #

liftTyped :: Maybe a -> Q (TExp (Maybe a)) #

Serial m a => Serial m (Maybe a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m (Maybe a) #

CoSerial m a => CoSerial m (Maybe a) 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b -> Series m (Maybe a -> b) #

Eq a => Eq (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

(==) :: Maybe a -> Maybe a -> Bool #

(/=) :: Maybe a -> Maybe a -> Bool #

Ord a => Ord (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

compare :: Maybe a -> Maybe a -> Ordering #

(<) :: Maybe a -> Maybe a -> Bool #

(<=) :: Maybe a -> Maybe a -> Bool #

(>) :: Maybe a -> Maybe a -> Bool #

(>=) :: Maybe a -> Maybe a -> Bool #

max :: Maybe a -> Maybe a -> Maybe a #

min :: Maybe a -> Maybe a -> Maybe a #

Read a => Read (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

Show a => Show (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Generic (Maybe a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a #

sconcat :: NonEmpty (Maybe a) -> Maybe a #

stimes :: Integral b => b -> Maybe a -> Maybe a #

Semigroup a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S."

Since 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Testable prop => Testable (Maybe prop) 
Instance details

Defined in Test.QuickCheck.Property

Methods

property :: Maybe prop -> Property #

propertyForAllShrinkShow :: Gen a -> (a -> [a]) -> (a -> [String]) -> (a -> Maybe prop) -> Property #

Function a => Function (Maybe a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Maybe a -> b) -> Maybe a :-> b #

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 #

SingKind a => SingKind (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep (Maybe a)

Methods

fromSing :: forall (a0 :: Maybe a). Sing a0 -> DemoteRep (Maybe a)

Generic1 Maybe

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Maybe :: k -> Type #

Methods

from1 :: forall (a :: k). Maybe a -> Rep1 Maybe a #

to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a #

SingI ('Nothing :: Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing 'Nothing

HasEqAsymmetric a b => HasEqAsymmetric (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (Maybe a) (Maybe b) Source #

CanMinMaxAsymmetric a b => CanMinMaxAsymmetric (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

Associated Types

type MinMaxType (Maybe a) (Maybe b) Source #

Methods

min :: Maybe a -> Maybe b -> MinMaxType (Maybe a) (Maybe b) Source #

max :: Maybe a -> Maybe b -> MinMaxType (Maybe a) (Maybe b) Source #

CanSub a b => CanSub (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type SubType (Maybe a) (Maybe b) Source #

Methods

sub :: Maybe a -> Maybe b -> SubType (Maybe a) (Maybe b) Source #

CanAddAsymmetric a b => CanAddAsymmetric (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

Associated Types

type AddType (Maybe a) (Maybe b) Source #

Methods

add :: Maybe a -> Maybe b -> AddType (Maybe a) (Maybe b) Source #

CanMulAsymmetric a b => CanMulAsymmetric (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

Associated Types

type MulType (Maybe a) (Maybe b) Source #

Methods

mul :: Maybe a -> Maybe b -> MulType (Maybe a) (Maybe b) Source #

CanPow a b => CanPow (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

Associated Types

type PowType (Maybe a) (Maybe b) Source #

type PPowType (Maybe a) (Maybe b) Source #

Methods

pow :: Maybe a -> Maybe b -> PowType (Maybe a) (Maybe b) Source #

ppow :: Maybe a -> Maybe b -> PPowType (Maybe a) (Maybe b) Source #

CanDiv a b => CanDiv (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

Associated Types

type DivType (Maybe a) (Maybe b) Source #

Methods

divide :: Maybe a -> Maybe b -> DivType (Maybe a) (Maybe b) Source #

SingI a2 => SingI ('Just a2 :: Maybe a1)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ('Just a2)

(HasEqAsymmetric (Maybe Bool) b, CanBeErrors es, CanTestCertainly (EqCompareType (Maybe Bool) b)) => HasEqAsymmetric (Maybe Bool) (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (Maybe Bool) (CollectErrors es b) Source #

(HasEqAsymmetric a (Maybe Bool), CanBeErrors es, CanTestCertainly (EqCompareType a (Maybe Bool))) => HasEqAsymmetric (CollectErrors es a) (Maybe Bool) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

Associated Types

type EqCompareType (CollectErrors es a) (Maybe Bool) Source #

type Rep (Maybe a) 
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)))
type DemoteRep (Maybe a) 
Instance details

Defined in GHC.Generics

type DemoteRep (Maybe a) = Maybe (DemoteRep a)
data Sing (b :: Maybe a) 
Instance details

Defined in GHC.Generics

data Sing (b :: Maybe a) where
type Rep1 Maybe 
Instance details

Defined in GHC.Generics

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 EqCompareType (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type MinMaxType (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.MinMaxAbs

type MinMaxType (Maybe a) (Maybe b) = Maybe (MinMaxType a b)
type SubType (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type SubType (Maybe a) (Maybe b) = Maybe (SubType a b)
type AddType (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.AddSub

type AddType (Maybe a) (Maybe b) = Maybe (AddType a b)
type MulType (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Mul

type MulType (Maybe a) (Maybe b) = Maybe (MulType a b)
type PowType (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PowType (Maybe a) (Maybe b) = Maybe (PowType a b)
type PPowType (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Power

type PPowType (Maybe a) (Maybe b) = PowType (Maybe a) (Maybe b)
type DivType (Maybe a) (Maybe b) Source # 
Instance details

Defined in Numeric.MixedTypes.Div

type DivType (Maybe a) (Maybe b) = Maybe (DivType a b)
type EqCompareType (Maybe Bool) (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

type EqCompareType (CollectErrors es a) (Maybe Bool) Source # 
Instance details

Defined in Numeric.MixedTypes.Eq

data Ordering #

Constructors

LT 
EQ 
GT 

Instances

Instances details
Bounded Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Eq Ordering 
Instance details

Defined in GHC.Classes

Ord Ordering 
Instance details

Defined in GHC.Classes

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Generic Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep Ordering :: Type -> Type #

Methods

from :: Ordering -> Rep Ordering x #

to :: Rep Ordering x -> Ordering #

Semigroup Ordering

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Function Ordering 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Ordering -> b) -> Ordering :-> b #

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 #

Monad m => Serial m Ordering 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m Ordering #

Monad m => CoSerial m Ordering 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b -> Series m (Ordering -> b) #

type Rep Ordering 
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)))

type Rational = Ratio Integer #

Arbitrary-precision rational numbers, represented as a ratio of two Integer values. A rational number may be constructed using the % operator.

data IO a #

A value of type IO a is a computation which, when performed, does some I/O before returning a value of type a.

There is really only one way to "perform" an I/O action: bind it to Main.main in your program. When your program is run, the I/O will be performed. It isn't possible to perform I/O from an arbitrary function, unless that function is itself in the IO monad and called at some point, directly or indirectly, from Main.main.

IO is a monad, so IO actions can be combined using either the do-notation or the >> and >>= operations from the Monad class.

Instances

Instances details
Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: IO a -> (a -> IO b) -> IO b #

(>>) :: IO a -> IO b -> IO b #

return :: a -> IO a #

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> IO a -> IO b #

(<$) :: a -> IO b -> IO a #

MonadFix IO

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> IO a) -> IO a #

MonadFail IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> IO a #

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> IO a #

(<*>) :: IO (a -> b) -> IO a -> IO b #

liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c #

(*>) :: IO a -> IO b -> IO b #

(<*) :: IO a -> IO b -> IO a #

MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

Alternative IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

MonadPlus IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a #

mplus :: IO a -> IO a -> IO a #

Example Expectation 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg Expectation #

Quasi IO 
Instance details

Defined in Language.Haskell.TH.Syntax

MonadError IOException IO 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: IOException -> IO a #

catchError :: IO a -> (IOException -> IO a) -> IO a #

Semigroup a => Semigroup (IO a)

Since: base-4.10.0.0

Instance details

Defined in GHC.Base

Methods

(<>) :: IO a -> IO a -> IO a #

sconcat :: NonEmpty (IO a) -> IO a #

stimes :: Integral b => b -> IO a -> IO a #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

a ~ () => PrintfType (IO a)

Since: base-4.7.0.0

Instance details

Defined in Text.Printf

Methods

spr :: String -> [UPrintf] -> IO a

a ~ () => HPrintfType (IO a)

Since: base-4.7.0.0

Instance details

Defined in Text.Printf

Methods

hspr :: Handle -> String -> [UPrintf] -> IO a

Example (a -> Expectation) 
Instance details

Defined in Test.Hspec.Core.Example

Associated Types

type Arg (a -> Expectation) #

Methods

evaluateExample :: (a -> Expectation) -> Params -> (ActionWith (Arg (a -> Expectation)) -> IO ()) -> ProgressCallback -> IO Result #

type Arg Expectation 
Instance details

Defined in Test.Hspec.Core.Example

type Arg Expectation = ()
type Arg (Property IO) 
Instance details

Defined in Test.Hspec.SmallCheck

type Arg (Property IO) = ()
type Arg (a -> Expectation) 
Instance details

Defined in Test.Hspec.Core.Example

type Arg (a -> Expectation) = a

data Word #

A Word is an unsigned integral type, with the same size as Int.

Instances

Instances details
Bounded Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: Word -> Word #

pred :: Word -> Word #

toEnum :: Int -> Word #

fromEnum :: Word -> Int #

enumFrom :: Word -> [Word] #

enumFromThen :: Word -> Word -> [Word] #

enumFromTo :: Word -> Word -> [Word] #

enumFromThenTo :: Word -> Word -> Word -> [Word] #

Eq Word 
Instance details

Defined in GHC.Classes

Methods

(==) :: Word -> Word -> Bool #

(/=) :: Word -> Word -> Bool #

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

quot :: Word -> Word -> Word #

rem :: Word -> Word -> Word #

div :: Word -> Word -> Word #

mod :: Word -> Word -> Word #

quotRem :: Word -> Word -> (Word, Word) #

divMod :: Word -> Word -> (Word, Word) #

toInteger :: Word -> Integer #

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Word -> Word -> Word #

(-) :: Word -> Word -> Word #

(*) :: Word -> Word -> Word #

negate :: Word -> Word #

abs :: Word -> Word #

signum :: Word -> Word #

fromInteger :: Integer -> Word #

Ord Word 
Instance details

Defined in GHC.Classes

Methods

compare :: Word -> Word -> Ordering #

(<) :: Word -> Word -> Bool #

(<=) :: Word -> Word -> Bool #

(>) :: Word -> Word -> Bool #

(>=) :: Word -> Word -> Bool #

max :: Word -> Word -> Word #

min :: Word -> Word -> Word #

Read Word

Since: base-4.5.0.0

Instance details

Defined in GHC.Read

Real Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

toRational :: Word -> Rational #

Show Word

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

Function Word 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Word -> b) -> Word :-> b #

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 #

PrintfArg Word

Since: base-2.1

Instance details

Defined in Text.Printf

Lift Word 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word -> Q Exp #

liftTyped :: Word -> Q (TExp Word) #

Monad m => Serial m Word 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m Word #

Monad m => CoSerial m Word 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b -> Series m (Word -> b) #

Convertible Char Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Double Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Float Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int8 Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int16 Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int32 Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Int64 Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Integer Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Rational Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Char Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Double Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Float Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Int Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Int8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Int16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Int32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Int64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Integer Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Rational Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Word8 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Word16 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Word32 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word Word64 Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word8 Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word16 Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word32 Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Convertible Word64 Word Source # 
Instance details

Defined in Data.Convertible.Instances.Num

Generic1 (URec Word :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (URec Word) :: k -> Type #

Methods

from1 :: forall (a :: k0). URec Word a -> Rep1 (URec Word) a #

to1 :: forall (a :: k0). Rep1 (URec Word) a -> URec Word a #

Foldable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => UWord m -> m #

foldMap :: Monoid m => (a -> m) -> UWord a -> m #

foldMap' :: Monoid m => (a -> m) -> UWord a -> m #

foldr :: (a -> b -> b) -> b -> UWord a -> b #

foldr' :: (a -> b -> b) -> b -> UWord a -> b #

foldl :: (b -> a -> b) -> b -> UWord a -> b #

foldl' :: (b -> a -> b) -> b -> UWord a -> b #

foldr1 :: (a -> a -> a) -> UWord a -> a #

foldl1 :: (a -> a -> a) -> UWord a -> a #

toList :: UWord a -> [a] #

null :: UWord a -> Bool #

length :: UWord a -> Int #

elem :: Eq a => a -> UWord a -> Bool #

maximum :: Ord a => UWord a -> a #

minimum :: Ord a => UWord a -> a #

sum :: Num a => UWord a -> a #

product :: Num a => UWord a -> a #

Traversable (UWord :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) #

sequenceA :: Applicative f => UWord (f a) -> f (UWord a) #

mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) #

sequence :: Monad m => UWord (m a) -> m (UWord a) #

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 #

(<$) :: a -> URec Word b -> URec Word a #

Eq (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec Word p -> URec Word p -> Bool #

(/=) :: URec Word p -> URec Word p -> Bool #

Ord (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Word p -> URec Word p -> Ordering #

(<) :: URec Word p -> URec Word p -> Bool #

(<=) :: URec Word p -> URec Word p -> Bool #

(>) :: URec Word p -> URec Word p -> Bool #

(>=) :: URec Word p -> URec Word p -> Bool #

max :: URec Word p -> URec Word p -> URec Word p #

min :: URec Word p -> URec Word p -> URec Word p #

Show (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

showsPrec :: Int -> URec Word p -> ShowS #

show :: URec Word p -> String #

showList :: [URec Word p] -> ShowS #

Generic (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (URec Word p) :: Type -> Type #

Methods

from :: URec Word p -> Rep (URec Word p) x #

to :: Rep (URec Word p) x -> URec Word p #

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 {}
type Rep1 (URec Word :: k -> Type) 
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) 
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 Either a b #

The Either type represents values with two possibilities: a value of type Either a b is either Left a or Right b.

The Either type is sometimes used to represent a value which is either correct or an error; by convention, the Left constructor is used to hold an error value and the Right constructor is used to hold a correct value (mnemonic: "right" also means "correct").

Examples

Expand

The type Either String Int is the type of values which can be either a String or an Int. The Left constructor can be used only on Strings, and the Right constructor can be used only on Ints:

>>> let s = Left "foo" :: Either String Int
>>> s
Left "foo"
>>> let n = Right 3 :: Either String Int
>>> n
Right 3
>>> :type s
s :: Either String Int
>>> :type n
n :: Either String Int

The fmap from our Functor instance will ignore Left values, but will apply the supplied function to values contained in a Right:

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> fmap (*2) s
Left "foo"
>>> fmap (*2) n
Right 6

The Monad instance for Either allows us to chain together multiple actions which may fail, and fail overall if any of the individual steps failed. First we'll write a function that can either parse an Int from a Char, or fail.

>>> import Data.Char ( digitToInt, isDigit )
>>> :{
    let parseEither :: Char -> Either String Int
        parseEither c
          | isDigit c = Right (digitToInt c)
          | otherwise = Left "parse error"
>>> :}

The following should work, since both '1' and '2' can be parsed as Ints.

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither '1'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Right 3

But the following should fail overall, since the first operation where we attempt to parse 'm' as an Int will fail:

>>> :{
    let parseMultiple :: Either String Int
        parseMultiple = do
          x <- parseEither 'm'
          y <- parseEither '2'
          return (x + y)
>>> :}
>>> parseMultiple
Left "parse error"

Constructors

Left a 
Right b 

Instances

Instances details
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] #

Eq2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Either a c -> Either b d -> Bool #

Ord2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Either a c -> Either b d -> Ordering #

Read2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Either a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Either a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Either a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Either a b] #

Show2 Either

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Either a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Either a b] -> ShowS #

MonadError e (Either e) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> Either e a #

catchError :: Either e a -> (e -> Either e a) -> Either e a #

(Lift a, Lift b) => Lift (Either a b :: Type) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Either a b -> Q Exp #

liftTyped :: Either a b -> Q (TExp (Either a b)) #

Monad m => Testable m (Either Reason Reason)

Works like the Bool instance, but includes an explanation of the result.

Left and Right correspond to test failure and success respectively.

Instance details

Defined in Test.SmallCheck.Property

(Serial m a, Serial m b) => Serial m (Either a b) 
Instance details

Defined in Test.SmallCheck.Series

Methods

series :: Series m (Either a b) #

(CoSerial m a, CoSerial m b) => CoSerial m (Either a b) 
Instance details

Defined in Test.SmallCheck.Series

Methods

coseries :: Series m b0 -> Series m (Either a b -> b0) #

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b #

(>>) :: Either e a -> Either e b -> Either e b #

return :: a -> Either e a #

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b #

(<$) :: a0 -> Either a b -> Either a a0 #

MonadFix (Either e)

Since: base-4.3.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Either e a) -> Either e a #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Foldable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Either a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 #

toList :: Either a a0 -> [a0] #

null :: Either a a0 -> Bool #

length :: Either a a0 -> Int #

elem :: Eq a0 => a0 -> Either a a0 -> Bool #

maximum :: Ord a0 => Either a a0 -> a0 #

minimum :: Ord a0 => Either a a0 -> a0 #

sum :: Num a0 => Either a a0 -> a0 #

product :: Num a0 => Either a a0 -> a0 #

Traversable (Either a)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a0 -> f b) -> Either a a0 -> f (Either a b) #

sequenceA :: Applicative f => Either a (f a0) -> f (Either a a0) #

mapM :: Monad m => (a0 -> m b) -> Either a a0 -> m (Either a b) #

sequence :: Monad m => Either a (m a0) -> m (Either a a0) #

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] #

Eq a => Eq1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b -> Bool) -> Either a a0 -> Either a b -> Bool #

Ord a => Ord1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b -> Ordering) -> Either a a0 -> Either a b -> Ordering #

Read a => Read1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Either a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Either a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Either a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Either a a0] #

Show a => Show1 (Either a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Either a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Either a a0] -> ShowS #

Generic1 (Either a :: Type -> Type)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 (Either a) :: k -> Type #

Methods

from1 :: forall (a0 :: k). Either a a0 -> Rep1 (Either a) a0 #

to1 :: forall (a0 :: k). Rep1 (Either a) a0 -> Either a a0 #

(Eq a, Eq b) => Eq (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

(==) :: Either a b -> Either a b -> Bool #

(/=) :: Either a b -> Either a b -> Bool #

(Ord a, Ord b) => Ord (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

compare :: Either a b -> Either a b -> Ordering #

(<) :: Either a b -> Either a b -> Bool #

(<=) :: Either a b -> Either a b -> Bool #

(>) :: Either a b -> Either a b -> Bool #

(>=) :: Either a b -> Either a b -> Bool #

max :: Either a b -> Either a b -> Either a b #

min :: Either a b -> Either a b -> Either a b #

(Read a, Read b) => Read (Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

(Show a, Show b) => Show (Either a b)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

showsPrec :: Int -> Either a b -> ShowS #

show :: Either a b -> String #

showList :: [Either a b] -> ShowS #

Generic (Either a b)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Either a b) :: Type -> Type #

Methods

from :: Either a b -> Rep (Either a b) x #

to :: Rep (Either a b) x -> Either a b #

Semigroup (Either a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Either

Methods

(<>) :: Either a b -> Either a b -> Either a b #

sconcat :: NonEmpty (Either a b) -> Either a b #

stimes :: Integral b0 => b0 -> Either a b -> Either a b #

(Function a, Function b) => Function (Either a b) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Either a b -> b0) -> Either a b :-> b0 #

(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 #

type Rep1 (Either a :: Type -> Type) 
Instance details

Defined in GHC.Generics

type Rep (Either a b) 
Instance details

Defined in GHC.Generics

type String = [Char] #

A String is a list of characters. String constants in Haskell are values of type String.

See Data.List for operations on lists.

type ShowS = String -> String #

The shows functions return a function that prepends the output String to an existing String. This allows constant-time concatenation of results using function composition.

readIO :: Read a => String -> IO a #

The readIO function is similar to read except that it signals parse failure to the IO monad instead of terminating the program.

readLn :: Read a => IO a #

The readLn function combines getLine and readIO.

appendFile :: FilePath -> String -> IO () #

The computation appendFile file str function appends the string str, to the file file.

Note that writeFile and appendFile write a literal string to a file. To write a value of any printable type, as with print, use the show function to convert the value to a string first.

main = appendFile "squares" (show [(x,x*x) | x <- [0,0.1..2]])

writeFile :: FilePath -> String -> IO () #

The computation writeFile file str function writes the string str, to the file file.

readFile :: FilePath -> IO String #

The readFile function reads a file and returns the contents of the file as a string. The file is read lazily, on demand, as with getContents.

interact :: (String -> String) -> IO () #

The interact function takes a function of type String->String as its argument. The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.

getContents :: IO String #

The getContents operation returns all user input as a single string, which is read lazily as it is needed (same as hGetContents stdin).

getLine :: IO String #

Read a line from the standard input device (same as hGetLine stdin).

getChar :: IO Char #

Read a character from the standard input device (same as hGetChar stdin).

putStrLn :: String -> IO () #

The same as putStr, but adds a newline character.

putStr :: String -> IO () #

Write a string to the standard output device (same as hPutStr stdout).

putChar :: Char -> IO () #

Write a character to the standard output device (same as hPutChar stdout).

ioError :: IOError -> IO a #

Raise an IOError in the IO monad.

type FilePath = String #

File and directory names are values of type String, whose precise meaning is operating system dependent. Files can be opened, yielding a handle which can then be used to operate on the contents of that file.

userError :: String -> IOError #

Construct an IOError value with a string describing the error. The fail method of the IO instance of the Monad class raises a userError, thus:

instance Monad IO where
  ...
  fail s = ioError (userError s)

type IOError = IOException #

The Haskell 2010 type for exceptions in the IO monad. Any I/O operation may raise an IOError instead of returning a result. For a more general type of exception, including also those that arise in pure code, see Exception.

In Haskell 2010, this is an opaque type.

notElem :: (Foldable t, Eq a) => a -> t a -> Bool infix 4 #

notElem is the negation of elem.

all :: Foldable t => (a -> Bool) -> t a -> Bool #

Determines whether all elements of the structure satisfy the predicate.

any :: Foldable t => (a -> Bool) -> t a -> Bool #

Determines whether any element of the structure satisfies the predicate.

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] #

Map a function over all the elements of a container and concatenate the resulting lists.

concat :: Foldable t => t [a] -> [a] #

The concatenation of all the elements of a container of lists.

sequence_ :: (Foldable t, Monad m) => t (m a) -> m () #

Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence.

As of base 4.8.0.0, sequence_ is just sequenceA_, specialized to Monad.

mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM.

As of base 4.8.0.0, mapM_ is just traverse_, specialized to Monad.

unwords :: [String] -> String #

unwords is an inverse operation to words. It joins words with separating spaces.

>>> unwords ["Lorem", "ipsum", "dolor"]
"Lorem ipsum dolor"

words :: String -> [String] #

words breaks a string up into a list of words, which were delimited by white space.

>>> words "Lorem ipsum\ndolor"
["Lorem","ipsum","dolor"]

unlines :: [String] -> String #

unlines is an inverse operation to lines. It joins lines, after appending a terminating newline to each.

>>> unlines ["Hello", "World", "!"]
"Hello\nWorld\n!\n"

lines :: String -> [String] #

lines breaks a string up into a list of strings at newline characters. The resulting strings do not contain newlines.

Note that after splitting the string at newline characters, the last part of the string is considered a line even if it doesn't end with a newline. For example,

>>> lines ""
[]
>>> lines "\n"
[""]
>>> lines "one"
["one"]
>>> lines "one\n"
["one"]
>>> lines "one\n\n"
["one",""]
>>> lines "one\ntwo"
["one","two"]
>>> lines "one\ntwo\n"
["one","two"]

Thus lines s contains at least as many elements as newlines in s.

read :: Read a => String -> a #

The read function reads input from a string, which must be completely consumed by the input process. read fails with an error if the parse is unsuccessful, and it is therefore discouraged from being used in real applications. Use readMaybe or readEither for safe alternatives.

>>> read "123" :: Int
123
>>> read "hello" :: Int
*** Exception: Prelude.read: no parse

reads :: Read a => ReadS a #

equivalent to readsPrec with a precedence of 0.

either :: (a -> c) -> (b -> c) -> Either a b -> c #

Case analysis for the Either type. If the value is Left a, apply the first function to a; if it is Right b, apply the second function to b.

Examples

Expand

We create two values of type Either String Int, one using the Left constructor and another using the Right constructor. Then we apply "either" the length function (if we have a String) or the "times-two" function (if we have an Int):

>>> let s = Left "foo" :: Either String Int
>>> let n = Right 3 :: Either String Int
>>> either length (*2) s
3
>>> either length (*2) n
6

lex :: ReadS String #

The lex function reads a single lexeme from the input, discarding initial white space, and returning the characters that constitute the lexeme. If the input string contains only white space, lex returns a single successful `lexeme' consisting of the empty string. (Thus lex "" = [("","")].) If there is no legal lexeme at the beginning of the input string, lex fails (i.e. returns []).

This lexer is not completely faithful to the Haskell lexical syntax in the following respects:

  • Qualified names are not handled properly
  • Octal and hexadecimal numerics are not recognized as a single token
  • Comments are not treated properly

readParen :: Bool -> ReadS a -> ReadS a #

readParen True p parses what p parses, but surrounded with parentheses.

readParen False p parses what p parses, but optionally surrounded with parentheses.

type ReadS a = String -> [(a, String)] #

A parser for a type a, represented as a function that takes a String and returns a list of possible parses as (a,String) pairs.

Note that this kind of backtracking parser is very inefficient; reading a large structure may be quite slow (cf ReadP).

lcm :: Integral a => a -> a -> a #

lcm x y is the smallest positive integer that both x and y divide.

gcd :: Integral a => a -> a -> a #

gcd x y is the non-negative factor of both x and y of which every common factor of x and y is also a factor; for example gcd 4 2 = 2, gcd (-4) 6 = 2, gcd 0 4 = 4. gcd 0 0 = 0. (That is, the common divisor that is "greatest" in the divisibility preordering.)

Note: Since for signed fixed-width integer types, abs minBound < 0, the result may be negative if one of the arguments is minBound (and necessarily is if the other is 0 or minBound) for such types.

odd :: Integral a => a -> Bool #

even :: Integral a => a -> Bool #

showParen :: Bool -> ShowS -> ShowS #

utility function that surrounds the inner show function with parentheses when the Bool parameter is True.

showString :: String -> ShowS #

utility function converting a String to a show function that simply prepends the string unchanged.

showChar :: Char -> ShowS #

utility function converting a Char to a show function that simply prepends the character unchanged.

shows :: Show a => a -> ShowS #

equivalent to showsPrec with a precedence of 0.

unzip3 :: [(a, b, c)] -> ([a], [b], [c]) #

The unzip3 function takes a list of triples and returns three lists, analogous to unzip.

unzip :: [(a, b)] -> ([a], [b]) #

unzip transforms a list of pairs into a list of first components and a list of second components.

zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #

The zipWith3 function takes a function which combines three elements, as well as three lists and returns a list of their point-wise combination, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] #

\(\mathcal{O}(\min(m,n))\). zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function. For example, zipWith (+) is applied to two lists to produce the list of corresponding sums:

>>> zipWith (+) [1, 2, 3] [4, 5, 6]
[5,7,9]

zipWith is right-lazy:

zipWith f [] _|_ = []

zipWith is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] #

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.

lookup :: Eq a => a -> [(a, b)] -> Maybe b #

\(\mathcal{O}(n)\). lookup key assocs looks up a key in an association list.

>>> lookup 2 [(1, "first"), (2, "second"), (3, "third")]
Just "second"

reverse :: [a] -> [a] #

reverse xs returns the elements of xs in reverse order. xs must be finite.

break :: (a -> Bool) -> [a] -> ([a], [a]) #

break, applied to a predicate p and a list xs, returns a tuple where first element is longest prefix (possibly empty) of xs of elements that do not satisfy p and second element is the remainder of the list:

break (> 3) [1,2,3,4,1,2,3,4] == ([1,2,3],[4,1,2,3,4])
break (< 9) [1,2,3] == ([],[1,2,3])
break (> 9) [1,2,3] == ([1,2,3],[])

break p is equivalent to span (not . p).

span :: (a -> Bool) -> [a] -> ([a], [a]) #

span, applied to a predicate p and a list xs, returns a tuple where first element is longest prefix (possibly empty) of xs of elements that satisfy p and second element is the remainder of the list:

span (< 3) [1,2,3,4,1,2,3,4] == ([1,2],[3,4,1,2,3,4])
span (< 9) [1,2,3] == ([1,2,3],[])
span (< 0) [1,2,3] == ([],[1,2,3])

span p xs is equivalent to (takeWhile p xs, dropWhile p xs)

dropWhile :: (a -> Bool) -> [a] -> [a] #

dropWhile p xs returns the suffix remaining after takeWhile p xs:

dropWhile (< 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3]
dropWhile (< 9) [1,2,3] == []
dropWhile (< 0) [1,2,3] == [1,2,3]

takeWhile :: (a -> Bool) -> [a] -> [a] #

takeWhile, applied to a predicate p and a list xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p:

takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2]
takeWhile (< 9) [1,2,3] == [1,2,3]
takeWhile (< 0) [1,2,3] == []

cycle :: [a] -> [a] #

cycle ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.

repeat :: a -> [a] #

repeat x is an infinite list, with x the value of every element.

iterate :: (a -> a) -> a -> [a] #

iterate f x returns an infinite list of repeated applications of f to x:

iterate f x == [x, f x, f (f x), ...]

Note that iterate is lazy, potentially leading to thunk build-up if the consumer doesn't force each iterate. See iterate' for a strict variant of this function.

scanr1 :: (a -> a -> a) -> [a] -> [a] #

\(\mathcal{O}(n)\). scanr1 is a variant of scanr that has no starting value argument.

scanr :: (a -> b -> b) -> b -> [a] -> [b] #

\(\mathcal{O}(n)\). scanr is the right-to-left dual of scanl. Note that

head (scanr f z xs) == foldr f z xs.

scanl1 :: (a -> a -> a) -> [a] -> [a] #

\(\mathcal{O}(n)\). scanl1 is a variant of scanl that has no starting value argument:

scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]

scanl :: (b -> a -> b) -> b -> [a] -> [b] #

\(\mathcal{O}(n)\). scanl is similar to foldl, but returns a list of successive reduced values from the left:

scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]

Note that

last (scanl f z xs) == foldl f z xs.

init :: [a] -> [a] #

\(\mathcal{O}(n)\). Return all the elements of a list except the last one. The list must be non-empty.

last :: [a] -> a #

\(\mathcal{O}(n)\). Extract the last element of a list, which must be finite and non-empty.

tail :: [a] -> [a] #

\(\mathcal{O}(1)\). Extract the elements after the head of a list, which must be non-empty.

head :: [a] -> a #

\(\mathcal{O}(1)\). Extract the first element of a list, which must be non-empty.

maybe :: b -> (a -> b) -> Maybe a -> b #

The maybe function takes a default value, a function, and a Maybe value. If the Maybe value is Nothing, the function returns the default value. Otherwise, it applies the function to the value inside the Just and returns the result.

Examples

Expand

Basic usage:

>>> maybe False odd (Just 3)
True
>>> maybe False odd Nothing
False

Read an integer from a string using readMaybe. If we succeed, return twice the integer; that is, apply (*2) to it. If instead we fail to parse an integer, return 0 by default:

>>> import Text.Read ( readMaybe )
>>> maybe 0 (*2) (readMaybe "5")
10
>>> maybe 0 (*2) (readMaybe "")
0

Apply show to a Maybe Int. If we have Just n, we want to show the underlying Int n. But if we have Nothing, we return the empty string instead of (for example) "Nothing":

>>> maybe "" show (Just 5)
"5"
>>> maybe "" show Nothing
""

(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #

An infix synonym for fmap.

The name of this operator is an allusion to $. Note the similarities between their types:

 ($)  ::              (a -> b) ->   a ->   b
(<$>) :: Functor f => (a -> b) -> f a -> f b

Whereas $ is function application, <$> is function application lifted over a Functor.

Examples

Expand

Convert from a Maybe Int to a Maybe String using show:

>>> show <$> Nothing
Nothing
>>> show <$> Just 3
Just "3"

Convert from an Either Int Int to an Either Int String using show:

>>> show <$> Left 17
Left 17
>>> show <$> Right 17
Right "17"

Double each element of a list:

>>> (*2) <$> [1,2,3]
[2,4,6]

Apply even to the second element of a pair:

>>> even <$> (2,2)
(2,True)

uncurry :: (a -> b -> c) -> (a, b) -> c #

uncurry converts a curried function to a function on pairs.

Examples

Expand
>>> uncurry (+) (1,2)
3
>>> uncurry ($) (show, 1)
"1"
>>> map (uncurry max) [(1,2), (3,4), (6,8)]
[2,4,8]

curry :: ((a, b) -> c) -> a -> b -> c #

curry converts an uncurried function to a curried function.

Examples

Expand
>>> curry fst 1 2
1

subtract :: Num a => a -> a -> a #

the same as flip (-).

Because - is treated specially in the Haskell grammar, (- e) is not a section, but an application of prefix negation. However, (subtract exp) is equivalent to the disallowed section.

asTypeOf :: a -> a -> a #

asTypeOf is a type-restricted version of const. It is usually used as an infix operator, and its typing forces its first argument (which is usually overloaded) to have the same type as the second.

until :: (a -> Bool) -> (a -> a) -> a -> a #

until p f yields the result of applying f until p holds.

($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 #

Strict (call-by-value) application operator. It takes a function and an argument, evaluates the argument to weak head normal form (WHNF), then calls the function with that value.

flip :: (a -> b -> c) -> b -> a -> c #

flip f takes its (first) two arguments in the reverse order of f.

>>> flip (++) "hello" "world"
"worldhello"

(.) :: (b -> c) -> (a -> b) -> a -> c infixr 9 #

Function composition.

const :: a -> b -> a #

const x is a unary function which evaluates to x for all inputs.

>>> const 42 "hello"
42
>>> map (const 42) [0..3]
[42,42,42,42]

id :: a -> a #

Identity function.

id x = x

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 #

Same as >>=, but with the arguments interchanged.

undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a #

A special case of error. It is expected that compilers will recognize this and insert error messages which are more appropriate to the context in which undefined appears.

errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a #

A variant of error that does not produce a stack trace.

Since: base-4.9.0.0

error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a #

error stops execution and displays an error message.