úÎ#)º(b     None&',.HUVXk(modular-arithmetic)A modular number with an unknown modulus. Conceptually SomeMod i = "n. i/n.modular-arithmetic;The modulus has to be a non-zero type-level natural number.modular-arithmetic7A synonym for Integer, also inspired by the !$/n syntax.modular-arithmeticA synonym for Mod., inspired by the !$/n syntax from mathematics.modular-arithmeticWraps an underlying  Integeral type i( in a newtype annotated with the bound n.modular-arithmetic:Extract the underlying integral value from a modular type.unMod (10 :: !$/4)2modular-arithmetic(Helper function to get the modulus of a !$/n* as a value. Used with type applications: modulus @55modular-arithmeticWInjects a value of the underlying type into the modulus type, wrapping as appropriate.If n' is ambiguous, you can specify it with TypeApplications: toMod @6 104 Note that n cannot be 0.modular-arithmeticConvert an integral number i into a $ value with the type-level modulus n! specified with a proxy argument.This lets you use  without TypeApplications in contexts where n is ambiguous.modular-arithmetic<Wraps an integral number, converting between integral types. modular-arithmeticThe modular inverse.inv 3 :: Maybe (!$/7)Just 5 3 * 5 :: !$/71"Note that only numbers coprime to n have an inverse modulo n:inv 6 :: Maybe (!$/15)Nothing modular-arithmeticConvert an integral number i into $ with the modulus given at runtime.That is, given i :: !$, someModVal i modulus is equivalent to i :: !$/modulus except we don't know modulus statically.someModVal 10 4Just (someModVal 2 4) Will return ! if the modulus is 0 or negative:someModVal 10 (-10)NothingsomeModVal 10 0Nothing modular-arithmeticDivision uses modular inverse  9 so it is only possible to divide by numbers coprime to n. 1 / 3 :: !$/75 3 * 5 :: !$/71 2 / 5 :: !$/76 5 * 6 :: !$/72,Dividing by a number that is not coprime to n will raise an error. Use  $ directly if you want to avoid this. 2 / 7 :: !$/7?*** Exception: Cannot invert 0 (mod 7): not coprime to modulus....modular-arithmetic(Shows both the number *and* its modulus:show (someModVal 10 4)"Just (someModVal 2 4)"This doesn't *quite* follow the rule that the show instance should be a Haskell expression that evaluates to the given value   returns a 8 but this seems like the closest we can reasonably get. modular-arithmeticUnderlying integer imodular-arithmeticModulus n         "modular-arithmetic-2.0.0.0-inplace Data.ModularSomeModModulusℤ/ModunModtoModmodValtoMod'inv someModVal $fShowMod$fFractionalMod $fRealMod $fBoundedMod $fEnumMod$fNumMod $fReadMod $fShowSomeMod$fEqMod$fOrdModmodulusbase GHC.MaybeNothingMaybe