 | NumericPrelude-0.0: An experimental alternative hierarchy of numeric type classes | Contents | Index |
|
| Number.ResidueClass.Check |
|
|
|
|
|
| Synopsis |
|
|
|
| Documentation |
|
| data T a |
| The best solution seems to let modulus be part of the type.
Then operations with non-matching moduli could be detected at compile time
and zero and one could be generated with the correct modulus.
An alternative trial can be found in module ResidueClassMaybe.
| | Constructors | | Cons | | | modulus :: !a | | | representative :: !a | |
|
| Instances | |
|
|
| factorPrec :: Int |
|
| (/:) :: C a => a -> a -> T a |
| r /: m is the residue class containing r with respect to the modulus m
|
|
| isCompatible :: Eq a => T a -> T a -> Bool |
| Check if two residue classes share the same modulus
|
|
| maybeCompatible :: Eq a => T a -> T a -> Maybe a |
|
| fromRepresentative :: C a => a -> a -> T a |
|
| lift1 :: Eq a => (a -> a -> a) -> T a -> T a |
|
| lift2 :: Eq a => (a -> a -> a -> a) -> T a -> T a -> T a |
|
| errIncompat :: a |
|
| zero :: C a => a -> T a |
|
| one :: C a => a -> T a |
|
| fromInteger :: C a => a -> Integer -> T a |
|
| Produced by Haddock version 0.7 |