summaryrefslogtreecommitdiff
path: root/packages/base/src/Internal/Modular.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2015-06-20 13:49:48 +0200
committerAlberto Ruiz <aruiz@um.es>2015-06-20 13:49:48 +0200
commite09104974d13f66f4ec2e7ae2310346996cf2356 (patch)
treee1203e13f2c1e0587bdcb3938160546dadf0fcb1 /packages/base/src/Internal/Modular.hs
parentdb50bc11dafa6834a4367427156306674063ed6b (diff)
NFData for Mod, alternative luPacked'' using gaxpy
Diffstat (limited to 'packages/base/src/Internal/Modular.hs')
-rw-r--r--packages/base/src/Internal/Modular.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/base/src/Internal/Modular.hs b/packages/base/src/Internal/Modular.hs
index 1cae1ac..098817e 100644
--- a/packages/base/src/Internal/Modular.hs
+++ b/packages/base/src/Internal/Modular.hs
@@ -44,6 +44,7 @@ import Foreign.ForeignPtr(castForeignPtr)
44import Foreign.Storable 44import Foreign.Storable
45import Data.Ratio 45import Data.Ratio
46import Data.Complex 46import Data.Complex
47import Control.DeepSeq ( NFData(..) )
47 48
48 49
49 50
@@ -51,6 +52,10 @@ import Data.Complex
51newtype Mod (n :: Nat) t = Mod {unMod:: t} 52newtype Mod (n :: Nat) t = Mod {unMod:: t}
52 deriving (Storable) 53 deriving (Storable)
53 54
55instance (NFData t) => NFData (Mod n t)
56 where
57 rnf (Mod x) = rnf x
58
54infixr 5 ./. 59infixr 5 ./.
55type (./.) x n = Mod n x 60type (./.) x n = Mod n x
56 61