packages feed

unfoldable 0.8 → 0.8.1

raw patch · 6 files changed

+23/−6 lines, 6 filesdep ~transformers

Dependency ranges changed: transformers

Files

+ CHANGELOG.md view
@@ -0,0 +1,9 @@+0.8.1+-----+* added changelog+* updated to `transformers` 0.4.1.0+* added `Data.Functor.Sum` instance for `Unfoldable`++0.8+---+* new implementation of `arbitraryDefault`
src/Data/Biunfoldable.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Data.Biunfoldable--- Copyright   :  (c) Sjoerd Visscher 2012+-- Copyright   :  (c) Sjoerd Visscher 2014 -- License     :  BSD-style (see the file LICENSE) -- -- Maintainer  :  sjoerd@w3future.com
src/Data/Triunfoldable.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Data.Triunfoldable--- Copyright   :  (c) Sjoerd Visscher 2012+-- Copyright   :  (c) Sjoerd Visscher 2014 -- License     :  BSD-style (see the file LICENSE) -- -- Maintainer  :  sjoerd@w3future.com
src/Data/Unfoldable.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Data.Unfoldable--- Copyright   :  (c) Sjoerd Visscher 2012+-- Copyright   :  (c) Sjoerd Visscher 2014 -- License     :  BSD-style (see the file LICENSE) -- -- Maintainer  :  sjoerd@w3future.com@@ -44,6 +44,7 @@ import Data.Functor.Identity import Data.Functor.Product import Data.Functor.Reverse+import Data.Functor.Sum import Control.Monad.Trans.State import qualified System.Random as R import Test.QuickCheck (Arbitrary(..), Gen, sized, resize)@@ -216,6 +217,12 @@ instance (Unfoldable p, Unfoldable q) => Unfoldable (Product p q) where   unfold fa = choose     [ Pair <$> unfold fa <*> unfold fa ]++instance (Unfoldable p, Unfoldable q) => Unfoldable (Sum p q) where+  unfold fa = choose+    [ InL <$> unfold fa+    , InR <$> unfold fa+    ]  instance (Unfoldable p, Unfoldable q) => Unfoldable (Compose p q) where   unfold fa = choose
src/Data/Unfolder.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Data.Unfolder--- Copyright   :  (c) Sjoerd Visscher 2012+-- Copyright   :  (c) Sjoerd Visscher 2014 -- License     :  BSD-style (see the file LICENSE) -- -- Maintainer  :  sjoerd@w3future.com
unfoldable.cabal view
@@ -1,5 +1,5 @@ Name:                 unfoldable-Version:              0.8+Version:              0.8.1 Synopsis:             Class of data structures that can be unfolded. Description:          Just as there's a Foldable class, there should also be an Unfoldable class.                        .@@ -23,6 +23,7 @@ Cabal-version:        >= 1.6  Extra-Source-Files:+  CHANGELOG.md   examples/*.hs   src/Data/Triunfoldable.hs @@ -36,7 +37,7 @@      Build-depends:       base         >= 4   && < 5 -    , transformers >= 0.3 && < 0.4+    , transformers >= 0.4 && < 0.5     , random       >= 1.0 && < 1.1     , QuickCheck   >= 2.7.3 && < 2.8