dlist 0.6.0.1 → 0.7
raw patch · 3 files changed
+30/−12 lines, 3 filesdep +deepseqdep ~base
Dependencies added: deepseq
Dependency ranges changed: base
Files
- ChangeLog.md +9/−0
- Data/DList.hs +12/−9
- dlist.cabal +9/−3
ChangeLog.md view
@@ -2,6 +2,15 @@ Change Log ========== +Version 0.7 (2014-03-17) *St. Patrick's Day*+--------------------------------------------++#### Package changes++* Add `NFData` instance (and `deepseq` dependency)+* Add `IsString` instance+* Remove deprecated entities+ Version 0.6.0.1 (2013-12-01) *World AIDS Day* ---------------------------------------------
Data/DList.hs view
@@ -1,6 +1,7 @@-{-# OPTIONS_GHC -Wall -O2 #-}+{-# OPTIONS_GHC -O2 #-} {-# OPTIONS_HADDOCK prune #-} {-# LANGUAGE CPP #-}+{-# LANGUAGE FlexibleInstances #-} ----------------------------------------------------------------------------- -- |@@ -18,7 +19,7 @@ module Data.DList ( - DList(..)+ DList -- * Construction ,fromList -- :: [a] -> DList a@@ -40,15 +41,15 @@ ,foldr -- :: (a -> b -> b) -> b -> DList a -> b ,map -- :: (a -> b) -> DList a -> DList b - ,maybeReturn- ) where import Prelude hiding (concat, foldr, map, head, tail, replicate) import qualified Data.List as List+import Control.DeepSeq (NFData(..)) import Control.Monad as M import Data.Monoid import Data.Function (on)+import Data.String (IsString(..)) import Data.Foldable (Foldable) import qualified Data.Foldable as F@@ -83,8 +84,6 @@ -- > flatten (Branch x y) = flatten x >> flatten y -- newtype DList a = DL { unDL :: [a] -> [a] }-{-# DEPRECATED DL "It will be removed in dlist-v0.7 (see <https://github.com/spl/dlist/issues/4 #4>)." #-}-{-# DEPRECATED unDL "It will be removed in dlist-v0.7. Use 'apply' instead." #-} -- | Convert a list to a dlist fromList :: [a] -> DList a@@ -264,7 +263,11 @@ {-# INLINE foldr' #-} #endif -maybeReturn :: MonadPlus m => Maybe a -> m a-maybeReturn = maybe mzero return-{-# DEPRECATED maybeReturn "It will be removed in dlist-v0.7." #-}+instance NFData a => NFData (DList a) where+ rnf = rnf . toList+ {-# INLINE rnf #-}++instance IsString (DList Char) where+ fromString = fromList+ {-# INLINE fromString #-}
dlist.cabal view
@@ -1,5 +1,5 @@ name: dlist-version: 0.6.0.1+version: 0.7 synopsis: Difference lists description: Difference lists are a list-like type supporting O(1) append. This is@@ -17,14 +17,20 @@ ChangeLog.md build-type: Simple cabal-version: >= 1.9.2-tested-with: GHC==7.0.4, GHC==7.2.2, GHC==7.4.2, GHC==7.6.3+tested-with: GHC==7.0.4,+ GHC==7.2.2,+ GHC==7.4.2,+ GHC==7.6.3,+ GHC==7.8.1 source-repository head type: git location: git://github.com/spl/dlist.git library- build-depends: base >= 2 && < 5+ build-depends:+ base >= 4 && < 5,+ deepseq >= 1.1 && < 2 ghc-options: -Wall extensions: CPP exposed-modules: Data.DList