clash-prelude-0.99.3: CAES Language for Synchronous Hardware - Prelude library

Clash.Prelude.Safe

Description

This is the Safe API only of Clash.Prelude

CλaSH (pronounced ‘clash’) is a functional hardware description language that borrows both its syntax and semantics from the functional programming language Haskell. The merits of using a functional language to describe hardware comes from the fact that combinational circuits can be directly modeled as mathematical functions and that functional languages lend themselves very well at describing and (de-)composing mathematical functions.

This package provides:

• Prelude library containing datatypes and functions for circuit design

To use the library:

For now, Clash.Prelude is also the best starting point for exploring the library. A preliminary version of a tutorial can be found in Clash.Tutorial. Some circuit examples can be found in Clash.Examples.

Synopsis

# Creating synchronous sequential circuits

Arguments

 :: HiddenClockReset domain gated synchronous => (s -> i -> (s, o)) Transfer function in mealy machine form: state -> input -> (newstate,output) -> s Initial state -> Signal domain i -> Signal domain o Synchronous sequential function with input and output matching that of the mealy machine

Create a synchronous function from a combinational function describing a mealy machine

macT
:: Int        -- Current state
-> (Int,Int)  -- Input
-> (Int,Int)  -- (Updated state, output)
macT s (x,y) = (s',s)
where
s' = x * y + s

mac :: HiddenClockReset domain gated synchronous => Signal domain (Int, Int) -> Signal domain Int
mac = mealy macT 0

>>> simulate mac [(1,1),(2,2),(3,3),(4,4)]
[0,1,5,14...
...


Synchronous sequential functions can be composed just like their combinational counterpart:

dualMac
:: HiddenClockReset domain gated synchronous
=> (Signal domain Int, Signal domain Int)
-> (Signal domain Int, Signal domain Int)
-> Signal domain Int
dualMac (a,b) (x,y) = s1 + s2
where
s1 = mealy mac 0 (bundle (a,x))
s2 = mealy mac 0 (bundle (b,y))


Arguments

 :: (Bundle i, Bundle o, HiddenClockReset domain gated synchronous) => (s -> i -> (s, o)) Transfer function in mealy machine form: state -> input -> (newstate,output) -> s Initial state -> Unbundled domain i -> Unbundled domain o Synchronous sequential function with input and output matching that of the mealy machine

A version of mealy that does automatic Bundleing

Given a function f of type:

f :: Int -> (Bool, Int) -> (Int, (Int, Bool))


When we want to make compositions of f in g using mealy, we have to write:

g a b c = (b1,b2,i2)
where
(i1,b1) = unbundle (mealy f 0 (bundle (a,b)))
(i2,b2) = unbundle (mealy f 3 (bundle (i1,c)))


Using mealyB however we can write:

g a b c = (b1,b2,i2)
where
(i1,b1) = mealyB f 0 (a,b)
(i2,b2) = mealyB f 3 (i1,c)


Arguments

 :: (Bundle i, Bundle o, HiddenClockReset domain gated synchronous) => (s -> i -> (s, o)) Transfer function in mealy machine form: state -> input -> (newstate,output) -> s Initial state -> Unbundled domain i -> Unbundled domain o Synchronous sequential function with input and output matching that of the mealy machine

Infix version of mealyB

Arguments

 :: HiddenClockReset domain gated synchronous => (s -> i -> s) Transfer function in moore machine form: state -> input -> newstate -> (s -> o) Output function in moore machine form: state -> output -> s Initial state -> Signal domain i -> Signal domain o Synchronous sequential function with input and output matching that of the moore machine

Create a synchronous function from a combinational function describing a moore machine

macT :: Int        -- Current state
-> (Int,Int)  -- Input
-> Int        -- Updated state
macT s (x,y) = x * y + s

mac :: HiddenClockReset domain gated synchronous => Signal domain (Int, Int) -> Signal domain Int
mac = moore mac id 0

>>> simulate mac [(1,1),(2,2),(3,3),(4,4)]
[0,1,5,14...
...


Synchronous sequential functions can be composed just like their combinational counterpart:

dualMac
:: HiddenClockReset domain gated synchronous
=> (Signal domain Int, Signal domain Int)
-> (Signal domain Int, Signal domain Int)
-> Signal domain Int
dualMac (a,b) (x,y) = s1 + s2
where
s1 = moore mac id 0 (bundle (a,x))
s2 = moore mac id 0 (bundle (b,y))


Arguments

 :: (Bundle i, Bundle o, HiddenClockReset domain gated synchronous) => (s -> i -> s) Transfer function in moore machine form: state -> input -> newstate -> (s -> o) Output function in moore machine form: state -> output -> s Initial state -> Unbundled domain i -> Unbundled domain o Synchronous sequential function with input and output matching that of the moore machine

A version of moore that does automatic Bundleing

Given a functions t and o of types:

t :: Int -> (Bool, Int) -> Int
o :: Int -> (Int, Bool)


When we want to make compositions of t and o in g using moore, we have to write:

g a b c = (b1,b2,i2)
where
(i1,b1) = unbundle (moore t o 0 (bundle (a,b)))
(i2,b2) = unbundle (moore t o 3 (bundle (i1,c)))


Using mooreB however we can write:

g a b c = (b1,b2,i2)
where
(i1,b1) = mooreB t o 0 (a,b)
(i2,b2) = mooreB t o 3 (i1,c)


registerB :: (HiddenClockReset domain gated synchronous, Bundle a) => a -> Unbundled domain a -> Unbundled domain a infixr 3 Source #

Create a register function for product-type like signals (e.g. '(Signal a, Signal b)')

rP :: HiddenClockReset domain gated synchronous
=> (Signal domain Int, Signal domain Int)
-> (Signal domain Int, Signal domain Int)
rP = registerB (8,8)
>>> simulateB rP [(1,1),(2,2),(3,3)] :: [(Int,Int)]
[(8,8),(1,1),(2,2),(3,3)...
...


# ROMs

Arguments

 :: (KnownNat n, Enum addr) => Vec n a ROM contentNB: must be a constant -> addr Read address rd -> a The value of the ROM at address rd

An asynchronous/combinational ROM with space for n elements

Arguments

 :: KnownNat n => Vec (2 ^ n) a ROM contentNB: must be a constant -> Unsigned n Read address rd -> a The value of the ROM at address rd

An asynchronous/combinational ROM with space for 2^n elements

Arguments

 :: (KnownNat n, KnownNat m, HiddenClock domain gated) => Vec n a ROM contentNB: must be a constant -> Signal domain (Unsigned m) Read address rd -> Signal domain a The value of the ROM at address rd

A ROM with a synchronous read port, with space for n elements

• NB: Read value is delayed by 1 cycle
• NB: Initial output value is undefined

Arguments

 :: (KnownNat n, HiddenClock domain gated) => Vec (2 ^ n) a ROM contentNB: must be a constant -> Signal domain (Unsigned n) Read address rd -> Signal domain a The value of the ROM at address rd

A ROM with a synchronous read port, with space for 2^n elements

• NB: Read value is delayed by 1 cycle
• NB: Initial output value is undefined

# RAM primitives with a combinational read port

Arguments

 :: (Enum addr, HiddenClock domain gated, HasCallStack) => SNat n Size n of the RAM -> Signal domain addr Read address r -> Signal domain (Maybe (addr, a)) (write address w, value to write) -> Signal domain a Value of the RAM at address r

Create a RAM with space for n elements.

• NB: Initial content of the RAM is undefined

Arguments

 :: (KnownNat n, HiddenClock domain gated, HasCallStack) => Signal domain (Unsigned n) Read address r -> Signal domain (Maybe (Unsigned n, a)) (write address w, value to write) -> Signal domain a Value of the RAM at address r

Create a RAM with space for 2^n elements

• NB: Initial content of the RAM is undefined

# BlockRAM primitives

Arguments

 :: (Enum addr, HiddenClock domain gated, HasCallStack) => Vec n a Initial content of the BRAM, also determines the size, n, of the BRAM.NB: MUST be a constant. -> Signal domain addr Read address r -> Signal domain (Maybe (addr, a)) (write address w, value to write) -> Signal domain a Value of the blockRAM at address r from the previous clock cycle

Create a blockRAM with space for n elements.

• NB: Read value is delayed by 1 cycle
• NB: Initial output value is undefined
bram40
:: HiddenClock domain
=> Signal domain (Unsigned 6)
-> Signal domain (Maybe (Unsigned 6, Bit))
-> Signal domain Bit
bram40 = blockRam (replicate d40 1)


• See Clash.Prelude.BlockRam for more information on how to use a Block RAM.
• Use the adapter readNew for obtaining write-before-read semantics like this: readNew (blockRam inits) rd wrM.

Arguments

 :: (KnownNat n, HiddenClock domain gated, HasCallStack) => Vec (2 ^ n) a Initial content of the BRAM, also determines the size, 2^n, of the BRAM.NB: MUST be a constant. -> Signal domain (Unsigned n) Read address r -> Signal domain (Maybe (Unsigned n, a)) (write address w, value to write) -> Signal domain a Value of the blockRAM at address r from the previous clock cycle

Create a blockRAM with space for 2^n elements

• NB: Read value is delayed by 1 cycle
• NB: Initial output value is undefined
bram32
:: HiddenClock domain
=> Signal domain (Unsigned 5)
-> Signal domain (Maybe (Unsigned 5, Bit))
-> Signal domain Bit
bram32 = blockRamPow2 (replicate d32 1)


• See Clash.Prelude.BlockRam for more information on how to use a Block RAM.
• Use the adapter readNew for obtaining write-before-read semantics like this: readNew (blockRamPow2 inits) rd wrM.

Arguments

 :: (Eq addr, HiddenClockReset domain gated synchronous) => (Signal domain addr -> Signal domain (Maybe (addr, a)) -> Signal domain a) The ram component -> Signal domain addr Read address r -> Signal domain (Maybe (addr, a)) (Write address w, value to write) -> Signal domain a Value of the ram at address r from the previous clock cycle

>>> import Clash.Prelude
>>> :t readNew (blockRam (0 :> 1 :> Nil))
readNew (blockRam (0 :> 1 :> Nil))
:: ...
... =>
-> Signal domain (Maybe (addr, a)) -> Signal domain a


# Utility functions

Arguments

 :: (HiddenClockReset domain gated synchronous, Bounded a, Eq a) => a Starting value -> Signal domain a -> Signal domain Bool

Give a pulse when the Signal goes from minBound to maxBound

Arguments

 :: (HiddenClockReset domain gated synchronous, Bounded a, Eq a) => a Starting value -> Signal domain a -> Signal domain Bool

Give a pulse when the Signal goes from maxBound to minBound

riseEvery :: HiddenClockReset domain gated synchronous => SNat n -> Signal domain Bool Source #

Give a pulse every n clock cycles. This is a useful helper function when combined with functions like regEn or mux, in order to delay a register by a known amount.

To be precise: the given signal will be False for the next n-1 cycles, followed by a single True value:

>>> Prelude.last (sampleN 1024 (riseEvery d1024)) == True
True
>>> Prelude.or (sampleN 1023 (riseEvery d1024)) == False
True


For example, to update a counter once every 10 million cycles:

counter = regEn 0 (riseEvery (SNat :: SNat 10000000)) (counter + 1)


oscillate :: HiddenClockReset domain gated synchronous => Bool -> SNat n -> Signal domain Bool Source #

Oscillate a Bool for a given number of cycles. This is a convenient function when combined with something like regEn, as it allows you to easily hold a register value for a given number of cycles. The input Bool determines what the initial value is.

To oscillate on an interval of 5 cycles:

>>> sampleN 10 (oscillate False d5)
[False,False,False,False,False,True,True,True,True,True]


To oscillate between True and False:

>>> sampleN 10 (oscillate False d1)
[False,True,False,True,False,True,False,True,False,True]


An alternative definition for the above could be:

>>> let osc' = register False (not <$> osc') >>> let sample' = sampleN 200 >>> sample' (oscillate False d1) == sample' osc' True  # Exported modules ## Synchronous signals ## DataFlow interface ## Datatypes ### Bit vectors ### Arbitrary-width numbers ### Fixed point numbers ### Fixed size vectors ### Perfect depth trees ## Annotations ## Type-level natural numbers ## Type-level strings ## Type classes ### Clash ### Other module Data.Bits ## Exceptions ## Named types ## Hidden arguments ## Haskell Prelude Clash.Prelude re-exports most of the Haskell Prelude with the exception of the following: (++), (!!), concat, drop, foldl, foldl1, foldr, foldr1, head, init, iterate, last, length, map, repeat, replicate, reverse, scanl, scanr, splitAt, tail, take, unzip, unzip3, zip, zip3, zipWith, zipWith3. It instead exports the identically named functions defined in terms of Vec at Clash.Sized.Vector. seq :: a -> b -> b # 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] # 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] print :: Show a => a -> IO () # The print function outputs a value of any printable type to the standard output device. Printable types are those that are instances of class Show; print converts values to strings for output using the show operation and adds a newline. For example, a program to print the first 20 integers and their powers of 2 could be written as: main = print ([(n, 2^n) | n <- [0..19]]) fst :: (a, b) -> a # Extract the first component of a pair. snd :: (a, b) -> b # Extract the second component of a pair. otherwise is defined as the value True. It helps to make guards more readable. eg.  f x | x < 0 = ... | otherwise = ... ($) :: (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.

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

general coercion from integral types

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

general coercion to fractional types

class Bounded a where #

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

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

Minimal complete definition

Methods

minBound :: a #

maxBound :: a #

Instances
 Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 2.1 Instance detailsMethods Since: 4.10.0.0 Instance detailsMethods Since: 4.10.0.0 Instance detailsMethods Bounded () Since: 2.1 Instance detailsMethodsminBound :: () #maxBound :: () # Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods # Instance detailsMethods Class () (Bounded a) Instance detailsMethodscls :: Bounded a :- () # a :=> (Bounded (Dict a)) Instance detailsMethodsins :: a :- Bounded (Dict a) # () :=> (Bounded Bool) Instance detailsMethodsins :: () :- Bounded Bool # () :=> (Bounded Char) Instance detailsMethodsins :: () :- Bounded Char # () :=> (Bounded Int) Instance detailsMethodsins :: () :- Bounded Int # Instance detailsMethods () :=> (Bounded Word) Instance detailsMethodsins :: () :- Bounded Word # () :=> (Bounded ()) Instance detailsMethodsins :: () :- Bounded () # Bounded a => Bounded (Min a) Instance detailsMethodsminBound :: Min a #maxBound :: Min a # Bounded a => Bounded (Max a) Instance detailsMethodsminBound :: Max a #maxBound :: Max a # Bounded a => Bounded (First a) Instance detailsMethods Bounded a => Bounded (Last a) Instance detailsMethods Bounded m => Bounded (WrappedMonoid m) Instance detailsMethods Bounded a => Bounded (Identity a) Instance detailsMethods Bounded a => Bounded (Dual a) Instance detailsMethods Bounded a => Bounded (Sum a) Instance detailsMethodsminBound :: Sum a #maxBound :: Sum a # Bounded a => Bounded (Product a) Instance detailsMethods a => Bounded (Dict a) Instance detailsMethods KnownNat n => Bounded (BitVector n) # Instance detailsMethods KnownNat n => Bounded (Index n) # Instance detailsMethods (Ord a, Num a) => Bounded (Bounds a) Instance detailsMethodsminBound :: Bounds a #maxBound :: Bounds a # KnownNat n => Bounded (Unsigned n) # Instance detailsMethods KnownNat n => Bounded (Signed n) # Instance detailsMethods (Bounded a) :=> (Bounded (Identity a)) Instance detailsMethods (Bounded a) :=> (Bounded (Const a b)) Instance detailsMethodsins :: Bounded a :- Bounded (Const a b) # (Bounded a, Bounded b) => Bounded (a, b) Since: 2.1 Instance detailsMethodsminBound :: (a, b) #maxBound :: (a, b) # Bounded (Proxy t) Instance detailsMethods (Bounded a, Bounded b) :=> (Bounded (a, b)) Instance detailsMethodsins :: (Bounded a, Bounded b) :- Bounded (a, b) # (Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) Since: 2.1 Instance detailsMethodsminBound :: (a, b, c) #maxBound :: (a, b, c) # Bounded a => Bounded (Const a b) Instance detailsMethodsminBound :: Const a b #maxBound :: Const a b # a ~ b => Bounded (a :~: b) Since: 4.7.0.0 Instance detailsMethodsminBound :: a :~: b #maxBound :: a :~: b # Bounded b => Bounded (Tagged s b) Instance detailsMethodsminBound :: Tagged s b #maxBound :: Tagged s b # Bounded (rep (int + frac)) => Bounded (Fixed rep int frac) # Instance detailsMethodsminBound :: Fixed rep int frac #maxBound :: Fixed rep int frac # (Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) Since: 2.1 Instance detailsMethodsminBound :: (a, b, c, d) #maxBound :: (a, b, c, d) # a ~~ b => Bounded (a :~~: b) Since: 4.10.0.0 Instance detailsMethodsminBound :: a :~~: b #maxBound :: a :~~: b # (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) Since: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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: 2.1 Instance detailsMethodsminBound :: (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:

• The calls succ maxBound and pred minBound should result in a runtime error.
• fromEnum and toEnum should give a runtime error if the result value is not representable in the result type. For example, toEnum 7 :: Bool is an error.
• enumFrom and enumFromThen should be defined with an implicit bound, thus:
   enumFrom     x   = enumFromTo     x maxBound
enumFromThen x y = enumFromThenTo x y bound
where
| otherwise                = minBound

Minimal complete definition

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

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

Used in Haskell's translation of [n,n'..].

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

Used in Haskell's translation of [n..m].

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

Used in Haskell's translation of [n,n'..m].

Instances
 Since: 2.1 Instance detailsMethodssucc :: 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] # Since: 2.1 Instance detailsMethodssucc :: 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] # Since: 2.1 Instance detailsMethodssucc :: 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] # Since: 2.1 Instance detailsMethodssucc :: 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] # Since: 2.1 Instance detailsMethodssucc :: Int16 -> Int16 #pred :: Int16 -> Int16 #toEnum :: Int -> Int16 #enumFrom :: Int16 -> [Int16] #enumFromThen :: Int16 -> Int16 -> [Int16] #enumFromTo :: Int16 -> Int16 -> [Int16] #enumFromThenTo :: Int16 -> Int16 -> Int16 -> [Int16] # Since: 2.1 Instance detailsMethodssucc :: Int32 -> Int32 #pred :: Int32 -> Int32 #toEnum :: Int -> Int32 #enumFrom :: Int32 -> [Int32] #enumFromThen :: Int32 -> Int32 -> [Int32] #enumFromTo :: Int32 -> Int32 -> [Int32] #enumFromThenTo :: Int32 -> Int32 -> Int32 -> [Int32] # Since: 2.1 Instance detailsMethodssucc :: Int64 -> Int64 #pred :: Int64 -> Int64 #toEnum :: Int -> Int64 #enumFrom :: Int64 -> [Int64] #enumFromThen :: Int64 -> Int64 -> [Int64] #enumFromTo :: Int64 -> Int64 -> [Int64] #enumFromThenTo :: Int64 -> Int64 -> Int64 -> [Int64] # Since: 2.1 Instance detailsMethodsenumFrom :: Integer -> [Integer] #enumFromThen :: Integer -> Integer -> [Integer] #enumFromTo :: Integer -> Integer -> [Integer] #enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] # Since: 4.8.0.0 Instance detailsMethodsenumFrom :: Natural -> [Natural] #enumFromThen :: Natural -> Natural -> [Natural] #enumFromTo :: Natural -> Natural -> [Natural] #enumFromThenTo :: Natural -> Natural -> Natural -> [Natural] # Since: 2.1 Instance detailsMethodsenumFrom :: Ordering -> [Ordering] #enumFromTo :: Ordering -> Ordering -> [Ordering] # Since: 2.1 Instance detailsMethodssucc :: 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] # Since: 2.1 Instance detailsMethodssucc :: Word8 -> Word8 #pred :: Word8 -> Word8 #toEnum :: Int -> Word8 #enumFrom :: Word8 -> [Word8] #enumFromThen :: Word8 -> Word8 -> [Word8] #enumFromTo :: Word8 -> Word8 -> [Word8] #enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8] # Since: 2.1 Instance detailsMethodstoEnum :: Int -> Word16 #enumFrom :: Word16 -> [Word16] #enumFromThen :: Word16 -> Word16 -> [Word16] #enumFromTo :: Word16 -> Word16 -> [Word16] #enumFromThenTo :: Word16 -> Word16 -> Word16 -> [Word16] # Since: 2.1 Instance detailsMethodstoEnum :: Int -> Word32 #enumFrom :: Word32 -> [Word32] #enumFromThen :: Word32 -> Word32 -> [Word32] #enumFromTo :: Word32 -> Word32 -> [Word32] #enumFromThenTo :: Word32 -> Word32 -> Word32 -> [Word32] # Since: 2.1 Instance detailsMethodstoEnum :: Int -> Word64 #enumFrom :: Word64 -> [Word64] #enumFromThen :: Word64 -> Word64 -> [Word64] #enumFromTo :: Word64 -> Word64 -> [Word64] #enumFromThenTo :: Word64 -> Word64 -> Word64 -> [Word64] # Since: 4.10.0.0 Instance detailsMethodsenumFrom :: VecCount -> [VecCount] #enumFromTo :: VecCount -> VecCount -> [VecCount] # Since: 4.10.0.0 Instance detailsMethodsenumFrom :: VecElem -> [VecElem] #enumFromThen :: VecElem -> VecElem -> [VecElem] #enumFromTo :: VecElem -> VecElem -> [VecElem] #enumFromThenTo :: VecElem -> VecElem -> VecElem -> [VecElem] # Enum () Since: 2.1 Instance detailsMethodssucc :: () -> () #pred :: () -> () #toEnum :: Int -> () #fromEnum :: () -> Int #enumFrom :: () -> [()] #enumFromThen :: () -> () -> [()] #enumFromTo :: () -> () -> [()] #enumFromThenTo :: () -> () -> () -> [()] # Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethodssucc :: CChar -> CChar #pred :: CChar -> CChar #toEnum :: Int -> CChar #enumFrom :: CChar -> [CChar] #enumFromThen :: CChar -> CChar -> [CChar] #enumFromTo :: CChar -> CChar -> [CChar] #enumFromThenTo :: CChar -> CChar -> CChar -> [CChar] # Instance detailsMethodstoEnum :: Int -> CSChar #enumFrom :: CSChar -> [CSChar] #enumFromThen :: CSChar -> CSChar -> [CSChar] #enumFromTo :: CSChar -> CSChar -> [CSChar] #enumFromThenTo :: CSChar -> CSChar -> CSChar -> [CSChar] # Instance detailsMethodstoEnum :: Int -> CUChar #enumFrom :: CUChar -> [CUChar] #enumFromThen :: CUChar -> CUChar -> [CUChar] #enumFromTo :: CUChar -> CUChar -> [CUChar] #enumFromThenTo :: CUChar -> CUChar -> CUChar -> [CUChar] # Instance detailsMethodstoEnum :: Int -> CShort #enumFrom :: CShort -> [CShort] #enumFromThen :: CShort -> CShort -> [CShort] #enumFromTo :: CShort -> CShort -> [CShort] #enumFromThenTo :: CShort -> CShort -> CShort -> [CShort] # Instance detailsMethodsenumFrom :: CUShort -> [CUShort] #enumFromThen :: CUShort -> CUShort -> [CUShort] #enumFromTo :: CUShort -> CUShort -> [CUShort] #enumFromThenTo :: CUShort -> CUShort -> CUShort -> [CUShort] # Instance detailsMethodssucc :: 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] # Instance detailsMethodssucc :: CUInt -> CUInt #pred :: CUInt -> CUInt #toEnum :: Int -> CUInt #enumFrom :: CUInt -> [CUInt] #enumFromThen :: CUInt -> CUInt -> [CUInt] #enumFromTo :: CUInt -> CUInt -> [CUInt] #enumFromThenTo :: CUInt -> CUInt -> CUInt -> [CUInt] # Instance detailsMethodssucc :: CLong -> CLong #pred :: CLong -> CLong #toEnum :: Int -> CLong #enumFrom :: CLong -> [CLong] #enumFromThen :: CLong -> CLong -> [CLong] #enumFromTo :: CLong -> CLong -> [CLong] #enumFromThenTo :: CLong -> CLong -> CLong -> [CLong] # Instance detailsMethodstoEnum :: Int -> CULong #enumFrom :: CULong -> [CULong] #enumFromThen :: CULong -> CULong -> [CULong] #enumFromTo :: CULong -> CULong -> [CULong] #enumFromThenTo :: CULong -> CULong -> CULong -> [CULong] # Instance detailsMethodstoEnum :: Int -> CLLong #enumFrom :: CLLong -> [CLLong] #enumFromThen :: CLLong -> CLLong -> [CLLong] #enumFromTo :: CLLong -> CLLong -> [CLLong] #enumFromThenTo :: CLLong -> CLLong -> CLLong -> [CLLong] # Instance detailsMethodsenumFrom :: CULLong -> [CULLong] #enumFromThen :: CULLong -> CULLong -> [CULLong] #enumFromTo :: CULLong -> CULLong -> [CULLong] #enumFromThenTo :: CULLong -> CULLong -> CULLong -> [CULLong] # Instance detailsMethodssucc :: CBool -> CBool #pred :: CBool -> CBool #toEnum :: Int -> CBool #enumFrom :: CBool -> [CBool] #enumFromThen :: CBool -> CBool -> [CBool] #enumFromTo :: CBool -> CBool -> [CBool] #enumFromThenTo :: CBool -> CBool -> CBool -> [CBool] # Instance detailsMethodstoEnum :: Int -> CFloat #enumFrom :: CFloat -> [CFloat] #enumFromThen :: CFloat -> CFloat -> [CFloat] #enumFromTo :: CFloat -> CFloat -> [CFloat] #enumFromThenTo :: CFloat -> CFloat -> CFloat -> [CFloat] # Instance detailsMethodsenumFrom :: CDouble -> [CDouble] #enumFromThen :: CDouble -> CDouble -> [CDouble] #enumFromTo :: CDouble -> CDouble -> [CDouble] #enumFromThenTo :: CDouble -> CDouble -> CDouble -> [CDouble] # Instance detailsMethodsenumFrom :: CPtrdiff -> [CPtrdiff] #enumFromTo :: CPtrdiff -> CPtrdiff -> [CPtrdiff] # Instance detailsMethodssucc :: CSize -> CSize #pred :: CSize -> CSize #toEnum :: Int -> CSize #enumFrom :: CSize -> [CSize] #enumFromThen :: CSize -> CSize -> [CSize] #enumFromTo :: CSize -> CSize -> [CSize] #enumFromThenTo :: CSize -> CSize -> CSize -> [CSize] # Instance detailsMethodstoEnum :: Int -> CWchar #enumFrom :: CWchar -> [CWchar] #enumFromThen :: CWchar -> CWchar -> [CWchar] #enumFromTo :: CWchar -> CWchar -> [CWchar] #enumFromThenTo :: CWchar -> CWchar -> CWchar -> [CWchar] # Instance detailsMethods Instance detailsMethodstoEnum :: Int -> CClock #enumFrom :: CClock -> [CClock] #enumFromThen :: CClock -> CClock -> [CClock] #enumFromTo :: CClock -> CClock -> [CClock] #enumFromThenTo :: CClock -> CClock -> CClock -> [CClock] # Instance detailsMethodssucc :: CTime -> CTime #pred :: CTime -> CTime #toEnum :: Int -> CTime #enumFrom :: CTime -> [CTime] #enumFromThen :: CTime -> CTime -> [CTime] #enumFromTo :: CTime -> CTime -> [CTime] #enumFromThenTo :: CTime -> CTime -> CTime -> [CTime] # Instance detailsMethodsenumFrom :: CUSeconds -> [CUSeconds] # Instance detailsMethods Instance detailsMethodsenumFrom :: CIntPtr -> [CIntPtr] #enumFromThen :: CIntPtr -> CIntPtr -> [CIntPtr] #enumFromTo :: CIntPtr -> CIntPtr -> [CIntPtr] #enumFromThenTo :: CIntPtr -> CIntPtr -> CIntPtr -> [CIntPtr] # Instance detailsMethodsenumFrom :: CUIntPtr -> [CUIntPtr] #enumFromTo :: CUIntPtr -> CUIntPtr -> [CUIntPtr] # Instance detailsMethodsenumFrom :: CIntMax -> [CIntMax] #enumFromThen :: CIntMax -> CIntMax -> [CIntMax] #enumFromTo :: CIntMax -> CIntMax -> [CIntMax] #enumFromThenTo :: CIntMax -> CIntMax -> CIntMax -> [CIntMax] # Instance detailsMethodsenumFrom :: CUIntMax -> [CUIntMax] #enumFromTo :: CUIntMax -> CUIntMax -> [CUIntMax] # Instance detailsMethods Instance detailsMethodsenumFrom :: Extension -> [Extension] # Instance detailsMethodssucc :: Day -> Day #pred :: Day -> Day #toEnum :: Int -> Day #fromEnum :: Day -> Int #enumFrom :: Day -> [Day] #enumFromThen :: Day -> Day -> [Day] #enumFromTo :: Day -> Day -> [Day] #enumFromThenTo :: Day -> Day -> Day -> [Day] # # Instance detailsMethodssucc :: Bit -> Bit #pred :: Bit -> Bit #toEnum :: Int -> Bit #fromEnum :: Bit -> Int #enumFrom :: Bit -> [Bit] #enumFromThen :: Bit -> Bit -> [Bit] #enumFromTo :: Bit -> Bit -> [Bit] #enumFromThenTo :: Bit -> Bit -> Bit -> [Bit] # Class () (Enum a) Instance detailsMethodscls :: Enum a :- () # a :=> (Enum (Dict a)) Instance detailsMethodsins :: a :- Enum (Dict a) # () :=> (Enum Bool) Instance detailsMethodsins :: () :- Enum Bool # () :=> (Enum Char) Instance detailsMethodsins :: () :- Enum Char # () :=> (Enum Double) Instance detailsMethodsins :: () :- Enum Double # () :=> (Enum Float) Instance detailsMethodsins :: () :- Enum Float # () :=> (Enum Int) Instance detailsMethodsins :: () :- Enum Int # () :=> (Enum Integer) Instance detailsMethodsins :: () :- Enum Integer # () :=> (Enum Natural) Instance detailsMethodsins :: () :- Enum Natural # () :=> (Enum Ordering) Instance detailsMethodsins :: () :- Enum Ordering # () :=> (Enum Word) Instance detailsMethodsins :: () :- Enum Word # () :=> (Enum ()) Instance detailsMethodsins :: () :- Enum () # Integral a => Enum (Ratio a) Since: 2.0.1 Instance detailsMethodssucc :: 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 (Fixed a) Since: 2.1 Instance detailsMethodssucc :: Fixed a -> Fixed a #pred :: Fixed a -> Fixed a #toEnum :: Int -> Fixed a #fromEnum :: Fixed a -> Int #enumFrom :: Fixed a -> [Fixed a] #enumFromThen :: Fixed a -> Fixed a -> [Fixed a] #enumFromTo :: Fixed a -> Fixed a -> [Fixed a] #enumFromThenTo :: Fixed a -> Fixed a -> Fixed a -> [Fixed a] # Enum a => Enum (Min a) Since: 4.9.0.0 Instance detailsMethodssucc :: 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: 4.9.0.0 Instance detailsMethodssucc :: 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: 4.9.0.0 Instance detailsMethodssucc :: 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: 4.9.0.0 Instance detailsMethodssucc :: 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: 4.9.0.0 Instance detailsMethodsenumFrom :: WrappedMonoid a -> [WrappedMonoid a] #enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] #enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] #enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # Enum a => Enum (Identity a) Instance detailsMethodssucc :: Identity a -> Identity a #pred :: Identity a -> Identity a #toEnum :: Int -> Identity a #fromEnum :: Identity a -> Int #enumFrom :: Identity a -> [Identity a] #enumFromThen :: Identity a -> Identity a -> [Identity a] #enumFromTo :: Identity a -> Identity a -> [Identity a] #enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] # a => Enum (Dict a) Instance detailsMethodssucc :: Dict a -> Dict a #pred :: Dict a -> Dict a #toEnum :: Int -> Dict a #fromEnum :: Dict a -> Int #enumFrom :: Dict a -> [Dict a] #enumFromThen :: Dict a -> Dict a -> [Dict a] #enumFromTo :: Dict a -> Dict a -> [Dict a] #enumFromThenTo :: Dict a -> Dict a -> Dict a -> [Dict a] # KnownNat n => Enum (BitVector n) # The functions: enumFrom, enumFromThen, enumFromTo, and enumFromThenTo, are not synthesisable. Instance detailsMethodssucc :: BitVector n -> BitVector n #pred :: BitVector n -> BitVector n #toEnum :: Int -> BitVector n #fromEnum :: BitVector n -> Int #enumFrom :: BitVector n -> [BitVector n] #enumFromThen :: BitVector n -> BitVector n -> [BitVector n] #enumFromTo :: BitVector n -> BitVector n -> [BitVector n] #enumFromThenTo :: BitVector n -> BitVector n -> BitVector n -> [BitVector n] # KnownNat n => Enum (Index n) # The functions: enumFrom, enumFromThen, enumFromTo, and enumFromThenTo, are not synthesisable. Instance detailsMethodssucc :: Index n -> Index n #pred :: Index n -> Index n #toEnum :: Int -> Index n #fromEnum :: Index n -> Int #enumFrom :: Index n -> [Index n] #enumFromThen :: Index n -> Index n -> [Index n] #enumFromTo :: Index n -> Index n -> [Index n] #enumFromThenTo :: Index n -> Index n -> Index n -> [Index n] # Enum a => Enum (Bounds a) Instance detailsMethodssucc :: Bounds a -> Bounds a #pred :: Bounds a -> Bounds a #toEnum :: Int -> Bounds a #fromEnum :: Bounds a -> Int #enumFrom :: Bounds a -> [Bounds a] #enumFromThen :: Bounds a -> Bounds a -> [Bounds a] #enumFromTo :: Bounds a -> Bounds a -> [Bounds a] #enumFromThenTo :: Bounds a -> Bounds a -> Bounds a -> [Bounds a] # KnownNat n => Enum (Unsigned n) # The functions: enumFrom, enumFromThen, enumFromTo, and enumFromThenTo, are not synthesisable. Instance detailsMethodssucc :: Unsigned n -> Unsigned n #pred :: Unsigned n -> Unsigned n #toEnum :: Int -> Unsigned n #fromEnum :: Unsigned n -> Int #enumFrom :: Unsigned n -> [Unsigned n] #enumFromThen :: Unsigned n -> Unsigned n -> [Unsigned n] #enumFromTo :: Unsigned n -> Unsigned n -> [Unsigned n] #enumFromThenTo :: Unsigned n -> Unsigned n -> Unsigned n -> [Unsigned n] # KnownNat n => Enum (Signed n) # The functions: enumFrom, enumFromThen, enumFromTo, and enumFromThenTo, are not synthesisable. Instance detailsMethodssucc :: Signed n -> Signed n #pred :: Signed n -> Signed n #toEnum :: Int -> Signed n #fromEnum :: Signed n -> Int #enumFrom :: Signed n -> [Signed n] #enumFromThen :: Signed n -> Signed n -> [Signed n] #enumFromTo :: Signed n -> Signed n -> [Signed n] #enumFromThenTo :: Signed n -> Signed n -> Signed n -> [Signed n] # (Enum a) :=> (Enum (Identity a)) Instance detailsMethodsins :: Enum a :- Enum (Identity a) # (Enum a) :=> (Enum (Const a b)) Instance detailsMethodsins :: Enum a :- Enum (Const a b) # (Integral a) :=> (Enum (Ratio a)) Instance detailsMethodsins :: Integral a :- Enum (Ratio a) # Enum (Proxy s) Since: 4.7.0.0 Instance detailsMethodssucc :: Proxy s -> Proxy s #pred :: Proxy s -> Proxy s #toEnum :: Int -> Proxy s #fromEnum :: Proxy s -> Int #enumFrom :: Proxy s -> [Proxy s] #enumFromThen :: Proxy s -> Proxy s -> [Proxy s] #enumFromTo :: Proxy s -> Proxy s -> [Proxy s] #enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] # Class (Real a, Enum a) (Integral a) Instance detailsMethodscls :: Integral a :- (Real a, Enum a) # Enum a => Enum (Const a b) Instance detailsMethodssucc :: 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 (Alt f a) Instance detailsMethodssucc :: Alt f a -> Alt f a #pred :: Alt f a -> Alt f a #toEnum :: Int -> Alt f a #fromEnum :: Alt f a -> Int #enumFrom :: Alt f a -> [Alt f a] #enumFromThen :: Alt f a -> Alt f a -> [Alt f a] #enumFromTo :: Alt f a -> Alt f a -> [Alt f a] #enumFromThenTo :: Alt f a -> Alt f a -> Alt f a -> [Alt f a] # a ~ b => Enum (a :~: b) Since: 4.7.0.0 Instance detailsMethodssucc :: (a :~: b) -> a :~: b #pred :: (a :~: b) -> a :~: b #toEnum :: Int -> a :~: b #fromEnum :: (a :~: b) -> Int #enumFrom :: (a :~: b) -> [a :~: b] #enumFromThen :: (a :~: b) -> (a :~: b) -> [a :~: b] #enumFromTo :: (a :~: b) -> (a :~: b) -> [a :~: b] #enumFromThenTo :: (a :~: b) -> (a :~: b) -> (a :~: b) -> [a :~: b] # Enum a => Enum (Tagged s a) Instance detailsMethodssucc :: 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] # Enum (rep (int + frac)) => Enum (Fixed rep int frac) # Instance detailsMethodssucc :: Fixed rep int frac -> Fixed rep int frac #pred :: Fixed rep int frac -> Fixed rep int frac #toEnum :: Int -> Fixed rep int frac #fromEnum :: Fixed rep int frac -> Int #enumFrom :: Fixed rep int frac -> [Fixed rep int frac] #enumFromThen :: Fixed rep int frac -> Fixed rep int frac -> [Fixed rep int frac] #enumFromTo :: Fixed rep int frac -> Fixed rep int frac -> [Fixed rep int frac] #enumFromThenTo :: Fixed rep int frac -> Fixed rep int frac -> Fixed rep int frac -> [Fixed rep int frac] # a ~~ b => Enum (a :~~: b) Since: 4.10.0.0 Instance detailsMethodssucc :: (a :~~: b) -> a :~~: b #pred :: (a :~~: b) -> a :~~: b #toEnum :: Int -> a :~~: b #fromEnum :: (a :~~: b) -> Int #enumFrom :: (a :~~: b) -> [a :~~: b] #enumFromThen :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] #enumFromTo :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] #enumFromThenTo :: (a :~~: b) -> (a :~~: b) -> (a :~~: b) -> [a :~~: b] #

