oalg-base-1.1.4.0: Algebraic structures on oriented entities and limits as a tool kit to solve algebraic problems.
Copyright(c) Erich Gut
LicenseBSD3
Maintainerzerich.gut@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

OAlg.Data.Number

Description

basic number types.

Synopsis

Natural Numbers

data N Source #

natural numbers 0, 1, 2...

Instances

Instances details
Enum N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

succ :: N -> N #

pred :: N -> N #

toEnum :: Int -> N #

fromEnum :: N -> Int #

enumFrom :: N -> [N] #

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

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

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

Ix N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

range :: (N, N) -> [N] #

index :: (N, N) -> N -> Int #

unsafeIndex :: (N, N) -> N -> Int #

inRange :: (N, N) -> N -> Bool #

rangeSize :: (N, N) -> Int #

unsafeRangeSize :: (N, N) -> Int #

Num N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

(+) :: N -> N -> N #

(-) :: N -> N -> N #

(*) :: N -> N -> N #

negate :: N -> N #

abs :: N -> N #

signum :: N -> N #

fromInteger :: Integer -> N #

Integral N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

quot :: N -> N -> N #

rem :: N -> N -> N #

div :: N -> N -> N #

mod :: N -> N -> N #

quotRem :: N -> N -> (N, N) #

divMod :: N -> N -> (N, N) #

toInteger :: N -> Integer #

Real N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

toRational :: N -> Rational #

Show N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

showsPrec :: Int -> N -> ShowS #

show :: N -> String #

showList :: [N] -> ShowS #

NFData N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

rnf :: N -> () #

Eq N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

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

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

Ord N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

compare :: N -> N -> Ordering #

(<) :: N -> N -> Bool #

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

(>) :: N -> N -> Bool #

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

max :: N -> N -> N #

min :: N -> N -> N #

Transposable N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

transpose :: N -> N Source #

Validable N Source # 
Instance details

Defined in OAlg.Data.Validable

Methods

valid :: N -> Statement Source #

XStandard N Source # 
Instance details

Defined in OAlg.Data.Validable

Methods

xStandard :: X N Source #

Entity N Source # 
Instance details

Defined in OAlg.Entity.Definition

Additive N Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root N -> N Source #

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

ntimes :: N -> N -> N Source #

XStandardAdd N Source # 
Instance details

Defined in OAlg.Structure.Additive.Proposition

Algebraic N Source # 
Instance details

Defined in OAlg.Structure.Algebraic.Definition

Distributive N Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

TransposableDistributive N Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

XStandardDst N Source # 
Instance details

Defined in OAlg.Structure.Distributive.Proposition

Fibred N Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Associated Types

type Root N Source #

Methods

root :: N -> Root N Source #

FibredOriented N Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Commutative N Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Invertible N Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Multiplicative N Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Methods

one :: Point N -> N Source #

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

npower :: N -> N -> N Source #

TransposableMultiplicative N Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

XStandardMlt N Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Proposition

Integral N Source # 
Instance details

Defined in OAlg.Structure.Number.Definition

Methods

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

div :: N -> N -> N Source #

mod :: N -> N -> N Source #

Number N Source # 
Instance details

Defined in OAlg.Structure.Number.Definition

EntityPoint N Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

OrdPoint N Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Oriented N Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Associated Types

type Point N Source #

Total N Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

TransposableOriented N Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

XStandardPoint N Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Euclidean N Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Methods

(<!>) :: N -> N -> Scalar N Source #

Vectorial N Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Associated Types

type Scalar N Source #

Methods

(!) :: Scalar N -> N -> N Source #

Embeddable N Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: N -> Q Source #

Embeddable N Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: N -> Z Source #

Embeddable N Integer Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: N -> Integer Source #

Projectible N Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Q -> N Source #

Projectible N Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Z -> N Source #

Projectible N Integer Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Integer -> N Source #

Measurable N Z Source # 
Instance details

Defined in OAlg.Structure.Number.Definition

Methods

dist :: N -> N -> Z Source #

Entity x => ConstructableSequence ProductSymbol N x Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Sequence ProductSymbol N x Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

graph :: p N -> ProductSymbol x -> Graph N x Source #

list :: p N -> ProductSymbol x -> [(x, N)] Source #

(??) :: ProductSymbol x -> N -> Maybe x Source #

Entity x => PermutableSequence CSequence N x Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Methods

permuteBy :: p N -> (w -> w -> Ordering) -> (x -> w) -> CSequence x -> (CSequence x, Permutation N) Source #

Entity x => PermutableSequence [] N x Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Methods

permuteBy :: p N -> (w -> w -> Ordering) -> (x -> w) -> [x] -> ([x], Permutation N) Source #

Foldable (Product N) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

fold :: Monoid m => Product N m -> m #

foldMap :: Monoid m => (a -> m) -> Product N a -> m #

