toy-lib-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.ModInt

Description

Int with automatic moudlo arithmetic performed. Depends on Math.PowMod.

Synopsis

Documentation

newtype ModInt p #

Int with automatic moudlo arithmetic performed.

Constructors

ModInt 

Fields

Instances

Instances details
Vector Vector (ModInt p) # 
Instance details

Defined in Data.ModInt

MVector MVector (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

basicLength :: MVector s (ModInt p) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (ModInt p) -> MVector s (ModInt p) #

basicOverlaps :: MVector s (ModInt p) -> MVector s (ModInt p) -> Bool #

basicUnsafeNew :: Int -> ST s (MVector s (ModInt p)) #

basicInitialize :: MVector s (ModInt p) -> ST s () #

basicUnsafeReplicate :: Int -> ModInt p -> ST s (MVector s (ModInt p)) #

basicUnsafeRead :: MVector s (ModInt p) -> Int -> ST s (ModInt p) #

basicUnsafeWrite :: MVector s (ModInt p) -> Int -> ModInt p -> ST s () #

basicClear :: MVector s (ModInt p) -> ST s () #

basicSet :: MVector s (ModInt p) -> ModInt p -> ST s () #

basicUnsafeCopy :: MVector s (ModInt p) -> MVector s (ModInt p) -> ST s () #

basicUnsafeMove :: MVector s (ModInt p) -> MVector s (ModInt p) -> ST s () #

basicUnsafeGrow :: MVector s (ModInt p) -> Int -> ST s (MVector s (ModInt p)) #

KnownNat p => SemigroupAction (Product (ModInt p)) (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

sact :: Product (ModInt p) -> ModInt p -> ModInt p #

KnownNat p => Enum (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

succ :: ModInt p -> ModInt p #

pred :: ModInt p -> ModInt p #

toEnum :: Int -> ModInt p #

fromEnum :: ModInt p -> Int #

enumFrom :: ModInt p -> [ModInt p] #

enumFromThen :: ModInt p -> ModInt p -> [ModInt p] #

enumFromTo :: ModInt p -> ModInt p -> [ModInt p] #

enumFromThenTo :: ModInt p -> ModInt p -> ModInt p -> [ModInt p] #

KnownNat p => Num (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

(+) :: ModInt p -> ModInt p -> ModInt p #

(-) :: ModInt p -> ModInt p -> ModInt p #

(*) :: ModInt p -> ModInt p -> ModInt p #

negate :: ModInt p -> ModInt p #

abs :: ModInt p -> ModInt p #

signum :: ModInt p -> ModInt p #

fromInteger :: Integer -> ModInt p #

Read (ModInt p) # 
Instance details

Defined in Data.ModInt

KnownNat p => Fractional (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

(/) :: ModInt p -> ModInt p -> ModInt p #

recip :: ModInt p -> ModInt p #

fromRational :: Rational -> ModInt p #

KnownNat p => Integral (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

quot :: ModInt p -> ModInt p -> ModInt p #

rem :: ModInt p -> ModInt p -> ModInt p #

div :: ModInt p -> ModInt p -> ModInt p #

mod :: ModInt p -> ModInt p -> ModInt p #

quotRem :: ModInt p -> ModInt p -> (ModInt p, ModInt p) #

divMod :: ModInt p -> ModInt p -> (ModInt p, ModInt p) #

toInteger :: ModInt p -> Integer #

KnownNat p => Real (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

toRational :: ModInt p -> Rational #

Show (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

showsPrec :: Int -> ModInt p -> ShowS #

show :: ModInt p -> String #

showList :: [ModInt p] -> ShowS #

Eq (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

(==) :: ModInt p -> ModInt p -> Bool #

(/=) :: ModInt p -> ModInt p -> Bool #

Ord (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

compare :: ModInt p -> ModInt p -> Ordering #

(<) :: ModInt p -> ModInt p -> Bool #

(<=) :: ModInt p -> ModInt p -> Bool #

(>) :: ModInt p -> ModInt p -> Bool #

(>=) :: ModInt p -> ModInt p -> Bool #

max :: ModInt p -> ModInt p -> ModInt p #

min :: ModInt p -> ModInt p -> ModInt p #

Prim (ModInt p) # 
Instance details

Defined in Data.ModInt

ShowBSB (ModInt p) # 
Instance details

Defined in Data.ModInt

Methods

showBSB :: ModInt p -> Builder #

Unbox (ModInt p) # 
Instance details

Defined in Data.ModInt

newtype MVector s (ModInt p) # 
Instance details

Defined in Data.ModInt

newtype MVector s (ModInt p) = MV_ModInt (MVector s (ModInt p))
newtype Vector (ModInt p) # 
Instance details

Defined in Data.ModInt

newtype Vector (ModInt p) = V_ModInt (Vector (ModInt p))