class Eq a where #

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

Minimal complete definition: either == or /=.

Minimal complete definition

Methods

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

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

Instances
 Instance detailsMethods(==) :: Bool -> Bool -> Bool #(/=) :: Bool -> Bool -> Bool # Instance detailsMethods(==) :: Char -> Char -> Bool #(/=) :: Char -> Char -> Bool # Instance detailsMethods(==) :: Double -> Double -> Bool #(/=) :: Double -> Double -> Bool # Instance detailsMethods(==) :: Float -> Float -> Bool #(/=) :: Float -> Float -> Bool # Instance detailsMethods(==) :: Int -> Int -> Bool #(/=) :: Int -> Int -> Bool # Since: 2.1 Instance detailsMethods(==) :: Int8 -> Int8 -> Bool #(/=) :: Int8 -> Int8 -> Bool # Since: 2.1 Instance detailsMethods(==) :: Int16 -> Int16 -> Bool #(/=) :: Int16 -> Int16 -> Bool # Since: 2.1 Instance detailsMethods(==) :: Int32 -> Int32 -> Bool #(/=) :: Int32 -> Int32 -> Bool # Since: 2.1 Instance detailsMethods(==) :: Int64 -> Int64 -> Bool #(/=) :: Int64 -> Int64 -> Bool # Instance detailsMethods(==) :: Integer -> Integer -> Bool #(/=) :: Integer -> Integer -> Bool # Instance detailsMethods(==) :: Natural -> Natural -> Bool #(/=) :: Natural -> Natural -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Word -> Word -> Bool #(/=) :: Word -> Word -> Bool # Since: 2.1 Instance detailsMethods(==) :: Word8 -> Word8 -> Bool #(/=) :: Word8 -> Word8 -> Bool # Since: 2.1 Instance detailsMethods(==) :: Word16 -> Word16 -> Bool #(/=) :: Word16 -> Word16 -> Bool # Since: 2.1 Instance detailsMethods(==) :: Word32 -> Word32 -> Bool #(/=) :: Word32 -> Word32 -> Bool # Since: 2.1 Instance detailsMethods(==) :: Word64 -> Word64 -> Bool #(/=) :: Word64 -> Word64 -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Exp -> Exp -> Bool #(/=) :: Exp -> Exp -> Bool # Instance detailsMethods(==) :: Match -> Match -> Bool #(/=) :: Match -> Match -> Bool # Instance detailsMethods(==) :: Clause -> Clause -> Bool #(/=) :: Clause -> Clause -> Bool # Instance detailsMethods(==) :: Pat -> Pat -> Bool #(/=) :: Pat -> Pat -> Bool # Instance detailsMethods(==) :: Type -> Type -> Bool #(/=) :: Type -> Type -> Bool # Instance detailsMethods(==) :: Dec -> Dec -> Bool #(/=) :: Dec -> Dec -> Bool # Instance detailsMethods(==) :: Name -> Name -> Bool #(/=) :: Name -> Name -> Bool # Instance detailsMethods(==) :: FunDep -> FunDep -> Bool #(/=) :: FunDep -> FunDep -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Overlap -> Overlap -> Bool #(/=) :: Overlap -> Overlap -> Bool # Instance detailsMethods Eq () Instance detailsMethods(==) :: () -> () -> Bool #(/=) :: () -> () -> Bool # Instance detailsMethods(==) :: TyCon -> TyCon -> Bool #(/=) :: TyCon -> TyCon -> Bool # Instance detailsMethods(==) :: Module -> Module -> Bool #(/=) :: Module -> Module -> Bool # Instance detailsMethods(==) :: TrName -> TrName -> Bool #(/=) :: TrName -> TrName -> Bool # Since: 2.1 Instance detailsMethods(==) :: Version -> Version -> Bool #(/=) :: Version -> Version -> Bool # Instance detailsMethods(==) :: BigNat -> BigNat -> Bool #(/=) :: BigNat -> BigNat -> Bool # Since: 4.8.0.0 Instance detailsMethods(==) :: Void -> Void -> Bool #(/=) :: Void -> Void -> Bool # Instance detailsMethods Equality of constructorsSince: 4.0.0.0 Instance detailsMethods(==) :: Constr -> Constr -> Bool #(/=) :: Constr -> Constr -> Bool # Instance detailsMethods(==) :: DataRep -> DataRep -> Bool #(/=) :: DataRep -> DataRep -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Fixity -> Fixity -> Bool #(/=) :: Fixity -> Fixity -> Bool # Instance detailsMethods(==) :: Unique -> Unique -> Bool #(/=) :: Unique -> Unique -> Bool # Since: 4.2.0.0 Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Since: 4.1.0.0 Instance detailsMethods Instance detailsMethods Since: 4.1.0.0 Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: All -> All -> Bool #(/=) :: All -> All -> Bool # Instance detailsMethods(==) :: Any -> Any -> Bool #(/=) :: Any -> Any -> Bool # Instance detailsMethods(==) :: Fixity -> Fixity -> Bool #(/=) :: Fixity -> Fixity -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Since: 4.7.0.0 Instance detailsMethods Since: 4.7.0.0 Instance detailsMethods(==) :: SomeNat -> SomeNat -> Bool #(/=) :: SomeNat -> SomeNat -> Bool # Instance detailsMethods(==) :: CChar -> CChar -> Bool #(/=) :: CChar -> CChar -> Bool # Instance detailsMethods(==) :: CSChar -> CSChar -> Bool #(/=) :: CSChar -> CSChar -> Bool # Instance detailsMethods(==) :: CUChar -> CUChar -> Bool #(/=) :: CUChar -> CUChar -> Bool # Instance detailsMethods(==) :: CShort -> CShort -> Bool #(/=) :: CShort -> CShort -> Bool # Instance detailsMethods(==) :: CUShort -> CUShort -> Bool #(/=) :: CUShort -> CUShort -> Bool # Instance detailsMethods(==) :: CInt -> CInt -> Bool #(/=) :: CInt -> CInt -> Bool # Instance detailsMethods(==) :: CUInt -> CUInt -> Bool #(/=) :: CUInt -> CUInt -> Bool # Instance detailsMethods(==) :: CLong -> CLong -> Bool #(/=) :: CLong -> CLong -> Bool # Instance detailsMethods(==) :: CULong -> CULong -> Bool #(/=) :: CULong -> CULong -> Bool # Instance detailsMethods(==) :: CLLong -> CLLong -> Bool #(/=) :: CLLong -> CLLong -> Bool # Instance detailsMethods(==) :: CULLong -> CULLong -> Bool #(/=) :: CULLong -> CULLong -> Bool # Instance detailsMethods(==) :: CBool -> CBool -> Bool #(/=) :: CBool -> CBool -> Bool # Instance detailsMethods(==) :: CFloat -> CFloat -> Bool #(/=) :: CFloat -> CFloat -> Bool # Instance detailsMethods(==) :: CDouble -> CDouble -> Bool #(/=) :: CDouble -> CDouble -> Bool # Instance detailsMethods Instance detailsMethods(==) :: CSize -> CSize -> Bool #(/=) :: CSize -> CSize -> Bool # Instance detailsMethods(==) :: CWchar -> CWchar -> Bool #(/=) :: CWchar -> CWchar -> Bool # Instance detailsMethods Instance detailsMethods(==) :: CClock -> CClock -> Bool #(/=) :: CClock -> CClock -> Bool # Instance detailsMethods(==) :: CTime -> CTime -> Bool #(/=) :: CTime -> CTime -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: CIntPtr -> CIntPtr -> Bool #(/=) :: CIntPtr -> CIntPtr -> Bool # Instance detailsMethods Instance detailsMethods(==) :: CIntMax -> CIntMax -> Bool #(/=) :: CIntMax -> CIntMax -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: Lexeme -> Lexeme -> Bool #(/=) :: Lexeme -> Lexeme -> Bool # Instance detailsMethods(==) :: Number -> Number -> Bool #(/=) :: Number -> Number -> Bool # Instance detailsMethods Instance detailsMethods(==) :: SrcLoc -> SrcLoc -> Bool #(/=) :: SrcLoc -> SrcLoc -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: IntSet -> IntSet -> Bool #(/=) :: IntSet -> IntSet -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: Half -> Half -> Bool #(/=) :: Half -> Half -> Bool # Instance detailsMethods(==) :: Con -> Con -> Bool #(/=) :: Con -> Con -> Bool # Instance detailsMethods(==) :: DefName -> DefName -> Bool #(/=) :: DefName -> DefName -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Doc -> Doc -> Bool #(/=) :: Doc -> Doc -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Style -> Style -> Bool #(/=) :: Style -> Style -> Bool # Instance detailsMethods(==) :: Mode -> Mode -> Bool #(/=) :: Mode -> Mode -> Bool # Since: 0.6.3.0 Instance detailsMethods Instance detailsMethods(==) :: Addr -> Addr -> Bool #(/=) :: Addr -> Addr -> Bool # Instance detailsMethods(==) :: ModName -> ModName -> Bool #(/=) :: ModName -> ModName -> Bool # Instance detailsMethods(==) :: PkgName -> PkgName -> Bool #(/=) :: PkgName -> PkgName -> Bool # Instance detailsMethods(==) :: Module -> Module -> Bool #(/=) :: Module -> Module -> Bool # Instance detailsMethods(==) :: OccName -> OccName -> Bool #(/=) :: OccName -> OccName -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: Loc -> Loc -> Bool #(/=) :: Loc -> Loc -> Bool # Instance detailsMethods(==) :: Info -> Info -> Bool #(/=) :: Info -> Info -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Fixity -> Fixity -> Bool #(/=) :: Fixity -> Fixity -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Lit -> Lit -> Bool #(/=) :: Lit -> Lit -> Bool # Instance detailsMethods(==) :: Body -> Body -> Bool #(/=) :: Body -> Body -> Bool # Instance detailsMethods(==) :: Guard -> Guard -> Bool #(/=) :: Guard -> Guard -> Bool # Instance detailsMethods(==) :: Stmt -> Stmt -> Bool #(/=) :: Stmt -> Stmt -> Bool # Instance detailsMethods(==) :: Range -> Range -> Bool #(/=) :: Range -> Range -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: Foreign -> Foreign -> Bool #(/=) :: Foreign -> Foreign -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Safety -> Safety -> Bool #(/=) :: Safety -> Safety -> Bool # Instance detailsMethods(==) :: Pragma -> Pragma -> Bool #(/=) :: Pragma -> Pragma -> Bool # Instance detailsMethods(==) :: Inline -> Inline -> Bool #(/=) :: Inline -> Inline -> Bool # Instance detailsMethods Instance detailsMethods(==) :: Phases -> Phases -> Bool #(/=) :: Phases -> Phases -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: Bang -> Bang -> Bool #(/=) :: Bang -> Bang -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: TyLit -> TyLit -> Bool #(/=) :: TyLit -> TyLit -> Bool # Instance detailsMethods(==) :: Role -> Role -> Bool #(/=) :: Role -> Role -> Bool # Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods Instance detailsMethods(==) :: UTCTime -> UTCTime -> Bool #(/=) :: UTCTime -> UTCTime -> Bool # Instance detailsMethods(==) :: Day -> Day -> Bool #(/=) :: Day -> Day -> Bool # # Instance detailsMethods(==) :: HDL -> HDL -> Bool #(/=) :: HDL -> HDL -> Bool # # Instance detailsMethods # Instance detailsMethods(==) :: Bit -> Bit -> Bool #(/=) :: Bit -> Bit -> Bool # # Instance detailsMethods # Instance detailsMethods Class () (Eq a) Instance detailsMethodscls :: Eq a :- () # () :=> (Eq Bool) Instance detailsMethodsins :: () :- Eq Bool # () :=> (Eq Double) Instance detailsMethodsins :: () :- Eq Double # () :=> (Eq Float) Instance detailsMethodsins :: () :- Eq Float # () :=> (Eq Int) Instance detailsMethodsins :: () :- Eq Int # () :=> (Eq Integer) Instance detailsMethodsins :: () :- Eq Integer # () :=> (Eq Natural) Instance detailsMethodsins :: () :- Eq Natural # () :=> (Eq Word) Instance detailsMethodsins :: () :- Eq Word # () :=> (Eq ()) Instance detailsMethodsins :: () :- Eq () # () :=> (Eq (Dict a)) Instance detailsMethodsins :: () :- Eq (Dict a) # () :=> (Eq (a :- b)) Instance detailsMethodsins :: () :- Eq (a :- b) # Eq a => Eq [a] Instance detailsMethods(==) :: [a] -> [a] -> Bool #(/=) :: [a] -> [a] -> Bool # Eq a => Eq (Maybe a) Instance detailsMethods(==) :: Maybe a -> Maybe a -> Bool #(/=) :: Maybe a -> Maybe a -> Bool # Eq a => Eq (Ratio a) Instance detailsMethods(==) :: Ratio a -> Ratio a -> Bool #(/=) :: Ratio a -> Ratio a -> Bool # Eq (Ptr a) Instance detailsMethods(==) :: Ptr a -> Ptr a -> Bool #(/=) :: Ptr a -> Ptr a -> Bool # Eq (FunPtr a) Instance detailsMethods(==) :: FunPtr a -> FunPtr a -> Bool #(/=) :: FunPtr a -> FunPtr a -> Bool # Eq p => Eq (Par1 p) Instance detailsMethods(==) :: Par1 p -> Par1 p -> Bool #(/=) :: Par1 p -> Par1 p -> Bool # Eq a => Eq (Complex a) Instance detailsMethods(==) :: Complex a -> Complex a -> Bool #(/=) :: Complex a -> Complex a -> Bool # Eq (Fixed a) Instance detailsMethods(==) :: Fixed a -> Fixed a -> Bool #(/=) :: Fixed a -> Fixed a -> Bool # Eq a => Eq (Min a) Instance detailsMethods(==) :: Min a -> Min a -> Bool #(/=) :: Min a -> Min a -> Bool # Eq a => Eq (Max a) Instance detailsMethods(==) :: Max a -> Max a -> Bool #(/=) :: Max a -> Max a -> Bool # Eq a => Eq (First a) Instance detailsMethods(==) :: First a -> First a -> Bool #(/=) :: First a -> First a -> Bool # Eq a => Eq (Last a) Instance detailsMethods(==) :: Last a -> Last a -> Bool #(/=) :: Last a -> Last a -> Bool # Eq m => Eq (WrappedMonoid m) Instance detailsMethods(==) :: WrappedMonoid m -> WrappedMonoid m -> Bool #(/=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # Eq a => Eq (Option a) Instance detailsMethods(==) :: Option a -> Option a -> Bool #(/=) :: Option a -> Option a -> Bool # Eq (StableName a) Since: 2.1 Instance detailsMethods(==) :: StableName a -> StableName a -> Bool #(/=) :: StableName a -> StableName a -> Bool # Eq a => Eq (ZipList a) Instance detailsMethods(==) :: ZipList a -> ZipList a -> Bool #(/=) :: ZipList a -> ZipList a -> Bool # Eq a => Eq (Identity a) Instance detailsMethods(==) :: Identity a -> Identity a -> Bool #(/=) :: Identity a -> Identity a -> Bool # Eq (TVar a) Since: 4.8.0.0 Instance detailsMethods(==) :: TVar a -> TVar a -> Bool #(/=) :: TVar a -> TVar a -> Bool # Eq (IORef a) Pointer equality.Since: 4.1.0.0 Instance detailsMethods(==) :: IORef a -> IORef a -> Bool #(/=) :: IORef a -> IORef a -> Bool # Eq a => Eq (First a) Instance detailsMethods(==) :: First a -> First a -> Bool #(/=) :: First a -> First a -> Bool # Eq a => Eq (Last a) Instance detailsMethods(==) :: Last a -> Last a -> Bool #(/=) :: Last a -> Last a -> Bool # Eq a => Eq (Dual a) Instance detailsMethods(==) :: Dual a -> Dual a -> Bool #(/=) :: Dual a -> Dual a -> Bool # Eq a => Eq (Sum a) Instance detailsMethods(==) :: Sum a -> Sum a -> Bool #(/=) :: Sum a -> Sum a -> Bool # Eq a => Eq (Product a) Instance detailsMethods(==) :: Product a -> Product a -> Bool #(/=) :: Product a -> Product a -> Bool # Eq a => Eq (Down a) Instance detailsMethods(==) :: Down a -> Down a -> Bool #(/=) :: Down a -> Down a -> Bool # Eq (MVar a) Since: 4.1.0.0 Instance detailsMethods(==) :: MVar a -> MVar a -> Bool #(/=) :: MVar a -> MVar a -> Bool # Eq a => Eq (NonEmpty a) Instance detailsMethods(==) :: NonEmpty a -> NonEmpty a -> Bool #(/=) :: NonEmpty a -> NonEmpty a -> Bool # Eq (Dict a) Instance detailsMethods(==) :: Dict a -> Dict a -> Bool #(/=) :: Dict a -> Dict a -> Bool # Eq a => Eq (IntMap a) Instance detailsMethods(==) :: IntMap a -> IntMap a -> Bool #(/=) :: IntMap a -> IntMap a -> Bool # Eq a => Eq (Tree a) Instance detailsMethods(==) :: Tree a -> Tree a -> Bool #(/=) :: Tree a -> Tree a -> Bool # Eq a => Eq (Seq a) Instance detailsMethods(==) :: Seq a -> Seq a -> Bool #(/=) :: Seq a -> Seq a -> Bool # Eq a => Eq (ViewL a) Instance detailsMethods(==) :: ViewL a -> ViewL a -> Bool #(/=) :: ViewL a -> ViewL a -> Bool # Eq a => Eq (ViewR a) Instance detailsMethods(==) :: ViewR a -> ViewR a -> Bool #(/=) :: ViewR a -> ViewR a -> Bool # Eq a => Eq (Set a) Instance detailsMethods(==) :: Set a -> Set a -> Bool #(/=) :: Set a -> Set a -> Bool # Eq a => Eq (DList a) Instance detailsMethods(==) :: DList a -> DList a -> Bool #(/=) :: DList a -> DList a -> Bool # (Prim a, Eq a) => Eq (Vector a) Instance detailsMethods(==) :: Vector a -> Vector a -> Bool #(/=) :: Vector a -> Vector a -> Bool # (Storable a, Eq a) => Eq (Vector a) Instance detailsMethods(==) :: Vector a -> Vector a -> Bool #(/=) :: Vector a -> Vector a -> Bool # Eq a => Eq (HashSet a) Instance detailsMethods(==) :: HashSet a -> HashSet a -> Bool #(/=) :: HashSet a -> HashSet a -> Bool # Eq a => Eq (Vector a) Instance detailsMethods(==) :: Vector a -> Vector a -> Bool #(/=) :: Vector a -> Vector a -> Bool # Eq (Doc a) Instance detailsMethods(==) :: Doc a -> Doc a -> Bool #(/=) :: Doc a -> Doc a -> Bool # Eq a => Eq (AnnotDetails a) Instance detailsMethods(==) :: AnnotDetails a -> AnnotDetails a -> Bool #(/=) :: AnnotDetails a -> AnnotDetails a -> Bool # Eq a => Eq (Span a) Instance detailsMethods(==) :: Span a -> Span a -> Bool #(/=) :: Span a -> Span a -> Bool # (Eq a, PrimUnlifted a) => Eq (UnliftedArray a) Instance detailsMethods(==) :: UnliftedArray a -> UnliftedArray a -> Bool #(/=) :: UnliftedArray a -> UnliftedArray a -> Bool # (Eq a, Prim a) => Eq (PrimArray a) Since: 0.6.4.0 Instance detailsMethods(==) :: PrimArray a -> PrimArray a -> Bool #(/=) :: PrimArray a -> PrimArray a -> Bool # Eq a => Eq (SmallArray a) Instance detailsMethods(==) :: SmallArray a -> SmallArray a -> Bool #(/=) :: SmallArray a -> SmallArray a -> Bool # Eq a => Eq (Array a) Instance detailsMethods(==) :: Array a -> Array a -> Bool #(/=) :: Array a -> Array a -> Bool # Eq (BitVector n) # Instance detailsMethods(==) :: BitVector n -> BitVector n -> Bool #(/=) :: BitVector n -> BitVector n -> Bool # Eq (Index n) # Instance detailsMethods(==) :: Index n -> Index n -> Bool #(/=) :: Index n -> Index n -> Bool # Eq a => Eq (Bounds a) Instance detailsMethods(==) :: Bounds a -> Bounds a -> Bool #(/=) :: Bounds a -> Bounds a -> Bool # Eq (Unsigned n) # Instance detailsMethods(==) :: Unsigned n -> Unsigned n -> Bool #(/=) :: Unsigned n -> Unsigned n -> Bool # Eq (Signed n) # Instance detailsMethods(==) :: Signed n -> Signed n -> Bool #(/=) :: Signed n -> Signed n -> Bool # Class (Eq a) (Ord a) Instance detailsMethodscls :: Ord a :- Eq a # Class (Eq a) (Bits a) Instance detailsMethodscls :: Bits a :- Eq a # (Eq a) :=> (Eq [a]) Instance detailsMethodsins :: Eq a :- Eq [a] # (Eq a) :=> (Eq (Maybe a)) Instance detailsMethodsins :: Eq a :- Eq (Maybe a) # (Eq a) :=> (Eq (Complex a)) Instance detailsMethodsins :: Eq a :- Eq (Complex a) # (Eq a) :=> (Eq (Ratio a)) Instance detailsMethodsins :: Eq a :- Eq (Ratio a) # (Eq a) :=> (Eq (Identity a)) Instance detailsMethodsins :: Eq a :- Eq (Identity a) # (Eq a) :=> (Eq (Const a b)) Instance detailsMethodsins :: Eq a :- Eq (Const a b) # (Eq a, Eq b) => Eq (Either a b) Instance detailsMethods(==) :: Either a b -> Either a b -> Bool #(/=) :: Either a b -> Either a b -> Bool # Eq (V1 p) Since: 4.9.0.0 Instance detailsMethods(==) :: V1 p -> V1 p -> Bool #(/=) :: V1 p -> V1 p -> Bool # Eq (U1 p) Since: 4.9.0.0 Instance detailsMethods(==) :: U1 p -> U1 p -> Bool #(/=) :: U1 p -> U1 p -> Bool # Eq (TypeRep a) Since: 2.1 Instance detailsMethods(==) :: TypeRep a -> TypeRep a -> Bool #(/=) :: TypeRep a -> TypeRep a -> Bool # (Eq a, Eq b) => Eq (a, b) Instance detailsMethods(==) :: (a, b) -> (a, b) -> Bool #(/=) :: (a, b) -> (a, b) -> Bool # (Ix i, Eq e) => Eq (Array i e) Since: 2.1 Instance detailsMethods(==) :: Array i e -> Array i e -> Bool #(/=) :: Array i e -> Array i e -> Bool # Eq a => Eq (Arg a b) Since: 4.9.0.0 Instance detailsMethods(==) :: Arg a b -> Arg a b -> Bool #(/=) :: Arg a b -> Arg a b -> Bool # Eq (Proxy s) Since: 4.7.0.0 Instance detailsMethods(==) :: Proxy s -> Proxy s -> Bool #(/=) :: Proxy s -> Proxy s -> Bool # Eq (STRef s a) Pointer equality.Since: 2.1 Instance detailsMethods(==) :: STRef s a -> STRef s a -> Bool #(/=) :: STRef s a -> STRef s a -> Bool # Eq (a :- b) Assumes IncoherentInstances doesn't exist. Instance detailsMethods(==) :: (a :- b) -> (a :- b) -> Bool #(/=) :: (a :- b) -> (a :- b) -> Bool # (Eq k, Eq a) => Eq (Map k a) Instance detailsMethods(==) :: Map k a -> Map k a -> Bool #(/=) :: Map k a -> Map k a -> Bool # (Eq1 f, Eq a) => Eq (Cofree f a) Instance detailsMethods(==) :: Cofree f a -> Cofree f a -> Bool #(/=) :: Cofree f a -> Cofree f a -> Bool # (Eq1 f, Eq a) => Eq (Free f a) Instance detailsMethods(==) :: Free f a -> Free f a -> Bool #(/=) :: Free f a -> Free f a -> Bool # (Eq1 f, Eq a) => Eq (Yoneda f a) Instance detailsMethods(==) :: Yoneda f a -> Yoneda f a -> Bool #(/=) :: Yoneda f a -> Yoneda f a -> Bool # (Eq k, Eq v) => Eq (HashMap k v) Instance detailsMethods(==) :: HashMap k v -> HashMap k v -> Bool #(/=) :: HashMap k v -> HashMap k v -> Bool # (Eq i, Eq a) => Eq (Level i a) Instance detailsMethods(==) :: Level i a -> Level i a -> Bool #(/=) :: Level i a -> Level i a -> Bool # Instance detailsMethods(==) :: MutableUnliftedArray s a -> MutableUnliftedArray s a -> Bool #(/=) :: MutableUnliftedArray s a -> MutableUnliftedArray s a -> Bool # Eq (SmallMutableArray s a) Instance detailsMethods(==) :: SmallMutableArray s a -> SmallMutableArray s a -> Bool #(/=) :: SmallMutableArray s a -> SmallMutableArray s a -> Bool # Eq (MutableArray s a) Instance detailsMethods(==) :: MutableArray s a -> MutableArray s a -> Bool #(/=) :: MutableArray s a -> MutableArray s a -> Bool # (Eq k, Eq v) => Eq (Leaf k v) Instance detailsMethods(==) :: Leaf k v -> Leaf k v -> Bool #(/=) :: Leaf k v -> Leaf k v -> Bool # (KnownNat n, Eq a) => Eq (Vec n a) # Instance detailsMethods(==) :: Vec n a -> Vec n a -> Bool #(/=) :: Vec n a -> Vec n a -> Bool # (KnownNat d, Eq a) => Eq (RTree d a) # Instance detailsMethods(==) :: RTree d a -> RTree d a -> Bool #(/=) :: RTree d a -> RTree d a -> Bool # (Eq a, Eq b) :=> (Eq (a, b)) Instance detailsMethodsins :: (Eq a, Eq b) :- Eq (a, b) # (Eq a, Eq b) :=> (Eq (Either a b)) Instance detailsMethodsins :: (Eq a, Eq b) :- Eq (Either a b) # Eq (f p) => Eq (Rec1 f p) Instance detailsMethods(==) :: Rec1 f p -> Rec1 f p -> Bool #(/=) :: Rec1 f p -> Rec1 f p -> Bool # Eq (URec (Ptr ()) p) Instance detailsMethods(==) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool #(/=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # Eq (URec Char p) Instance detailsMethods(==) :: URec Char p -> URec Char p -> Bool #(/=) :: URec Char p -> URec Char p -> Bool # Eq (URec Double p) Instance detailsMethods(==) :: URec Double p -> URec Double p -> Bool #(/=) :: URec Double p -> URec Double p -> Bool # Eq (URec Float p) Instance detailsMethods(==) :: URec Float p -> URec Float p -> Bool #(/=) :: URec Float p -> URec Float p -> Bool # Eq (URec Int p) Instance detailsMethods(==) :: URec Int p -> URec Int p -> Bool #(/=) :: URec Int p -> URec Int p -> Bool # Eq (URec Word p) Instance detailsMethods(==) :: 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 detailsMethods(==) :: (a, b, c) -> (a, b, c) -> Bool #(/=) :: (a, b, c) -> (a, b, c) -> Bool # Eq (STArray s i e) Since: 2.1 Instance detailsMethods(==) :: STArray s i e -> STArray s i e -> Bool #(/=) :: STArray s i e -> STArray s i e -> Bool # Eq a => Eq (Const a b) Instance detailsMethods(==) :: Const a b -> Const a b -> Bool #(/=) :: Const a b -> Const a b -> Bool # Eq (f a) => Eq (Alt f a) Instance detailsMethods(==) :: Alt f a -> Alt f a -> Bool #(/=) :: Alt f a -> Alt f a -> Bool # Eq (a :~: b) Instance detailsMethods(==) :: (a :~: b) -> (a :~: b) -> Bool #(/=) :: (a :~: b) -> (a :~: b) -> Bool # Eq (p a a) => Eq (Join p a) Instance detailsMethods(==) :: Join p a -> Join p a -> Bool #(/=) :: Join p a -> Join p a -> Bool # Eq (p (Fix p a) a) => Eq (Fix p a) Instance detailsMethods(==) :: Fix p a -> Fix p a -> Bool #(/=) :: Fix p a -> Fix p a -> Bool # (Eq a, Eq (f b)) => Eq (FreeF f a b) Instance detailsMethods(==) :: FreeF f a b -> FreeF f a b -> Bool #(/=) :: FreeF f a b -> FreeF f a b -> Bool # (Eq1 f, Eq1 m, Eq a) => Eq (FreeT f m a) Instance detailsMethods(==) :: FreeT f m a -> FreeT f m a -> Bool #(/=) :: FreeT f m a -> FreeT f m a -> Bool # (Eq a, Eq (f b)) => Eq (CofreeF f a b) Instance detailsMethods(==) :: CofreeF f a b -> CofreeF f a b -> Bool #(/=) :: CofreeF f a b -> CofreeF f a b -> Bool # Eq (w (CofreeF f a (CofreeT f w a))) => Eq (CofreeT f w a) Instance detailsMethods(==) :: CofreeT f w a -> CofreeT f w a -> Bool #(/=) :: CofreeT f w a -> CofreeT f w a -> Bool # (Eq e, Eq1 m, Eq a) => Eq (ErrorT e m a) Instance detailsMethods(==) :: 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 detailsMethods(==) :: Tagged s b -> Tagged s b -> Bool #(/=) :: Tagged s b -> Tagged s b -> Bool # Eq a => Eq (Constant a b) Instance detailsMethods(==) :: Constant a b -> Constant a b -> Bool #(/=) :: Constant a b -> Constant a b -> Bool # Eq (rep (int + frac)) => Eq (Fixed rep int frac) # Instance detailsMethods(==) :: Fixed rep int frac -> Fixed rep int frac -> Bool #(/=) :: Fixed rep int frac -> Fixed rep int frac -> Bool # Eq c => Eq (K1 i c p) Instance detailsMethods(==) :: 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) Instance detailsMethods(==) :: (f :+: g) p -> (f :+: g) p -> Bool #(/=) :: (f :+: g) p -> (f :+: g) p -> Bool # (Eq (f p), Eq (g p)) => Eq ((f :*: g) p) Instance detailsMethods(==) :: (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 detailsMethods(==) :: (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: 4.9.0.0 Instance detailsMethods(==) :: 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: 4.9.0.0 Instance detailsMethods(==) :: Sum f g a -> Sum f g a -> Bool #(/=) :: Sum f g a -> Sum f g a -> Bool # Eq (a :~~: b) Since: 4.10.0.0 Instance detailsMethods(==) :: (a :~~: b) -> (a :~~: b) -> Bool #(/=) :: (a :~~: b) -> (a :~~: b) -> Bool # Eq (f p) => Eq (M1 i c f p) Instance detailsMethods(==) :: 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) Instance detailsMethods(==) :: (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 detailsMethods(==) :: (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: 4.9.0.0 Instance detailsMethods(==) :: Compose f g a -> Compose f g a -> Bool #(/=) :: Compose f g a -> Compose f g a -> Bool # Eq (p a b) => Eq (WrappedBifunctor p a b) Instance detailsMethods(==) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool #(/=) :: WrappedBifunctor p a b -> WrappedBifunctor p a b -> Bool # Eq (g b) => Eq (Joker g a b) Instance detailsMethods(==) :: Joker g a b -> Joker g a b -> Bool #(/=) :: Joker g a b -> Joker g a b -> Bool # Eq (p b a) => Eq (Flip p a b) Instance detailsMethods(==) :: Flip p a b -> Flip p a b -> Bool #(/=) :: Flip p a b -> Flip p a b -> Bool # Eq (f a) => Eq (Clown f a b) Instance detailsMethods(==) :: Clown f a b -> Clown f a b -> Bool #(/=) :: Clown f a b -> Clown f a b -> Bool # (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f) Instance detailsMethods(==) :: (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 (p a b), Eq (q a b)) => Eq (Sum p q a b) Instance detailsMethods(==) :: Sum p q a b -> Sum p q a b -> Bool #(/=) :: Sum p q a b -> Sum p q a b -> Bool # (Eq (f a b), Eq (g a b)) => Eq (Product f g a b) Instance detailsMethods(==) :: Product f g a b -> Product f g a b -> Bool #(/=) :: Product f g a b -> Product f g 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 detailsMethods(==) :: (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 detailsMethods(==) :: 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 detailsMethods(==) :: (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 detailsMethods(==) :: (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 detailsMethods(==) :: 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 detailsMethods(==) :: (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 detailsMethods(==) :: (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 detailsMethods(==) :: (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 detailsMethods(==) :: (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 detailsMethods(==) :: (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 detailsMethods(==) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #(/=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool #

