BNFC-2.7.0.0: A compiler front-end generator.

Safe HaskellNone
LanguageHaskell98

Algebra.RingUtils

Documentation

module Prelude

class AbelianGroup a where Source

Methods

zero :: a Source

(+) :: a -> a -> a infixl 6 Source

class AbelianGroupZ a => Ring a where Source

Methods

(*) :: a -> a -> a infixl 7 Source

Instances

class AbelianGroupZ a => RingP a where Source

Methods

mul :: Bool -> a -> a -> Pair a Source

data Pair a Source

Constructors

(:/:) infixl 2 

Fields

leftOf :: a
 
rightOf :: a
 

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

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

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

newtype O f g a Source

Constructors

O 

Fields

fromO :: f (g a)
 

Instances

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

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

mulDefault :: RingP a => a -> a -> a Source

module Data.Pair