Portability | non-portable (ScopedTypeVariables, MultiParamTypeClasses, DeriveDataTypeable, TemplateHaskell, BangPatterns) |
---|---|
Stability | provisional |
Maintainer | masahiro.sakai@gmail.com |
Safe Haskell | None |
- data PrimeField p
- toInteger :: PrimeField p -> Integer
- primeField :: Integer -> TypeQ
Documentation
data PrimeField p Source
Finite field of prime order p, Fp = Z/pZ.
NB: Primality of p
is assumed, but not checked.
Typeable1 PrimeField | |
Nat p => Bounded (PrimeField p) | |
Nat p => Enum (PrimeField p) | |
Eq (PrimeField p) | |
Nat p => Fractional (PrimeField p) | |
Nat p => Num (PrimeField p) | |
Ord (PrimeField p) | |
Nat p => Read (PrimeField p) | |
Show (PrimeField p) | |
NFData (PrimeField p) | |
Nat p => Hashable (PrimeField p) | |
Nat p => FiniteField (PrimeField p) |
toInteger :: PrimeField p -> IntegerSource
conversion to Integer
Template haskell utilities
Here is usage example for primeField:
a :: $(primeField 15485867) a = 1
primeField :: Integer -> TypeQSource
Create a PrimeField type