foldMap' :: Monoid m => (a -> m) -> Product N a -> m #

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

foldr' :: (a -> b -> b) -> b -> Product N a -> b #

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

foldl' :: (b -> a -> b) -> b -> Product N a -> b #

foldr1 :: (a -> a -> a) -> Product N a -> a #

foldl1 :: (a -> a -> a) -> Product N a -> a #

toList :: Product N a -> [a] #

null :: Product N a -> Bool #

length :: Product N a -> Int #

elem :: Eq a => a -> Product N a -> Bool #

maximum :: Ord a => Product N a -> a #

minimum :: Ord a => Product N a -> a #

sum :: Num a => Product N a -> a #

product :: Num a => Product N a -> a #

Foldable (ProductForm N) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

fold :: Monoid m => ProductForm N m -> m #

foldMap :: Monoid m => (a -> m) -> ProductForm N a -> m #

foldMap' :: Monoid m => (a -> m) -> ProductForm N a -> m #

foldr :: (a -> b -> b) -> b -> ProductForm N a -> b #

foldr' :: (a -> b -> b) -> b -> ProductForm N a -> b #

foldl :: (b -> a -> b) -> b -> ProductForm N a -> b #

foldl' :: (b -> a -> b) -> b -> ProductForm N a -> b #

foldr1 :: (a -> a -> a) -> ProductForm N a -> a #

foldl1 :: (a -> a -> a) -> ProductForm N a -> a #

toList :: ProductForm N a -> [a] #

null :: ProductForm N a -> Bool #

length :: ProductForm N a -> Int #

elem :: Eq a => a -> ProductForm N a -> Bool #

maximum :: Ord a => ProductForm N a -> a #

minimum :: Ord a => ProductForm N a -> a #

sum :: Num a => ProductForm N a -> a #

product :: Num a => ProductForm N a -> a #

Foldable (SumForm N) Source # 
Instance details

Defined in OAlg.Entity.Sum.Definition

Methods

fold :: Monoid m => SumForm N m -> m #

foldMap :: Monoid m => (a -> m) -> SumForm N a -> m #

foldMap' :: Monoid m => (a -> m) -> SumForm N a -> m #

foldr :: (a -> b -> b) -> b -> SumForm N a -> b #

foldr' :: (a -> b -> b) -> b -> SumForm N a -> b #

foldl :: (b -> a -> b) -> b -> SumForm N a -> b #

foldl' :: (b -> a -> b) -> b -> SumForm N a -> b #

foldr1 :: (a -> a -> a) -> SumForm N a -> a #

foldl1 :: (a -> a -> a) -> SumForm N a -> a #

toList :: SumForm N a -> [a] #

null :: SumForm N a -> Bool #

length :: SumForm N a -> Int #

elem :: Eq a => a -> SumForm N a -> Bool #

maximum :: Ord a => SumForm N a -> a #

minimum :: Ord a => SumForm N a -> a #

sum :: Num a => SumForm N a -> a #

product :: Num a => SumForm N a -> a #

Sequence (Dim x) N p Source # 
Instance details

Defined in OAlg.Entity.Matrix.Dim

Methods

graph :: p0 N -> Dim x p -> Graph N p Source #

list :: p0 N -> Dim x p -> [(p, N)] Source #

(??) :: Dim x p -> N -> Maybe p Source #

Sequence (Product N) N a Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

graph :: p N -> Product N a -> Graph N a Source #

list :: p N -> Product N a -> [(a, N)] Source #

(??) :: Product N a -> N -> Maybe a Source #

Sequence (ProductForm N) N x Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

graph :: p N -> ProductForm N x -> Graph N x Source #

list :: p N -> ProductForm N x -> [(x, N)] Source #

(??) :: ProductForm N x -> N -> Maybe x Source #

(Oriented x, Entity p) => PermutableSequence (Dim x) N p Source # 
Instance details

Defined in OAlg.Entity.Matrix.Dim

Methods

permuteBy :: p0 N -> (w -> w -> Ordering) -> (p -> w) -> Dim x p -> (Dim x p, Permutation N) Source #

Entity x => Opr (Permutation N) (CSequence x) Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Opr (Permutation N) [x] Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Methods

(<*) :: [x] -> Permutation N -> [x] Source #

Entity x => TotalOpr (Permutation N) (CSequence x) Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Entity x => TotalOpr (Permutation N) [x] Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Embeddable (GLT x) (ProductForm N (Transformation x)) Source # 
Instance details

Defined in OAlg.Entity.Matrix.GeneralLinearGroup

Embeddable [x] (PSequence N x) Source # 
Instance details

Defined in OAlg.Entity.Sequence.PSequence

Methods

inj :: [x] -> PSequence N x Source #

Oriented a => Projectible (Path a) (Product N a) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

