From da70e00e3b1b743bbe7b7166a336dac847baab0a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 8 Dec 2008 17:15:02 +0000 Subject: [PATCH] make fromparse utility show the parse error --- Ledger/Utils.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ledger/Utils.hs b/Ledger/Utils.hs index a544f8db6..dcc26a04e 100644 --- a/Ledger/Utils.hs +++ b/Ledger/Utils.hs @@ -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)