I would like to use Math.NumberTheory.Moduli.Class in my Haskell program. It doesn't seem to be included in Prelude since when I try to use it in GHCI
> (3 :: Mod 5) + (4 :: Mod 5)
we have Not in scope: type constructor or class ‘Mod’
. I also can't seem to import it into GHCI since none of the following work
> import Math.NumberTheory.Moduli.Class
> import Math.NumberTheory.Moduli
> import Math.NumberTheory
because "Could not find module". Finally,
cabal install Math.NumberTheory
seems to have no knowledge of any such package names "Math". Moreover, I can't figure out how to use any of the packages in Math.NumberTheory
. How does one import these into a Haskell program?
arithmoi
. See here for more details: stackoverflow.com/a/48855060/126014 – Mark Seemanncabal v2-repl -b arithmoi
, and then import your desired modules. – HTNWMath.NumberTheory
is a module. – Willem Van Onsem