prj :: Product N a -> Path a Source #

Oriented a => Projectible (Path a) (ProductForm N a) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

prj :: ProductForm N a -> Path a Source #

Projectible [x] (PSequence N x) Source # 
Instance details

Defined in OAlg.Entity.Sequence.PSequence

Methods

prj :: PSequence N x -> [x] Source #

Entity p => Opr (Permutation N) (Dim x p) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Dim

Methods

(<*) :: Dim x p -> Permutation N -> Dim x p Source #

(Oriented x, Entity p) => TotalOpr (Permutation N) (Dim x p) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Dim

LengthN (Product N a) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

lengthN :: Product N a -> N Source #

LengthN (ProductForm N a) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

lengthN :: ProductForm N a -> N Source #

LengthN (SumForm N a) Source # 
Instance details

Defined in OAlg.Entity.Sum.Definition

Methods

lengthN :: SumForm N a -> N Source #

Integral r => Embeddable (ProductForm N a) (ProductForm r a) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

inj :: ProductForm N a -> ProductForm r a Source #

Integral r => Projectible (ProductForm N a) (ProductForm r a) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

prj :: ProductForm r a -> ProductForm N a Source #

type Root N Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

type Root N = Orientation ()
type Point N Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

type Point N = ()
type Scalar N Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

type Scalar N = N

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

a >- b = a - b if b <= a, otherwise a Undefined SubtrahendToBig exception will be thrown.

class LengthN x where Source #

types admitting a length.

Methods

lengthN :: x -> N Source #

Instances

Instances details
LengthN N' Source # 
Instance details

Defined in OAlg.Entity.Natural

Methods

lengthN :: N' -> N Source #

LengthN W' Source # 
Instance details

Defined in OAlg.Entity.Natural

Methods

lengthN :: W' -> N Source #

LengthN (W n) Source # 
Instance details

Defined in OAlg.Entity.Natural

Methods

lengthN :: W n -> N Source #

