git.iko.soy/typeable/attoparsec
on master help sign in
Print more useful error message if string match fails.
commit4446e5b53d3d7014d7db78c8313601184d5fdf7c authorBryan O'Sullivan <bos@serpentine.com> dateMon 29 Jan 2007, 20:51 (20 years ago) parentaad76c9
1 file changed+2−1
src/Text/ParserCombinators/ByteStringParser.hs+2−1
src/Text/ParserCombinators/ByteStringParser.hs+2−1
@@ -122,7 +122,8 @@ char c = satisfy (== c) <?> [c]
122122
123123string :: String -> Parser C.ByteString String
124124
125−string = mapM char
125+string s = mapM char s
126+ <?> show s
126127
127128count :: Int -> Parser st a -> Parser st [a]
128129