warn-redundant-constraints present as errors
Simon Peyton Jones
simonpj at microsoft.com
Fri Jan 9 09:39:50 UTC 2015
Alan’s point is a bug – I will fix.
Konstantine’s point is reasonable. we could easily say
Language/Haskell/Refact/Utils/TypeUtils.hs:3045:7: Error:
blah blah
(the bit in red is the new bit)
But I’m not sure that everyone else would want that. If a consensus forms it would be easy to excecute
I suppose there could be yet another flag to control it (!)
Simon
From: Konstantine Rybnikov [mailto:k-bx at k-bx.com]
Sent: 09 January 2015 09:19
To: Alan & Kim Zimmerman
Cc: ghc-devs at haskell.org; Simon Peyton Jones
Subject: Re: warn-redundant-constraints present as errors
On a slightly unrelated note I should say it would be great to have errors contain word "Error:". This is especially nice to have because when you build with "-j" your error that stops compilation gets lost somewhere in the middle of many warnings (which my projects have, unfortunately).
On Thu, Jan 8, 2015 at 11:45 PM, Alan & Kim Zimmerman <alan.zimm at gmail.com<mailto:alan.zimm at gmail.com>> wrote:
This is a great feature, here is some feedback
My syntax highlighter in emacs expects warnings to have the word "warning" in them.
So for the two warnings reported below, the first is highlighted as an error, and the second as a warning
Language/Haskell/Refact/Utils/TypeUtils.hs:3036:17:
Redundant constraint: SYB.Data t
In the type signature for:
duplicateDecl :: SYB.Data t =>
[GHC.LHsBind GHC.Name]
-> t -> GHC.Name -> GHC.Name -> RefactGhc [GHC.LHsBind GHC.Name]
Language/Haskell/Refact/Utils/TypeUtils.hs:3045:7: Warning:
Defined but not used: ‘toks
This is in a ghci session, and the file loads without problems, so it is indeed a warning.
Can we perhaps add the word "Warning" to the output for Redundant constraints?
I also had a situation where it asked me to remove a whole lot of constraints from different functions, I did them in batches, so did not remove them all from the file at once, and at some point I had to add at least one of them back, albeit based on an error message.
Regards
Alan
_______________________________________________
ghc-devs mailing list
ghc-devs at haskell.org<mailto: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/20150109/8315b678/attachment-0001.html>
More information about the ghc-devs
mailing list