packages feed

pred-trie 0.6.0.1 → 0.6.1

raw patch · 3 files changed

+29/−15 lines, 3 filesdep ~basedep ~tries

Dependency ranges changed: base, tries

Files

pred-trie.cabal view
@@ -1,13 +1,15 @@--- This file has been generated from package.yaml by hpack version 0.21.2.+cabal-version: 1.12++-- This file has been generated from package.yaml by hpack version 0.31.0. -- -- see: https://github.com/sol/hpack ----- hash: 03b4ea47e57ecfda68de39c93f569f4b5f8a076b14a22dc5ba822e6d4c71cba9+-- hash: 375539d0dc78092f6f728d3b9279b9efedf1eed0cbde58250ccdd0dbce6a8f6d  name:           pred-trie-version:        0.6.0.1+version:        0.6.1 synopsis:       Predicative tries-description:    Please see the README on Github at <https://git.localcooking.com/tooling/pred-trie#readme>+description:    Please see the README on Github at <https://github.com/athanclark/pred-trie#readme> category:       Data homepage:       https://github.com/athanclark/pred-trie#readme bug-reports:    https://github.com/athanclark/pred-trie/issues@@ -17,8 +19,6 @@ license:        BSD3 license-file:   LICENSE build-type:     Simple-cabal-version:  >= 1.10- extra-source-files:     README.md @@ -40,7 +40,7 @@   ghc-options: -Wall   build-depends:       QuickCheck >=2.9.2-    , base >=4.8 && <5.0+    , base >=4.11 && <5.0     , containers     , deepseq     , hashable@@ -50,7 +50,7 @@     , pred-set     , semigroups     , strict-    , tries >=0.0.5+    , tries >=0.0.6     , unordered-containers   default-language: Haskell2010 @@ -82,7 +82,7 @@     , tasty-hunit     , tasty-quickcheck     , text-    , tries >=0.0.5+    , tries >=0.0.6     , unordered-containers   default-language: Haskell2010 @@ -111,6 +111,6 @@     , sets     , strict     , text-    , tries >=0.0.5+    , tries >=0.0.6     , unordered-containers   default-language: Haskell2010
src/Data/Trie/Pred/Base.hs view
@@ -107,10 +107,14 @@  instance ( Hashable k          , Eq k+         ) => Semigroup (PredTrie k a) where+  (PredTrie ls1 ps1) <> (PredTrie ls2 ps2) =+    PredTrie (ls1 <> ls2) (ps1 <> ps2)++instance ( Hashable k+         , Eq k          ) => Monoid (PredTrie k a) where   mempty = PredTrie mempty mempty-  mappend (PredTrie ls1 ps1) (PredTrie ls2 ps2) =-    PredTrie (ls1 <> ls2) (ps1 <> ps2)  emptyPT :: PredTrie k a emptyPT = PredTrie HT.empty (PredStep HMS.empty)@@ -201,10 +205,15 @@  instance ( Hashable k          , Eq k+         ) => Semigroup (RootedPredTrie k a) where+  (RootedPredTrie mx xs) <> (RootedPredTrie my ys) = RootedPredTrie+    (getLast (Last mx <> Last my)) (xs <> ys)+++instance ( Hashable k+         , Eq k          ) => Monoid (RootedPredTrie k a) where   mempty = emptyRPT-  mappend (RootedPredTrie mx xs) (RootedPredTrie my ys) = RootedPredTrie-    (getLast (Last mx <> Last my)) (xs <> ys)   emptyRPT :: RootedPredTrie k a
src/Data/Trie/Pred/Base/Step.hs view
@@ -28,6 +28,7 @@  import Data.Data (Typeable) import Data.Monoid (First (..), (<>))+import Data.Semigroup (Semigroup) import Data.Maybe (maybe) import Data.Hashable (Hashable) import Data.HashMap.Strict (HashMap)@@ -109,9 +110,13 @@  instance ( Eq k          , Hashable k+         ) => Semigroup (PredStep k c s a) where+  (<>) = unionPred++instance ( Eq k+         , Hashable k          ) => Monoid (PredStep k c s a) where   mempty  = PredStep HMS.empty-  mappend = unionPred  -- | overwrite on the right unionPred :: ( Eq k