packages feed

lexer-applicative 2.1.0.1 → 2.1.0.2

raw patch · 3 files changed

+21/−5 lines, 3 filesdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

- Language.Lexer.Applicative: instance Eq LexicalError
- Language.Lexer.Applicative: instance Eq tok => Eq (TokenStream tok)
- Language.Lexer.Applicative: instance Exception LexicalError
- Language.Lexer.Applicative: instance Functor Lexer
- Language.Lexer.Applicative: instance Functor Recognizer
- Language.Lexer.Applicative: instance Functor TokenStream
- Language.Lexer.Applicative: instance Monoid (Lexer tok)
- Language.Lexer.Applicative: instance Monoid (Recognizer tok)
- Language.Lexer.Applicative: instance Show LexicalError
- Language.Lexer.Applicative: instance Show tok => Show (TokenStream tok)
- Language.Lexer.Applicative: instance Typeable LexicalError
- Language.Lexer.Applicative: lexerTokenRE :: Lexer tok -> Recognizer tok
- Language.Lexer.Applicative: lexerWhitespaceRE :: Lexer tok -> Recognizer ()
+ Language.Lexer.Applicative: [lexerTokenRE] :: Lexer tok -> Recognizer tok
+ Language.Lexer.Applicative: [lexerWhitespaceRE] :: Lexer tok -> Recognizer ()
+ Language.Lexer.Applicative: instance Data.Semigroup.Semigroup (Language.Lexer.Applicative.Lexer tok)
+ Language.Lexer.Applicative: instance Data.Semigroup.Semigroup (Language.Lexer.Applicative.Recognizer tok)
+ Language.Lexer.Applicative: instance GHC.Base.Functor Language.Lexer.Applicative.Lexer
+ Language.Lexer.Applicative: instance GHC.Base.Functor Language.Lexer.Applicative.Recognizer
+ Language.Lexer.Applicative: instance GHC.Base.Functor Language.Lexer.Applicative.TokenStream
+ Language.Lexer.Applicative: instance GHC.Base.Monoid (Language.Lexer.Applicative.Lexer tok)
+ Language.Lexer.Applicative: instance GHC.Base.Monoid (Language.Lexer.Applicative.Recognizer tok)
+ Language.Lexer.Applicative: instance GHC.Classes.Eq Language.Lexer.Applicative.LexicalError
+ Language.Lexer.Applicative: instance GHC.Classes.Eq tok => GHC.Classes.Eq (Language.Lexer.Applicative.TokenStream tok)
+ Language.Lexer.Applicative: instance GHC.Exception.Exception Language.Lexer.Applicative.LexicalError
+ Language.Lexer.Applicative: instance GHC.Show.Show Language.Lexer.Applicative.LexicalError
+ Language.Lexer.Applicative: instance GHC.Show.Show tok => GHC.Show.Show (Language.Lexer.Applicative.TokenStream tok)
- Language.Lexer.Applicative: runLexer :: Lexer tok -> String -> String -> TokenStream (L tok)
+ Language.Lexer.Applicative: runLexer :: forall tok. Lexer tok -> String -> String -> TokenStream (L tok)

Files

CHANGELOG.md view
@@ -1,6 +1,16 @@ Changelog ========= +2.1.0.2+-------++Fix compatibility with GHC 8.4 and drop support for GHC 7.x++2.1.0.1+-------++Fix a link in the README+ 2.1 --- 
lexer-applicative.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                lexer-applicative-version:             2.1.0.1+version:             2.1.0.2 synopsis:            Simple lexer based on applicative regular expressions description:         Simple lexer based on applicative regular expressions homepage:            https://github.com/feuerbach/lexer-applicative@@ -28,7 +28,7 @@   -- other-modules:          -- other-extensions:       build-depends:-    base >=4.5 && < 5,+    base >=4.9 && < 5,     srcloc >= 0.5,     regex-applicative >= 0.3.1   hs-source-dirs:      src
src/Language/Lexer/Applicative.hs view
@@ -24,7 +24,7 @@ import Data.Loc import Data.List import Data.Typeable (Typeable)-import Data.Monoid+import Data.Semigroup (Semigroup(..)) import Data.Function import Control.Exception @@ -52,9 +52,12 @@   }   deriving Functor +instance Semigroup (Lexer tok) where+  Lexer t1 w1 <> Lexer t2 w2 = Lexer (t1 <> t2) (w1 <> w2)+ instance Monoid (Lexer tok) where   mempty = Lexer mempty mempty-  Lexer t1 w1 `mappend` Lexer t2 w2 = Lexer (t1 <> t2) (w1 <> w2)+  mappend = (<>)  -- | Build a lexer with the given token recognizer and no (i.e. 'mempty') -- whitespace recognizer.@@ -89,9 +92,12 @@ newtype Recognizer tok = Recognizer (RE Char (RE Char tok))   deriving Functor +instance Semigroup (Recognizer tok) where+  Recognizer r1 <> Recognizer r2 = Recognizer (r1 <|> r2)+ instance Monoid (Recognizer tok) where   mempty = Recognizer empty-  mappend (Recognizer r1) (Recognizer r2) = Recognizer (r1 <|> r2)+  mappend = (<>)  -- | When scanning a next token, the regular expression will compete with -- the other 'Recognizer's of its 'Lexer'. If it wins, its result