Fwd: Changing GHC Error Message Wrapping

Andrew Gibiansky andrew.gibiansky at gmail.com
Sat Jan 4 04:06:06 UTC 2014


Hello,

I'd like to change how the error messages from GHC get wrapped.

I am using the following code:

  flip gcatch handler $ do
    runStmt "let f (x, y, z, w, e, r, d , ax, b ,c,ex ,g ,h) = (x :: Int) +
y + z" RunToCompletion
    runStmt "f (1, 2, 3)" RunToCompletion
    return ()
  where
    handler :: SomeException -> Ghc ()
    handler e =
      liftIO $ putStrLn $ "Exception:\n" ++ show e

The output I am getting looks like this:

[image: Inline image 1]

I would like the types to not wrap at all, or wrap at some very long length
along the lines of 200-300 characters.

I have seen the `pprUserLength` and `pprCols` fields in DynFlags, but they
don't seem to do anything.

What should I do?

Thanks!
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140103/6ac72b6e/attachment.html>


More information about the ghc-devs mailing list