packages feed

tlex 0.4.0.1 → 0.5.0.0

raw patch · 3 files changed

+5/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Language.Lexer.Tlex.Runner: TlexError :: TlexResult mark action
+ Language.Lexer.Tlex.Runner: TlexNotAccepted :: TlexResult mark action

Files

README.md view
@@ -101,8 +101,8 @@ lexByteString :: ByteString.ByteString -> Maybe [ByteString.ByteString] lexByteString s0 = go s0 id where     go s acc = case runInputByteString (tlexScan ()) s of-        (TlexEndOfInput, _)            -> Just $ acc []-        (TlexError, _)                 -> Nothing+        (TlexEndOfInput, _)     -> Just $ acc []+        (TlexNotAccepted, _)    -> Nothing         (TlexAccepted n act, _) ->             let (consumed, rest) = splitAt n s                 token = act consumed
src/Language/Lexer/Tlex/Runner.hs view
@@ -18,7 +18,7 @@ data TlexResult mark action     = TlexEndOfInput     -- ^ No more inputs.-    | TlexError+    | TlexNotAccepted     -- ^ Some inputs are available, but not accepted.     | TlexAccepted mark action     -- ^ Accepted with a end position and an action.@@ -72,5 +72,5 @@             pure do TlexAccepted m x          goEnd preAccepted = case preAccepted of-            Nothing  -> pure TlexError+            Nothing  -> pure TlexNotAccepted             Just acc -> pure acc
tlex.cabal view
@@ -2,7 +2,7 @@ build-type:          Custom  name:                tlex-version:             0.4.0.1+version:             0.5.0.0 license:             Apache-2.0 OR MPL-2.0 license-file:        LICENSE copyright:           (c) 2020 Mizunashi Mana