algebraic-prelude-0.1.1.0: Algebraically structured Prelude
Safe HaskellNone
LanguageHaskell2010

AlgebraicPrelude

Description

This module provides drop-in replacement for Prelude module in base package, based on algebraic hierarchy provided by algebra package. You can use this module with NoImplicitPrelude language option.

This module implicitly exports following modules:

Synopsis

Documentation

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.

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 = ...

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

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

Conditional failure of Alternative computations. Defined by

guard True  = pure ()
guard False = empty

Examples

Expand

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

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

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

A definition of safeDiv using guards, but not guard:

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

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

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

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

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

'join bss' can be understood as the do expression

do bs <- bss
   bs

Examples

Expand

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

atomically :: STM a -> IO a

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

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

we can compose them as

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

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

class Bounded a where #

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

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

Methods

minBound :: a #

maxBound :: a #

Instances

Instances details
Bounded 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 GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Bounded Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Bounded a => Bounded (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Min a #

maxBound :: Min a #

Bounded a => Bounded (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Max a #

maxBound :: Max a #

Bounded a => Bounded (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: First a #

maxBound :: First a #

Bounded a => Bounded (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

minBound :: Last a #

maxBound :: Last a #

Bounded m => Bounded (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Bounded a => Bounded (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Bounded a => Bounded (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

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

Bounded a => Bounded (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

minBound :: Down a #

maxBound :: Down a #

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

minBound :: (a, b) #

maxBound :: (a, b) #

(Bounded a, Bounded 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 #

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

Defined in Data.Tagged

Methods

minBound :: Tagged s b #

maxBound :: Tagged s b #

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

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

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

class Enum a where #

Class Enum defines operations on sequentially ordered types.

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

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

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

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

Minimal complete definition

toEnum, fromEnum

Methods

succ :: a -> a #

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

pred :: a -> a #

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

toEnum :: Int -> a #

Convert from an Int.

fromEnum :: a -> Int #

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

enumFrom :: a -> [a] #

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

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

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

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

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

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

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

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

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

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

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

Instances

Instances details
Enum 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 GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Enum Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Min a -> Min a #

pred :: Min a -> Min a #

toEnum :: Int -> Min a #

fromEnum :: Min a -> Int #

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

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

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

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

Enum a => Enum (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Max a -> Max a #

pred :: Max a -> Max a #

toEnum :: Int -> Max a #

fromEnum :: Max a -> Int #

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

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

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

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

Enum a => Enum (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: First a -> First a #

pred :: First a -> First a #

toEnum :: Int -> First a #

fromEnum :: First a -> Int #

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

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

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

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

Enum a => Enum (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Last a -> Last a #

pred :: Last a -> Last a #

toEnum :: Int -> Last a #

fromEnum :: Last a -> Int #

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

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

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

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

Enum a => Enum (WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Enum a => Enum (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Enum a => Enum (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

succ :: Down a -> Down a #

pred :: Down a -> Down a #

toEnum :: Int -> Down a #

fromEnum :: Down a -> Int #

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

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

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

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

Enum a => Enum (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Enum a => Enum (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

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

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

Defined in Data.Tagged

Methods

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

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

toEnum :: Int -> Tagged s a #

fromEnum :: Tagged s a -> Int #

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

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

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

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

class Eq a where #

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

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

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

Minimal complete definition: either == or /=.

Minimal complete definition

(==) | (/=)

Methods

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

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

Instances

Instances details
Eq Bool 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Char 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Double

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

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

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

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

Defined in GHC.Classes

Methods

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

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

Eq Float

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

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

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

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

Defined in GHC.Classes

Methods

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

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

Eq Int 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

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

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

Eq Integer 
Instance details

Defined in GHC.Integer.Type

Methods

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

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

Eq Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Methods

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

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

Eq Ordering 
Instance details

Defined in GHC.Classes

Eq Word 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

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

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

Eq SomeTypeRep 
Instance details

Defined in Data.Typeable.Internal

Eq Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq () 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq TyCon 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Module 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq TrName 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Methods

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

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

Eq Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

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

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

Eq SpecConstrAnnotation

Since: base-4.3.0.0

Instance details

Defined in GHC.Exts

Eq Constr

Equality of constructors

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

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

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

Eq DataRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

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

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

Eq ConstrRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Eq Fixity

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

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

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

Eq Version

Since: base-2.1

Instance details

Defined in Data.Version

Methods

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

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

Eq AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Eq ExitCode 
Instance details

Defined in GHC.IO.Exception

Eq IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq Newline

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Methods

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

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

Eq NewlineMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Eq MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Eq IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Eq ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Eq SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Eq CChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CSChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUChar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CShort 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUShort 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CInt 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUInt 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CULong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CLLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CULLong 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CBool 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CFloat 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CDouble 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CPtrdiff 
Instance details

Defined in Foreign.C.Types

Eq CSize 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CWchar 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CSigAtomic 
Instance details

Defined in Foreign.C.Types

Eq CClock 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CTime 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUSeconds 
Instance details

Defined in Foreign.C.Types

Eq CSUSeconds 
Instance details

Defined in Foreign.C.Types

Eq CIntPtr 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUIntPtr 
Instance details

Defined in Foreign.C.Types

Eq CIntMax 
Instance details

Defined in Foreign.C.Types

Methods

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

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

Eq CUIntMax 
Instance details

Defined in Foreign.C.Types

Eq Fingerprint

Since: base-4.4.0.0

Instance details

Defined in GHC.Fingerprint.Type

Eq Lexeme

Since: base-2.1

Instance details

Defined in Text.Read.Lex

Methods

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

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

Eq Number

Since: base-4.6.0.0

Instance details

Defined in Text.Read.Lex

Methods

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

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

Eq GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Eq SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Stack.Types

Methods

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

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

Eq ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Eq ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal

Eq IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

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

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

Eq Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Eq ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Eq BigNat 
Instance details

Defined in GHC.Integer.Type

Methods

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

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

Eq Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

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

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

Eq TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TyVarBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Eq AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Eq ByteArray 
Instance details

Defined in Data.Primitive.ByteArray

Methods

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

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

Eq ConstructorInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

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

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

Eq ConstructorVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

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

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

Eq DatatypeInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

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

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

Eq DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

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

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

Eq FieldStrictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

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

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

Eq Strictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

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

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

Eq Unpackedness 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

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

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

Eq Specificity 
Instance details

Defined in Language.Haskell.TH.Datatype.TyVarBndr

Methods

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

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

Eq CodePoint 
Instance details

Defined in Data.Text.Encoding

Methods

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

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

Eq DecoderState 
Instance details

Defined in Data.Text.Encoding

Methods

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

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

Eq a => Eq [a] 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq a => Eq (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

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

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

Eq a => Eq (Ratio a)

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

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

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

Eq (StablePtr a)

Since: base-2.1

Instance details

Defined in GHC.Stable

Methods

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

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

Eq (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

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

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

Eq (FunPtr a) 
Instance details

Defined in GHC.Ptr

Methods

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

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

Eq p => Eq (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq a => Eq (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

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

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

Eq a => Eq (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq m => Eq (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq a => Eq (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

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

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

Eq a => Eq (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

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

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

Eq a => Eq (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

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

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

Eq a => Eq (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

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

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

Eq a => Eq (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq a => Eq (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq a => Eq (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

Eq a => Eq (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

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

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

Eq a => Eq (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

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

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

Eq a => Eq (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

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

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

Eq a => Eq (Tree a) 
Instance details

Defined in Data.Tree

Methods

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

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

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Eq a => Eq (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Eq a => Eq (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Eq a => Eq (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

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

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

Eq (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq a => Eq (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq a => Eq (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq a => Eq (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

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

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

Eq a => Eq (Vector a) 
Instance details

Defined in Data.Vector

Methods

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

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

(Eq d, GCDDomain d) => Eq (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

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

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

Eq a => Eq (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

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

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

Eq (MutableByteArray s) 
Instance details

Defined in Data.Primitive.ByteArray

Methods

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

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

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

Defined in Data.Primitive.PrimArray

Methods

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

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

Eq a => Eq (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

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

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

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

Defined in Data.Vector.Primitive

Methods

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

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

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

Defined in Data.Vector.Storable

Methods

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

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

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

Defined in AlgebraicPrelude

Methods

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

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

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

Defined in AlgebraicPrelude

Methods

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

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

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

Defined in AlgebraicPrelude

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

Defined in AlgebraicPrelude

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

Defined in AlgebraicPrelude

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

Defined in AlgebraicPrelude

Methods

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

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

Eq a => Eq (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

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

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

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

Since: base-2.1

Instance details

Defined in Data.Either

Methods

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

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

Eq (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq (U1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq (TypeRep a)

Since: base-2.1

Instance details

Defined in Data.Typeable.Internal

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

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

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

Eq a => Eq (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

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

Defined in Data.Map.Internal

Methods

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

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

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

Defined in Data.HashMap.Internal

Methods

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

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

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

Defined in Control.Comonad.Cofree

Methods

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

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

Eq (MutableArray s a) 
Instance details

Defined in Data.Primitive.Array

Methods

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

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

Eq (MutablePrimArray s a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

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

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

Eq (SmallMutableArray s a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

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

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

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

Defined in Control.Monad.Free

Methods

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

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

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

Defined in Data.Functor.Yoneda

Methods

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

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

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

Defined in Data.HashMap.Internal

Methods

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

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

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(/=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

Eq (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

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

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

Eq (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Eq (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

Eq (STArray s i e)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

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

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

Eq a => Eq (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

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

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

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

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

Defined in Control.Monad.Trans.Error

Methods

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

(/=) :: ErrorT e m a -> ErrorT e m a -> Bool #

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

Defined in Data.Tagged

Methods

(==) :: Tagged s b -> Tagged s b -> Bool #

(/=) :: Tagged s b -> Tagged s b -> Bool #

Eq (p a a) => Eq (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

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

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

Eq (w (CofreeF f a (CofreeT f w a))) => Eq (CofreeT f w a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

(==) :: CofreeT f w a -> CofreeT f w a -> Bool #

(/=) :: CofreeT f w a -> CofreeT f w a -> Bool #

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

Defined in Control.Comonad.Trans.Cofree

Methods

(==) :: CofreeF f a b -> CofreeF f a b -> Bool #

(/=) :: CofreeF f a b -> CofreeF f a b -> Bool #

Eq (p (Fix p a) a) => Eq (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

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

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

(Eq1 f, Eq1 m, Eq a) => Eq (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(==) :: FreeT f m a -> FreeT f m a -> Bool #

(/=) :: FreeT f m a -> FreeT f m a -> Bool #

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

Defined in Control.Monad.Trans.Free

Methods

(==) :: FreeF f a b -> FreeF f a b -> Bool #

(/=) :: FreeF f a b -> FreeF f a b -> Bool #

Eq c => Eq (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

(==) :: K1 i c p -> K1 i c p -> Bool #

(/=) :: K1 i c p -> K1 i c p -> Bool #

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

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

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

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(==) :: Compose f g a -> Compose f g a -> Bool #

(/=) :: Compose f g a -> Compose f g a -> Bool #

Eq (f a) => Eq (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

(==) :: Clown f a b -> Clown f a b -> Bool #

(/=) :: Clown f a b -> Clown f a b -> Bool #

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

Defined in Data.Bifunctor.Flip

Methods

(==) :: Flip p a b -> Flip p a b -> Bool #

(/=) :: Flip p a b -> Flip p a b -> Bool #

Eq (g b) => Eq (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

(==) :: Joker g a b -> Joker g a b -> Bool #

(/=) :: Joker g a b -> Joker g a b -> Bool #

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

Defined in Data.Bifunctor.Wrapped

Methods

(==) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

(/=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

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

Defined in GHC.Classes

Methods

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

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

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

Defined in Data.Bifunctor.Product

Methods

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

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

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

Defined in Data.Bifunctor.Sum

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in Data.Bifunctor.Tannen

Methods

(==) :: Tannen f p a b -> Tannen f p a b -> Bool #

(/=) :: Tannen f p a b -> Tannen f p a b -> Bool #

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in Data.Bifunctor.Biff

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

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

Defined in GHC.Classes

Methods

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

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

mod :: Integral a => a -> a -> a infixl 7 #

integer modulus, satisfying

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

div :: Integral a => a -> a -> a infixl 7 #

integer division truncated toward negative infinity

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

return :: a -> Min a #

Monad Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

return :: a -> Max a #

Monad First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

return :: a -> First a #

Monad Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

return :: a -> Last a #

Monad Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

return :: a -> Option 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 Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

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

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

return :: a -> Down a #

Monad 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 Vector 
Instance details

Defined in Data.Vector

Methods

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

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

return :: a -> Vector a #

Monad 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 Id 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

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

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

return :: a -> Id a #

Monad Box 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

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

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

return :: a -> Box a #

Monad Array 
Instance details

Defined in Data.Primitive.Array

Methods

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

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

return :: a -> Array a #

Monad SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

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

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

return :: a -> SmallArray a #

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

ArrowApply a => Monad (ArrowMonad a)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

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

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

return :: a0 -> ArrowMonad a a0 #

Monad (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

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

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

return :: a -> Covector r a #

Representable f => Monad (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

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

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

return :: a -> Co f a #

Alternative f => Monad (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

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

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

return :: a -> Cofree f a #

Functor f => Monad (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

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

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

return :: a -> Free f a #

Monad m => Monad (Yoneda m) 
Instance details

Defined in Data.Functor.Yoneda

Methods

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

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

return :: a -> Yoneda m 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 m => Monad (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

(>>=) :: Kleisli m a a0 -> (a0 -> Kleisli m a b) -> Kleisli m a b #

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

return :: a0 -> Kleisli m a a0 #

Monad f => Monad (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

return :: a -> Ap f a #

Monad f => Monad (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

return :: a -> Alt f a #

(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 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

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

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

return :: a -> Tagged s a #

(Alternative f, Monad w) => Monad (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

(>>=) :: CofreeT f w a -> (a -> CofreeT f w b) -> CofreeT f w b #

(>>) :: CofreeT f w a -> CofreeT f w b -> CofreeT f w b #

return :: a -> CofreeT f w a #

(Functor f, Monad m) => Monad (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(>>=) :: FreeT f m a -> (a -> FreeT f m b) -> FreeT f m b #

(>>) :: FreeT f m a -> FreeT f m b -> FreeT f m b #

return :: a -> FreeT f m a #

Monad (Indexed i a) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

(>>=) :: Indexed i a a0 -> (a0 -> Indexed i a b) -> Indexed i a b #

(>>) :: Indexed i a a0 -> Indexed i a b -> Indexed i a b #

return :: a0 -> Indexed i a a0 #

(Monad (Rep p), Representable p) => Monad (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

(>>=) :: Prep p a -> (a -> Prep p b) -> Prep p b #

(>>) :: Prep p a -> Prep p b -> Prep p b #

return :: a -> Prep p a #

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Functor Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Functor First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Functor Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Functor Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

(<$) :: a -> Option b -> Option 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 Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

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

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

Functor 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 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 Doc 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Functor AnnotDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Functor Span 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Functor Vector 
Instance details

Defined in Data.Vector

Methods

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

(<$) :: a -> Vector b -> Vector 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 Id 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

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

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

Functor Box 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

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

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

Functor Array 
Instance details

Defined in Data.Primitive.Array

Methods

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

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

Functor SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

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

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

Functor (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 (Array i)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

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

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

Functor (Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Monad m => Functor (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

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

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

Arrow a => Functor (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

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

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

Functor (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 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

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

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

Functor (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

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

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

Functor f => Functor (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

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

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

Functor f => Functor (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

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

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

Functor f => Functor (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

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

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

Functor (Yoneda f) 
Instance details

Defined in Data.Functor.Yoneda

Methods

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

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

Functor f => Functor (Indexing f) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

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

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

Functor f => Functor (Indexing64 f) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

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

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

Functor f => Functor (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

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

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

Functor (URec 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 m => Functor (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

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

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

Functor (Const m :: Type -> Type)

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

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

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

Functor f => Functor (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

Functor f => Functor (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

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

Monad m => Functor (Bundle m v) 
Instance details

Defined in Data.Vector.Fusion.Bundle.Monadic

Methods

fmap :: (a -> b) -> Bundle m v a -> Bundle m v b #

(<$) :: a -> Bundle m v b -> Bundle m v a #

Functor (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

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

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

Bifunctor p => Functor (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

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

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

(Functor f, Functor w) => Functor (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

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

(<$) :: a -> CofreeT f w b -> CofreeT f w a #

Functor f => Functor (CofreeF f a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

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

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

Bifunctor p => Functor (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

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

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

(Functor f, Monad m) => Functor (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

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

(<$) :: a -> FreeT f m b -> FreeT f m a #

Functor f => Functor (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

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

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

Functor (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

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

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

Functor (Indexed i a) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

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

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

Profunctor p => Functor (Coprep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

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

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

Profunctor p => Functor (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

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

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

Functor ((->) 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 g) => Functor (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

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

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

Functor f => Functor (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 #

Reifies s (ReifiedApplicative f) => Functor (ReflectedApplicative f s) 
Instance details

Defined in Data.Reflection

Methods

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

(<$) :: a -> ReflectedApplicative f s b -> ReflectedApplicative f s a #

Functor (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

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

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

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

Defined in Data.Bifunctor.Flip

Methods

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

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

Functor g => Functor (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

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

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

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

Defined in Data.Bifunctor.Wrapped

Methods

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

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

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

Defined in Data.Bifunctor.Tannen

Methods

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

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

Profunctor p => Functor (Procompose p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Procompose p q a a0 -> Procompose p q a b #

(<$) :: a0 -> Procompose p q a b -> Procompose p q a a0 #

Profunctor p => Functor (Rift p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Rift p q a a0 -> Rift p q a b #

(<$) :: a0 -> Rift p q a b -> Rift p q a a0 #

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

Defined in Data.Bifunctor.Biff

Methods

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

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

class Num a #

Basic numeric class.

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

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

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

Minimal complete definition

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

Instances

Instances details
Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Int -> Int -> Int #

(-) :: Int -> Int -> Int #

(*) :: Int -> Int -> Int #

negate :: Int -> Int #

abs :: Int -> Int #

signum :: Int -> Int #

fromInteger :: Integer -> Int #

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(+) :: Int8 -> Int8 -> Int8 #

(-) :: Int8 -> Int8 -> Int8 #

(*) :: Int8 -> Int8 -> Int8 #

negate :: Int8 -> Int8 #

abs :: Int8 -> Int8 #

signum :: Int8 -> Int8 #

fromInteger :: Integer -> Int8 #

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Num Natural

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

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Word -> Word -> Word #

(-) :: Word -> Word -> Word #

(*) :: Word -> Word -> Word #

negate :: Word -> Word #

abs :: Word -> Word #

signum :: Word -> Word #

fromInteger :: Integer -> Word #

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num CChar 
Instance details

Defined in Foreign.C.Types

Num CSChar 
Instance details

Defined in Foreign.C.Types

Num CUChar 
Instance details

Defined in Foreign.C.Types

Num CShort 
Instance details

Defined in Foreign.C.Types

Num CUShort 
Instance details

Defined in Foreign.C.Types

Num CInt 
Instance details

Defined in Foreign.C.Types

Methods

(+) :: CInt -> CInt -> CInt #

(-) :: CInt -> CInt -> CInt #

(*) :: CInt -> CInt -> CInt #

negate :: CInt -> CInt #

abs :: CInt -> CInt #

signum :: CInt -> CInt #

fromInteger :: Integer -> CInt #

Num CUInt 
Instance details

Defined in Foreign.C.Types

Num CLong 
Instance details

Defined in Foreign.C.Types

Num CULong 
Instance details

Defined in Foreign.C.Types

Num CLLong 
Instance details

Defined in Foreign.C.Types

Num CULLong 
Instance details

Defined in Foreign.C.Types

Num CBool 
Instance details

Defined in Foreign.C.Types

Num CFloat 
Instance details

Defined in Foreign.C.Types

Num CDouble 
Instance details

Defined in Foreign.C.Types

Num CPtrdiff 
Instance details

Defined in Foreign.C.Types

Num CSize 
Instance details

Defined in Foreign.C.Types

Num CWchar 
Instance details

Defined in Foreign.C.Types

Num CSigAtomic 
Instance details

Defined in Foreign.C.Types

Num CClock 
Instance details

Defined in Foreign.C.Types

Num CTime 
Instance details

Defined in Foreign.C.Types

Num CUSeconds 
Instance details

Defined in Foreign.C.Types

Num CSUSeconds 
Instance details

Defined in Foreign.C.Types

Num CIntPtr 
Instance details

Defined in Foreign.C.Types

Num CUIntPtr 
Instance details

Defined in Foreign.C.Types

Num CIntMax 
Instance details

Defined in Foreign.C.Types

Num CUIntMax 
Instance details

Defined in Foreign.C.Types

Num CodePoint 
Instance details

Defined in Data.Text.Encoding

Methods

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

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

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

negate :: CodePoint -> CodePoint #

abs :: CodePoint -> CodePoint #

signum :: CodePoint -> CodePoint #

fromInteger :: Integer -> CodePoint #

Num DecoderState 
Instance details

Defined in Data.Text.Encoding

Methods

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

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

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

negate :: DecoderState -> DecoderState #

abs :: DecoderState -> DecoderState #

signum :: DecoderState -> DecoderState #

fromInteger :: Integer -> DecoderState #

Integral a => Num (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(+) :: Ratio a -> Ratio a -> Ratio a #

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

(*) :: Ratio a -> Ratio a -> Ratio a #

negate :: Ratio a -> Ratio a #

abs :: Ratio a -> Ratio a #

signum :: Ratio a -> Ratio a #

fromInteger :: Integer -> Ratio a #

RealFloat a => Num (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

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

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

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

negate :: Complex a -> Complex a #

abs :: Complex a -> Complex a #

signum :: Complex a -> Complex a #

fromInteger :: Integer -> Complex a #

Num a => Num (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Min a -> Min a -> Min a #

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

(*) :: Min a -> Min a -> Min a #

negate :: Min a -> Min a #

abs :: Min a -> Min a #

signum :: Min a -> Min a #

fromInteger :: Integer -> Min a #

Num a => Num (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Max a -> Max a -> Max a #

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

(*) :: Max a -> Max a -> Max a #

negate :: Max a -> Max a #

abs :: Max a -> Max a #

signum :: Max a -> Max a #

fromInteger :: Integer -> Max a #

Num a => Num (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

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

negate :: Sum a -> Sum a #

abs :: Sum a -> Sum a #

signum :: Sum a -> Sum a #

fromInteger :: Integer -> Sum a #

Num a => Num (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

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

negate :: Product a -> Product a #

abs :: Product a -> Product a #

signum :: Product a -> Product a #

fromInteger :: Integer -> Product a #

Num a => Num (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(+) :: Down a -> Down a -> Down a #

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

(*) :: Down a -> Down a -> Down a #

negate :: Down a -> Down a #

abs :: Down a -> Down a #

signum :: Down a -> Down a #

fromInteger :: Integer -> Down a #

Euclidean a => Num (Fraction a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: Mult a -> Mult a -> Mult a #

(-) :: Mult a -> Mult a -> Mult a #

(*) :: Mult a -> Mult a -> Mult a #

negate :: Mult a -> Mult a #

abs :: Mult a -> Mult a #

signum :: Mult a -> Mult a #

fromInteger :: Integer -> Mult a #

Num a => Num (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: Add a -> Add a -> Add a #

(-) :: Add a -> Add a -> Add a #

(*) :: Add a -> Add a -> Add a #

negate :: Add a -> Add a #

abs :: Add a -> Add a #

signum :: Add a -> Add a #

fromInteger :: Integer -> Add a #

(Ring a, UnitNormalForm a) => Num (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapNum a -> WrapNum a -> WrapNum a #

(-) :: WrapNum a -> WrapNum a -> WrapNum a #

(*) :: WrapNum a -> WrapNum a -> WrapNum a #

negate :: WrapNum a -> WrapNum a #

abs :: WrapNum a -> WrapNum a #

signum :: WrapNum a -> WrapNum a #

fromInteger :: Integer -> WrapNum a #

Num a => Num (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(+) :: Const a b -> Const a b -> Const a b #

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

(*) :: Const a b -> Const a b -> Const a b #

negate :: Const a b -> Const a b #

abs :: Const a b -> Const a b #

signum :: Const a b -> Const a b #

fromInteger :: Integer -> Const a b #

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

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

negate :: Ap f a -> Ap f a #

abs :: Ap f a -> Ap f a #

signum :: Ap f a -> Ap f a #

fromInteger :: Integer -> Ap f a #

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

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

negate :: Alt f a -> Alt f a #

abs :: Alt f a -> Alt f a #

signum :: Alt f a -> Alt f a #

fromInteger :: Integer -> Alt f a #

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

Defined in Data.Tagged

Methods

(+) :: Tagged s a -> Tagged s a -> Tagged s a #

(-) :: Tagged s a -> Tagged s a -> Tagged s a #

(*) :: Tagged s a -> Tagged s a -> Tagged s a #

negate :: Tagged s a -> Tagged s a #

abs :: Tagged s a -> Tagged s a #

signum :: Tagged s a -> Tagged s a #

fromInteger :: Integer -> Tagged s a #

class Eq a => Ord a where #

The Ord class is used for totally ordered datatypes.

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

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

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

Note that the following operator interactions are expected to hold:

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

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

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

Minimal complete definition

compare | (<=)

Methods

compare :: a -> a -> Ordering #

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

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

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

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

max :: a -> a -> a #

min :: a -> a -> a #

Instances

Instances details
Ord Bool 
Instance details

Defined in GHC.Classes

Methods

compare :: Bool -> Bool -> Ordering #

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

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

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

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

max :: Bool -> Bool -> Bool #

min :: Bool -> Bool -> Bool #

Ord Char 
Instance details

Defined in GHC.Classes

Methods

compare :: Char -> Char -> Ordering #

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

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

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

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

max :: Char -> Char -> Char #

min :: Char -> Char -> Char #

Ord Double

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

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

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

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

Defined in GHC.Classes

Ord Float

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

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

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

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

Defined in GHC.Classes

Methods

compare :: Float -> Float -> Ordering #

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

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

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

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

max :: Float -> Float -> Float #

min :: Float -> Float -> Float #

Ord Int 
Instance details

Defined in GHC.Classes

Methods

compare :: Int -> Int -> Ordering #

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

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

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

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

max :: Int -> Int -> Int #

min :: Int -> Int -> Int #

Ord Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int8 -> Int8 -> Ordering #

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

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

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

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

max :: Int8 -> Int8 -> Int8 #

min :: Int8 -> Int8 -> Int8 #

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int16 -> Int16 -> Ordering #

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

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

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

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

max :: Int16 -> Int16 -> Int16 #

min :: Int16 -> Int16 -> Int16 #

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int32 -> Int32 -> Ordering #

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

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

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

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

max :: Int32 -> Int32 -> Int32 #

min :: Int32 -> Int32 -> Int32 #

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int64 -> Int64 -> Ordering #

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

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

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

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

max :: Int64 -> Int64 -> Int64 #

min :: Int64 -> Int64 -> Int64 #

Ord Integer 
Instance details

Defined in GHC.Integer.Type

Ord Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Ord Ordering 
Instance details

Defined in GHC.Classes

Ord Word 
Instance details

Defined in GHC.Classes

Methods

compare :: Word -> Word -> Ordering #

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

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

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

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

max :: Word -> Word -> Word #

min :: Word -> Word -> Word #

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

compare :: Word8 -> Word8 -> Ordering #

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

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

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

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

max :: Word8 -> Word8 -> Word8 #

min :: Word8 -> Word8 -> Word8 #

Ord Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ord SomeTypeRep 
Instance details

Defined in Data.Typeable.Internal

Ord Exp 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Exp -> Exp -> Ordering #

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

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

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

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

max :: Exp -> Exp -> Exp #

min :: Exp -> Exp -> Exp #

Ord Match 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Match -> Match -> Ordering #

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

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

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

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

max :: Match -> Match -> Match #

min :: Match -> Match -> Match #

Ord Clause 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pat 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Pat -> Pat -> Ordering #

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

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

(>) :: Pat -> Pat -> Bool #

(>=) :: Pat -> Pat -> Bool #

max :: Pat -> Pat -> Pat #

min :: Pat -> Pat -> Pat #

Ord Type 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

(>=) :: Type -> Type -> Bool #

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

Ord Dec 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Dec -> Dec -> Ordering #

(<) :: Dec -> Dec -> Bool #

(<=) :: Dec -> Dec -> Bool #

(>) :: Dec -> Dec -> Bool #

(>=) :: Dec -> Dec -> Bool #

max :: Dec -> Dec -> Dec #

min :: Dec -> Dec -> Dec #

Ord Name 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

(>=) :: Name -> Name -> Bool #

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Ord FunDep 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord InjectivityAnn 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Overlap 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord () 
Instance details

Defined in GHC.Classes

Methods

compare :: () -> () -> Ordering #

(<) :: () -> () -> Bool #

(<=) :: () -> () -> Bool #

(>) :: () -> () -> Bool #

(>=) :: () -> () -> Bool #

max :: () -> () -> () #

min :: () -> () -> () #

Ord TyCon 
Instance details

Defined in GHC.Classes

Methods

compare :: TyCon -> TyCon -> Ordering #

(<) :: TyCon -> TyCon -> Bool #

(<=) :: TyCon -> TyCon -> Bool #

(>) :: TyCon -> TyCon -> Bool #

(>=) :: TyCon -> TyCon -> Bool #

max :: TyCon -> TyCon -> TyCon #

min :: TyCon -> TyCon -> TyCon #

Ord Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Methods

compare :: Void -> Void -> Ordering #

(<) :: Void -> Void -> Bool #

(<=) :: Void -> Void -> Bool #

(>) :: Void -> Void -> Bool #

(>=) :: Void -> Void -> Bool #

max :: Void -> Void -> Void #

min :: Void -> Void -> Void #

Ord Version

Since: base-2.1

Instance details

Defined in Data.Version

Ord AsyncException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord ArrayException

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Exception

Ord ExitCode 
Instance details

Defined in GHC.IO.Exception

Ord BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Ord ArithException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: All -> All -> Ordering #

(<) :: All -> All -> Bool #

(<=) :: All -> All -> Bool #

(>) :: All -> All -> Bool #

(>=) :: All -> All -> Bool #

max :: All -> All -> All #

min :: All -> All -> All #

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Any -> Any -> Ordering #

(<) :: Any -> Any -> Bool #

(<=) :: Any -> Any -> Bool #

(>) :: Any -> Any -> Bool #

(>=) :: Any -> Any -> Bool #

max :: Any -> Any -> Any #

min :: Any -> Any -> Any #

Ord Fixity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord Associativity

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Ord SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Ord CChar 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CChar -> CChar -> Ordering #

(<) :: CChar -> CChar -> Bool #

(<=) :: CChar -> CChar -> Bool #

(>) :: CChar -> CChar -> Bool #

(>=) :: CChar -> CChar -> Bool #

max :: CChar -> CChar -> CChar #

min :: CChar -> CChar -> CChar #

Ord CSChar 
Instance details

Defined in Foreign.C.Types

Ord CUChar 
Instance details

Defined in Foreign.C.Types

Ord CShort 
Instance details

Defined in Foreign.C.Types

Ord CUShort 
Instance details

Defined in Foreign.C.Types

Ord CInt 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CInt -> CInt -> Ordering #

(<) :: CInt -> CInt -> Bool #

(<=) :: CInt -> CInt -> Bool #

(>) :: CInt -> CInt -> Bool #

(>=) :: CInt -> CInt -> Bool #

max :: CInt -> CInt -> CInt #

min :: CInt -> CInt -> CInt #

Ord CUInt 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CUInt -> CUInt -> Ordering #

(<) :: CUInt -> CUInt -> Bool #

(<=) :: CUInt -> CUInt -> Bool #

(>) :: CUInt -> CUInt -> Bool #

(>=) :: CUInt -> CUInt -> Bool #

max :: CUInt -> CUInt -> CUInt #

min :: CUInt -> CUInt -> CUInt #

Ord CLong 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CLong -> CLong -> Ordering #

(<) :: CLong -> CLong -> Bool #

(<=) :: CLong -> CLong -> Bool #

(>) :: CLong -> CLong -> Bool #

(>=) :: CLong -> CLong -> Bool #

max :: CLong -> CLong -> CLong #

min :: CLong -> CLong -> CLong #

Ord CULong 
Instance details

Defined in Foreign.C.Types

Ord CLLong 
Instance details

Defined in Foreign.C.Types

Ord CULLong 
Instance details

Defined in Foreign.C.Types

Ord CBool 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CBool -> CBool -> Ordering #

(<) :: CBool -> CBool -> Bool #

(<=) :: CBool -> CBool -> Bool #

(>) :: CBool -> CBool -> Bool #

(>=) :: CBool -> CBool -> Bool #

max :: CBool -> CBool -> CBool #

min :: CBool -> CBool -> CBool #

Ord CFloat 
Instance details

Defined in Foreign.C.Types

Ord CDouble 
Instance details

Defined in Foreign.C.Types

Ord CPtrdiff 
Instance details

Defined in Foreign.C.Types

Ord CSize 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CSize -> CSize -> Ordering #

(<) :: CSize -> CSize -> Bool #

(<=) :: CSize -> CSize -> Bool #

(>) :: CSize -> CSize -> Bool #

(>=) :: CSize -> CSize -> Bool #

max :: CSize -> CSize -> CSize #

min :: CSize -> CSize -> CSize #

Ord CWchar 
Instance details

Defined in Foreign.C.Types

Ord CSigAtomic 
Instance details

Defined in Foreign.C.Types

Ord CClock 
Instance details

Defined in Foreign.C.Types

Ord CTime 
Instance details

Defined in Foreign.C.Types

Methods

compare :: CTime -> CTime -> Ordering #

(<) :: CTime -> CTime -> Bool #

(<=) :: CTime -> CTime -> Bool #

(>) :: CTime -> CTime -> Bool #

(>=) :: CTime -> CTime -> Bool #

max :: CTime -> CTime -> CTime #

min :: CTime -> CTime -> CTime #

Ord CUSeconds 
Instance details

Defined in Foreign.C.Types

Ord CSUSeconds 
Instance details

Defined in Foreign.C.Types

Ord CIntPtr 
Instance details

Defined in Foreign.C.Types

Ord CUIntPtr 
Instance details

Defined in Foreign.C.Types

Ord CIntMax 
Instance details

Defined in Foreign.C.Types

Ord CUIntMax 
Instance details

Defined in Foreign.C.Types

Ord Fingerprint

Since: base-4.4.0.0

Instance details

Defined in GHC.Fingerprint.Type

Ord GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Ord ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Ord ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal

Ord IntSet 
Instance details

Defined in Data.IntSet.Internal

Ord BigNat 
Instance details

Defined in GHC.Integer.Type

Ord ModName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PkgName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Module 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord OccName 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameFlavour 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord NameSpace 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Loc 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Loc -> Loc -> Ordering #

(<) :: Loc -> Loc -> Bool #

(<=) :: Loc -> Loc -> Bool #

(>) :: Loc -> Loc -> Bool #

(>=) :: Loc -> Loc -> Bool #

max :: Loc -> Loc -> Loc #

min :: Loc -> Loc -> Loc #

Ord Info 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Info -> Info -> Ordering #

(<) :: Info -> Info -> Bool #

(<=) :: Info -> Info -> Bool #

(>) :: Info -> Info -> Bool #

(>=) :: Info -> Info -> Bool #

max :: Info -> Info -> Info #

min :: Info -> Info -> Info #

Ord ModuleInfo 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Fixity 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FixityDirection 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Lit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Lit -> Lit -> Ordering #

(<) :: Lit -> Lit -> Bool #

(<=) :: Lit -> Lit -> Bool #

(>) :: Lit -> Lit -> Bool #

(>=) :: Lit -> Lit -> Bool #

max :: Lit -> Lit -> Lit #

min :: Lit -> Lit -> Lit #

Ord Bytes 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Bytes -> Bytes -> Ordering #

(<) :: Bytes -> Bytes -> Bool #

(<=) :: Bytes -> Bytes -> Bool #

(>) :: Bytes -> Bytes -> Bool #

(>=) :: Bytes -> Bytes -> Bool #

max :: Bytes -> Bytes -> Bytes #

min :: Bytes -> Bytes -> Bytes #

Ord Body 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Body -> Body -> Ordering #

(<) :: Body -> Body -> Bool #

(<=) :: Body -> Body -> Bool #

(>) :: Body -> Body -> Bool #

(>=) :: Body -> Body -> Bool #

max :: Body -> Body -> Body #

min :: Body -> Body -> Body #

Ord Guard 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Guard -> Guard -> Ordering #

(<) :: Guard -> Guard -> Bool #

(<=) :: Guard -> Guard -> Bool #

(>) :: Guard -> Guard -> Bool #

(>=) :: Guard -> Guard -> Bool #

max :: Guard -> Guard -> Guard #

min :: Guard -> Guard -> Guard #

Ord Stmt 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Stmt -> Stmt -> Ordering #

(<) :: Stmt -> Stmt -> Bool #

(<=) :: Stmt -> Stmt -> Bool #

(>) :: Stmt -> Stmt -> Bool #

(>=) :: Stmt -> Stmt -> Bool #

max :: Stmt -> Stmt -> Stmt #

min :: Stmt -> Stmt -> Stmt #

Ord Range 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Range -> Range -> Ordering #

(<) :: Range -> Range -> Bool #

(<=) :: Range -> Range -> Bool #

(>) :: Range -> Range -> Bool #

(>=) :: Range -> Range -> Bool #

max :: Range -> Range -> Range #

min :: Range -> Range -> Range #

Ord DerivClause 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DerivStrategy 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TypeFamilyHead 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TySynEqn 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Foreign 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Callconv 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Safety 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Pragma 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Inline 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleMatch 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Phases 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord RuleBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord AnnTarget 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceUnpackedness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord SourceStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord DecidedStrictness 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord Con 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Con -> Con -> Ordering #

(<) :: Con -> Con -> Bool #

(<=) :: Con -> Con -> Bool #

(>) :: Con -> Con -> Bool #

(>=) :: Con -> Con -> Bool #

max :: Con -> Con -> Con #

min :: Con -> Con -> Con #

Ord Bang 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Bang -> Bang -> Ordering #

(<) :: Bang -> Bang -> Bool #

(<=) :: Bang -> Bang -> Bool #

(>) :: Bang -> Bang -> Bool #

(>=) :: Bang -> Bang -> Bool #

max :: Bang -> Bang -> Bang #

min :: Bang -> Bang -> Bang #

Ord PatSynDir 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord PatSynArgs 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TyVarBndr 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord FamilyResultSig 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord TyLit 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: TyLit -> TyLit -> Ordering #

(<) :: TyLit -> TyLit -> Bool #

(<=) :: TyLit -> TyLit -> Bool #

(>) :: TyLit -> TyLit -> Bool #

(>=) :: TyLit -> TyLit -> Bool #

max :: TyLit -> TyLit -> TyLit #

min :: TyLit -> TyLit -> TyLit #

Ord Role 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

compare :: Role -> Role -> Ordering #

(<) :: Role -> Role -> Bool #

(<=) :: Role -> Role -> Bool #

(>) :: Role -> Role -> Bool #

(>=) :: Role -> Role -> Bool #

max :: Role -> Role -> Role #

min :: Role -> Role -> Role #

Ord AnnLookup 
Instance details

Defined in Language.Haskell.TH.Syntax

Ord ByteArray 
Instance details

Defined in Data.Primitive.ByteArray

Methods

compare :: ByteArray -> ByteArray -> Ordering #

(<) :: ByteArray -> ByteArray -> Bool #

(<=) :: ByteArray -> ByteArray -> Bool #

(>) :: ByteArray -> ByteArray -> Bool #

(>=) :: ByteArray -> ByteArray -> Bool #

max :: ByteArray -> ByteArray -> ByteArray #

min :: ByteArray -> ByteArray -> ByteArray #

Ord ConstructorVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

compare :: ConstructorVariant -> ConstructorVariant -> Ordering #

(<) :: ConstructorVariant -> ConstructorVariant -> Bool #

(<=) :: ConstructorVariant -> ConstructorVariant -> Bool #

(>) :: ConstructorVariant -> ConstructorVariant -> Bool #

(>=) :: ConstructorVariant -> ConstructorVariant -> Bool #

max :: ConstructorVariant -> ConstructorVariant -> ConstructorVariant #

min :: ConstructorVariant -> ConstructorVariant -> ConstructorVariant #

Ord DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

compare :: DatatypeVariant -> DatatypeVariant -> Ordering #

(<) :: DatatypeVariant -> DatatypeVariant -> Bool #

(<=) :: DatatypeVariant -> DatatypeVariant -> Bool #

(>) :: DatatypeVariant -> DatatypeVariant -> Bool #

(>=) :: DatatypeVariant -> DatatypeVariant -> Bool #

max :: DatatypeVariant -> DatatypeVariant -> DatatypeVariant #

min :: DatatypeVariant -> DatatypeVariant -> DatatypeVariant #

Ord FieldStrictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

compare :: FieldStrictness -> FieldStrictness -> Ordering #

(<) :: FieldStrictness -> FieldStrictness -> Bool #

(<=) :: FieldStrictness -> FieldStrictness -> Bool #

(>) :: FieldStrictness -> FieldStrictness -> Bool #

(>=) :: FieldStrictness -> FieldStrictness -> Bool #

max :: FieldStrictness -> FieldStrictness -> FieldStrictness #

min :: FieldStrictness -> FieldStrictness -> FieldStrictness #

Ord Strictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

compare :: Strictness -> Strictness -> Ordering #

(<) :: Strictness -> Strictness -> Bool #

(<=) :: Strictness -> Strictness -> Bool #

(>) :: Strictness -> Strictness -> Bool #

(>=) :: Strictness -> Strictness -> Bool #

max :: Strictness -> Strictness -> Strictness #

min :: Strictness -> Strictness -> Strictness #

Ord Unpackedness 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

compare :: Unpackedness -> Unpackedness -> Ordering #

(<) :: Unpackedness -> Unpackedness -> Bool #

(<=) :: Unpackedness -> Unpackedness -> Bool #

(>) :: Unpackedness -> Unpackedness -> Bool #

(>=) :: Unpackedness -> Unpackedness -> Bool #

max :: Unpackedness -> Unpackedness -> Unpackedness #

min :: Unpackedness -> Unpackedness -> Unpackedness #

Ord Specificity 
Instance details

Defined in Language.Haskell.TH.Datatype.TyVarBndr

Methods

compare :: Specificity -> Specificity -> Ordering #

(<) :: Specificity -> Specificity -> Bool #

(<=) :: Specificity -> Specificity -> Bool #

(>) :: Specificity -> Specificity -> Bool #

(>=) :: Specificity -> Specificity -> Bool #

max :: Specificity -> Specificity -> Specificity #

min :: Specificity -> Specificity -> Specificity #

Ord a => Ord [a] 
Instance details

Defined in GHC.Classes

Methods

compare :: [a] -> [a] -> Ordering #

(<) :: [a] -> [a] -> Bool #

(<=) :: [a] -> [a] -> Bool #

(>) :: [a] -> [a] -> Bool #

(>=) :: [a] -> [a] -> Bool #

max :: [a] -> [a] -> [a] #

min :: [a] -> [a] -> [a] #

Ord a => Ord (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 #

Integral a => Ord (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

compare :: Ratio a -> Ratio a -> Ordering #

(<) :: Ratio a -> Ratio a -> Bool #

(<=) :: Ratio a -> Ratio a -> Bool #

(>) :: Ratio a -> Ratio a -> Bool #

(>=) :: Ratio a -> Ratio a -> Bool #

max :: Ratio a -> Ratio a -> Ratio a #

min :: Ratio a -> Ratio a -> Ratio a #

Ord (Ptr a)

Since: base-2.1

Instance details

Defined in GHC.Ptr

Methods

compare :: Ptr a -> Ptr a -> Ordering #

(<) :: Ptr a -> Ptr a -> Bool #

(<=) :: Ptr a -> Ptr a -> Bool #

(>) :: Ptr a -> Ptr a -> Bool #

(>=) :: Ptr a -> Ptr a -> Bool #

max :: Ptr a -> Ptr a -> Ptr a #

min :: Ptr a -> Ptr a -> Ptr a #

Ord (FunPtr a) 
Instance details

Defined in GHC.Ptr

Methods

compare :: FunPtr a -> FunPtr a -> Ordering #

(<) :: FunPtr a -> FunPtr a -> Bool #

(<=) :: FunPtr a -> FunPtr a -> Bool #

(>) :: FunPtr a -> FunPtr a -> Bool #

(>=) :: FunPtr a -> FunPtr a -> Bool #

max :: FunPtr a -> FunPtr a -> FunPtr a #

min :: FunPtr a -> FunPtr a -> FunPtr a #

Ord p => Ord (Par1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: Par1 p -> Par1 p -> Ordering #

(<) :: Par1 p -> Par1 p -> Bool #

(<=) :: Par1 p -> Par1 p -> Bool #

(>) :: Par1 p -> Par1 p -> Bool #

(>=) :: Par1 p -> Par1 p -> Bool #

max :: Par1 p -> Par1 p -> Par1 p #

min :: Par1 p -> Par1 p -> Par1 p #

Ord a => Ord (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Min a -> Min a -> Ordering #

(<) :: Min a -> Min a -> Bool #

(<=) :: Min a -> Min a -> Bool #

(>) :: Min a -> Min a -> Bool #

(>=) :: Min a -> Min a -> Bool #

max :: Min a -> Min a -> Min a #

min :: Min a -> Min a -> Min a #

Ord a => Ord (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Max a -> Max a -> Ordering #

(<) :: Max a -> Max a -> Bool #

(<=) :: Max a -> Max a -> Bool #

(>) :: Max a -> Max a -> Bool #

(>=) :: Max a -> Max a -> Bool #

max :: Max a -> Max a -> Max a #

min :: Max a -> Max a -> Max a #

Ord a => Ord (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: First a -> First a -> Ordering #

(<) :: First a -> First a -> Bool #

(<=) :: First a -> First a -> Bool #

(>) :: First a -> First a -> Bool #

(>=) :: First a -> First a -> Bool #

max :: First a -> First a -> First a #

min :: First a -> First a -> First a #

Ord a => Ord (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Last a -> Last a -> Ordering #

(<) :: Last a -> Last a -> Bool #

(<=) :: Last a -> Last a -> Bool #

(>) :: Last a -> Last a -> Bool #

(>=) :: Last a -> Last a -> Bool #

max :: Last a -> Last a -> Last a #

min :: Last a -> Last a -> Last a #

Ord m => Ord (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Ord a => Ord (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Option a -> Option a -> Ordering #

(<) :: Option a -> Option a -> Bool #

(<=) :: Option a -> Option a -> Bool #

(>) :: Option a -> Option a -> Bool #

(>=) :: Option a -> Option a -> Bool #

max :: Option a -> Option a -> Option a #

min :: Option a -> Option a -> Option a #

Ord a => Ord (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

compare :: ZipList a -> ZipList a -> Ordering #

(<) :: ZipList a -> ZipList a -> Bool #

(<=) :: ZipList a -> ZipList a -> Bool #

(>) :: ZipList a -> ZipList a -> Bool #

(>=) :: ZipList a -> ZipList a -> Bool #

max :: ZipList a -> ZipList a -> ZipList a #

min :: ZipList a -> ZipList a -> ZipList a #

Ord a => Ord (Identity a)

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

compare :: Identity a -> Identity a -> Ordering #

(<) :: Identity a -> Identity a -> Bool #

(<=) :: Identity a -> Identity a -> Bool #

(>) :: Identity a -> Identity a -> Bool #

(>=) :: Identity a -> Identity a -> Bool #

max :: Identity a -> Identity a -> Identity a #

min :: Identity a -> Identity a -> Identity a #

Ord a => Ord (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: First a -> First a -> Ordering #

(<) :: First a -> First a -> Bool #

(<=) :: First a -> First a -> Bool #

(>) :: First a -> First a -> Bool #

(>=) :: First a -> First a -> Bool #

max :: First a -> First a -> First a #

min :: First a -> First a -> First a #

Ord a => Ord (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: Last a -> Last a -> Ordering #

(<) :: Last a -> Last a -> Bool #

(<=) :: Last a -> Last a -> Bool #

(>) :: Last a -> Last a -> Bool #

(>=) :: Last a -> Last a -> Bool #

max :: Last a -> Last a -> Last a #

min :: Last a -> Last a -> Last a #

Ord a => Ord (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Dual a -> Dual a -> Ordering #

(<) :: Dual a -> Dual a -> Bool #

(<=) :: Dual a -> Dual a -> Bool #

(>) :: Dual a -> Dual a -> Bool #

(>=) :: Dual a -> Dual a -> Bool #

max :: Dual a -> Dual a -> Dual a #

min :: Dual a -> Dual a -> Dual a #

Ord a => Ord (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Sum a -> Sum a -> Ordering #

(<) :: Sum a -> Sum a -> Bool #

(<=) :: Sum a -> Sum a -> Bool #

(>) :: Sum a -> Sum a -> Bool #

(>=) :: Sum a -> Sum a -> Bool #

max :: Sum a -> Sum a -> Sum a #

min :: Sum a -> Sum a -> Sum a #

Ord a => Ord (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Product a -> Product a -> Ordering #

(<) :: Product a -> Product a -> Bool #

(<=) :: Product a -> Product a -> Bool #

(>) :: Product a -> Product a -> Bool #

(>=) :: Product a -> Product a -> Bool #

max :: Product a -> Product a -> Product a #

min :: Product a -> Product a -> Product a #

Ord a => Ord (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

compare :: Down a -> Down a -> Ordering #

(<) :: Down a -> Down a -> Bool #

(<=) :: Down a -> Down a -> Bool #

(>) :: Down a -> Down a -> Bool #

(>=) :: Down a -> Down a -> Bool #

max :: Down a -> Down a -> Down a #

min :: Down a -> Down a -> Down a #

Ord a => Ord (NonEmpty a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

compare :: NonEmpty a -> NonEmpty a -> Ordering #

(<) :: NonEmpty a -> NonEmpty a -> Bool #

(<=) :: NonEmpty a -> NonEmpty a -> Bool #

(>) :: NonEmpty a -> NonEmpty a -> Bool #

(>=) :: NonEmpty a -> NonEmpty a -> Bool #

max :: NonEmpty a -> NonEmpty a -> NonEmpty a #

min :: NonEmpty a -> NonEmpty a -> NonEmpty a #

Ord a => Ord (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

compare :: IntMap a -> IntMap a -> Ordering #

(<) :: IntMap a -> IntMap a -> Bool #

(<=) :: IntMap a -> IntMap a -> Bool #

(>) :: IntMap a -> IntMap a -> Bool #

(>=) :: IntMap a -> IntMap a -> Bool #

max :: IntMap a -> IntMap a -> IntMap a #

min :: IntMap a -> IntMap a -> IntMap a #

Ord a => Ord (Tree a)

Since: containers-0.6.5

Instance details

Defined in Data.Tree

Methods

compare :: Tree a -> Tree a -> Ordering #

(<) :: Tree a -> Tree a -> Bool #

(<=) :: Tree a -> Tree a -> Bool #

(>) :: Tree a -> Tree a -> Bool #

(>=) :: Tree a -> Tree a -> Bool #

max :: Tree a -> Tree a -> Tree a #

min :: Tree a -> Tree a -> Tree a #

Ord a => Ord (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: Seq a -> Seq a -> Ordering #

(<) :: Seq a -> Seq a -> Bool #

(<=) :: Seq a -> Seq a -> Bool #

(>) :: Seq a -> Seq a -> Bool #

(>=) :: Seq a -> Seq a -> Bool #

max :: Seq a -> Seq a -> Seq a #

min :: Seq a -> Seq a -> Seq a #

Ord a => Ord (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: ViewL a -> ViewL a -> Ordering #

(<) :: ViewL a -> ViewL a -> Bool #

(<=) :: ViewL a -> ViewL a -> Bool #

(>) :: ViewL a -> ViewL a -> Bool #

(>=) :: ViewL a -> ViewL a -> Bool #

max :: ViewL a -> ViewL a -> ViewL a #

min :: ViewL a -> ViewL a -> ViewL a #

Ord a => Ord (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: ViewR a -> ViewR a -> Ordering #

(<) :: ViewR a -> ViewR a -> Bool #

(<=) :: ViewR a -> ViewR a -> Bool #

(>) :: ViewR a -> ViewR a -> Bool #

(>=) :: ViewR a -> ViewR a -> Bool #

max :: ViewR a -> ViewR a -> ViewR a #

min :: ViewR a -> ViewR a -> ViewR a #

Ord a => Ord (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

compare :: Set a -> Set a -> Ordering #

(<) :: Set a -> Set a -> Bool #

(<=) :: Set a -> Set a -> Bool #

(>) :: Set a -> Set a -> Bool #

(>=) :: Set a -> Set a -> Bool #

max :: Set a -> Set a -> Set a #

min :: Set a -> Set a -> Set a #

Ord a => Ord (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

compare :: HashSet a -> HashSet a -> Ordering #

(<) :: HashSet a -> HashSet a -> Bool #

(<=) :: HashSet a -> HashSet a -> Bool #

(>) :: HashSet a -> HashSet a -> Bool #

(>=) :: HashSet a -> HashSet a -> Bool #

max :: HashSet a -> HashSet a -> HashSet a #

min :: HashSet a -> HashSet a -> HashSet a #

Ord a => Ord (Vector a) 
Instance details

Defined in Data.Vector

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

(Ord d, GCDDomain d) => Ord (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

compare :: Fraction d -> Fraction d -> Ordering #

(<) :: Fraction d -> Fraction d -> Bool #

(<=) :: Fraction d -> Fraction d -> Bool #

(>) :: Fraction d -> Fraction d -> Bool #

(>=) :: Fraction d -> Fraction d -> Bool #

max :: Fraction d -> Fraction d -> Fraction d #

min :: Fraction d -> Fraction d -> Fraction d #

Ord a => Ord (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

compare :: Array a -> Array a -> Ordering #

(<) :: Array a -> Array a -> Bool #

(<=) :: Array a -> Array a -> Bool #

(>) :: Array a -> Array a -> Bool #

(>=) :: Array a -> Array a -> Bool #

max :: Array a -> Array a -> Array a #

min :: Array a -> Array a -> Array a #

(Ord a, Prim a) => Ord (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

compare :: PrimArray a -> PrimArray a -> Ordering #

(<) :: PrimArray a -> PrimArray a -> Bool #

(<=) :: PrimArray a -> PrimArray a -> Bool #

(>) :: PrimArray a -> PrimArray a -> Bool #

(>=) :: PrimArray a -> PrimArray a -> Bool #

max :: PrimArray a -> PrimArray a -> PrimArray a #

min :: PrimArray a -> PrimArray a -> PrimArray a #

Ord a => Ord (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

compare :: SmallArray a -> SmallArray a -> Ordering #

(<) :: SmallArray a -> SmallArray a -> Bool #

(<=) :: SmallArray a -> SmallArray a -> Bool #

(>) :: SmallArray a -> SmallArray a -> Bool #

(>=) :: SmallArray a -> SmallArray a -> Bool #

max :: SmallArray a -> SmallArray a -> SmallArray a #

min :: SmallArray a -> SmallArray a -> SmallArray a #

(Prim a, Ord a) => Ord (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

(Storable a, Ord a) => Ord (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

Ord a => Ord (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

compare :: Mult a -> Mult a -> Ordering #

(<) :: Mult a -> Mult a -> Bool #

(<=) :: Mult a -> Mult a -> Bool #

(>) :: Mult a -> Mult a -> Bool #

(>=) :: Mult a -> Mult a -> Bool #

max :: Mult a -> Mult a -> Mult a #

min :: Mult a -> Mult a -> Mult a #

Ord a => Ord (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

compare :: Add a -> Add a -> Ordering #

(<) :: Add a -> Add a -> Bool #

(<=) :: Add a -> Add a -> Bool #

(>) :: Add a -> Add a -> Bool #

(>=) :: Add a -> Add a -> Bool #

max :: Add a -> Add a -> Add a #

min :: Add a -> Add a -> Add a #

Ord a => Ord (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Ord a => Ord (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Ord a => Ord (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Ord a => Ord (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

compare :: WrapNum a -> WrapNum a -> Ordering #

(<) :: WrapNum a -> WrapNum a -> Bool #

(<=) :: WrapNum a -> WrapNum a -> Bool #

(>) :: WrapNum a -> WrapNum a -> Bool #

(>=) :: WrapNum a -> WrapNum a -> Bool #

max :: WrapNum a -> WrapNum a -> WrapNum a #

min :: WrapNum a -> WrapNum a -> WrapNum a #

Ord a => Ord (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

compare :: Hashed a -> Hashed a -> Ordering #

(<) :: Hashed a -> Hashed a -> Bool #

(<=) :: Hashed a -> Hashed a -> Bool #

(>) :: Hashed a -> Hashed a -> Bool #

(>=) :: Hashed a -> Hashed a -> Bool #

max :: Hashed a -> Hashed a -> Hashed a #

min :: Hashed a -> Hashed a -> Hashed a #

(Ord a, Ord b) => Ord (Either a b)

Since: base-2.1

Instance details

Defined in Data.Either

Methods

compare :: Either a b -> Either a b -> Ordering #

(<) :: Either a b -> Either a b -> Bool #

(<=) :: Either a b -> Either a b -> Bool #

(>) :: Either a b -> Either a b -> Bool #

(>=) :: Either a b -> Either a b -> Bool #

max :: Either a b -> Either a b -> Either a b #

min :: Either a b -> Either a b -> Either a b #

Ord (V1 p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: V1 p -> V1 p -> Ordering #

(<) :: V1 p -> V1 p -> Bool #

(<=) :: V1 p -> V1 p -> Bool #

(>) :: V1 p -> V1 p -> Bool #

(>=) :: V1 p -> V1 p -> Bool #

max :: V1 p -> V1 p -> V1 p #

min :: V1 p -> V1 p -> V1 p #

Ord (U1 p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: U1 p -> U1 p -> Ordering #

(<) :: U1 p -> U1 p -> Bool #

(<=) :: U1 p -> U1 p -> Bool #

(>) :: U1 p -> U1 p -> Bool #

(>=) :: U1 p -> U1 p -> Bool #

max :: U1 p -> U1 p -> U1 p #

min :: U1 p -> U1 p -> U1 p #

Ord (TypeRep a)

Since: base-4.4.0.0

Instance details

Defined in Data.Typeable.Internal

Methods

compare :: TypeRep a -> TypeRep a -> Ordering #

(<) :: TypeRep a -> TypeRep a -> Bool #

(<=) :: TypeRep a -> TypeRep a -> Bool #

(>) :: TypeRep a -> TypeRep a -> Bool #

(>=) :: TypeRep a -> TypeRep a -> Bool #

max :: TypeRep a -> TypeRep a -> TypeRep a #

min :: TypeRep a -> TypeRep a -> TypeRep a #

(Ord a, Ord b) => Ord (a, b) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b) -> (a, b) -> Ordering #

(<) :: (a, b) -> (a, b) -> Bool #

(<=) :: (a, b) -> (a, b) -> Bool #

(>) :: (a, b) -> (a, b) -> Bool #

(>=) :: (a, b) -> (a, b) -> Bool #

max :: (a, b) -> (a, b) -> (a, b) #

min :: (a, b) -> (a, b) -> (a, b) #

(Ix i, Ord e) => Ord (Array i e)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

compare :: Array i e -> Array i e -> Ordering #

(<) :: Array i e -> Array i e -> Bool #

(<=) :: Array i e -> Array i e -> Bool #

(>) :: Array i e -> Array i e -> Bool #

(>=) :: Array i e -> Array i e -> Bool #

max :: Array i e -> Array i e -> Array i e #

min :: Array i e -> Array i e -> Array i e #

Ord a => Ord (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

compare :: Arg a b -> Arg a b -> Ordering #

(<) :: Arg a b -> Arg a b -> Bool #

(<=) :: Arg a b -> Arg a b -> Bool #

(>) :: Arg a b -> Arg a b -> Bool #

(>=) :: Arg a b -> Arg a b -> Bool #

max :: Arg a b -> Arg a b -> Arg a b #

min :: Arg a b -> Arg a b -> Arg a b #

(Ord k, Ord v) => Ord (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

compare :: Map k v -> Map k v -> Ordering #

(<) :: Map k v -> Map k v -> Bool #

(<=) :: Map k v -> Map k v -> Bool #

(>) :: Map k v -> Map k v -> Bool #

(>=) :: Map k v -> Map k v -> Bool #

max :: Map k v -> Map k v -> Map k v #

min :: Map k v -> Map k v -> Map k v #

(Ord k, Ord v) => Ord (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

compare :: HashMap k v -> HashMap k v -> Ordering #

(<) :: HashMap k v -> HashMap k v -> Bool #

(<=) :: HashMap k v -> HashMap k v -> Bool #

(>) :: HashMap k v -> HashMap k v -> Bool #

(>=) :: HashMap k v -> HashMap k v -> Bool #

max :: HashMap k v -> HashMap k v -> HashMap k v #

min :: HashMap k v -> HashMap k v -> HashMap k v #

(Ord1 f, Ord a) => Ord (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

compare :: Cofree f a -> Cofree f a -> Ordering #

(<) :: Cofree f a -> Cofree f a -> Bool #

(<=) :: Cofree f a -> Cofree f a -> Bool #

(>) :: Cofree f a -> Cofree f a -> Bool #

(>=) :: Cofree f a -> Cofree f a -> Bool #

max :: Cofree f a -> Cofree f a -> Cofree f a #

min :: Cofree f a -> Cofree f a -> Cofree f a #

(Ord1 f, Ord a) => Ord (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

compare :: Free f a -> Free f a -> Ordering #

(<) :: Free f a -> Free f a -> Bool #

(<=) :: Free f a -> Free f a -> Bool #

(>) :: Free f a -> Free f a -> Bool #

(>=) :: Free f a -> Free f a -> Bool #

max :: Free f a -> Free f a -> Free f a #

min :: Free f a -> Free f a -> Free f a #

(Ord1 f, Ord a) => Ord (Yoneda f a) 
Instance details

Defined in Data.Functor.Yoneda

Methods

compare :: Yoneda f a -> Yoneda f a -> Ordering #

(<) :: Yoneda f a -> Yoneda f a -> Bool #

(<=) :: Yoneda f a -> Yoneda f a -> Bool #

(>) :: Yoneda f a -> Yoneda f a -> Bool #

(>=) :: Yoneda f a -> Yoneda f a -> Bool #

max :: Yoneda f a -> Yoneda f a -> Yoneda f a #

min :: Yoneda f a -> Yoneda f a -> Yoneda f a #

Ord (f p) => Ord (Rec1 f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: Rec1 f p -> Rec1 f p -> Ordering #

(<) :: Rec1 f p -> Rec1 f p -> Bool #

(<=) :: Rec1 f p -> Rec1 f p -> Bool #

(>) :: Rec1 f p -> Rec1 f p -> Bool #

(>=) :: Rec1 f p -> Rec1 f p -> Bool #

max :: Rec1 f p -> Rec1 f p -> Rec1 f p #

min :: Rec1 f p -> Rec1 f p -> Rec1 f p #

Ord (URec (Ptr ()) p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering #

(<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

(>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #

max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #

min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p #

Ord (URec Char p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Char p -> URec Char p -> Ordering #

(<) :: URec Char p -> URec Char p -> Bool #

(<=) :: URec Char p -> URec Char p -> Bool #

(>) :: URec Char p -> URec Char p -> Bool #

(>=) :: URec Char p -> URec Char p -> Bool #

max :: URec Char p -> URec Char p -> URec Char p #

min :: URec Char p -> URec Char p -> URec Char p #

Ord (URec Double p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Double p -> URec Double p -> Ordering #

(<) :: URec Double p -> URec Double p -> Bool #

(<=) :: URec Double p -> URec Double p -> Bool #

(>) :: URec Double p -> URec Double p -> Bool #

(>=) :: URec Double p -> URec Double p -> Bool #

max :: URec Double p -> URec Double p -> URec Double p #

min :: URec Double p -> URec Double p -> URec Double p #

Ord (URec Float p) 
Instance details

Defined in GHC.Generics

Methods

compare :: URec Float p -> URec Float p -> Ordering #

(<) :: URec Float p -> URec Float p -> Bool #

(<=) :: URec Float p -> URec Float p -> Bool #

(>) :: URec Float p -> URec Float p -> Bool #

(>=) :: URec Float p -> URec Float p -> Bool #

max :: URec Float p -> URec Float p -> URec Float p #

min :: URec Float p -> URec Float p -> URec Float p #

Ord (URec Int p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Int p -> URec Int p -> Ordering #

(<) :: URec Int p -> URec Int p -> Bool #

(<=) :: URec Int p -> URec Int p -> Bool #

(>) :: URec Int p -> URec Int p -> Bool #

(>=) :: URec Int p -> URec Int p -> Bool #

max :: URec Int p -> URec Int p -> URec Int p #

min :: URec Int p -> URec Int p -> URec Int p #

Ord (URec Word p)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: URec Word p -> URec Word p -> Ordering #

(<) :: URec Word p -> URec Word p -> Bool #

(<=) :: URec Word p -> URec Word p -> Bool #

(>) :: URec Word p -> URec Word p -> Bool #

(>=) :: URec Word p -> URec Word p -> Bool #

max :: URec Word p -> URec Word p -> URec Word p #

min :: URec Word p -> URec Word p -> URec Word p #

(Ord a, Ord b, Ord c) => Ord (a, b, c) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c) -> (a, b, c) -> Ordering #

(<) :: (a, b, c) -> (a, b, c) -> Bool #

(<=) :: (a, b, c) -> (a, b, c) -> Bool #

(>) :: (a, b, c) -> (a, b, c) -> Bool #

(>=) :: (a, b, c) -> (a, b, c) -> Bool #

max :: (a, b, c) -> (a, b, c) -> (a, b, c) #

min :: (a, b, c) -> (a, b, c) -> (a, b, c) #

Ord a => Ord (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

compare :: Const a b -> Const a b -> Ordering #

(<) :: Const a b -> Const a b -> Bool #

(<=) :: Const a b -> Const a b -> Bool #

(>) :: Const a b -> Const a b -> Bool #

(>=) :: Const a b -> Const a b -> Bool #

max :: Const a b -> Const a b -> Const a b #

min :: Const a b -> Const a b -> Const a b #

Ord (f a) => Ord (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

compare :: Ap f a -> Ap f a -> Ordering #

(<) :: Ap f a -> Ap f a -> Bool #

(<=) :: Ap f a -> Ap f a -> Bool #

(>) :: Ap f a -> Ap f a -> Bool #

(>=) :: Ap f a -> Ap f a -> Bool #

max :: Ap f a -> Ap f a -> Ap f a #

min :: Ap f a -> Ap f a -> Ap f a #

Ord (f a) => Ord (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Alt f a -> Alt f a -> Ordering #

(<) :: Alt f a -> Alt f a -> Bool #

(<=) :: Alt f a -> Alt f a -> Bool #

(>) :: Alt f a -> Alt f a -> Bool #

(>=) :: Alt f a -> Alt f a -> Bool #

max :: Alt f a -> Alt f a -> Alt f a #

min :: Alt f a -> Alt f a -> Alt f a #

(Ord e, Ord1 m, Ord a) => Ord (ErrorT e m a) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

compare :: ErrorT e m a -> ErrorT e m a -> Ordering #

(<) :: ErrorT e m a -> ErrorT e m a -> Bool #

(<=) :: ErrorT e m a -> ErrorT e m a -> Bool #

(>) :: ErrorT e m a -> ErrorT e m a -> Bool #

(>=) :: ErrorT e m a -> ErrorT e m a -> Bool #

max :: ErrorT e m a -> ErrorT e m a -> ErrorT e m a #

min :: ErrorT e m a -> ErrorT e m a -> ErrorT e m a #

Ord b => Ord (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

compare :: Tagged s b -> Tagged s b -> Ordering #

(<) :: Tagged s b -> Tagged s b -> Bool #

(<=) :: Tagged s b -> Tagged s b -> Bool #

(>) :: Tagged s b -> Tagged s b -> Bool #

(>=) :: Tagged s b -> Tagged s b -> Bool #

max :: Tagged s b -> Tagged s b -> Tagged s b #

min :: Tagged s b -> Tagged s b -> Tagged s b #

Ord (p a a) => Ord (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

compare :: Join p a -> Join p a -> Ordering #

(<) :: Join p a -> Join p a -> Bool #

(<=) :: Join p a -> Join p a -> Bool #

(>) :: Join p a -> Join p a -> Bool #

(>=) :: Join p a -> Join p a -> Bool #

max :: Join p a -> Join p a -> Join p a #

min :: Join p a -> Join p a -> Join p a #

Ord (w (CofreeF f a (CofreeT f w a))) => Ord (CofreeT f w a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

compare :: CofreeT f w a -> CofreeT f w a -> Ordering #

(<) :: CofreeT f w a -> CofreeT f w a -> Bool #

(<=) :: CofreeT f w a -> CofreeT f w a -> Bool #

(>) :: CofreeT f w a -> CofreeT f w a -> Bool #

(>=) :: CofreeT f w a -> CofreeT f w a -> Bool #

max :: CofreeT f w a -> CofreeT f w a -> CofreeT f w a #

min :: CofreeT f w a -> CofreeT f w a -> CofreeT f w a #

(Ord a, Ord (f b)) => Ord (CofreeF f a b) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

compare :: CofreeF f a b -> CofreeF f a b -> Ordering #

(<) :: CofreeF f a b -> CofreeF f a b -> Bool #

(<=) :: CofreeF f a b -> CofreeF f a b -> Bool #

(>) :: CofreeF f a b -> CofreeF f a b -> Bool #

(>=) :: CofreeF f a b -> CofreeF f a b -> Bool #

max :: CofreeF f a b -> CofreeF f a b -> CofreeF f a b #

min :: CofreeF f a b -> CofreeF f a b -> CofreeF f a b #

Ord (p (Fix p a) a) => Ord (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

compare :: Fix p a -> Fix p a -> Ordering #

(<) :: Fix p a -> Fix p a -> Bool #

(<=) :: Fix p a -> Fix p a -> Bool #

(>) :: Fix p a -> Fix p a -> Bool #

(>=) :: Fix p a -> Fix p a -> Bool #

max :: Fix p a -> Fix p a -> Fix p a #

min :: Fix p a -> Fix p a -> Fix p a #

(Ord1 f, Ord1 m, Ord a) => Ord (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

compare :: FreeT f m a -> FreeT f m a -> Ordering #

(<) :: FreeT f m a -> FreeT f m a -> Bool #

(<=) :: FreeT f m a -> FreeT f m a -> Bool #

(>) :: FreeT f m a -> FreeT f m a -> Bool #

(>=) :: FreeT f m a -> FreeT f m a -> Bool #

max :: FreeT f m a -> FreeT f m a -> FreeT f m a #

min :: FreeT f m a -> FreeT f m a -> FreeT f m a #

(Ord a, Ord (f b)) => Ord (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

compare :: FreeF f a b -> FreeF f a b -> Ordering #

(<) :: FreeF f a b -> FreeF f a b -> Bool #

(<=) :: FreeF f a b -> FreeF f a b -> Bool #

(>) :: FreeF f a b -> FreeF f a b -> Bool #

(>=) :: FreeF f a b -> FreeF f a b -> Bool #

max :: FreeF f a b -> FreeF f a b -> FreeF f a b #

min :: FreeF f a b -> FreeF f a b -> FreeF f a b #

Ord c => Ord (K1 i c p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: K1 i c p -> K1 i c p -> Ordering #

(<) :: K1 i c p -> K1 i c p -> Bool #

(<=) :: K1 i c p -> K1 i c p -> Bool #

(>) :: K1 i c p -> K1 i c p -> Bool #

(>=) :: K1 i c p -> K1 i c p -> Bool #

max :: K1 i c p -> K1 i c p -> K1 i c p #

min :: K1 i c p -> K1 i c p -> K1 i c p #

(Ord (f p), Ord (g p)) => Ord ((f :+: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :+: g) p -> (f :+: g) p -> Ordering #

(<) :: (f :+: g) p -> (f :+: g) p -> Bool #

(<=) :: (f :+: g) p -> (f :+: g) p -> Bool #

(>) :: (f :+: g) p -> (f :+: g) p -> Bool #

(>=) :: (f :+: g) p -> (f :+: g) p -> Bool #

max :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p #

min :: (f :+: g) p -> (f :+: g) p -> (f :+: g) p #

(Ord (f p), Ord (g p)) => Ord ((f :*: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :*: g) p -> (f :*: g) p -> Ordering #

(<) :: (f :*: g) p -> (f :*: g) p -> Bool #

(<=) :: (f :*: g) p -> (f :*: g) p -> Bool #

(>) :: (f :*: g) p -> (f :*: g) p -> Bool #

(>=) :: (f :*: g) p -> (f :*: g) p -> Bool #

max :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

min :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

(Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d) -> (a, b, c, d) -> Ordering #

(<) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

(<=) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

(>) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

(>=) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

max :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

min :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

(Ord1 f, Ord1 g, Ord a) => Ord (Product f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

compare :: Product f g a -> Product f g a -> Ordering #

(<) :: Product f g a -> Product f g a -> Bool #

(<=) :: Product f g a -> Product f g a -> Bool #

(>) :: Product f g a -> Product f g a -> Bool #

(>=) :: Product f g a -> Product f g a -> Bool #

max :: Product f g a -> Product f g a -> Product f g a #

min :: Product f g a -> Product f g a -> Product f g a #

(Ord1 f, Ord1 g, Ord a) => Ord (Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

compare :: Sum f g a -> Sum f g a -> Ordering #

(<) :: Sum f g a -> Sum f g a -> Bool #

(<=) :: Sum f g a -> Sum f g a -> Bool #

(>) :: Sum f g a -> Sum f g a -> Bool #

(>=) :: Sum f g a -> Sum f g a -> Bool #

max :: Sum f g a -> Sum f g a -> Sum f g a #

min :: Sum f g a -> Sum f g a -> Sum f g a #

Ord (f p) => Ord (M1 i c f p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: M1 i c f p -> M1 i c f p -> Ordering #

(<) :: M1 i c f p -> M1 i c f p -> Bool #

(<=) :: M1 i c f p -> M1 i c f p -> Bool #

(>) :: M1 i c f p -> M1 i c f p -> Bool #

(>=) :: M1 i c f p -> M1 i c f p -> Bool #

max :: M1 i c f p -> M1 i c f p -> M1 i c f p #

min :: M1 i c f p -> M1 i c f p -> M1 i c f p #

Ord (f (g p)) => Ord ((f :.: g) p)

Since: base-4.7.0.0

Instance details

Defined in GHC.Generics

Methods

compare :: (f :.: g) p -> (f :.: g) p -> Ordering #

(<) :: (f :.: g) p -> (f :.: g) p -> Bool #

(<=) :: (f :.: g) p -> (f :.: g) p -> Bool #

(>) :: (f :.: g) p -> (f :.: g) p -> Bool #

(>=) :: (f :.: g) p -> (f :.: g) p -> Bool #

max :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

min :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e) -> (a, b, c, d, e) -> Ordering #

(<) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(<=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(>=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

max :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

min :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

(Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

compare :: Compose f g a -> Compose f g a -> Ordering #

(<) :: Compose f g a -> Compose f g a -> Bool #

(<=) :: Compose f g a -> Compose f g a -> Bool #

(>) :: Compose f g a -> Compose f g a -> Bool #

(>=) :: Compose f g a -> Compose f g a -> Bool #

max :: Compose f g a -> Compose f g a -> Compose f g a #

min :: Compose f g a -> Compose f g a -> Compose f g a #

Ord (f a) => Ord (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

compare :: Clown f a b -> Clown f a b -> Ordering #

(<) :: Clown f a b -> Clown f a b -> Bool #

(<=) :: Clown f a b -> Clown f a b -> Bool #

(>) :: Clown f a b -> Clown f a b -> Bool #

(>=) :: Clown f a b -> Clown f a b -> Bool #

max :: Clown f a b -> Clown f a b -> Clown f a b #

min :: Clown f a b -> Clown f a b -> Clown f a b #

Ord (p b a) => Ord (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

compare :: Flip p a b -> Flip p a b -> Ordering #

(<) :: Flip p a b -> Flip p a b -> Bool #

(<=) :: Flip p a b -> Flip p a b -> Bool #

(>) :: Flip p a b -> Flip p a b -> Bool #

(>=) :: Flip p a b -> Flip p a b -> Bool #

max :: Flip p a b -> Flip p a b -> Flip p a b #

min :: Flip p a b -> Flip p a b -> Flip p a b #

Ord (g b) => Ord (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

compare :: Joker g a b -> Joker g a b -> Ordering #

(<) :: Joker g a b -> Joker g a b -> Bool #

(<=) :: Joker g a b -> Joker g a b -> Bool #

(>) :: Joker g a b -> Joker g a b -> Bool #

(>=) :: Joker g a b -> Joker g a b -> Bool #

max :: Joker g a b -> Joker g a b -> Joker g a b #

min :: Joker g a b -> Joker g a b -> Joker g a b #

Ord (p a b) => Ord (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

compare :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Ordering #

(<) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

(<=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

(>) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

(>=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #

max :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> WrappedBifunctor p a b #

min :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> WrappedBifunctor p a b #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Ordering #

(<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

(<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

(>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

(>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool #

max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #

min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #

(Ord (f a b), Ord (g a b)) => Ord (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Methods

compare :: Product f g a b -> Product f g a b -> Ordering #

(<) :: Product f g a b -> Product f g a b -> Bool #

(<=) :: Product f g a b -> Product f g a b -> Bool #

(>) :: Product f g a b -> Product f g a b -> Bool #

(>=) :: Product f g a b -> Product f g a b -> Bool #

max :: Product f g a b -> Product f g a b -> Product f g a b #

min :: Product f g a b -> Product f g a b -> Product f g a b #

(Ord (p a b), Ord (q a b)) => Ord (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

compare :: Sum p q a b -> Sum p q a b -> Ordering #

(<) :: Sum p q a b -> Sum p q a b -> Bool #

(<=) :: Sum p q a b -> Sum p q a b -> Bool #

(>) :: Sum p q a b -> Sum p q a b -> Bool #

(>=) :: Sum p q a b -> Sum p q a b -> Bool #

max :: Sum p q a b -> Sum p q a b -> Sum p q a b #

min :: Sum p q a b -> Sum p q a b -> Sum p q a b #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Ordering #

(<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

(<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

(>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

(>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool #

max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #

min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #

Ord (f (p a b)) => Ord (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

compare :: Tannen f p a b -> Tannen f p a b -> Ordering #

(<) :: Tannen f p a b -> Tannen f p a b -> Bool #

(<=) :: Tannen f p a b -> Tannen f p a b -> Bool #

(>) :: Tannen f p a b -> Tannen f p a b -> Bool #

(>=) :: Tannen f p a b -> Tannen f p a b -> Bool #

max :: Tannen f p a b -> Tannen f p a b -> Tannen f p a b #

min :: Tannen f p a b -> Tannen f p a b -> Tannen f p a b #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

(>) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool #

max :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #

min :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool #

max :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) #

min :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) #

Ord (p (f a) (g b)) => Ord (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

compare :: Biff p f g a b -> Biff p f g a b -> Ordering #

(<) :: Biff p f g a b -> Biff p f g a b -> Bool #

(<=) :: Biff p f g a b -> Biff p f g a b -> Bool #

(>) :: Biff p f g a b -> Biff p f g a b -> Bool #

(>=) :: Biff p f g a b -> Biff p f g a b -> Bool #

max :: Biff p f g a b -> Biff p f g a b -> Biff p f g a b #

min :: Biff p f g a b -> Biff p f g a b -> Biff p f g a b #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) #

min :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) #

min :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) #

min :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #

min :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) #

(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) 
Instance details

Defined in GHC.Classes

Methods

compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Ordering #

(<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

(<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

(>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

(>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) #

class Read a where #

Parsing of Strings, producing values.

Derived instances of Read make the following assumptions, which derived instances of Show obey:

  • If the constructor is defined to be an infix operator, then the derived Read instance will parse only infix applications of the constructor (not the prefix form).
  • Associativity is not used to reduce the occurrence of parentheses, although precedence may be.
  • If the constructor is defined using record syntax, the derived Read will parse only the record-syntax form, and furthermore, the fields must be given in the same order as the original declaration.
  • The derived Read instance allows arbitrary Haskell whitespace between tokens of the input string. Extra parentheses are also allowed.

For example, given the declarations

infixr 5 :^:
data Tree a =  Leaf a  |  Tree a :^: Tree a

the derived instance of Read in Haskell 2010 is equivalent to

instance (Read a) => Read (Tree a) where

        readsPrec d r =  readParen (d > app_prec)
                         (\r -> [(Leaf m,t) |
                                 ("Leaf",s) <- lex r,
                                 (m,t) <- readsPrec (app_prec+1) s]) r

                      ++ readParen (d > up_prec)
                         (\r -> [(u:^:v,w) |
                                 (u,s) <- readsPrec (up_prec+1) r,
                                 (":^:",t) <- lex s,
                                 (v,w) <- readsPrec (up_prec+1) t]) r

          where app_prec = 10
                up_prec = 5

Note that right-associativity of :^: is unused.

The derived instance in GHC is equivalent to

instance (Read a) => Read (Tree a) where

        readPrec = parens $ (prec app_prec $ do
                                 Ident "Leaf" <- lexP
                                 m <- step readPrec
                                 return (Leaf m))

                     +++ (prec up_prec $ do
                                 u <- step readPrec
                                 Symbol ":^:" <- lexP
                                 v <- step readPrec
                                 return (u :^: v))

          where app_prec = 10
                up_prec = 5

        readListPrec = readListPrecDefault

Why do both readsPrec and readPrec exist, and why does GHC opt to implement readPrec in derived Read instances instead of readsPrec? The reason is that readsPrec is based on the ReadS type, and although ReadS is mentioned in the Haskell 2010 Report, it is not a very efficient parser data structure.

readPrec, on the other hand, is based on a much more efficient ReadPrec datatype (a.k.a "new-style parsers"), but its definition relies on the use of the RankNTypes language extension. Therefore, readPrec (and its cousin, readListPrec) are marked as GHC-only. Nevertheless, it is recommended to use readPrec instead of readsPrec whenever possible for the efficiency improvements it brings.

As mentioned above, derived Read instances in GHC will implement readPrec instead of readsPrec. The default implementations of readsPrec (and its cousin, readList) will simply use readPrec under the hood. If you are writing a Read instance by hand, it is recommended to write it like so:

instance Read T where
  readPrec     = ...
  readListPrec = readListPrecDefault

Minimal complete definition

readsPrec | readPrec

Methods

readsPrec #

Arguments

:: Int

the operator precedence of the enclosing context (a number from 0 to 11). Function application has precedence 10.

-> ReadS a 

attempts to parse a value from the front of the string, returning a list of (parsed value, remaining string) pairs. If there is no successful parse, the returned list is empty.

Derived instances of Read and Show satisfy the following:

That is, readsPrec parses the string produced by showsPrec, and delivers the value that showsPrec started with.

readList :: ReadS [a] #

The method readList is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined Read instance of the Char type, where values of type String should be are expected to use double quotes, rather than square brackets.

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 Void

Reading a Void value is always a parse error, considering Void as a data type with no constructors.

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Read Version

Since: base-2.1

Instance details

Defined in Data.Version

Read ExitCode 
Instance details

Defined in GHC.IO.Exception

Read BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Read All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read 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 ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Read ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Read ByteString 
Instance details

Defined in Data.ByteString.Internal

Read IntSet 
Instance details

Defined in Data.IntSet.Internal

Read DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

readsPrec :: Int -> ReadS DatatypeVariant #

readList :: ReadS [DatatypeVariant] #

readPrec :: ReadPrec DatatypeVariant #

readListPrec :: ReadPrec [DatatypeVariant] #

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 (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Read a => Read (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read m => Read (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Read a => Read (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Read a => Read (Identity a)

This instance would be equivalent to the derived instances of the Identity newtype if the runIdentity field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Read a => Read (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Read a => Read (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Read a => Read (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Read a => Read (NonEmpty a)

Since: base-4.11.0.0

Instance details

Defined in GHC.Read

Read e => Read (IntMap e) 
Instance details

Defined in Data.IntMap.Internal

Read a => Read (Tree a) 
Instance details

Defined in Data.Tree

Read a => Read (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Read a => Read (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Read a => Read (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

(Read a, Ord a) => Read (Set a) 
Instance details

Defined in Data.Set.Internal

(Eq a, Hashable a, Read a) => Read (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Read a => Read (Vector a) 
Instance details

Defined in Data.Vector

Read a => Read (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

readsPrec :: Int -> ReadS (Array a) #

readList :: ReadS [Array a] #

readPrec :: ReadPrec (Array a) #

readListPrec :: ReadPrec [Array a] #

Read a => Read (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

readsPrec :: Int -> ReadS (SmallArray a) #

readList :: ReadS [SmallArray a] #

readPrec :: ReadPrec (SmallArray a) #

readListPrec :: ReadPrec [SmallArray a] #

(Read a, Prim a) => Read (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

readsPrec :: Int -> ReadS (Vector a) #

readList :: ReadS [Vector a] #

readPrec :: ReadPrec (Vector a) #

readListPrec :: ReadPrec [Vector a] #

(Read a, Storable a) => Read (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

readsPrec :: Int -> ReadS (Vector a) #

readList :: ReadS [Vector a] #

readPrec :: ReadPrec (Vector a) #

readListPrec :: ReadPrec [Vector a] #

Read a => Read (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Read a => Read (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Read a => Read (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Read a => Read (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Read a => Read (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Read a => Read (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

(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

(Read a, Read b) => Read (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

readsPrec :: Int -> ReadS (Arg a b) #

readList :: ReadS [Arg a b] #

readPrec :: ReadPrec (Arg a b) #

readListPrec :: ReadPrec [Arg a b] #

(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] #

(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) 
Instance details

Defined in Data.HashMap.Internal

(Read1 f, Read a) => Read (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

readsPrec :: Int -> ReadS (Cofree f a) #

readList :: ReadS [Cofree f a] #

readPrec :: ReadPrec (Cofree f a) #

readListPrec :: ReadPrec [Cofree f a] #

(Read1 f, Read a) => Read (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

readsPrec :: Int -> ReadS (Free f a) #

readList :: ReadS [Free f a] #

readPrec :: ReadPrec (Free f a) #

readListPrec :: ReadPrec [Free f a] #

(Functor f, Read (f a)) => Read (Yoneda f a) 
Instance details

Defined in Data.Functor.Yoneda

Methods

readsPrec :: Int -> ReadS (Yoneda f a) #

readList :: ReadS [Yoneda f a] #

readPrec :: ReadPrec (Yoneda f a) #

readListPrec :: ReadPrec [Yoneda f a] #

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] #

(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 b => Read (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

readsPrec :: Int -> ReadS (Tagged s b) #

readList :: ReadS [Tagged s b] #

readPrec :: ReadPrec (Tagged s b) #

readListPrec :: ReadPrec [Tagged s b] #

Read (p a a) => Read (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

readsPrec :: Int -> ReadS (Join p a) #

readList :: ReadS [Join p a] #

readPrec :: ReadPrec (Join p a) #

readListPrec :: ReadPrec [Join p a] #

Read (w (CofreeF f a (CofreeT f w a))) => Read (CofreeT f w a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

readsPrec :: Int -> ReadS (CofreeT f w a) #

readList :: ReadS [CofreeT f w a] #

readPrec :: ReadPrec (CofreeT f w a) #

readListPrec :: ReadPrec [CofreeT f w a] #

(Read a, Read (f b)) => Read (CofreeF f a b) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

readsPrec :: Int -> ReadS (CofreeF f a b) #

readList :: ReadS [CofreeF f a b] #

readPrec :: ReadPrec (CofreeF f a b) #

readListPrec :: ReadPrec [CofreeF f a b] #

Read (p (Fix p a) a) => Read (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

readsPrec :: Int -> ReadS (Fix p a) #

readList :: ReadS [Fix p a] #

readPrec :: ReadPrec (Fix p a) #

readListPrec :: ReadPrec [Fix p a] #

(Read1 f, Read1 m, Read a) => Read (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

readsPrec :: Int -> ReadS (FreeT f m a) #

readList :: ReadS [FreeT f m a] #

readPrec :: ReadPrec (FreeT f m a) #

readListPrec :: ReadPrec [FreeT f m a] #

(Read a, Read (f b)) => Read (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

readsPrec :: Int -> ReadS (FreeF f a b) #

readList :: ReadS [FreeF f a b] #

readPrec :: ReadPrec (FreeF f a b) #

readListPrec :: ReadPrec [FreeF f a b] #

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] #

(Read1 f, Read1 g, Read a) => Read (Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

readsPrec :: Int -> ReadS (Sum f g a) #

readList :: ReadS [Sum f g a] #

readPrec :: ReadPrec (Sum f g a) #

readListPrec :: ReadPrec [Sum f g a] #

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 (f a) => Read (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

readsPrec :: Int -> ReadS (Clown f a b) #

readList :: ReadS [Clown f a b] #

readPrec :: ReadPrec (Clown f a b) #

readListPrec :: ReadPrec [Clown f a b] #

Read (p b a) => Read (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

readsPrec :: Int -> ReadS (Flip p a b) #

readList :: ReadS [Flip p a b] #

readPrec :: ReadPrec (Flip p a b) #

readListPrec :: ReadPrec [Flip p a b] #

Read (g b) => Read (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

readsPrec :: Int -> ReadS (Joker g a b) #

readList :: ReadS [Joker g a b] #

readPrec :: ReadPrec (Joker g a b) #

readListPrec :: ReadPrec [Joker g a b] #

Read (p a b) => Read (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

readsPrec :: Int -> ReadS (WrappedBifunctor p a b) #

readList :: ReadS [WrappedBifunctor p a b] #

readPrec :: ReadPrec (WrappedBifunctor p a b) #

readListPrec :: ReadPrec [WrappedBifunctor p a b] #

(Read a, Read b, Read c, Read d, Read e, Read f) => Read (a, b, c, d, e, f)

Since: base-2.1

Instance details

Defined in GHC.Read

Methods

readsPrec :: Int -> ReadS (a, b, c, d, e, f) #

readList :: ReadS [(a, b, c, d, e, f)] #

readPrec :: ReadPrec (a, b, c, d, e, f) #

readListPrec :: ReadPrec [(a, b, c, d, e, f)] #

(Read (f a b), Read (g a b)) => Read (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Methods

readsPrec :: Int -> ReadS (Product f g a b) #

readList :: ReadS [Product f g a b] #

readPrec :: ReadPrec (Product f g a b) #

readListPrec :: ReadPrec [Product f g a b] #

(Read (p a b), Read (q a b)) => Read (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

readsPrec :: Int -> ReadS (Sum p q a b) #

readList :: ReadS [Sum p q a b] #

readPrec :: ReadPrec (Sum p q a b) #

readListPrec :: ReadPrec [Sum p q a b] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read 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 (f (p a b)) => Read (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

readsPrec :: Int -> ReadS (Tannen f p a b) #

readList :: ReadS [Tannen f p a b] #

readPrec :: ReadPrec (Tannen f p a b) #

readListPrec :: ReadPrec [Tannen f p a b] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read 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 (p (f a) (g b)) => Read (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

readsPrec :: Int -> ReadS (Biff p f g a b) #

readList :: ReadS [Biff p f g a b] #

readPrec :: ReadPrec (Biff p f g a b) #

readListPrec :: ReadPrec [Biff p f g a b] #

(Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read 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)] #

ceiling :: (RealFrac a, Integral b) => a -> b #

ceiling x returns the least integer not less than x

floor :: (RealFrac a, Integral b) => a -> b #

floor x returns the greatest integer not greater than x

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 Handle

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

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 DataType

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show Constr

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show DataRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show ConstrRep

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show Fixity

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

Show BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show AllocationLimitExceeded

Since: base-4.7.1.0

Instance details

Defined in GHC.IO.Exception

Show CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Show AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Show AsyncException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Show ExitCode 
Instance details

Defined in GHC.IO.Exception

Show IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show HandleType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show BufferMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show Newline

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show NewlineMode

Since: base-4.3.0.0

Instance details

Defined in GHC.IO.Handle.Types

Show MaskingState

Since: base-4.3.0.0

Instance details

Defined in GHC.IO

Show IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

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 Fingerprint

Since: base-4.7.0.0

Instance details

Defined in GHC.Fingerprint.Type

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 GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Show SrcLoc

Since: base-4.9.0.0

Instance details

Defined in GHC.Show

Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Show ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Show ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Show ByteString 
Instance details

Defined in Data.ByteString.Internal

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

Show Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Show ForeignSrcLang 
Instance details

Defined in GHC.ForeignSrcLang.Type

Show Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String #

showList :: [Doc] -> ShowS #

Show TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Show Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

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 Decoding 
Instance details

Defined in Data.Text.Encoding

Show ByteArray 
Instance details

Defined in Data.Primitive.ByteArray

Methods

showsPrec :: Int -> ByteArray -> ShowS #

show :: ByteArray -> String #

showList :: [ByteArray] -> ShowS #

Show ConstructorInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

showsPrec :: Int -> ConstructorInfo -> ShowS #

show :: ConstructorInfo -> String #

showList :: [ConstructorInfo] -> ShowS #

Show ConstructorVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

showsPrec :: Int -> ConstructorVariant -> ShowS #

show :: ConstructorVariant -> String #

showList :: [ConstructorVariant] -> ShowS #

Show DatatypeInfo 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

showsPrec :: Int -> DatatypeInfo -> ShowS #

show :: DatatypeInfo -> String #

showList :: [DatatypeInfo] -> ShowS #

Show DatatypeVariant 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

showsPrec :: Int -> DatatypeVariant -> ShowS #

show :: DatatypeVariant -> String #

showList :: [DatatypeVariant] -> ShowS #

Show FieldStrictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

showsPrec :: Int -> FieldStrictness -> ShowS #

show :: FieldStrictness -> String #

showList :: [FieldStrictness] -> ShowS #

Show Strictness 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

showsPrec :: Int -> Strictness -> ShowS #

show :: Strictness -> String #

showList :: [Strictness] -> ShowS #

Show Unpackedness 
Instance details

Defined in Language.Haskell.TH.Datatype

Methods

showsPrec :: Int -> Unpackedness -> ShowS #

show :: Unpackedness -> String #

showList :: [Unpackedness] -> ShowS #

Show Specificity 
Instance details

Defined in Language.Haskell.TH.Datatype.TyVarBndr

Methods

showsPrec :: Int -> Specificity -> ShowS #

show :: Specificity -> String #

showList :: [Specificity] -> ShowS #

Show CodePoint 
Instance details

Defined in Data.Text.Encoding

Methods

showsPrec :: Int -> CodePoint -> ShowS #

show :: CodePoint -> String #

showList :: [CodePoint] -> ShowS #

Show DecoderState 
Instance details

Defined in Data.Text.Encoding

Methods

showsPrec :: Int -> DecoderState -> ShowS #

show :: DecoderState -> String #

showList :: [DecoderState] -> ShowS #

Show 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 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 (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Min a -> ShowS #

show :: Min a -> String #

showList :: [Min a] -> ShowS #

Show a => Show (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Max a -> ShowS #

show :: Max a -> String #

showList :: [Max a] -> ShowS #

Show a => Show (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Show a => Show (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

Show m => Show (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show a => Show (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Option a -> ShowS #

show :: Option a -> String #

showList :: [Option 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 (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Methods

showsPrec :: Int -> Down a -> ShowS #

show :: Down a -> String #

showList :: [Down a] -> ShowS #

Show a => Show (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 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 (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Doc a -> ShowS #

show :: Doc a -> String #

showList :: [Doc a] -> ShowS #

Show a => Show (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show a => Show (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Span a -> ShowS #

show :: Span a -> String #

showList :: [Span a] -> ShowS #

Show a => Show (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

showsPrec :: Int -> HashSet a -> ShowS #

show :: HashSet a -> String #

showList :: [HashSet a] -> ShowS #

Show a => Show (Vector a) 
Instance details

Defined in Data.Vector

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

(Eq d, Show d, Unital d) => Show (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

showsPrec :: Int -> Fraction d -> ShowS #

show :: Fraction d -> String #

showList :: [Fraction d] -> ShowS #

Show a => Show (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

showsPrec :: Int -> Array a -> ShowS #

show :: Array a -> String #

showList :: [Array a] -> ShowS #

(Show a, Prim a) => Show (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

showsPrec :: Int -> PrimArray a -> ShowS #

show :: PrimArray a -> String #

showList :: [PrimArray a] -> ShowS #

Show a => Show (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

showsPrec :: Int -> SmallArray a -> ShowS #

show :: SmallArray a -> String #

showList :: [SmallArray a] -> ShowS #

(Show a, Prim a) => Show (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

(Show a, Storable a) => Show (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

Show a => Show (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

showsPrec :: Int -> Mult a -> ShowS #

show :: Mult a -> String #

showList :: [Mult a] -> ShowS #

Show a => Show (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

showsPrec :: Int -> Add a -> ShowS #

show :: Add a -> String #

showList :: [Add a] -> ShowS #

Show a => Show (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Show a => Show (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Show a => Show (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Show a => Show (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

showsPrec :: Int -> WrapNum a -> ShowS #

show :: WrapNum a -> String #

showList :: [WrapNum a] -> ShowS #

Show a => Show (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

showsPrec :: Int -> Hashed a -> ShowS #

show :: Hashed a -> String #

showList :: [Hashed a] -> ShowS #

(Show a, Show 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 #

(Ix a, Show a, Show b) => Show (Array a b)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

showsPrec :: Int -> Array a b -> ShowS #

show :: Array a b -> String #

showList :: [Array a b] -> ShowS #

(Show a, Show b) => Show (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Arg a b -> ShowS #

show :: Arg a b -> String #

showList :: [Arg a b] -> ShowS #

(Show 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 k, Show v) => Show (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

showsPrec :: Int -> HashMap k v -> ShowS #

show :: HashMap k v -> String #

showList :: [HashMap k v] -> ShowS #

(Show1 f, Show a) => Show (Cofree f a) 
Instance details

Defined in Control.Comonad.Cofree

Methods

showsPrec :: Int -> Cofree f a -> ShowS #

show :: Cofree f a -> String #

showList :: [Cofree f a] -> ShowS #

(Show1 f, Show a) => Show (Free f a) 
Instance details

Defined in Control.Monad.Free

Methods

showsPrec :: Int -> Free f a -> ShowS #

show :: Free f a -> String #

showList :: [Free f a] -> ShowS #

Show (f a) => Show (Yoneda f a) 
Instance details

Defined in Data.Functor.Yoneda

Methods

showsPrec :: Int -> Yoneda f a -> ShowS #

show :: Yoneda f a -> String #

showList :: [Yoneda f 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 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 b => Show (Tagged s b) 
Instance details

Defined in Data.Tagged

Methods

showsPrec :: Int -> Tagged s b -> ShowS #

show :: Tagged s b -> String #

showList :: [Tagged s b] -> ShowS #

Show (p a a) => Show (Join p a) 
Instance details

Defined in Data.Bifunctor.Join

Methods

showsPrec :: Int -> Join p a -> ShowS #

show :: Join p a -> String #

showList :: [Join p a] -> ShowS #

Show (w (CofreeF f a (CofreeT f w a))) => Show (CofreeT f w a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

showsPrec :: Int -> CofreeT f w a -> ShowS #

show :: CofreeT f w a -> String #

showList :: [CofreeT f w a] -> ShowS #

(Show a, Show (f b)) => Show (CofreeF f a b) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

showsPrec :: Int -> CofreeF f a b -> ShowS #

show :: CofreeF f a b -> String #

showList :: [CofreeF f a b] -> ShowS #

Show (p (Fix p a) a) => Show (Fix p a) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

showsPrec :: Int -> Fix p a -> ShowS #

show :: Fix p a -> String #

showList :: [Fix p a] -> ShowS #

(Show1 f, Show1 m, Show a) => Show (FreeT f m a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

showsPrec :: Int -> FreeT f m a -> ShowS #

show :: FreeT f m a -> String #

showList :: [FreeT f m a] -> ShowS #

(Show a, Show (f b)) => Show (FreeF f a b) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

showsPrec :: Int -> FreeF f a b -> ShowS #

show :: FreeF f a b -> String #

showList :: [FreeF f a b] -> ShowS #

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 #

(Show1 f, Show1 g, Show a) => Show (Sum f g a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

showsPrec :: Int -> Sum f g a -> ShowS #

show :: Sum f g a -> String #

showList :: [Sum f g a] -> ShowS #

Show (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 (f a) => Show (Clown f a b) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

showsPrec :: Int -> Clown f a b -> ShowS #

show :: Clown f a b -> String #

showList :: [Clown f a b] -> ShowS #

Show (p b a) => Show (Flip p a b) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

showsPrec :: Int -> Flip p a b -> ShowS #

show :: Flip p a b -> String #

showList :: [Flip p a b] -> ShowS #

Show (g b) => Show (Joker g a b) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

showsPrec :: Int -> Joker g a b -> ShowS #

show :: Joker g a b -> String #

showList :: [Joker g a b] -> ShowS #

Show (p a b) => Show (WrappedBifunctor p a b) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

showsPrec :: Int -> WrappedBifunctor p a b -> ShowS #

show :: WrappedBifunctor p a b -> String #

showList :: [WrappedBifunctor p a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS #

show :: (a, b, c, d, e, f) -> String #

showList :: [(a, b, c, d, e, f)] -> ShowS #

(Show (f a b), Show (g a b)) => Show (Product f g a b) 
Instance details

Defined in Data.Bifunctor.Product

Methods

showsPrec :: Int -> Product f g a b -> ShowS #

show :: Product f g a b -> String #

showList :: [Product f g a b] -> ShowS #

(Show (p a b), Show (q a b)) => Show (Sum p q a b) 
Instance details

Defined in Data.Bifunctor.Sum

Methods

showsPrec :: Int -> Sum p q a b -> ShowS #

show :: Sum p q a b -> String #

showList :: [Sum p q a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show 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 (f (p a b)) => Show (Tannen f p a b) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

showsPrec :: Int -> Tannen f p a b -> ShowS #

show :: Tannen f p a b -> String #

showList :: [Tannen f p a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show 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 (p (f a) (g b)) => Show (Biff p f g a b) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

showsPrec :: Int -> Biff p f g a b -> ShowS #

show :: Biff p f g a b -> String #

showList :: [Biff p f g a b] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show 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 Typeable (a :: k) #

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#

class Monad m => MonadFail (m :: Type -> Type) where #

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 Vector 
Instance details

Defined in Data.Vector

Methods

fail :: String -> Vector a #

MonadFail P

Since: base-4.9.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fail :: String -> P a #

MonadFail Array 
Instance details

Defined in Data.Primitive.Array

Methods

fail :: String -> Array a #

MonadFail SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fail :: String -> SmallArray a #

MonadFail 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 #

(Functor f, MonadFail m) => MonadFail (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fail :: String -> FreeT f m a #

class IsString a where #

Class for string-like datastructures; used by the overloaded string extension (-XOverloadedStrings in GHC).

Methods

fromString :: String -> a #

Instances

Instances details
IsString ShortByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Short.Internal

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Lazy.Internal

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal

IsString Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

fromString :: String -> Doc #

a ~ Char => IsString [a]

(a ~ Char) context was introduced in 4.9.0.0

Since: base-2.1

Instance details

Defined in Data.String

Methods

fromString :: String -> [a] #

IsString a => IsString (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Identity a #

a ~ Char => IsString (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

fromString :: String -> Seq a #

IsString (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fromString :: String -> Doc a #

(IsString a, Hashable a) => IsString (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

fromString :: String -> Hashed a #

IsString a => IsString (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Const a b #

IsString a => IsString (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

fromString :: String -> Tagged s a #

class Functor f => Applicative (f :: Type -> Type) where #

A functor with application, providing operations to

  • embed pure expressions (pure), and
  • sequence computations and combine their results (<*> and liftA2).

A minimal complete definition must include implementations of pure and of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:

(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y

Further, any definition must satisfy the following:

Identity
pure id <*> v = v
Composition
pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
Homomorphism
pure f <*> pure x = pure (f x)
Interchange
u <*> pure y = pure ($ y) <*> u

The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:

As a consequence of these laws, the Functor instance for f will satisfy

It may be useful to note that supposing

forall x y. p (q x y) = f x . g y

it follows from the above that

liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v

If f is also a Monad, it should satisfy

(which implies that pure and <*> satisfy the applicative functor laws).

Minimal complete definition

pure, ((<*>) | liftA2)

Methods

pure :: a -> f a #

Lift a value.

(<*>) :: f (a -> b) -> f a -> f b infixl 4 #

Sequential application.

A few functors support an implementation of <*> that is more efficient than the default one.

Using ApplicativeDo: 'fs <*> as' can be understood as the do expression

do f <- fs
   a <- as
   pure (f a)

liftA2 :: (a -> b -> c) -> f a -> f b -> f c #

Lift a binary function to actions.

Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>.

This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap.

Using ApplicativeDo: 'liftA2 f as bs' can be understood as the do expression

do a <- as
   b <- bs
   pure (f a b)

(*>) :: f a -> f b -> f b infixl 4 #

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 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 Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Min a #

(<*>) :: Min (a -> b) -> Min a -> Min b #

liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c #

(*>) :: Min a -> Min b -> Min b #

(<*) :: Min a -> Min b -> Min a #

Applicative Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Max a #

(<*>) :: Max (a -> b) -> Max a -> Max b #

liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c #

(*>) :: Max a -> Max b -> Max b #

(<*) :: Max a -> Max b -> Max a #

Applicative First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Option a #

(<*>) :: Option (a -> b) -> Option a -> Option b #

liftA2 :: (a -> b -> c) -> Option a -> Option b -> Option c #

(*>) :: Option a -> Option b -> Option b #

(<*) :: Option a -> Option b -> Option 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 Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

pure :: a -> Down a #

(<*>) :: Down (a -> b) -> Down a -> Down b #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

(*>) :: Down a -> Down b -> Down b #

(<*) :: Down a -> Down b -> Down a #

Applicative 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 Vector 
Instance details

Defined in Data.Vector

Methods

pure :: a -> Vector a #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

(*>) :: Vector a -> Vector b -> Vector b #

(<*) :: Vector a -> Vector b -> Vector a #

Applicative 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 Id 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

pure :: a -> Id a #

(<*>) :: Id (a -> b) -> Id a -> Id b #

liftA2 :: (a -> b -> c) -> Id a -> Id b -> Id c #

(*>) :: Id a -> Id b -> Id b #

(<*) :: Id a -> Id b -> Id a #

Applicative Box 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

pure :: a -> Box a #

(<*>) :: Box (a -> b) -> Box a -> Box b #

liftA2 :: (a -> b -> c) -> Box a -> Box b -> Box c #

(*>) :: Box a -> Box b -> Box b #

(<*) :: Box a -> Box b -> Box a #

Applicative Array 
Instance details

Defined in Data.Primitive.Array

Methods

pure :: a -> Array a #

(<*>) :: Array (a -> b) -> Array a -> Array b #

liftA2 :: (a -> b -> c) -> Array a -> Array b -> Array c #

(*>) :: Array a -> Array b -> Array b #

(<*) :: Array a -> Array b -> Array a #

Applicative SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

pure :: a -> SmallArray a #

(<*>) :: SmallArray (a -> b) -> SmallArray a -> SmallArray b #

liftA2 :: (a -> b -> c) -> SmallArray a -> SmallArray b -> SmallArray c #

(*>) :: SmallArray a -> SmallArray b -> SmallArray b #

(<*) :: SmallArray a -> SmallArray b -> SmallArray a #

Applicative (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 #

Arrow a => Applicative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> ArrowMonad a a0 #

(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c #

(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Applicative (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

pure :: a -> Covector r a #

(<*>) :: Covector r (a -> b) -> Covector r a -> Covector r b #

liftA2 :: (a -> b -> c) -> Covector r a -> Covector r b -> Covector r c #

(*>) :: Covector r a -> Covector r b -> Covector r b #

(<*) :: Covector r a -> Covector r b -> Covector r a #

Representable f => Applicative (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

pure :: a -> Co f a #

(<*>) :: Co f (a -> b) -> Co f a -> Co f b #

liftA2 :: (a -> b -> c) -> Co f a -> Co f b -> Co f c #

(*>) :: Co f a -> Co f b -> Co f b #

(<*) :: Co f a -> Co f b -> Co f a #

Alternative f => Applicative (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

pure :: a -> Cofree f a #

(<*>) :: Cofree f (a -> b) -> Cofree f a -> Cofree f b #

liftA2 :: (a -> b -> c) -> Cofree f a -> Cofree f b -> Cofree f c #

(*>) :: Cofree f a -> Cofree f b -> Cofree f b #

(<*) :: Cofree f a -> Cofree f b -> Cofree f a #

Functor f => Applicative (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

pure :: a -> Free f a #

(<*>) :: Free f (a -> b) -> Free f a -> Free f b #

liftA2 :: (a -> b -> c) -> Free f a -> Free f b -> Free f c #

(*>) :: Free f a -> Free f b -> Free f b #

(<*) :: Free f a -> Free f b -> Free f a #

Applicative f => Applicative (Yoneda f) 
Instance details

Defined in Data.Functor.Yoneda

Methods

pure :: a -> Yoneda f a #

(<*>) :: Yoneda f (a -> b) -> Yoneda f a -> Yoneda f b #

liftA2 :: (a -> b -> c) -> Yoneda f a -> Yoneda f b -> Yoneda f c #

(*>) :: Yoneda f a -> Yoneda f b -> Yoneda f b #

(<*) :: Yoneda f a -> Yoneda f b -> Yoneda f a #

Applicative f => Applicative (Indexing f) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

pure :: a -> Indexing f a #

(<*>) :: Indexing f (a -> b) -> Indexing f a -> Indexing f b #

liftA2 :: (a -> b -> c) -> Indexing f a -> Indexing f b -> Indexing f c #

(*>) :: Indexing f a -> Indexing f b -> Indexing f b #

(<*) :: Indexing f a -> Indexing f b -> Indexing f a #

Applicative f => Applicative (Indexing64 f) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

pure :: a -> Indexing64 f a #

(<*>) :: Indexing64 f (a -> b) -> Indexing64 f a -> Indexing64 f b #

liftA2 :: (a -> b -> c) -> Indexing64 f a -> Indexing64 f b -> Indexing64 f c #

(*>) :: Indexing64 f a -> Indexing64 f b -> Indexing64 f b #

(<*) :: Indexing64 f a -> Indexing64 f b -> Indexing64 f a #

Applicative f => Applicative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Rec1 f a #

(<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b #

liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c #

(*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #

(<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a #

(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 #

Applicative m => Applicative (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> Kleisli m a a0 #

(<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b #

liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c #

(*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b #

(<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 #

Monoid m => Applicative (Const m :: Type -> Type)

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

(*>) :: Const m a -> Const m b -> Const m b #

(<*) :: Const m a -> Const m b -> Const m a #

Applicative f => Applicative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #

(*>) :: Ap f a -> Ap f b -> Ap f b #

(<*) :: Ap f a -> Ap f b -> Ap f a #

Applicative f => Applicative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Alt f a #

(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b #

liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c #

(*>) :: Alt f a -> Alt f b -> Alt f b #

(<*) :: Alt f a -> Alt f b -> Alt f a #

(Applicative f, 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 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

pure :: a -> Tagged s a #

(<*>) :: Tagged s (a -> b) -> Tagged s a -> Tagged s b #

liftA2 :: (a -> b -> c) -> Tagged s a -> Tagged s b -> Tagged s c #

(*>) :: Tagged s a -> Tagged s b -> Tagged s b #

(<*) :: Tagged s a -> Tagged s b -> Tagged s a #

Biapplicative p => Applicative (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

pure :: a -> Join p a #

(<*>) :: Join p (a -> b) -> Join p a -> Join p b #

liftA2 :: (a -> b -> c) -> Join p a -> Join p b -> Join p c #

(*>) :: Join p a -> Join p b -> Join p b #

(<*) :: Join p a -> Join p b -> Join p a #

(Alternative f, Applicative w) => Applicative (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

pure :: a -> CofreeT f w a #

(<*>) :: CofreeT f w (a -> b) -> CofreeT f w a -> CofreeT f w b #

liftA2 :: (a -> b -> c) -> CofreeT f w a -> CofreeT f w b -> CofreeT f w c #

(*>) :: CofreeT f w a -> CofreeT f w b -> CofreeT f w b #

(<*) :: CofreeT f w a -> CofreeT f w b -> CofreeT f w a #

Biapplicative p => Applicative (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

pure :: a -> Fix p a #

(<*>) :: Fix p (a -> b) -> Fix p a -> Fix p b #

liftA2 :: (a -> b -> c) -> Fix p a -> Fix p b -> Fix p c #

(*>) :: Fix p a -> Fix p b -> Fix p b #

(<*) :: Fix p a -> Fix p b -> Fix p a #

(Functor f, Monad m) => Applicative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

pure :: a -> FreeT f m a #

(<*>) :: FreeT f m (a -> b) -> FreeT f m a -> FreeT f m b #

liftA2 :: (a -> b -> c) -> FreeT f m a -> FreeT f m b -> FreeT f m c #

(*>) :: FreeT f m a -> FreeT f m b -> FreeT f m b #

(<*) :: FreeT f m a -> FreeT f m b -> FreeT f m a #

(Applicative f, Applicative g) => Applicative (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

pure :: a -> Day f g a #

(<*>) :: Day f g (a -> b) -> Day f g a -> Day f g b #

liftA2 :: (a -> b -> c) -> Day f g a -> Day f g b -> Day f g c #

(*>) :: Day f g a -> Day f g b -> Day f g b #

(<*) :: Day f g a -> Day f g b -> Day f g a #

Applicative (Indexed i a) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

pure :: a0 -> Indexed i a a0 #

(<*>) :: Indexed i a (a0 -> b) -> Indexed i a a0 -> Indexed i a b #

liftA2 :: (a0 -> b -> c) -> Indexed i a a0 -> Indexed i a b -> Indexed i a c #

(*>) :: Indexed i a a0 -> Indexed i a b -> Indexed i a b #

(<*) :: Indexed i a a0 -> Indexed i a b -> Indexed i a a0 #

(Applicative (Rep p), Representable p) => Applicative (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

pure :: a -> Prep p a #

(<*>) :: Prep p (a -> b) -> Prep p a -> Prep p b #

liftA2 :: (a -> b -> c) -> Prep p a -> Prep p b -> Prep p c #

(*>) :: Prep p a -> Prep p b -> Prep p b #

(<*) :: Prep p a -> Prep p b -> Prep p a #

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 #

Reifies s (ReifiedApplicative f) => Applicative (ReflectedApplicative f s) 
Instance details

Defined in Data.Reflection

Methods

pure :: a -> ReflectedApplicative f s a #

(<*>) :: ReflectedApplicative f s (a -> b) -> ReflectedApplicative f s a -> ReflectedApplicative f s b #

liftA2 :: (a -> b -> c) -> ReflectedApplicative f s a -> ReflectedApplicative f s b -> ReflectedApplicative f s c #

(*>) :: ReflectedApplicative f s a -> ReflectedApplicative f s b -> ReflectedApplicative f s b #

(<*) :: ReflectedApplicative f s a -> ReflectedApplicative f s b -> ReflectedApplicative f s 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

foldr' :: (a -> b -> b) -> b -> t a -> b #

Right-associative fold of a structure, but with strict application of the operator.

Since: base-4.6.0.0

foldl :: (b -> a -> b) -> b -> t a -> b #

Left-associative fold of a structure.

In the case of lists, foldl, when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn

Note that to produce the outermost application of the operator the entire input list must be traversed. This means that foldl' will diverge if given an infinite list.

Also note that if you want an efficient left-fold, you probably want to use foldl' instead of foldl. The reason for this is that latter does not force the "inner" results (e.g. z `f` x1 in the above example) before applying them to the operator (e.g. to (`f` x2)). This results in a thunk chain \(\mathcal{O}(n)\) elements long, which then must be evaluated from the outside-in.

For a general Foldable structure this should be semantically identical to,

foldl f z = foldl f z . toList

foldl' :: (b -> a -> b) -> b -> t a -> b #

Left-associative fold of a structure but with strict application of the operator.

This ensures that each step of the fold is forced to weak head normal form before being applied, avoiding the collection of thunks that would otherwise occur. This is often what you want to strictly reduce a finite list to a single, monolithic result (e.g. length).

For a general Foldable structure this should be semantically identical to,

foldl' f z = foldl' f z . toList

Since: base-4.6.0.0

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

length :: t a -> Int #

Returns the size/length of a finite structure as an Int. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

Since: base-4.8.0.0

elem :: Eq a => a -> t a -> Bool infix 4 #

Does the element occur in the structure?

Since: base-4.8.0.0

maximum :: Ord a => t a -> a #

The largest element of a non-empty structure.

Since: base-4.8.0.0

minimum :: Ord a => t a -> a #

The least element of a non-empty structure.

Since: base-4.8.0.0

Instances

Instances details
Foldable []

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => [m] -> m #

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 Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Min m -> m #

foldMap :: Monoid m => (a -> m) -> Min a -> m #

foldMap' :: Monoid m => (a -> m) -> Min a -> m #

foldr :: (a -> b -> b) -> b -> Min a -> b #

foldr' :: (a -> b -> b) -> b -> Min a -> b #

foldl :: (b -> a -> b) -> b -> Min a -> b #

foldl' :: (b -> a -> b) -> b -> Min a -> b #

foldr1 :: (a -> a -> a) -> Min a -> a #

foldl1 :: (a -> a -> a) -> Min a -> a #

toList :: Min a -> [a] #

null :: Min a -> Bool #

length :: Min a -> Int #

elem :: Eq a => a -> Min a -> Bool #

maximum :: Ord a => Min a -> a #

minimum :: Ord a => Min a -> a #

sum :: Num a => Min a -> a #

product :: Num a => Min a -> a #

Foldable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Max m -> m #

foldMap :: Monoid m => (a -> m) -> Max a -> m #

foldMap' :: Monoid m => (a -> m) -> Max a -> m #

foldr :: (a -> b -> b) -> b -> Max a -> b #

foldr' :: (a -> b -> b) -> b -> Max a -> b #

foldl :: (b -> a -> b) -> b -> Max a -> b #

foldl' :: (b -> a -> b) -> b -> Max a -> b #

foldr1 :: (a -> a -> a) -> Max a -> a #

foldl1 :: (a -> a -> a) -> Max a -> a #

toList :: Max a -> [a] #

null :: Max a -> Bool #

length :: Max a -> Int #

elem :: Eq a => a -> Max a -> Bool #

maximum :: Ord a => Max a -> a #

minimum :: Ord a => Max a -> a #

sum :: Num a => Max a -> a #

product :: Num a => Max a -> a #

Foldable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldMap' :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Foldable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

foldMap' :: Monoid m => (a -> m) -> Last a -> m #

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Foldable Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Option m -> m #

foldMap :: Monoid m => (a -> m) -> Option a -> m #

foldMap' :: Monoid m => (a -> m) -> Option a -> m #

foldr :: (a -> b -> b) -> b -> Option a -> b #

foldr' :: (a -> b -> b) -> b -> Option a -> b #

foldl :: (b -> a -> b) -> b -> Option a -> b #

foldl' :: (b -> a -> b) -> b -> Option a -> b #

foldr1 :: (a -> a -> a) -> Option a -> a #

foldl1 :: (a -> a -> a) -> Option a -> a #

toList :: Option a -> [a] #

null :: Option a -> Bool #

length :: Option a -> Int #

elem :: Eq a => a -> Option a -> Bool #

maximum :: Ord a => Option a -> a #

minimum :: Ord a => Option a -> a #

sum :: Num a => Option a -> a #

product :: Num a => Option 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 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 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

fold :: Monoid m => HashSet m -> m #

foldMap :: Monoid m => (a -> m) -> HashSet a -> m #

foldMap' :: Monoid m => (a -> m) -> HashSet a -> m #

foldr :: (a -> b -> b) -> b -> HashSet a -> b #

foldr' :: (a -> b -> b) -> b -> HashSet a -> b #

foldl :: (b -> a -> b) -> b -> HashSet a -> b #

foldl' :: (b -> a -> b) -> b -> HashSet a -> b #

foldr1 :: (a -> a -> a) -> HashSet a -> a #

foldl1 :: (a -> a -> a) -> HashSet a -> a #

toList :: HashSet a -> [a] #

null :: HashSet a -> Bool #

length :: HashSet a -> Int #

elem :: Eq a => a -> HashSet a -> Bool #

maximum :: Ord a => HashSet a -> a #

minimum :: Ord a => HashSet a -> a #

sum :: Num a => HashSet a -> a #

product :: Num a => HashSet a -> a #

Foldable Vector 
Instance details

Defined in Data.Vector

Methods

fold :: Monoid m => Vector m -> m #

foldMap :: Monoid m => (a -> m) -> Vector a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector a -> m #

foldr :: (a -> b -> b) -> b -> Vector a -> b #

foldr' :: (a -> b -> b) -> b -> Vector a -> b #

foldl :: (b -> a -> b) -> b -> Vector a -> b #

foldl' :: (b -> a -> b) -> b -> Vector a -> b #

foldr1 :: (a -> a -> a) -> Vector a -> a #

foldl1 :: (a -> a -> a) -> Vector a -> a #

toList :: Vector a -> [a] #

null :: Vector a -> Bool #

length :: Vector a -> Int #

elem :: Eq a => a -> Vector a -> Bool #

maximum :: Ord a => Vector a -> a #

minimum :: Ord a => Vector a -> a #

sum :: Num a => Vector a -> a #

product :: Num a => Vector a -> a #

Foldable Array 
Instance details

Defined in Data.Primitive.Array

Methods

fold :: Monoid m => Array m -> m #

foldMap :: Monoid m => (a -> m) -> Array a -> m #

foldMap' :: Monoid m => (a -> m) -> Array a -> m #

foldr :: (a -> b -> b) -> b -> Array a -> b #

foldr' :: (a -> b -> b) -> b -> Array a -> b #

foldl :: (b -> a -> b) -> b -> Array a -> b #

foldl' :: (b -> a -> b) -> b -> Array a -> b #

foldr1 :: (a -> a -> a) -> Array a -> a #

foldl1 :: (a -> a -> a) -> Array a -> a #

toList :: Array a -> [a] #

null :: Array a -> Bool #

length :: Array a -> Int #

elem :: Eq a => a -> Array a -> Bool #

maximum :: Ord a => Array a -> a #

minimum :: Ord a => Array a -> a #

sum :: Num a => Array a -> a #

product :: Num a => Array a -> a #

Foldable SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fold :: Monoid m => SmallArray m -> m #

foldMap :: Monoid m => (a -> m) -> SmallArray a -> m #

foldMap' :: Monoid m => (a -> m) -> SmallArray a -> m #

foldr :: (a -> b -> b) -> b -> SmallArray a -> b #

foldr' :: (a -> b -> b) -> b -> SmallArray a -> b #

foldl :: (b -> a -> b) -> b -> SmallArray a -> b #

foldl' :: (b -> a -> b) -> b -> SmallArray a -> b #

foldr1 :: (a -> a -> a) -> SmallArray a -> a #

foldl1 :: (a -> a -> a) -> SmallArray a -> a #

toList :: SmallArray a -> [a] #

null :: SmallArray a -> Bool #

length :: SmallArray a -> Int #

elem :: Eq a => a -> SmallArray a -> Bool #

maximum :: Ord a => SmallArray a -> a #

minimum :: Ord a => SmallArray a -> a #

sum :: Num a => SmallArray a -> a #

product :: Num a => SmallArray a -> a #

Foldable Hashed 
Instance details

Defined in Data.Hashable.Class

Methods

fold :: Monoid m => Hashed m -> m #

foldMap :: Monoid m => (a -> m) -> Hashed a -> m #

foldMap' :: Monoid m => (a -> m) -> Hashed a -> m #

foldr :: (a -> b -> b) -> b -> Hashed a -> b #

foldr' :: (a -> b -> b) -> b -> Hashed a -> b #

foldl :: (b -> a -> b) -> b -> Hashed a -> b #

foldl' :: (b -> a -> b) -> b -> Hashed a -> b #

foldr1 :: (a -> a -> a) -> Hashed a -> a #

foldl1 :: (a -> a -> a) -> Hashed a -> a #

toList :: Hashed a -> [a] #

null :: Hashed a -> Bool #

length :: Hashed a -> Int #

elem :: Eq a => a -> Hashed a -> Bool #

maximum :: Ord a => Hashed a -> a #

minimum :: Ord a => Hashed a -> a #

sum :: Num a => Hashed a -> a #

product :: Num a => Hashed a -> a #

Foldable (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 (Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fold :: Monoid m => Arg a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Arg a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Arg a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Arg a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 #

toList :: Arg a a0 -> [a0] #

null :: Arg a a0 -> Bool #

length :: Arg a a0 -> Int #

elem :: Eq a0 => a0 -> Arg a a0 -> Bool #

maximum :: Ord a0 => Arg a a0 -> a0 #

minimum :: Ord a0 => Arg a a0 -> a0 #

sum :: Num a0 => Arg a a0 -> a0 #

product :: Num a0 => Arg a a0 -> a0 #

Foldable (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 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fold :: Monoid m => HashMap k m -> m #

foldMap :: Monoid m => (a -> m) -> HashMap k a -> m #

foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m #

foldr :: (a -> b -> b) -> b -> HashMap k a -> b #

foldr' :: (a -> b -> b) -> b -> HashMap k a -> b #

foldl :: (b -> a -> b) -> b -> HashMap k a -> b #

foldl' :: (b -> a -> b) -> b -> HashMap k a -> b #

foldr1 :: (a -> a -> a) -> HashMap k a -> a #

foldl1 :: (a -> a -> a) -> HashMap k a -> a #

toList :: HashMap k a -> [a] #

null :: HashMap k a -> Bool #

length :: HashMap k a -> Int #

elem :: Eq a => a -> HashMap k a -> Bool #

maximum :: Ord a => HashMap k a -> a #

minimum :: Ord a => HashMap k a -> a #

sum :: Num a => HashMap k a -> a #

product :: Num a => HashMap k a -> a #

Foldable f => Foldable (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

fold :: Monoid m => Cofree f m -> m #

foldMap :: Monoid m => (a -> m) -> Cofree f a -> m #

foldMap' :: Monoid m => (a -> m) -> Cofree f a -> m #

foldr :: (a -> b -> b) -> b -> Cofree f a -> b #

foldr' :: (a -> b -> b) -> b -> Cofree f a -> b #

foldl :: (b -> a -> b) -> b -> Cofree f a -> b #

foldl' :: (b -> a -> b) -> b -> Cofree f a -> b #

foldr1 :: (a -> a -> a) -> Cofree f a -> a #

foldl1 :: (a -> a -> a) -> Cofree f a -> a #

toList :: Cofree f a -> [a] #

null :: Cofree f a -> Bool #

length :: Cofree f a -> Int #

elem :: Eq a => a -> Cofree f a -> Bool #

maximum :: Ord a => Cofree f a -> a #

minimum :: Ord a => Cofree f a -> a #

sum :: Num a => Cofree f a -> a #

product :: Num a => Cofree f a -> a #

Foldable f => Foldable (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

fold :: Monoid m => Free f m -> m #

foldMap :: Monoid m => (a -> m) -> Free f a -> m #

foldMap' :: Monoid m => (a -> m) -> Free f a -> m #

foldr :: (a -> b -> b) -> b -> Free f a -> b #

foldr' :: (a -> b -> b) -> b -> Free f a -> b #

foldl :: (b -> a -> b) -> b -> Free f a -> b #

foldl' :: (b -> a -> b) -> b -> Free f a -> b #

foldr1 :: (a -> a -> a) -> Free f a -> a #

foldl1 :: (a -> a -> a) -> Free f a -> a #

toList :: Free f a -> [a] #

null :: Free f a -> Bool #

length :: Free f a -> Int #

elem :: Eq a => a -> Free f a -> Bool #

maximum :: Ord a => Free f a -> a #

minimum :: Ord a => Free f a -> a #

sum :: Num a => Free f a -> a #

product :: Num a => Free f a -> a #

Foldable f => Foldable (Yoneda f) 
Instance details

Defined in Data.Functor.Yoneda

Methods

fold :: Monoid m => Yoneda f m -> m #

foldMap :: Monoid m => (a -> m) -> Yoneda f a -> m #

foldMap' :: Monoid m => (a -> m) -> Yoneda f a -> m #

foldr :: (a -> b -> b) -> b -> Yoneda f a -> b #

foldr' :: (a -> b -> b) -> b -> Yoneda f a -> b #

foldl :: (b -> a -> b) -> b -> Yoneda f a -> b #

foldl' :: (b -> a -> b) -> b -> Yoneda f a -> b #

foldr1 :: (a -> a -> a) -> Yoneda f a -> a #

foldl1 :: (a -> a -> a) -> Yoneda f a -> a #

toList :: Yoneda f a -> [a] #

null :: Yoneda f a -> Bool #

length :: Yoneda f a -> Int #

elem :: Eq a => a -> Yoneda f a -> Bool #

maximum :: Ord a => Yoneda f a -> a #

minimum :: Ord a => Yoneda f a -> a #

sum :: Num a => Yoneda f a -> a #

product :: Num a => Yoneda f a -> a #

Foldable f => Foldable (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Rec1 f m -> m #

foldMap :: Monoid m => (a -> m) -> Rec1 f a -> m #

foldMap' :: Monoid m => (a -> m) -> Rec1 f a -> m #

foldr :: (a -> b -> b) -> b -> Rec1 f a -> b #

foldr' :: (a -> b -> b) -> b -> Rec1 f a -> b #

foldl :: (b -> a -> b) -> b -> Rec1 f a -> b #

foldl' :: (b -> a -> b) -> b -> Rec1 f a -> b #

foldr1 :: (a -> a -> a) -> Rec1 f a -> a #

foldl1 :: (a -> a -> a) -> Rec1 f a -> a #

toList :: Rec1 f a -> [a] #

null :: Rec1 f a -> Bool #

length :: Rec1 f a -> Int #

elem :: Eq a => a -> Rec1 f a -> Bool #

maximum :: Ord a => Rec1 f a -> a #

minimum :: Ord a => Rec1 f a -> a #

sum :: Num a => Rec1 f a -> a #

product :: Num a => Rec1 f a -> a #

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 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

fold :: Monoid m => Tagged s m -> m #

foldMap :: Monoid m => (a -> m) -> Tagged s a -> m #

foldMap' :: Monoid m => (a -> m) -> Tagged s a -> m #

foldr :: (a -> b -> b) -> b -> Tagged s a -> b #

foldr' :: (a -> b -> b) -> b -> Tagged s a -> b #

foldl :: (b -> a -> b) -> b -> Tagged s a -> b #

foldl' :: (b -> a -> b) -> b -> Tagged s a -> b #

foldr1 :: (a -> a -> a) -> Tagged s a -> a #

foldl1 :: (a -> a -> a) -> Tagged s a -> a #

toList :: Tagged s a -> [a] #

null :: Tagged s a -> Bool #

length :: Tagged s a -> Int #

elem :: Eq a => a -> Tagged s a -> Bool #

maximum :: Ord a => Tagged s a -> a #

minimum :: Ord a => Tagged s a -> a #

sum :: Num a => Tagged s a -> a #

product :: Num a => Tagged s a -> a #

Bifoldable p => Foldable (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

fold :: Monoid m => Join p m -> m #

foldMap :: Monoid m => (a -> m) -> Join p a -> m #

foldMap' :: Monoid m => (a -> m) -> Join p a -> m #

foldr :: (a -> b -> b) -> b -> Join p a -> b #

foldr' :: (a -> b -> b) -> b -> Join p a -> b #

foldl :: (b -> a -> b) -> b -> Join p a -> b #

foldl' :: (b -> a -> b) -> b -> Join p a -> b #

foldr1 :: (a -> a -> a) -> Join p a -> a #

foldl1 :: (a -> a -> a) -> Join p a -> a #

toList :: Join p a -> [a] #

null :: Join p a -> Bool #

length :: Join p a -> Int #

elem :: Eq a => a -> Join p a -> Bool #

maximum :: Ord a => Join p a -> a #

minimum :: Ord a => Join p a -> a #

sum :: Num a => Join p a -> a #

product :: Num a => Join p a -> a #

(Foldable f, Foldable w) => Foldable (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

fold :: Monoid m => CofreeT f w m -> m #

foldMap :: Monoid m => (a -> m) -> CofreeT f w a -> m #

foldMap' :: Monoid m => (a -> m) -> CofreeT f w a -> m #

foldr :: (a -> b -> b) -> b -> CofreeT f w a -> b #

foldr' :: (a -> b -> b) -> b -> CofreeT f w a -> b #

foldl :: (b -> a -> b) -> b -> CofreeT f w a -> b #

foldl' :: (b -> a -> b) -> b -> CofreeT f w a -> b #

foldr1 :: (a -> a -> a) -> CofreeT f w a -> a #

foldl1 :: (a -> a -> a) -> CofreeT f w a -> a #

toList :: CofreeT f w a -> [a] #

null :: CofreeT f w a -> Bool #

length :: CofreeT f w a -> Int #

elem :: Eq a => a -> CofreeT f w a -> Bool #

maximum :: Ord a => CofreeT f w a -> a #

minimum :: Ord a => CofreeT f w a -> a #

sum :: Num a => CofreeT f w a -> a #

product :: Num a => CofreeT f w a -> a #

Foldable f => Foldable (CofreeF f a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

fold :: Monoid m => CofreeF f a m -> m #

foldMap :: Monoid m => (a0 -> m) -> CofreeF f a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> CofreeF f a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> CofreeF f a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> CofreeF f a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> CofreeF f a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> CofreeF f a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> CofreeF f a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> CofreeF f a a0 -> a0 #

toList :: CofreeF f a a0 -> [a0] #

null :: CofreeF f a a0 -> Bool #

length :: CofreeF f a a0 -> Int #

elem :: Eq a0 => a0 -> CofreeF f a a0 -> Bool #

maximum :: Ord a0 => CofreeF f a a0 -> a0 #

minimum :: Ord a0 => CofreeF f a a0 -> a0 #

sum :: Num a0 => CofreeF f a a0 -> a0 #

product :: Num a0 => CofreeF f a a0 -> a0 #

Bifoldable p => Foldable (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

fold :: Monoid m => Fix p m -> m #

foldMap :: Monoid m => (a -> m) -> Fix p a -> m #

foldMap' :: Monoid m => (a -> m) -> Fix p a -> m #

foldr :: (a -> b -> b) -> b -> Fix p a -> b #

foldr' :: (a -> b -> b) -> b -> Fix p a -> b #

foldl :: (b -> a -> b) -> b -> Fix p a -> b #

foldl' :: (b -> a -> b) -> b -> Fix p a -> b #

foldr1 :: (a -> a -> a) -> Fix p a -> a #

foldl1 :: (a -> a -> a) -> Fix p a -> a #

toList :: Fix p a -> [a] #

null :: Fix p a -> Bool #

length :: Fix p a -> Int #

elem :: Eq a => a -> Fix p a -> Bool #

maximum :: Ord a => Fix p a -> a #

minimum :: Ord a => Fix p a -> a #

sum :: Num a => Fix p a -> a #

product :: Num a => Fix p a -> a #

(Foldable m, Foldable f) => Foldable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fold :: Monoid m0 => FreeT f m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> FreeT f m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> FreeT f m a -> m0 #

foldr :: (a -> b -> b) -> b -> FreeT f m a -> b #

foldr' :: (a -> b -> b) -> b -> FreeT f m a -> b #

foldl :: (b -> a -> b) -> b -> FreeT f m a -> b #

foldl' :: (b -> a -> b) -> b -> FreeT f m a -> b #

foldr1 :: (a -> a -> a) -> FreeT f m a -> a #

foldl1 :: (a -> a -> a) -> FreeT f m a -> a #

toList :: FreeT f m a -> [a] #

null :: FreeT f m a -> Bool #

length :: FreeT f m a -> Int #

elem :: Eq a => a -> FreeT f m a -> Bool #

maximum :: Ord a => FreeT f m a -> a #

minimum :: Ord a => FreeT f m a -> a #

sum :: Num a => FreeT f m a -> a #

product :: Num a => FreeT f m a -> a #

Foldable f => Foldable (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fold :: Monoid m => FreeF f a m -> m #

foldMap :: Monoid m => (a0 -> m) -> FreeF f a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> FreeF f a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> FreeF f a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> FreeF f a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> FreeF f a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> FreeF f a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> FreeF f a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> FreeF f a a0 -> a0 #

toList :: FreeF f a a0 -> [a0] #

null :: FreeF f a a0 -> Bool #

length :: FreeF f a a0 -> Int #

elem :: Eq a0 => a0 -> FreeF f a a0 -> Bool #

maximum :: Ord a0 => FreeF f a a0 -> a0 #

minimum :: Ord a0 => FreeF f a a0 -> a0 #

sum :: Num a0 => FreeF f a a0 -> a0 #

product :: Num a0 => FreeF f a a0 -> a0 #

Foldable (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 g) => Foldable (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

fold :: Monoid m => Sum f g m -> m #

foldMap :: Monoid m => (a -> m) -> Sum f g a -> m #

foldMap' :: Monoid m => (a -> m) -> Sum f g a -> m #

foldr :: (a -> b -> b) -> b -> Sum f g a -> b #

foldr' :: (a -> b -> b) -> b -> Sum f g a -> b #

foldl :: (b -> a -> b) -> b -> Sum f g a -> b #

foldl' :: (b -> a -> b) -> b -> Sum f g a -> b #

foldr1 :: (a -> a -> a) -> Sum f g a -> a #

foldl1 :: (a -> a -> a) -> Sum f g a -> a #

toList :: Sum f g a -> [a] #

null :: Sum f g a -> Bool #

length :: Sum f g a -> Int #

elem :: Eq a => a -> Sum f g a -> Bool #

maximum :: Ord a => Sum f g a -> a #

minimum :: Ord a => Sum f g a -> a #

sum :: Num a => Sum f g a -> a #

product :: Num a => Sum f g a -> a #

Foldable f => Foldable (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 #

Foldable (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

fold :: Monoid m => Clown f a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Clown f a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Clown f a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Clown f a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Clown f a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Clown f a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Clown f a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 #

toList :: Clown f a a0 -> [a0] #

null :: Clown f a a0 -> Bool #

length :: Clown f a a0 -> Int #

elem :: Eq a0 => a0 -> Clown f a a0 -> Bool #

maximum :: Ord a0 => Clown f a a0 -> a0 #

minimum :: Ord a0 => Clown f a a0 -> a0 #

sum :: Num a0 => Clown f a a0 -> a0 #

product :: Num a0 => Clown f a a0 -> a0 #

Bifoldable p => Foldable (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

fold :: Monoid m => Flip p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Flip p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Flip p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Flip p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Flip p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Flip p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Flip p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 #

toList :: Flip p a a0 -> [a0] #

null :: Flip p a a0 -> Bool #

length :: Flip p a a0 -> Int #

elem :: Eq a0 => a0 -> Flip p a a0 -> Bool #

maximum :: Ord a0 => Flip p a a0 -> a0 #

minimum :: Ord a0 => Flip p a a0 -> a0 #

sum :: Num a0 => Flip p a a0 -> a0 #

product :: Num a0 => Flip p a a0 -> a0 #

Foldable g => Foldable (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

fold :: Monoid m => Joker g a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Joker g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Joker g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Joker g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Joker g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Joker g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Joker g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 #

toList :: Joker g a a0 -> [a0] #

null :: Joker g a a0 -> Bool #

length :: Joker g a a0 -> Int #

elem :: Eq a0 => a0 -> Joker g a a0 -> Bool #

maximum :: Ord a0 => Joker g a a0 -> a0 #

minimum :: Ord a0 => Joker g a a0 -> a0 #

sum :: Num a0 => Joker g a a0 -> a0 #

product :: Num a0 => Joker g a a0 -> a0 #

Bifoldable p => Foldable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

fold :: Monoid m => WrappedBifunctor p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 #

toList :: WrappedBifunctor p a a0 -> [a0] #

null :: WrappedBifunctor p a a0 -> Bool #

length :: WrappedBifunctor p a a0 -> Int #

elem :: Eq a0 => a0 -> WrappedBifunctor p a a0 -> Bool #

maximum :: Ord a0 => WrappedBifunctor p a a0 -> a0 #

minimum :: Ord a0 => WrappedBifunctor p a a0 -> a0 #

sum :: Num a0 => WrappedBifunctor p a a0 -> a0 #

product :: Num a0 => WrappedBifunctor p a a0 -> a0 #

(Foldable f, Bifoldable p) => Foldable (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

fold :: Monoid m => Tannen f p a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 #

toList :: Tannen f p a a0 -> [a0] #

null :: Tannen f p a a0 -> Bool #

length :: Tannen f p a a0 -> Int #

elem :: Eq a0 => a0 -> Tannen f p a a0 -> Bool #

maximum :: Ord a0 => Tannen f p a a0 -> a0 #

minimum :: Ord a0 => Tannen f p a a0 -> a0 #

sum :: Num a0 => Tannen f p a a0 -> a0 #

product :: Num a0 => Tannen f p a a0 -> a0 #

(Bifoldable p, Foldable g) => Foldable (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

fold :: Monoid m => Biff p f g a m -> m #

foldMap :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m #

foldMap' :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m #

foldr :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b #

foldr' :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b #

foldl :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b #

foldl' :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b #

foldr1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 #

foldl1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 #

toList :: Biff p f g a a0 -> [a0] #

null :: Biff p f g a a0 -> Bool #

length :: Biff p f g a a0 -> Int #

elem :: Eq a0 => a0 -> Biff p f g a a0 -> Bool #

maximum :: Ord a0 => Biff p f g a a0 -> a0 #

minimum :: Ord a0 => Biff p f g a a0 -> a0 #

sum :: Num a0 => Biff p f g a a0 -> a0 #

product :: Num a0 => Biff p f g a a0 -> a0 #

class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where #

Functors representing data structures that can be 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 Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Min a -> f (Min b) #

sequenceA :: Applicative f => Min (f a) -> f (Min a) #

mapM :: Monad m => (a -> m b) -> Min a -> m (Min b) #

sequence :: Monad m => Min (m a) -> m (Min a) #

Traversable Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Max a -> f (Max b) #

sequenceA :: Applicative f => Max (f a) -> f (Max a) #

mapM :: Monad m => (a -> m b) -> Max a -> m (Max b) #

sequence :: Monad m => Max (m a) -> m (Max a) #

Traversable First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) #

sequenceA :: Applicative f => First (f a) -> f (First a) #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) #

sequence :: Monad m => First (m a) -> m (First a) #

Traversable Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) #

sequenceA :: Applicative f => Last (f a) -> f (Last a) #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) #

sequence :: Monad m => Last (m a) -> m (Last a) #

Traversable Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a -> f b) -> Option a -> f (Option b) #

sequenceA :: Applicative f => Option (f a) -> f (Option a) #

mapM :: Monad m => (a -> m b) -> Option a -> m (Option b) #

sequence :: Monad m => Option (m a) -> m (Option 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 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 Vector 
Instance details

Defined in Data.Vector

Methods

traverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) #

sequenceA :: Applicative f => Vector (f a) -> f (Vector a) #

mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) #

sequence :: Monad m => Vector (m a) -> m (Vector a) #

Traversable Array 
Instance details

Defined in Data.Primitive.Array

Methods

traverse :: Applicative f => (a -> f b) -> Array a -> f (Array b) #

sequenceA :: Applicative f => Array (f a) -> f (Array a) #

mapM :: Monad m => (a -> m b) -> Array a -> m (Array b) #

sequence :: Monad m => Array (m a) -> m (Array a) #

Traversable SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

traverse :: Applicative f => (a -> f b) -> SmallArray a -> f (SmallArray b) #

sequenceA :: Applicative f => SmallArray (f a) -> f (SmallArray a) #

mapM :: Monad m => (a -> m b) -> SmallArray a -> m (SmallArray b) #

sequence :: Monad m => SmallArray (m a) -> m (SmallArray a) #

Traversable (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 (Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

traverse :: Applicative f => (a0 -> f b) -> Arg a a0 -> f (Arg a b) #

sequenceA :: Applicative f => Arg a (f a0) -> f (Arg a a0) #

mapM :: Monad m => (a0 -> m b) -> Arg a a0 -> m (Arg a b) #

sequence :: Monad m => Arg a (m a0) -> m (Arg a a0) #

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 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> HashMap k a -> f (HashMap k b) #

sequenceA :: Applicative f => HashMap k (f a) -> f (HashMap k a) #

mapM :: Monad m => (a -> m b) -> HashMap k a -> m (HashMap k b) #

sequence :: Monad m => HashMap k (m a) -> m (HashMap k a) #

Traversable f => Traversable (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Cofree f a -> f0 (Cofree f b) #

sequenceA :: Applicative f0 => Cofree f (f0 a) -> f0 (Cofree f a) #

mapM :: Monad m => (a -> m b) -> Cofree f a -> m (Cofree f b) #

sequence :: Monad m => Cofree f (m a) -> m (Cofree f a) #

Traversable f => Traversable (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Free f a -> f0 (Free f b) #

sequenceA :: Applicative f0 => Free f (f0 a) -> f0 (Free f a) #

mapM :: Monad m => (a -> m b) -> Free f a -> m (Free f b) #

sequence :: Monad m => Free f (m a) -> m (Free f a) #

Traversable f => Traversable (Yoneda f) 
Instance details

Defined in Data.Functor.Yoneda

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Yoneda f a -> f0 (Yoneda f b) #

sequenceA :: Applicative f0 => Yoneda f (f0 a) -> f0 (Yoneda f a) #

mapM :: Monad m => (a -> m b) -> Yoneda f a -> m (Yoneda f b) #

sequence :: Monad m => Yoneda f (m a) -> m (Yoneda f a) #

Traversable f => Traversable (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Rec1 f a -> f0 (Rec1 f b) #

sequenceA :: Applicative f0 => Rec1 f (f0 a) -> f0 (Rec1 f a) #

mapM :: Monad m => (a -> m b) -> Rec1 f a -> m (Rec1 f b) #

sequence :: Monad m => Rec1 f (m a) -> m (Rec1 f a) #

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 (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

traverse :: Applicative f => (a -> f b) -> Tagged s a -> f (Tagged s b) #

sequenceA :: Applicative f => Tagged s (f a) -> f (Tagged s a) #

mapM :: Monad m => (a -> m b) -> Tagged s a -> m (Tagged s b) #

sequence :: Monad m => Tagged s (m a) -> m (Tagged s a) #

Bitraversable p => Traversable (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

traverse :: Applicative f => (a -> f b) -> Join p a -> f (Join p b) #

sequenceA :: Applicative f => Join p (f a) -> f (Join p a) #

mapM :: Monad m => (a -> m b) -> Join p a -> m (Join p b) #

sequence :: Monad m => Join p (m a) -> m (Join p a) #

(Traversable f, Traversable w) => Traversable (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

traverse :: Applicative f0 => (a -> f0 b) -> CofreeT f w a -> f0 (CofreeT f w b) #

sequenceA :: Applicative f0 => CofreeT f w (f0 a) -> f0 (CofreeT f w a) #

mapM :: Monad m => (a -> m b) -> CofreeT f w a -> m (CofreeT f w b) #

sequence :: Monad m => CofreeT f w (m a) -> m (CofreeT f w a) #

Traversable f => Traversable (CofreeF f a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> CofreeF f a a0 -> f0 (CofreeF f a b) #

sequenceA :: Applicative f0 => CofreeF f a (f0 a0) -> f0 (CofreeF f a a0) #

mapM :: Monad m => (a0 -> m b) -> CofreeF f a a0 -> m (CofreeF f a b) #

sequence :: Monad m => CofreeF f a (m a0) -> m (CofreeF f a a0) #

Bitraversable p => Traversable (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

traverse :: Applicative f => (a -> f b) -> Fix p a -> f (Fix p b) #

sequenceA :: Applicative f => Fix p (f a) -> f (Fix p a) #

mapM :: Monad m => (a -> m b) -> Fix p a -> m (Fix p b) #

sequence :: Monad m => Fix p (m a) -> m (Fix p a) #

(Monad m, Traversable m, Traversable f) => Traversable (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

traverse :: Applicative f0 => (a -> f0 b) -> FreeT f m a -> f0 (FreeT f m b) #

sequenceA :: Applicative f0 => FreeT f m (f0 a) -> f0 (FreeT f m a) #

mapM :: Monad m0 => (a -> m0 b) -> FreeT f m a -> m0 (FreeT f m b) #

sequence :: Monad m0 => FreeT f m (m0 a) -> m0 (FreeT f m a) #

Traversable f => Traversable (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> FreeF f a a0 -> f0 (FreeF f a b) #

sequenceA :: Applicative f0 => FreeF f a (f0 a0) -> f0 (FreeF f a a0) #

mapM :: Monad m => (a0 -> m b) -> FreeF f a a0 -> m (FreeF f a b) #

sequence :: Monad m => FreeF f a (m a0) -> m (FreeF f a a0) #

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 g) => Traversable (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Sum f g a -> f0 (Sum f g b) #

sequenceA :: Applicative f0 => Sum f g (f0 a) -> f0 (Sum f g a) #

mapM :: Monad m => (a -> m b) -> Sum f g a -> m (Sum f g b) #

sequence :: Monad m => Sum f g (m a) -> m (Sum f g a) #

Traversable f => Traversable (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) #

Traversable (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Clown f a a0 -> f0 (Clown f a b) #

sequenceA :: Applicative f0 => Clown f a (f0 a0) -> f0 (Clown f a a0) #

mapM :: Monad m => (a0 -> m b) -> Clown f a a0 -> m (Clown f a b) #

sequence :: Monad m => Clown f a (m a0) -> m (Clown f a a0) #

Bitraversable p => Traversable (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

traverse :: Applicative f => (a0 -> f b) -> Flip p a a0 -> f (Flip p a b) #

sequenceA :: Applicative f => Flip p a (f a0) -> f (Flip p a a0) #

mapM :: Monad m => (a0 -> m b) -> Flip p a a0 -> m (Flip p a b) #

sequence :: Monad m => Flip p a (m a0) -> m (Flip p a a0) #

Traversable g => Traversable (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

traverse :: Applicative f => (a0 -> f b) -> Joker g a a0 -> f (Joker g a b) #

sequenceA :: Applicative f => Joker g a (f a0) -> f (Joker g a a0) #

mapM :: Monad m => (a0 -> m b) -> Joker g a a0 -> m (Joker g a b) #

sequence :: Monad m => Joker g a (m a0) -> m (Joker g a a0) #

Bitraversable p => Traversable (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

traverse :: Applicative f => (a0 -> f b) -> WrappedBifunctor p a a0 -> f (WrappedBifunctor p a b) #

sequenceA :: Applicative f => WrappedBifunctor p a (f a0) -> f (WrappedBifunctor p a a0) #

mapM :: Monad m => (a0 -> m b) -> WrappedBifunctor p a a0 -> m (WrappedBifunctor p a b) #

sequence :: Monad m => WrappedBifunctor p a (m a0) -> m (WrappedBifunctor p a a0) #

(Traversable f, Bitraversable p) => Traversable (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Tannen f p a a0 -> f0 (Tannen f p a b) #

sequenceA :: Applicative f0 => Tannen f p a (f0 a0) -> f0 (Tannen f p a a0) #

mapM :: Monad m => (a0 -> m b) -> Tannen f p a a0 -> m (Tannen f p a b) #

sequence :: Monad m => Tannen f p a (m a0) -> m (Tannen f p a a0) #

(Bitraversable p, Traversable g) => Traversable (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

traverse :: Applicative f0 => (a0 -> f0 b) -> Biff p f g a a0 -> f0 (Biff p f g a b) #

sequenceA :: Applicative f0 => Biff p f g a (f0 a0) -> f0 (Biff p f g a a0) #

mapM :: Monad m => (a0 -> m b) -> Biff p f g a a0 -> m (Biff p f g a b) #

sequence :: Monad m => Biff p f g a (m a0) -> m (Biff p f g a a0) #

class IsLabel (x :: Symbol) a where #

Methods

fromLabel :: a #

(<>) :: Semigroup a => a -> a -> a infixr 6 #

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]

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 ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Monoid Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

Monoid ByteArray 
Instance details

Defined in Data.Primitive.ByteArray

Methods

mempty :: ByteArray #

mappend :: ByteArray -> ByteArray -> ByteArray #

mconcat :: [ByteArray] -> ByteArray #

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 #

(Ord a, Bounded a) => Monoid (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Min a #

mappend :: Min a -> Min a -> Min a #

mconcat :: [Min a] -> Min a #

(Ord a, Bounded a) => Monoid (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

Monoid m => Monoid (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Monoid (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Option a #

mappend :: Option a -> Option a -> Option a #

mconcat :: [Option a] -> Option a #

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 #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a #

mappend :: Down a -> Down a -> Down a #

mconcat :: [Down a] -> Down a #

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 (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

mempty :: Doc a #

mappend :: Doc a -> Doc a -> Doc a #

mconcat :: [Doc a] -> Doc a #

(Hashable a, Eq a) => Monoid (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

mempty :: HashSet a #

mappend :: HashSet a -> HashSet a -> HashSet a #

mconcat :: [HashSet a] -> HashSet a #

Monoid (Vector a) 
Instance details

Defined in Data.Vector

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Monoid (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

mempty :: Array a #

mappend :: Array a -> Array a -> Array a #

mconcat :: [Array a] -> Array a #

Monoid (PrimArray a) 
Instance details

Defined in Data.Primitive.PrimArray

Methods

mempty :: PrimArray a #

mappend :: PrimArray a -> PrimArray a -> PrimArray a #

mconcat :: [PrimArray a] -> PrimArray a #

Monoid (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Methods

mempty :: SmallArray a #

mappend :: SmallArray a -> SmallArray a -> SmallArray a #

mconcat :: [SmallArray a] -> SmallArray a #

Prim a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Storable a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Unital a => Monoid (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

mempty :: Mult a #

mappend :: Mult a -> Mult a -> Mult a #

mconcat :: [Mult a] -> Mult a #

Monoidal a => Monoid (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

mempty :: Add a #

mappend :: Add a -> Add a -> Add a #

mconcat :: [Add a] -> Add 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) #

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 #

(Eq k, Hashable k) => Monoid (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

mempty :: HashMap k v #

mappend :: HashMap k v -> HashMap k v -> HashMap k v #

mconcat :: [HashMap k v] -> HashMap k v #

Monoid (f a) => Monoid (Indexing f a) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

mempty :: Indexing f a #

mappend :: Indexing f a -> Indexing f a -> Indexing f a #

mconcat :: [Indexing f a] -> Indexing f a #

Monoid (f p) => Monoid (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Rec1 f p #

mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p #

mconcat :: [Rec1 f p] -> Rec1 f p #

(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 #

Reifies s (ReifiedMonoid a) => Monoid (ReflectedMonoid a s) 
Instance details

Defined in Data.Reflection

Methods

mempty :: ReflectedMonoid a s #

mappend :: ReflectedMonoid a s -> ReflectedMonoid a s -> ReflectedMonoid a s #

mconcat :: [ReflectedMonoid a s] -> ReflectedMonoid a s #

(Semigroup a, Monoid a) => Monoid (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

mempty :: Tagged s a #

mappend :: Tagged s a -> Tagged s a -> Tagged s a #

mconcat :: [Tagged s a] -> Tagged s a #

Monoid 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 #

Data Bool

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bool -> c Bool #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bool #

toConstr :: Bool -> Constr #

dataTypeOf :: Bool -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bool) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bool) #

gmapT :: (forall b. Data b => b -> b) -> Bool -> Bool #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bool -> r #

gmapQ :: (forall d. Data d => d -> u) -> Bool -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Bool -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bool -> m Bool #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bool -> m Bool #

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 #

Ix Bool

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: (Bool, Bool) -> [Bool] #

index :: (Bool, Bool) -> Bool -> Int #

unsafeIndex :: (Bool, Bool) -> Bool -> Int #

inRange :: (Bool, Bool) -> Bool -> Bool #

rangeSize :: (Bool, Bool) -> Int #

unsafeRangeSize :: (Bool, Bool) -> Int #

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 #

Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Bool -> Int #

alignment :: Bool -> Int #

peekElemOff :: Ptr Bool -> Int -> IO Bool #

pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () #

peekByteOff :: Ptr b -> Int -> IO Bool #

pokeByteOff :: Ptr b -> Int -> Bool -> IO () #

peek :: Ptr Bool -> IO Bool #

poke :: Ptr Bool -> Bool -> IO () #

Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int #

hash :: Bool -> Int #

Unbox Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Abelian Bool 
Instance details

Defined in Numeric.Additive.Class

Additive Bool 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Bool -> Bool -> Bool #

sinnum1p :: Natural -> Bool -> Bool #

sumWith1 :: Foldable1 f => (a -> Bool) -> f a -> Bool #

Idempotent Bool 
Instance details

Defined in Numeric.Additive.Class

Partitionable Bool 
Instance details

Defined in Numeric.Additive.Class

Methods

partitionWith :: (Bool -> Bool -> r) -> Bool -> NonEmpty r #

Monoidal Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Bool #

sinnum :: Natural -> Bool -> Bool #

sumWith :: Foldable f => (a -> Bool) -> f a -> Bool #

Multiplicative Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Bool -> Bool -> Bool #

pow1p :: Bool -> Natural -> Bool #

productWith1 :: Foldable1 f => (a -> Bool) -> f a -> Bool #

Semiring Bool 
Instance details

Defined in Numeric.Algebra.Class

Commutative Bool 
Instance details

Defined in Numeric.Algebra.Commutative

Factorable Bool 
Instance details

Defined in Numeric.Algebra.Factorable

Methods

factorWith :: (Bool -> Bool -> r) -> Bool -> NonEmpty r #

Band Bool 
Instance details

Defined in Numeric.Algebra.Idempotent

InvolutiveMultiplication Bool 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Bool -> Bool #

InvolutiveSemiring Bool 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Bool 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Bool 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Bool #

pow :: Bool -> Natural -> Bool #

productWith :: Foldable f => (a -> Bool) -> f a -> Bool #

DecidableAssociates Bool 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Bool -> Bool -> Bool #

DecidableUnits Bool 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Bool -> Maybe Bool #

isUnit :: Bool -> Bool #

(^?) :: Integral n => Bool -> n -> Maybe Bool #

DecidableZero Bool 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Bool -> Bool #

AdditiveOrder Bool 
Instance details

Defined in Numeric.Order.Additive

LocallyFiniteOrder Bool 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Bool -> Bool -> [Bool]

rangeSize :: Bool -> Bool -> Natural

moebiusInversion :: Ring r => Bool -> Bool -> r

Characteristic Bool 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Bool -> Natural #

Rig Bool 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Bool #

OrderedRig Bool 
Instance details

Defined in Numeric.Rig.Ordered

ZeroProductSemiring Bool 
Instance details

Defined in Numeric.Semiring.ZeroProduct

SingKind Bool

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep Bool

Methods

fromSing :: forall (a :: Bool). Sing a -> DemoteRep Bool

Lift Bool 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Bool -> Q Exp #

liftTyped :: Bool -> Q (TExp Bool) #

LeftModule Natural Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Bool -> Bool #

RightModule Natural Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Bool -> Natural -> Bool #

Rig r => Quadrance r Bool 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Bool -> r #

Vector Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Bool -> m (Vector Bool)

basicUnsafeThaw :: PrimMonad m => Vector Bool -> m (Mutable Vector (PrimState m) Bool)

basicLength :: Vector Bool -> Int

basicUnsafeSlice :: Int -> Int -> Vector Bool -> Vector Bool

basicUnsafeIndexM :: Monad m => Vector Bool -> Int -> m Bool

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Bool -> Vector Bool -> m ()

elemseq :: Vector Bool -> Bool -> b -> b

MVector MVector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Bool -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Bool -> MVector s Bool

basicOverlaps :: MVector s Bool -> MVector s Bool -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Bool)

basicInitialize :: PrimMonad m => MVector (PrimState m) Bool -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Bool -> m (MVector (PrimState m) Bool)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Bool -> Int -> m Bool

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Bool -> Int -> Bool -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Bool -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Bool -> Bool -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Bool -> MVector (PrimState m) Bool -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Bool -> MVector (PrimState m) Bool -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Bool -> Int -> m (MVector (PrimState m) Bool)

SingI 'False

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing 'False

SingI 'True

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing 'True

type Rep Bool 
Instance details

Defined in GHC.Generics

type 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))
newtype Vector Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Bool = V_Bool (Vector Word8)
type DemoteRep Bool 
Instance details

Defined in GHC.Generics

type DemoteRep Bool = Bool
data Sing (a :: Bool) 
Instance details

Defined in GHC.Generics

data Sing (a :: Bool) where
newtype MVector s Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Bool = MV_Bool (MVector s Word8)

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 #

Data Char

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Char -> c Char #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Char #

toConstr :: Char -> Constr #

dataTypeOf :: Char -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Char) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Char) #

gmapT :: (forall b. Data b => b -> b) -> Char -> Char #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Char -> r #

gmapQ :: (forall d. Data d => d -> u) -> Char -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Char -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Char -> m Char #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Char -> m Char #

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 #

Ix Char

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: (Char, Char) -> [Char] #

index :: (Char, Char) -> Char -> Int #

unsafeIndex :: (Char, Char) -> Char -> Int #

inRange :: (Char, Char) -> Char -> Bool #

rangeSize :: (Char, Char) -> Int #

unsafeRangeSize :: (Char, Char) -> Int #

Storable Char

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Char -> Int #

alignment :: Char -> Int #

peekElemOff :: Ptr Char -> Int -> IO Char #

pokeElemOff :: Ptr Char -> Int -> Char -> IO () #

peekByteOff :: Ptr b -> Int -> IO Char #

pokeByteOff :: Ptr b -> Int -> Char -> IO () #

peek :: Ptr Char -> IO Char #

poke :: Ptr Char -> Char -> IO () #

ErrorList Char 
Instance details

Defined in Control.Monad.Trans.Error

Methods

listMsg :: String -> [Char] #

Hashable Char 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Char -> Int #

hash :: Char -> Int #

Unbox Char 
Instance details

Defined in Data.Vector.Unboxed.Base

Prim Char 
Instance details

Defined in Data.Primitive.Types

Lift Char 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Char -> Q Exp #

liftTyped :: Char -> Q (TExp Char) #

Vector Vector Char 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Char -> m (Vector Char)

basicUnsafeThaw :: PrimMonad m => Vector Char -> m (Mutable Vector (PrimState m) Char)

basicLength :: Vector Char -> Int

basicUnsafeSlice :: Int -> Int -> Vector Char -> Vector Char

basicUnsafeIndexM :: Monad m => Vector Char -> Int -> m Char

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Char -> Vector Char -> m ()

elemseq :: Vector Char -> Char -> b -> b

MVector MVector Char 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Char -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Char -> MVector s Char

basicOverlaps :: MVector s Char -> MVector s Char -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Char)

basicInitialize :: PrimMonad m => MVector (PrimState m) Char -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Char -> m (MVector (PrimState m) Char)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Char -> Int -> m Char

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Char -> Int -> Char -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Char -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Char -> Char -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Char -> MVector (PrimState m) Char -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Char -> MVector (PrimState m) Char -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Char -> Int -> m (MVector (PrimState m) Char)

KnownSymbol n => Reifies (n :: Symbol) String 
Instance details

Defined in Data.Reflection

Methods

reflect :: proxy n -> String

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 #

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 #

newtype Vector Char 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Char = V_Char (Vector Char)
data URec Char (p :: k)

Used for marking occurrences of Char#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Char (p :: k) = UChar {}
newtype MVector s Char 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Char = MV_Char (MVector s Char)
type Rep1 (URec Char :: k -> Type) 
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

Data Double

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Double -> c Double #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Double #

toConstr :: Double -> Constr #

dataTypeOf :: Double -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Double) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Double) #

gmapT :: (forall b. Data b => b -> b) -> Double -> Double #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Double -> r #

gmapQ :: (forall d. Data d => d -> u) -> Double -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Double -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Double -> m Double #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Double -> m Double #

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

Storable Double

Since: base-2.1

Instance details

Defined in Foreign.Storable

Hashable Double 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Double -> Int #

hash :: Double -> Int #

Unbox Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Prim Double 
Instance details

Defined in Data.Primitive.Types

Lift Double 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Double -> Q Exp #

liftTyped :: Double -> Q (TExp Double) #

Vector Vector Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Double -> m (Vector Double)

basicUnsafeThaw :: PrimMonad m => Vector Double -> m (Mutable Vector (PrimState m) Double)

basicLength :: Vector Double -> Int

basicUnsafeSlice :: Int -> Int -> Vector Double -> Vector Double

basicUnsafeIndexM :: Monad m => Vector Double -> Int -> m Double

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Double -> Vector Double -> m ()

elemseq :: Vector Double -> Double -> b -> b

MVector MVector Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Double -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Double -> MVector s Double

basicOverlaps :: MVector s Double -> MVector s Double -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Double)

basicInitialize :: PrimMonad m => MVector (PrimState m) Double -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Double -> m (MVector (PrimState m) Double)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Double -> Int -> m Double

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Double -> Int -> Double -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Double -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Double -> Double -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Double -> MVector (PrimState m) Double -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Double -> MVector (PrimState m) Double -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Double -> Int -> m (MVector (PrimState m) Double)

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 #

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) #

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 #

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 #

newtype Vector Double 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Double = V_Double (Vector Double)
data URec Double (p :: k)

Used for marking occurrences of Double#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Double (p :: k) = UDouble {}
newtype MVector s Double 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Double = MV_Double (MVector s Double)
type Rep1 (URec Double :: k -> Type) 
Instance details

Defined in GHC.Generics

type Rep1 (URec Double :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: k -> Type)))
type Rep (URec Double p) 
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

Data Float

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Float -> c Float #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Float #

toConstr :: Float -> Constr #

dataTypeOf :: Float -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Float) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float) #

gmapT :: (forall b. Data b => b -> b) -> Float -> Float #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r #

gmapQ :: (forall d. Data d => d -> u) -> Float -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Float -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Float -> m Float #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float #

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

Storable Float

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Float -> Int #

alignment :: Float -> Int #

peekElemOff :: Ptr Float -> Int -> IO Float #

pokeElemOff :: Ptr Float -> Int -> Float -> IO () #

peekByteOff :: Ptr b -> Int -> IO Float #

pokeByteOff :: Ptr b -> Int -> Float -> IO () #

peek :: Ptr Float -> IO Float #

poke :: Ptr Float -> Float -> IO () #

Hashable Float 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Float -> Int #

hash :: Float -> Int #

Unbox Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Prim Float 
Instance details

Defined in Data.Primitive.Types

Lift Float 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Float -> Q Exp #

liftTyped :: Float -> Q (TExp Float) #

Vector Vector Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Float -> m (Vector Float)

basicUnsafeThaw :: PrimMonad m => Vector Float -> m (Mutable Vector (PrimState m) Float)

basicLength :: Vector Float -> Int

basicUnsafeSlice :: Int -> Int -> Vector Float -> Vector Float

basicUnsafeIndexM :: Monad m => Vector Float -> Int -> m Float

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Float -> Vector Float -> m ()

elemseq :: Vector Float -> Float -> b -> b

MVector MVector Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Float -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Float -> MVector s Float

basicOverlaps :: MVector s Float -> MVector s Float -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Float)

basicInitialize :: PrimMonad m => MVector (PrimState m) Float -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Float -> m (MVector (PrimState m) Float)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Float -> Int -> m Float

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Float -> Int -> Float -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Float -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Float -> Float -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Float -> MVector (PrimState m) Float -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Float -> MVector (PrimState m) Float -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Float -> Int -> m (MVector (PrimState m) Float)

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 #

newtype Vector Float 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Float = V_Float (Vector Float)
data URec Float (p :: k)

Used for marking occurrences of Float#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Float (p :: k) = UFloat {}
newtype MVector s Float 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Float = MV_Float (MVector s Float)
type Rep1 (URec Float :: k -> Type) 
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 #

Data Int

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int -> c Int #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int #

toConstr :: Int -> Constr #

dataTypeOf :: Int -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int) #

gmapT :: (forall b. Data b => b -> b) -> Int -> Int #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int -> m Int #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int -> m Int #

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 #

Ix Int

Since: base-2.1

Instance details

Defined in GHC.Ix

Methods

range :: (Int, Int) -> [Int] #

index :: (Int, Int) -> Int -> Int #

unsafeIndex :: (Int, Int) -> Int -> Int #

inRange :: (Int, Int) -> Int -> Bool #

rangeSize :: (Int, Int) -> Int #

unsafeRangeSize :: (Int, Int) -> Int #

Storable Int

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int -> Int #

alignment :: Int -> Int #

peekElemOff :: Ptr Int -> Int -> IO Int #

pokeElemOff :: Ptr Int -> Int -> Int -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int #

pokeByteOff :: Ptr b -> Int -> Int -> IO () #

peek :: Ptr Int -> IO Int #

poke :: Ptr Int -> Int -> IO () #

Hashable Int 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int -> Int #

hash :: Int -> Int #

Unbox Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Abelian Int 
Instance details

Defined in Numeric.Additive.Class

Additive Int 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Int -> Int -> Int #

sinnum1p :: Natural -> Int -> Int #

sumWith1 :: Foldable1 f => (a -> Int) -> f a -> Int #

Group Int 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Int -> Int -> Int #

negate :: Int -> Int #

subtract :: Int -> Int -> Int #

times :: Integral n => n -> Int -> Int #

Monoidal Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Int #

sinnum :: Natural -> Int -> Int #

sumWith :: Foldable f => (a -> Int) -> f a -> Int #

Multiplicative Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Int -> Int -> Int #

pow1p :: Int -> Natural -> Int #

productWith1 :: Foldable1 f => (a -> Int) -> f a -> Int #

Semiring Int 
Instance details

Defined in Numeric.Algebra.Class

Commutative Int 
Instance details

Defined in Numeric.Algebra.Commutative

InvolutiveMultiplication Int 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Int -> Int #

InvolutiveSemiring Int 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Int 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Int 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Int #

pow :: Int -> Natural -> Int #

productWith :: Foldable f => (a -> Int) -> f a -> Int #

DecidableAssociates Int 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Int -> Int -> Bool #

DecidableUnits Int 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Int -> Maybe Int #

isUnit :: Int -> Bool #

(^?) :: Integral n => Int -> n -> Maybe Int #

DecidableZero Int 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Int -> Bool #

LocallyFiniteOrder Int 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Int -> Int -> [Int]

rangeSize :: Int -> Int -> Natural

moebiusInversion :: Ring r => Int -> Int -> r

Characteristic Int 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Int -> Natural #

Rig Int 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Int #

Ring Int 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> Int

Prim Int 
Instance details

Defined in Data.Primitive.Types

Lift Int 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int -> Q Exp #

liftTyped :: Int -> Q (TExp Int) #

LeftModule Integer Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int -> Int #

LeftModule Natural Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int -> Int #

RightModule Integer Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int -> Integer -> Int #

RightModule Natural Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int -> Natural -> Int #

Rig r => Quadrance r Int 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Int -> r #

Vector Vector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Int -> m (Vector Int)

basicUnsafeThaw :: PrimMonad m => Vector Int -> m (Mutable Vector (PrimState m) Int)

basicLength :: Vector Int -> Int

basicUnsafeSlice :: Int -> Int -> Vector Int -> Vector Int

basicUnsafeIndexM :: Monad m => Vector Int -> Int -> m Int

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Int -> Vector Int -> m ()

elemseq :: Vector Int -> Int -> b -> b

MVector MVector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Int -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Int -> MVector s Int

basicOverlaps :: MVector s Int -> MVector s Int -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Int)

basicInitialize :: PrimMonad m => MVector (PrimState m) Int -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Int -> m (MVector (PrimState m) Int)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Int -> Int -> m Int

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Int -> Int -> Int -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Int -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Int -> Int -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Int -> MVector (PrimState m) Int -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Int -> MVector (PrimState m) Int -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Int -> Int -> m (MVector (PrimState m) Int)

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 #

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) #

Reifies Z Int 
Instance details

Defined in Data.Reflection

Methods

reflect :: proxy Z -> Int

Reifies n Int => Reifies (D n :: Type) Int 
Instance details

Defined in Data.Reflection

Methods

reflect :: proxy (D n) -> Int

Reifies n Int => Reifies (PD n :: Type) Int 
Instance details

Defined in Data.Reflection

Methods

reflect :: proxy (PD n) -> Int

Reifies n Int => Reifies (SD n :: Type) Int 
Instance details

Defined in Data.Reflection

Methods

reflect :: proxy (SD n) -> Int

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 #

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 #

newtype Vector Int 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int = V_Int (Vector Int)
data URec Int (p :: k)

Used for marking occurrences of Int#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Int (p :: k) = UInt {}
newtype MVector s Int 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int = MV_Int (MVector s Int)
type Rep1 (URec Int :: k -> Type) 
Instance details

Defined in GHC.Generics

type Rep1 (URec Int :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: k -> Type)))
type Rep (URec Int p) 
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 Int32 #

32-bit signed integer type

Instances

Instances details
Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int32 -> Int32 -> Bool #

(/=) :: Int32 -> Int32 -> Bool #

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Data Int32

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int32 -> c Int32 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int32 #

toConstr :: Int32 -> Constr #

dataTypeOf :: Int32 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int32) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int32) #

gmapT :: (forall b. Data b => b -> b) -> Int32 -> Int32 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int32 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int32 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int32 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int32 -> m Int32 #

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int32 -> Int32 -> Ordering #

(<) :: Int32 -> Int32 -> Bool #

(<=) :: Int32 -> Int32 -> Bool #

(>) :: Int32 -> Int32 -> Bool #

(>=) :: Int32 -> Int32 -> Bool #

max :: Int32 -> Int32 -> Int32 #

min :: Int32 -> Int32 -> Int32 #

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int32 -> Rational #

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

Ix Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int32 -> Int #

alignment :: Int32 -> Int #

peekElemOff :: Ptr Int32 -> Int -> IO Int32 #

pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int32 #

pokeByteOff :: Ptr b -> Int -> Int32 -> IO () #

peek :: Ptr Int32 -> IO Int32 #

poke :: Ptr Int32 -> Int32 -> IO () #

Bits Int32

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int32

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int #

Unbox Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Abelian Int32 
Instance details

Defined in Numeric.Additive.Class

Additive Int32 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Int32 -> Int32 -> Int32 #

sinnum1p :: Natural -> Int32 -> Int32 #

sumWith1 :: Foldable1 f => (a -> Int32) -> f a -> Int32 #

Group Int32 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Int32 -> Int32 -> Int32 #

negate :: Int32 -> Int32 #

subtract :: Int32 -> Int32 -> Int32 #

times :: Integral n => n -> Int32 -> Int32 #

Monoidal Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Int32 #

sinnum :: Natural -> Int32 -> Int32 #

sumWith :: Foldable f => (a -> Int32) -> f a -> Int32 #

Multiplicative Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Int32 -> Int32 -> Int32 #

pow1p :: Int32 -> Natural -> Int32 #

productWith1 :: Foldable1 f => (a -> Int32) -> f a -> Int32 #

Semiring Int32 
Instance details

Defined in Numeric.Algebra.Class

Commutative Int32 
Instance details

Defined in Numeric.Algebra.Commutative

InvolutiveMultiplication Int32 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Int32 -> Int32 #

InvolutiveSemiring Int32 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Int32 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Int32 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Int32 #

pow :: Int32 -> Natural -> Int32 #

productWith :: Foldable f => (a -> Int32) -> f a -> Int32 #

DecidableAssociates Int32 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Int32 -> Int32 -> Bool #

DecidableUnits Int32 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Int32 -> Maybe Int32 #

isUnit :: Int32 -> Bool #

(^?) :: Integral n => Int32 -> n -> Maybe Int32 #

DecidableZero Int32 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Int32 -> Bool #

LocallyFiniteOrder Int32 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Int32 -> Int32 -> [Int32]

rangeSize :: Int32 -> Int32 -> Natural

moebiusInversion :: Ring r => Int32 -> Int32 -> r

Characteristic Int32 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Int32 -> Natural #

Rig Int32 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Int32 #

Ring Int32 
Instance details

Defined in Numeric.Ring.Class

Prim Int32 
Instance details

Defined in Data.Primitive.Types

Lift Int32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int32 -> Q Exp #

liftTyped :: Int32 -> Q (TExp Int32) #

LeftModule Integer Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int32 -> Int32 #

LeftModule Natural Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int32 -> Int32 #

RightModule Integer Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int32 -> Integer -> Int32 #

RightModule Natural Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int32 -> Natural -> Int32 #

Rig r => Quadrance r Int32 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Int32 -> r #

Vector Vector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Int32 -> m (Vector Int32)

basicUnsafeThaw :: PrimMonad m => Vector Int32 -> m (Mutable Vector (PrimState m) Int32)

basicLength :: Vector Int32 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Int32 -> Vector Int32

basicUnsafeIndexM :: Monad m => Vector Int32 -> Int -> m Int32

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Int32 -> Vector Int32 -> m ()

elemseq :: Vector Int32 -> Int32 -> b -> b

MVector MVector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Int32 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Int32 -> MVector s Int32

basicOverlaps :: MVector s Int32 -> MVector s Int32 -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Int32)

basicInitialize :: PrimMonad m => MVector (PrimState m) Int32 -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Int32 -> m (MVector (PrimState m) Int32)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Int32 -> Int -> m Int32

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Int32 -> Int -> Int32 -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Int32 -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Int32 -> Int32 -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Int32 -> MVector (PrimState m) Int32 -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Int32 -> MVector (PrimState m) Int32 -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Int32 -> Int -> m (MVector (PrimState m) Int32)

newtype Vector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int32 = V_Int32 (Vector Int32)
newtype MVector s Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int32 = MV_Int32 (MVector s Int32)

data Int64 #

64-bit signed integer type

Instances

Instances details
Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int64 -> Int64 -> Bool #

(/=) :: Int64 -> Int64 -> Bool #

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Data Int64

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Int64 -> c Int64 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Int64 #

toConstr :: Int64 -> Constr #

dataTypeOf :: Int64 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Int64) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Int64) #

gmapT :: (forall b. Data b => b -> b) -> Int64 -> Int64 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Int64 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Int64 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Int64 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Int64 -> m Int64 #

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int64 -> Int64 -> Ordering #

(<) :: Int64 -> Int64 -> Bool #

(<=) :: Int64 -> Int64 -> Bool #

(>) :: Int64 -> Int64 -> Bool #

(>=) :: Int64 -> Int64 -> Bool #

max :: Int64 -> Int64 -> Int64 #

min :: Int64 -> Int64 -> Int64 #

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int64 -> Rational #

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

Ix Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int64 -> Int #

alignment :: Int64 -> Int #

peekElemOff :: Ptr Int64 -> Int -> IO Int64 #

pokeElemOff :: Ptr Int64 -> Int -> Int64 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int64 #

pokeByteOff :: Ptr b -> Int -> Int64 -> IO () #

peek :: Ptr Int64 -> IO Int64 #

poke :: Ptr Int64 -> Int64 -> IO () #

Bits Int64

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int64

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int #

hash :: Int64 -> Int #

Unbox Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Abelian Int64 
Instance details

Defined in Numeric.Additive.Class

Additive Int64 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Int64 -> Int64 -> Int64 #

sinnum1p :: Natural -> Int64 -> Int64 #

sumWith1 :: Foldable1 f => (a -> Int64) -> f a -> Int64 #

Group Int64 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Int64 -> Int64 -> Int64 #

negate :: Int64 -> Int64 #

subtract :: Int64 -> Int64 -> Int64 #

times :: Integral n => n -> Int64 -> Int64 #

Monoidal Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Int64 #

sinnum :: Natural -> Int64 -> Int64 #

sumWith :: Foldable f => (a -> Int64) -> f a -> Int64 #

Multiplicative Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Int64 -> Int64 -> Int64 #

pow1p :: Int64 -> Natural -> Int64 #

productWith1 :: Foldable1 f => (a -> Int64) -> f a -> Int64 #

Semiring Int64 
Instance details

Defined in Numeric.Algebra.Class

Commutative Int64 
Instance details

Defined in Numeric.Algebra.Commutative

InvolutiveMultiplication Int64 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Int64 -> Int64 #

InvolutiveSemiring Int64 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Int64 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Int64 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Int64 #

pow :: Int64 -> Natural -> Int64 #

productWith :: Foldable f => (a -> Int64) -> f a -> Int64 #

DecidableAssociates Int64 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Int64 -> Int64 -> Bool #

DecidableUnits Int64 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Int64 -> Maybe Int64 #

isUnit :: Int64 -> Bool #

(^?) :: Integral n => Int64 -> n -> Maybe Int64 #

DecidableZero Int64 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Int64 -> Bool #

LocallyFiniteOrder Int64 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Int64 -> Int64 -> [Int64]

rangeSize :: Int64 -> Int64 -> Natural

moebiusInversion :: Ring r => Int64 -> Int64 -> r

Characteristic Int64 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Int64 -> Natural #

Rig Int64 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Int64 #

Ring Int64 
Instance details

Defined in Numeric.Ring.Class

Prim Int64 
Instance details

Defined in Data.Primitive.Types

Lift Int64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int64 -> Q Exp #

liftTyped :: Int64 -> Q (TExp Int64) #

LeftModule Integer Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int64 -> Int64 #

LeftModule Natural Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int64 -> Int64 #

RightModule Integer Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int64 -> Integer -> Int64 #

RightModule Natural Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int64 -> Natural -> Int64 #

Rig r => Quadrance r Int64 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Int64 -> r #

Vector Vector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Int64 -> m (Vector Int64)

basicUnsafeThaw :: PrimMonad m => Vector Int64 -> m (Mutable Vector (PrimState m) Int64)

basicLength :: Vector Int64 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Int64 -> Vector Int64

basicUnsafeIndexM :: Monad m => Vector Int64 -> Int -> m Int64

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Int64 -> Vector Int64 -> m ()

elemseq :: Vector Int64 -> Int64 -> b -> b

MVector MVector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Int64 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Int64 -> MVector s Int64

basicOverlaps :: MVector s Int64 -> MVector s Int64 -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Int64)

basicInitialize :: PrimMonad m => MVector (PrimState m) Int64 -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Int64 -> m (MVector (PrimState m) Int64)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Int64 -> Int -> m Int64

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Int64 -> Int -> Int64 -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Int64 -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Int64 -> Int64 -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Int64 -> MVector (PrimState m) Int64 -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Int64 -> MVector (PrimState m) Int64 -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Int64 -> Int -> m (MVector (PrimState m) Int64)

newtype Vector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Int64 = V_Int64 (Vector Int64)
newtype MVector s Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int64 = MV_Int64 (MVector s Int64)

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

Data Integer

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Integer -> c Integer #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Integer #

toConstr :: Integer -> Constr #

dataTypeOf :: Integer -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Integer) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Integer) #

gmapT :: (forall b. Data b => b -> b) -> Integer -> Integer #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Integer -> r #

gmapQ :: (forall d. Data d => d -> u) -> Integer -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Integer -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Integer -> m Integer #

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Ord Integer 
Instance details

Defined in GHC.Integer.Type

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Integer

Since: base-2.1

Instance details

Defined in GHC.Ix

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int #

hash :: Integer -> Int #

Abelian Integer 
Instance details

Defined in Numeric.Additive.Class

Additive Integer 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Integer -> Integer -> Integer #

sinnum1p :: Natural -> Integer -> Integer #

sumWith1 :: Foldable1 f => (a -> Integer) -> f a -> Integer #

Group Integer 
Instance details

Defined in Numeric.Additive.Group

Monoidal Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Integer #

sinnum :: Natural -> Integer -> Integer #

sumWith :: Foldable f => (a -> Integer) -> f a -> Integer #

Multiplicative Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Integer -> Integer -> Integer #

pow1p :: Integer -> Natural -> Integer #

productWith1 :: Foldable1 f => (a -> Integer) -> f a -> Integer #

Semiring Integer 
Instance details

Defined in Numeric.Algebra.Class

Commutative Integer 
Instance details

Defined in Numeric.Algebra.Commutative

InvolutiveMultiplication Integer 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Integer -> Integer #

InvolutiveSemiring Integer 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Integer 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Integer 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Integer #

pow :: Integer -> Natural -> Integer #

productWith :: Foldable f => (a -> Integer) -> f a -> Integer #

DecidableAssociates Integer 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Integer -> Integer -> Bool #

DecidableUnits Integer 
Instance details

Defined in Numeric.Decidable.Units

DecidableZero Integer 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Integer -> Bool #

AdditiveOrder Integer 
Instance details

Defined in Numeric.Order.Additive

LocallyFiniteOrder Integer 
Instance details

Defined in Numeric.Order.LocallyFinite

Characteristic Integer 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Integer -> Natural #

Rig Integer 
Instance details

Defined in Numeric.Rig.Class

OrderedRig Integer 
Instance details

Defined in Numeric.Rig.Ordered

Ring Integer 
Instance details

Defined in Numeric.Ring.Class

UnitNormalForm Integer 
Instance details

Defined in Numeric.Algebra.Unital.UnitNormalForm

ZeroProductSemiring Integer 
Instance details

Defined in Numeric.Semiring.ZeroProduct

Euclidean Integer 
Instance details

Defined in Numeric.Domain.Internal

IntegralDomain Integer 
Instance details

Defined in Numeric.Domain.Internal

GCDDomain Integer 
Instance details

Defined in Numeric.Domain.Internal

PID Integer 
Instance details

Defined in Numeric.Domain.Internal

UFD Integer 
Instance details

Defined in Numeric.Domain.Internal

Lift Integer 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Integer -> Q Exp #

liftTyped :: Integer -> Q (TExp Integer) #

LeftModule Integer Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int -> Int #

LeftModule Integer Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int8 -> Int8 #

LeftModule Integer Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int16 -> Int16 #

LeftModule Integer Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int32 -> Int32 #

LeftModule Integer Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int64 -> Int64 #

LeftModule Integer Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Integer -> Integer #

LeftModule Integer Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word -> Word #

LeftModule Integer Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word8 -> Word8 #

LeftModule Integer Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word16 -> Word16 #

LeftModule Integer Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word32 -> Word32 #

LeftModule Integer Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word64 -> Word64 #

LeftModule Natural Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Integer -> Integer #

RightModule Integer Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int -> Integer -> Int #

RightModule Integer Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int8 -> Integer -> Int8 #

RightModule Integer Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int16 -> Integer -> Int16 #

RightModule Integer Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int32 -> Integer -> Int32 #

RightModule Integer Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int64 -> Integer -> Int64 #

RightModule Integer Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Integer -> Integer -> Integer #

RightModule Integer Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word -> Integer -> Word #

RightModule Integer Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word8 -> Integer -> Word8 #

RightModule Integer Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word16 -> Integer -> Word16 #

RightModule Integer Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word32 -> Integer -> Word32 #

RightModule Integer Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word64 -> Integer -> Word64 #

RightModule Natural Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Integer -> Natural -> Integer #

Rig r => Quadrance r Integer 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Integer -> r #

KnownNat n => Reifies (n :: Nat) Integer 
Instance details

Defined in Data.Reflection

Methods

reflect :: proxy n -> Integer

GCDDomain d => LeftModule Integer (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(.*) :: Integer -> Fraction d -> Fraction d #

LeftModule Integer a => LeftModule Integer (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> Add a -> Add a #

LeftModule Integer a => LeftModule Integer (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> WrapAlgebra a -> WrapAlgebra a #

Num a => LeftModule Integer (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> WrapIntegral a -> WrapIntegral a #

Num a => LeftModule Integer (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => LeftModule Integer (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> WrapNum a -> WrapNum a #

GCDDomain d => RightModule Integer (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(*.) :: Fraction d -> Integer -> Fraction d #

RightModule Integer a => RightModule Integer (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: Add a -> Integer -> Add a #

RightModule Integer a => RightModule Integer (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapAlgebra a -> Integer -> WrapAlgebra a #

Num a => RightModule Integer (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapIntegral a -> Integer -> WrapIntegral a #

Num a => RightModule Integer (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => RightModule Integer (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapNum a -> Integer -> WrapNum a #

data Natural #

Type representing arbitrary-precision non-negative integers.

>>> 2^100 :: Natural
1267650600228229401496703205376

Operations whose result would be negative throw (Underflow :: ArithException),

>>> -1 :: Natural
*** Exception: arithmetic underflow

Since: base-4.8.0.0

Instances

Instances details
Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Eq Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Methods

(==) :: Natural -> Natural -> Bool #

(/=) :: Natural -> Natural -> Bool #

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Data Natural

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural #

toConstr :: Natural -> Constr #

dataTypeOf :: Natural -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Natural) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) #

gmapT :: (forall b. Data b => b -> b) -> Natural -> Natural #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r #

gmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural #

Num Natural

Note that Natural's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Ord Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Natural

Read Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Real Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Show Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

Ix Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Ix

Hashable Natural 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Natural -> Int #

hash :: Natural -> Int #

Abelian Natural 
Instance details

Defined in Numeric.Additive.Class

Additive Natural 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Natural -> Natural -> Natural #

sinnum1p :: Natural -> Natural -> Natural #

sumWith1 :: Foldable1 f => (a -> Natural) -> f a -> Natural #

Partitionable Natural 
Instance details

Defined in Numeric.Additive.Class

Methods

partitionWith :: (Natural -> Natural -> r) -> Natural -> NonEmpty r #

Monoidal Natural 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Natural #

sinnum :: Natural -> Natural -> Natural #

sumWith :: Foldable f => (a -> Natural) -> f a -> Natural #

Multiplicative Natural 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Natural -> Natural -> Natural #

pow1p :: Natural -> Natural -> Natural #

productWith1 :: Foldable1 f => (a -> Natural) -> f a -> Natural #

Semiring Natural 
Instance details

Defined in Numeric.Algebra.Class

Commutative Natural 
Instance details

Defined in Numeric.Algebra.Commutative

InvolutiveMultiplication Natural 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Natural -> Natural #

InvolutiveSemiring Natural 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Natural 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Natural 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Natural #

pow :: Natural -> Natural -> Natural #

productWith :: Foldable f => (a -> Natural) -> f a -> Natural #

DecidableAssociates Natural 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Natural -> Natural -> Bool #

DecidableUnits Natural 
Instance details

Defined in Numeric.Decidable.Units

DecidableZero Natural 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Natural -> Bool #

AdditiveOrder Natural 
Instance details

Defined in Numeric.Order.Additive

LocallyFiniteOrder Natural 
Instance details

Defined in Numeric.Order.LocallyFinite

Characteristic Natural 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Natural -> Natural #

Rig Natural 
Instance details

Defined in Numeric.Rig.Class

OrderedRig Natural 
Instance details

Defined in Numeric.Rig.Ordered

ZeroProductSemiring Natural 
Instance details

Defined in Numeric.Semiring.ZeroProduct

Lift Natural 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Natural -> Q Exp #

liftTyped :: Natural -> Q (TExp Natural) #

LeftModule Natural Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Bool -> Bool #

LeftModule Natural Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int -> Int #

LeftModule Natural Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int8 -> Int8 #

LeftModule Natural Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int16 -> Int16 #

LeftModule Natural Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int32 -> Int32 #

LeftModule Natural Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int64 -> Int64 #

LeftModule Natural Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Integer -> Integer #

LeftModule Natural Natural 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Natural -> Natural #

LeftModule Natural Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word -> Word #

LeftModule Natural Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word8 -> Word8 #

LeftModule Natural Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word16 -> Word16 #

LeftModule Natural Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word32 -> Word32 #

LeftModule Natural Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word64 -> Word64 #

RightModule Natural Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Bool -> Natural -> Bool #

RightModule Natural Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int -> Natural -> Int #

RightModule Natural Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int8 -> Natural -> Int8 #

RightModule Natural Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int16 -> Natural -> Int16 #

RightModule Natural Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int32 -> Natural -> Int32 #

RightModule Natural Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int64 -> Natural -> Int64 #

RightModule Natural Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Integer -> Natural -> Integer #

RightModule Natural Natural 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Natural -> Natural -> Natural #

RightModule Natural Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word -> Natural -> Word #

RightModule Natural Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word8 -> Natural -> Word8 #

RightModule Natural Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word16 -> Natural -> Word16 #

RightModule Natural Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word32 -> Natural -> Word32 #

RightModule Natural Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word64 -> Natural -> Word64 #

Rig r => Quadrance r Natural 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Natural -> r #

GCDDomain d => LeftModule Natural (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(.*) :: Natural -> Fraction d -> Fraction d #

LeftModule Natural a => LeftModule Natural (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> Add a -> Add a #

LeftModule Natural a => LeftModule Natural (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> WrapAlgebra a -> WrapAlgebra a #

Num a => LeftModule Natural (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> WrapIntegral a -> WrapIntegral a #

Num a => LeftModule Natural (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => LeftModule Natural (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> WrapNum a -> WrapNum a #

GCDDomain d => RightModule Natural (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(*.) :: Fraction d -> Natural -> Fraction d #

RightModule Natural a => RightModule Natural (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: Add a -> Natural -> Add a #

RightModule Natural a => RightModule Natural (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapAlgebra a -> Natural -> WrapAlgebra a #

Num a => RightModule Natural (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapIntegral a -> Natural -> WrapIntegral a #

Num a => RightModule Natural (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => RightModule Natural (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapNum a -> Natural -> WrapNum a #

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 #

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) #

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 #

Hashable1 Maybe 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Maybe a -> Int

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)) #

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 #

Data a => Data (Maybe a)

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) #

toConstr :: Maybe a -> Constr #

dataTypeOf :: Maybe a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Maybe a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Maybe a)) #

gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

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 #

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int #

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)

At (Maybe a) 
Instance details

Defined in Control.Lens.At

Methods

at :: Index (Maybe a) -> Lens' (Maybe a) (Maybe (IxValue (Maybe a)))

Ixed (Maybe a) 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index (Maybe a) -> Traversal' (Maybe a) (IxValue (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

SingI a2 => SingI ('Just a2 :: Maybe a1)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing ('Just a2)

type Rep (Maybe a) 
Instance details

Defined in GHC.Generics

type 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 Index (Maybe a) 
Instance details

Defined in Control.Lens.At

type Index (Maybe a) = ()
type IxValue (Maybe a) 
Instance details

Defined in Control.Lens.At

type IxValue (Maybe a) = a
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))

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

Data Ordering

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ordering -> c Ordering #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ordering #

toConstr :: Ordering -> Constr #

dataTypeOf :: Ordering -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Ordering) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ordering) #

gmapT :: (forall b. Data b => b -> b) -> Ordering -> Ordering #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ordering -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ordering -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ordering -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ordering -> m Ordering #

Ord Ordering 
Instance details

Defined in GHC.Classes

Read Ordering

Since: base-2.1

Instance details

Defined in GHC.Read

Show Ordering

Since: base-2.1

Instance details

Defined in GHC.Show

Ix Ordering

Since: base-2.1

Instance details

Defined in GHC.Ix

Generic Ordering

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

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

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ordering -> Int #

hash :: Ordering -> Int #

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)))

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 #

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 #

Quasi IO 
Instance details

Defined in Language.Haskell.TH.Syntax

PrimMonad IO 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState IO

Methods

primitive :: (State# (PrimState IO) -> (# State# (PrimState IO), a #)) -> IO a

PrimBase IO 
Instance details

Defined in Control.Monad.Primitive

Methods

internal :: IO a -> State# (PrimState IO) -> (# State# (PrimState 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 #

type PrimState IO 
Instance details

Defined in Control.Monad.Primitive

type PrimState IO = RealWorld

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 #

Data Word

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word #

toConstr :: Word -> Constr #

dataTypeOf :: Word -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word) #

gmapT :: (forall b. Data b => b -> b) -> Word -> Word #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word #

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 #

Ix Word

Since: base-4.6.0.0

Instance details

Defined in GHC.Ix

Methods

range :: (Word, Word) -> [Word] #

index :: (Word, Word) -> Word -> Int #

unsafeIndex :: (Word, Word) -> Word -> Int #

inRange :: (Word, Word) -> Word -> Bool #

rangeSize :: (Word, Word) -> Int #

unsafeRangeSize :: (Word, Word) -> Int #

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word -> Int #

alignment :: Word -> Int #

peekElemOff :: Ptr Word -> Int -> IO Word #

pokeElemOff :: Ptr Word -> Int -> Word -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word #

pokeByteOff :: Ptr b -> Int -> Word -> IO () #

peek :: Ptr Word -> IO Word #

poke :: Ptr Word -> Word -> IO () #

Hashable Word 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word -> Int #

hash :: Word -> Int #

Unbox Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Abelian Word 
Instance details

Defined in Numeric.Additive.Class

Additive Word 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Word -> Word -> Word #

sinnum1p :: Natural -> Word -> Word #

sumWith1 :: Foldable1 f => (a -> Word) -> f a -> Word #

Group Word 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Word -> Word -> Word #

negate :: Word -> Word #

subtract :: Word -> Word -> Word #

times :: Integral n => n -> Word -> Word #

Monoidal Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Word #

sinnum :: Natural -> Word -> Word #

sumWith :: Foldable f => (a -> Word) -> f a -> Word #

Multiplicative Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Word -> Word -> Word #

pow1p :: Word -> Natural -> Word #

productWith1 :: Foldable1 f => (a -> Word) -> f a -> Word #

Semiring Word 
Instance details

Defined in Numeric.Algebra.Class

Commutative Word 
Instance details

Defined in Numeric.Algebra.Commutative

InvolutiveMultiplication Word 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Word -> Word #

InvolutiveSemiring Word 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Word 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Word 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Word #

pow :: Word -> Natural -> Word #

productWith :: Foldable f => (a -> Word) -> f a -> Word #

DecidableAssociates Word 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Word -> Word -> Bool #

DecidableUnits Word 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Word -> Maybe Word #

isUnit :: Word -> Bool #

(^?) :: Integral n => Word -> n -> Maybe Word #

DecidableZero Word 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Word -> Bool #

LocallyFiniteOrder Word 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Word -> Word -> [Word]

rangeSize :: Word -> Word -> Natural

moebiusInversion :: Ring r => Word -> Word -> r

Characteristic Word 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Word -> Natural #

Rig Word 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Word #

Ring Word 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> Word

Prim Word 
Instance details

Defined in Data.Primitive.Types

Lift Word 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word -> Q Exp #

liftTyped :: Word -> Q (TExp Word) #

LeftModule Integer Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word -> Word #

LeftModule Natural Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word -> Word #

RightModule Integer Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word -> Integer -> Word #

RightModule Natural Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word -> Natural -> Word #

Rig r => Quadrance r Word 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Word -> r #

Vector Vector Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Word -> m (Vector Word)

basicUnsafeThaw :: PrimMonad m => Vector Word -> m (Mutable Vector (PrimState m) Word)

basicLength :: Vector Word -> Int

basicUnsafeSlice :: Int -> Int -> Vector Word -> Vector Word

basicUnsafeIndexM :: Monad m => Vector Word -> Int -> m Word

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Word -> Vector Word -> m ()

elemseq :: Vector Word -> Word -> b -> b

MVector MVector Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Word -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Word -> MVector s Word

basicOverlaps :: MVector s Word -> MVector s Word -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Word)

basicInitialize :: PrimMonad m => MVector (PrimState m) Word -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Word -> m (MVector (PrimState m) Word)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Word -> Int -> m Word

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Word -> Int -> Word -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Word -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Word -> Word -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Word -> MVector (PrimState m) Word -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Word -> MVector (PrimState m) Word -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Word -> Int -> m (MVector (PrimState m) Word)

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 #

newtype Vector Word 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Word = V_Word (Vector Word)
data URec Word (p :: k)

Used for marking occurrences of Word#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Word (p :: k) = UWord {}
newtype MVector s Word 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word = MV_Word (MVector s Word)
type Rep1 (URec Word :: k -> Type) 
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 Word8 #

8-bit unsigned integer type

Instances

Instances details
Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word8 -> Word8 -> Bool #

(/=) :: Word8 -> Word8 -> Bool #

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Data Word8

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word8 -> c Word8 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word8 #

toConstr :: Word8 -> Constr #

dataTypeOf :: Word8 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word8) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word8) #

gmapT :: (forall b. Data b => b -> b) -> Word8 -> Word8 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word8 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word8 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word8 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word8 -> m Word8 #

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

compare :: Word8 -> Word8 -> Ordering #

(<) :: Word8 -> Word8 -> Bool #

(<=) :: Word8 -> Word8 -> Bool #

(>) :: Word8 -> Word8 -> Bool #

(>=) :: Word8 -> Word8 -> Bool #

max :: Word8 -> Word8 -> Word8 #

min :: Word8 -> Word8 -> Word8 #

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

toRational :: Word8 -> Rational #

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

Ix Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Storable Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word8 -> Int #

alignment :: Word8 -> Int #

peekElemOff :: Ptr Word8 -> Int -> IO Word8 #

pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word8 #

pokeByteOff :: Ptr b -> Int -> Word8 -> IO () #

peek :: Ptr Word8 -> IO Word8 #

poke :: Ptr Word8 -> Word8 -> IO () #

Bits Word8

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word8

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int #

hash :: Word8 -> Int #

Unbox Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Abelian Word8 
Instance details

Defined in Numeric.Additive.Class

Additive Word8 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Word8 -> Word8 -> Word8 #

sinnum1p :: Natural -> Word8 -> Word8 #

sumWith1 :: Foldable1 f => (a -> Word8) -> f a -> Word8 #

Group Word8 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Word8 -> Word8 -> Word8 #

negate :: Word8 -> Word8 #

subtract :: Word8 -> Word8 -> Word8 #

times :: Integral n => n -> Word8 -> Word8 #

Monoidal Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Word8 #

sinnum :: Natural -> Word8 -> Word8 #

sumWith :: Foldable f => (a -> Word8) -> f a -> Word8 #

Multiplicative Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Word8 -> Word8 -> Word8 #

pow1p :: Word8 -> Natural -> Word8 #

productWith1 :: Foldable1 f => (a -> Word8) -> f a -> Word8 #

Semiring Word8 
Instance details

Defined in Numeric.Algebra.Class

Commutative Word8 
Instance details

Defined in Numeric.Algebra.Commutative

InvolutiveMultiplication Word8 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Word8 -> Word8 #

InvolutiveSemiring Word8 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Word8 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Word8 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Word8 #

pow :: Word8 -> Natural -> Word8 #

productWith :: Foldable f => (a -> Word8) -> f a -> Word8 #

DecidableAssociates Word8 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Word8 -> Word8 -> Bool #

DecidableUnits Word8 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Word8 -> Maybe Word8 #

isUnit :: Word8 -> Bool #

(^?) :: Integral n => Word8 -> n -> Maybe Word8 #

DecidableZero Word8 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Word8 -> Bool #

LocallyFiniteOrder Word8 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Word8 -> Word8 -> [Word8]

rangeSize :: Word8 -> Word8 -> Natural

moebiusInversion :: Ring r => Word8 -> Word8 -> r

Characteristic Word8 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Word8 -> Natural #

Rig Word8 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Word8 #

Ring Word8 
Instance details

Defined in Numeric.Ring.Class

Prim Word8 
Instance details

Defined in Data.Primitive.Types

Lift Word8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word8 -> Q Exp #

liftTyped :: Word8 -> Q (TExp Word8) #

LeftModule Integer Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word8 -> Word8 #

LeftModule Natural Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word8 -> Word8 #

RightModule Integer Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word8 -> Integer -> Word8 #

RightModule Natural Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word8 -> Natural -> Word8 #

Rig r => Quadrance r Word8 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Word8 -> r #

Vector Vector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Word8 -> m (Vector Word8)

basicUnsafeThaw :: PrimMonad m => Vector Word8 -> m (Mutable Vector (PrimState m) Word8)

basicLength :: Vector Word8 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Word8 -> Vector Word8

basicUnsafeIndexM :: Monad m => Vector Word8 -> Int -> m Word8

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Word8 -> Vector Word8 -> m ()

elemseq :: Vector Word8 -> Word8 -> b -> b

MVector MVector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Word8 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Word8 -> MVector s Word8

basicOverlaps :: MVector s Word8 -> MVector s Word8 -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Word8)

basicInitialize :: PrimMonad m => MVector (PrimState m) Word8 -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Word8 -> m (MVector (PrimState m) Word8)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Word8 -> Int -> m Word8

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Word8 -> Int -> Word8 -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Word8 -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Word8 -> Word8 -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Word8 -> MVector (PrimState m) Word8 -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Word8 -> MVector (PrimState m) Word8 -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Word8 -> Int -> m (MVector (PrimState m) Word8)

newtype Vector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Word8 = V_Word8 (Vector Word8)
newtype MVector s Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word8 = MV_Word8 (MVector s Word8)

data Word32 #

32-bit unsigned integer type

Instances

Instances details
Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word32 -> Word32 -> Bool #

(/=) :: Word32 -> Word32 -> Bool #

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Data Word32

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word32 -> c Word32 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word32 #

toConstr :: Word32 -> Constr #

dataTypeOf :: Word32 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word32) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word32) #

gmapT :: (forall b. Data b => b -> b) -> Word32 -> Word32 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word32 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word32 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word32 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word32 -> m Word32 #

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Storable Word32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word32

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word32

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int #

hash :: Word32 -> Int #

Unbox Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Abelian Word32 
Instance details

Defined in Numeric.Additive.Class

Additive Word32 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Word32 -> Word32 -> Word32 #

sinnum1p :: Natural -> Word32 -> Word32 #

sumWith1 :: Foldable1 f => (a -> Word32) -> f a -> Word32 #

Group Word32 
Instance details

Defined in Numeric.Additive.Group

Monoidal Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Word32 #

sinnum :: Natural -> Word32 -> Word32 #

sumWith :: Foldable f => (a -> Word32) -> f a -> Word32 #

Multiplicative Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Word32 -> Word32 -> Word32 #

pow1p :: Word32 -> Natural -> Word32 #

productWith1 :: Foldable1 f => (a -> Word32) -> f a -> Word32 #

Semiring Word32 
Instance details

Defined in Numeric.Algebra.Class

Commutative Word32 
Instance details

Defined in Numeric.Algebra.Commutative

InvolutiveMultiplication Word32 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Word32 -> Word32 #

InvolutiveSemiring Word32 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Word32 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Word32 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Word32 #

pow :: Word32 -> Natural -> Word32 #

productWith :: Foldable f => (a -> Word32) -> f a -> Word32 #

DecidableAssociates Word32 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Word32 -> Word32 -> Bool #

DecidableUnits Word32 
Instance details

Defined in Numeric.Decidable.Units

DecidableZero Word32 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Word32 -> Bool #

LocallyFiniteOrder Word32 
Instance details

Defined in Numeric.Order.LocallyFinite

Characteristic Word32 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Word32 -> Natural #

Rig Word32 
Instance details

Defined in Numeric.Rig.Class

Ring Word32 
Instance details

Defined in Numeric.Ring.Class

Prim Word32 
Instance details

Defined in Data.Primitive.Types

Lift Word32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word32 -> Q Exp #

liftTyped :: Word32 -> Q (TExp Word32) #

LeftModule Integer Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word32 -> Word32 #

LeftModule Natural Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word32 -> Word32 #

RightModule Integer Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word32 -> Integer -> Word32 #

RightModule Natural Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word32 -> Natural -> Word32 #

Rig r => Quadrance r Word32 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Word32 -> r #

Vector Vector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Word32 -> m (Vector Word32)

basicUnsafeThaw :: PrimMonad m => Vector Word32 -> m (Mutable Vector (PrimState m) Word32)

basicLength :: Vector Word32 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Word32 -> Vector Word32

basicUnsafeIndexM :: Monad m => Vector Word32 -> Int -> m Word32

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Word32 -> Vector Word32 -> m ()

elemseq :: Vector Word32 -> Word32 -> b -> b

MVector MVector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Word32 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Word32 -> MVector s Word32

basicOverlaps :: MVector s Word32 -> MVector s Word32 -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Word32)

basicInitialize :: PrimMonad m => MVector (PrimState m) Word32 -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Word32 -> m (MVector (PrimState m) Word32)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Word32 -> Int -> m Word32

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Word32 -> Int -> Word32 -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Word32 -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Word32 -> Word32 -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Word32 -> MVector (PrimState m) Word32 -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Word32 -> MVector (PrimState m) Word32 -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Word32 -> Int -> m (MVector (PrimState m) Word32)

newtype Vector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Word32 = V_Word32 (Vector Word32)
newtype MVector s Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word32 = MV_Word32 (MVector s Word32)

data Word64 #

64-bit unsigned integer type

Instances

Instances details
Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word64 -> Word64 -> Bool #

(/=) :: Word64 -> Word64 -> Bool #

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Data Word64

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word64 -> c Word64 #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word64 #

toConstr :: Word64 -> Constr #

dataTypeOf :: Word64 -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word64) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word64) #

gmapT :: (forall b. Data b => b -> b) -> Word64 -> Word64 #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word64 -> r #

gmapQ :: (forall d. Data d => d -> u) -> Word64 -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Word64 -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word64 -> m Word64 #

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Storable Word64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word64

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word64

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int #

hash :: Word64 -> Int #

Unbox Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Abelian Word64 
Instance details

Defined in Numeric.Additive.Class

Additive Word64 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Word64 -> Word64 -> Word64 #

sinnum1p :: Natural -> Word64 -> Word64 #

sumWith1 :: Foldable1 f => (a -> Word64) -> f a -> Word64 #

Group Word64 
Instance details

Defined in Numeric.Additive.Group

Monoidal Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Word64 #

sinnum :: Natural -> Word64 -> Word64 #

sumWith :: Foldable f => (a -> Word64) -> f a -> Word64 #

Multiplicative Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Word64 -> Word64 -> Word64 #

pow1p :: Word64 -> Natural -> Word64 #

productWith1 :: Foldable1 f => (a -> Word64) -> f a -> Word64 #

Semiring Word64 
Instance details

Defined in Numeric.Algebra.Class

Commutative Word64 
Instance details

Defined in Numeric.Algebra.Commutative

InvolutiveMultiplication Word64 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Word64 -> Word64 #

InvolutiveSemiring Word64 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Word64 
Instance details

Defined in Numeric.Algebra.Involutive

Unital Word64 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Word64 #

pow :: Word64 -> Natural -> Word64 #

productWith :: Foldable f => (a -> Word64) -> f a -> Word64 #

DecidableAssociates Word64 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Word64 -> Word64 -> Bool #

DecidableUnits Word64 
Instance details

Defined in Numeric.Decidable.Units

DecidableZero Word64 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Word64 -> Bool #

LocallyFiniteOrder Word64 
Instance details

Defined in Numeric.Order.LocallyFinite

Characteristic Word64 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Word64 -> Natural #

Rig Word64 
Instance details

Defined in Numeric.Rig.Class

Ring Word64 
Instance details

Defined in Numeric.Ring.Class

Prim Word64 
Instance details

Defined in Data.Primitive.Types

Lift Word64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word64 -> Q Exp #

liftTyped :: Word64 -> Q (TExp Word64) #

LeftModule Integer Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word64 -> Word64 #

LeftModule Natural Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word64 -> Word64 #

RightModule Integer Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word64 -> Integer -> Word64 #

RightModule Natural Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word64 -> Natural -> Word64 #

Rig r => Quadrance r Word64 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Word64 -> r #

Vector Vector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Word64 -> m (Vector Word64)

basicUnsafeThaw :: PrimMonad m => Vector Word64 -> m (Mutable Vector (PrimState m) Word64)

basicLength :: Vector Word64 -> Int

basicUnsafeSlice :: Int -> Int -> Vector Word64 -> Vector Word64

basicUnsafeIndexM :: Monad m => Vector Word64 -> Int -> m Word64

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Word64 -> Vector Word64 -> m ()

elemseq :: Vector Word64 -> Word64 -> b -> b

MVector MVector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s Word64 -> Int

basicUnsafeSlice :: Int -> Int -> MVector s Word64 -> MVector s Word64

basicOverlaps :: MVector s Word64 -> MVector s Word64 -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Word64)

basicInitialize :: PrimMonad m => MVector (PrimState m) Word64 -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Word64 -> m (MVector (PrimState m) Word64)

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Word64 -> Int -> m Word64

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Word64 -> Int -> Word64 -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) Word64 -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) Word64 -> Word64 -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Word64 -> MVector (PrimState m) Word64 -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Word64 -> MVector (PrimState m) Word64 -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Word64 -> Int -> m (MVector (PrimState m) Word64)

newtype Vector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector Word64 = V_Word64 (Vector Word64)
newtype MVector s Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Word64 = MV_Word64 (MVector s Word64)

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
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 #

Bifoldable1 Either 
Instance details

Defined in Data.Semigroup.Foldable.Class

Methods

bifold1 :: Semigroup m => Either m m -> m

bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> Either a b -> m

Hashable2 Either 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Either a b -> Int

Swapped Either 
Instance details

Defined in Control.Lens.Iso

Methods

swapped :: Iso (Either a b) (Either c d) (Either b a) (Either d c)

(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 (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 #

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) #

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 #

Hashable a => Hashable1 (Either a) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Either a a0 -> Int

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 #

(Data a, Data b) => Data (Either a b)

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Either a b -> c (Either a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Either a b) #

toConstr :: Either a b -> Constr #

dataTypeOf :: Either a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Either a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Either a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Either a b -> Either a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Either a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Either a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Either a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Either a b -> m (Either a b) #

(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 #

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int #

type Rep1 (Either a :: Type -> Type) 
Instance details

Defined in GHC.Generics

type Rep (Either a b) 
Instance details

Defined in GHC.Generics

class Monad m => MonadIO (m :: Type -> Type) where #

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a #

Lift a computation from the IO monad.

Instances

Instances details
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a #

(Error e, MonadIO m) => MonadIO (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftIO :: IO a -> ErrorT e m a #

(Functor f, MonadIO m) => MonadIO (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftIO :: IO a -> FreeT f m a #

mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a #

Direct MonadPlus equivalent of filter.

Examples

Expand

The filter function is just mfilter specialized to the list monad:

filter = ( mfilter :: (a -> Bool) -> [a] -> [a] )

An example using mfilter with the Maybe monad:

>>> mfilter odd (Just 1)
Just 1
>>> mfilter odd (Just 2)
Nothing

(<$!>) :: Monad m => (a -> b) -> m a -> m b infixl 4 #

Strict version of <$>.

Since: base-4.8.0.0

unless :: Applicative f => Bool -> f () -> f () #

The reverse of when.

replicateM_ :: Applicative m => Int -> m a -> m () #

Like replicateM, but discards the result.

replicateM :: Applicative m => Int -> m a -> m [a] #

replicateM n act performs the action n times, gathering the results.

Using ApplicativeDo: 'replicateM 5 as' can be understood as the do expression

do a1 <- as
   a2 <- as
   a3 <- as
   a4 <- as
   a5 <- as
   pure [a1,a2,a3,a4,a5]

Note the Applicative constraint.

foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m () #

Like foldM, but discards the result.

foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b #

The foldM function is analogous to foldl, except that its result is encapsulated in a monad. Note that foldM works from left-to-right over the list arguments. This could be an issue where (>>) and the `folded function' are not commutative.

foldM f a1 [x1, x2, ..., xm]

==

do
  a2 <- f a1 x1
  a3 <- f a2 x2
  ...
  f am xm

If right-to-left evaluation is required, the input list should be reversed.

Note: foldM is the same as foldlM

zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () #

zipWithM_ is the extension of zipWithM which ignores the final result.

zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] #

The zipWithM function generalizes zipWith to arbitrary applicative functors.

mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #

The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state monad.

forever :: Applicative f => f a -> f b #

Repeat an action indefinitely.

Using ApplicativeDo: 'forever as' can be understood as the pseudo-do expression

do as
   as
   ..

with as repeating.

Examples

Expand

A common use of forever is to process input from network sockets, Handles, and channels (e.g. MVar and Chan).

For example, here is how we might implement an echo server, using forever both to listen for client connections on a network socket and to echo client input on client connection handles:

echoServer :: Socket -> IO ()
echoServer socket = forever $ do
  client <- accept socket
  forkFinally (echo client) (\_ -> hClose client)
  where
    echo :: Handle -> IO ()
    echo client = forever $
      hGetLine client >>= hPutStrLn client

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 #

Right-to-left composition of Kleisli arrows. (>=>), with the arguments flipped.

Note how this operator resembles function composition (.):

(.)   ::            (b ->   c) -> (a ->   b) -> a ->   c
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 #

Left-to-right composition of Kleisli arrows.

'(bs >=> cs) a' can be understood as the do expression

do b <- bs a
   cs b

filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a] #

This generalizes the list-based filter function.

isSubsequenceOf :: Eq a => [a] -> [a] -> Bool #

The isSubsequenceOf function takes two lists and returns True if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively.

isSubsequenceOf x y is equivalent to elem x (subsequences y).

Examples

Expand
>>> isSubsequenceOf "GHC" "The Glorious Haskell Compiler"
True
>>> isSubsequenceOf ['a','d'..'z'] ['a'..'z']
True
>>> isSubsequenceOf [1..10] [10,9..0]
False

Since: base-4.8.0.0

mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) #

The mapAccumR function behaves like a combination of fmap and foldr; it applies a function to each element of a structure, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new structure.

mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) #

The mapAccumL function behaves like a combination of fmap and foldl; it applies a function to each element of a structure, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new structure.

forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) #

forM is mapM with its arguments flipped. For a version that ignores the results see forM_.

for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b) #

for is traverse with its arguments flipped. For a version that ignores the results see for_.

(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c') infixr 3 #

Fanout: send the input to both argument arrows and combine their output.

The default definition may be overridden with a more efficient version if desired.

second :: Arrow a => a b c -> a (d, b) (d, c) #

A mirror image of first.

The default definition may be overridden with a more efficient version if desired.

first :: Arrow a => a b c -> a (b, d) (c, d) #

Send the first component of the input through the argument arrow, and copy the rest unchanged to the output.

(***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c') infixr 3 #

Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

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).

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).

catchIOError :: IO a -> (IOError -> IO a) -> IO a #

The catchIOError function establishes a handler that receives any IOError raised in the action protected by catchIOError. An IOError is caught by the most recent handler established by one of the exception handling functions. These handlers are not selective: all IOErrors are caught. Exception propagation must be explicitly provided in a handler by re-raising any unwanted exceptions. For example, in

f = catchIOError g (\e -> if IO.isEOFError e then return [] else ioError e)

the function f returns [] when an end-of-file exception (cf. isEOFError) occurs in g; otherwise, the exception is propagated to the next outer handler.

When an exception propagates outside the main program, the Haskell system prints the associated IOError value and exits the program.

Non-I/O exceptions are not caught by this variant; to catch all exceptions, use catch from Control.Exception.

Since: base-4.4.0.0

annotateIOError :: IOError -> String -> Maybe Handle -> Maybe FilePath -> IOError #

Adds a location description and maybe a file path and file handle to an IOError. If any of the file handle or file path is not given the corresponding value in the IOError remains unaltered.

modifyIOError :: (IOError -> IOError) -> IO a -> IO a #

Catch any IOError that occurs in the computation and throw a modified version.

isResourceVanishedErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the resource vanished. See resourceVanishedErrorType.

Since: base-4.14.0.0

isUserErrorType :: IOErrorType -> Bool #

I/O error that is programmer-defined.

isPermissionErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.

isIllegalOperationErrorType :: IOErrorType -> Bool #

I/O error where the operation is not possible.

isEOFErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the end of file has been reached.

isFullErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because the device is full.

isAlreadyInUseErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.

isDoesNotExistErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because one of its arguments does not exist.

isAlreadyExistsErrorType :: IOErrorType -> Bool #

I/O error where the operation failed because one of its arguments already exists.

resourceVanishedErrorType :: IOErrorType #

I/O error where the operation failed because the resource vanished. This happens when, for example, attempting to write to a closed socket or attempting to write to a named pipe that was deleted.

Since: base-4.14.0.0

userErrorType :: IOErrorType #

I/O error that is programmer-defined.

permissionErrorType :: IOErrorType #

I/O error where the operation failed because the user does not have sufficient operating system privilege to perform that operation.

illegalOperationErrorType :: IOErrorType #

I/O error where the operation is not possible.

eofErrorType :: IOErrorType #

I/O error where the operation failed because the end of file has been reached.

fullErrorType :: IOErrorType #

I/O error where the operation failed because the device is full.

alreadyInUseErrorType :: IOErrorType #

I/O error where the operation failed because one of its arguments is a single-use resource, which is already being used.

doesNotExistErrorType :: IOErrorType #

I/O error where the operation failed because one of its arguments does not exist.

alreadyExistsErrorType :: IOErrorType #

I/O error where the operation failed because one of its arguments already exists.

isResourceVanishedError :: IOError -> Bool #

An error indicating that the operation failed because the resource vanished. See resourceVanishedErrorType.

Since: base-4.14.0.0

isUserError :: IOError -> Bool #

A programmer-defined error value constructed using userError.

isPermissionError :: IOError -> Bool #

An error indicating that an IO operation failed because the user does not have sufficient operating system privilege to perform that operation.

isIllegalOperation :: IOError -> Bool #

An error indicating that an IO operation failed because the operation was not possible. Any computation which returns an IO result may fail with isIllegalOperation. In some cases, an implementation will not be able to distinguish between the possible error causes. In this case it should fail with isIllegalOperation.

isEOFError :: IOError -> Bool #

An error indicating that an IO operation failed because the end of file has been reached.

isFullError :: IOError -> Bool #

An error indicating that an IO operation failed because the device is full.

isAlreadyInUseError :: IOError -> Bool #

An error indicating that an IO operation failed because one of its arguments is a single-use resource, which is already being used (for example, opening the same file twice for writing might give this error).

isDoesNotExistError :: IOError -> Bool #

An error indicating that an IO operation failed because one of its arguments does not exist.

isAlreadyExistsError :: IOError -> Bool #

An error indicating that an IO operation failed because one of its arguments already exists.

mkIOError :: IOErrorType -> String -> Maybe Handle -> Maybe FilePath -> IOError #

Construct an IOError of the given type where the second argument describes the error location and the third and fourth argument contain the file handle and file path of the file involved in the error if applicable.

tryIOError :: IO a -> IO (Either IOError a) #

The construct tryIOError comp exposes IO errors which occur within a computation, and which are not fully handled.

Non-I/O exceptions are not caught by this variant; to catch all exceptions, use try from Control.Exception.

Since: base-4.4.0.0

ioError :: IOError -> IO a #

Raise an IOError in the IO monad.

data IOErrorType #

An abstract type that contains a value for each variant of IOError.

Instances

Instances details
Eq IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show IOErrorType

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

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)

data IOException #

Exceptions that occur in the IO monad. An IOException records a more specific error type, a descriptive string and maybe the handle that was used when the error was flagged.

Instances

Instances details
Eq IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Show IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Error IOException 
Instance details

Defined in Control.Monad.Trans.Error

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.

class (Typeable e, Show e) => Exception e where #

Any type that you wish to throw or catch as an exception must be an instance of the Exception class. The simplest case is a new exception type directly below the root:

data MyException = ThisException | ThatException
    deriving Show

instance Exception MyException

The default method definitions in the Exception class do what we need in this case. You can now throw and catch ThisException and ThatException as exceptions:

*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
Caught ThisException

In more complicated examples, you may wish to define a whole hierarchy of exceptions:

---------------------------------------------------------------------
-- Make the root exception type for all the exceptions in a compiler

data SomeCompilerException = forall e . Exception e => SomeCompilerException e

instance Show SomeCompilerException where
    show (SomeCompilerException e) = show e

instance Exception SomeCompilerException

compilerExceptionToException :: Exception e => e -> SomeException
compilerExceptionToException = toException . SomeCompilerException

compilerExceptionFromException :: Exception e => SomeException -> Maybe e
compilerExceptionFromException x = do
    SomeCompilerException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make a subhierarchy for exceptions in the frontend of the compiler

data SomeFrontendException = forall e . Exception e => SomeFrontendException e

instance Show SomeFrontendException where
    show (SomeFrontendException e) = show e

instance Exception SomeFrontendException where
    toException = compilerExceptionToException
    fromException = compilerExceptionFromException

frontendExceptionToException :: Exception e => e -> SomeException
frontendExceptionToException = toException . SomeFrontendException

frontendExceptionFromException :: Exception e => SomeException -> Maybe e
frontendExceptionFromException x = do
    SomeFrontendException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make an exception type for a particular frontend compiler exception

data MismatchedParentheses = MismatchedParentheses
    deriving Show

instance Exception MismatchedParentheses where
    toException   = frontendExceptionToException
    fromException = frontendExceptionFromException

We can now catch a MismatchedParentheses exception as MismatchedParentheses, SomeFrontendException or SomeCompilerException, but not other types, e.g. IOException:

*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
*** Exception: MismatchedParentheses

Minimal complete definition

Nothing

Methods

toException :: e -> SomeException #

fromException :: SomeException -> Maybe e #

displayException :: e -> String #

Render this exception value in a human-friendly manner.

Default implementation: show.

Since: base-4.8.0.0

Instances

Instances details
Exception Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Exception BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AllocationLimitExceeded

Since: base-4.8.0.0

Instance details

Defined in GHC.IO.Exception

Exception CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Exception AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception AsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

find :: Foldable t => (a -> Bool) -> t a -> Maybe a #

The find function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Nothing if there is no such element.

notElem :: (Foldable t, Eq a) => a -> t a -> Bool infix 4 #

notElem is the negation of elem.

minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a #

The least element of a non-empty structure with respect to the given comparison function.

maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a #

The largest element of a non-empty structure with respect to the given comparison function.

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.

or :: Foldable t => t Bool -> Bool #

or returns the disjunction of a container of Bools. For the result to be False, the container must be finite; True, however, results from a True value finitely far from the left end.

and :: Foldable t => t Bool -> Bool #

and returns the conjunction of a container of Bools. For the result to be True, the container must be finite; False, however, results from a False value finitely far from the left end.

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] #

Map a function over all the elements of a container and concatenate the resulting lists.

msum :: (Foldable t, MonadPlus m) => t (m a) -> m a #

The sum of a collection of actions, generalizing concat. As of base 4.8.0.0, msum is just asum, specialized to MonadPlus.

asum :: (Foldable t, Alternative f) => t (f a) -> f a #

The sum of a collection of actions, generalizing concat.

>>> asum [Just "Hello", Nothing, Just "World"]
Just "Hello"

sequence_ :: (Foldable t, Monad m) => t (m a) -> m () #

Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence.

As of base 4.8.0.0, sequence_ is just sequenceA_, specialized to Monad.

sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f () #

Evaluate each action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequenceA.

forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m () #

forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM.

As of base 4.8.0.0, forM_ is just for_, specialized to Monad.

mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () #

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.

for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f () #

for_ is traverse_ with its arguments flipped. For a version that doesn't ignore the results see for.

>>> for_ [1..4] print
1
2
3
4

traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () #

Map each element of a structure to an action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see traverse.

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.

unfoldr :: (b -> Maybe (a, b)) -> b -> [a] #

The unfoldr function is a `dual' to foldr: while foldr reduces a list to a summary value, unfoldr builds a list from a seed value. The function takes the element and returns Nothing if it is done producing the list or returns Just (a,b), in which case, a is a prepended to the list and b is used as the next element in a recursive call. For example,

iterate f == unfoldr (\x -> Just (x, f x))

In some cases, unfoldr can undo a foldr operation:

unfoldr f' (foldr f z xs) == xs

if the following holds:

f' (f x y) = Just (x,y)
f' z       = Nothing

A simple use of unfoldr:

>>> unfoldr (\b -> if b == 0 then Nothing else Just (b, b-1)) 10
[10,9,8,7,6,5,4,3,2,1]

sortOn :: Ord b => (a -> b) -> [a] -> [a] #

Sort a list by comparing the results of a key function applied to each element. sortOn f is equivalent to sortBy (comparing f), but has the performance advantage of only evaluating f once for each element in the input list. This is called the decorate-sort-undecorate paradigm, or Schwartzian transform.

Elements are arranged from from lowest to highest, keeping duplicates in the order they appeared in the input.

>>> sortOn fst [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]

Since: base-4.8.0.0

sortBy :: (a -> a -> Ordering) -> [a] -> [a] #

The sortBy function is the non-overloaded version of sort.

>>> sortBy (\(a,_) (b,_) -> compare a b) [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]

sort :: Ord a => [a] -> [a] #

The sort function implements a stable sorting algorithm. It is a special case of sortBy, which allows the programmer to supply their own comparison function.

Elements are arranged from lowest to highest, keeping duplicates in the order they appeared in the input.

>>> sort [1,6,4,3,2,5]
[1,2,3,4,5,6]

permutations :: [a] -> [[a]] #

The permutations function returns the list of all permutations of the argument.

>>> permutations "abc"
["abc","bac","cba","bca","cab","acb"]

subsequences :: [a] -> [[a]] #

The subsequences function returns the list of all subsequences of the argument.

>>> subsequences "abc"
["","a","b","ab","c","ac","bc","abc"]

tails :: [a] -> [[a]] #

\(\mathcal{O}(n)\). The tails function returns all final segments of the argument, longest first. For example,

>>> tails "abc"
["abc","bc","c",""]

Note that tails has the following strictness property: tails _|_ = _|_ : _|_

inits :: [a] -> [[a]] #

The inits function returns all initial segments of the argument, shortest first. For example,

>>> inits "abc"
["","a","ab","abc"]

Note that inits has the following strictness property: inits (xs ++ _|_) = inits xs ++ _|_

In particular, inits _|_ = [] : _|_

groupBy :: (a -> a -> Bool) -> [a] -> [[a]] #

The groupBy function is the non-overloaded version of group.

group :: Eq a => [a] -> [[a]] #

The group function takes a list and returns a list of lists such that the concatenation of the result is equal to the argument. Moreover, each sublist in the result contains only equal elements. For example,

>>> group "Mississippi"
["M","i","ss","i","ss","i","pp","i"]

It is a special case of groupBy, which allows the programmer to supply their own equality test.

deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #

The deleteFirstsBy function takes a predicate and two lists and returns the first list with the first occurrence of each element of the second list removed.

unzip7 :: [(a, b, c, d, e, f, g)] -> ([a], [b], [c], [d], [e], [f], [g]) #

The unzip7 function takes a list of seven-tuples and returns seven lists, analogous to unzip.

unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f]) #

The unzip6 function takes a list of six-tuples and returns six lists, analogous to unzip.

unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e]) #

The unzip5 function takes a list of five-tuples and returns five lists, analogous to unzip.

unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d]) #

The unzip4 function takes a list of quadruples and returns four lists, analogous to unzip.

zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] #

The zipWith7 function takes a function which combines seven elements, as well as seven lists and returns a list of their point-wise combination, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] #

The zipWith6 function takes a function which combines six elements, as well as six lists and returns a list of their point-wise combination, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zipWith5 :: (a -> b -> c -> d -> e -> f) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] #

The zipWith5 function takes a function which combines five elements, as well as five lists and returns a list of their point-wise combination, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zipWith4 :: (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] #

The zipWith4 function takes a function which combines four elements, as well as four lists and returns a list of their point-wise combination, analogous to zipWith. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip7 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)] #

The zip7 function takes seven lists and returns a list of seven-tuples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip6 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)] #

The zip6 function takes six lists and returns a list of six-tuples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)] #

The zip5 function takes five lists and returns a list of five-tuples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)] #

The zip4 function takes four lists and returns a list of quadruples, analogous to zip. It is capable of list fusion, but it is restricted to its first list argument and its resulting list.

genericReplicate :: Integral i => i -> a -> [a] #

The genericReplicate function is an overloaded version of replicate, which accepts any Integral value as the number of repetitions to make.

genericIndex :: Integral i => [a] -> i -> a #

The genericIndex function is an overloaded version of !!, which accepts any Integral value as the index.

genericSplitAt :: Integral i => i -> [a] -> ([a], [a]) #

The genericSplitAt function is an overloaded version of splitAt, which accepts any Integral value as the position at which to split.

genericDrop :: Integral i => i -> [a] -> [a] #

The genericDrop function is an overloaded version of drop, which accepts any Integral value as the number of elements to drop.

genericTake :: Integral i => i -> [a] -> [a] #

The genericTake function is an overloaded version of take, which accepts any Integral value as the number of elements to take.

genericLength :: Num i => [a] -> i #

\(\mathcal{O}(n)\). The genericLength function is an overloaded version of length. In particular, instead of returning an Int, it returns any type which is an instance of Num. It is, however, less efficient than length.

>>> genericLength [1, 2, 3] :: Int
3
>>> genericLength [1, 2, 3] :: Float
3.0

insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a] #

\(\mathcal{O}(n)\). The non-overloaded version of insert.

insert :: Ord a => a -> [a] -> [a] #

\(\mathcal{O}(n)\). The insert function takes an element and a list and inserts the element into the list at the first position where it is less than or equal to the next element. In particular, if the list is sorted before the call, the result will also be sorted. It is a special case of insertBy, which allows the programmer to supply their own comparison function.

>>> insert 4 [1,2,3,5,6,7]
[1,2,3,4,5,6,7]

partition :: (a -> Bool) -> [a] -> ([a], [a]) #

The partition function takes a predicate a list and returns the pair of lists of elements which do and do not satisfy the predicate, respectively; i.e.,

partition p xs == (filter p xs, filter (not . p) xs)
>>> partition (`elem` "aeiou") "Hello World!"
("eoo","Hll Wrld!")

transpose :: [[a]] -> [[a]] #

The transpose function transposes the rows and columns of its argument. For example,

>>> transpose [[1,2,3],[4,5,6]]
[[1,4],[2,5],[3,6]]

If some of the rows are shorter than the following rows, their elements are skipped:

>>> transpose [[10,11],[20],[],[30,31,32]]
[[10,20,30],[11,31],[32]]

intersperse :: a -> [a] -> [a] #

\(\mathcal{O}(n)\). The intersperse function takes an element and a list and `intersperses' that element between the elements of the list. For example,

>>> intersperse ',' "abcde"
"a,b,c,d,e"

intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #

The intersectBy function is the non-overloaded version of intersect.

intersect :: Eq a => [a] -> [a] -> [a] #

The intersect function takes the list intersection of two lists. For example,

>>> [1,2,3,4] `intersect` [2,4,6,8]
[2,4]

If the first list contains duplicates, so will the result.

>>> [1,2,2,3,4] `intersect` [6,4,4,2]
[2,2,4]

It is a special case of intersectBy, which allows the programmer to supply their own equality test. If the element is found in both the first and the second list, the element from the first list will be used.

unionBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #

The unionBy function is the non-overloaded version of union.

union :: Eq a => [a] -> [a] -> [a] #

The union function returns the list union of the two lists. For example,

>>> "dog" `union` "cow"
"dogcw"

Duplicates, and elements of the first list, are removed from the the second list, but if the first list contains duplicates, so will the result. It is a special case of unionBy, which allows the programmer to supply their own equality test.

deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a] #

\(\mathcal{O}(n)\). The deleteBy function behaves like delete, but takes a user-supplied equality predicate.

>>> deleteBy (<=) 4 [1..10]
[1,2,3,5,6,7,8,9,10]

delete :: Eq a => a -> [a] -> [a] #

\(\mathcal{O}(n)\). delete x removes the first occurrence of x from its list argument. For example,

>>> delete 'a' "banana"
"bnana"

It is a special case of deleteBy, which allows the programmer to supply their own equality test.

nubBy :: (a -> a -> Bool) -> [a] -> [a] #

The nubBy function behaves just like nub, except it uses a user-supplied equality predicate instead of the overloaded == function.

>>> nubBy (\x y -> mod x 3 == mod y 3) [1,2,4,5,6]
[1,2,6]

nub :: Eq a => [a] -> [a] #

\(\mathcal{O}(n^2)\). The nub function removes duplicate elements from a list. In particular, it keeps only the first occurrence of each element. (The name nub means `essence'.) It is a special case of nubBy, which allows the programmer to supply their own equality test.

>>> nub [1,2,3,4,3,2,1,2,4,3,5]
[1,2,3,4,5]

isInfixOf :: Eq a => [a] -> [a] -> Bool #

The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second.

>>> isInfixOf "Haskell" "I really like Haskell."
True
>>> isInfixOf "Ial" "I really like Haskell."
False

isSuffixOf :: Eq a => [a] -> [a] -> Bool #

The isSuffixOf function takes two lists and returns True iff the first list is a suffix of the second. The second list must be finite.

>>> "ld!" `isSuffixOf` "Hello World!"
True
>>> "World" `isSuffixOf` "Hello World!"
False

isPrefixOf :: Eq a => [a] -> [a] -> Bool #

\(\mathcal{O}(\min(m,n))\). The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.

>>> "Hello" `isPrefixOf` "Hello World!"
True
>>> "Hello" `isPrefixOf` "Wello Horld!"
False

findIndices :: (a -> Bool) -> [a] -> [Int] #

The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order.

>>> findIndices (`elem` "aeiou") "Hello World!"
[1,4,7]

findIndex :: (a -> Bool) -> [a] -> Maybe Int #

The findIndex function takes a predicate and a list and returns the index of the first element in the list satisfying the predicate, or Nothing if there is no such element.

>>> findIndex isSpace "Hello World!"
Just 5

elemIndices :: Eq a => a -> [a] -> [Int] #

The elemIndices function extends elemIndex, by returning the indices of all elements equal to the query element, in ascending order.

>>> elemIndices 'o' "Hello World"
[4,7]

elemIndex :: Eq a => a -> [a] -> Maybe Int #

The elemIndex function returns the index of the first element in the given list which is equal (by ==) to the query element, or Nothing if there is no such element.

>>> elemIndex 4 [0..]
Just 4

stripPrefix :: Eq a => [a] -> [a] -> Maybe [a] #

\(\mathcal{O}(\min(m,n))\). The stripPrefix function drops the given prefix from a list. It returns Nothing if the list did not start with the prefix given, or Just the list after the prefix, if it does.

>>> stripPrefix "foo" "foobar"
Just "bar"
>>> stripPrefix "foo" "foo"
Just ""
>>> stripPrefix "foo" "barfoo"
Nothing
>>> stripPrefix "foo" "barfoobaz"
Nothing

dropWhileEnd :: (a -> Bool) -> [a] -> [a] #

The dropWhileEnd function drops the largest suffix of a list in which the given predicate holds for all elements. For example:

>>> dropWhileEnd isSpace "foo\n"
"foo"
>>> dropWhileEnd isSpace "foo bar"
"foo bar"
dropWhileEnd isSpace ("foo\n" ++ undefined) == "foo" ++ undefined

Since: base-4.5.0.0

reads :: Read a => ReadS a #

equivalent to readsPrec with a precedence of 0.

partitionEithers :: [Either a b] -> ([a], [b]) #

Partitions a list of Either into two lists. All the Left elements are extracted, in order, to the first component of the output. Similarly the Right elements are extracted to the second component of the output.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> partitionEithers list
(["foo","bar","baz"],[3,7])

The pair returned by partitionEithers x should be the same pair as (lefts x, rights x):

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> partitionEithers list == (lefts list, rights list)
True

rights :: [Either a b] -> [b] #

Extracts from a list of Either all the Right elements. All the Right elements are extracted in order.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> rights list
[3,7]

lefts :: [Either a b] -> [a] #

Extracts from a list of Either all the Left elements. All the Left elements are extracted in order.

Examples

Expand

Basic usage:

>>> let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]
>>> lefts list
["foo","bar","baz"]

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

comparing :: Ord a => (b -> a) -> b -> b -> Ordering #

comparing p x y = compare (p x) (p y)

Useful combinator for use in conjunction with the xxxBy family of functions from Data.List, for example:

  ... sortBy (comparing fst) ...

newtype Down a #

The Down type allows you to reverse sort order conveniently. A value of type Down a contains a value of type a (represented as Down a). If a has an Ord instance associated with it then comparing two values thus wrapped will give you the opposite of their normal sort order. This is particularly useful when sorting in generalised list comprehensions, as in: then sortWith by Down x

Since: base-4.6.0.0

Constructors

Down 

Fields

Instances

Instances details
Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(>>=) :: Down a -> (a -> Down b) -> Down b #

(>>) :: Down a -> Down b -> Down b #

return :: a -> Down a #

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

fmap :: (a -> b) -> Down a -> Down b #

(<$) :: a -> Down b -> Down a #

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

pure :: a -> Down a #

(<*>) :: Down (a -> b) -> Down a -> Down b #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

(*>) :: Down a -> Down b -> Down b #

(<*) :: Down a -> Down b -> Down a #

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 #

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) #

Eq1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Down a -> Down b -> Bool #

Ord1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Down a -> Down b -> Ordering #

Read1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Down a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Down a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Down a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Down a] #

Show1 Down

Since: base-4.12.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Down a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Down a] -> ShowS #

Unbox a => Vector Vector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Down a) -> m (Vector (Down a))

basicUnsafeThaw :: PrimMonad m => Vector (Down a) -> m (Mutable Vector (PrimState m) (Down a))

basicLength :: Vector (Down a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Down a) -> Vector (Down a)

basicUnsafeIndexM :: Monad m => Vector (Down a) -> Int -> m (Down a)

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Down a) -> Vector (Down a) -> m ()

elemseq :: Vector (Down a) -> Down a -> b -> b

Unbox a => MVector MVector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Methods

basicLength :: MVector s (Down a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Down a) -> MVector s (Down a)

basicOverlaps :: MVector s (Down a) -> MVector s (Down a) -> Bool

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Down a))

basicInitialize :: PrimMonad m => MVector (PrimState m) (Down a) -> m ()

basicUnsafeReplicate :: PrimMonad m => Int -> Down a -> m (MVector (PrimState m) (Down a))

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Down a) -> Int -> m (Down a)

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Down a) -> Int -> Down a -> m ()

basicClear :: PrimMonad m => MVector (PrimState m) (Down a) -> m ()

basicSet :: PrimMonad m => MVector (PrimState m) (Down a) -> Down a -> m ()

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Down a) -> MVector (PrimState m) (Down a) -> m ()

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Down a) -> MVector (PrimState m) (Down a) -> m ()

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Down a) -> Int -> m (MVector (PrimState m) (Down a))

Bounded a => Bounded (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

minBound :: Down a #

maxBound :: Down a #

Enum a => Enum (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

succ :: Down a -> Down a #

pred :: Down a -> Down a #

toEnum :: Int -> Down a #

fromEnum :: Down a -> Int #

enumFrom :: Down a -> [Down a] #

enumFromThen :: Down a -> Down a -> [Down a] #

enumFromTo :: Down a -> Down a -> [Down a] #

enumFromThenTo :: Down a -> Down a -> Down a -> [Down a] #

Eq a => Eq (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

(==) :: Down a -> Down a -> Bool #

(/=) :: Down a -> Down a -> Bool #

Floating a => Floating (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

pi :: Down a #

exp :: Down a -> Down a #

log :: Down a -> Down a #

sqrt :: Down a -> Down a #

(**) :: Down a -> Down a -> Down a #

logBase :: Down a -> Down a -> Down a #

sin :: Down a -> Down a #

cos :: Down a -> Down a #

tan :: Down a -> Down a #

asin :: Down a -> Down a #

acos :: Down a -> Down a #

atan :: Down a -> Down a #

sinh :: Down a -> Down a #

cosh :: Down a -> Down a #

tanh :: Down a -> Down a #

asinh :: Down a -> Down a #

acosh :: Down a -> Down a #

atanh :: Down a -> Down a #

log1p :: Down a -> Down a #

expm1 :: Down a -> Down a #

log1pexp :: Down a -> Down a #

log1mexp :: Down a -> Down a #

Fractional a => Fractional (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(/) :: Down a -> Down a -> Down a #

recip :: Down a -> Down a #

fromRational :: Rational -> Down a #

Integral a => Integral (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

quot :: Down a -> Down a -> Down a #

rem :: Down a -> Down a -> Down a #

div :: Down a -> Down a -> Down a #

mod :: Down a -> Down a -> Down a #

quotRem :: Down a -> Down a -> (Down a, Down a) #

divMod :: Down a -> Down a -> (Down a, Down a) #

toInteger :: Down a -> Integer #

Data a => Data (Down a)

Since: base-4.12.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Down a -> c (Down a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Down a) #

toConstr :: Down a -> Constr #

dataTypeOf :: Down a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Down a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Down a)) #

gmapT :: (forall b. Data b => b -> b) -> Down a -> Down a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Down a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Down a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Down a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Down a -> m (Down a) #

Num a => Num (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(+) :: Down a -> Down a -> Down a #

(-) :: Down a -> Down a -> Down a #

(*) :: Down a -> Down a -> Down a #

negate :: Down a -> Down a #

abs :: Down a -> Down a #

signum :: Down a -> Down a #

fromInteger :: Integer -> Down a #

Ord a => Ord (Down a)

Since: base-4.6.0.0

Instance details

Defined in Data.Ord

Methods

compare :: Down a -> Down a -> Ordering #

(<) :: Down a -> Down a -> Bool #

(<=) :: Down a -> Down a -> Bool #

(>) :: Down a -> Down a -> Bool #

(>=) :: Down a -> Down a -> Bool #

max :: Down a -> Down a -> Down a #

min :: Down a -> Down a -> Down a #

Read a => Read (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Real a => Real (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

toRational :: Down a -> Rational #

RealFloat a => RealFloat (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

RealFrac a => RealFrac (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

properFraction :: Integral b => Down a -> (b, Down a) #

truncate :: Integral b => Down a -> b #

round :: Integral b => Down a -> b #

ceiling :: Integral b => Down a -> b #

floor :: Integral b => Down a -> b #

Show a => Show (Down a)

This instance would be equivalent to the derived instances of the Down newtype if the getDown field were removed

Since: base-4.7.0.0

Instance details

Defined in Data.Ord

Methods

showsPrec :: Int -> Down a -> ShowS #

show :: Down a -> String #

showList :: [Down a] -> ShowS #

Ix a => Ix (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

range :: (Down a, Down a) -> [Down a] #

index :: (Down a, Down a) -> Down a -> Int #

unsafeIndex :: (Down a, Down a) -> Down a -> Int #

inRange :: (Down a, Down a) -> Down a -> Bool #

rangeSize :: (Down a, Down a) -> Int #

unsafeRangeSize :: (Down a, Down a) -> Int #

Generic (Down a)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep (Down a) :: Type -> Type #

Methods

from :: Down a -> Rep (Down a) x #

to :: Rep (Down a) x -> Down a #

Semigroup a => Semigroup (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(<>) :: Down a -> Down a -> Down a #

sconcat :: NonEmpty (Down a) -> Down a #

stimes :: Integral b => b -> Down a -> Down a #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a #

mappend :: Down a -> Down a -> Down a #

mconcat :: [Down a] -> Down a #

Storable a => Storable (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

sizeOf :: Down a -> Int #

alignment :: Down a -> Int #

peekElemOff :: Ptr (Down a) -> Int -> IO (Down a) #

pokeElemOff :: Ptr (Down a) -> Int -> Down a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Down a) #

pokeByteOff :: Ptr b -> Int -> Down a -> IO () #

peek :: Ptr (Down a) -> IO (Down a) #

poke :: Ptr (Down a) -> Down a -> IO () #

Bits a => Bits (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(.&.) :: Down a -> Down a -> Down a #

(.|.) :: Down a -> Down a -> Down a #

xor :: Down a -> Down a -> Down a #

complement :: Down a -> Down a #

shift :: Down a -> Int -> Down a #

rotate :: Down a -> Int -> Down a #

zeroBits :: Down a #

bit :: Int -> Down a #

setBit :: Down a -> Int -> Down a #

clearBit :: Down a -> Int -> Down a #

complementBit :: Down a -> Int -> Down a #

testBit :: Down a -> Int -> Bool #

bitSizeMaybe :: Down a -> Maybe Int #

bitSize :: Down a -> Int #

isSigned :: Down a -> Bool #

shiftL :: Down a -> Int -> Down a #

unsafeShiftL :: Down a -> Int -> Down a #

shiftR :: Down a -> Int -> Down a #

unsafeShiftR :: Down a -> Int -> Down a #

rotateL :: Down a -> Int -> Down a #

rotateR :: Down a -> Int -> Down a #

popCount :: Down a -> Int #

FiniteBits a => FiniteBits (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Unbox a => Unbox (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Prim a => Prim (Down a) 
Instance details

Defined in Data.Primitive.Types

Wrapped (Down a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Down a)

Methods

_Wrapped' :: Iso' (Down a) (Unwrapped (Down a))

Generic1 Down

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Down :: k -> Type #

Methods

from1 :: forall (a :: k). Down a -> Rep1 Down a #

to1 :: forall (a :: k). Rep1 Down a -> Down a #

t ~ Down b => Rewrapped (Down a) t 
Instance details

Defined in Control.Lens.Wrapped

newtype MVector s (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s (Down a) = MV_Down (MVector s a)
type Rep (Down a) 
Instance details

Defined in GHC.Generics

type Rep (Down a) = D1 ('MetaData "Down" "Data.Ord" "base" 'True) (C1 ('MetaCons "Down" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
newtype Vector (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype Vector (Down a) = V_Down (Vector a)
type Unwrapped (Down a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Down a) = a
type Rep1 Down 
Instance details

Defined in GHC.Generics

type Rep1 Down = D1 ('MetaData "Down" "Data.Ord" "base" 'True) (C1 ('MetaCons "Down" 'PrefixI 'True) (S1 ('MetaSel ('Just "getDown") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

class Storable a #

The member functions of this class facilitate writing values of primitive types to raw memory (which may have been allocated with the above mentioned routines) and reading values from blocks of raw memory. The class, furthermore, includes support for computing the storage requirements and alignment restrictions of storable types.

Memory addresses are represented as values of type Ptr a, for some a which is an instance of class Storable. The type argument to Ptr helps provide some valuable type safety in FFI code (you can't mix pointers of different types without an explicit cast), while helping the Haskell type system figure out which marshalling method is needed for a given pointer.

All marshalling between Haskell and a foreign language ultimately boils down to translating Haskell data structures into the binary representation of a corresponding data structure of the foreign language and vice versa. To code this marshalling in Haskell, it is necessary to manipulate primitive data types stored in unstructured memory blocks. The class Storable facilitates this manipulation on all types for which it is instantiated, which are the standard basic types of Haskell, the fixed size Int types (Int8, Int16, Int32, Int64), the fixed size Word types (Word8, Word16, Word32, Word64), StablePtr, all types from Foreign.C.Types, as well as Ptr.

Minimal complete definition

sizeOf, alignment, (peek | peekElemOff | peekByteOff), (poke | pokeElemOff | pokeByteOff)

Instances

Instances details
Storable Bool

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Bool -> Int #

alignment :: Bool -> Int #

peekElemOff :: Ptr Bool -> Int -> IO Bool #

pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () #

peekByteOff :: Ptr b -> Int -> IO Bool #

pokeByteOff :: Ptr b -> Int -> Bool -> IO () #

peek :: Ptr Bool -> IO Bool #

poke :: Ptr Bool -> Bool -> IO () #

Storable Char

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Char -> Int #

alignment :: Char -> Int #

peekElemOff :: Ptr Char -> Int -> IO Char #

pokeElemOff :: Ptr Char -> Int -> Char -> IO () #

peekByteOff :: Ptr b -> Int -> IO Char #

pokeByteOff :: Ptr b -> Int -> Char -> IO () #

peek :: Ptr Char -> IO Char #

poke :: Ptr Char -> Char -> IO () #

Storable Double

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Float

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Float -> Int #

alignment :: Float -> Int #

peekElemOff :: Ptr Float -> Int -> IO Float #

pokeElemOff :: Ptr Float -> Int -> Float -> IO () #

peekByteOff :: Ptr b -> Int -> IO Float #

pokeByteOff :: Ptr b -> Int -> Float -> IO () #

peek :: Ptr Float -> IO Float #

poke :: Ptr Float -> Float -> IO () #

Storable Int

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int -> Int #

alignment :: Int -> Int #

peekElemOff :: Ptr Int -> Int -> IO Int #

pokeElemOff :: Ptr Int -> Int -> Int -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int #

pokeByteOff :: Ptr b -> Int -> Int -> IO () #

peek :: Ptr Int -> IO Int #

poke :: Ptr Int -> Int -> IO () #

Storable Int8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int8 -> Int #

alignment :: Int8 -> Int #

peekElemOff :: Ptr Int8 -> Int -> IO Int8 #

pokeElemOff :: Ptr Int8 -> Int -> Int8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int8 #

pokeByteOff :: Ptr b -> Int -> Int8 -> IO () #

peek :: Ptr Int8 -> IO Int8 #

poke :: Ptr Int8 -> Int8 -> IO () #

Storable Int16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int16 -> Int #

alignment :: Int16 -> Int #

peekElemOff :: Ptr Int16 -> Int -> IO Int16 #

pokeElemOff :: Ptr Int16 -> Int -> Int16 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int16 #

pokeByteOff :: Ptr b -> Int -> Int16 -> IO () #

peek :: Ptr Int16 -> IO Int16 #

poke :: Ptr Int16 -> Int16 -> IO () #

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int32 -> Int #

alignment :: Int32 -> Int #

peekElemOff :: Ptr Int32 -> Int -> IO Int32 #

pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int32 #

pokeByteOff :: Ptr b -> Int -> Int32 -> IO () #

peek :: Ptr Int32 -> IO Int32 #

poke :: Ptr Int32 -> Int32 -> IO () #

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int64 -> Int #

alignment :: Int64 -> Int #

peekElemOff :: Ptr Int64 -> Int -> IO Int64 #

pokeElemOff :: Ptr Int64 -> Int -> Int64 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int64 #

pokeByteOff :: Ptr b -> Int -> Int64 -> IO () #

peek :: Ptr Int64 -> IO Int64 #

poke :: Ptr Int64 -> Int64 -> IO () #

Storable Word

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word -> Int #

alignment :: Word -> Int #

peekElemOff :: Ptr Word -> Int -> IO Word #

pokeElemOff :: Ptr Word -> Int -> Word -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word #

pokeByteOff :: Ptr b -> Int -> Word -> IO () #

peek :: Ptr Word -> IO Word #

poke :: Ptr Word -> Word -> IO () #

Storable Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word8 -> Int #

alignment :: Word8 -> Int #

peekElemOff :: Ptr Word8 -> Int -> IO Word8 #

pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word8 #

pokeByteOff :: Ptr b -> Int -> Word8 -> IO () #

peek :: Ptr Word8 -> IO Word8 #

poke :: Ptr Word8 -> Word8 -> IO () #

Storable Word16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable Word64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Storable ()

Since: base-4.9.0.0

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: () -> Int #

alignment :: () -> Int #

peekElemOff :: Ptr () -> Int -> IO () #

pokeElemOff :: Ptr () -> Int -> () -> IO () #

peekByteOff :: Ptr b -> Int -> IO () #

pokeByteOff :: Ptr b -> Int -> () -> IO () #

peek :: Ptr () -> IO () #

poke :: Ptr () -> () -> IO () #

Storable CChar 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CChar -> Int #

alignment :: CChar -> Int #

peekElemOff :: Ptr CChar -> Int -> IO CChar #

pokeElemOff :: Ptr CChar -> Int -> CChar -> IO () #

peekByteOff :: Ptr b -> Int -> IO CChar #

pokeByteOff :: Ptr b -> Int -> CChar -> IO () #

peek :: Ptr CChar -> IO CChar #

poke :: Ptr CChar -> CChar -> IO () #

Storable CSChar 
Instance details

Defined in Foreign.C.Types

Storable CUChar 
Instance details

Defined in Foreign.C.Types

Storable CShort 
Instance details

Defined in Foreign.C.Types

Storable CUShort 
Instance details

Defined in Foreign.C.Types

Storable CInt 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CInt -> Int #

alignment :: CInt -> Int #

peekElemOff :: Ptr CInt -> Int -> IO CInt #

pokeElemOff :: Ptr CInt -> Int -> CInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CInt #

pokeByteOff :: Ptr b -> Int -> CInt -> IO () #

peek :: Ptr CInt -> IO CInt #

poke :: Ptr CInt -> CInt -> IO () #

Storable CUInt 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CUInt -> Int #

alignment :: CUInt -> Int #

peekElemOff :: Ptr CUInt -> Int -> IO CUInt #

pokeElemOff :: Ptr CUInt -> Int -> CUInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CUInt #

pokeByteOff :: Ptr b -> Int -> CUInt -> IO () #

peek :: Ptr CUInt -> IO CUInt #

poke :: Ptr CUInt -> CUInt -> IO () #

Storable CLong 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CLong -> Int #

alignment :: CLong -> Int #

peekElemOff :: Ptr CLong -> Int -> IO CLong #

pokeElemOff :: Ptr CLong -> Int -> CLong -> IO () #

peekByteOff :: Ptr b -> Int -> IO CLong #

pokeByteOff :: Ptr b -> Int -> CLong -> IO () #

peek :: Ptr CLong -> IO CLong #

poke :: Ptr CLong -> CLong -> IO () #

Storable CULong 
Instance details

Defined in Foreign.C.Types

Storable CLLong 
Instance details

Defined in Foreign.C.Types

Storable CULLong 
Instance details

Defined in Foreign.C.Types

Storable CBool 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CBool -> Int #

alignment :: CBool -> Int #

peekElemOff :: Ptr CBool -> Int -> IO CBool #

pokeElemOff :: Ptr CBool -> Int -> CBool -> IO () #

peekByteOff :: Ptr b -> Int -> IO CBool #

pokeByteOff :: Ptr b -> Int -> CBool -> IO () #

peek :: Ptr CBool -> IO CBool #

poke :: Ptr CBool -> CBool -> IO () #

Storable CFloat 
Instance details

Defined in Foreign.C.Types

Storable CDouble 
Instance details

Defined in Foreign.C.Types

Storable CPtrdiff 
Instance details

Defined in Foreign.C.Types

Storable CSize 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CSize -> Int #

alignment :: CSize -> Int #

peekElemOff :: Ptr CSize -> Int -> IO CSize #

pokeElemOff :: Ptr CSize -> Int -> CSize -> IO () #

peekByteOff :: Ptr b -> Int -> IO CSize #

pokeByteOff :: Ptr b -> Int -> CSize -> IO () #

peek :: Ptr CSize -> IO CSize #

poke :: Ptr CSize -> CSize -> IO () #

Storable CWchar 
Instance details

Defined in Foreign.C.Types

Storable CSigAtomic 
Instance details

Defined in Foreign.C.Types

Storable CClock 
Instance details

Defined in Foreign.C.Types

Storable CTime 
Instance details

Defined in Foreign.C.Types

Methods

sizeOf :: CTime -> Int #

alignment :: CTime -> Int #

peekElemOff :: Ptr CTime -> Int -> IO CTime #

pokeElemOff :: Ptr CTime -> Int -> CTime -> IO () #

peekByteOff :: Ptr b -> Int -> IO CTime #

pokeByteOff :: Ptr b -> Int -> CTime -> IO () #

peek :: Ptr CTime -> IO CTime #

poke :: Ptr CTime -> CTime -> IO () #

Storable CUSeconds 
Instance details

Defined in Foreign.C.Types

Storable CSUSeconds 
Instance details

Defined in Foreign.C.Types

Storable CIntPtr 
Instance details

Defined in Foreign.C.Types

Storable CUIntPtr 
Instance details

Defined in Foreign.C.Types

Storable CIntMax 
Instance details

Defined in Foreign.C.Types

Storable CUIntMax 
Instance details

Defined in Foreign.C.Types

Storable Fingerprint

Since: base-4.4.0.0

Instance details

Defined in Foreign.Storable

Storable CodePoint 
Instance details

Defined in Data.Text.Encoding

Methods

sizeOf :: CodePoint -> Int #

alignment :: CodePoint -> Int #

peekElemOff :: Ptr CodePoint -> Int -> IO CodePoint #

pokeElemOff :: Ptr CodePoint -> Int -> CodePoint -> IO () #

peekByteOff :: Ptr b -> Int -> IO CodePoint #

pokeByteOff :: Ptr b -> Int -> CodePoint -> IO () #

peek :: Ptr CodePoint -> IO CodePoint #

poke :: Ptr CodePoint -> CodePoint -> IO () #

Storable DecoderState 
Instance details

Defined in Data.Text.Encoding

Methods

sizeOf :: DecoderState -> Int #

alignment :: DecoderState -> Int #

peekElemOff :: Ptr DecoderState -> Int -> IO DecoderState #

pokeElemOff :: Ptr DecoderState -> Int -> DecoderState -> IO () #

peekByteOff :: Ptr b -> Int -> IO DecoderState #

pokeByteOff :: Ptr b -> Int -> DecoderState -> IO () #

peek :: Ptr DecoderState -> IO DecoderState #

poke :: Ptr DecoderState -> DecoderState -> IO () #

(Storable a, Integral a) => Storable (Ratio a)

Since: base-4.8.0.0

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ratio a -> Int #

alignment :: Ratio a -> Int #

peekElemOff :: Ptr (Ratio a) -> Int -> IO (Ratio a) #

pokeElemOff :: Ptr (Ratio a) -> Int -> Ratio a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ratio a) #

pokeByteOff :: Ptr b -> Int -> Ratio a -> IO () #

peek :: Ptr (Ratio a) -> IO (Ratio a) #

poke :: Ptr (Ratio a) -> Ratio a -> IO () #

Storable (StablePtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: StablePtr a -> Int #

alignment :: StablePtr a -> Int #

peekElemOff :: Ptr (StablePtr a) -> Int -> IO (StablePtr a) #

pokeElemOff :: Ptr (StablePtr a) -> Int -> StablePtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (StablePtr a) #

pokeByteOff :: Ptr b -> Int -> StablePtr a -> IO () #

peek :: Ptr (StablePtr a) -> IO (StablePtr a) #

poke :: Ptr (StablePtr a) -> StablePtr a -> IO () #

Storable (Ptr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Ptr a -> Int #

alignment :: Ptr a -> Int #

peekElemOff :: Ptr (Ptr a) -> Int -> IO (Ptr a) #

pokeElemOff :: Ptr (Ptr a) -> Int -> Ptr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ptr a) #

pokeByteOff :: Ptr b -> Int -> Ptr a -> IO () #

peek :: Ptr (Ptr a) -> IO (Ptr a) #

poke :: Ptr (Ptr a) -> Ptr a -> IO () #

Storable (FunPtr a)

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: FunPtr a -> Int #

alignment :: FunPtr a -> Int #

peekElemOff :: Ptr (FunPtr a) -> Int -> IO (FunPtr a) #

pokeElemOff :: Ptr (FunPtr a) -> Int -> FunPtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (FunPtr a) #

pokeByteOff :: Ptr b -> Int -> FunPtr a -> IO () #

peek :: Ptr (FunPtr a) -> IO (FunPtr a) #

poke :: Ptr (FunPtr a) -> FunPtr a -> IO () #

Storable a => Storable (Complex a)

Since: base-4.8.0.0

Instance details

Defined in Data.Complex

Methods

sizeOf :: Complex a -> Int #

alignment :: Complex a -> Int #

peekElemOff :: Ptr (Complex a) -> Int -> IO (Complex a) #

pokeElemOff :: Ptr (Complex a) -> Int -> Complex a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Complex a) #

pokeByteOff :: Ptr b -> Int -> Complex a -> IO () #

peek :: Ptr (Complex a) -> IO (Complex a) #

poke :: Ptr (Complex a) -> Complex a -> IO () #

Storable a => Storable (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

sizeOf :: Identity a -> Int #

alignment :: Identity a -> Int #

peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) #

pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Identity a) #

pokeByteOff :: Ptr b -> Int -> Identity a -> IO () #

peek :: Ptr (Identity a) -> IO (Identity a) #

poke :: Ptr (Identity a) -> Identity a -> IO () #

Storable a => Storable (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

sizeOf :: Down a -> Int #

alignment :: Down a -> Int #

peekElemOff :: Ptr (Down a) -> Int -> IO (Down a) #

pokeElemOff :: Ptr (Down a) -> Int -> Down a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Down a) #

pokeByteOff :: Ptr b -> Int -> Down a -> IO () #

peek :: Ptr (Down a) -> IO (Down a) #

poke :: Ptr (Down a) -> Down a -> IO () #

Storable a => Storable (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

sizeOf :: Mult a -> Int #

alignment :: Mult a -> Int #

peekElemOff :: Ptr (Mult a) -> Int -> IO (Mult a) #

pokeElemOff :: Ptr (Mult a) -> Int -> Mult a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Mult a) #

pokeByteOff :: Ptr b -> Int -> Mult a -> IO () #

peek :: Ptr (Mult a) -> IO (Mult a) #

poke :: Ptr (Mult a) -> Mult a -> IO () #

Storable a => Storable (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

sizeOf :: Add a -> Int #

alignment :: Add a -> Int #

peekElemOff :: Ptr (Add a) -> Int -> IO (Add a) #

pokeElemOff :: Ptr (Add a) -> Int -> Add a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Add a) #

pokeByteOff :: Ptr b -> Int -> Add a -> IO () #

peek :: Ptr (Add a) -> IO (Add a) #

poke :: Ptr (Add a) -> Add a -> IO () #

Storable a => Storable (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Storable a => Storable (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Storable a => Storable (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Storable a => Storable (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

sizeOf :: WrapNum a -> Int #

alignment :: WrapNum a -> Int #

peekElemOff :: Ptr (WrapNum a) -> Int -> IO (WrapNum a) #

pokeElemOff :: Ptr (WrapNum a) -> Int -> WrapNum a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (WrapNum a) #

pokeByteOff :: Ptr b -> Int -> WrapNum a -> IO () #

peek :: Ptr (WrapNum a) -> IO (WrapNum a) #

poke :: Ptr (WrapNum a) -> WrapNum a -> IO () #

Prim a => Storable (PrimStorable a) 
Instance details

Defined in Data.Primitive.Types

Methods

sizeOf :: PrimStorable a -> Int #

alignment :: PrimStorable a -> Int #

peekElemOff :: Ptr (PrimStorable a) -> Int -> IO (PrimStorable a) #

pokeElemOff :: Ptr (PrimStorable a) -> Int -> PrimStorable a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (PrimStorable a) #

pokeByteOff :: Ptr b -> Int -> PrimStorable a -> IO () #

peek :: Ptr (PrimStorable a) -> IO (PrimStorable a) #

poke :: Ptr (PrimStorable a) -> PrimStorable a -> IO () #

Storable a => Storable (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

sizeOf :: Const a b -> Int #

alignment :: Const a b -> Int #

peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) #

pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () #

peekByteOff :: Ptr b0 -> Int -> IO (Const a b) #

pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () #

peek :: Ptr (Const a b) -> IO (Const a b) #

poke :: Ptr (Const a b) -> Const a b -> IO () #

Storable a => Storable (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

sizeOf :: Tagged s a -> Int #

alignment :: Tagged s a -> Int #

peekElemOff :: Ptr (Tagged s a) -> Int -> IO (Tagged s a) #

pokeElemOff :: Ptr (Tagged s a) -> Int -> Tagged s a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Tagged s a) #

pokeByteOff :: Ptr b -> Int -> Tagged s a -> IO () #

peek :: Ptr (Tagged s a) -> IO (Tagged s a) #

poke :: Ptr (Tagged s a) -> Tagged s a -> IO () #

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).

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.

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.

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.

(!!) :: [a] -> Int -> a infixl 9 #

List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type.

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)

splitAt :: Int -> [a] -> ([a], [a]) #

splitAt n xs returns a tuple where first element is xs prefix of length n and second element is the remainder of the list:

splitAt 6 "Hello World!" == ("Hello ","World!")
splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5])
splitAt 1 [1,2,3] == ([1],[2,3])
splitAt 3 [1,2,3] == ([1,2,3],[])
splitAt 4 [1,2,3] == ([1,2,3],[])
splitAt 0 [1,2,3] == ([],[1,2,3])
splitAt (-1) [1,2,3] == ([],[1,2,3])

It is equivalent to (take n xs, drop n xs) when n is not _|_ (splitAt _|_ xs = _|_). splitAt is an instance of the more general genericSplitAt, in which n may be of any integral type.

drop :: Int -> [a] -> [a] #

drop n xs returns the suffix of xs after the first n elements, or [] if n > length xs:

drop 6 "Hello World!" == "World!"
drop 3 [1,2,3,4,5] == [4,5]
drop 3 [1,2] == []
drop 3 [] == []
drop (-1) [1,2] == [1,2]
drop 0 [1,2] == [1,2]

It is an instance of the more general genericDrop, in which n may be of any integral type.

take :: Int -> [a] -> [a] #

take n, applied to a list xs, returns the prefix of xs of length n, or xs itself if n > length xs:

take 5 "Hello World!" == "Hello"
take 3 [1,2,3,4,5] == [1,2,3]
take 3 [1,2] == [1,2]
take 3 [] == []
take (-1) [1,2] == []
take 0 [1,2] == []

It is an instance of the more general genericTake, in which n may be of any integral type.

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.

replicate :: Int -> a -> [a] #

replicate n x is a list of length n with x the value of every element. It is an instance of the more general genericReplicate, in which n may be of any integral type.

repeat :: a -> [a] #

repeat x is an infinite list, with x the value of every element.

iterate' :: (a -> a) -> a -> [a] #

iterate' is the strict version of iterate.

It ensures that the result of each application of force to weak head normal form before proceeding.

iterate :: (a -> a) -> a -> [a] #

iterate f x returns an infinite list of repeated applications of f to x:

iterate f x == [x, f x, f (f x), ...]

Note that iterate is lazy, potentially leading to thunk build-up if the consumer doesn't force each iterate. See iterate' for a strict variant of this function.

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.

scanl' :: (b -> a -> b) -> b -> [a] -> [b] #

\(\mathcal{O}(n)\). A strictly accumulating version of scanl

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.

foldl1' :: (a -> a -> a) -> [a] -> a #

A strict version of foldl1

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.

uncons :: [a] -> Maybe (a, [a]) #

\(\mathcal{O}(1)\). Decompose a list into its head and tail. If the list is empty, returns Nothing. If the list is non-empty, returns Just (x, xs), where x is the head of the list and xs its tail.

Since: base-4.8.0.0

head :: [a] -> a #

\(\mathcal{O}(1)\). Extract the first element of a list, which must be non-empty.

mapMaybe :: (a -> Maybe b) -> [a] -> [b] #

The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

Examples

Expand

Using mapMaybe f x is a shortcut for catMaybes $ map f x in most cases:

>>> import Text.Read ( readMaybe )
>>> let readMaybeInt = readMaybe :: String -> Maybe Int
>>> mapMaybe readMaybeInt ["1", "Foo", "3"]
[1,3]
>>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
[1,3]

If we map the Just constructor, the entire list should be returned:

>>> mapMaybe Just [1,2,3]
[1,2,3]

catMaybes :: [Maybe a] -> [a] #

The catMaybes function takes a list of Maybes and returns a list of all the Just values.

Examples

Expand

Basic usage:

>>> catMaybes [Just 1, Nothing, Just 3]
[1,3]

When constructing a list of Maybe values, catMaybes can be used to return all of the "success" results (if the list is the result of a map, then mapMaybe would be more appropriate):

>>> import Text.Read ( readMaybe )
>>> [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
[Just 1,Nothing,Just 3]
>>> catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
[1,3]

listToMaybe :: [a] -> Maybe a #

The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

Examples

Expand

Basic usage:

>>> listToMaybe []
Nothing
>>> listToMaybe [9]
Just 9
>>> listToMaybe [1,2,3]
Just 1

Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:

>>> maybeToList $ listToMaybe [5]
[5]
>>> maybeToList $ listToMaybe []
[]

But not on lists with more than one element:

>>> maybeToList $ listToMaybe [1,2,3]
[1]

maybeToList :: Maybe a -> [a] #

The maybeToList function returns an empty list when given Nothing or a singleton list when given Just.

Examples

Expand

Basic usage:

>>> maybeToList (Just 7)
[7]
>>> maybeToList Nothing
[]

One can use maybeToList to avoid pattern matching when combined with a function that (safely) works on lists:

>>> import Text.Read ( readMaybe )
>>> sum $ maybeToList (readMaybe "3")
3
>>> sum $ maybeToList (readMaybe "")
0

fromMaybe :: a -> Maybe a -> a #

The fromMaybe function takes a default value and and Maybe value. If the Maybe is Nothing, it returns the default values; otherwise, it returns the value contained in the Maybe.

Examples

Expand

Basic usage:

>>> fromMaybe "" (Just "Hello, World!")
"Hello, World!"
>>> fromMaybe "" Nothing
""

Read an integer from a string using readMaybe. If we fail to parse an integer, we want to return 0 by default:

>>> import Text.Read ( readMaybe )
>>> fromMaybe 0 (readMaybe "5")
5
>>> fromMaybe 0 (readMaybe "")
0

isNothing :: Maybe a -> Bool #

The isNothing function returns True iff its argument is Nothing.

Examples

Expand

Basic usage:

>>> isNothing (Just 3)
False
>>> isNothing (Just ())
False
>>> isNothing Nothing
True

Only the outer constructor is taken into consideration:

>>> isNothing (Just Nothing)
False

isJust :: Maybe a -> Bool #

The isJust function returns True iff its argument is of the form Just _.

Examples

Expand

Basic usage:

>>> isJust (Just 3)
True
>>> isJust (Just ())
True
>>> isJust Nothing
False

Only the outer constructor is taken into consideration:

>>> isJust (Just Nothing)
True

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
""

bool :: a -> a -> Bool -> a #

Case analysis for the Bool type. bool x y p evaluates to x when p is False, and evaluates to y when p is True.

This is equivalent to if p then y else x; that is, one can think of it as an if-then-else construct with its arguments reordered.

Examples

Expand

Basic usage:

>>> bool "foo" "bar" True
"bar"
>>> bool "foo" "bar" False
"foo"

Confirm that bool x y p and if p then y else x are equivalent:

>>> let p = True; x = "bar"; y = "foo"
>>> bool x y p == if p then y else x
True
>>> let p = False
>>> bool x y p == if p then y else x
True

Since: base-4.7.0.0

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c infixl 0 #

on b u x y runs the binary function b on the results of applying unary function u to two arguments x and y. From the opposite perspective, it transforms two inputs and combines the outputs.

((+) `on` f) x y = f x + f y

Typical usage: sortBy (compare `on` fst).

Algebraic properties:

  • (*) `on` id = (*) -- (if (*) ∉ {⊥, const ⊥})
  • ((*) `on` f) `on` g = (*) `on` (f . g)
  • flip on f . flip on g = flip on (g . f)

void :: Functor f => f a -> f () #

void value discards or ignores the result of evaluation, such as the return value of an IO action.

Using ApplicativeDo: 'void as' can be understood as the do expression

do as
   pure ()

with an inferred Functor constraint.

Examples

Expand

Replace the contents of a Maybe Int with unit:

>>> void Nothing
Nothing
>>> void (Just 3)
Just ()

Replace the contents of an Either Int Int with unit, resulting in an Either Int ():

>>> void (Left 8675309)
Left 8675309
>>> void (Right 8675309)
Right ()

Replace every element of a list with unit:

>>> void [1,2,3]
[(),(),()]

Replace the second element of a pair with unit:

>>> void (1,2)
(1,())

Discard the result of an IO action:

>>> mapM print [1,2]
1
2
[(),()]
>>> void $ mapM print [1,2]
1
2

(<$>) :: Functor f => (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)

swap :: (a, b) -> (b, a) #

Swap the components of a pair.

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

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

ap :: Monad m => m (a -> b) -> m a -> m b #

In many situations, the liftM operations can be replaced by uses of ap, which promotes function application.

return f `ap` x1 `ap` ... `ap` xn

is equivalent to

liftMn f x1 x2 ... xn

liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).

liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).

liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).

liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right. For example,

liftM2 (+) [0,1] [0,2] = [0,2,1,3]
liftM2 (+) (Just 1) Nothing = Nothing

liftM :: Monad m => (a1 -> r) -> m a1 -> m r #

Promote a function to a monad.

when :: Applicative f => Bool -> f () -> f () #

Conditional execution of Applicative expressions. For example,

when debug (putStrLn "Debugging")

will output the string Debugging if the Boolean value debug is True, and otherwise do nothing.

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 #

Same as >>=, but with the arguments interchanged.

(<|>) :: Alternative f => f a -> f a -> f a infixl 3 #

An associative binary operation

class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where #

Monads that also support choice and failure.

Minimal complete definition

Nothing

Methods

mzero :: m a #

The identity of mplus. It should also satisfy the equations

mzero >>= f  =  mzero
v >> mzero   =  mzero

The default definition is

mzero = empty

mplus :: m a -> m a -> m a #

An associative operation. The default definition is

mplus = (<|>)

Instances

Instances details
MonadPlus []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: [a] #

mplus :: [a] -> [a] -> [a] #

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

MonadPlus IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a #

mplus :: IO a -> IO a -> IO a #

MonadPlus Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mzero :: Option a #

mplus :: Option a -> Option a -> Option a #

MonadPlus ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

mzero :: ReadPrec a #

mplus :: ReadPrec a -> ReadPrec a -> ReadPrec a #

MonadPlus ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: ReadP a #

mplus :: ReadP a -> ReadP a -> ReadP a #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a #

mplus :: Seq a -> Seq a -> Seq a #

MonadPlus Vector 
Instance details

Defined in Data.Vector

Methods

mzero :: Vector a #

mplus :: Vector a -> Vector a -> Vector a #

MonadPlus P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: P a #

mplus :: P a -> P a -> P a #

MonadPlus Array 
Instance details

Defined in Data.Primitive.Array

Methods

mzero :: Array a #

mplus :: Array a -> Array a -> Array a #

MonadPlus SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

mzero :: SmallArray a #

mplus :: SmallArray a -> SmallArray a -> SmallArray a #

MonadPlus (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: U1 a #

mplus :: U1 a -> U1 a -> U1 a #

(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: ArrowMonad a a0 #

mplus :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

Monoidal r => MonadPlus (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

mzero :: Covector r a #

mplus :: Covector r a -> Covector r a -> Covector r a #

(Functor v, MonadPlus v) => MonadPlus (Free v) 
Instance details

Defined in Control.Monad.Free

Methods

mzero :: Free v a #

mplus :: Free v a -> Free v a -> Free v a #

MonadPlus m => MonadPlus (Yoneda m) 
Instance details

Defined in Data.Functor.Yoneda

Methods

mzero :: Yoneda m a #

mplus :: Yoneda m a -> Yoneda m a -> Yoneda m a #

MonadPlus f => MonadPlus (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: Rec1 f a #

mplus :: Rec1 f a -> Rec1 f a -> Rec1 f a #

MonadPlus m => MonadPlus (Kleisli m a)

Since: base-4.14.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: Kleisli m a a0 #

mplus :: Kleisli m a a0 -> Kleisli m a a0 -> Kleisli m a a0 #

MonadPlus f => MonadPlus (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mzero :: Ap f a #

mplus :: Ap f a -> Ap f a -> Ap f a #

MonadPlus f => MonadPlus (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mzero :: Alt f a #

mplus :: Alt f a -> Alt f a -> Alt f a #

(Monad m, Error e) => MonadPlus (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

mzero :: ErrorT e m a #

mplus :: ErrorT e m a -> ErrorT e m a -> ErrorT e m a #

(Functor f, MonadPlus m) => MonadPlus (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

mzero :: FreeT f m a #

mplus :: FreeT f m a -> FreeT f m a -> FreeT f m a #

(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: (f :*: g) a #

mplus :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

(MonadPlus f, MonadPlus g) => MonadPlus (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

mzero :: Product f g a #

mplus :: Product f g a -> Product f g a -> Product f g a #

MonadPlus f => MonadPlus (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: M1 i c f a #

mplus :: M1 i c f a -> M1 i c f a -> M1 i c f a #

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.

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.

error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a #

error stops execution and displays an error message.

data SomeException #

The SomeException type is the root of the exception type hierarchy. When an exception of type e is thrown, behind the scenes it is encapsulated in a SomeException.

Instances

Instances details
Show SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

(&&) :: Bool -> Bool -> Bool infixr 3 #

Boolean "and", lazy in the second argument

(||) :: Bool -> Bool -> Bool infixr 2 #

Boolean "or", lazy in the second argument

not :: Bool -> Bool #

Boolean "not"

data ByteString #

A space-efficient representation of a Word8 vector, supporting many efficient operations.

A ByteString contains 8-bit bytes, or by using the operations from Data.ByteString.Char8 it can be interpreted as containing 8-bit characters.

Instances

Instances details
IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Internal

Associated Types

type Item ByteString #

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal

Data ByteString 
Instance details

Defined in Data.ByteString.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteString -> c ByteString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString #

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal

Read ByteString 
Instance details

Defined in Data.ByteString.Internal

Show ByteString 
Instance details

Defined in Data.ByteString.Internal

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal

NFData ByteString 
Instance details

Defined in Data.ByteString.Internal

Methods

rnf :: ByteString -> () #

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Ixed ByteString 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index ByteString -> Traversal' ByteString (IxValue ByteString)

Strict ByteString ByteString 
Instance details

Defined in Control.Lens.Iso

type Item ByteString 
Instance details

Defined in Data.ByteString.Internal

type Index ByteString 
Instance details

Defined in Control.Lens.At

type Index ByteString = Int
type IxValue ByteString 
Instance details

Defined in Control.Lens.At

type IxValue ByteString = Word8

data IntMap a #

A map of integers to values a.

Instances

Instances details
Functor IntMap 
Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> IntMap a -> IntMap b #

(<$) :: a -> IntMap b -> IntMap 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 #

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) #

Eq1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool #

Ord1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> IntMap a -> IntMap b -> Ordering #

Read1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (IntMap a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [IntMap a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (IntMap a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [IntMap a] #

Show1 IntMap

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> IntMap a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [IntMap a] -> ShowS #

(Semiring r, Additive b) => Coalgebra r (IntMap b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (IntMap b -> r) -> IntMap b -> IntMap b -> r #

(Commutative r, Semiring r, Abelian b) => CocommutativeCoalgebra r (IntMap b) 
Instance details

Defined in Numeric.Algebra.Commutative

IsList (IntMap a)

Since: containers-0.5.6.2

Instance details

Defined in Data.IntMap.Internal

Associated Types

type Item (IntMap a) #

Methods

fromList :: [Item (IntMap a)] -> IntMap a #

fromListN :: Int -> [Item (IntMap a)] -> IntMap a #

toList :: IntMap a -> [Item (IntMap a)] #

Eq a => Eq (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

(==) :: IntMap a -> IntMap a -> Bool #

(/=) :: IntMap a -> IntMap a -> Bool #

Data a => Data (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntMap a -> c (IntMap a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IntMap a) #

toConstr :: IntMap a -> Constr #

dataTypeOf :: IntMap a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IntMap a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IntMap a)) #

gmapT :: (forall b. Data b => b -> b) -> IntMap a -> IntMap a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntMap a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntMap a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) #

Ord a => Ord (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

compare :: IntMap a -> IntMap a -> Ordering #

(<) :: IntMap a -> IntMap a -> Bool #

(<=) :: IntMap a -> IntMap a -> Bool #

(>) :: IntMap a -> IntMap a -> Bool #

(>=) :: IntMap a -> IntMap a -> Bool #

max :: IntMap a -> IntMap a -> IntMap a #

min :: IntMap a -> IntMap a -> IntMap a #

Read e => Read (IntMap e) 
Instance details

Defined in Data.IntMap.Internal

Show a => Show (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

showsPrec :: Int -> IntMap a -> ShowS #

show :: IntMap a -> String #

showList :: [IntMap a] -> ShowS #

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 #

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 #

NFData a => NFData (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

rnf :: IntMap a -> () #

Wrapped (IntMap a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (IntMap a)

Methods

_Wrapped' :: Iso' (IntMap a) (Unwrapped (IntMap a))

At (IntMap a) 
Instance details

Defined in Control.Lens.At

Methods

at :: Index (IntMap a) -> Lens' (IntMap a) (Maybe (IxValue (IntMap a)))

Ixed (IntMap a) 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index (IntMap a) -> Traversal' (IntMap a) (IxValue (IntMap a))

t ~ IntMap a' => Rewrapped (IntMap a) t 
Instance details

Defined in Control.Lens.Wrapped

type Item (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

type Item (IntMap a) = (Key, a)
type Unwrapped (IntMap a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (IntMap a) = [(Int, a)]
type Index (IntMap a) 
Instance details

Defined in Control.Lens.At

type Index (IntMap a) = Int
type IxValue (IntMap a) 
Instance details

Defined in Control.Lens.At

type IxValue (IntMap a) = a

data IntSet #

A set of integers.

Instances

Instances details
IsList IntSet

Since: containers-0.5.6.2

Instance details

Defined in Data.IntSet.Internal

Associated Types

type Item IntSet #

Eq IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

(==) :: IntSet -> IntSet -> Bool #

(/=) :: IntSet -> IntSet -> Bool #

Data IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntSet -> c IntSet #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntSet #

toConstr :: IntSet -> Constr #

dataTypeOf :: IntSet -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntSet) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntSet) #

gmapT :: (forall b. Data b => b -> b) -> IntSet -> IntSet #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r #

gmapQ :: (forall d. Data d => d -> u) -> IntSet -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> IntSet -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet #

Ord IntSet 
Instance details

Defined in Data.IntSet.Internal

Read IntSet 
Instance details

Defined in Data.IntSet.Internal

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

Semigroup IntSet

Since: containers-0.5.7

Instance details

Defined in Data.IntSet.Internal

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

NFData IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

rnf :: IntSet -> () #

Wrapped IntSet 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped IntSet

Methods

_Wrapped' :: Iso' IntSet (Unwrapped IntSet)

At IntSet 
Instance details

Defined in Control.Lens.At

Methods

at :: Index IntSet -> Lens' IntSet (Maybe (IxValue IntSet))

Contains IntSet 
Instance details

Defined in Control.Lens.At

Methods

contains :: Index IntSet -> Lens' IntSet Bool

Ixed IntSet 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index IntSet -> Traversal' IntSet (IxValue IntSet)

Semiring r => Algebra r IntSet 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: (IntSet -> IntSet -> r) -> IntSet -> r #

Semiring r => Coalgebra r IntSet 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (IntSet -> r) -> IntSet -> IntSet -> r #

(Commutative r, Semiring r) => CocommutativeCoalgebra r IntSet 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative r, Semiring r) => CommutativeAlgebra r IntSet 
Instance details

Defined in Numeric.Algebra.Commutative

(Semiring r, Band r) => IdempotentAlgebra r IntSet 
Instance details

Defined in Numeric.Algebra.Idempotent

t ~ IntSet => Rewrapped IntSet t 
Instance details

Defined in Control.Lens.Wrapped

(Semiring r, Band r) => IdempotentCoalgebra r IntSet 
Instance details

Defined in Numeric.Algebra.Idempotent

type Item IntSet 
Instance details

Defined in Data.IntSet.Internal

type Item IntSet = Key
type Unwrapped IntSet 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped IntSet = [Int]
type Index IntSet 
Instance details

Defined in Control.Lens.At

type Index IntSet = Int
type IxValue IntSet 
Instance details

Defined in Control.Lens.At

type IxValue IntSet = ()

data Map k a #

A Map from keys k to values a.

The Semigroup operation for Map is union, which prefers values from the left operand. If m1 maps a key k to a value a1, and m2 maps the same key to a different value a2, then their union m1 <> m2 maps k to a1.

Instances

Instances details
Bifoldable Map

Since: containers-0.6.3.1

Instance details

Defined in Data.Map.Internal

Methods

bifold :: Monoid m => Map m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Map a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Map a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Map a b -> c #

Eq2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Map a c -> Map b d -> Bool #

Ord2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Map a c -> Map b d -> Ordering #

Show2 Map

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Map a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Map a b] -> ShowS #

(Semiring r, Ord a, Additive b) => Coalgebra r (Map a b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (Map a b -> r) -> Map a b -> Map a b -> r #

(Commutative r, Semiring r, Ord a, Abelian b) => CocommutativeCoalgebra r (Map a b) 
Instance details

Defined in Numeric.Algebra.Commutative

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 #

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 #

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) #

Eq k => Eq1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftEq :: (a -> b -> Bool) -> Map k a -> Map k b -> Bool #

Ord k => Ord1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Map k a -> Map k b -> Ordering #

(Ord k, Read k) => Read1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Map k a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Map k a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Map k a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Map k a] #

Show k => Show1 (Map k)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Map k a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Map k a] -> ShowS #

Ord k => IsList (Map k v)

Since: containers-0.5.6.2

Instance details

Defined in Data.Map.Internal

Associated Types

type Item (Map k v) #

Methods

fromList :: [Item (Map k v)] -> Map k v #

fromListN :: Int -> [Item (Map k v)] -> Map k v #

toList :: Map k v -> [Item (Map k v)] #

(Eq k, Eq a) => Eq (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

(==) :: Map k a -> Map k a -> Bool #

(/=) :: Map k a -> Map k a -> Bool #

(Data k, Data a, Ord k) => Data (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Map k a -> c (Map k a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k a) #

toConstr :: Map k a -> Constr #

dataTypeOf :: Map k a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k a)) #

gmapT :: (forall b. Data b => b -> b) -> Map k a -> Map k a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Map k a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) #

(Ord k, Ord v) => Ord (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

compare :: Map k v -> Map k v -> Ordering #

(<) :: Map k v -> Map k v -> Bool #

(<=) :: Map k v -> Map k v -> Bool #

(>) :: Map k v -> Map k v -> Bool #

(>=) :: Map k v -> Map k v -> Bool #

max :: Map k v -> Map k v -> Map k v #

min :: Map k v -> Map k v -> Map k v #

(Ord k, Read k, Read e) => Read (Map k e) 
Instance details

Defined in Data.Map.Internal

Methods

readsPrec :: Int -> ReadS (Map k e) #

readList :: ReadS [Map k e] #

readPrec :: ReadPrec (Map k e) #

readListPrec :: ReadPrec [Map k e] #

(Show k, Show a) => Show (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

showsPrec :: Int -> Map k a -> ShowS #

show :: Map k a -> String #

showList :: [Map k a] -> ShowS #

Ord k => Semigroup (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

(<>) :: Map k v -> Map k v -> Map k v #

sconcat :: NonEmpty (Map k v) -> Map k v #

stimes :: Integral b => b -> Map k v -> Map k v #

Ord k => 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 #

(NFData k, NFData a) => NFData (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

rnf :: Map k a -> () #

Ord k => Wrapped (Map k a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Map k a)

Methods

_Wrapped' :: Iso' (Map k a) (Unwrapped (Map k a))

Ord k => At (Map k a) 
Instance details

Defined in Control.Lens.At

Methods

at :: Index (Map k a) -> Lens' (Map k a) (Maybe (IxValue (Map k a)))

Ord k => Ixed (Map k a) 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index (Map k a) -> Traversal' (Map k a) (IxValue (Map k a))

(t ~ Map k' a', Ord k) => Rewrapped (Map k a) t 
Instance details

Defined in Control.Lens.Wrapped

type Item (Map k v) 
Instance details

Defined in Data.Map.Internal

type Item (Map k v) = (k, v)
type Unwrapped (Map k a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Map k a) = [(k, a)]
type Index (Map k a) 
Instance details

Defined in Control.Lens.At

type Index (Map k a) = k
type IxValue (Map k a) 
Instance details

Defined in Control.Lens.At

type IxValue (Map k a) = a

data Seq a #

General-purpose finite sequences.

Instances

Instances details
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 #

Functor Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b #

(<$) :: a -> Seq b -> Seq a #

MonadFix Seq

Since: containers-0.5.11

Instance details

Defined in Data.Sequence.Internal

Methods

mfix :: (a -> Seq a) -> Seq a #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

(*>) :: Seq a -> Seq b -> Seq b #

(<*) :: Seq a -> Seq b -> Seq a #

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 #

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) #

Eq1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftEq :: (a -> b -> Bool) -> Seq a -> Seq b -> Bool #

Ord1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Seq a -> Seq b -> Ordering #

Read1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Seq a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Seq a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Seq a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Seq a] #

Show1 Seq

Since: containers-0.5.9

Instance details

Defined in Data.Sequence.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Seq a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Seq a] -> ShowS #

MonadZip Seq
 mzipWith = zipWith
 munzip = unzip
Instance details

Defined in Data.Sequence.Internal

Methods

mzip :: Seq a -> Seq b -> Seq (a, b) #

mzipWith :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

munzip :: Seq (a, b) -> (Seq a, Seq b) #

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a #

(<|>) :: Seq a -> Seq a -> Seq a #

some :: Seq a -> Seq [a] #

many :: Seq a -> Seq [a] #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a #

mplus :: Seq a -> Seq a -> Seq a #

UnzipWith Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b)

Semiring r => Algebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: (Seq a -> Seq a -> r) -> Seq a -> r #

Semiring r => Coalgebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (Seq a -> r) -> Seq a -> Seq a -> r #

(Monoidal r, Semiring r) => Bialgebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Unital

Semiring r => CounitalCoalgebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

counit :: (Seq a -> r) -> r #

(Monoidal r, Semiring r) => UnitalAlgebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

unit :: r -> Seq a -> r #

IsList (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Associated Types

type Item (Seq a) #

Methods

fromList :: [Item (Seq a)] -> Seq a #

fromListN :: Int -> [Item (Seq a)] -> Seq a #

toList :: Seq a -> [Item (Seq a)] #

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

(==) :: Seq a -> Seq a -> Bool #

(/=) :: Seq a -> Seq a -> Bool #

Data a => Data (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seq a -> c (Seq a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) #

toConstr :: Seq a -> Constr #

dataTypeOf :: Seq a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) #

gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) #

Ord a => Ord (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

compare :: Seq a -> Seq a -> Ordering #

(<) :: Seq a -> Seq a -> Bool #

(<=) :: Seq a -> Seq a -> Bool #

(>) :: Seq a -> Seq a -> Bool #

(>=) :: Seq a -> Seq a -> Bool #

max :: Seq a -> Seq a -> Seq a #

min :: Seq a -> Seq a -> Seq a #

Read a => Read (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS #

show :: Seq a -> String #

showList :: [Seq a] -> ShowS #

a ~ Char => IsString (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

fromString :: String -> Seq a #

Semigroup (Seq a)

Since: containers-0.5.7

Instance details

Defined in Data.Sequence.Internal

Methods

(<>) :: Seq a -> Seq a -> Seq a #

sconcat :: NonEmpty (Seq a) -> Seq a #

stimes :: Integral b => b -> Seq a -> Seq a #

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 #

NFData a => NFData (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

rnf :: Seq a -> () #

Wrapped (Seq a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Seq a)

Methods

_Wrapped' :: Iso' (Seq a) (Unwrapped (Seq a))

Ixed (Seq a) 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index (Seq a) -> Traversal' (Seq a) (IxValue (Seq a))

t ~ Seq a' => Rewrapped (Seq a) t 
Instance details

Defined in Control.Lens.Wrapped

type Item (Seq a) 
Instance details

Defined in Data.Sequence.Internal

type Item (Seq a) = a
type Unwrapped (Seq a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Seq a) = [a]
type Index (Seq a) 
Instance details

Defined in Control.Lens.At

type Index (Seq a) = Int
type IxValue (Seq a) 
Instance details

Defined in Control.Lens.At

type IxValue (Seq a) = a

data Set a #

A set of values a.

Instances

Instances details
Foldable Set

Folds in order of increasing key.

Instance details

Defined in Data.Set.Internal

Methods

fold :: Monoid m => Set m -> m #

foldMap :: Monoid m => (a -> m) -> Set a -> m #

foldMap' :: Monoid m => (a -> m) -> Set a -> m #

foldr :: (a -> b -> b) -> b -> Set a -> b #

foldr' :: (a -> b -> b) -> b -> Set a -> b #

foldl :: (b -> a -> b) -> b -> Set a -> b #

foldl' :: (b -> a -> b) -> b -> Set a -> b #

foldr1 :: (a -> a -> a) -> Set a -> a #

foldl1 :: (a -> a -> a) -> Set a -> a #

toList :: Set a -> [a] #

null :: Set a -> Bool #

length :: Set a -> Int #

elem :: Eq a => a -> Set a -> Bool #

maximum :: Ord a => Set a -> a #

minimum :: Ord a => Set a -> a #

sum :: Num a => Set a -> a #

product :: Num a => Set a -> a #

Eq1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftEq :: (a -> b -> Bool) -> Set a -> Set b -> Bool #

Ord1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> Set a -> Set b -> Ordering #

Show1 Set

Since: containers-0.5.9

Instance details

Defined in Data.Set.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Set a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Set a] -> ShowS #

(Semiring r, Ord a) => Algebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: (Set a -> Set a -> r) -> Set a -> r #

(Semiring r, Ord a) => Coalgebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (Set a -> r) -> Set a -> Set a -> r #

(Commutative r, Semiring r, Ord a) => CocommutativeCoalgebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative r, Semiring r, Ord a) => CommutativeAlgebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Commutative

(Semiring r, Band r, Ord a) => IdempotentAlgebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Idempotent

(Semiring r, Band r, Ord c) => IdempotentCoalgebra r (Set c) 
Instance details

Defined in Numeric.Algebra.Idempotent

Ord a => IsList (Set a)

Since: containers-0.5.6.2

Instance details

Defined in Data.Set.Internal

Associated Types

type Item (Set a) #

Methods

fromList :: [Item (Set a)] -> Set a #

fromListN :: Int -> [Item (Set a)] -> Set a #

toList :: Set a -> [Item (Set a)] #

Eq a => Eq (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

(==) :: Set a -> Set a -> Bool #

(/=) :: Set a -> Set a -> Bool #

(Data a, Ord a) => Data (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Set a -> c (Set a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Set a) #

toConstr :: Set a -> Constr #

dataTypeOf :: Set a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Set a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Set a)) #

gmapT :: (forall b. Data b => b -> b) -> Set a -> Set a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Set a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Set a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) #

Ord a => Ord (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

compare :: Set a -> Set a -> Ordering #

(<) :: Set a -> Set a -> Bool #

(<=) :: Set a -> Set a -> Bool #

(>) :: Set a -> Set a -> Bool #

(>=) :: Set a -> Set a -> Bool #

max :: Set a -> Set a -> Set a #

min :: Set a -> Set a -> Set a #

(Read a, Ord a) => Read (Set a) 
Instance details

Defined in Data.Set.Internal

Show a => Show (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

Ord a => Semigroup (Set a)

Since: containers-0.5.7

Instance details

Defined in Data.Set.Internal

Methods

(<>) :: Set a -> Set a -> Set a #

sconcat :: NonEmpty (Set a) -> Set a #

stimes :: Integral b => b -> Set a -> Set a #

Ord a => 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 #

NFData a => NFData (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

rnf :: Set a -> () #

Ord a => LocallyFiniteOrder (Set a) 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Set a -> Set a -> [Set a]

rangeSize :: Set a -> Set a -> Natural

moebiusInversion :: Ring r => Set a -> Set a -> r

Ord a => Wrapped (Set a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Set a)

Methods

_Wrapped' :: Iso' (Set a) (Unwrapped (Set a))

Ord k => At (Set k) 
Instance details

Defined in Control.Lens.At

Methods

at :: Index (Set k) -> Lens' (Set k) (Maybe (IxValue (Set k)))

Ord a => Contains (Set a) 
Instance details

Defined in Control.Lens.At

Methods

contains :: Index (Set a) -> Lens' (Set a) Bool

Ord k => Ixed (Set k) 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index (Set k) -> Traversal' (Set k) (IxValue (Set k))

(t ~ Set a', Ord a) => Rewrapped (Set a) t 
Instance details

Defined in Control.Lens.Wrapped

type Item (Set a) 
Instance details

Defined in Data.Set.Internal

type Item (Set a) = a
type Unwrapped (Set a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Set a) = [a]
type Index (Set a) 
Instance details

Defined in Control.Lens.At

type Index (Set a) = a
type IxValue (Set k) 
Instance details

Defined in Control.Lens.At

type IxValue (Set k) = ()

(</>) :: FilePath -> FilePath -> FilePath infixr 5 #

Combine two paths with a path separator. If the second path starts with a path separator or a drive letter, then it returns the second. The intention is that readFile (dir </> file) will access the same file as setCurrentDirectory dir; readFile file.

Posix:   "/directory" </> "file.ext" == "/directory/file.ext"
Windows: "/directory" </> "file.ext" == "/directory\\file.ext"
         "directory" </> "/file.ext" == "/file.ext"
Valid x => (takeDirectory x </> takeFileName x) `equalFilePath` x

Combined:

Posix:   "/" </> "test" == "/test"
Posix:   "home" </> "bob" == "home/bob"
Posix:   "x:" </> "foo" == "x:/foo"
Windows: "C:\\foo" </> "bar" == "C:\\foo\\bar"
Windows: "home" </> "bob" == "home\\bob"

Not combined:

Posix:   "home" </> "/bob" == "/bob"
Windows: "home" </> "C:\\bob" == "C:\\bob"

Not combined (tricky):

On Windows, if a filepath starts with a single slash, it is relative to the root of the current drive. In [1], this is (confusingly) referred to as an absolute path. The current behavior of </> is to never combine these forms.

Windows: "home" </> "/bob" == "/bob"
Windows: "home" </> "\\bob" == "\\bob"
Windows: "C:\\home" </> "\\bob" == "\\bob"

On Windows, from [1]: "If a file name begins with only a disk designator but not the backslash after the colon, it is interpreted as a relative path to the current directory on the drive with the specified letter." The current behavior of </> is to never combine these forms.

Windows: "D:\\foo" </> "C:bar" == "C:bar"
Windows: "C:\\foo" </> "C:bar" == "C:bar"

(<.>) :: FilePath -> String -> FilePath infixr 7 #

Add an extension, even if there is already one there, equivalent to addExtension.

"/directory/path" <.> "ext" == "/directory/path.ext"
"/directory/path" <.> ".ext" == "/directory/path.ext"

lift :: (MonadTrans t, Monad m) => m a -> t m a #

Lift a computation from the argument monad to the constructed monad.

encodeUtf8 :: Text -> ByteString #

Encode text using UTF-8 encoding.

data Text #

A space efficient, packed, unboxed Unicode text type.

Instances

Instances details
Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

Ixed Text 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index Text -> Traversal' Text (IxValue Text)

Strict Text Text 
Instance details

Defined in Control.Lens.Iso

Methods

strict :: Iso' Text0 Text

type Item Text 
Instance details

Defined in Data.Text

type Item Text = Char
type Index Text 
Instance details

Defined in Control.Lens.At

type Index Text = Int
type IxValue Text 
Instance details

Defined in Control.Lens.At

type IxValue Text = Char

(++) :: Monoid w => w -> w -> w #

appendFile :: MonadIO m => FilePath -> Text -> m () #

concat :: Monoid w => [w] -> w #

empty :: Monoid w => w #

getChar :: MonadIO m => m Char #

intercalate :: Monoid w => w -> [w] -> w #

map :: Functor f => (a -> b) -> f a -> f b #

putChar :: MonadIO m => Char -> m () #

readIO :: (MonadIO m, Read a) => Text -> m a #

readLn :: (MonadIO m, Read a) => m a #

readMay :: Read a => Text -> Maybe a #

tshow :: Show a => a -> Text #

equating :: Eq a => (b -> a) -> b -> b -> Bool #

print :: (MonadIO m, Show a) => a -> m () #

type LText = Text #

type SVector = Vector #

type UVector = Vector #

class Hashable a where #

Minimal complete definition

Nothing

Methods

hashWithSalt :: Int -> a -> Int #

hash :: a -> Int #

Instances

Instances details
Hashable Bool 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Bool -> Int #

hash :: Bool -> Int #

Hashable Char 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Char -> Int #

hash :: Char -> Int #

Hashable Double 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Double -> Int #

hash :: Double -> Int #

Hashable Float 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Float -> Int #

hash :: Float -> Int #

Hashable Int 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int -> Int #

hash :: Int -> Int #

Hashable Int8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int8 -> Int #

hash :: Int8 -> Int #

Hashable Int16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int16 -> Int #

hash :: Int16 -> Int #

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int #

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int #

hash :: Int64 -> Int #

Hashable Integer 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Integer -> Int #

hash :: Integer -> Int #

Hashable Natural 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Natural -> Int #

hash :: Natural -> Int #

Hashable Ordering 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ordering -> Int #

hash :: Ordering -> Int #

Hashable Word 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word -> Int #

hash :: Word -> Int #

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int #

hash :: Word8 -> Int #

Hashable Word16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word16 -> Int #

hash :: Word16 -> Int #

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int #

hash :: Word32 -> Int #

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int #

hash :: Word64 -> Int #

Hashable SomeTypeRep 
Instance details

Defined in Data.Hashable.Class

Hashable () 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> () -> Int #

hash :: () -> Int #

Hashable Void 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Void -> Int #

hash :: Void -> Int #

Hashable Unique 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Unique -> Int #

hash :: Unique -> Int #

Hashable Version 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Version -> Int #

hash :: Version -> Int #

Hashable ThreadId 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> ThreadId -> Int #

hash :: ThreadId -> Int #

Hashable WordPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> WordPtr -> Int #

hash :: WordPtr -> Int #

Hashable IntPtr 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> IntPtr -> Int #

hash :: IntPtr -> Int #

Hashable Fingerprint 
Instance details

Defined in Data.Hashable.Class

Hashable ShortByteString 
Instance details

Defined in Data.Hashable.Class

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Hashable BigNat 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> BigNat -> Int #

hash :: BigNat -> Int #

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

Hashable a => Hashable [a] 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> [a] -> Int #

hash :: [a] -> Int #

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int #

Hashable a => Hashable (Ratio a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ratio a -> Int #

hash :: Ratio a -> Int #

Hashable (Ptr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Ptr a -> Int #

hash :: Ptr a -> Int #

Hashable (FunPtr a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> FunPtr a -> Int #

hash :: FunPtr a -> Int #

Hashable a => Hashable (Complex a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Complex a -> Int #

hash :: Complex a -> Int #

Hashable a => Hashable (Min a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Min a -> Int #

hash :: Min a -> Int #

Hashable a => Hashable (Max a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Max a -> Int #

hash :: Max a -> Int #

Hashable a => Hashable (First a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> First a -> Int #

hash :: First a -> Int #

Hashable a => Hashable (Last a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Last a -> Int #

hash :: Last a -> Int #

Hashable a => Hashable (WrappedMonoid a) 
Instance details

Defined in Data.Hashable.Class

Hashable a => Hashable (Option a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Option a -> Int #

hash :: Option a -> Int #

Hashable (StableName a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> StableName a -> Int #

hash :: StableName a -> Int #

Hashable a => Hashable (Identity a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Identity a -> Int #

hash :: Identity a -> Int #

Hashable a => Hashable (NonEmpty a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> NonEmpty a -> Int #

hash :: NonEmpty a -> Int #

Hashable a => Hashable (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

hashWithSalt :: Int -> HashSet a -> Int #

hash :: HashSet a -> Int #

Hashable (Hashed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Hashed a -> Int #

hash :: Hashed a -> Int #

(Hashable a, Hashable b) => Hashable (Either a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Either a b -> Int #

hash :: Either a b -> Int #

Hashable (TypeRep a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> TypeRep a -> Int #

hash :: TypeRep a -> Int #

(Hashable a1, Hashable a2) => Hashable (a1, a2) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2) -> Int #

hash :: (a1, a2) -> Int #

Hashable (Fixed a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Fixed a -> Int #

hash :: Fixed a -> Int #

Hashable a => Hashable (Arg a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Arg a b -> Int #

hash :: Arg a b -> Int #

Hashable (Proxy a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Proxy a -> Int #

hash :: Proxy a -> Int #

(Hashable k, Hashable v) => Hashable (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

hashWithSalt :: Int -> HashMap k v -> Int #

hash :: HashMap k v -> Int #

(Hashable a1, Hashable a2, Hashable a3) => Hashable (a1, a2, a3) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3) -> Int #

hash :: (a1, a2, a3) -> Int #

Hashable a => Hashable (Const a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Const a b -> Int #

hash :: Const a b -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4) => Hashable (a1, a2, a3, a4) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4) -> Int #

hash :: (a1, a2, a3, a4) -> Int #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Product f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Product f g a -> Int #

hash :: Product f g a -> Int #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Sum f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Sum f g a -> Int #

hash :: Sum f g a -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5) => Hashable (a1, a2, a3, a4, a5) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5) -> Int #

hash :: (a1, a2, a3, a4, a5) -> Int #

(Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Compose f g a -> Int #

hash :: Compose f g a -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable (a1, a2, a3, a4, a5, a6) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6) -> Int #

hash :: (a1, a2, a3, a4, a5, a6) -> Int #

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6, Hashable a7) => Hashable (a1, a2, a3, a4, a5, a6, a7) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> (a1, a2, a3, a4, a5, a6, a7) -> Int #

hash :: (a1, a2, a3, a4, a5, a6, a7) -> Int #

data HashMap k v #

Instances

Instances details
Bifoldable HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

bifold :: Monoid m => HashMap m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> HashMap a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> HashMap a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> HashMap a b -> c #

Eq2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> HashMap a c -> HashMap b d -> Bool #

Ord2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> HashMap a c -> HashMap b d -> Ordering #

Show2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> HashMap a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [HashMap a b] -> ShowS #

NFData2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> HashMap a b -> () #

Hashable2 HashMap 
Instance details

Defined in Data.HashMap.Internal

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> HashMap a b -> Int

Functor (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fmap :: (a -> b) -> HashMap k a -> HashMap k b #

(<$) :: a -> HashMap k b -> HashMap k a #

Foldable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

fold :: Monoid m => HashMap k m -> m #

foldMap :: Monoid m => (a -> m) -> HashMap k a -> m #

foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m #

foldr :: (a -> b -> b) -> b -> HashMap k a -> b #

foldr' :: (a -> b -> b) -> b -> HashMap k a -> b #

foldl :: (b -> a -> b) -> b -> HashMap k a -> b #

foldl' :: (b -> a -> b) -> b -> HashMap k a -> b #

foldr1 :: (a -> a -> a) -> HashMap k a -> a #

foldl1 :: (a -> a -> a) -> HashMap k a -> a #

toList :: HashMap k a -> [a] #

null :: HashMap k a -> Bool #

length :: HashMap k a -> Int #

elem :: Eq a => a -> HashMap k a -> Bool #

maximum :: Ord a => HashMap k a -> a #

minimum :: Ord a => HashMap k a -> a #

sum :: Num a => HashMap k a -> a #

product :: Num a => HashMap k a -> a #

Traversable (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

traverse :: Applicative f => (a -> f b) -> HashMap k a -> f (HashMap k b) #

sequenceA :: Applicative f => HashMap k (f a) -> f (HashMap k a) #

mapM :: Monad m => (a -> m b) -> HashMap k a -> m (HashMap k b) #

sequence :: Monad m => HashMap k (m a) -> m (HashMap k a) #

Eq k => Eq1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashMap k a -> HashMap k b -> Bool #

Ord k => Ord1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashMap k a -> HashMap k b -> Ordering #

(Eq k, Hashable k, Read k) => Read1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (HashMap k a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [HashMap k a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (HashMap k a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [HashMap k a] #

Show k => Show1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashMap k a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashMap k a] -> ShowS #

NFData k => NFData1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftRnf :: (a -> ()) -> HashMap k a -> () #

Hashable k => Hashable1 (HashMap k) 
Instance details

Defined in Data.HashMap.Internal

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> HashMap k a -> Int

(Eq k, Hashable k) => IsList (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Associated Types

type Item (HashMap k v) #

Methods

fromList :: [Item (HashMap k v)] -> HashMap k v #

fromListN :: Int -> [Item (HashMap k v)] -> HashMap k v #

toList :: HashMap k v -> [Item (HashMap k v)] #

(Eq k, Eq v) => Eq (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

(==) :: HashMap k v -> HashMap k v -> Bool #

(/=) :: HashMap k v -> HashMap k v -> Bool #

(Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashMap k v -> c (HashMap k v) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashMap k v) #

toConstr :: HashMap k v -> Constr #

dataTypeOf :: HashMap k v -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashMap k v)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashMap k v)) #

gmapT :: (forall b. Data b => b -> b) -> HashMap k v -> HashMap k v #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r #

gmapQ :: (forall d. Data d => d -> u) -> HashMap k v -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashMap k v -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) #

(Ord k, Ord v) => Ord (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

compare :: HashMap k v -> HashMap k v -> Ordering #

(<) :: HashMap k v -> HashMap k v -> Bool #

(<=) :: HashMap k v -> HashMap k v -> Bool #

(>) :: HashMap k v -> HashMap k v -> Bool #

(>=) :: HashMap k v -> HashMap k v -> Bool #

max :: HashMap k v -> HashMap k v -> HashMap k v #

min :: HashMap k v -> HashMap k v -> HashMap k v #

(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) 
Instance details

Defined in Data.HashMap.Internal

(Show k, Show v) => Show (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

showsPrec :: Int -> HashMap k v -> ShowS #

show :: HashMap k v -> String #

showList :: [HashMap k v] -> ShowS #

(Eq k, Hashable k) => Semigroup (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

(<>) :: HashMap k v -> HashMap k v -> HashMap k v #

sconcat :: NonEmpty (HashMap k v) -> HashMap k v #

stimes :: Integral b => b -> HashMap k v -> HashMap k v #

(Eq k, Hashable k) => Monoid (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

mempty :: HashMap k v #

mappend :: HashMap k v -> HashMap k v -> HashMap k v #

mconcat :: [HashMap k v] -> HashMap k v #

(NFData k, NFData v) => NFData (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

rnf :: HashMap k v -> () #

(Hashable k, Hashable v) => Hashable (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

Methods

hashWithSalt :: Int -> HashMap k v -> Int #

hash :: HashMap k v -> Int #

(Hashable k, Eq k) => Wrapped (HashMap k a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (HashMap k a)

Methods

_Wrapped' :: Iso' (HashMap k a) (Unwrapped (HashMap k a))

(Eq k, Hashable k) => At (HashMap k a) 
Instance details

Defined in Control.Lens.At

Methods

at :: Index (HashMap k a) -> Lens' (HashMap k a) (Maybe (IxValue (HashMap k a)))

(Eq k, Hashable k) => Ixed (HashMap k a) 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index (HashMap k a) -> Traversal' (HashMap k a) (IxValue (HashMap k a))

(t ~ HashMap k' a', Hashable k, Eq k) => Rewrapped (HashMap k a) t 
Instance details

Defined in Control.Lens.Wrapped

type Item (HashMap k v) 
Instance details

Defined in Data.HashMap.Internal

type Item (HashMap k v) = (k, v)
type Unwrapped (HashMap k a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (HashMap k a) = [(k, a)]
type Index (HashMap k a) 
Instance details

Defined in Control.Lens.At

type Index (HashMap k a) = k
type IxValue (HashMap k a) 
Instance details

Defined in Control.Lens.At

type IxValue (HashMap k a) = a

data HashSet a #

Instances

Instances details
Foldable HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

fold :: Monoid m => HashSet m -> m #

foldMap :: Monoid m => (a -> m) -> HashSet a -> m #

foldMap' :: Monoid m => (a -> m) -> HashSet a -> m #

foldr :: (a -> b -> b) -> b -> HashSet a -> b #

foldr' :: (a -> b -> b) -> b -> HashSet a -> b #

foldl :: (b -> a -> b) -> b -> HashSet a -> b #

foldl' :: (b -> a -> b) -> b -> HashSet a -> b #

foldr1 :: (a -> a -> a) -> HashSet a -> a #

foldl1 :: (a -> a -> a) -> HashSet a -> a #

toList :: HashSet a -> [a] #

null :: HashSet a -> Bool #

length :: HashSet a -> Int #

elem :: Eq a => a -> HashSet a -> Bool #

maximum :: Ord a => HashSet a -> a #

minimum :: Ord a => HashSet a -> a #

sum :: Num a => HashSet a -> a #

product :: Num a => HashSet a -> a #

Eq1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftEq :: (a -> b -> Bool) -> HashSet a -> HashSet b -> Bool #

Ord1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftCompare :: (a -> b -> Ordering) -> HashSet a -> HashSet b -> Ordering #

Show1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> HashSet a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [HashSet a] -> ShowS #

NFData1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftRnf :: (a -> ()) -> HashSet a -> () #

Hashable1 HashSet 
Instance details

Defined in Data.HashSet.Internal

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> HashSet a -> Int

(Eq a, Hashable a) => IsList (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Associated Types

type Item (HashSet a) #

Methods

fromList :: [Item (HashSet a)] -> HashSet a #

fromListN :: Int -> [Item (HashSet a)] -> HashSet a #

toList :: HashSet a -> [Item (HashSet a)] #

Eq a => Eq (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

(==) :: HashSet a -> HashSet a -> Bool #

(/=) :: HashSet a -> HashSet a -> Bool #

(Data a, Eq a, Hashable a) => Data (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashSet a -> c (HashSet a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashSet a) #

toConstr :: HashSet a -> Constr #

dataTypeOf :: HashSet a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashSet a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashSet a)) #

gmapT :: (forall b. Data b => b -> b) -> HashSet a -> HashSet a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r #

gmapQ :: (forall d. Data d => d -> u) -> HashSet a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashSet a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) #

Ord a => Ord (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

compare :: HashSet a -> HashSet a -> Ordering #

(<) :: HashSet a -> HashSet a -> Bool #

(<=) :: HashSet a -> HashSet a -> Bool #

(>) :: HashSet a -> HashSet a -> Bool #

(>=) :: HashSet a -> HashSet a -> Bool #

max :: HashSet a -> HashSet a -> HashSet a #

min :: HashSet a -> HashSet a -> HashSet a #

(Eq a, Hashable a, Read a) => Read (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Show a => Show (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

showsPrec :: Int -> HashSet a -> ShowS #

show :: HashSet a -> String #

showList :: [HashSet a] -> ShowS #

(Hashable a, Eq a) => Semigroup (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

(<>) :: HashSet a -> HashSet a -> HashSet a #

sconcat :: NonEmpty (HashSet a) -> HashSet a #

stimes :: Integral b => b -> HashSet a -> HashSet a #

(Hashable a, Eq a) => Monoid (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

mempty :: HashSet a #

mappend :: HashSet a -> HashSet a -> HashSet a #

mconcat :: [HashSet a] -> HashSet a #

NFData a => NFData (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

rnf :: HashSet a -> () #

Hashable a => Hashable (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

Methods

hashWithSalt :: Int -> HashSet a -> Int #

hash :: HashSet a -> Int #

(Hashable a, Eq a) => Wrapped (HashSet a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (HashSet a)

Methods

_Wrapped' :: Iso' (HashSet a) (Unwrapped (HashSet a))

(Eq k, Hashable k) => At (HashSet k) 
Instance details

Defined in Control.Lens.At

Methods

at :: Index (HashSet k) -> Lens' (HashSet k) (Maybe (IxValue (HashSet k)))

(Eq a, Hashable a) => Contains (HashSet a) 
Instance details

Defined in Control.Lens.At

Methods

contains :: Index (HashSet a) -> Lens' (HashSet a) Bool

(Eq k, Hashable k) => Ixed (HashSet k) 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index (HashSet k) -> Traversal' (HashSet k) (IxValue (HashSet k))

(t ~ HashSet a', Hashable a, Eq a) => Rewrapped (HashSet a) t 
Instance details

Defined in Control.Lens.Wrapped

type Item (HashSet a) 
Instance details

Defined in Data.HashSet.Internal

type Item (HashSet a) = a
type Unwrapped (HashSet a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (HashSet a) = [a]
type Index (HashSet a) 
Instance details

Defined in Control.Lens.At

type Index (HashSet a) = a
type IxValue (HashSet k) 
Instance details

Defined in Control.Lens.At

type IxValue (HashSet k) = ()

data Vector a #

Instances

Instances details
Monad Vector 
Instance details

Defined in Data.Vector

Methods

(>>=) :: Vector a -> (a -> Vector b) -> Vector b #

(>>) :: Vector a -> Vector b -> Vector b #

return :: a -> Vector a #

Functor Vector 
Instance details

Defined in Data.Vector

Methods

fmap :: (a -> b) -> Vector a -> Vector b #

(<$) :: a -> Vector b -> Vector a #

MonadFix Vector 
Instance details

Defined in Data.Vector

Methods

mfix :: (a -> Vector a) -> Vector a #

MonadFail Vector 
Instance details

Defined in Data.Vector

Methods

fail :: String -> Vector a #

Applicative Vector 
Instance details

Defined in Data.Vector

Methods

pure :: a -> Vector a #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

(*>) :: Vector a -> Vector b -> Vector b #

(<*) :: Vector a -> Vector b -> Vector a #

Foldable Vector 
Instance details

Defined in Data.Vector

Methods

fold :: Monoid m => Vector m -> m #

foldMap :: Monoid m => (a -> m) -> Vector a -> m #

foldMap' :: Monoid m => (a -> m) -> Vector a -> m #

foldr :: (a -> b -> b) -> b -> Vector a -> b #

foldr' :: (a -> b -> b) -> b -> Vector a -> b #

foldl :: (b -> a -> b) -> b -> Vector a -> b #

foldl' :: (b -> a -> b) -> b -> Vector a -> b #

foldr1 :: (a -> a -> a) -> Vector a -> a #

foldl1 :: (a -> a -> a) -> Vector a -> a #

toList :: Vector a -> [a] #

null :: Vector a -> Bool #

length :: Vector a -> Int #

elem :: Eq a => a -> Vector a -> Bool #

maximum :: Ord a => Vector a -> a #

minimum :: Ord a => Vector a -> a #

sum :: Num a => Vector a -> a #

product :: Num a => Vector a -> a #

Traversable Vector 
Instance details

Defined in Data.Vector

Methods

traverse :: Applicative f => (a -> f b) -> Vector a -> f (Vector b) #

sequenceA :: Applicative f => Vector (f a) -> f (Vector a) #

mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b) #

sequence :: Monad m => Vector (m a) -> m (Vector a) #

Eq1 Vector 
Instance details

Defined in Data.Vector

Methods

liftEq :: (a -> b -> Bool) -> Vector a -> Vector b -> Bool #

Ord1 Vector 
Instance details

Defined in Data.Vector

Methods

liftCompare :: (a -> b -> Ordering) -> Vector a -> Vector b -> Ordering #

Read1 Vector 
Instance details

Defined in Data.Vector

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Vector a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Vector a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Vector a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Vector a] #

Show1 Vector 
Instance details

Defined in Data.Vector

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Vector a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Vector a] -> ShowS #

MonadZip Vector 
Instance details

Defined in Data.Vector

Methods

mzip :: Vector a -> Vector b -> Vector (a, b) #

mzipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

munzip :: Vector (a, b) -> (Vector a, Vector b) #

Alternative Vector 
Instance details

Defined in Data.Vector

Methods

empty :: Vector a #

(<|>) :: Vector a -> Vector a -> Vector a #

some :: Vector a -> Vector [a] #

many :: Vector a -> Vector [a] #

MonadPlus Vector 
Instance details

Defined in Data.Vector

Methods

mzero :: Vector a #

mplus :: Vector a -> Vector a -> Vector a #

NFData1 Vector 
Instance details

Defined in Data.Vector

Methods

liftRnf :: (a -> ()) -> Vector a -> () #

Vector Vector a 
Instance details

Defined in Data.Vector

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) a -> m (Vector a)

basicUnsafeThaw :: PrimMonad m => Vector a -> m (Mutable Vector (PrimState m) a)

basicLength :: Vector a -> Int

basicUnsafeSlice :: Int -> Int -> Vector a -> Vector a

basicUnsafeIndexM :: Monad m => Vector a -> Int -> m a

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) a -> Vector a -> m ()

elemseq :: Vector a -> a -> b -> b

IsList (Vector a) 
Instance details

Defined in Data.Vector

Associated Types

type Item (Vector a) #

Methods

fromList :: [Item (Vector a)] -> Vector a #

fromListN :: Int -> [Item (Vector a)] -> Vector a #

toList :: Vector a -> [Item (Vector a)] #

Eq a => Eq (Vector a) 
Instance details

Defined in Data.Vector

Methods

(==) :: Vector a -> Vector a -> Bool #

(/=) :: Vector a -> Vector a -> Bool #

Data a => Data (Vector a) 
Instance details

Defined in Data.Vector

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vector a -> c (Vector a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vector a) #

toConstr :: Vector a -> Constr #

dataTypeOf :: Vector a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vector a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vector a)) #

gmapT :: (forall b. Data b => b -> b) -> Vector a -> Vector a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vector a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vector a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vector a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vector a -> m (Vector a) #

Ord a => Ord (Vector a) 
Instance details

Defined in Data.Vector

Methods

compare :: Vector a -> Vector a -> Ordering #

(<) :: Vector a -> Vector a -> Bool #

(<=) :: Vector a -> Vector a -> Bool #

(>) :: Vector a -> Vector a -> Bool #

(>=) :: Vector a -> Vector a -> Bool #

max :: Vector a -> Vector a -> Vector a #

min :: Vector a -> Vector a -> Vector a #

Read a => Read (Vector a) 
Instance details

Defined in Data.Vector

Show a => Show (Vector a) 
Instance details

Defined in Data.Vector

Methods

showsPrec :: Int -> Vector a -> ShowS #

show :: Vector a -> String #

showList :: [Vector a] -> ShowS #

Semigroup (Vector a) 
Instance details

Defined in Data.Vector

Methods

(<>) :: Vector a -> Vector a -> Vector a #

sconcat :: NonEmpty (Vector a) -> Vector a #

stimes :: Integral b => b -> Vector a -> Vector a #

Monoid (Vector a) 
Instance details

Defined in Data.Vector

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

NFData a => NFData (Vector a) 
Instance details

Defined in Data.Vector

Methods

rnf :: Vector a -> () #

Wrapped (Vector a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Vector a)

Methods

_Wrapped' :: Iso' (Vector a) (Unwrapped (Vector a))

Ixed (Vector a) 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index (Vector a) -> Traversal' (Vector a) (IxValue (Vector a))

t ~ Vector a' => Rewrapped (Vector a) t 
Instance details

Defined in Control.Lens.Wrapped

type Mutable Vector 
Instance details

Defined in Data.Vector

type Mutable Vector = MVector
type Item (Vector a) 
Instance details

Defined in Data.Vector

type Item (Vector a) = a
type Unwrapped (Vector a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Vector a) = [a]
type Index (Vector a) 
Instance details

Defined in Control.Lens.At

type Index (Vector a) = Int
type IxValue (Vector a) 
Instance details

Defined in Control.Lens.At

type IxValue (Vector a) = a

class (Vector Vector a, MVector MVector a) => Unbox a #

Instances

Instances details
Unbox Bool 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Char 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Double 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Float 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox () 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox All 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox Any 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Complex a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Min a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Max a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (First a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Last a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (WrappedMonoid a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Identity a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Dual a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Sum a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Product a) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Down a) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b) => Unbox (a, b) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b) => Unbox (Arg a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c) => Unbox (a, b, c) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox a => Unbox (Const a b) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox (f a) => Unbox (Alt f a) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c, Unbox d) => Unbox (a, b, c, d) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => Unbox (a, b, c, d, e) 
Instance details

Defined in Data.Vector.Unboxed.Base

Unbox (f (g a)) => Unbox (Compose f g a) 
Instance details

Defined in Data.Vector.Unboxed.Base

(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => Unbox (a, b, c, d, e, f) 
Instance details

Defined in Data.Vector.Unboxed.Base

sum1 :: (Foldable1 f, Additive r) => f r -> r #

product1 :: (Foldable1 f, Multiplicative r) => f r -> r #

sinnumIdempotent :: (Integral n, Idempotent r, Monoidal r) => n -> r -> r #

sum :: (Foldable f, Monoidal m) => f m -> m #

pow1pBand :: r -> Natural -> r #

powBand :: Unital r => r -> Natural -> r #

product :: (Foldable f, Unital r) => f r -> r #

antipodeM :: HopfAlgebra r h => h -> Covector r h #

comultM :: Algebra r a => a -> Covector r (a, a) #

convolveM :: (Algebra r c, Coalgebra r a) => (c -> Covector r a) -> (c -> Covector r a) -> c -> Covector r a #

counitM :: UnitalAlgebra r a => a -> Covector r () #

invM :: InvolutiveAlgebra r h => h -> Covector r h #

multM :: Coalgebra r c => c -> c -> Covector r c #

addRep :: (Applicative m, Additive r) => m r -> m r -> m r #

fromIntegerRep :: (UnitalAlgebra r (Rep m), Representable m, Ring r) => Integer -> m r #

fromNaturalRep :: (UnitalAlgebra r (Rep m), Representable m, Rig r) => Natural -> m r #

minusRep :: (Applicative m, Group r) => m r -> m r -> m r #

mulRep :: (Representable m, Algebra r (Rep m)) => m r -> m r -> m r #

negateRep :: (Functor m, Group r) => m r -> m r #

oneRep :: (Representable m, Unital r, UnitalAlgebra r (Rep m)) => m r #

sinnum1pRep :: (Functor m, Additive r) => Natural -> m r -> m r #

sinnumRep :: (Functor m, Monoidal r) => Natural -> m r -> m r #

subtractRep :: (Applicative m, Group r) => m r -> m r -> m r #

timesRep :: (Integral n, Functor m, Group r) => n -> m r -> m r #

zeroRep :: (Applicative m, Monoidal r) => m r #

charInt :: (Integral s, Bounded s) => proxy s -> Natural #

charWord :: (Integral s, Bounded s) => proxy s -> Natural #

class Additive r => Abelian r #

Instances

Instances details
Abelian Bool 
Instance details

Defined in Numeric.Additive.Class

Abelian Int 
Instance details

Defined in Numeric.Additive.Class

Abelian Int8 
Instance details

Defined in Numeric.Additive.Class

Abelian Int16 
Instance details

Defined in Numeric.Additive.Class

Abelian Int32 
Instance details

Defined in Numeric.Additive.Class

Abelian Int64 
Instance details

Defined in Numeric.Additive.Class

Abelian Integer 
Instance details

Defined in Numeric.Additive.Class

Abelian Natural 
Instance details

Defined in Numeric.Additive.Class

Abelian Word 
Instance details

Defined in Numeric.Additive.Class

Abelian Word8 
Instance details

Defined in Numeric.Additive.Class

Abelian Word16 
Instance details

Defined in Numeric.Additive.Class

Abelian Word32 
Instance details

Defined in Numeric.Additive.Class

Abelian Word64 
Instance details

Defined in Numeric.Additive.Class

Abelian () 
Instance details

Defined in Numeric.Additive.Class

GCDDomain d => Abelian (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Additive a => Abelian (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Additive a => Abelian (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Abelian (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Abelian (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Abelian (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Abelian r => Abelian (e -> r) 
Instance details

Defined in Numeric.Additive.Class

(Abelian a, Abelian b) => Abelian (a, b) 
Instance details

Defined in Numeric.Additive.Class

Abelian s => Abelian (Covector s a) 
Instance details

Defined in Numeric.Covector

(Abelian a, Abelian b, Abelian c) => Abelian (a, b, c) 
Instance details

Defined in Numeric.Additive.Class

(Abelian a, Abelian b, Abelian c, Abelian d) => Abelian (a, b, c, d) 
Instance details

Defined in Numeric.Additive.Class

(Abelian a, Abelian b, Abelian c, Abelian d, Abelian e) => Abelian (a, b, c, d, e) 
Instance details

Defined in Numeric.Additive.Class

class Additive r where #

Minimal complete definition

(+)

Methods

(+) :: r -> r -> r #

sinnum1p :: Natural -> r -> r #

sumWith1 :: Foldable1 f => (a -> r) -> f a -> r #

Instances

Instances details
Additive Bool 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Bool -> Bool -> Bool #

sinnum1p :: Natural -> Bool -> Bool #

sumWith1 :: Foldable1 f => (a -> Bool) -> f a -> Bool #

Additive Int 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Int -> Int -> Int #

sinnum1p :: Natural -> Int -> Int #

sumWith1 :: Foldable1 f => (a -> Int) -> f a -> Int #

Additive Int8 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Int8 -> Int8 -> Int8 #

sinnum1p :: Natural -> Int8 -> Int8 #

sumWith1 :: Foldable1 f => (a -> Int8) -> f a -> Int8 #

Additive Int16 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Int16 -> Int16 -> Int16 #

sinnum1p :: Natural -> Int16 -> Int16 #

sumWith1 :: Foldable1 f => (a -> Int16) -> f a -> Int16 #

Additive Int32 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Int32 -> Int32 -> Int32 #

sinnum1p :: Natural -> Int32 -> Int32 #

sumWith1 :: Foldable1 f => (a -> Int32) -> f a -> Int32 #

Additive Int64 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Int64 -> Int64 -> Int64 #

sinnum1p :: Natural -> Int64 -> Int64 #

sumWith1 :: Foldable1 f => (a -> Int64) -> f a -> Int64 #

Additive Integer 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Integer -> Integer -> Integer #

sinnum1p :: Natural -> Integer -> Integer #

sumWith1 :: Foldable1 f => (a -> Integer) -> f a -> Integer #

Additive Natural 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Natural -> Natural -> Natural #

sinnum1p :: Natural -> Natural -> Natural #

sumWith1 :: Foldable1 f => (a -> Natural) -> f a -> Natural #

Additive Word 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Word -> Word -> Word #

sinnum1p :: Natural -> Word -> Word #

sumWith1 :: Foldable1 f => (a -> Word) -> f a -> Word #

Additive Word8 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Word8 -> Word8 -> Word8 #

sinnum1p :: Natural -> Word8 -> Word8 #

sumWith1 :: Foldable1 f => (a -> Word8) -> f a -> Word8 #

Additive Word16 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Word16 -> Word16 -> Word16 #

sinnum1p :: Natural -> Word16 -> Word16 #

sumWith1 :: Foldable1 f => (a -> Word16) -> f a -> Word16 #

Additive Word32 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Word32 -> Word32 -> Word32 #

sinnum1p :: Natural -> Word32 -> Word32 #

sumWith1 :: Foldable1 f => (a -> Word32) -> f a -> Word32 #

Additive Word64 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: Word64 -> Word64 -> Word64 #

sinnum1p :: Natural -> Word64 -> Word64 #

sumWith1 :: Foldable1 f => (a -> Word64) -> f a -> Word64 #

Additive () 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: () -> () -> () #

sinnum1p :: Natural -> () -> () #

sumWith1 :: Foldable1 f => (a -> ()) -> f a -> () #

GCDDomain d => Additive (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(+) :: Fraction d -> Fraction d -> Fraction d #

sinnum1p :: Natural -> Fraction d -> Fraction d #

sumWith1 :: Foldable1 f => (a -> Fraction d) -> f a -> Fraction d #

Additive a => Additive (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: Add a -> Add a -> Add a #

sinnum1p :: Natural -> Add a -> Add a #

sumWith1 :: Foldable1 f => (a0 -> Add a) -> f a0 -> Add a #

Additive a => Additive (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapAlgebra a -> WrapAlgebra a -> WrapAlgebra a #

sinnum1p :: Natural -> WrapAlgebra a -> WrapAlgebra a #

sumWith1 :: Foldable1 f => (a0 -> WrapAlgebra a) -> f a0 -> WrapAlgebra a #

Num a => Additive (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapIntegral a -> WrapIntegral a -> WrapIntegral a #

sinnum1p :: Natural -> WrapIntegral a -> WrapIntegral a #

sumWith1 :: Foldable1 f => (a0 -> WrapIntegral a) -> f a0 -> WrapIntegral a #

Num a => Additive (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapFractional a -> WrapFractional a -> WrapFractional a #

sinnum1p :: Natural -> WrapFractional a -> WrapFractional a #

sumWith1 :: Foldable1 f => (a0 -> WrapFractional a) -> f a0 -> WrapFractional a #

Num a => Additive (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapNum a -> WrapNum a -> WrapNum a #

sinnum1p :: Natural -> WrapNum a -> WrapNum a #

sumWith1 :: Foldable1 f => (a0 -> WrapNum a) -> f a0 -> WrapNum a #

Additive r => Additive (b -> r) 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: (b -> r) -> (b -> r) -> b -> r #

sinnum1p :: Natural -> (b -> r) -> b -> r #

sumWith1 :: Foldable1 f => (a -> b -> r) -> f a -> b -> r #

(Additive a, Additive b) => Additive (a, b) 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: (a, b) -> (a, b) -> (a, b) #

sinnum1p :: Natural -> (a, b) -> (a, b) #

sumWith1 :: Foldable1 f => (a0 -> (a, b)) -> f a0 -> (a, b) #

Additive r => Additive (Covector r a) 
Instance details

Defined in Numeric.Covector

Methods

(+) :: Covector r a -> Covector r a -> Covector r a #

sinnum1p :: Natural -> Covector r a -> Covector r a #

sumWith1 :: Foldable1 f => (a0 -> Covector r a) -> f a0 -> Covector r a #

(Additive a, Additive b, Additive c) => Additive (a, b, c) 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

sinnum1p :: Natural -> (a, b, c) -> (a, b, c) #

sumWith1 :: Foldable1 f => (a0 -> (a, b, c)) -> f a0 -> (a, b, c) #

(Additive a, Additive b, Additive c, Additive d) => Additive (a, b, c, d) 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

sinnum1p :: Natural -> (a, b, c, d) -> (a, b, c, d) #

sumWith1 :: Foldable1 f => (a0 -> (a, b, c, d)) -> f a0 -> (a, b, c, d) #

(Additive a, Additive b, Additive c, Additive d, Additive e) => Additive (a, b, c, d, e) 
Instance details

Defined in Numeric.Additive.Class

Methods

(+) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

sinnum1p :: Natural -> (a, b, c, d, e) -> (a, b, c, d, e) #

sumWith1 :: Foldable1 f => (a0 -> (a, b, c, d, e)) -> f a0 -> (a, b, c, d, e) #

class Additive r => Idempotent r #

Instances

Instances details
Idempotent Bool 
Instance details

Defined in Numeric.Additive.Class

Idempotent () 
Instance details

Defined in Numeric.Additive.Class

Idempotent r => Idempotent (e -> r) 
Instance details

Defined in Numeric.Additive.Class

(Idempotent a, Idempotent b) => Idempotent (a, b) 
Instance details

Defined in Numeric.Additive.Class

Idempotent r => Idempotent (Covector r a) 
Instance details

Defined in Numeric.Covector

(Idempotent a, Idempotent b, Idempotent c) => Idempotent (a, b, c) 
Instance details

Defined in Numeric.Additive.Class

(Idempotent a, Idempotent b, Idempotent c, Idempotent d) => Idempotent (a, b, c, d) 
Instance details

Defined in Numeric.Additive.Class

(Idempotent a, Idempotent b, Idempotent c, Idempotent d, Idempotent e) => Idempotent (a, b, c, d, e) 
Instance details

Defined in Numeric.Additive.Class

class Additive m => Partitionable m where #

Methods

partitionWith :: (m -> m -> r) -> m -> NonEmpty r #

Instances

Instances details
Partitionable Bool 
Instance details

Defined in Numeric.Additive.Class

Methods

partitionWith :: (Bool -> Bool -> r) -> Bool -> NonEmpty r #

Partitionable Natural 
Instance details

Defined in Numeric.Additive.Class

Methods

partitionWith :: (Natural -> Natural -> r) -> Natural -> NonEmpty r #

Partitionable () 
Instance details

Defined in Numeric.Additive.Class

Methods

partitionWith :: (() -> () -> r) -> () -> NonEmpty r #

(Partitionable a, Partitionable b) => Partitionable (a, b) 
Instance details

Defined in Numeric.Additive.Class

Methods

partitionWith :: ((a, b) -> (a, b) -> r) -> (a, b) -> NonEmpty r #

(Partitionable a, Partitionable b, Partitionable c) => Partitionable (a, b, c) 
Instance details

Defined in Numeric.Additive.Class

Methods

partitionWith :: ((a, b, c) -> (a, b, c) -> r) -> (a, b, c) -> NonEmpty r #

(Partitionable a, Partitionable b, Partitionable c, Partitionable d) => Partitionable (a, b, c, d) 
Instance details

Defined in Numeric.Additive.Class

Methods

partitionWith :: ((a, b, c, d) -> (a, b, c, d) -> r) -> (a, b, c, d) -> NonEmpty r #

(Partitionable a, Partitionable b, Partitionable c, Partitionable d, Partitionable e) => Partitionable (a, b, c, d, e) 
Instance details

Defined in Numeric.Additive.Class

Methods

partitionWith :: ((a, b, c, d, e) -> (a, b, c, d, e) -> r) -> (a, b, c, d, e) -> NonEmpty r #

class (LeftModule Integer r, RightModule Integer r, Monoidal r) => Group r where #

Minimal complete definition

Nothing

Methods

(-) :: r -> r -> r #

negate :: r -> r #

subtract :: r -> r -> r #

times :: Integral n => n -> r -> r #

Instances

Instances details
Group Int 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Int -> Int -> Int #

negate :: Int -> Int #

subtract :: Int -> Int -> Int #

times :: Integral n => n -> Int -> Int #

Group Int8 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Int8 -> Int8 -> Int8 #

negate :: Int8 -> Int8 #

subtract :: Int8 -> Int8 -> Int8 #

times :: Integral n => n -> Int8 -> Int8 #

Group Int16 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Int16 -> Int16 -> Int16 #

negate :: Int16 -> Int16 #

subtract :: Int16 -> Int16 -> Int16 #

times :: Integral n => n -> Int16 -> Int16 #

Group Int32 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Int32 -> Int32 -> Int32 #

negate :: Int32 -> Int32 #

subtract :: Int32 -> Int32 -> Int32 #

times :: Integral n => n -> Int32 -> Int32 #

Group Int64 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Int64 -> Int64 -> Int64 #

negate :: Int64 -> Int64 #

subtract :: Int64 -> Int64 -> Int64 #

times :: Integral n => n -> Int64 -> Int64 #

Group Integer 
Instance details

Defined in Numeric.Additive.Group

Group Word 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Word -> Word -> Word #

negate :: Word -> Word #

subtract :: Word -> Word -> Word #

times :: Integral n => n -> Word -> Word #

Group Word8 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: Word8 -> Word8 -> Word8 #

negate :: Word8 -> Word8 #

subtract :: Word8 -> Word8 -> Word8 #

times :: Integral n => n -> Word8 -> Word8 #

Group Word16 
Instance details

Defined in Numeric.Additive.Group

Group Word32 
Instance details

Defined in Numeric.Additive.Group

Group Word64 
Instance details

Defined in Numeric.Additive.Group

Group () 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: () -> () -> () #

negate :: () -> () #

subtract :: () -> () -> () #

times :: Integral n => n -> () -> () #

GCDDomain d => Group (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(-) :: Fraction d -> Fraction d -> Fraction d #

negate :: Fraction d -> Fraction d #

subtract :: Fraction d -> Fraction d -> Fraction d #

times :: Integral n => n -> Fraction d -> Fraction d #

Group a => Group (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Group (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Group (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Group (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(-) :: WrapNum a -> WrapNum a -> WrapNum a #

negate :: WrapNum a -> WrapNum a #

subtract :: WrapNum a -> WrapNum a -> WrapNum a #

times :: Integral n => n -> WrapNum a -> WrapNum a #

Group r => Group (e -> r) 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: (e -> r) -> (e -> r) -> e -> r #

negate :: (e -> r) -> e -> r #

subtract :: (e -> r) -> (e -> r) -> e -> r #

times :: Integral n => n -> (e -> r) -> e -> r #

(Group a, Group b) => Group (a, b) 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: (a, b) -> (a, b) -> (a, b) #

negate :: (a, b) -> (a, b) #

subtract :: (a, b) -> (a, b) -> (a, b) #

times :: Integral n => n -> (a, b) -> (a, b) #

Group s => Group (Covector s a) 
Instance details

Defined in Numeric.Covector

Methods

(-) :: Covector s a -> Covector s a -> Covector s a #

negate :: Covector s a -> Covector s a #

subtract :: Covector s a -> Covector s a -> Covector s a #

times :: Integral n => n -> Covector s a -> Covector s a #

(Group a, Group b, Group c) => Group (a, b, c) 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

negate :: (a, b, c) -> (a, b, c) #

subtract :: (a, b, c) -> (a, b, c) -> (a, b, c) #

times :: Integral n => n -> (a, b, c) -> (a, b, c) #

(Group a, Group b, Group c, Group d) => Group (a, b, c, d) 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

negate :: (a, b, c, d) -> (a, b, c, d) #

subtract :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

times :: Integral n => n -> (a, b, c, d) -> (a, b, c, d) #

(Group a, Group b, Group c, Group d, Group e) => Group (a, b, c, d, e) 
Instance details

Defined in Numeric.Additive.Group

Methods

(-) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

negate :: (a, b, c, d, e) -> (a, b, c, d, e) #

subtract :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

times :: Integral n => n -> (a, b, c, d, e) -> (a, b, c, d, e) #

class Semiring r => Algebra r a where #

Methods

mult :: (a -> a -> r) -> a -> r #

Instances

Instances details
Algebra () a 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: (a -> a -> ()) -> a -> () #

Semiring r => Algebra r IntSet 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: (IntSet -> IntSet -> r) -> IntSet -> r #

Semiring r => Algebra r () 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: (() -> () -> r) -> () -> r #

Semiring r => Algebra r [a] 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: ([a] -> [a] -> r) -> [a] -> r #

(Semiring r, Ord a) => Algebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: (Set a -> Set a -> r) -> Set a -> r #

Semiring r => Algebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: (Seq a -> Seq a -> r) -> Seq a -> r #

(Algebra r a, Algebra r b) => Algebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: ((a, b) -> (a, b) -> r) -> (a, b) -> r #

(Algebra r a, Algebra r b, Algebra r c) => Algebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: ((a, b, c) -> (a, b, c) -> r) -> (a, b, c) -> r #

(Algebra r a, Algebra r b, Algebra r c, Algebra r d) => Algebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: ((a, b, c, d) -> (a, b, c, d) -> r) -> (a, b, c, d) -> r #

(Algebra r a, Algebra r b, Algebra r c, Algebra r d, Algebra r e) => Algebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Class

Methods

mult :: ((a, b, c, d, e) -> (a, b, c, d, e) -> r) -> (a, b, c, d, e) -> r #

class Semiring r => Coalgebra r c where #

Methods

comult :: (c -> r) -> c -> c -> r #

Instances

Instances details
Semiring r => Coalgebra r IntSet 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (IntSet -> r) -> IntSet -> IntSet -> r #

Semiring r => Coalgebra r () 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (() -> r) -> () -> () -> r #

Semiring r => Coalgebra r [a] 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: ([a] -> r) -> [a] -> [a] -> r #

(Semiring r, Ord a) => Coalgebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (Set a -> r) -> Set a -> Set a -> r #

Semiring r => Coalgebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (Seq a -> r) -> Seq a -> Seq a -> r #

(Semiring r, Additive b) => Coalgebra r (IntMap b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (IntMap b -> r) -> IntMap b -> IntMap b -> r #

(Semiring r, Ord a, Additive b) => Coalgebra r (Map a b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: (Map a b -> r) -> Map a b -> Map a b -> r #

Algebra r m => Coalgebra r (m -> r) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: ((m -> r) -> r) -> (m -> r) -> (m -> r) -> r #

(Coalgebra r a, Coalgebra r b) => Coalgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: ((a, b) -> r) -> (a, b) -> (a, b) -> r #

(Coalgebra r a, Coalgebra r b, Coalgebra r c) => Coalgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: ((a, b, c) -> r) -> (a, b, c) -> (a, b, c) -> r #

(Coalgebra r a, Coalgebra r b, Coalgebra r c, Coalgebra r d) => Coalgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: ((a, b, c, d) -> r) -> (a, b, c, d) -> (a, b, c, d) -> r #

(Coalgebra r a, Coalgebra r b, Coalgebra r c, Coalgebra r d, Coalgebra r e) => Coalgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Class

Methods

comult :: ((a, b, c, d, e) -> r) -> (a, b, c, d, e) -> (a, b, c, d, e) -> r #

class (Semiring r, Additive m) => LeftModule r m where #

Methods

(.*) :: r -> m -> m #

Instances

Instances details
LeftModule Integer Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int -> Int #

LeftModule Integer Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int8 -> Int8 #

LeftModule Integer Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int16 -> Int16 #

LeftModule Integer Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int32 -> Int32 #

LeftModule Integer Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Int64 -> Int64 #

LeftModule Integer Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Integer -> Integer #

LeftModule Integer Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word -> Word #

LeftModule Integer Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word8 -> Word8 #

LeftModule Integer Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word16 -> Word16 #

LeftModule Integer Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word32 -> Word32 #

LeftModule Integer Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Integer -> Word64 -> Word64 #

LeftModule Natural Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Bool -> Bool #

LeftModule Natural Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int -> Int #

LeftModule Natural Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int8 -> Int8 #

LeftModule Natural Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int16 -> Int16 #

LeftModule Natural Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int32 -> Int32 #

LeftModule Natural Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Int64 -> Int64 #

LeftModule Natural Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Integer -> Integer #

LeftModule Natural Natural 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Natural -> Natural #

LeftModule Natural Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word -> Word #

LeftModule Natural Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word8 -> Word8 #

LeftModule Natural Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word16 -> Word16 #

LeftModule Natural Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word32 -> Word32 #

LeftModule Natural Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: Natural -> Word64 -> Word64 #

Additive m => LeftModule () m 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: () -> m -> m #

Semiring r => LeftModule r () 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: r -> () -> () #

GCDDomain d => LeftModule Integer (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(.*) :: Integer -> Fraction d -> Fraction d #

LeftModule Integer a => LeftModule Integer (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> Add a -> Add a #

LeftModule Integer a => LeftModule Integer (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> WrapAlgebra a -> WrapAlgebra a #

Num a => LeftModule Integer (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> WrapIntegral a -> WrapIntegral a #

Num a => LeftModule Integer (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => LeftModule Integer (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> WrapNum a -> WrapNum a #

GCDDomain d => LeftModule Natural (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(.*) :: Natural -> Fraction d -> Fraction d #

LeftModule Natural a => LeftModule Natural (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> Add a -> Add a #

LeftModule Natural a => LeftModule Natural (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> WrapAlgebra a -> WrapAlgebra a #

Num a => LeftModule Natural (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> WrapIntegral a -> WrapIntegral a #

Num a => LeftModule Natural (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => LeftModule Natural (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> WrapNum a -> WrapNum a #

LeftModule r m => LeftModule r (e -> m) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: r -> (e -> m) -> e -> m #

(LeftModule r a, LeftModule r b) => LeftModule r (a, b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: r -> (a, b) -> (a, b) #

LeftModule r s => LeftModule r (Covector s m) 
Instance details

Defined in Numeric.Covector

Methods

(.*) :: r -> Covector s m -> Covector s m #

(LeftModule r a, LeftModule r b, LeftModule r c) => LeftModule r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: r -> (a, b, c) -> (a, b, c) #

(LeftModule r a, LeftModule r b, LeftModule r c, LeftModule r d) => LeftModule r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: r -> (a, b, c, d) -> (a, b, c, d) #

(LeftModule r a, LeftModule r b, LeftModule r c, LeftModule r d, LeftModule r e) => LeftModule r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(.*) :: r -> (a, b, c, d, e) -> (a, b, c, d, e) #

Coalgebra r m => LeftModule (Covector r m) (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

(.*) :: Covector r m -> Covector r m -> Covector r m #

class (LeftModule r m, RightModule r m) => Module r m #

Instances

Instances details
(LeftModule r m, RightModule r m) => Module r m 
Instance details

Defined in Numeric.Algebra.Class

class (LeftModule Natural m, RightModule Natural m) => Monoidal m where #

Minimal complete definition

zero

Methods

zero :: m #

sinnum :: Natural -> m -> m #

sumWith :: Foldable f => (a -> m) -> f a -> m #

Instances

Instances details
Monoidal Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Bool #

sinnum :: Natural -> Bool -> Bool #

sumWith :: Foldable f => (a -> Bool) -> f a -> Bool #

Monoidal Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Int #

sinnum :: Natural -> Int -> Int #

sumWith :: Foldable f => (a -> Int) -> f a -> Int #

Monoidal Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Int8 #

sinnum :: Natural -> Int8 -> Int8 #

sumWith :: Foldable f => (a -> Int8) -> f a -> Int8 #

Monoidal Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Int16 #

sinnum :: Natural -> Int16 -> Int16 #

sumWith :: Foldable f => (a -> Int16) -> f a -> Int16 #

Monoidal Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Int32 #

sinnum :: Natural -> Int32 -> Int32 #

sumWith :: Foldable f => (a -> Int32) -> f a -> Int32 #

Monoidal Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Int64 #

sinnum :: Natural -> Int64 -> Int64 #

sumWith :: Foldable f => (a -> Int64) -> f a -> Int64 #

Monoidal Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Integer #

sinnum :: Natural -> Integer -> Integer #

sumWith :: Foldable f => (a -> Integer) -> f a -> Integer #

Monoidal Natural 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Natural #

sinnum :: Natural -> Natural -> Natural #

sumWith :: Foldable f => (a -> Natural) -> f a -> Natural #

Monoidal Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Word #

sinnum :: Natural -> Word -> Word #

sumWith :: Foldable f => (a -> Word) -> f a -> Word #

Monoidal Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Word8 #

sinnum :: Natural -> Word8 -> Word8 #

sumWith :: Foldable f => (a -> Word8) -> f a -> Word8 #

Monoidal Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Word16 #

sinnum :: Natural -> Word16 -> Word16 #

sumWith :: Foldable f => (a -> Word16) -> f a -> Word16 #

Monoidal Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Word32 #

sinnum :: Natural -> Word32 -> Word32 #

sumWith :: Foldable f => (a -> Word32) -> f a -> Word32 #

Monoidal Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: Word64 #

sinnum :: Natural -> Word64 -> Word64 #

sumWith :: Foldable f => (a -> Word64) -> f a -> Word64 #

Monoidal () 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: () #

sinnum :: Natural -> () -> () #

sumWith :: Foldable f => (a -> ()) -> f a -> () #

GCDDomain d => Monoidal (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

zero :: Fraction d #

sinnum :: Natural -> Fraction d -> Fraction d #

sumWith :: Foldable f => (a -> Fraction d) -> f a -> Fraction d #

Monoidal a => Monoidal (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

zero :: Add a #

sinnum :: Natural -> Add a -> Add a #

sumWith :: Foldable f => (a0 -> Add a) -> f a0 -> Add a #

Monoidal a => Monoidal (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

zero :: WrapAlgebra a #

sinnum :: Natural -> WrapAlgebra a -> WrapAlgebra a #

sumWith :: Foldable f => (a0 -> WrapAlgebra a) -> f a0 -> WrapAlgebra a #

Num a => Monoidal (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

zero :: WrapIntegral a #

sinnum :: Natural -> WrapIntegral a -> WrapIntegral a #

sumWith :: Foldable f => (a0 -> WrapIntegral a) -> f a0 -> WrapIntegral a #

Num a => Monoidal (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Monoidal (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

zero :: WrapNum a #

sinnum :: Natural -> WrapNum a -> WrapNum a #

sumWith :: Foldable f => (a0 -> WrapNum a) -> f a0 -> WrapNum a #

Monoidal r => Monoidal (e -> r) 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: e -> r #

sinnum :: Natural -> (e -> r) -> e -> r #

sumWith :: Foldable f => (a -> e -> r) -> f a -> e -> r #

(Monoidal a, Monoidal b) => Monoidal (a, b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: (a, b) #

sinnum :: Natural -> (a, b) -> (a, b) #

sumWith :: Foldable f => (a0 -> (a, b)) -> f a0 -> (a, b) #

Monoidal s => Monoidal (Covector s a) 
Instance details

Defined in Numeric.Covector

Methods

zero :: Covector s a #

sinnum :: Natural -> Covector s a -> Covector s a #

sumWith :: Foldable f => (a0 -> Covector s a) -> f a0 -> Covector s a #

(Monoidal a, Monoidal b, Monoidal c) => Monoidal (a, b, c) 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: (a, b, c) #

sinnum :: Natural -> (a, b, c) -> (a, b, c) #

sumWith :: Foldable f => (a0 -> (a, b, c)) -> f a0 -> (a, b, c) #

(Monoidal a, Monoidal b, Monoidal c, Monoidal d) => Monoidal (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: (a, b, c, d) #

sinnum :: Natural -> (a, b, c, d) -> (a, b, c, d) #

sumWith :: Foldable f => (a0 -> (a, b, c, d)) -> f a0 -> (a, b, c, d) #

(Monoidal a, Monoidal b, Monoidal c, Monoidal d, Monoidal e) => Monoidal (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Class

Methods

zero :: (a, b, c, d, e) #

sinnum :: Natural -> (a, b, c, d, e) -> (a, b, c, d, e) #

sumWith :: Foldable f => (a0 -> (a, b, c, d, e)) -> f a0 -> (a, b, c, d, e) #

class Multiplicative r where #

Minimal complete definition

(*)

Methods

(*) :: r -> r -> r #

pow1p :: r -> Natural -> r #

productWith1 :: Foldable1 f => (a -> r) -> f a -> r #

Instances

Instances details
Multiplicative Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Bool -> Bool -> Bool #

pow1p :: Bool -> Natural -> Bool #

productWith1 :: Foldable1 f => (a -> Bool) -> f a -> Bool #

Multiplicative Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Int -> Int -> Int #

pow1p :: Int -> Natural -> Int #

productWith1 :: Foldable1 f => (a -> Int) -> f a -> Int #

Multiplicative Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Int8 -> Int8 -> Int8 #

pow1p :: Int8 -> Natural -> Int8 #

productWith1 :: Foldable1 f => (a -> Int8) -> f a -> Int8 #

Multiplicative Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Int16 -> Int16 -> Int16 #

pow1p :: Int16 -> Natural -> Int16 #

productWith1 :: Foldable1 f => (a -> Int16) -> f a -> Int16 #

Multiplicative Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Int32 -> Int32 -> Int32 #

pow1p :: Int32 -> Natural -> Int32 #

productWith1 :: Foldable1 f => (a -> Int32) -> f a -> Int32 #

Multiplicative Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Int64 -> Int64 -> Int64 #

pow1p :: Int64 -> Natural -> Int64 #

productWith1 :: Foldable1 f => (a -> Int64) -> f a -> Int64 #

Multiplicative Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Integer -> Integer -> Integer #

pow1p :: Integer -> Natural -> Integer #

productWith1 :: Foldable1 f => (a -> Integer) -> f a -> Integer #

Multiplicative Natural 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Natural -> Natural -> Natural #

pow1p :: Natural -> Natural -> Natural #

productWith1 :: Foldable1 f => (a -> Natural) -> f a -> Natural #

Multiplicative Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Word -> Word -> Word #

pow1p :: Word -> Natural -> Word #

productWith1 :: Foldable1 f => (a -> Word) -> f a -> Word #

Multiplicative Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Word8 -> Word8 -> Word8 #

pow1p :: Word8 -> Natural -> Word8 #

productWith1 :: Foldable1 f => (a -> Word8) -> f a -> Word8 #

Multiplicative Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Word16 -> Word16 -> Word16 #

pow1p :: Word16 -> Natural -> Word16 #

productWith1 :: Foldable1 f => (a -> Word16) -> f a -> Word16 #

Multiplicative Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Word32 -> Word32 -> Word32 #

pow1p :: Word32 -> Natural -> Word32 #

productWith1 :: Foldable1 f => (a -> Word32) -> f a -> Word32 #

Multiplicative Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: Word64 -> Word64 -> Word64 #

pow1p :: Word64 -> Natural -> Word64 #

productWith1 :: Foldable1 f => (a -> Word64) -> f a -> Word64 #

Multiplicative () 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: () -> () -> () #

pow1p :: () -> Natural -> () #

productWith1 :: Foldable1 f => (a -> ()) -> f a -> () #

GCDDomain d => Multiplicative (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(*) :: Fraction d -> Fraction d -> Fraction d #

pow1p :: Fraction d -> Natural -> Fraction d #

productWith1 :: Foldable1 f => (a -> Fraction d) -> f a -> Fraction d #

Multiplicative a => Multiplicative (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: Mult a -> Mult a -> Mult a #

pow1p :: Mult a -> Natural -> Mult a #

productWith1 :: Foldable1 f => (a0 -> Mult a) -> f a0 -> Mult a #

Multiplicative a => Multiplicative (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: WrapAlgebra a -> WrapAlgebra a -> WrapAlgebra a #

pow1p :: WrapAlgebra a -> Natural -> WrapAlgebra a #

productWith1 :: Foldable1 f => (a0 -> WrapAlgebra a) -> f a0 -> WrapAlgebra a #

Num a => Multiplicative (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: WrapIntegral a -> WrapIntegral a -> WrapIntegral a #

pow1p :: WrapIntegral a -> Natural -> WrapIntegral a #

productWith1 :: Foldable1 f => (a0 -> WrapIntegral a) -> f a0 -> WrapIntegral a #

Num a => Multiplicative (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: WrapFractional a -> WrapFractional a -> WrapFractional a #

pow1p :: WrapFractional a -> Natural -> WrapFractional a #

productWith1 :: Foldable1 f => (a0 -> WrapFractional a) -> f a0 -> WrapFractional a #

Num a => Multiplicative (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: WrapNum a -> WrapNum a -> WrapNum a #

pow1p :: WrapNum a -> Natural -> WrapNum a #

productWith1 :: Foldable1 f => (a0 -> WrapNum a) -> f a0 -> WrapNum a #

Algebra r a => Multiplicative (a -> r) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: (a -> r) -> (a -> r) -> a -> r #

pow1p :: (a -> r) -> Natural -> a -> r #

productWith1 :: Foldable1 f => (a0 -> a -> r) -> f a0 -> a -> r #

(Multiplicative a, Multiplicative b) => Multiplicative (a, b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: (a, b) -> (a, b) -> (a, b) #

pow1p :: (a, b) -> Natural -> (a, b) #

productWith1 :: Foldable1 f => (a0 -> (a, b)) -> f a0 -> (a, b) #

Coalgebra r m => Multiplicative (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

(*) :: Covector r m -> Covector r m -> Covector r m #

pow1p :: Covector r m -> Natural -> Covector r m #

productWith1 :: Foldable1 f => (a -> Covector r m) -> f a -> Covector r m #

(Multiplicative a, Multiplicative b, Multiplicative c) => Multiplicative (a, b, c) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

pow1p :: (a, b, c) -> Natural -> (a, b, c) #

productWith1 :: Foldable1 f => (a0 -> (a, b, c)) -> f a0 -> (a, b, c) #

(Multiplicative a, Multiplicative b, Multiplicative c, Multiplicative d) => Multiplicative (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

pow1p :: (a, b, c, d) -> Natural -> (a, b, c, d) #

productWith1 :: Foldable1 f => (a0 -> (a, b, c, d)) -> f a0 -> (a, b, c, d) #

(Multiplicative a, Multiplicative b, Multiplicative c, Multiplicative d, Multiplicative e) => Multiplicative (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

pow1p :: (a, b, c, d, e) -> Natural -> (a, b, c, d, e) #

productWith1 :: Foldable1 f => (a0 -> (a, b, c, d, e)) -> f a0 -> (a, b, c, d, e) #

class (Semiring r, Additive m) => RightModule r m where #

Methods

(*.) :: m -> r -> m #

Instances

Instances details
RightModule Integer Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int -> Integer -> Int #

RightModule Integer Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int8 -> Integer -> Int8 #

RightModule Integer Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int16 -> Integer -> Int16 #

RightModule Integer Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int32 -> Integer -> Int32 #

RightModule Integer Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int64 -> Integer -> Int64 #

RightModule Integer Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Integer -> Integer -> Integer #

RightModule Integer Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word -> Integer -> Word #

RightModule Integer Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word8 -> Integer -> Word8 #

RightModule Integer Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word16 -> Integer -> Word16 #

RightModule Integer Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word32 -> Integer -> Word32 #

RightModule Integer Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word64 -> Integer -> Word64 #

RightModule Natural Bool 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Bool -> Natural -> Bool #

RightModule Natural Int 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int -> Natural -> Int #

RightModule Natural Int8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int8 -> Natural -> Int8 #

RightModule Natural Int16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int16 -> Natural -> Int16 #

RightModule Natural Int32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int32 -> Natural -> Int32 #

RightModule Natural Int64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Int64 -> Natural -> Int64 #

RightModule Natural Integer 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Integer -> Natural -> Integer #

RightModule Natural Natural 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Natural -> Natural -> Natural #

RightModule Natural Word 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word -> Natural -> Word #

RightModule Natural Word8 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word8 -> Natural -> Word8 #

RightModule Natural Word16 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word16 -> Natural -> Word16 #

RightModule Natural Word32 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word32 -> Natural -> Word32 #

RightModule Natural Word64 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: Word64 -> Natural -> Word64 #

Additive m => RightModule () m 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: m -> () -> m #

Semiring r => RightModule r () 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: () -> r -> () #

GCDDomain d => RightModule Integer (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(*.) :: Fraction d -> Integer -> Fraction d #

RightModule Integer a => RightModule Integer (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: Add a -> Integer -> Add a #

RightModule Integer a => RightModule Integer (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapAlgebra a -> Integer -> WrapAlgebra a #

Num a => RightModule Integer (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapIntegral a -> Integer -> WrapIntegral a #

Num a => RightModule Integer (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => RightModule Integer (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapNum a -> Integer -> WrapNum a #

GCDDomain d => RightModule Natural (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(*.) :: Fraction d -> Natural -> Fraction d #

RightModule Natural a => RightModule Natural (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: Add a -> Natural -> Add a #

RightModule Natural a => RightModule Natural (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapAlgebra a -> Natural -> WrapAlgebra a #

Num a => RightModule Natural (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapIntegral a -> Natural -> WrapIntegral a #

Num a => RightModule Natural (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => RightModule Natural (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapNum a -> Natural -> WrapNum a #

RightModule r m => RightModule r (e -> m) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: (e -> m) -> r -> e -> m #

(RightModule r a, RightModule r b) => RightModule r (a, b) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: (a, b) -> r -> (a, b) #

RightModule r s => RightModule r (Covector s m) 
Instance details

Defined in Numeric.Covector

Methods

(*.) :: Covector s m -> r -> Covector s m #

(RightModule r a, RightModule r b, RightModule r c) => RightModule r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: (a, b, c) -> r -> (a, b, c) #

(RightModule r a, RightModule r b, RightModule r c, RightModule r d) => RightModule r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: (a, b, c, d) -> r -> (a, b, c, d) #

(RightModule r a, RightModule r b, RightModule r c, RightModule r d, RightModule r e) => RightModule r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Class

Methods

(*.) :: (a, b, c, d, e) -> r -> (a, b, c, d, e) #

Coalgebra r m => RightModule (Covector r m) (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

(*.) :: Covector r m -> Covector r m -> Covector r m #

class (Additive r, Abelian r, Multiplicative r) => Semiring r #

Instances

Instances details
Semiring Bool 
Instance details

Defined in Numeric.Algebra.Class

Semiring Int 
Instance details

Defined in Numeric.Algebra.Class

Semiring Int8 
Instance details

Defined in Numeric.Algebra.Class

Semiring Int16 
Instance details

Defined in Numeric.Algebra.Class

Semiring Int32 
Instance details

Defined in Numeric.Algebra.Class

Semiring Int64 
Instance details

Defined in Numeric.Algebra.Class

Semiring Integer 
Instance details

Defined in Numeric.Algebra.Class

Semiring Natural 
Instance details

Defined in Numeric.Algebra.Class

Semiring Word 
Instance details

Defined in Numeric.Algebra.Class

Semiring Word8 
Instance details

Defined in Numeric.Algebra.Class

Semiring Word16 
Instance details

Defined in Numeric.Algebra.Class

Semiring Word32 
Instance details

Defined in Numeric.Algebra.Class

Semiring Word64 
Instance details

Defined in Numeric.Algebra.Class

Semiring () 
Instance details

Defined in Numeric.Algebra.Class

GCDDomain d => Semiring (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

(Additive a, Multiplicative a) => Semiring (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Semiring (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Semiring (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Semiring (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Algebra r a => Semiring (a -> r) 
Instance details

Defined in Numeric.Algebra.Class

(Semiring a, Semiring b) => Semiring (a, b) 
Instance details

Defined in Numeric.Algebra.Class

Coalgebra r m => Semiring (Covector r m) 
Instance details

Defined in Numeric.Covector

(Semiring a, Semiring b, Semiring c) => Semiring (a, b, c) 
Instance details

Defined in Numeric.Algebra.Class

(Semiring a, Semiring b, Semiring c, Semiring d) => Semiring (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Class

(Semiring a, Semiring b, Semiring c, Semiring d, Semiring e) => Semiring (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Class

class Coalgebra r c => CocommutativeCoalgebra r c #

Instances

Instances details
(Commutative r, Semiring r) => CocommutativeCoalgebra r IntSet 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative r, Semiring r) => CocommutativeCoalgebra r () 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative r, Semiring r, Ord a) => CocommutativeCoalgebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative r, Semiring r, Abelian b) => CocommutativeCoalgebra r (IntMap b) 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative r, Semiring r, Ord a, Abelian b) => CocommutativeCoalgebra r (Map a b) 
Instance details

Defined in Numeric.Algebra.Commutative

CommutativeAlgebra r m => CocommutativeCoalgebra r (m -> r) 
Instance details

Defined in Numeric.Algebra.Commutative

(CocommutativeCoalgebra r a, CocommutativeCoalgebra r b) => CocommutativeCoalgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Commutative

(CocommutativeCoalgebra r a, CocommutativeCoalgebra r b, CocommutativeCoalgebra r c) => CocommutativeCoalgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Commutative

(CocommutativeCoalgebra r a, CocommutativeCoalgebra r b, CocommutativeCoalgebra r c, CocommutativeCoalgebra r d) => CocommutativeCoalgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Commutative

(CocommutativeCoalgebra r a, CocommutativeCoalgebra r b, CocommutativeCoalgebra r c, CocommutativeCoalgebra r d, CocommutativeCoalgebra r e) => CocommutativeCoalgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Commutative

class Multiplicative r => Commutative r #

Instances

Instances details
Commutative Bool 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Int 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Int8 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Int16 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Int32 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Int64 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Integer 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Natural 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Word 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Word8 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Word16 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Word32 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative Word64 
Instance details

Defined in Numeric.Algebra.Commutative

Commutative () 
Instance details

Defined in Numeric.Algebra.Commutative

GCDDomain d => Commutative (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Multiplicative a => Commutative (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Multiplicative a => Commutative (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Commutative (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Commutative (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Commutative (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

CommutativeAlgebra r a => Commutative (a -> r) 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative a, Commutative b) => Commutative (a, b) 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative m, Coalgebra r m) => Commutative (Covector r m) 
Instance details

Defined in Numeric.Covector

(Commutative a, Commutative b, Commutative c) => Commutative (a, b, c) 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative a, Commutative b, Commutative c, Commutative d) => Commutative (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative a, Commutative b, Commutative c, Commutative d, Commutative e) => Commutative (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Commutative

class Algebra r a => CommutativeAlgebra r a #

Instances

Instances details
(Commutative r, Semiring r) => CommutativeAlgebra r IntSet 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative r, Semiring r) => CommutativeAlgebra r () 
Instance details

Defined in Numeric.Algebra.Commutative

(Commutative r, Semiring r, Ord a) => CommutativeAlgebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Commutative

(CommutativeAlgebra r a, CommutativeAlgebra r b) => CommutativeAlgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Commutative

(CommutativeAlgebra r a, CommutativeAlgebra r b, CommutativeAlgebra r c) => CommutativeAlgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Commutative

(CommutativeAlgebra r a, CommutativeAlgebra r b, CommutativeAlgebra r c, CommutativeAlgebra r d) => CommutativeAlgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Commutative

(CommutativeAlgebra r a, CommutativeAlgebra r b, CommutativeAlgebra r c, CommutativeAlgebra r d, CommutativeAlgebra r e) => CommutativeAlgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Commutative

class (Bialgebra r h, CommutativeAlgebra r h, CocommutativeCoalgebra r h) => CommutativeBialgebra r h #

Instances

Instances details
(Bialgebra r h, CommutativeAlgebra r h, CocommutativeCoalgebra r h) => CommutativeBialgebra r h 
Instance details

Defined in Numeric.Algebra.Commutative

class Unital r => Division r where #

Minimal complete definition

Nothing

Methods

recip :: r -> r #

(/) :: r -> r -> r #

(\\) :: r -> r -> r #

Instances

Instances details
Division () 
Instance details

Defined in Numeric.Algebra.Division

Methods

recip :: () -> () #

(/) :: () -> () -> () #

(\\) :: () -> () -> () #

(^) :: Integral n => () -> n -> ()

GCDDomain d => Division (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

recip :: Fraction d -> Fraction d #

(/) :: Fraction d -> Fraction d -> Fraction d #

(\\) :: Fraction d -> Fraction d -> Fraction d #

(^) :: Integral n => Fraction d -> n -> Fraction d

Division a => Division (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Fractional a => Division (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Unital r, DivisionAlgebra r a) => Division (a -> r) 
Instance details

Defined in Numeric.Algebra.Division

Methods

recip :: (a -> r) -> a -> r #

(/) :: (a -> r) -> (a -> r) -> a -> r #

(\\) :: (a -> r) -> (a -> r) -> a -> r #

(^) :: Integral n => (a -> r) -> n -> a -> r

(Division a, Division b) => Division (a, b) 
Instance details

Defined in Numeric.Algebra.Division

Methods

recip :: (a, b) -> (a, b) #

(/) :: (a, b) -> (a, b) -> (a, b) #

(\\) :: (a, b) -> (a, b) -> (a, b) #

(^) :: Integral n => (a, b) -> n -> (a, b)

(Division a, Division b, Division c) => Division (a, b, c) 
Instance details

Defined in Numeric.Algebra.Division

Methods

recip :: (a, b, c) -> (a, b, c) #

(/) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

(\\) :: (a, b, c) -> (a, b, c) -> (a, b, c) #

(^) :: Integral n => (a, b, c) -> n -> (a, b, c)

(Division a, Division b, Division c, Division d) => Division (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Division

Methods

recip :: (a, b, c, d) -> (a, b, c, d) #

(/) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

(\\) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

(^) :: Integral n => (a, b, c, d) -> n -> (a, b, c, d)

(Division a, Division b, Division c, Division d, Division e) => Division (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Division

Methods

recip :: (a, b, c, d, e) -> (a, b, c, d, e) #

(/) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

(\\) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

(^) :: Integral n => (a, b, c, d, e) -> n -> (a, b, c, d, e)

class UnitalAlgebra r a => DivisionAlgebra r a where #

Methods

recipriocal :: (a -> r) -> a -> r #

class Multiplicative m => Factorable m where #

Methods

factorWith :: (m -> m -> r) -> m -> NonEmpty r #

Instances

Instances details
Factorable Bool 
Instance details

Defined in Numeric.Algebra.Factorable

Methods

factorWith :: (Bool -> Bool -> r) -> Bool -> NonEmpty r #

Factorable () 
Instance details

Defined in Numeric.Algebra.Factorable

Methods

factorWith :: (() -> () -> r) -> () -> NonEmpty r #

(Factorable a, Factorable b) => Factorable (a, b) 
Instance details

Defined in Numeric.Algebra.Factorable

Methods

factorWith :: ((a, b) -> (a, b) -> r) -> (a, b) -> NonEmpty r #

(Factorable a, Factorable b, Factorable c) => Factorable (a, b, c) 
Instance details

Defined in Numeric.Algebra.Factorable

Methods

factorWith :: ((a, b, c) -> (a, b, c) -> r) -> (a, b, c) -> NonEmpty r #

(Factorable a, Factorable b, Factorable c, Factorable d) => Factorable (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Factorable

Methods

factorWith :: ((a, b, c, d) -> (a, b, c, d) -> r) -> (a, b, c, d) -> NonEmpty r #

(Factorable a, Factorable b, Factorable c, Factorable d, Factorable e) => Factorable (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Factorable

Methods

factorWith :: ((a, b, c, d, e) -> (a, b, c, d, e) -> r) -> (a, b, c, d, e) -> NonEmpty r #

class Bialgebra r h => HopfAlgebra r h where #

Methods

antipode :: (h -> r) -> h -> r #

Instances

Instances details
(HopfAlgebra r a, HopfAlgebra r b) => HopfAlgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Hopf

Methods

antipode :: ((a, b) -> r) -> (a, b) -> r #

(HopfAlgebra r a, HopfAlgebra r b, HopfAlgebra r c) => HopfAlgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Hopf

Methods

antipode :: ((a, b, c) -> r) -> (a, b, c) -> r #

(HopfAlgebra r a, HopfAlgebra r b, HopfAlgebra r c, HopfAlgebra r d) => HopfAlgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Hopf

Methods

antipode :: ((a, b, c, d) -> r) -> (a, b, c, d) -> r #

(HopfAlgebra r a, HopfAlgebra r b, HopfAlgebra r c, HopfAlgebra r d, HopfAlgebra r e) => HopfAlgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Hopf

Methods

antipode :: ((a, b, c, d, e) -> r) -> (a, b, c, d, e) -> r #

class Multiplicative r => Band r #

Instances

Instances details
Band Bool 
Instance details

Defined in Numeric.Algebra.Idempotent

Band () 
Instance details

Defined in Numeric.Algebra.Idempotent

(Band a, Band b) => Band (a, b) 
Instance details

Defined in Numeric.Algebra.Idempotent

(Idempotent r, IdempotentCoalgebra r a) => Band (Covector r a) 
Instance details

Defined in Numeric.Covector

(Band a, Band b, Band c) => Band (a, b, c) 
Instance details

Defined in Numeric.Algebra.Idempotent

(Band a, Band b, Band c, Band d) => Band (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Idempotent

(Band a, Band b, Band c, Band d, Band e) => Band (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Idempotent

class Algebra r a => IdempotentAlgebra r a #

Instances

Instances details
(Semiring r, Band r) => IdempotentAlgebra r IntSet 
Instance details

Defined in Numeric.Algebra.Idempotent

(Semiring r, Band r) => IdempotentAlgebra r () 
Instance details

Defined in Numeric.Algebra.Idempotent

(Semiring r, Band r, Ord a) => IdempotentAlgebra r (Set a) 
Instance details

Defined in Numeric.Algebra.Idempotent

(IdempotentAlgebra r a, IdempotentAlgebra r b) => IdempotentAlgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Idempotent

(IdempotentAlgebra r a, IdempotentAlgebra r b, IdempotentAlgebra r c) => IdempotentAlgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Idempotent

(IdempotentAlgebra r a, IdempotentAlgebra r b, IdempotentAlgebra r c, IdempotentAlgebra r d) => IdempotentAlgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Idempotent

(IdempotentAlgebra r a, IdempotentAlgebra r b, IdempotentAlgebra r c, IdempotentAlgebra r d, IdempotentAlgebra r e) => IdempotentAlgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Idempotent

class (Bialgebra r h, IdempotentAlgebra r h, IdempotentCoalgebra r h) => IdempotentBialgebra r h #

Instances

Instances details
(Bialgebra r h, IdempotentAlgebra r h, IdempotentCoalgebra r h) => IdempotentBialgebra r h 
Instance details

Defined in Numeric.Algebra.Idempotent

class (InvolutiveSemiring r, Algebra r a) => InvolutiveAlgebra r a where #

Methods

inv :: (a -> r) -> a -> r #

Instances

Instances details
InvolutiveSemiring r => InvolutiveAlgebra r () 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

inv :: (() -> r) -> () -> r #

(InvolutiveAlgebra r a, InvolutiveAlgebra r b) => InvolutiveAlgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

inv :: ((a, b) -> r) -> (a, b) -> r #

(InvolutiveAlgebra r a, InvolutiveAlgebra r b, InvolutiveAlgebra r c) => InvolutiveAlgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

inv :: ((a, b, c) -> r) -> (a, b, c) -> r #

(InvolutiveAlgebra r a, InvolutiveAlgebra r b, InvolutiveAlgebra r c, InvolutiveAlgebra r d) => InvolutiveAlgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

inv :: ((a, b, c, d) -> r) -> (a, b, c, d) -> r #

(InvolutiveAlgebra r a, InvolutiveAlgebra r b, InvolutiveAlgebra r c, InvolutiveAlgebra r d, InvolutiveAlgebra r e) => InvolutiveAlgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

inv :: ((a, b, c, d, e) -> r) -> (a, b, c, d, e) -> r #

class (Bialgebra r h, InvolutiveAlgebra r h, InvolutiveCoalgebra r h) => InvolutiveBialgebra r h #

Instances

Instances details
(Bialgebra r h, InvolutiveAlgebra r h, InvolutiveCoalgebra r h) => InvolutiveBialgebra r h 
Instance details

Defined in Numeric.Algebra.Involutive

class (InvolutiveSemiring r, Coalgebra r c) => InvolutiveCoalgebra r c where #

Methods

coinv :: (c -> r) -> c -> r #

Instances

Instances details
InvolutiveSemiring r => InvolutiveCoalgebra r () 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

coinv :: (() -> r) -> () -> r #

(InvolutiveCoalgebra r a, InvolutiveCoalgebra r b) => InvolutiveCoalgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

coinv :: ((a, b) -> r) -> (a, b) -> r #

(InvolutiveCoalgebra r a, InvolutiveCoalgebra r b, InvolutiveCoalgebra r c) => InvolutiveCoalgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

coinv :: ((a, b, c) -> r) -> (a, b, c) -> r #

(InvolutiveCoalgebra r a, InvolutiveCoalgebra r b, InvolutiveCoalgebra r c, InvolutiveCoalgebra r d) => InvolutiveCoalgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

coinv :: ((a, b, c, d) -> r) -> (a, b, c, d) -> r #

(InvolutiveCoalgebra r a, InvolutiveCoalgebra r b, InvolutiveCoalgebra r c, InvolutiveCoalgebra r d, InvolutiveCoalgebra r e) => InvolutiveCoalgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

coinv :: ((a, b, c, d, e) -> r) -> (a, b, c, d, e) -> r #

class Multiplicative r => InvolutiveMultiplication r where #

Methods

adjoint :: r -> r #

Instances

Instances details
InvolutiveMultiplication Bool 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Bool -> Bool #

InvolutiveMultiplication Int 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Int -> Int #

InvolutiveMultiplication Int8 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Int8 -> Int8 #

InvolutiveMultiplication Int16 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Int16 -> Int16 #

InvolutiveMultiplication Int32 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Int32 -> Int32 #

InvolutiveMultiplication Int64 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Int64 -> Int64 #

InvolutiveMultiplication Integer 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Integer -> Integer #

InvolutiveMultiplication Natural 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Natural -> Natural #

InvolutiveMultiplication Word 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Word -> Word #

InvolutiveMultiplication Word8 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Word8 -> Word8 #

InvolutiveMultiplication Word16 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Word16 -> Word16 #

InvolutiveMultiplication Word32 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Word32 -> Word32 #

InvolutiveMultiplication Word64 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: Word64 -> Word64 #

InvolutiveMultiplication () 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: () -> () #

InvolutiveAlgebra r h => InvolutiveMultiplication (h -> r) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: (h -> r) -> h -> r #

(InvolutiveMultiplication a, InvolutiveMultiplication b) => InvolutiveMultiplication (a, b) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: (a, b) -> (a, b) #

(InvolutiveMultiplication a, InvolutiveMultiplication b, InvolutiveMultiplication c) => InvolutiveMultiplication (a, b, c) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: (a, b, c) -> (a, b, c) #

(InvolutiveMultiplication a, InvolutiveMultiplication b, InvolutiveMultiplication c, InvolutiveMultiplication d) => InvolutiveMultiplication (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: (a, b, c, d) -> (a, b, c, d) #

(InvolutiveMultiplication a, InvolutiveMultiplication b, InvolutiveMultiplication c, InvolutiveMultiplication d, InvolutiveMultiplication e) => InvolutiveMultiplication (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Involutive

Methods

adjoint :: (a, b, c, d, e) -> (a, b, c, d, e) #

class (Semiring r, InvolutiveMultiplication r) => InvolutiveSemiring r #

Instances

Instances details
InvolutiveSemiring Bool 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Int 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Int8 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Int16 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Int32 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Int64 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Integer 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Natural 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Word 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Word8 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Word16 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Word32 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring Word64 
Instance details

Defined in Numeric.Algebra.Involutive

InvolutiveSemiring () 
Instance details

Defined in Numeric.Algebra.Involutive

(InvolutiveSemiring a, InvolutiveSemiring b) => InvolutiveSemiring (a, b) 
Instance details

Defined in Numeric.Algebra.Involutive

(InvolutiveSemiring a, InvolutiveSemiring b, InvolutiveSemiring c) => InvolutiveSemiring (a, b, c) 
Instance details

Defined in Numeric.Algebra.Involutive

(InvolutiveSemiring a, InvolutiveSemiring b, InvolutiveSemiring c, InvolutiveSemiring d) => InvolutiveSemiring (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Involutive

(InvolutiveSemiring a, InvolutiveSemiring b, InvolutiveSemiring c, InvolutiveSemiring d, InvolutiveSemiring e) => InvolutiveSemiring (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Involutive

class (Commutative r, InvolutiveMultiplication r) => TriviallyInvolutive r #

Instances

Instances details
TriviallyInvolutive Bool 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Int 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Int8 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Int16 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Int32 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Int64 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Integer 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Natural 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Word 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Word8 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Word16 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Word32 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive Word64 
Instance details

Defined in Numeric.Algebra.Involutive

TriviallyInvolutive () 
Instance details

Defined in Numeric.Algebra.Involutive

(TriviallyInvolutive r, TriviallyInvolutiveAlgebra r a) => TriviallyInvolutive (a -> r) 
Instance details

Defined in Numeric.Algebra.Involutive

(TriviallyInvolutive a, TriviallyInvolutive b) => TriviallyInvolutive (a, b) 
Instance details

Defined in Numeric.Algebra.Involutive

(TriviallyInvolutive a, TriviallyInvolutive b, TriviallyInvolutive c) => TriviallyInvolutive (a, b, c) 
Instance details

Defined in Numeric.Algebra.Involutive

(TriviallyInvolutive a, TriviallyInvolutive b, TriviallyInvolutive c, TriviallyInvolutive d) => TriviallyInvolutive (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Involutive

(TriviallyInvolutive a, TriviallyInvolutive b, TriviallyInvolutive c, TriviallyInvolutive d, TriviallyInvolutive e) => TriviallyInvolutive (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Involutive

class (UnitalAlgebra r a, CounitalCoalgebra r a) => Bialgebra r a #

Instances

Instances details
Semiring r => Bialgebra r () 
Instance details

Defined in Numeric.Algebra.Unital

(Monoidal r, Semiring r) => Bialgebra r [a] 
Instance details

Defined in Numeric.Algebra.Unital

(Monoidal r, Semiring r) => Bialgebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Unital

(Bialgebra r a, Bialgebra r b) => Bialgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Unital

(Bialgebra r a, Bialgebra r b, Bialgebra r c) => Bialgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Unital

(Bialgebra r a, Bialgebra r b, Bialgebra r c, Bialgebra r d) => Bialgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Unital

(Bialgebra r a, Bialgebra r b, Bialgebra r c, Bialgebra r d, Bialgebra r e) => Bialgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Unital

class Coalgebra r c => CounitalCoalgebra r c where #

Methods

counit :: (c -> r) -> r #

Instances

Instances details
Semiring r => CounitalCoalgebra r () 
Instance details

Defined in Numeric.Algebra.Unital

Methods

counit :: (() -> r) -> r #

Semiring r => CounitalCoalgebra r [a] 
Instance details

Defined in Numeric.Algebra.Unital

Methods

counit :: ([a] -> r) -> r #

Semiring r => CounitalCoalgebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

counit :: (Seq a -> r) -> r #

(Unital r, UnitalAlgebra r m) => CounitalCoalgebra r (m -> r) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

counit :: ((m -> r) -> r) -> r #

(CounitalCoalgebra r a, CounitalCoalgebra r b) => CounitalCoalgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

counit :: ((a, b) -> r) -> r #

(CounitalCoalgebra r a, CounitalCoalgebra r b, CounitalCoalgebra r c) => CounitalCoalgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

counit :: ((a, b, c) -> r) -> r #

(CounitalCoalgebra r a, CounitalCoalgebra r b, CounitalCoalgebra r c, CounitalCoalgebra r d) => CounitalCoalgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

counit :: ((a, b, c, d) -> r) -> r #

(CounitalCoalgebra r a, CounitalCoalgebra r b, CounitalCoalgebra r c, CounitalCoalgebra r d, CounitalCoalgebra r e) => CounitalCoalgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

counit :: ((a, b, c, d, e) -> r) -> r #

class Multiplicative r => Unital r where #

Minimal complete definition

one

Methods

one :: r #

pow :: r -> Natural -> r #

productWith :: Foldable f => (a -> r) -> f a -> r #

Instances

Instances details
Unital Bool 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Bool #

pow :: Bool -> Natural -> Bool #

productWith :: Foldable f => (a -> Bool) -> f a -> Bool #

Unital Int 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Int #

pow :: Int -> Natural -> Int #

productWith :: Foldable f => (a -> Int) -> f a -> Int #

Unital Int8 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Int8 #

pow :: Int8 -> Natural -> Int8 #

productWith :: Foldable f => (a -> Int8) -> f a -> Int8 #

Unital Int16 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Int16 #

pow :: Int16 -> Natural -> Int16 #

productWith :: Foldable f => (a -> Int16) -> f a -> Int16 #

Unital Int32 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Int32 #

pow :: Int32 -> Natural -> Int32 #

productWith :: Foldable f => (a -> Int32) -> f a -> Int32 #

Unital Int64 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Int64 #

pow :: Int64 -> Natural -> Int64 #

productWith :: Foldable f => (a -> Int64) -> f a -> Int64 #

Unital Integer 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Integer #

pow :: Integer -> Natural -> Integer #

productWith :: Foldable f => (a -> Integer) -> f a -> Integer #

Unital Natural 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Natural #

pow :: Natural -> Natural -> Natural #

productWith :: Foldable f => (a -> Natural) -> f a -> Natural #

Unital Word 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Word #

pow :: Word -> Natural -> Word #

productWith :: Foldable f => (a -> Word) -> f a -> Word #

Unital Word8 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Word8 #

pow :: Word8 -> Natural -> Word8 #

productWith :: Foldable f => (a -> Word8) -> f a -> Word8 #

Unital Word16 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Word16 #

pow :: Word16 -> Natural -> Word16 #

productWith :: Foldable f => (a -> Word16) -> f a -> Word16 #

Unital Word32 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Word32 #

pow :: Word32 -> Natural -> Word32 #

productWith :: Foldable f => (a -> Word32) -> f a -> Word32 #

Unital Word64 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: Word64 #

pow :: Word64 -> Natural -> Word64 #

productWith :: Foldable f => (a -> Word64) -> f a -> Word64 #

Unital () 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: () #

pow :: () -> Natural -> () #

productWith :: Foldable f => (a -> ()) -> f a -> () #

GCDDomain d => Unital (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

one :: Fraction d #

pow :: Fraction d -> Natural -> Fraction d #

productWith :: Foldable f => (a -> Fraction d) -> f a -> Fraction d #

Unital a => Unital (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

one :: Mult a #

pow :: Mult a -> Natural -> Mult a #

productWith :: Foldable f => (a0 -> Mult a) -> f a0 -> Mult a #

Unital a => Unital (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

one :: WrapAlgebra a #

pow :: WrapAlgebra a -> Natural -> WrapAlgebra a #

productWith :: Foldable f => (a0 -> WrapAlgebra a) -> f a0 -> WrapAlgebra a #

Num a => Unital (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

one :: WrapIntegral a #

pow :: WrapIntegral a -> Natural -> WrapIntegral a #

productWith :: Foldable f => (a0 -> WrapIntegral a) -> f a0 -> WrapIntegral a #

Num a => Unital (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Unital (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

one :: WrapNum a #

pow :: WrapNum a -> Natural -> WrapNum a #

productWith :: Foldable f => (a0 -> WrapNum a) -> f a0 -> WrapNum a #

(Unital r, UnitalAlgebra r a) => Unital (a -> r) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: a -> r #

pow :: (a -> r) -> Natural -> a -> r #

productWith :: Foldable f => (a0 -> a -> r) -> f a0 -> a -> r #

(Unital a, Unital b) => Unital (a, b) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: (a, b) #

pow :: (a, b) -> Natural -> (a, b) #

productWith :: Foldable f => (a0 -> (a, b)) -> f a0 -> (a, b) #

CounitalCoalgebra r m => Unital (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

one :: Covector r m #

pow :: Covector r m -> Natural -> Covector r m #

productWith :: Foldable f => (a -> Covector r m) -> f a -> Covector r m #

(Unital a, Unital b, Unital c) => Unital (a, b, c) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: (a, b, c) #

pow :: (a, b, c) -> Natural -> (a, b, c) #

productWith :: Foldable f => (a0 -> (a, b, c)) -> f a0 -> (a, b, c) #

(Unital a, Unital b, Unital c, Unital d) => Unital (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: (a, b, c, d) #

pow :: (a, b, c, d) -> Natural -> (a, b, c, d) #

productWith :: Foldable f => (a0 -> (a, b, c, d)) -> f a0 -> (a, b, c, d) #

(Unital a, Unital b, Unital c, Unital d, Unital e) => Unital (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

one :: (a, b, c, d, e) #

pow :: (a, b, c, d, e) -> Natural -> (a, b, c, d, e) #

productWith :: Foldable f => (a0 -> (a, b, c, d, e)) -> f a0 -> (a, b, c, d, e) #

class Algebra r a => UnitalAlgebra r a where #

Methods

unit :: r -> a -> r #

Instances

Instances details
Semiring r => UnitalAlgebra r () 
Instance details

Defined in Numeric.Algebra.Unital

Methods

unit :: r -> () -> r #

(Monoidal r, Semiring r) => UnitalAlgebra r [a] 
Instance details

Defined in Numeric.Algebra.Unital

Methods

unit :: r -> [a] -> r #

(Monoidal r, Semiring r) => UnitalAlgebra r (Seq a) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

unit :: r -> Seq a -> r #

(UnitalAlgebra r a, UnitalAlgebra r b) => UnitalAlgebra r (a, b) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

unit :: r -> (a, b) -> r #

(UnitalAlgebra r a, UnitalAlgebra r b, UnitalAlgebra r c) => UnitalAlgebra r (a, b, c) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

unit :: r -> (a, b, c) -> r #

(UnitalAlgebra r a, UnitalAlgebra r b, UnitalAlgebra r c, UnitalAlgebra r d) => UnitalAlgebra r (a, b, c, d) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

unit :: r -> (a, b, c, d) -> r #

(UnitalAlgebra r a, UnitalAlgebra r b, UnitalAlgebra r c, UnitalAlgebra r d, UnitalAlgebra r e) => UnitalAlgebra r (a, b, c, d, e) 
Instance details

Defined in Numeric.Algebra.Unital

Methods

unit :: r -> (a, b, c, d, e) -> r #

newtype Covector r a #

Constructors

Covector 

Fields

  • ($*) :: (a -> r) -> r
     

Instances

Instances details
LeftModule r s => LeftModule r (Covector s m) 
Instance details

Defined in Numeric.Covector

Methods

(.*) :: r -> Covector s m -> Covector s m #

RightModule r s => RightModule r (Covector s m) 
Instance details

Defined in Numeric.Covector

Methods

(*.) :: Covector s m -> r -> Covector s m #

Monad (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

(>>=) :: Covector r a -> (a -> Covector r b) -> Covector r b #

(>>) :: Covector r a -> Covector r b -> Covector r b #

return :: a -> Covector r a #

Functor (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

fmap :: (a -> b) -> Covector r a -> Covector r b #

(<$) :: a -> Covector r b -> Covector r a #

Applicative (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

pure :: a -> Covector r a #

(<*>) :: Covector r (a -> b) -> Covector r a -> Covector r b #

liftA2 :: (a -> b -> c) -> Covector r a -> Covector r b -> Covector r c #

(*>) :: Covector r a -> Covector r b -> Covector r b #

(<*) :: Covector r a -> Covector r b -> Covector r a #

Monoidal r => Alternative (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

empty :: Covector r a #

(<|>) :: Covector r a -> Covector r a -> Covector r a #

some :: Covector r a -> Covector r [a] #

many :: Covector r a -> Covector r [a] #

Monoidal r => MonadPlus (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

mzero :: Covector r a #

mplus :: Covector r a -> Covector r a -> Covector r a #

Apply (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

(<.>) :: Covector r (a -> b) -> Covector r a -> Covector r b

(.>) :: Covector r a -> Covector r b -> Covector r b

(<.) :: Covector r a -> Covector r b -> Covector r a

liftF2 :: (a -> b -> c) -> Covector r a -> Covector r b -> Covector r c

Bind (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

(>>-) :: Covector r a -> (a -> Covector r b) -> Covector r b

join :: Covector r (Covector r a) -> Covector r a

Additive r => Alt (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

(<!>) :: Covector r a -> Covector r a -> Covector r a

some :: Applicative (Covector r) => Covector r a -> Covector r [a]

many :: Applicative (Covector r) => Covector r a -> Covector r [a]

Monoidal r => Plus (Covector r) 
Instance details

Defined in Numeric.Covector

Methods

zero :: Covector r a

Abelian s => Abelian (Covector s a) 
Instance details

Defined in Numeric.Covector

Additive r => Additive (Covector r a) 
Instance details

Defined in Numeric.Covector

Methods

(+) :: Covector r a -> Covector r a -> Covector r a #

sinnum1p :: Natural -> Covector r a -> Covector r a #

sumWith1 :: Foldable1 f => (a0 -> Covector r a) -> f a0 -> Covector r a #

Idempotent r => Idempotent (Covector r a) 
Instance details

Defined in Numeric.Covector

Group s => Group (Covector s a) 
Instance details

Defined in Numeric.Covector

Methods

(-) :: Covector s a -> Covector s a -> Covector s a #

negate :: Covector s a -> Covector s a #

subtract :: Covector s a -> Covector s a -> Covector s a #

times :: Integral n => n -> Covector s a -> Covector s a #

Monoidal s => Monoidal (Covector s a) 
Instance details

Defined in Numeric.Covector

Methods

zero :: Covector s a #

sinnum :: Natural -> Covector s a -> Covector s a #

sumWith :: Foldable f => (a0 -> Covector s a) -> f a0 -> Covector s a #

Coalgebra r m => Multiplicative (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

(*) :: Covector r m -> Covector r m -> Covector r m #

pow1p :: Covector r m -> Natural -> Covector r m #

productWith1 :: Foldable1 f => (a -> Covector r m) -> f a -> Covector r m #

Coalgebra r m => Semiring (Covector r m) 
Instance details

Defined in Numeric.Covector

(Commutative m, Coalgebra r m) => Commutative (Covector r m) 
Instance details

Defined in Numeric.Covector

(Idempotent r, IdempotentCoalgebra r a) => Band (Covector r a) 
Instance details

Defined in Numeric.Covector

CounitalCoalgebra r m => Unital (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

one :: Covector r m #

pow :: Covector r m -> Natural -> Covector r m #

productWith :: Foldable f => (a -> Covector r m) -> f a -> Covector r m #

(Rig r, CounitalCoalgebra r m) => Rig (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

fromNatural :: Natural -> Covector r m #

(Ring r, CounitalCoalgebra r m) => Ring (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

fromInteger :: Integer -> Covector r m

Coalgebra r m => LeftModule (Covector r m) (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

(.*) :: Covector r m -> Covector r m -> Covector r m #

Coalgebra r m => RightModule (Covector r m) (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

(*.) :: Covector r m -> Covector r m -> Covector r m #

class Unital r => DecidableAssociates r where #

Methods

isAssociate :: r -> r -> Bool #

Instances

Instances details
DecidableAssociates Bool 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Bool -> Bool -> Bool #

DecidableAssociates Int 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Int -> Int -> Bool #

DecidableAssociates Int8 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Int8 -> Int8 -> Bool #

DecidableAssociates Int16 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Int16 -> Int16 -> Bool #

DecidableAssociates Int32 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Int32 -> Int32 -> Bool #

DecidableAssociates Int64 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Int64 -> Int64 -> Bool #

DecidableAssociates Integer 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Integer -> Integer -> Bool #

DecidableAssociates Natural 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Natural -> Natural -> Bool #

DecidableAssociates Word 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Word -> Word -> Bool #

DecidableAssociates Word8 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Word8 -> Word8 -> Bool #

DecidableAssociates Word16 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Word16 -> Word16 -> Bool #

DecidableAssociates Word32 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Word32 -> Word32 -> Bool #

DecidableAssociates Word64 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: Word64 -> Word64 -> Bool #

DecidableAssociates () 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: () -> () -> Bool #

GCDDomain d => DecidableAssociates (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

isAssociate :: Fraction d -> Fraction d -> Bool #

DecidableAssociates a => DecidableAssociates (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => DecidableAssociates (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => DecidableAssociates (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(DecidableAssociates a, DecidableAssociates b) => DecidableAssociates (a, b) 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: (a, b) -> (a, b) -> Bool #

(DecidableAssociates a, DecidableAssociates b, DecidableAssociates c) => DecidableAssociates (a, b, c) 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: (a, b, c) -> (a, b, c) -> Bool #

(DecidableAssociates a, DecidableAssociates b, DecidableAssociates c, DecidableAssociates d) => DecidableAssociates (a, b, c, d) 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: (a, b, c, d) -> (a, b, c, d) -> Bool #

(DecidableAssociates a, DecidableAssociates b, DecidableAssociates c, DecidableAssociates d, DecidableAssociates e) => DecidableAssociates (a, b, c, d, e) 
Instance details

Defined in Numeric.Decidable.Associates

Methods

isAssociate :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

class Unital r => DecidableUnits r where #

Minimal complete definition

recipUnit

Methods

recipUnit :: r -> Maybe r #

isUnit :: r -> Bool #

(^?) :: Integral n => r -> n -> Maybe r #

Instances

Instances details
DecidableUnits Bool 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Bool -> Maybe Bool #

isUnit :: Bool -> Bool #

(^?) :: Integral n => Bool -> n -> Maybe Bool #

DecidableUnits Int 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Int -> Maybe Int #

isUnit :: Int -> Bool #

(^?) :: Integral n => Int -> n -> Maybe Int #

DecidableUnits Int8 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Int8 -> Maybe Int8 #

isUnit :: Int8 -> Bool #

(^?) :: Integral n => Int8 -> n -> Maybe Int8 #

DecidableUnits Int16 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Int16 -> Maybe Int16 #

isUnit :: Int16 -> Bool #

(^?) :: Integral n => Int16 -> n -> Maybe Int16 #

DecidableUnits Int32 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Int32 -> Maybe Int32 #

isUnit :: Int32 -> Bool #

(^?) :: Integral n => Int32 -> n -> Maybe Int32 #

DecidableUnits Int64 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Int64 -> Maybe Int64 #

isUnit :: Int64 -> Bool #

(^?) :: Integral n => Int64 -> n -> Maybe Int64 #

DecidableUnits Integer 
Instance details

Defined in Numeric.Decidable.Units

DecidableUnits Natural 
Instance details

Defined in Numeric.Decidable.Units

DecidableUnits Word 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Word -> Maybe Word #

isUnit :: Word -> Bool #

(^?) :: Integral n => Word -> n -> Maybe Word #

DecidableUnits Word8 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: Word8 -> Maybe Word8 #

isUnit :: Word8 -> Bool #

(^?) :: Integral n => Word8 -> n -> Maybe Word8 #

DecidableUnits Word16 
Instance details

Defined in Numeric.Decidable.Units

DecidableUnits Word32 
Instance details

Defined in Numeric.Decidable.Units

DecidableUnits Word64 
Instance details

Defined in Numeric.Decidable.Units

DecidableUnits () 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: () -> Maybe () #

isUnit :: () -> Bool #

(^?) :: Integral n => () -> n -> Maybe () #

GCDDomain d => DecidableUnits (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

recipUnit :: Fraction d -> Maybe (Fraction d) #

isUnit :: Fraction d -> Bool #

(^?) :: Integral n => Fraction d -> n -> Maybe (Fraction d) #

DecidableUnits a => DecidableUnits (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => DecidableUnits (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => DecidableUnits (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(DecidableUnits a, DecidableUnits b) => DecidableUnits (a, b) 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: (a, b) -> Maybe (a, b) #

isUnit :: (a, b) -> Bool #

(^?) :: Integral n => (a, b) -> n -> Maybe (a, b) #

(DecidableUnits a, DecidableUnits b, DecidableUnits c) => DecidableUnits (a, b, c) 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: (a, b, c) -> Maybe (a, b, c) #

isUnit :: (a, b, c) -> Bool #

(^?) :: Integral n => (a, b, c) -> n -> Maybe (a, b, c) #

(DecidableUnits a, DecidableUnits b, DecidableUnits c, DecidableUnits d) => DecidableUnits (a, b, c, d) 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: (a, b, c, d) -> Maybe (a, b, c, d) #

isUnit :: (a, b, c, d) -> Bool #

(^?) :: Integral n => (a, b, c, d) -> n -> Maybe (a, b, c, d) #

(DecidableUnits a, DecidableUnits b, DecidableUnits c, DecidableUnits d, DecidableUnits e) => DecidableUnits (a, b, c, d, e) 
Instance details

Defined in Numeric.Decidable.Units

Methods

recipUnit :: (a, b, c, d, e) -> Maybe (a, b, c, d, e) #

isUnit :: (a, b, c, d, e) -> Bool #

(^?) :: Integral n => (a, b, c, d, e) -> n -> Maybe (a, b, c, d, e) #

class Monoidal r => DecidableZero r where #

Methods

isZero :: r -> Bool #

Instances

Instances details
DecidableZero Bool 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Bool -> Bool #

DecidableZero Int 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Int -> Bool #

DecidableZero Int8 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Int8 -> Bool #

DecidableZero Int16 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Int16 -> Bool #

DecidableZero Int32 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Int32 -> Bool #

DecidableZero Int64 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Int64 -> Bool #

DecidableZero Integer 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Integer -> Bool #

DecidableZero Natural 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Natural -> Bool #

DecidableZero Word 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Word -> Bool #

DecidableZero Word8 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Word8 -> Bool #

DecidableZero Word16 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Word16 -> Bool #

DecidableZero Word32 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Word32 -> Bool #

DecidableZero Word64 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: Word64 -> Bool #

DecidableZero () 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: () -> Bool #

GCDDomain d => DecidableZero (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

isZero :: Fraction d -> Bool #

DecidableZero a => DecidableZero (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

isZero :: WrapAlgebra a -> Bool #

(Num a, Eq a) => DecidableZero (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

isZero :: WrapIntegral a -> Bool #

(Num a, Eq a) => DecidableZero (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

isZero :: WrapFractional a -> Bool #

(Num a, Eq a) => DecidableZero (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

isZero :: WrapNum a -> Bool #

(DecidableZero a, DecidableZero b) => DecidableZero (a, b) 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: (a, b) -> Bool #

(DecidableZero a, DecidableZero b, DecidableZero c) => DecidableZero (a, b, c) 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: (a, b, c) -> Bool #

(DecidableZero a, DecidableZero b, DecidableZero c, DecidableZero d) => DecidableZero (a, b, c, d) 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: (a, b, c, d) -> Bool #

(DecidableZero a, DecidableZero b, DecidableZero c, DecidableZero d, DecidableZero e) => DecidableZero (a, b, c, d, e) 
Instance details

Defined in Numeric.Decidable.Zero

Methods

isZero :: (a, b, c, d, e) -> Bool #

class (Semiring r, Idempotent r) => Dioid r #

Instances

Instances details
(Semiring r, Idempotent r) => Dioid r 
Instance details

Defined in Numeric.Dioid.Class

class (Euclidean d, Division d) => Field d #

Instances

Instances details
(Euclidean d, Division d) => Field d 
Instance details

Defined in Numeric.Field.Class

class (Additive r, Order r) => AdditiveOrder r #

Instances

Instances details
AdditiveOrder Bool 
Instance details

Defined in Numeric.Order.Additive

AdditiveOrder Integer 
Instance details

Defined in Numeric.Order.Additive

AdditiveOrder Natural 
Instance details

Defined in Numeric.Order.Additive

AdditiveOrder () 
Instance details

Defined in Numeric.Order.Additive

(AdditiveOrder a, AdditiveOrder b) => AdditiveOrder (a, b) 
Instance details

Defined in Numeric.Order.Additive

(AdditiveOrder a, AdditiveOrder b, AdditiveOrder c) => AdditiveOrder (a, b, c) 
Instance details

Defined in Numeric.Order.Additive

(AdditiveOrder a, AdditiveOrder b, AdditiveOrder c, AdditiveOrder d) => AdditiveOrder (a, b, c, d) 
Instance details

Defined in Numeric.Order.Additive

(AdditiveOrder a, AdditiveOrder b, AdditiveOrder c, AdditiveOrder d, AdditiveOrder e) => AdditiveOrder (a, b, c, d, e) 
Instance details

Defined in Numeric.Order.Additive

class Order a => LocallyFiniteOrder a #

Minimal complete definition

range, rangeSize

Instances

Instances details
LocallyFiniteOrder Bool 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Bool -> Bool -> [Bool]

rangeSize :: Bool -> Bool -> Natural

moebiusInversion :: Ring r => Bool -> Bool -> r

LocallyFiniteOrder Int 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Int -> Int -> [Int]

rangeSize :: Int -> Int -> Natural

moebiusInversion :: Ring r => Int -> Int -> r

LocallyFiniteOrder Int8 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Int8 -> Int8 -> [Int8]

rangeSize :: Int8 -> Int8 -> Natural

moebiusInversion :: Ring r => Int8 -> Int8 -> r

LocallyFiniteOrder Int16 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Int16 -> Int16 -> [Int16]

rangeSize :: Int16 -> Int16 -> Natural

moebiusInversion :: Ring r => Int16 -> Int16 -> r

LocallyFiniteOrder Int32 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Int32 -> Int32 -> [Int32]

rangeSize :: Int32 -> Int32 -> Natural

moebiusInversion :: Ring r => Int32 -> Int32 -> r

LocallyFiniteOrder Int64 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Int64 -> Int64 -> [Int64]

rangeSize :: Int64 -> Int64 -> Natural

moebiusInversion :: Ring r => Int64 -> Int64 -> r

LocallyFiniteOrder Integer 
Instance details

Defined in Numeric.Order.LocallyFinite

LocallyFiniteOrder Natural 
Instance details

Defined in Numeric.Order.LocallyFinite

LocallyFiniteOrder Word 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Word -> Word -> [Word]

rangeSize :: Word -> Word -> Natural

moebiusInversion :: Ring r => Word -> Word -> r

LocallyFiniteOrder Word8 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Word8 -> Word8 -> [Word8]

rangeSize :: Word8 -> Word8 -> Natural

moebiusInversion :: Ring r => Word8 -> Word8 -> r

LocallyFiniteOrder Word16 
Instance details

Defined in Numeric.Order.LocallyFinite

LocallyFiniteOrder Word32 
Instance details

Defined in Numeric.Order.LocallyFinite

LocallyFiniteOrder Word64 
Instance details

Defined in Numeric.Order.LocallyFinite

LocallyFiniteOrder () 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: () -> () -> [()]

rangeSize :: () -> () -> Natural

moebiusInversion :: Ring r => () -> () -> r

Ord a => LocallyFiniteOrder (Set a) 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: Set a -> Set a -> [Set a]

rangeSize :: Set a -> Set a -> Natural

moebiusInversion :: Ring r => Set a -> Set a -> r

(LocallyFiniteOrder a, LocallyFiniteOrder b) => LocallyFiniteOrder (a, b) 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: (a, b) -> (a, b) -> [(a, b)]

rangeSize :: (a, b) -> (a, b) -> Natural

moebiusInversion :: Ring r => (a, b) -> (a, b) -> r

(LocallyFiniteOrder a, LocallyFiniteOrder b, LocallyFiniteOrder c) => LocallyFiniteOrder (a, b, c) 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: (a, b, c) -> (a, b, c) -> [(a, b, c)]

rangeSize :: (a, b, c) -> (a, b, c) -> Natural

moebiusInversion :: Ring r => (a, b, c) -> (a, b, c) -> r

(LocallyFiniteOrder a, LocallyFiniteOrder b, LocallyFiniteOrder c, LocallyFiniteOrder d) => LocallyFiniteOrder (a, b, c, d) 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: (a, b, c, d) -> (a, b, c, d) -> [(a, b, c, d)]

rangeSize :: (a, b, c, d) -> (a, b, c, d) -> Natural

moebiusInversion :: Ring r => (a, b, c, d) -> (a, b, c, d) -> r

(LocallyFiniteOrder a, LocallyFiniteOrder b, LocallyFiniteOrder c, LocallyFiniteOrder d, LocallyFiniteOrder e) => LocallyFiniteOrder (a, b, c, d, e) 
Instance details

Defined in Numeric.Order.LocallyFinite

Methods

range :: (a, b, c, d, e) -> (a, b, c, d, e) -> [(a, b, c, d, e)]

rangeSize :: (a, b, c, d, e) -> (a, b, c, d, e) -> Natural

moebiusInversion :: Ring r => (a, b, c, d, e) -> (a, b, c, d, e) -> r

class Additive r => Quadrance r m where #

Methods

quadrance :: m -> r #

Instances

Instances details
Quadrance () a 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: a -> () #

Rig r => Quadrance r Word8 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Word8 -> r #

Rig r => Quadrance r Word64 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Word64 -> r #

Rig r => Quadrance r Word32 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Word32 -> r #

Rig r => Quadrance r Word16 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Word16 -> r #

Rig r => Quadrance r Word 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Word -> r #

Rig r => Quadrance r Natural 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Natural -> r #

Rig r => Quadrance r Integer 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Integer -> r #

Rig r => Quadrance r Int8 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Int8 -> r #

Rig r => Quadrance r Int64 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Int64 -> r #

Rig r => Quadrance r Int32 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Int32 -> r #

Rig r => Quadrance r Int16 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Int16 -> r #

Rig r => Quadrance r Int 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Int -> r #

Rig r => Quadrance r Bool 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: Bool -> r #

(Additive r, Monoidal r) => Quadrance r () 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: () -> r #

(Quadrance r a, Quadrance r b) => Quadrance r (a, b) 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: (a, b) -> r #

(Quadrance r a, Quadrance r b, Quadrance r c) => Quadrance r (a, b, c) 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: (a, b, c) -> r #

(Quadrance r a, Quadrance r b, Quadrance r c, Quadrance r d) => Quadrance r (a, b, c, d) 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: (a, b, c, d) -> r #

(Quadrance r a, Quadrance r b, Quadrance r c, Quadrance r d, Quadrance r e) => Quadrance r (a, b, c, d, e) 
Instance details

Defined in Numeric.Quadrance.Class

Methods

quadrance :: (a, b, c, d, e) -> r #

class Rig r => Characteristic r where #

Methods

char :: proxy r -> Natural #

Instances

Instances details
Characteristic Bool 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Bool -> Natural #

Characteristic Int 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Int -> Natural #

Characteristic Int8 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Int8 -> Natural #

Characteristic Int16 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Int16 -> Natural #

Characteristic Int32 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Int32 -> Natural #

Characteristic Int64 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Int64 -> Natural #

Characteristic Integer 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Integer -> Natural #

Characteristic Natural 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Natural -> Natural #

Characteristic Word 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Word -> Natural #

Characteristic Word8 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Word8 -> Natural #

Characteristic Word16 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Word16 -> Natural #

Characteristic Word32 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Word32 -> Natural #

Characteristic Word64 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy Word64 -> Natural #

Characteristic () 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy () -> Natural #

(Characteristic d, GCDDomain d) => Characteristic (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

char :: proxy (Fraction d) -> Natural #

(Characteristic a, Characteristic b) => Characteristic (a, b) 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy (a, b) -> Natural #

(Characteristic a, Characteristic b, Characteristic c) => Characteristic (a, b, c) 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy (a, b, c) -> Natural #

(Characteristic a, Characteristic b, Characteristic c, Characteristic d) => Characteristic (a, b, c, d) 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy (a, b, c, d) -> Natural #

(Characteristic a, Characteristic b, Characteristic c, Characteristic d, Characteristic e) => Characteristic (a, b, c, d, e) 
Instance details

Defined in Numeric.Rig.Characteristic

Methods

char :: proxy (a, b, c, d, e) -> Natural #

class (Semiring r, Unital r, Monoidal r) => Rig r where #

Minimal complete definition

Nothing

Methods

fromNatural :: Natural -> r #

Instances

Instances details
Rig Bool 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Bool #

Rig Int 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Int #

Rig Int8 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Int8 #

Rig Int16 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Int16 #

Rig Int32 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Int32 #

Rig Int64 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Int64 #

Rig Integer 
Instance details

Defined in Numeric.Rig.Class

Rig Natural 
Instance details

Defined in Numeric.Rig.Class

Rig Word 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Word #

Rig Word8 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> Word8 #

Rig Word16 
Instance details

Defined in Numeric.Rig.Class

Rig Word32 
Instance details

Defined in Numeric.Rig.Class

Rig Word64 
Instance details

Defined in Numeric.Rig.Class

Rig () 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> () #

GCDDomain d => Rig (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

fromNatural :: Natural -> Fraction d #

Rig a => Rig (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Rig (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Rig (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Rig (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

fromNatural :: Natural -> WrapNum a #

(Rig a, Rig b) => Rig (a, b) 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> (a, b) #

(Rig r, CounitalCoalgebra r m) => Rig (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

fromNatural :: Natural -> Covector r m #

(Rig a, Rig b, Rig c) => Rig (a, b, c) 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> (a, b, c) #

(Rig a, Rig b, Rig c, Rig d) => Rig (a, b, c, d) 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> (a, b, c, d) #

(Rig a, Rig b, Rig c, Rig d, Rig e) => Rig (a, b, c, d, e) 
Instance details

Defined in Numeric.Rig.Class

Methods

fromNatural :: Natural -> (a, b, c, d, e) #

class (AdditiveOrder r, Rig r) => OrderedRig r #

Instances

Instances details
OrderedRig Bool 
Instance details

Defined in Numeric.Rig.Ordered

OrderedRig Integer 
Instance details

Defined in Numeric.Rig.Ordered

OrderedRig Natural 
Instance details

Defined in Numeric.Rig.Ordered

OrderedRig () 
Instance details

Defined in Numeric.Rig.Ordered

(OrderedRig a, OrderedRig b) => OrderedRig (a, b) 
Instance details

Defined in Numeric.Rig.Ordered

(OrderedRig a, OrderedRig b, OrderedRig c) => OrderedRig (a, b, c) 
Instance details

Defined in Numeric.Rig.Ordered

(OrderedRig a, OrderedRig b, OrderedRig c, OrderedRig d) => OrderedRig (a, b, c, d) 
Instance details

Defined in Numeric.Rig.Ordered

(OrderedRig a, OrderedRig b, OrderedRig c, OrderedRig d, OrderedRig e) => OrderedRig (a, b, c, d, e) 
Instance details

Defined in Numeric.Rig.Ordered

class (Rig r, Rng r) => Ring r #

Instances

Instances details
Ring Int 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> Int

Ring Int8 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> Int8

Ring Int16 
Instance details

Defined in Numeric.Ring.Class

Ring Int32 
Instance details

Defined in Numeric.Ring.Class

Ring Int64 
Instance details

Defined in Numeric.Ring.Class

Ring Integer 
Instance details

Defined in Numeric.Ring.Class

Ring Word 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> Word

Ring Word8 
Instance details

Defined in Numeric.Ring.Class

Ring Word16 
Instance details

Defined in Numeric.Ring.Class

Ring Word32 
Instance details

Defined in Numeric.Ring.Class

Ring Word64 
Instance details

Defined in Numeric.Ring.Class

Ring () 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> ()

GCDDomain d => Ring (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Ring a => Ring (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Ring (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Ring (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Ring (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

fromInteger :: Integer -> WrapNum a

(Ring a, Ring b) => Ring (a, b) 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> (a, b)

(Ring r, CounitalCoalgebra r m) => Ring (Covector r m) 
Instance details

Defined in Numeric.Covector

Methods

fromInteger :: Integer -> Covector r m

(Ring a, Ring b, Ring c) => Ring (a, b, c) 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> (a, b, c)

(Ring a, Ring b, Ring c, Ring d) => Ring (a, b, c, d) 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> (a, b, c, d)

(Ring a, Ring b, Ring c, Ring d, Ring e) => Ring (a, b, c, d, e) 
Instance details

Defined in Numeric.Ring.Class

Methods

fromInteger :: Integer -> (a, b, c, d, e)

class (Division r, Ring r) => DivisionRing r #

Instances

Instances details
(Division r, Ring r) => DivisionRing r 
Instance details

Defined in Numeric.Ring.Division

class Ring r => LocalRing r #

class (Group r, Semiring r) => Rng r #

Instances

Instances details
(Group r, Semiring r) => Rng r 
Instance details

Defined in Numeric.Rng.Class

class (DecidableUnits r, DecidableAssociates r) => UnitNormalForm r where #

Minimal complete definition

Nothing

Methods

splitUnit :: r -> (r, r) #

Instances

Instances details
UnitNormalForm Integer 
Instance details

Defined in Numeric.Algebra.Unital.UnitNormalForm

GCDDomain d => UnitNormalForm (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

splitUnit :: Fraction d -> (Fraction d, Fraction d) #

UnitNormalForm a => UnitNormalForm (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => UnitNormalForm (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => UnitNormalForm (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

class (Monoidal r, Semiring r) => ZeroProductSemiring r #

Instances

Instances details
ZeroProductSemiring Bool 
Instance details

Defined in Numeric.Semiring.ZeroProduct

ZeroProductSemiring Integer 
Instance details

Defined in Numeric.Semiring.ZeroProduct

ZeroProductSemiring Natural 
Instance details

Defined in Numeric.Semiring.ZeroProduct

GCDDomain d => ZeroProductSemiring (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

(Monoidal a, Multiplicative a) => ZeroProductSemiring (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => ZeroProductSemiring (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => ZeroProductSemiring (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

isAssociateIntegral :: (Eq n, Num n) => n -> n -> Bool #

isAssociateWhole :: Eq n => n -> n -> Bool #

class (ZeroProductSemiring d, Ring d) => Domain d #

Instances

Instances details
(ZeroProductSemiring d, Ring d) => Domain d 
Instance details

Defined in Numeric.Domain.Internal

chineseRemainder :: Euclidean r => [(r, r)] -> r #

prs :: Euclidean r => r -> r -> [(r, r, r)] #

euclid :: Euclidean d => d -> d -> [(d, d, d)] #

class PID d => Euclidean d where #

Minimal complete definition

Nothing

Methods

degree :: d -> Maybe Natural #

divide :: d -> d -> (d, d) #

quot :: d -> d -> d #

rem :: d -> d -> d #

Instances

Instances details
Euclidean Integer 
Instance details

Defined in Numeric.Domain.Internal

GCDDomain d => Euclidean (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

degree :: Fraction d -> Maybe Natural #

divide :: Fraction d -> Fraction d -> (Fraction d, Fraction d) #

quot :: Fraction d -> Fraction d -> Fraction d #

rem :: Fraction d -> Fraction d -> Fraction d #

Euclidean a => Euclidean (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => Euclidean (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => Euclidean (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

class (Domain d, Commutative d) => IntegralDomain d where #

Minimal complete definition

Nothing

Methods

divides :: d -> d -> Bool #

maybeQuot :: d -> d -> Maybe d #

Instances

Instances details
IntegralDomain Integer 
Instance details

Defined in Numeric.Domain.Internal

GCDDomain d => IntegralDomain (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

divides :: Fraction d -> Fraction d -> Bool #

maybeQuot :: Fraction d -> Fraction d -> Maybe (Fraction d) #

IntegralDomain a => IntegralDomain (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => IntegralDomain (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => IntegralDomain (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

gcd' :: GCDDomain r => NonEmpty r -> r #

class (IntegralDomain d, UnitNormalForm d, DecidableZero d) => GCDDomain d where #

Minimal complete definition

Nothing

Methods

gcd :: d -> d -> d #

reduceFraction :: d -> d -> (d, d) #

lcm :: d -> d -> d #

class UFD d => PID d where #

Minimal complete definition

Nothing

Methods

egcd :: d -> d -> (d, d, d) #

Instances

Instances details
PID Integer 
Instance details

Defined in Numeric.Domain.Internal

GCDDomain d => PID (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

egcd :: Fraction d -> Fraction d -> (Fraction d, Fraction d, Fraction d) #

PID a => PID (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => PID (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => PID (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

class GCDDomain d => UFD d #

Instances

Instances details
UFD Integer 
Instance details

Defined in Numeric.Domain.Internal

GCDDomain d => UFD (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

GCDDomain a => UFD (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => UFD (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => UFD (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(%) :: GCDDomain d => d -> d -> Fraction d #

numerator :: Fraction t -> t #

data Fraction d #

Instances

Instances details
GCDDomain d => LeftModule Integer (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(.*) :: Integer -> Fraction d -> Fraction d #

GCDDomain d => LeftModule Natural (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(.*) :: Natural -> Fraction d -> Fraction d #

GCDDomain d => RightModule Integer (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(*.) :: Fraction d -> Integer -> Fraction d #

GCDDomain d => RightModule Natural (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(*.) :: Fraction d -> Natural -> Fraction d #

(Eq d, GCDDomain d) => Eq (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(==) :: Fraction d -> Fraction d -> Bool #

(/=) :: Fraction d -> Fraction d -> Bool #

Euclidean d => Fractional (Fraction d) Source # 
Instance details

Defined in AlgebraicPrelude

Euclidean a => Num (Fraction a) Source # 
Instance details

Defined in AlgebraicPrelude

(Ord d, GCDDomain d) => Ord (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

compare :: Fraction d -> Fraction d -> Ordering #

(<) :: Fraction d -> Fraction d -> Bool #

(<=) :: Fraction d -> Fraction d -> Bool #

(>) :: Fraction d -> Fraction d -> Bool #

(>=) :: Fraction d -> Fraction d -> Bool #

max :: Fraction d -> Fraction d -> Fraction d #

min :: Fraction d -> Fraction d -> Fraction d #

(Eq d, Show d, Unital d) => Show (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

showsPrec :: Int -> Fraction d -> ShowS #

show :: Fraction d -> String #

showList :: [Fraction d] -> ShowS #

GCDDomain d => Abelian (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

GCDDomain d => Additive (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(+) :: Fraction d -> Fraction d -> Fraction d #

sinnum1p :: Natural -> Fraction d -> Fraction d #

sumWith1 :: Foldable1 f => (a -> Fraction d) -> f a -> Fraction d #

GCDDomain d => Group (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(-) :: Fraction d -> Fraction d -> Fraction d #

negate :: Fraction d -> Fraction d #

subtract :: Fraction d -> Fraction d -> Fraction d #

times :: Integral n => n -> Fraction d -> Fraction d #

GCDDomain d => Monoidal (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

zero :: Fraction d #

sinnum :: Natural -> Fraction d -> Fraction d #

sumWith :: Foldable f => (a -> Fraction d) -> f a -> Fraction d #

GCDDomain d => Multiplicative (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

(*) :: Fraction d -> Fraction d -> Fraction d #

pow1p :: Fraction d -> Natural -> Fraction d #

productWith1 :: Foldable1 f => (a -> Fraction d) -> f a -> Fraction d #

GCDDomain d => Semiring (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

GCDDomain d => Commutative (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

GCDDomain d => Division (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

recip :: Fraction d -> Fraction d #

(/) :: Fraction d -> Fraction d -> Fraction d #

(\\) :: Fraction d -> Fraction d -> Fraction d #

(^) :: Integral n => Fraction d -> n -> Fraction d

GCDDomain d => Unital (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

one :: Fraction d #

pow :: Fraction d -> Natural -> Fraction d #

productWith :: Foldable f => (a -> Fraction d) -> f a -> Fraction d #

GCDDomain d => DecidableAssociates (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

isAssociate :: Fraction d -> Fraction d -> Bool #

GCDDomain d => DecidableUnits (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

recipUnit :: Fraction d -> Maybe (Fraction d) #

isUnit :: Fraction d -> Bool #

(^?) :: Integral n => Fraction d -> n -> Maybe (Fraction d) #

GCDDomain d => DecidableZero (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

isZero :: Fraction d -> Bool #

(Characteristic d, GCDDomain d) => Characteristic (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

char :: proxy (Fraction d) -> Natural #

GCDDomain d => Rig (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

fromNatural :: Natural -> Fraction d #

GCDDomain d => Ring (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

GCDDomain d => UnitNormalForm (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

splitUnit :: Fraction d -> (Fraction d, Fraction d) #

GCDDomain d => ZeroProductSemiring (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

GCDDomain d => Euclidean (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

degree :: Fraction d -> Maybe Natural #

divide :: Fraction d -> Fraction d -> (Fraction d, Fraction d) #

quot :: Fraction d -> Fraction d -> Fraction d #

rem :: Fraction d -> Fraction d -> Fraction d #

GCDDomain d => IntegralDomain (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

divides :: Fraction d -> Fraction d -> Bool #

maybeQuot :: Fraction d -> Fraction d -> Maybe (Fraction d) #

GCDDomain d => GCDDomain (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

gcd :: Fraction d -> Fraction d -> Fraction d #

reduceFraction :: Fraction d -> Fraction d -> (Fraction d, Fraction d) #

lcm :: Fraction d -> Fraction d -> Fraction d #

GCDDomain d => PID (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

Methods

egcd :: Fraction d -> Fraction d -> (Fraction d, Fraction d, Fraction d) #

GCDDomain d => UFD (Fraction d) 
Instance details

Defined in Numeric.Field.Fraction

newtype Mult a Source #

Monoid instances for Additives. N.B. Unlike WrapNum, Num instance is just inhereted from the unwrapped data.

Constructors

Mult 

Fields

Instances

Instances details
Eq a => Eq (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(==) :: Mult a -> Mult a -> Bool #

(/=) :: Mult a -> Mult a -> Bool #

Num a => Num (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: Mult a -> Mult a -> Mult a #

(-) :: Mult a -> Mult a -> Mult a #

(*) :: Mult a -> Mult a -> Mult a #

negate :: Mult a -> Mult a #

abs :: Mult a -> Mult a #

signum :: Mult a -> Mult a #

fromInteger :: Integer -> Mult a #

Ord a => Ord (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

compare :: Mult a -> Mult a -> Ordering #

(<) :: Mult a -> Mult a -> Bool #

(<=) :: Mult a -> Mult a -> Bool #

(>) :: Mult a -> Mult a -> Bool #

(>=) :: Mult a -> Mult a -> Bool #

max :: Mult a -> Mult a -> Mult a #

min :: Mult a -> Mult a -> Mult a #

Read a => Read (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Show a => Show (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

showsPrec :: Int -> Mult a -> ShowS #

show :: Mult a -> String #

showList :: [Mult a] -> ShowS #

Multiplicative a => Semigroup (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(<>) :: Mult a -> Mult a -> Mult a #

sconcat :: NonEmpty (Mult a) -> Mult a #

stimes :: Integral b => b -> Mult a -> Mult a #

Unital a => Monoid (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

mempty :: Mult a #

mappend :: Mult a -> Mult a -> Mult a #

mconcat :: [Mult a] -> Mult a #

Storable a => Storable (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

sizeOf :: Mult a -> Int #

alignment :: Mult a -> Int #

peekElemOff :: Ptr (Mult a) -> Int -> IO (Mult a) #

pokeElemOff :: Ptr (Mult a) -> Int -> Mult a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Mult a) #

pokeByteOff :: Ptr b -> Int -> Mult a -> IO () #

peek :: Ptr (Mult a) -> IO (Mult a) #

poke :: Ptr (Mult a) -> Mult a -> IO () #

Multiplicative a => Multiplicative (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: Mult a -> Mult a -> Mult a #

pow1p :: Mult a -> Natural -> Mult a #

productWith1 :: Foldable1 f => (a0 -> Mult a) -> f a0 -> Mult a #

Multiplicative a => Commutative (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Unital a => Unital (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

one :: Mult a #

pow :: Mult a -> Natural -> Mult a #

productWith :: Foldable f => (a0 -> Mult a) -> f a0 -> Mult a #

Wrapped (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Associated Types

type Unwrapped (Mult a)

Methods

_Wrapped' :: Iso' (Mult a) (Unwrapped (Mult a))

Mult a1 ~ t => Rewrapped (Mult a2) t Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (Mult a) = a

newtype Add a Source #

Monoid instances for Additives. N.B. Unlike WrapNum, Num instance is just inhereted from the unwrapped data.

Constructors

Add 

Fields

Instances

Instances details
LeftModule Integer a => LeftModule Integer (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> Add a -> Add a #

LeftModule Natural a => LeftModule Natural (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> Add a -> Add a #

RightModule Integer a => RightModule Integer (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: Add a -> Integer -> Add a #

RightModule Natural a => RightModule Natural (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: Add a -> Natural -> Add a #

Eq a => Eq (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(==) :: Add a -> Add a -> Bool #

(/=) :: Add a -> Add a -> Bool #

Num a => Num (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: Add a -> Add a -> Add a #

(-) :: Add a -> Add a -> Add a #

(*) :: Add a -> Add a -> Add a #

negate :: Add a -> Add a #

abs :: Add a -> Add a #

signum :: Add a -> Add a #

fromInteger :: Integer -> Add a #

Ord a => Ord (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

compare :: Add a -> Add a -> Ordering #

(<) :: Add a -> Add a -> Bool #

(<=) :: Add a -> Add a -> Bool #

(>) :: Add a -> Add a -> Bool #

(>=) :: Add a -> Add a -> Bool #

max :: Add a -> Add a -> Add a #

min :: Add a -> Add a -> Add a #

Read a => Read (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Show a => Show (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

showsPrec :: Int -> Add a -> ShowS #

show :: Add a -> String #

showList :: [Add a] -> ShowS #

Additive a => Semigroup (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(<>) :: Add a -> Add a -> Add a #

sconcat :: NonEmpty (Add a) -> Add a #

stimes :: Integral b => b -> Add a -> Add a #

Monoidal a => Monoid (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

mempty :: Add a #

mappend :: Add a -> Add a -> Add a #

mconcat :: [Add a] -> Add a #

Storable a => Storable (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

sizeOf :: Add a -> Int #

alignment :: Add a -> Int #

peekElemOff :: Ptr (Add a) -> Int -> IO (Add a) #

pokeElemOff :: Ptr (Add a) -> Int -> Add a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Add a) #

pokeByteOff :: Ptr b -> Int -> Add a -> IO () #

peek :: Ptr (Add a) -> IO (Add a) #

poke :: Ptr (Add a) -> Add a -> IO () #

Additive a => Abelian (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Additive a => Additive (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: Add a -> Add a -> Add a #

sinnum1p :: Natural -> Add a -> Add a #

sumWith1 :: Foldable1 f => (a0 -> Add a) -> f a0 -> Add a #

Monoidal a => Monoidal (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

zero :: Add a #

sinnum :: Natural -> Add a -> Add a #

sumWith :: Foldable f => (a0 -> Add a) -> f a0 -> Add a #

Wrapped (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Associated Types

type Unwrapped (Add a)

Methods

_Wrapped' :: Iso' (Add a) (Unwrapped (Add a))

Add a1 ~ t => Rewrapped (Add a2) t Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (Add a) = a

newtype WrapAlgebra a Source #

Turning types from Algebra into Prelude's Num instances.

N.B. Since Real's toRational constraint is too tight, we won't provide the inverse of WrapIntegral and provide Fractional instance only.

Constructors

WrapAlgebra 

Fields

Instances

Instances details
LeftModule Integer a => LeftModule Integer (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> WrapAlgebra a -> WrapAlgebra a #

LeftModule Natural a => LeftModule Natural (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> WrapAlgebra a -> WrapAlgebra a #

RightModule Integer a => RightModule Integer (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapAlgebra a -> Integer -> WrapAlgebra a #

RightModule Natural a => RightModule Natural (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapAlgebra a -> Natural -> WrapAlgebra a #

Eq a => Eq (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(DivisionRing a, UnitNormalForm a) => Fractional (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Ring a, UnitNormalForm a) => Num (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Ord a => Ord (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Read a => Read (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Show a => Show (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Storable a => Storable (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Additive a => Abelian (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Additive a => Additive (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapAlgebra a -> WrapAlgebra a -> WrapAlgebra a #

sinnum1p :: Natural -> WrapAlgebra a -> WrapAlgebra a #

sumWith1 :: Foldable1 f => (a0 -> WrapAlgebra a) -> f a0 -> WrapAlgebra a #

Group a => Group (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Monoidal a => Monoidal (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

zero :: WrapAlgebra a #

sinnum :: Natural -> WrapAlgebra a -> WrapAlgebra a #

sumWith :: Foldable f => (a0 -> WrapAlgebra a) -> f a0 -> WrapAlgebra a #

Multiplicative a => Multiplicative (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: WrapAlgebra a -> WrapAlgebra a -> WrapAlgebra a #

pow1p :: WrapAlgebra a -> Natural -> WrapAlgebra a #

productWith1 :: Foldable1 f => (a0 -> WrapAlgebra a) -> f a0 -> WrapAlgebra a #

(Additive a, Multiplicative a) => Semiring (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Multiplicative a => Commutative (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Division a => Division (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Unital a => Unital (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

one :: WrapAlgebra a #

pow :: WrapAlgebra a -> Natural -> WrapAlgebra a #

productWith :: Foldable f => (a0 -> WrapAlgebra a) -> f a0 -> WrapAlgebra a #

DecidableAssociates a => DecidableAssociates (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

DecidableUnits a => DecidableUnits (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

DecidableZero a => DecidableZero (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

isZero :: WrapAlgebra a -> Bool #

Rig a => Rig (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Ring a => Ring (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

UnitNormalForm a => UnitNormalForm (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

(Monoidal a, Multiplicative a) => ZeroProductSemiring (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Euclidean a => Euclidean (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

IntegralDomain a => IntegralDomain (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

GCDDomain a => GCDDomain (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

PID a => PID (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

GCDDomain a => UFD (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Wrapped (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Associated Types

type Unwrapped (WrapAlgebra a)

Methods

_Wrapped' :: Iso' (WrapAlgebra a) (Unwrapped (WrapAlgebra a))

WrapAlgebra a1 ~ t => Rewrapped (WrapAlgebra a2) t Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (WrapAlgebra a) = a

newtype WrapIntegral a Source #

Similar to WrapNum, but produces Euclidean instances from Integrals.

See also: WrapFractional and WrapNum.

Constructors

WrapIntegral 

Fields

Instances

Instances details
Num a => LeftModule Integer (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> WrapIntegral a -> WrapIntegral a #

Num a => LeftModule Natural (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> WrapIntegral a -> WrapIntegral a #

Num a => RightModule Integer (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapIntegral a -> Integer -> WrapIntegral a #

Num a => RightModule Natural (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapIntegral a -> Natural -> WrapIntegral a #

Enum a => Enum (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Eq a => Eq (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Integral a => Integral (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Ord a => Ord (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Read a => Read (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Real a => Real (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Show a => Show (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Storable a => Storable (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Abelian (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Additive (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapIntegral a -> WrapIntegral a -> WrapIntegral a #

sinnum1p :: Natural -> WrapIntegral a -> WrapIntegral a #

sumWith1 :: Foldable1 f => (a0 -> WrapIntegral a) -> f a0 -> WrapIntegral a #

Num a => Group (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Monoidal (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

zero :: WrapIntegral a #

sinnum :: Natural -> WrapIntegral a -> WrapIntegral a #

sumWith :: Foldable f => (a0 -> WrapIntegral a) -> f a0 -> WrapIntegral a #

Num a => Multiplicative (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: WrapIntegral a -> WrapIntegral a -> WrapIntegral a #

pow1p :: WrapIntegral a -> Natural -> WrapIntegral a #

productWith1 :: Foldable1 f => (a0 -> WrapIntegral a) -> f a0 -> WrapIntegral a #

Num a => Semiring (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Commutative (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Unital (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

one :: WrapIntegral a #

pow :: WrapIntegral a -> Natural -> WrapIntegral a #

productWith :: Foldable f => (a0 -> WrapIntegral a) -> f a0 -> WrapIntegral a #

(Eq a, Integral a) => DecidableAssociates (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => DecidableUnits (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Num a, Eq a) => DecidableZero (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

isZero :: WrapIntegral a -> Bool #

Num a => Rig (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Ring (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => UnitNormalForm (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => ZeroProductSemiring (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => Euclidean (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => IntegralDomain (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => GCDDomain (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => PID (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Integral a) => UFD (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Wrapped (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Associated Types

type Unwrapped (WrapIntegral a)

Methods

_Wrapped' :: Iso' (WrapIntegral a) (Unwrapped (WrapIntegral a))

WrapIntegral a1 ~ t => Rewrapped (WrapIntegral a2) t Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (WrapIntegral a) = a

newtype WrapFractional a Source #

Similar to WrapNum, but produces Field instances from Fractionals.

See also: WrapIntegral and WrapNum.

Constructors

WrapFractional 

Fields

Instances

Instances details
Num a => LeftModule Integer (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => LeftModule Natural (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => RightModule Integer (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => RightModule Natural (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Enum a => Enum (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Eq a => Eq (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Fractional a => Fractional (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Ord a => Ord (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Read a => Read (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Real a => Real (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Show a => Show (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Storable a => Storable (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Abelian (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Additive (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapFractional a -> WrapFractional a -> WrapFractional a #

sinnum1p :: Natural -> WrapFractional a -> WrapFractional a #

sumWith1 :: Foldable1 f => (a0 -> WrapFractional a) -> f a0 -> WrapFractional a #

Num a => Group (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Monoidal (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Multiplicative (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: WrapFractional a -> WrapFractional a -> WrapFractional a #

pow1p :: WrapFractional a -> Natural -> WrapFractional a #

productWith1 :: Foldable1 f => (a0 -> WrapFractional a) -> f a0 -> WrapFractional a #

Num a => Semiring (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Commutative (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Fractional a => Division (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Unital (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => DecidableAssociates (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => DecidableUnits (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Num a, Eq a) => DecidableZero (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

isZero :: WrapFractional a -> Bool #

Num a => Rig (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Ring (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => UnitNormalForm (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => ZeroProductSemiring (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => Euclidean (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => IntegralDomain (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => GCDDomain (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => PID (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

(Eq a, Fractional a) => UFD (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Wrapped (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Associated Types

type Unwrapped (WrapFractional a)

Methods

_Wrapped' :: Iso' (WrapFractional a) (Unwrapped (WrapFractional a))

WrapFractional a1 ~ t => Rewrapped (WrapFractional a2) t Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (WrapFractional a) = a

newtype WrapNum a Source #

Wrapping Prelude's numerical types to treat with Algebra hierachy.

For Field or Euclidean instances, see WrapIntegral and WrapField.

N.B. This type provides a mean to convert from Nums to Rings, but there is no guarantee that WrapNum a is actually ring. For example, due to precision limitation, WrapPreldue Double even fails to be semigroup! For another simpler example, even though Natural comes with Num instance, but it doesn't support negate, so it cannot be Group.

Constructors

WrapNum 

Fields

Instances

Instances details
Num a => LeftModule Integer (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Integer -> WrapNum a -> WrapNum a #

Num a => LeftModule Natural (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(.*) :: Natural -> WrapNum a -> WrapNum a #

Num a => RightModule Integer (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapNum a -> Integer -> WrapNum a #

Num a => RightModule Natural (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*.) :: WrapNum a -> Natural -> WrapNum a #

Eq a => Eq (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(==) :: WrapNum a -> WrapNum a -> Bool #

(/=) :: WrapNum a -> WrapNum a -> Bool #

Num a => Num (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapNum a -> WrapNum a -> WrapNum a #

(-) :: WrapNum a -> WrapNum a -> WrapNum a #

(*) :: WrapNum a -> WrapNum a -> WrapNum a #

negate :: WrapNum a -> WrapNum a #

abs :: WrapNum a -> WrapNum a #

signum :: WrapNum a -> WrapNum a #

fromInteger :: Integer -> WrapNum a #

Ord a => Ord (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

compare :: WrapNum a -> WrapNum a -> Ordering #

(<) :: WrapNum a -> WrapNum a -> Bool #

(<=) :: WrapNum a -> WrapNum a -> Bool #

(>) :: WrapNum a -> WrapNum a -> Bool #

(>=) :: WrapNum a -> WrapNum a -> Bool #

max :: WrapNum a -> WrapNum a -> WrapNum a #

min :: WrapNum a -> WrapNum a -> WrapNum a #

Read a => Read (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Show a => Show (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

showsPrec :: Int -> WrapNum a -> ShowS #

show :: WrapNum a -> String #

showList :: [WrapNum a] -> ShowS #

Storable a => Storable (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

sizeOf :: WrapNum a -> Int #

alignment :: WrapNum a -> Int #

peekElemOff :: Ptr (WrapNum a) -> Int -> IO (WrapNum a) #

pokeElemOff :: Ptr (WrapNum a) -> Int -> WrapNum a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (WrapNum a) #

pokeByteOff :: Ptr b -> Int -> WrapNum a -> IO () #

peek :: Ptr (WrapNum a) -> IO (WrapNum a) #

poke :: Ptr (WrapNum a) -> WrapNum a -> IO () #

Num a => Abelian (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Additive (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapNum a -> WrapNum a -> WrapNum a #

sinnum1p :: Natural -> WrapNum a -> WrapNum a #

sumWith1 :: Foldable1 f => (a0 -> WrapNum a) -> f a0 -> WrapNum a #

Num a => Group (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(-) :: WrapNum a -> WrapNum a -> WrapNum a #

negate :: WrapNum a -> WrapNum a #

subtract :: WrapNum a -> WrapNum a -> WrapNum a #

times :: Integral n => n -> WrapNum a -> WrapNum a #

Num a => Monoidal (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

zero :: WrapNum a #

sinnum :: Natural -> WrapNum a -> WrapNum a #

sumWith :: Foldable f => (a0 -> WrapNum a) -> f a0 -> WrapNum a #

Num a => Multiplicative (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(*) :: WrapNum a -> WrapNum a -> WrapNum a #

pow1p :: WrapNum a -> Natural -> WrapNum a #

productWith1 :: Foldable1 f => (a0 -> WrapNum a) -> f a0 -> WrapNum a #

Num a => Semiring (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Commutative (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Unital (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

one :: WrapNum a #

pow :: WrapNum a -> Natural -> WrapNum a #

productWith :: Foldable f => (a0 -> WrapNum a) -> f a0 -> WrapNum a #

(Num a, Eq a) => DecidableZero (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

isZero :: WrapNum a -> Bool #

Num a => Rig (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

fromNatural :: Natural -> WrapNum a #

Num a => Ring (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

fromInteger :: Integer -> WrapNum a

Wrapped (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Associated Types

type Unwrapped (WrapNum a)

Methods

_Wrapped' :: Iso' (WrapNum a) (Unwrapped (WrapNum a))

WrapNum a1 ~ t => Rewrapped (WrapNum a2) t Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

type Unwrapped (WrapNum a) = a

type Rational = Fraction Integer Source #

We use Fraction instead of Ratio for consistency.

fromInteger :: Num r => Integer -> r Source #

To work with Num literals.

fromInteger' :: Ring r => Integer -> r Source #

algebra package's original fromInteger.

(^) :: Unital r => r -> Natural -> r infixr 8 Source #

Specialised version of pow which takes Naturals as a power.

(^^) :: Division r => r -> Integer -> r infixr 8 Source #

The original power function (^) of algebra

ifThenElse :: Bool -> a -> a -> a Source #

Old Prelude's Numeric type classes and functions, without confliction

class Num a where #

Basic numeric class.

The Haskell Report defines no laws for Num. However, (+) and (*) are customarily expected to define a ring and have the following properties:

Associativity of (+)
(x + y) + z = x + (y + z)
Commutativity of (+)
x + y = y + x
fromInteger 0 is the additive identity
x + fromInteger 0 = x
negate gives the additive inverse
x + negate x = fromInteger 0
Associativity of (*)
(x * y) * z = x * (y * z)
fromInteger 1 is the multiplicative identity
x * fromInteger 1 = x and fromInteger 1 * x = x
Distributivity of (*) with respect to (+)
a * (b + c) = (a * b) + (a * c) and (b + c) * a = (b * a) + (c * a)

Note that it isn't customarily expected that a type instance of both Num and Ord implement an ordered ring. Indeed, in base only Integer and Rational do.

Minimal complete definition

(+), (*), abs, signum, fromInteger, (negate | (-))

Methods

abs :: a -> a #

Absolute value.

signum :: a -> a #

Sign of a number. The functions abs and signum should satisfy the law:

abs x * signum x == x

For real numbers, the signum is either -1 (negative), 0 (zero) or 1 (positive).

Instances

Instances details
Num Int

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Int -> Int -> Int #

(-) :: Int -> Int -> Int #

(*) :: Int -> Int -> Int #

negate :: Int -> Int #

abs :: Int -> Int #

signum :: Int -> Int #

fromInteger :: Integer -> Int #

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(+) :: Int8 -> Int8 -> Int8 #

(-) :: Int8 -> Int8 -> Int8 #

(*) :: Int8 -> Int8 -> Int8 #

negate :: Int8 -> Int8 #

abs :: Int8 -> Int8 #

signum :: Int8 -> Int8 #

fromInteger :: Integer -> Int8 #

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Num Natural

Note that Natural's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Num Word

Since: base-2.1

Instance details

Defined in GHC.Num

Methods

(+) :: Word -> Word -> Word #

(-) :: Word -> Word -> Word #

(*) :: Word -> Word -> Word #

negate :: Word -> Word #

abs :: Word -> Word #

signum :: Word -> Word #

fromInteger :: Integer -> Word #

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num CChar 
Instance details

Defined in Foreign.C.Types

Num CSChar 
Instance details

Defined in Foreign.C.Types

Num CUChar 
Instance details

Defined in Foreign.C.Types

Num CShort 
Instance details

Defined in Foreign.C.Types

Num CUShort 
Instance details

Defined in Foreign.C.Types

Num CInt 
Instance details

Defined in Foreign.C.Types

Methods

(+) :: CInt -> CInt -> CInt #

(-) :: CInt -> CInt -> CInt #

(*) :: CInt -> CInt -> CInt #

negate :: CInt -> CInt #

abs :: CInt -> CInt #

signum :: CInt -> CInt #

fromInteger :: Integer -> CInt #

Num CUInt 
Instance details

Defined in Foreign.C.Types

Num CLong 
Instance details

Defined in Foreign.C.Types

Num CULong 
Instance details

Defined in Foreign.C.Types

Num CLLong 
Instance details

Defined in Foreign.C.Types

Num CULLong 
Instance details

Defined in Foreign.C.Types

Num CBool 
Instance details

Defined in Foreign.C.Types

Num CFloat 
Instance details

Defined in Foreign.C.Types

Num CDouble 
Instance details

Defined in Foreign.C.Types

Num CPtrdiff 
Instance details

Defined in Foreign.C.Types

Num CSize 
Instance details

Defined in Foreign.C.Types

Num CWchar 
Instance details

Defined in Foreign.C.Types

Num CSigAtomic 
Instance details

Defined in Foreign.C.Types

Num CClock 
Instance details

Defined in Foreign.C.Types

Num CTime 
Instance details

Defined in Foreign.C.Types

Num CUSeconds 
Instance details

Defined in Foreign.C.Types

Num CSUSeconds 
Instance details

Defined in Foreign.C.Types

Num CIntPtr 
Instance details

Defined in Foreign.C.Types

Num CUIntPtr 
Instance details

Defined in Foreign.C.Types

Num CIntMax 
Instance details

Defined in Foreign.C.Types

Num CUIntMax 
Instance details

Defined in Foreign.C.Types

Num CodePoint 
Instance details

Defined in Data.Text.Encoding

Methods

(+) :: CodePoint -> CodePoint -> CodePoint #

(-) :: CodePoint -> CodePoint -> CodePoint #

(*) :: CodePoint -> CodePoint -> CodePoint #

negate :: CodePoint -> CodePoint #

abs :: CodePoint -> CodePoint #

signum :: CodePoint -> CodePoint #

fromInteger :: Integer -> CodePoint #

Num DecoderState 
Instance details

Defined in Data.Text.Encoding

Methods

(+) :: DecoderState -> DecoderState -> DecoderState #

(-) :: DecoderState -> DecoderState -> DecoderState #

(*) :: DecoderState -> DecoderState -> DecoderState #

negate :: DecoderState -> DecoderState #

abs :: DecoderState -> DecoderState #

signum :: DecoderState -> DecoderState #

fromInteger :: Integer -> DecoderState #

Integral a => Num (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(+) :: Ratio a -> Ratio a -> Ratio a #

(-) :: Ratio a -> Ratio a -> Ratio a #

(*) :: Ratio a -> Ratio a -> Ratio a #

negate :: Ratio a -> Ratio a #

abs :: Ratio a -> Ratio a #

signum :: Ratio a -> Ratio a #

fromInteger :: Integer -> Ratio a #

RealFloat a => Num (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(+) :: Complex a -> Complex a -> Complex a #

(-) :: Complex a -> Complex a -> Complex a #

(*) :: Complex a -> Complex a -> Complex a #

negate :: Complex a -> Complex a #

abs :: Complex a -> Complex a #

signum :: Complex a -> Complex a #

fromInteger :: Integer -> Complex a #

Num a => Num (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Min a -> Min a -> Min a #

(-) :: Min a -> Min a -> Min a #

(*) :: Min a -> Min a -> Min a #

negate :: Min a -> Min a #

abs :: Min a -> Min a #

signum :: Min a -> Min a #

fromInteger :: Integer -> Min a #

Num a => Num (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(+) :: Max a -> Max a -> Max a #

(-) :: Max a -> Max a -> Max a #

(*) :: Max a -> Max a -> Max a #

negate :: Max a -> Max a #

abs :: Max a -> Max a #

signum :: Max a -> Max a #

fromInteger :: Integer -> Max a #

Num a => Num (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Num a => Num (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Sum a -> Sum a -> Sum a #

(-) :: Sum a -> Sum a -> Sum a #

(*) :: Sum a -> Sum a -> Sum a #

negate :: Sum a -> Sum a #

abs :: Sum a -> Sum a #

signum :: Sum a -> Sum a #

fromInteger :: Integer -> Sum a #

Num a => Num (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Product a -> Product a -> Product a #

(-) :: Product a -> Product a -> Product a #

(*) :: Product a -> Product a -> Product a #

negate :: Product a -> Product a #

abs :: Product a -> Product a #

signum :: Product a -> Product a #

fromInteger :: Integer -> Product a #

Num a => Num (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(+) :: Down a -> Down a -> Down a #

(-) :: Down a -> Down a -> Down a #

(*) :: Down a -> Down a -> Down a #

negate :: Down a -> Down a #

abs :: Down a -> Down a #

signum :: Down a -> Down a #

fromInteger :: Integer -> Down a #

Euclidean a => Num (Fraction a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (Mult a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: Mult a -> Mult a -> Mult a #

(-) :: Mult a -> Mult a -> Mult a #

(*) :: Mult a -> Mult a -> Mult a #

negate :: Mult a -> Mult a #

abs :: Mult a -> Mult a #

signum :: Mult a -> Mult a #

fromInteger :: Integer -> Mult a #

Num a => Num (Add a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: Add a -> Add a -> Add a #

(-) :: Add a -> Add a -> Add a #

(*) :: Add a -> Add a -> Add a #

negate :: Add a -> Add a #

abs :: Add a -> Add a #

signum :: Add a -> Add a #

fromInteger :: Integer -> Add a #

(Ring a, UnitNormalForm a) => Num (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Num a => Num (WrapNum a) Source # 
Instance details

Defined in AlgebraicPrelude

Methods

(+) :: WrapNum a -> WrapNum a -> WrapNum a #

(-) :: WrapNum a -> WrapNum a -> WrapNum a #

(*) :: WrapNum a -> WrapNum a -> WrapNum a #

negate :: WrapNum a -> WrapNum a #

abs :: WrapNum a -> WrapNum a #

signum :: WrapNum a -> WrapNum a #

fromInteger :: Integer -> WrapNum a #

Num a => Num (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(+) :: Const a b -> Const a b -> Const a b #

(-) :: Const a b -> Const a b -> Const a b #

(*) :: Const a b -> Const a b -> Const a b #

negate :: Const a b -> Const a b #

abs :: Const a b -> Const a b #

signum :: Const a b -> Const a b #

fromInteger :: Integer -> Const a b #

(Applicative f, Num a) => Num (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(+) :: Ap f a -> Ap f a -> Ap f a #

(-) :: Ap f a -> Ap f a -> Ap f a #

(*) :: Ap f a -> Ap f a -> Ap f a #

negate :: Ap f a -> Ap f a #

abs :: Ap f a -> Ap f a #

signum :: Ap f a -> Ap f a #

fromInteger :: Integer -> Ap f a #

Num (f a) => Num (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Alt f a -> Alt f a -> Alt f a #

(-) :: Alt f a -> Alt f a -> Alt f a #

(*) :: Alt f a -> Alt f a -> Alt f a #

negate :: Alt f a -> Alt f a #

abs :: Alt f a -> Alt f a #

signum :: Alt f a -> Alt f a #

fromInteger :: Integer -> Alt f a #

Num a => Num (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(+) :: Tagged s a -> Tagged s a -> Tagged s a #

(-) :: Tagged s a -> Tagged s a -> Tagged s a #

(*) :: Tagged s a -> Tagged s a -> Tagged s a #

negate :: Tagged s a -> Tagged s a #

abs :: Tagged s a -> Tagged s a #

signum :: Tagged s a -> Tagged s a #

fromInteger :: Integer -> Tagged s a #

class (Real a, Enum a) => Integral a #

Integral numbers, supporting integer division.

The Haskell Report defines no laws for Integral. However, Integral instances are customarily expected to define a Euclidean domain and have the following properties for the div/mod and quot/rem pairs, given suitable Euclidean functions f and g:

  • x = y * quot x y + rem x y with rem x y = fromInteger 0 or g (rem x y) < g y
  • x = y * div x y + mod x y with mod x y = fromInteger 0 or f (mod x y) < f y

An example of a suitable Euclidean function, for Integer's instance, is abs.

Minimal complete definition

quotRem, toInteger

Instances

Instances details
Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

quot :: Int -> Int -> Int #

rem :: Int -> Int -> Int #

div :: Int -> Int -> Int #

mod :: Int -> Int -> Int #

quotRem :: Int -> Int -> (Int, Int) #

divMod :: Int -> Int -> (Int, Int) #

toInteger :: Int -> Integer #

Integral Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

quot :: Int8 -> Int8 -> Int8 #

rem :: Int8 -> Int8 -> Int8 #

div :: Int8 -> Int8 -> Int8 #

mod :: Int8 -> Int8 -> Int8 #

quotRem :: Int8 -> Int8 -> (Int8, Int8) #

divMod :: Int8 -> Int8 -> (Int8, Int8) #

toInteger :: Int8 -> Integer #

Integral Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Integral Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Integral Word

Since: base-2.1

Instance details

Defined in GHC.Real

Methods

quot :: Word -> Word -> Word #

rem :: Word -> Word -> Word #

div :: Word -> Word -> Word #

mod :: Word -> Word -> Word #

quotRem :: Word -> Word -> (Word, Word) #

divMod :: Word -> Word -> (Word, Word) #

toInteger :: Word -> Integer #

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Integral CChar 
Instance details

Defined in Foreign.C.Types

Integral CSChar 
Instance details

Defined in Foreign.C.Types

Integral CUChar 
Instance details

Defined in Foreign.C.Types

Integral CShort 
Instance details

Defined in Foreign.C.Types

Integral CUShort 
Instance details

Defined in Foreign.C.Types

Integral CInt 
Instance details

Defined in Foreign.C.Types

Methods

quot :: CInt -> CInt -> CInt #

rem :: CInt -> CInt -> CInt #

div :: CInt -> CInt -> CInt #

mod :: CInt -> CInt -> CInt #

quotRem :: CInt -> CInt -> (CInt, CInt) #

divMod :: CInt -> CInt -> (CInt, CInt) #

toInteger :: CInt -> Integer #

Integral CUInt 
Instance details

Defined in Foreign.C.Types

Integral CLong 
Instance details

Defined in Foreign.C.Types

Integral CULong 
Instance details

Defined in Foreign.C.Types

Integral CLLong 
Instance details

Defined in Foreign.C.Types

Integral CULLong 
Instance details

Defined in Foreign.C.Types

Integral CBool 
Instance details

Defined in Foreign.C.Types

Integral CPtrdiff 
Instance details

Defined in Foreign.C.Types

Integral CSize 
Instance details

Defined in Foreign.C.Types

Integral CWchar 
Instance details

Defined in Foreign.C.Types

Integral CSigAtomic 
Instance details

Defined in Foreign.C.Types

Integral CIntPtr 
Instance details

Defined in Foreign.C.Types

Integral CUIntPtr 
Instance details

Defined in Foreign.C.Types

Integral CIntMax 
Instance details

Defined in Foreign.C.Types

Integral CUIntMax 
Instance details

Defined in Foreign.C.Types

Integral a => Integral (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Integral a => Integral (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

quot :: Down a -> Down a -> Down a #

rem :: Down a -> Down a -> Down a #

div :: Down a -> Down a -> Down a #

mod :: Down a -> Down a -> Down a #

quotRem :: Down a -> Down a -> (Down a, Down a) #

divMod :: Down a -> Down a -> (Down a, Down a) #

toInteger :: Down a -> Integer #

Integral a => Integral (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Integral a => Integral (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

quot :: Const a b -> Const a b -> Const a b #

rem :: Const a b -> Const a b -> Const a b #

div :: Const a b -> Const a b -> Const a b #

mod :: Const a b -> Const a b -> Const a b #

quotRem :: Const a b -> Const a b -> (Const a b, Const a b) #

divMod :: Const a b -> Const a b -> (Const a b, Const a b) #

toInteger :: Const a b -> Integer #

Integral a => Integral (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

quot :: Tagged s a -> Tagged s a -> Tagged s a #

rem :: Tagged s a -> Tagged s a -> Tagged s a #

div :: Tagged s a -> Tagged s a -> Tagged s a #

mod :: Tagged s a -> Tagged s a -> Tagged s a #

quotRem :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) #

divMod :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) #

toInteger :: Tagged s a -> Integer #

toInteger :: Integral a => a -> Integer #

conversion to Integer

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

Integral a => Real (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

toRational :: Ratio 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 (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

toRational :: Down a -> Rational #

Real a => Real (WrapIntegral a) Source # 
Instance details

Defined in AlgebraicPrelude

Real a => Real (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Real a => Real (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

toRational :: Const a b -> Rational #

Real a => Real (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

toRational :: Tagged s a -> Rational #

class Num a => Fractional a #

Fractional numbers, supporting real division.

The Haskell Report defines no laws for Fractional. However, (+) and (*) are customarily expected to define a division ring and have the following properties:

recip gives the multiplicative inverse
x * recip x = recip x * x = fromInteger 1

Note that it isn't customarily expected that a type instance of Fractional implement a field. However, all instances in base do.

Minimal complete definition

fromRational, (recip | (/))

Instances

Instances details
Fractional CFloat 
Instance details

Defined in Foreign.C.Types

Fractional CDouble 
Instance details

Defined in Foreign.C.Types

Integral a => Fractional (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

(/) :: Ratio a -> Ratio a -> Ratio a #

recip :: Ratio a -> Ratio a #

fromRational :: Rational -> Ratio a #

RealFloat a => Fractional (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

(/) :: Complex a -> Complex a -> Complex a #

recip :: Complex a -> Complex a #

fromRational :: Rational -> Complex a #

Fractional a => Fractional (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Fractional a => Fractional (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

(/) :: Down a -> Down a -> Down a #

recip :: Down a -> Down a #

fromRational :: Rational -> Down a #

Euclidean d => Fractional (Fraction d) Source # 
Instance details

Defined in AlgebraicPrelude

(DivisionRing a, UnitNormalForm a) => Fractional (WrapAlgebra a) Source # 
Instance details

Defined in AlgebraicPrelude

Fractional a => Fractional (WrapFractional a) Source # 
Instance details

Defined in AlgebraicPrelude

Fractional a => Fractional (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(/) :: Const a b -> Const a b -> Const a b #

recip :: Const a b -> Const a b #

fromRational :: Rational -> Const a b #

Fractional a => Fractional (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

(/) :: Tagged s a -> Tagged s a -> Tagged s a #

recip :: Tagged s a -> Tagged s a #

fromRational :: Rational -> Tagged s a #

class Fractional a => Floating a where #

Trigonometric and hyperbolic functions and related functions.

The Haskell Report defines no laws for Floating. However, (+), (*) and exp are customarily expected to define an exponential field and have the following properties:

  • exp (a + b) = exp a * exp b
  • exp (fromInteger 0) = fromInteger 1

Minimal complete definition

pi, exp, log, sin, cos, asin, acos, atan, sinh, cosh, asinh, acosh, atanh

Methods

pi :: a #

exp :: a -> a #

log :: a -> a #

sqrt :: a -> a #

(**) :: a -> a -> a infixr 8 #

logBase :: a -> a -> a #

sin :: a -> a #

cos :: a -> a #

tan :: a -> a #

asin :: a -> a #

acos :: a -> a #

atan :: a -> a #

sinh :: a -> a #

cosh :: a -> a #

tanh :: a -> a #

asinh :: a -> a #

acosh :: a -> a #

atanh :: a -> a #

Instances

Instances details
Floating Double

Since: base-2.1

Instance details

Defined in GHC.Float

Floating Float

Since: base-2.1

Instance details

Defined in GHC.Float

Floating CFloat 
Instance details

Defined in Foreign.C.Types

Floating CDouble 
Instance details

Defined in Foreign.C.Types

RealFloat a => Floating (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

pi :: Complex a #

exp :: Complex a -> Complex a #

log :: Complex a -> Complex a #

sqrt :: Complex a -> Complex a #

(**) :: Complex a -> Complex a -> Complex a #

logBase :: Complex a -> Complex a -> Complex a #

sin :: Complex a -> Complex a #

cos :: Complex a -> Complex a #

tan :: Complex a -> Complex a #

asin :: Complex a -> Complex a #

acos :: Complex a -> Complex a #

atan :: Complex a -> Complex a #

sinh :: Complex a -> Complex a #

cosh :: Complex a -> Complex a #

tanh :: Complex a -> Complex a #

asinh :: Complex a -> Complex a #

acosh :: Complex a -> Complex a #

atanh :: Complex a -> Complex a #

log1p :: Complex a -> Complex a #

expm1 :: Complex a -> Complex a #

log1pexp :: Complex a -> Complex a #

log1mexp :: Complex a -> Complex a #

Floating a => Floating (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Floating a => Floating (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

pi :: Down a #

exp :: Down a -> Down a #

log :: Down a -> Down a #

sqrt :: Down a -> Down a #

(**) :: Down a -> Down a -> Down a #

logBase :: Down a -> Down a -> Down a #

sin :: Down a -> Down a #

cos :: Down a -> Down a #

tan :: Down a -> Down a #

asin :: Down a -> Down a #

acos :: Down a -> Down a #

atan :: Down a -> Down a #

sinh :: Down a -> Down a #

cosh :: Down a -> Down a #

tanh :: Down a -> Down a #

asinh :: Down a -> Down a #

acosh :: Down a -> Down a #

atanh :: Down a -> Down a #

log1p :: Down a -> Down a #

expm1 :: Down a -> Down a #

log1pexp :: Down a -> Down a #

log1mexp :: Down a -> Down a #

Floating a => Floating (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

pi :: Const a b #

exp :: Const a b -> Const a b #

log :: Const a b -> Const a b #

sqrt :: Const a b -> Const a b #

(**) :: Const a b -> Const a b -> Const a b #

logBase :: Const a b -> Const a b -> Const a b #

sin :: Const a b -> Const a b #

cos :: Const a b -> Const a b #

tan :: Const a b -> Const a b #

asin :: Const a b -> Const a b #

acos :: Const a b -> Const a b #

atan :: Const a b -> Const a b #

sinh :: Const a b -> Const a b #

cosh :: Const a b -> Const a b #

tanh :: Const a b -> Const a b #

asinh :: Const a b -> Const a b #

acosh :: Const a b -> Const a b #

atanh :: Const a b -> Const a b #

log1p :: Const a b -> Const a b #

expm1 :: Const a b -> Const a b #

log1pexp :: Const a b -> Const a b #

log1mexp :: Const a b -> Const a b #

Floating a => Floating (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

pi :: Tagged s a #

exp :: Tagged s a -> Tagged s a #

log :: Tagged s a -> Tagged s a #

sqrt :: Tagged s a -> Tagged s a #

(**) :: Tagged s a -> Tagged s a -> Tagged s a #

logBase :: Tagged s a -> Tagged s a -> Tagged s a #

sin :: Tagged s a -> Tagged s a #

cos :: Tagged s a -> Tagged s a #

tan :: Tagged s a -> Tagged s a #

asin :: Tagged s a -> Tagged s a #

acos :: Tagged s a -> Tagged s a #

atan :: Tagged s a -> Tagged s a #

sinh :: Tagged s a -> Tagged s a #

cosh :: Tagged s a -> Tagged s a #

tanh :: Tagged s a -> Tagged s a #

asinh :: Tagged s a -> Tagged s a #

acosh :: Tagged s a -> Tagged s a #

atanh :: Tagged s a -> Tagged s a #

log1p :: Tagged s a -> Tagged s a #

expm1 :: Tagged s a -> Tagged s a #

log1pexp :: Tagged s a -> Tagged s a #

log1mexp :: Tagged s a -> Tagged s a #

class (Real a, Fractional a) => RealFrac a where #

Extracting components of fractions.

Minimal complete definition

properFraction

Methods

properFraction :: Integral b => a -> (b, a) #

The function properFraction takes a real fractional number x and returns a pair (n,f) such that x = n+f, and:

  • n is an integral number with the same sign as x; and
  • f is a fraction with the same type and sign as x, and with absolute value less than 1.

The default definitions of the ceiling, floor, truncate and round functions are in terms of properFraction.

truncate :: Integral b => a -> b #

truncate x returns the integer nearest x between zero and x

round :: Integral b => a -> b #

round x returns the nearest integer to x; the even integer if x is equidistant between two integers

ceiling :: Integral b => a -> b #

ceiling x returns the least integer not less than x

floor :: Integral b => a -> b #

floor x returns the greatest integer not greater than x

Instances

Instances details
RealFrac CFloat 
Instance details

Defined in Foreign.C.Types

Methods

properFraction :: Integral b => CFloat -> (b, CFloat) #

truncate :: Integral b => CFloat -> b #

round :: Integral b => CFloat -> b #

ceiling :: Integral b => CFloat -> b #

floor :: Integral b => CFloat -> b #

RealFrac CDouble 
Instance details

Defined in Foreign.C.Types

Methods

properFraction :: Integral b => CDouble -> (b, CDouble) #

truncate :: Integral b => CDouble -> b #

round :: Integral b => CDouble -> b #

ceiling :: Integral b => CDouble -> b #

floor :: Integral b => CDouble -> b #

Integral a => RealFrac (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

properFraction :: Integral b => Ratio a -> (b, Ratio a) #

truncate :: Integral b => Ratio a -> b #

round :: Integral b => Ratio a -> b #

ceiling :: Integral b => Ratio a -> b #

floor :: Integral b => Ratio a -> b #

RealFrac a => RealFrac (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

properFraction :: Integral b => Identity a -> (b, Identity a) #

truncate :: Integral b => Identity a -> b #

round :: Integral b => Identity a -> b #

ceiling :: Integral b => Identity a -> b #

floor :: Integral b => Identity a -> b #

RealFrac a => RealFrac (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

Methods

properFraction :: Integral b => Down a -> (b, Down a) #

truncate :: Integral b => Down a -> b #

round :: Integral b => Down a -> b #

ceiling :: Integral b => Down a -> b #

floor :: Integral b => Down a -> b #

RealFrac a => RealFrac (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

properFraction :: Integral b0 => Const a b -> (b0, Const a b) #

truncate :: Integral b0 => Const a b -> b0 #

round :: Integral b0 => Const a b -> b0 #

ceiling :: Integral b0 => Const a b -> b0 #

floor :: Integral b0 => Const a b -> b0 #

RealFrac a => RealFrac (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

properFraction :: Integral b => Tagged s a -> (b, Tagged s a) #

truncate :: Integral b => Tagged s a -> b #

round :: Integral b => Tagged s a -> b #

ceiling :: Integral b => Tagged s a -> b #

floor :: Integral b => Tagged s a -> b #

class (RealFrac a, Floating a) => RealFloat a where #

Efficient, machine-independent access to the components of a floating-point number.

Methods

floatRadix :: a -> Integer #

a constant function, returning the radix of the representation (often 2)

floatDigits :: a -> Int #

a constant function, returning the number of digits of floatRadix in the significand

floatRange :: a -> (Int, Int) #

a constant function, returning the lowest and highest values the exponent may assume

decodeFloat :: a -> (Integer, Int) #

The function decodeFloat applied to a real floating-point number returns the significand expressed as an Integer and an appropriately scaled exponent (an Int). If decodeFloat x yields (m,n), then x is equal in value to m*b^^n, where b is the floating-point radix, and furthermore, either m and n are both zero or else b^(d-1) <= abs m < b^d, where d is the value of floatDigits x. In particular, decodeFloat 0 = (0,0). If the type contains a negative zero, also decodeFloat (-0.0) = (0,0). The result of decodeFloat x is unspecified if either of isNaN x or isInfinite x is True.

encodeFloat :: Integer -> Int -> a #

encodeFloat performs the inverse of decodeFloat in the sense that for finite x with the exception of -0.0, uncurry encodeFloat (decodeFloat x) = x. encodeFloat m n is one of the two closest representable floating-point numbers to m*b^^n (or ±Infinity if overflow occurs); usually the closer, but if m contains too many bits, the result may be rounded in the wrong direction.

exponent :: a -> Int #

exponent corresponds to the second component of decodeFloat. exponent 0 = 0 and for finite nonzero x, exponent x = snd (decodeFloat x) + floatDigits x. If x is a finite floating-point number, it is equal in value to significand x * b ^^ exponent x, where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

significand :: a -> a #

The first component of decodeFloat, scaled to lie in the open interval (-1,1), either 0.0 or of absolute value >= 1/b, where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.

scaleFloat :: Int -> a -> a #

multiplies a floating-point number by an integer power of the radix

isNaN :: a -> Bool #

True if the argument is an IEEE "not-a-number" (NaN) value

isInfinite :: a -> Bool #

True if the argument is an IEEE infinity or negative infinity

isDenormalized :: a -> Bool #

True if the argument is too small to be represented in normalized format

isNegativeZero :: a -> Bool #

True if the argument is an IEEE negative zero

isIEEE :: a -> Bool #

True if the argument is an IEEE floating point number

atan2 :: a -> a -> a #

a version of arctangent taking two real floating-point arguments. For real floating x and y, atan2 y x computes the angle (from the positive x-axis) of the vector from the origin to the point (x,y). atan2 y x returns a value in the range [-pi, pi]. It follows the Common Lisp semantics for the origin when signed zeroes are supported. atan2 y 1, with y in a type that is RealFloat, should return the same value as atan y. A default definition of atan2 is provided, but implementors can provide a more accurate implementation.

Instances

Instances details
RealFloat Double

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat Float

Since: base-2.1

Instance details

Defined in GHC.Float

RealFloat CFloat 
Instance details

Defined in Foreign.C.Types

RealFloat CDouble 
Instance details

Defined in Foreign.C.Types

RealFloat a => RealFloat (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

RealFloat a => RealFloat (Down a)

Since: base-4.14.0.0

Instance details

Defined in Data.Ord

RealFloat a => RealFloat (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

floatRadix :: Const a b -> Integer #

floatDigits :: Const a b -> Int #

floatRange :: Const a b -> (Int, Int) #

decodeFloat :: Const a b -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Const a b #

exponent :: Const a b -> Int #

significand :: Const a b -> Const a b #

scaleFloat :: Int -> Const a b -> Const a b #

isNaN :: Const a b -> Bool #

isInfinite :: Const a b -> Bool #

isDenormalized :: Const a b -> Bool #

isNegativeZero :: Const a b -> Bool #

isIEEE :: Const a b -> Bool #

atan2 :: Const a b -> Const a b -> Const a b #

RealFloat a => RealFloat (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

floatRadix :: Tagged s a -> Integer #

floatDigits :: Tagged s a -> Int #

floatRange :: Tagged s a -> (Int, Int) #

decodeFloat :: Tagged s a -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Tagged s a #

exponent :: Tagged s a -> Int #

significand :: Tagged s a -> Tagged s a #

scaleFloat :: Int -> Tagged s a -> Tagged s a #

isNaN :: Tagged s a -> Bool #

isInfinite :: Tagged s a -> Bool #

isDenormalized :: Tagged s a -> Bool #

isNegativeZero :: Tagged s a -> Bool #

isIEEE :: Tagged s a -> Bool #

atan2 :: Tagged s a -> Tagged s a -> Tagged s a #

Orphan instances

Euclidean d => Fractional (Fraction d) Source # 
Instance details

Euclidean a => Num (Fraction a) Source # 
Instance details