packages feed

inchworm 1.0.1.1 → 1.0.2.1

raw patch · 2 files changed

+24/−16 lines, 2 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

Text/Lexer/Inchworm/Char.hs view
@@ -87,16 +87,22 @@         => Scanner m loc [Char] (loc, String)  scanHaskellString - = munchFold Nothing matchC (' ', True) acceptC+ = munchFold Nothing matchC (False, False) acceptC  where-        matchC 0 '\"' _                 = Just ('\"', True)-        matchC _  _  (_, False)         = Nothing+        -- Expect double quotes as first char.+        matchC 0 '\"' _                 = Just (False, False) -        matchC ix c  (cPrev, True)+        -- Matcher is done.+        matchC _  _  (True, _bEscape)   = Nothing++        -- Match a character.+        matchC ix c  (False, bEscape)          | ix < 1                       = Nothing-         | c == '"' && cPrev == '\\'    = Just ('"', True)-         | c == '"'                     = Just (c,   False)-         | otherwise                    = Just (c,   True)+         | c == '"',  bEscape           = Just (False, False)+         | c == '"'                     = Just (True,  False)+         | c == '\\', bEscape           = Just (False, False)+         | c == '\\'                    = Just (False, True)+         | otherwise                    = Just (False, False)          acceptC ('"' : cs)                        = case decodeString cs of@@ -121,23 +127,25 @@         => Scanner m loc [Char] (loc, Char)  scanHaskellChar - = munchFold Nothing matchC (' ', True) acceptC+ = munchFold Nothing matchC (False, False) acceptC  where-        matchC 0 '\'' _                 = Just ('\'', True)-        matchC _  _  (_,     False)     = Nothing+        matchC 0 '\'' _                 = Just (False, False)+        matchC _  _  (True,  _bEscape)  = Nothing -        matchC ix c  (cPrev, True)+        matchC ix c  (False,  bEscape)          | ix < 1                       = Nothing-         | c == '\'' && cPrev == '\\'   = Just ('\'', True)-         | c == '\''                    = Just (c,    False)-         | otherwise                    = Just (c,    True)+         | c == '\'', bEscape           = Just (False, False)+         | c == '\''                    = Just (True,  False)+         | c == '\\', bEscape           = Just (False, False)+         | c == '\\'                    = Just (False, True)+         | otherwise                    = Just (False, False)          acceptC ('\'' : cs)                    = case readChar cs of                 Just (c, "\'")          -> Just c                 _                       -> Nothing -        acceptC _                       = Nothing+        acceptC _                       =  Nothing  {-# SPECIALIZE INLINE      scanHaskellChar
inchworm.cabal view
@@ -1,5 +1,5 @@ name:           inchworm-version:        1.0.1.1+version:        1.0.2.1 license:        MIT license-file:   LICENSE author:         The Inchworm Development Team