BNFC-2.7.0.0: A compiler front-end generator.

Safe HaskellNone

Algebra.RingUtils

Documentation

class AbelianGroup a whereSource

Methods

zero :: aSource

(+) :: a -> a -> aSource

Instances

class AbelianGroup a => AbelianGroupZ a whereSource

Methods

isZero :: a -> BoolSource

Instances

class AbelianGroupZ a => Ring a whereSource

Methods

(*) :: a -> a -> aSource

Instances

Ring Int 

class AbelianGroupZ a => RingP a whereSource

Methods

mul :: Bool -> a -> a -> Pair aSource

data Pair a Source

Constructors

:/: 

Fields

leftOf :: a
 
rightOf :: a
 

Instances

Functor Pair 
Applicative Pair 
Show a => Show (Pair a) 
AbelianGroupZ a => AbelianGroupZ (Pair a) 
AbelianGroup a => AbelianGroup (Pair a) 
Matrix m => Matrix (O Pair m) 

select :: Bool -> [a] -> Pair [a]Source

onlyLeft :: [a] -> Pair [a]Source

onlyRight :: [a] -> Pair [a]Source

newtype O f g a Source

Constructors

O 

Fields

fromO :: f (g a)
 

Instances

(Functor f, Functor g) => Functor (O f g) 
Matrix m => Matrix (O Pair m) 
Show (f (g a)) => Show (O f g a) 
AbelianGroupZ (f (g a)) => AbelianGroupZ (O f g a) 
AbelianGroup (f (g a)) => AbelianGroup (O f g a) 

sum :: AbelianGroup a => [a] -> aSource

mulDefault :: RingP a => a -> a -> aSource

module Data.Pair