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

Safe HaskellNone
LanguageHaskell98

Number.ResidueClass.Func

Synopsis

Documentation

newtype T a Source

Here a residue class is a representative and the modulus is an argument. You cannot show a value of type T, you can only show it with respect to a concrete modulus. Values cannot be compared, because the comparison result depends on the modulus.

Constructors

Cons (a -> a) 

Instances

Eq (T a) 
Integral a => Num (T a) 
Show (T a) 
C a => C (T a) 
C a => C (T a) 
C a => C (T a) 

concrete :: a -> T a -> a Source

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

lift0 :: (a -> a) -> T a Source

lift1 :: (a -> a -> a) -> T a -> T a Source

lift2 :: (a -> a -> a -> a) -> T a -> T a -> T a Source

zero :: C a => T a Source

one :: C a => T a Source

equal :: Eq a => a -> T a -> T a -> Bool Source

lift98_1 :: (T a -> T a -> T a) -> T a -> T a Source

lift98_2 :: (T a -> T a -> T a -> T a) -> T a -> T a -> T a Source