Commits

Lennart Kolmodin committed b0bb818

Implement <?>

Comments (0)

Files changed (1)

Data/Attoparsec/Internal.hs

 (<?>) :: Parser a
       -> String                 -- ^ the name to use if parsing fails
       -> Parser a
-p <?> _msg = p
+p <?> msg = Parser $ \s kf ks -> runParser p s (\s' strs m -> kf s' (msg:strs) m) ks
 {-# INLINE (<?>) #-}
 infix 0 <?>