class Fractional a => Floating a where #

Trigonometric and hyperbolic functions and related functions.

Minimal complete definition

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
 Since: 2.1 Instance detailsMethodsexp :: Double -> Double #log :: Double -> Double #(**) :: Double -> Double -> Double #sin :: Double -> Double #cos :: Double -> Double #tan :: Double -> Double # Since: 2.1 Instance detailsMethodspi :: Float #exp :: Float -> Float #log :: Float -> Float #sqrt :: Float -> Float #(**) :: Float -> Float -> Float #logBase :: Float -> Float -> Float #sin :: Float -> Float #cos :: Float -> Float #tan :: Float -> Float #asin :: Float -> Float #acos :: Float -> Float #atan :: Float -> Float #sinh :: Float -> Float #cosh :: Float -> Float #tanh :: Float -> Float #asinh :: Float -> Float #acosh :: Float -> Float #atanh :: Float -> Float #log1p :: Float -> Float #expm1 :: Float -> Float # Instance detailsMethodsexp :: CFloat -> CFloat #log :: CFloat -> CFloat #(**) :: CFloat -> CFloat -> CFloat #sin :: CFloat -> CFloat #cos :: CFloat -> CFloat #tan :: CFloat -> CFloat # Instance detailsMethods Instance detailsMethodspi :: Half #exp :: Half -> Half #log :: Half -> Half #sqrt :: Half -> Half #(**) :: Half -> Half -> Half #logBase :: Half -> Half -> Half #sin :: Half -> Half #cos :: Half -> Half #tan :: Half -> Half #asin :: Half -> Half #acos :: Half -> Half #atan :: Half -> Half #sinh :: Half -> Half #cosh :: Half -> Half #tanh :: Half -> Half #asinh :: Half -> Half #acosh :: Half -> Half #atanh :: Half -> Half #log1p :: Half -> Half #expm1 :: Half -> Half # Instance detailsMethodsins :: () :- Floating Double # () :=> (Floating Float) Instance detailsMethodsins :: () :- Floating Float # RealFloat a => Floating (Complex a) Since: 2.1 Instance detailsMethodspi :: 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) Instance detailsMethodspi :: Identity a #exp :: Identity a -> Identity a #log :: Identity a -> Identity a #sqrt :: Identity a -> Identity a #(**) :: Identity a -> Identity a -> Identity a #logBase :: Identity a -> Identity a -> Identity a #sin :: Identity a -> Identity a #cos :: Identity a -> Identity a #tan :: Identity a -> Identity a #asin :: Identity a -> Identity a #acos :: Identity a -> Identity a #atan :: Identity a -> Identity a #sinh :: Identity a -> Identity a #cosh :: Identity a -> Identity a #tanh :: Identity a -> Identity a #asinh :: Identity a -> Identity a #acosh :: Identity a -> Identity a #atanh :: Identity a -> Identity a #log1p :: Identity a -> Identity a #expm1 :: Identity a -> Identity a #log1pexp :: Identity a -> Identity a #log1mexp :: Identity a -> Identity a # Class (Fractional a) (Floating a) Instance detailsMethods (Floating a) :=> (Floating (Identity a)) Instance detailsMethods (Floating a) :=> (Floating (Const a b)) Instance detailsMethodsins :: Floating a :- Floating (Const a b) # (RealFloat a) :=> (Floating (Complex a)) Instance detailsMethods Floating a => Floating (Op a b) Instance detailsMethodspi :: Op a b #exp :: Op a b -> Op a b #log :: Op a b -> Op a b #sqrt :: Op a b -> Op a b #(**) :: Op a b -> Op a b -> Op a b #logBase :: Op a b -> Op a b -> Op a b #sin :: Op a b -> Op a b #cos :: Op a b -> Op a b #tan :: Op a b -> Op a b #asin :: Op a b -> Op a b #acos :: Op a b -> Op a b #atan :: Op a b -> Op a b #sinh :: Op a b -> Op a b #cosh :: Op a b -> Op a b #tanh :: Op a b -> Op a b #asinh :: Op a b -> Op a b #acosh :: Op a b -> Op a b #atanh :: Op a b -> Op a b #log1p :: Op a b -> Op a b #expm1 :: Op a b -> Op a b #log1pexp :: Op a b -> Op a b #log1mexp :: Op a b -> Op a b # Class (RealFrac a, Floating a) (RealFloat a) Instance detailsMethodscls :: RealFloat a :- (RealFrac a, Floating a) # Floating a => Floating (Const a b) Instance detailsMethodspi :: 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 detailsMethodspi :: Tagged s a #exp :: Tagged s a -> Tagged s a #log :: Tagged s a -> Tagged s a #sqrt :: Tagged s a -> Tagged s a #(**) :: Tagged s a -> Tagged s a -> Tagged s a #logBase :: Tagged s a -> Tagged s a -> Tagged s a #sin :: Tagged s a -> Tagged s a #cos :: Tagged s a -> Tagged s a #tan :: Tagged s a -> Tagged s a #asin :: Tagged s a -> Tagged s a #acos :: Tagged s a -> Tagged s a #atan :: Tagged s a -> Tagged s a #sinh :: Tagged s a -> Tagged s a #cosh :: Tagged s a -> Tagged s a #tanh :: Tagged s a -> Tagged s a #asinh :: Tagged s a -> Tagged s a #acosh :: Tagged s a -> Tagged s a #atanh :: Tagged s a -> Tagged s a #log1p :: Tagged s a -> Tagged s a #expm1 :: Tagged s a -> Tagged s a #log1pexp :: Tagged s a -> Tagged s a #log1mexp :: Tagged s a -> Tagged s a #