LengthN (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

lengthN :: ProductSymbol x -> N Source #

LengthN (Permutation i) Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Methods

lengthN :: Permutation i -> N Source #

LengthN (PermutationForm i) Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

LengthN (Set x) Source # 
Instance details

Defined in OAlg.Entity.Sequence.Set

Methods

lengthN :: Set x -> N Source #

LengthN (Path q) Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Methods

lengthN :: Path q -> N Source #

LengthN [x] Source # 
Instance details

Defined in OAlg.Data.Number

Methods

lengthN :: [x] -> N Source #

LengthN (Dim x p) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Dim

Methods

lengthN :: Dim x p -> N Source #

LengthN (Col i x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Entries

Methods

lengthN :: Col i x -> N Source #

LengthN (Row j x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Entries

Methods

lengthN :: Row j x -> N Source #

LengthN (Product N a) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

lengthN :: Product N a -> N Source #

LengthN (ProductForm N a) Source # 
Instance details

Defined in OAlg.Entity.Product.Definition

Methods

lengthN :: ProductForm N a -> N Source #

LengthN (Graph i x) Source # 
Instance details

Defined in OAlg.Entity.Sequence.Graph

Methods

lengthN :: Graph i x -> N Source #

LengthN (PSequence i x) Source # 
Instance details

Defined in OAlg.Entity.Sequence.PSequence

Methods

lengthN :: PSequence i x -> N Source #

LengthN (SumForm N a) Source # 
Instance details

Defined in OAlg.Entity.Sum.Definition

Methods

lengthN :: SumForm N a -> N Source #

LengthN (Entries i j x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Entries

Methods

lengthN :: Entries i j x -> N Source #

takeN :: N -> [a] -> [a] Source #

takes the first n elements of the list.

splitAtN :: N -> [x] -> ([x], [x]) Source #

splits a list in left and right part according to the given number.

Integers

data Z Source #

integers ..-1, 0, 1, 2.. .

Instances

Instances details
Enum Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

succ :: Z -> Z #

pred :: Z -> Z #

toEnum :: Int -> Z #

fromEnum :: Z -> Int #

enumFrom :: Z -> [Z] #

enumFromThen :: Z -> Z -> [Z] #

enumFromTo :: Z -> Z -> [Z] #

enumFromThenTo :: Z -> Z -> Z -> [Z] #

Ix Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

range :: (Z, Z) -> [Z] #

index :: (Z, Z) -> Z -> Int #

unsafeIndex :: (Z, Z) -> Z -> Int #

inRange :: (Z, Z) -> Z -> Bool #

rangeSize :: (Z, Z) -> Int #

unsafeRangeSize :: (Z, Z) -> Int #

Num Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

(+) :: Z -> Z -> Z #

(-) :: Z -> Z -> Z #

(*) :: Z -> Z -> Z #

negate :: Z -> Z #

abs :: Z -> Z #

signum :: Z -> Z #

fromInteger :: Integer -> Z #

Integral Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

quot :: Z -> Z -> Z #

rem :: Z -> Z -> Z #

div :: Z -> Z -> Z #

mod :: Z -> Z -> Z #

quotRem :: Z -> Z -> (Z, Z) #

divMod :: Z -> Z -> (Z, Z) #

toInteger :: Z -> Integer #

Real Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

toRational :: Z -> Rational #

Show Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

showsPrec :: Int -> Z -> ShowS #

show :: Z -> String #

showList :: [Z] -> ShowS #

NFData Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

rnf :: Z -> () #

Eq Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

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

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

Ord Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

compare :: Z -> Z -> Ordering #

(<) :: Z -> Z -> Bool #

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

(>) :: Z -> Z -> Bool #

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

max :: Z -> Z -> Z #

min :: Z -> Z -> Z #

Transposable Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

transpose :: Z -> Z Source #

Validable Z Source # 
Instance details

Defined in OAlg.Data.Validable

Methods

valid :: Z -> Statement Source #

XStandard Z Source # 
Instance details

Defined in OAlg.Data.Validable

Methods

xStandard :: X Z Source #

Entity Z Source # 
Instance details

Defined in OAlg.Entity.Definition

XStandardOrientationMatrix Z Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Abelian Z Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

negate :: Z -> Z Source #

(-) :: Z -> Z -> Z Source #

ztimes :: Z -> Z -> Z Source #

Additive Z Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root Z -> Z Source #

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

ntimes :: N -> Z -> Z Source #

XStandardAdd Z Source # 
Instance details

Defined in OAlg.Structure.Additive.Proposition

Algebraic Z Source # 
Instance details

Defined in OAlg.Structure.Algebraic.Definition

Distributive Z Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

TransposableDistributive Z Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

XStandardDst Z Source # 
Instance details

Defined in OAlg.Structure.Distributive.Proposition

Fibred Z Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Associated Types

type Root Z Source #

Methods

root :: Z -> Root Z Source #

FibredOriented Z Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Commutative Z Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Invertible Z Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Multiplicative Z Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Methods

one :: Point Z -> Z Source #

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

npower :: Z -> N -> Z Source #

TransposableMultiplicative Z Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

XStandardMlt Z Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Proposition

Integral Z Source # 
Instance details

Defined in OAlg.Structure.Number.Definition

Methods

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

div :: Z -> Z -> Z Source #

mod :: Z -> Z -> Z Source #

Number Z Source # 
Instance details

Defined in OAlg.Structure.Number.Definition

EntityPoint Z Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

OrdPoint Z Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Oriented Z Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Associated Types

type Point Z Source #

Total Z Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

TransposableOriented Z Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

XStandardOrtOrientation Z Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

XStandardPoint Z Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Euclidean Z Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Methods

(<!>) :: Z -> Z -> Scalar Z Source #

Vectorial Z Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Associated Types

type Scalar Z Source #

Methods

(!) :: Scalar Z -> Z -> Z Source #

Embeddable N Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: N -> Z Source #

Embeddable Z Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: Z -> Q Source #

Embeddable Integer Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: Integer -> Z Source #

Embeddable Int Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: Int -> Z Source #

Projectible N Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Z -> N Source #

Projectible Z Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Q -> Z Source #

Projectible Integer Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Z -> Integer Source #

Projectible Int Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Z -> Int Source #

Measurable N Z Source # 
Instance details

Defined in OAlg.Structure.Number.Definition

Methods

dist :: N -> N -> Z Source #

XStandardOrtSite 'From (Matrix Z) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

XStandardOrtSite 'To (Matrix Z) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

XStandardOrtSiteFrom (Matrix Z) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

XStandardPoint (Matrix Z) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

type Root Z Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

type Root Z = Orientation ()
type Point Z Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

type Point Z = ()
type Scalar Z Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

type Scalar Z = Z

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.

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

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

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

Instances

Instances details
Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Ix Integer

Since: base-2.1

Instance details

Defined in GHC.Ix

Num Integer

Since: base-2.1

Instance details

Defined in GHC.Num

Read Integer

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Real Integer

Since: base-2.0.1

Instance details

Defined in GHC.Real

Show Integer

Since: base-2.1

Instance details

Defined in GHC.Show

NFData Integer 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Integer -> () #

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Methods

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

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

Ord Integer 
Instance details

Defined in GHC.Num.Integer

Verbose Integer Source # 
Instance details

Defined in OAlg.Control.Verbose

Validable Integer Source # 
Instance details

Defined in OAlg.Data.Validable

Entity Integer Source # 
Instance details

Defined in OAlg.Entity.Definition

Abelian Integer Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Additive Integer Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Algebraic Integer Source # 
Instance details

Defined in OAlg.Structure.Algebraic.Definition

Distributive Integer Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

Fibred Integer Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Associated Types

type Root Integer Source #

FibredOriented Integer Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Commutative Integer Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Invertible Integer Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Multiplicative Integer Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Number Integer Source # 
Instance details

Defined in OAlg.Structure.Number.Definition

EntityPoint Integer Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

OrdPoint Integer Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Oriented Integer Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Associated Types

type Point Integer Source #

Total Integer Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Vectorial Integer Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Associated Types

type Scalar Integer Source #

Random Integer

Note - random generates values in the Int range

Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Integer, Integer) -> g -> (Integer, g) #

random :: RandomGen g => g -> (Integer, g) #

randomRs :: RandomGen g => (Integer, Integer) -> g -> [Integer] #

randoms :: RandomGen g => g -> [Integer] #

UniformRange Integer 
Instance details

Defined in System.Random.Internal

Methods

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

Embeddable N Integer Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: N -> Integer Source #

Embeddable Integer Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: Integer -> Z Source #

Projectible N Integer Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Integer -> N Source #

Projectible Integer Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Z -> Integer Source #

Lift Integer 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Validable (Ratio Integer) Source # 
Instance details

Defined in OAlg.Data.Validable

type Root Integer Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

type Point Integer Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

type Point Integer = ()
type Scalar Integer Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

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

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 #

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 #

Read Int

Since: base-2.1

Instance details

Defined in GHC.Read

Integral Int

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

quot :: Int -> Int -> Int #

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 #

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 #

NFData Int 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int -> () #

Eq Int 
Instance details

Defined in GHC.Classes

Methods

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

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

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 #

Verbose Int Source # 
Instance details

Defined in OAlg.Control.Verbose

Methods

vshow :: Verbosity -> Int -> String Source #

Validable Int Source # 
Instance details

Defined in OAlg.Data.Validable

Methods

valid :: Int -> Statement Source #

Entity Int Source # 
Instance details

Defined in OAlg.Entity.Definition

Abelian Int Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

negate :: Int -> Int Source #

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

ztimes :: Z -> Int -> Int Source #

Additive Int Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root Int -> Int Source #

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

ntimes :: N -> Int -> Int Source #

Algebraic Int Source # 
Instance details

Defined in OAlg.Structure.Algebraic.Definition

Distributive Int Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

Fibred Int Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Associated Types

type Root Int Source #

Methods

root :: Int -> Root Int Source #

FibredOriented Int Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Commutative Int Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Invertible Int Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Multiplicative Int Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Methods

one :: Point Int -> Int Source #

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

npower :: Int -> N -> Int Source #

EntityPoint Int Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

OrdPoint Int Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Oriented Int Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Associated Types

type Point Int Source #

Total Int Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Vectorial Int Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Associated Types

type Scalar Int Source #

Methods

(!) :: Scalar Int -> Int -> Int Source #

Random Int 
Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Int, Int) -> g -> (Int, g) #

random :: RandomGen g => g -> (Int, g) #

randomRs :: RandomGen g => (Int, Int) -> g -> [Int] #

randoms :: RandomGen g => g -> [Int] #

Uniform Int 
Instance details

Defined in System.Random.Internal

Methods

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

UniformRange Int 
Instance details

Defined in System.Random.Internal

Methods

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

Embeddable Int Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: Int -> Z Source #

Projectible Int Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Z -> Int Source #

Lift Int 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

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

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

Generic1 (URec Int :: k -> Type) 
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 LiftedRep -> 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) #

Functor (URec Int :: TYPE LiftedRep -> 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 #

Generic (URec Int p) 
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 #

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 #

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 #

type Root Int Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

type Root Int = Orientation ()
type Point Int Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

type Point Int = ()
type Scalar Int Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

type Scalar Int = Int
data URec Int (p :: k)

Used for marking occurrences of Int#

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

data URec Int (p :: k) = UInt {}
type Rep1 (URec Int :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

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

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

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

modInt :: Int -> Int -> Int Source #

modulo for Int.

divInt :: Int -> Int -> Int Source #

division for Int

Rationals

data Q Source #

rational numbers q = z%n with numerator q == z and denominator q == n.

Instances

Instances details
Enum Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

succ :: Q -> Q #

pred :: Q -> Q #

toEnum :: Int -> Q #

fromEnum :: Q -> Int #

enumFrom :: Q -> [Q] #

enumFromThen :: Q -> Q -> [Q] #

enumFromTo :: Q -> Q -> [Q] #

enumFromThenTo :: Q -> Q -> Q -> [Q] #

Num Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

(+) :: Q -> Q -> Q #

(-) :: Q -> Q -> Q #

(*) :: Q -> Q -> Q #

negate :: Q -> Q #

abs :: Q -> Q #

signum :: Q -> Q #

fromInteger :: Integer -> Q #

Fractional Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

(/) :: Q -> Q -> Q #

recip :: Q -> Q #

fromRational :: Rational -> Q #

Real Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

toRational :: Q -> Rational #

RealFrac Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

properFraction :: Integral b => Q -> (b, Q) #

truncate :: Integral b => Q -> b #

round :: Integral b => Q -> b #

ceiling :: Integral b => Q -> b #

floor :: Integral b => Q -> b #

Show Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

showsPrec :: Int -> Q -> ShowS #

show :: Q -> String #

showList :: [Q] -> ShowS #

NFData Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

rnf :: Q -> () #

Eq Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

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

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

Ord Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

compare :: Q -> Q -> Ordering #

(<) :: Q -> Q -> Bool #

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

(>) :: Q -> Q -> Bool #

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

max :: Q -> Q -> Q #

min :: Q -> Q -> Q #

Transposable Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

transpose :: Q -> Q Source #

Validable Q Source # 
Instance details

Defined in OAlg.Data.Validable

Methods

valid :: Q -> Statement Source #

XStandard Q Source # 
Instance details

Defined in OAlg.Data.Validable

Methods

xStandard :: X Q Source #

Entity Q Source # 
Instance details

Defined in OAlg.Entity.Definition

Abelian Q Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

negate :: Q -> Q Source #

(-) :: Q -> Q -> Q Source #

ztimes :: Z -> Q -> Q Source #

Additive Q Source # 
Instance details

Defined in OAlg.Structure.Additive.Definition

Methods

zero :: Root Q -> Q Source #

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

ntimes :: N -> Q -> Q Source #

XStandardAdd Q Source # 
Instance details

Defined in OAlg.Structure.Additive.Proposition

Algebraic Q Source # 
Instance details

Defined in OAlg.Structure.Algebraic.Definition

Distributive Q Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

TransposableDistributive Q Source # 
Instance details

Defined in OAlg.Structure.Distributive.Definition

XStandardDst Q Source # 
Instance details

Defined in OAlg.Structure.Distributive.Proposition

Fibred Q Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Associated Types

type Root Q Source #

Methods

root :: Q -> Root Q Source #

FibredOriented Q Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

Commutative Q Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Invertible Q Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Multiplicative Q Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

Methods

one :: Point Q -> Q Source #

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

npower :: Q -> N -> Q Source #

TransposableMultiplicative Q Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Definition

XStandardMlt Q Source # 
Instance details

Defined in OAlg.Structure.Multiplicative.Proposition

Acyclic Q Source # 
Instance details

Defined in OAlg.Structure.Number.Definition

Methods

qtimes :: Q -> Q -> Q Source #

Number Q Source # 
Instance details

Defined in OAlg.Structure.Number.Definition

EntityPoint Q Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

OrdPoint Q Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Oriented Q Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Associated Types

type Point Q Source #

Total Q Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

TransposableOriented Q Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

XStandardPoint Q Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

Field Q Source # 
Instance details

Defined in OAlg.Structure.Ring.Definition

Methods

(/) :: Q -> Q -> Q Source #

Euclidean Q Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Methods

(<!>) :: Q -> Q -> Scalar Q Source #

Vectorial Q Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

Associated Types

type Scalar Q Source #

Methods

(!) :: Scalar Q -> Q -> Q Source #

Embeddable N Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: N -> Q Source #

Embeddable Z Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

inj :: Z -> Q Source #

Projectible N Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Q -> N Source #

Projectible Z Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

prj :: Q -> Z Source #

type Root Q Source # 
Instance details

Defined in OAlg.Structure.Fibred.Definition

type Root Q = Orientation ()
type Point Q Source # 
Instance details

Defined in OAlg.Structure.Oriented.Definition

type Point Q = ()
type Scalar Q Source # 
Instance details

Defined in OAlg.Structure.Vectorial.Definition

type Scalar Q = Q

(%) :: Z -> N -> Q infix 7 Source #

Forms the ratio of two integral numbers.

numerator :: Q -> Z Source #

numerator of a rational.

Example

>>> denominator (3/2)
3

denominator :: Q -> N Source #

denominator of a rational.

Example

>>> denominator (3/2)
2

Enum

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 CBool 
Instance details

Defined in Foreign.C.Types

Enum CChar 
Instance details

Defined in Foreign.C.Types

Enum CClock 
Instance details

Defined in Foreign.C.Types

Enum CDouble 
Instance details

Defined in Foreign.C.Types

Enum CFloat 
Instance details

Defined in Foreign.C.Types

Enum CInt 
Instance details

Defined in Foreign.C.Types

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 CIntMax 
Instance details

Defined in Foreign.C.Types

Enum CIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CLLong 
Instance details

Defined in Foreign.C.Types

Enum CLong 
Instance details

Defined in Foreign.C.Types

Enum CPtrdiff 
Instance details

Defined in Foreign.C.Types

Enum CSChar 
Instance details

Defined in Foreign.C.Types

Enum CSUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CShort 
Instance details

Defined in Foreign.C.Types

Enum CSigAtomic 
Instance details

Defined in Foreign.C.Types

Enum CSize 
Instance details

Defined in Foreign.C.Types

Enum CTime 
Instance details

Defined in Foreign.C.Types

Enum CUChar 
Instance details

Defined in Foreign.C.Types

Enum CUInt 
Instance details

Defined in Foreign.C.Types

Enum CUIntMax 
Instance details

Defined in Foreign.C.Types

Enum CUIntPtr 
Instance details

Defined in Foreign.C.Types

Enum CULLong 
Instance details

Defined in Foreign.C.Types

Enum CULong 
Instance details

Defined in Foreign.C.Types

Enum CUSeconds 
Instance details

Defined in Foreign.C.Types

Enum CUShort 
Instance details

Defined in Foreign.C.Types

Enum CWchar 
Instance details

Defined in Foreign.C.Types

Enum Associativity

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum DecidedStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceStrictness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SourceUnpackedness

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Enum SeekMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.Device

Enum IOMode

Since: base-4.2.0.0

Instance details

Defined in GHC.IO.IOMode

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

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 GeneralCategory

Since: base-2.1

Instance details

Defined in GHC.Unicode

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Extension 
Instance details

Defined in GHC.LanguageExtensions.Type

Enum Ordering

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Stochastic Source # 
Instance details

Defined in OAlg.Control.Validate

Enum Verbosity Source # 
Instance details

Defined in OAlg.Control.Verbose

Enum Direction Source # 
Instance details

Defined in OAlg.Data.Dualisable

Enum Side Source # 
Instance details

Defined in OAlg.Data.Dualisable

Methods

succ :: Side -> Side #

pred :: Side -> Side #

toEnum :: Int -> Side #

fromEnum :: Side -> Int #

enumFrom :: Side -> [Side] #

enumFromThen :: Side -> Side -> [Side] #

enumFromTo :: Side -> Side -> [Side] #

enumFromThenTo :: Side -> Side -> Side -> [Side] #

Enum Site Source # 
Instance details

Defined in OAlg.Data.Dualisable

Methods

succ :: Site -> Site #

pred :: Site -> Site #

toEnum :: Int -> Site #

fromEnum :: Site -> Int #

enumFrom :: Site -> [Site] #

enumFromThen :: Site -> Site -> [Site] #

enumFromTo :: Site -> Site -> [Site] #

enumFromThenTo :: Site -> Site -> Site -> [Site] #

Enum N Source # 
Instance details

Defined in OAlg.Data.Number

Methods

succ :: N -> N #

pred :: N -> N #

toEnum :: Int -> N #

fromEnum :: N -> Int #

enumFrom :: N -> [N] #

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

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

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

Enum Q Source # 
Instance details

Defined in OAlg.Data.Number

Methods

succ :: Q -> Q #

pred :: Q -> Q #

toEnum :: Int -> Q #

fromEnum :: Q -> Int #

enumFrom :: Q -> [Q] #

enumFromThen :: Q -> Q -> [Q] #

enumFromTo :: Q -> Q -> [Q] #

enumFromThenTo :: Q -> Q -> Q -> [Q] #

Enum Z Source # 
Instance details

Defined in OAlg.Data.Number

Methods

succ :: Z -> Z #

pred :: Z -> Z #

toEnum :: Int -> Z #

fromEnum :: Z -> Int #

enumFrom :: Z -> [Z] #

enumFromThen :: Z -> Z -> [Z] #

enumFromTo :: Z -> Z -> [Z] #

enumFromThenTo :: Z -> Z -> Z -> [Z] #

Enum RdcState Source # 
Instance details

Defined in OAlg.Data.Reducible

Enum Valid Source # 
Instance details

Defined in OAlg.Data.Statement.Definition

Enum Symbol Source # 
Instance details

Defined in OAlg.Data.Symbol

Enum N' Source # 
Instance details

Defined in OAlg.Entity.Natural

Methods

succ :: N' -> N' #

pred :: N' -> N' #

toEnum :: Int -> N' #

fromEnum :: N' -> Int #

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

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

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

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

Enum W' Source # 
Instance details

Defined in OAlg.Entity.Natural

Methods

succ :: W' -> W' #

pred :: W' -> W' #

toEnum :: Int -> W' #

fromEnum :: W' -> Int #

enumFrom :: W' -> [W'] #

enumFromThen :: W' -> W' -> [W'] #

enumFromTo :: W' -> W' -> [W'] #

enumFromThenTo :: W' -> W' -> W' -> [W'] #

Enum Perspective Source # 
Instance details

Defined in OAlg.Limes.Perspective

Enum Day 
Instance details

Defined in Data.Time.Calendar.Days

Methods

succ :: Day -> Day #

pred :: Day -> Day #

toEnum :: Int -> Day #

fromEnum :: Day -> Int #

enumFrom :: Day -> [Day] #

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

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

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

Enum DayOfWeek

"Circular", so for example [Tuesday ..] gives an endless sequence. Also: fromEnum gives [1 .. 7] for [Monday .. Sunday], and toEnum performs mod 7 to give a cycle of days.

Instance details

Defined in Data.Time.Calendar.Week

Enum DiffTime 
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Enum NominalDiffTime 
Instance details

Defined in Data.Time.Clock.Internal.NominalDiffTime

Enum Integer

Since: base-2.1

Instance details

Defined in GHC.Enum

Enum Natural

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Enum ()

Since: base-2.1

Instance details

Defined in GHC.Enum

Methods

succ :: () -> () #

pred :: () -> () #

toEnum :: Int -> () #

fromEnum :: () -> Int #

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

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

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

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

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 Levity

Since: base-4.16.0.0

Instance details

Defined in GHC.Enum

Enum VecCount

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum VecElem

Since: base-4.10.0.0

Instance details

Defined in GHC.Enum

Enum Word

Since: base-2.1

Instance details

Defined in GHC.Enum

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 a => Enum (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

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

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Integral a => Enum (Ratio a)

Since: base-2.0.1

Instance details

Defined in GHC.Real

Methods

succ :: Ratio a -> Ratio a #

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 x => Enum (Id x) Source # 
Instance details

Defined in OAlg.Data.Identity

Methods

succ :: Id x -> Id x #

pred :: Id x -> Id x #

toEnum :: Int -> Id x #

fromEnum :: Id x -> Int #

enumFrom :: Id x -> [Id x] #

enumFromThen :: Id x -> Id x -> [Id x] #

enumFromTo :: Id x -> Id x -> [Id x] #

enumFromThenTo :: Id x -> Id x -> Id x -> [Id x] #

Enum a => Enum (a) 
Instance details

Defined in GHC.Enum

Methods

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

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

toEnum :: Int -> (a) #

fromEnum :: (a) -> Int #

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

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

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

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

Enum (Fixed a)

Recall that, for numeric types, succ and pred typically add and subtract 1, respectively. This is not true in the case of Fixed, whose successor and predecessor functions intuitively return the "next" and "previous" values in the enumeration. The results of these functions thus depend on the resolution of the Fixed value. For example, when enumerating values of resolution 10^-3 of type Milli = Fixed E3,

  succ (0.000 :: Milli) == 1.001

and likewise

  pred (0.000 :: Milli) == -0.001

In other words, succ and pred increment and decrement a fixed-precision value by the least amount such that the value's resolution is unchanged. For example, 10^-12 is the smallest (positive) amount that can be added to a value of type Pico = Fixed E12 without changing its resolution, and so

  succ (0.000000000000 :: Pico) == 0.000000000001

and similarly

  pred (0.000000000000 :: Pico) == -0.000000000001

This is worth bearing in mind when defining Fixed arithmetic sequences. In particular, you may be forgiven for thinking the sequence

  [1..10] :: [Pico]

evaluates to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] :: [Pico].

However, this is not true. On the contrary, similarly to the above implementations of succ and pred, enumFromTo :: Pico -> Pico -> [Pico] has a "step size" of 10^-12. Hence, the list [1..10] :: [Pico] has the form

  [1.000000000000, 1.00000000001, 1.00000000002, ..., 10.000000000000]

and contains 9 * 10^12 + 1 values.

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

succ :: Fixed a -> Fixed a #

pred :: Fixed a -> Fixed a #

toEnum :: Int -> Fixed a #

fromEnum :: Fixed a -> Int #

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

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

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

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

Enum (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

succ :: Proxy s -> Proxy s #

pred :: Proxy s -> Proxy s #

toEnum :: Int -> Proxy s #

fromEnum :: Proxy s -> Int #

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

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

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

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

Enum a => Enum (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

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

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

toEnum :: Int -> Const a b #

fromEnum :: Const a b -> Int #

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

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

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

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

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

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

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

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

toEnum :: Int -> Ap f a #

fromEnum :: Ap f a -> Int #

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

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

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

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

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

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

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

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

toEnum :: Int -> Alt f a #

fromEnum :: Alt f a -> Int #

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

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

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

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

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

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

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

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

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

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

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

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

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

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

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

Since: base-4.10.0.0

Instance details

Defined in Data.Type.Equality

Methods

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

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

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

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

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

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

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

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

enum :: (Ord i, Enum i) => i -> i -> [i] Source #

enumeration.

>>> enum 3 6 :: [N]
 [3,4,5,6]