Changing GHC Error Message Wrapping

Carter Schonwald carter.schonwald at gmail.com
Sat Jan 4 06:05:48 UTC 2014


hey andrew, your image link isn't working (i'm using gmail)


On Fri, Jan 3, 2014 at 11:06 PM, Andrew Gibiansky <
andrew.gibiansky at gmail.com> wrote:

>
>
> 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
>
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20140104/98def30e/attachment.html>


More information about the ghc-devs mailing list