Copyright | (c) Masahiro Sakai 2013-2014 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Stability | provisional |
Portability | non-portable (ScopedTypeVariables, MultiParamTypeClasses, DeriveDataTypeable, TemplateHaskell, BangPatterns) |
Safe Haskell | None |
Language | Haskell2010 |
- 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.
KnownNat p => Bounded (PrimeField p) Source # | |
KnownNat p => Enum (PrimeField p) Source # | |
Eq (PrimeField p) Source # | |
KnownNat p => Fractional (PrimeField p) Source # | |
KnownNat p => Num (PrimeField p) Source # | |
Ord (PrimeField p) Source # | |
KnownNat p => Read (PrimeField p) Source # | |
Show (PrimeField p) Source # | |
NFData (PrimeField p) Source # | |
KnownNat p => Hashable (PrimeField p) Source # | |
KnownNat p => FiniteField (PrimeField p) Source # | |
Template haskell utilities
Here is usage example for primeField:
a :: $(primeField 15485867) a = 1
primeField :: Integer -> TypeQ Source #
Create a PrimeField type