[commit: ghc] master: Tweak the way UsageErrors are constructed (d2bb477)
Ian Lynagh
igloo at earth.li
Wed Jun 13 17:17:01 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d2bb4777b7d70d99d4c72398796fb1ecfb0b3efa
>---------------------------------------------------------------
commit d2bb4777b7d70d99d4c72398796fb1ecfb0b3efa
Author: Ian Lynagh <igloo at earth.li>
Date: Wed Jun 13 12:59:06 2012 +0100
Tweak the way UsageErrors are constructed
Using 'unlines' meant that we get a trailing newline, which gave
different output.
>---------------------------------------------------------------
compiler/main/CmdLineParser.hs | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs
index 1d83c44..c6d07ce 100644
--- a/compiler/main/CmdLineParser.hs
+++ b/compiler/main/CmdLineParser.hs
@@ -243,5 +243,6 @@ missingArgErr f = Left ("missing argument for flag: " ++ f)
errorsToGhcException :: [Located String] -> GhcException
errorsToGhcException errs =
- UsageError $ unlines [ showUserSpan True l ++ ": " ++ e | L l e <- errs ]
+ UsageError $
+ intercalate "\n" [ showUserSpan True l ++ ": " ++ e | L l e <- errs ]
More information about the Cvs-ghc
mailing list