-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Modular arithmetic via Numeric-Prelude -- -- Smart way of calculating long expressions in modular arithmetics. -- Watch examples at the end of a source code. Use NoImplicitPrelude -- language parameter with this module. @package Modulo @version 0.2.0.1 module Number.Modulo newtype Mod a Mod :: (a -> a) -> Mod a sq :: C a => a -> a -> a pow :: (Num a1, C a1, C a) => (t -> a -> a) -> (t -> t) -> t -> a1 -> a -- | Calculate x modulo n modulo :: Mod t -> t -> t (===) :: Eq a => t -> t -> (t -> a) -> Bool -- | Examples n :: Mod Integer ex1 :: Integer ex2 :: Bool instance (C a, C a, C a) => Num (Mod a) instance (C a, C a, C a, Eq a, C a) => C (Mod a) instance (C a, C a) => C (Mod a) instance (C a, C a) => C (Mod a) instance (C a, C a, C a) => C (Mod a) instance (C a, C a, Eq a) => C (Mod a) instance (Show a, Bounded a) => Show (Mod a) instance Bounded Integer