packages feed

pattern-trie 0.1.0 → 0.1.1

raw patch · 7 files changed

+30/−16 lines, 7 filesdep ~basedep ~hashablebinary-addedPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, hashable

API changes (from Hackage documentation)

- Data.Trie.Pattern: MatchOrd :: (Matcher s) -> MatchOrd s
+ Data.Trie.Pattern: MatchOrd :: Matcher s -> MatchOrd s
- Data.Trie.Pattern: MatchPrefixOrd :: (Matcher s) -> MatchPrefixOrd s
+ Data.Trie.Pattern: MatchPrefixOrd :: Matcher s -> MatchPrefixOrd s
- Data.Trie.Pattern: value :: Trie s a -> (Maybe a)
+ Data.Trie.Pattern: value :: Trie s a -> Maybe a

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## 0.1.1++Tweak version bounds and insignificant cleanup.+ ## 0.1.0  Initial release.
docs-extra/backtrack.png view

binary file changed (7621 → 7621 bytes)

+ docs-extra/test.png view

binary file changed (absent → 2281 bytes)

+ docs-extra/test.tex view
@@ -0,0 +1,18 @@+\documentclass[convert={size=250}]{standalone}++\usepackage{tikz}+\usepackage{tikz-qtree}+\usepackage{amsmath}++\begin{document}++% $(\lambda x.M)N$+% $y=f(x)$+% $\mathcal{M} \models F$++\begin{equation}+    A \models B \text{ iff } \models A \implies B+\end{equation}++\end{document}+
pattern-trie.cabal view
@@ -1,5 +1,5 @@ name:     pattern-trie-version:  0.1.0+version:  0.1.1 category: Data synopsis: Pattern tries description:@@ -36,11 +36,11 @@         -- -dno-suppress-type-signatures         -- -dno-suppress-idinfo     build-depends:-        base                 >= 4.9   && < 5+        base                 >= 4.11  && < 5       , bytestring           >= 0.10  && < 1.0-      , containers           >= 0.5.7 && < 0.6+      , containers           >= 0.5.7 && < 0.7       , deepseq              >= 1.4.3 && < 1.5-      , hashable             >= 1.2   && < 1.3+      , hashable             >= 1.2   && < 1.4       , text                 >= 1.0   && < 2.0       , unordered-containers >= 0.2   && < 0.3 @@ -90,4 +90,3 @@      if impl(ghc < 8.4)         build-depends: bytestring-trie-
src/Data/Trie/Pattern.hs view
@@ -7,7 +7,6 @@   , DeriveGeneric   , DeriveAnyClass   , DerivingStrategies-  , GeneralizedNewtypeDeriving   , TupleSections #-} @@ -156,6 +155,8 @@ import qualified Data.Sequence       as Seq import qualified Data.Traversable    as Traversable +-- {-# ANN module "HLint: ignore Eta reduce" #-}+ -- | An unordered map from 'Pattern's of strings of type @s@ to values -- of type @a@. data Trie s a = Trie@@ -327,10 +328,7 @@     go _  (EqStr _ :<| p1') (AnyStr   :<| p2') = go False p1' p2'     go _  (AnyStr  :<| p1') (EqStr _  :<| p2') = go False p1' p2'     go eq (AnyStr  :<| p1') (AnyStr   :<| p2') = go eq    p1' p2'-    go eq (EqStr s :<| p1') (EqStr s' :<| p2') =-        if s /= s'-            then False-            else go eq p1' p2'+    go eq (EqStr s :<| p1') (EqStr s' :<| p2') = s == s' && go eq p1' p2'  -- | Apply a string to a pattern, returning the unmatched -- suffix of the pattern together with the captured chunks and the
test/Test/Data/Trie/Pattern.hs view
@@ -3,9 +3,7 @@ -- file, You can obtain one at http://mozilla.org/MPL/2.0/.  {-# LANGUAGE CPP #-}-{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TupleSections #-}  module Test.Data.Trie.Pattern (tests) where @@ -15,12 +13,9 @@ import Data.Functor.Identity import Data.Functor.Compose import Data.List (inits)-#if __GLASGOW_HASKELL__ < 804-import Data.Semigroup-#endif import Data.Sequence (Seq (..)) import Data.Trie.Pattern-import Test.Tasty+import Test.Tasty (TestTree, testGroup) import Test.Tasty.QuickCheck  import qualified Data.ByteString.Char8 as C8