packages feed

PathTree 0.1.0.0 → 0.1.1.0

raw patch · 4 files changed

+15/−9 lines, 4 filesdep ~PathTreedep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: PathTree, base

API changes (from Hackage documentation)

Files

PathTree.cabal view
@@ -1,5 +1,5 @@ name: PathTree-version: 0.1.0.0+version: 0.1.1.0 cabal-version: >=1.10 build-type: Simple license: BSD3@@ -10,12 +10,15 @@ synopsis: A tree used to merge and maintain paths description:     This package contains two modules: "Data.LCRSTree" and "Data.PathTree".+    .     A 'PathTree' is a tree used to build unified paths from some node. This     means being able to merge multiple paths, that may overlap at the root, in     a sensible way. The module comes with a set of functions to add paths.+    .     A Left-Children-Right-Siblings tree ('LCRSTree') is a tree that represents     a multi-way tree (aka, a Rose Tree) in a binary-tree format. It is the     underlying implementation of 'PathTree'.+    .     <https://en.wikipedia.org/wiki/Left-child_right-sibling_binary_tree> category: Data author: Pedro Rodriguez Tavarez@@ -29,7 +32,7 @@         Data.LCRSTree         Data.PathTree     build-depends:-        base >=4.7 && <5,+        base >=4.5.1 && <5,         containers >=0.5.6.2 && <0.6     default-language: Haskell2010     hs-source-dirs: src@@ -40,7 +43,7 @@     main-is: Spec.hs     build-depends:         base >=4.8.2.0 && <4.9,-        PathTree >=0.1.0.0 && <0.2,+        PathTree >=0.1.1.0 && <0.2,         QuickCheck >=2.8.2 && <2.9,         test-framework >=0.8.1.1 && <0.9,         test-framework-quickcheck2 >=0.3.0.3 && <0.4
src/Data/LCRSTree.hs view
@@ -11,6 +11,10 @@ ------------------------------------------------------------------------------- module Data.LCRSTree where +-- Do this in order to avoid unused imports in GHC 7.10 and over without+-- needing cpp+import Data.Foldable as F+ import Data.Tree (Tree) import qualified Data.Tree as T @@ -28,10 +32,10 @@  instance Foldable LCRSTree where   foldr _ z Empty = z-  foldr f z (Leaf n s) = foldr f (f n z) s+  foldr f z (Leaf n s) = F.foldr f (f n z) s   foldr f z (Node n c s) =-    let v = foldr f (f n z) c-    in foldr f v s+    let v = F.foldr f (f n z) c+    in F.foldr f v s  -- | Return the depth of the tree. This means the depth of the longest -- branch
src/Data/PathTree.hs view
@@ -111,8 +111,7 @@ pathExists paths (Leaf n s) =   case paths of     [] -> False-    [p] -> if n == p then True-                     else pathExists [p] s+    [p] -> n == p || pathExists [p] s     (p:ps) -> if p == n then pathExists ps s                         else pathExists (p:ps) s pathExists paths (Node n c s) =
test/Spec.hs view
@@ -192,7 +192,7 @@ instance Arbitrary AlphaChar where   arbitrary =     let es = elements $ ['A'..'Z'] ++ ['a'..'z']-    in AlphaChar <$> es+    in fmap AlphaChar es   zipM = liftM2 (,)