numeric-prelude-0.4.3: An experimental alternative hierarchy of numeric type classes

Safe HaskellNone
LanguageHaskell98

Number.ResidueClass.Reader

Synopsis

Documentation

newtype T a b Source #

T is a Reader monad but does not need functional dependencies like that from the Monad Transformer Library.

Constructors

Cons 

Fields

Instances

Monad (T a) Source # 

Methods

(>>=) :: T a a -> (a -> T a b) -> T a b #

(>>) :: T a a -> T a b -> T a b #

return :: a -> T a a #

fail :: String -> T a a #

Functor (T a) Source # 

Methods

fmap :: (a -> b) -> T a a -> T a b #

(<$) :: a -> T a b -> T a a #

Applicative (T a) Source # 

Methods

pure :: a -> T a a #

(<*>) :: T a (a -> b) -> T a a -> T a b #

liftA2 :: (a -> b -> c) -> T a a -> T a b -> T a c #

(*>) :: T a a -> T a b -> T a b #

(<*) :: T a a -> T a b -> T a a #

concrete :: a -> T a b -> b Source #

fromRepresentative :: C a => a -> T a a Source #

getZero :: C a => T a a Source #

getOne :: C a => T a a Source #

fromInteger :: C a => Integer -> T a a Source #

getAdd :: C a => T a (a -> a -> a) Source #

getSub :: C a => T a (a -> a -> a) Source #

getNeg :: C a => T a (a -> a) Source #

getAdditiveVars :: C a => T a (a, a -> a -> a, a -> a -> a, a -> a) Source #

getMul :: C a => T a (a -> a -> a) Source #

getRingVars :: C a => T a (a, a -> a -> a) Source #

getDivide :: C a => T a (a -> a -> a) Source #

getRecip :: C a => T a (a -> a) Source #

getFieldVars :: C a => T a (a -> a -> a, a -> a) Source #

monadExample :: C a => T a [a] Source #