Aleksey Khudyakov avatar Aleksey Khudyakov committed 960188e

Use NFData instance for vector

Comments (0)

Files changed (2)

Data/Histogram/Generic.hs

 
 -- | Vector do not supply 'NFData' instance so let just 'seq' it and
 --   hope it's enough. Should be enough for unboxed vectors.
-instance (NFData a, NFData bin) => NFData (Histogram v bin a) where
-   rnf (Histogram bin uo vec) = 
-     rnf bin `seq` rnf uo `seq` seq vec ()
+instance (NFData a, NFData bin, NFData (v a)) => NFData (Histogram v bin a) where
+   rnf (Histogram bin uo vec) =
+     rnf bin `seq` rnf uo `seq` rnf vec `seq` ()
 
 -- | If vector is a functor then histogram is functor as well
 instance (Functor v) => Functor (Histogram v bin) where

histogram-fill.cabal

   Build-Depends:        base >=3 && <5,
                         deepseq,
                         primitive,
-                        vector >= 0.7
+                        vector >= 0.10.0.1
   Exposed-modules:      Data.Histogram
                         Data.Histogram.Generic
                         Data.Histogram.Fill
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.