data-clist 0.0.6 → 0.0.7
raw patch · 2 files changed
+10/−1 lines, 2 filesdep +deepseqPVP ok
version bump matches the API change (PVP)
Dependencies added: deepseq
API changes (from Hackage documentation)
+ Data.CircularList: instance NFData a => NFData (CList a)
Files
- data-clist.cabal +3/−1
- src/Data/CircularList.hs +7/−0
data-clist.cabal view
@@ -5,7 +5,7 @@ Given that the ring terminiology clashes with certain mathematical branches, we're using the term CList or CircularList instead.-Version: 0.0.6+Version: 0.0.7 License: BSD3 License-File: LICENSE Author: John Van Enk <vanenkj@gmail.com>@@ -22,10 +22,12 @@ Library Build-Depends: base >= 4 && < 5,+ deepseq == 1.1.*, QuickCheck >= 2.4 && < 2.5 Exposed-Modules: Data.CircularList ghc-options: -Wall+ gHC-prof-options: -prof -auto-all hs-source-dirs: src
src/Data/CircularList.hs view
@@ -70,6 +70,7 @@ ) where import Data.List(find,unfoldr,foldl')+import Control.DeepSeq(NFData(..)) import Control.Monad(join) import Test.QuickCheck.Arbitrary import Test.QuickCheck.Gen@@ -326,6 +327,12 @@ instance (Eq a) => Eq (CList a) where a == b = any (identical a) . toList $ allRotations b++instance (NFData a) => NFData (CList a) where+ rnf Empty = ()+ rnf (CList l f r) = rnf f+ `seq` rnf l+ `seq` rnf r -- |Determine if two 'CList's are structurally identical. identical :: (Eq a) => CList a -> CList a -> Bool