diff options
author | Alberto Ruiz <aruiz@um.es> | 2015-06-20 13:49:48 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2015-06-20 13:49:48 +0200 |
commit | e09104974d13f66f4ec2e7ae2310346996cf2356 (patch) | |
tree | e1203e13f2c1e0587bdcb3938160546dadf0fcb1 /packages/base/src/Internal/Modular.hs | |
parent | db50bc11dafa6834a4367427156306674063ed6b (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.hs | 5 |
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) | |||
44 | import Foreign.Storable | 44 | import Foreign.Storable |
45 | import Data.Ratio | 45 | import Data.Ratio |
46 | import Data.Complex | 46 | import Data.Complex |
47 | import Control.DeepSeq ( NFData(..) ) | ||
47 | 48 | ||
48 | 49 | ||
49 | 50 | ||
@@ -51,6 +52,10 @@ import Data.Complex | |||
51 | newtype Mod (n :: Nat) t = Mod {unMod:: t} | 52 | newtype Mod (n :: Nat) t = Mod {unMod:: t} |
52 | deriving (Storable) | 53 | deriving (Storable) |
53 | 54 | ||
55 | instance (NFData t) => NFData (Mod n t) | ||
56 | where | ||
57 | rnf (Mod x) = rnf x | ||
58 | |||
54 | infixr 5 ./. | 59 | infixr 5 ./. |
55 | type (./.) x n = Mod n x | 60 | type (./.) x n = Mod n x |
56 | 61 | ||