class Num a => Fractional a where #

Fractional numbers, supporting real division.

Minimal complete definition

fromRational, (recip | (/))

Methods

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

fractional division

recip :: a -> a #

reciprocal fraction

fromRational :: Rational -> a #

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

Instances
 Instance detailsMethods(/) :: CFloat -> CFloat -> CFloat # Instance detailsMethods Instance detailsMethods(/) :: Half -> Half -> Half #recip :: Half -> Half # Instance detailsMethods Instance detailsMethods Integral a => Fractional (Ratio a) Since: 2.0.1 Instance detailsMethods(/) :: Ratio a -> Ratio a -> Ratio a #recip :: Ratio a -> Ratio a # RealFloat a => Fractional (Complex a) Since: 2.1 Instance detailsMethods(/) :: Complex a -> Complex a -> Complex a #recip :: Complex a -> Complex a # HasResolution a => Fractional (Fixed a) Since: 2.1 Instance detailsMethods(/) :: Fixed a -> Fixed a -> Fixed a #recip :: Fixed a -> Fixed a # Fractional a => Fractional (Identity a) Instance detailsMethods(/) :: Identity a -> Identity a -> Identity a #recip :: Identity a -> Identity a # Class (Fractional a) (Floating a) Instance detailsMethods Class (Num a) (Fractional a) Instance detailsMethods (Fractional a) :=> (Fractional (Identity a)) Instance detailsMethods (Fractional a) :=> (Fractional (Const a b)) Instance detailsMethodsins :: Fractional a :- Fractional (Const a b) # (Integral a) :=> (Fractional (Ratio a)) Instance detailsMethods (RealFloat a) :=