BNFC-2.6.0.3: A compiler front-end generator.

Safe HaskellNone
LanguageHaskell98

Algebra.RingUtils

Documentation

module Prelude

class AbelianGroup a where

Methods

zero :: a

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

class AbelianGroup a => AbelianGroupZ a where

Methods

isZero :: a -> Bool

class AbelianGroupZ a => Ring a where

Methods

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

Instances

class AbelianGroupZ a => RingP a where

Methods

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

data Pair a

Constructors

(:/:) infixl 2 

Fields

leftOf :: a
 
rightOf :: a
 

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

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

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

newtype O f g a

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

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

module Data.Pair