packages feed

iterable 2.0 → 3.0

raw patch · 5 files changed

+29/−8 lines, 5 filesdep +taggedPVP ok

version bump matches the API change (PVP)

Dependencies added: tagged

API changes (from Hackage documentation)

- Data.Iterable: itlength :: Iterable a b => b -> a -> Int
+ Data.Iterable: itlength :: Iterable a b => Proxy b -> a -> Int

Files

Data/Iterable.hs view
@@ -2,6 +2,7 @@ -- | Declares Iterable class for handling multi-level, heterogeneous, monomorphic collections that allow nested iteration. module Data.Iterable(Iterable(..)) where +import Data.Proxy(Proxy) import Control.Monad.Identity(runIdentity,foldM)  -- | Class for iterating all nested components `b` of type `a`.@@ -13,4 +14,4 @@   itfoldr  ::              (b -> c ->   c) -> c -> a ->   c   itfoldl  ::              (c -> b ->   c) -> c -> a ->   c   itfoldl' ::              (c -> b ->   c) -> c -> a ->   c-  itlength :: b -> a -> Int -- NOTE: b is 'dummy' type argument to satisfy Iterable a b constraint+  itlength :: Proxy b -> a -> Int
Data/Iterable/Instantiate.hs view
@@ -5,6 +5,7 @@  import           Language.Haskell.TH.Syntax import           Data.Iterable+import           Data.Proxy(Proxy)  -- | Generates convenience function for iterating over a single object. --self_iterable typA = gen_iterable typA typA [e| id |] [e| L.singleton |]@@ -28,6 +29,6 @@         itfoldr  f e a = (itfoldr  ::              ($(typB) -> c   ->   c) -> c   -> $(typA)   ->   c       ) (\bb cc -> itfoldr  f cc bb) e a         itfoldl  f e a = (itfoldl  ::              (c -> $(typB)   ->   c) -> c   -> $(typA)   ->   c       ) (itfoldl  f) e a         itfoldl' f e a = (itfoldl' ::              (c -> $(typB)   ->   c) -> c   -> $(typA)   ->   c       ) (itfoldl' f) e a-        itlength _   a = (itfoldl' ::              (c -> $(typB)   ->   c) -> c   -> $(typA)   ->   c       ) (\a b-> a + itlength (undefined :: $(typC)) b) 0 a+        itlength _   a = (itfoldl' ::              (c -> $(typB)   ->   c) -> c   -> $(typA)   ->   c       ) (\a b-> a + itlength (undefined :: Proxy $(typC)) b) 0 a     |] 
README.md view
@@ -3,8 +3,11 @@ Typeclass and TemplateHaskell instantiating methods for accessing data within multilevel, monomorphic, heterogeneous collections. -[![Build Status](https://api.travis-ci.org/mgajda/iterable.png?branch=master)](https://www.travis-ci.org/mgajda/iterable)+[![Build Status](https://api.travis-ci.org/BioHaskell/iterable.svg?branch=master)](https://travis-ci.org/BioHaskell/iterable)+[![Hackage](https://budueba.com/hackage/iterable)](https://hackage.haskell.org/package/iterable)  Used as a main interface to Protein Databank structures parsed by [hPDB](http://hackage.haskell.org/package/hPDB) library.  Details on official releases are on [Hackage](http://hackage.haskell.org/package/iterable).++This package is also a part of [Stackage](http://daniel-diaz.github.io/stackagelist/) - a stable subset of Hackage.
+ changelog view
@@ -0,0 +1,11 @@+-*-Changelog-*-++3.0.0.0  May 2014+	* Using Proxy in itlength. (Minor API change.)++2.0.0.0  September 2013+	* Method renaming imap -> itmap++1.0.0.0  September 2013+	* First release split out of hPDB library.+
iterable.cabal view
@@ -1,7 +1,7 @@ name:                iterable-version:             2.0+version:             3.0 stability:           stable-homepage:            https://github.com/mgajda/iterable+homepage:            https://github.com/BioHaskell/iterable package-url:         http://hackage.haskell.org/package/iterable synopsis:            API for hierarchical multilevel collections. description:         Two-argument typeclass that generalizes Foldable, Functor, and Traversable for monomorphic@@ -22,15 +22,20 @@  build-type:          Simple cabal-version:       >=1.8-tested-with:         GHC==7.0.3, GHC==7.2.1, GHC==7.4.2, GHC==7.6.2+tested-with:         GHC==7.0.3, GHC==7.2.1, GHC==7.4.2, GHC==7.6.2, GHC==7.6.3 data-files:          README.md+extra-source-files:  changelog  source-repository head   type:     git-  location: git://github.com:mgajda/hpdb.git+  location: https://github.com/BioHaskell/iterable.git  Library-  build-depends:    base>4 && <=5, mtl >= 2.0, vector >= 0.9, template-haskell >= 2.7+  build-depends:    base      >    4 && <=5,+                    mtl       >= 2.0,+                    vector    >= 0.9,+                    template-haskell >= 2.7,+                    tagged    >= 0.7   other-extensions: TemplateHaskell, MultiParamTypeClasses, FlexibleInstances   exposed-modules:  Data.Iterable, Data.Iterable.Instantiate, Data.Iterable.Instantiate.Vector   exposed:          True