Commits

Bryan O'Sullivan committed f9e0a49

Add laziness.

  • Participants
  • Parent commits c7149ae

Comments (0)

Files changed (1)

src/Data/ParserCombinators/Attoparsec/Internal.hs

 parseAt p bs n = 
     case unParser p (mkState bs n) of
       Left (bs', msg) -> (bs', Left $ showError msg)
-      Right (a, S sb lb n') -> (sb +: lb, Right (a, n'))
+      Right (a, ~(S sb lb n')) -> (sb +: lb, Right (a, n'))
     where
       showError [""] = "Parser error\n"
       showError [msg] = "Parser error, expected:\n" ++ msg ++ "\n"