make fromparse utility show the parse error

This commit is contained in:
Simon Michael 2008-12-08 17:15:02 +00:00
parent 59c9dde458
commit da70e00e3b

View File

@ -208,7 +208,7 @@ parsewith :: Parser a -> String -> Either ParseError a
parsewith p ts = parse p "" ts
fromparse :: Either ParseError a -> a
fromparse = either (\_ -> error "parse error") id
fromparse = either (\e -> error $ "ledger parse error at "++(show e)) id
nonspace :: GenParser Char st Char
nonspace = satisfy (not . isSpace)