[GHC] #12544: Improved warning for redundant-constraints
GHC
ghc-devs at haskell.org
Fri Aug 26 17:41:16 UTC 2016
#12544: Improved warning for redundant-constraints
-------------------------------------+-------------------------------------
Reporter: crockeea | Owner:
Type: feature | Status: new
request |
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Currently,
{{{
foo :: (Num a, Integral a) => a -> a
foo = id
}}}
produces the warning
{{{
Main.hs:1:1: warning: [-Wredundant-constraints]
• Redundant constraints: (Num a, Integral a)
• In the type signature for:
foo :: (Num a, Integral a) => a -> a
}}}
Since GHC can detect there is a redundancy, it would be nice it also told
me which constraint was redundant. In #9939, I suggested that the warning
include something to the effect of `(Num a) is implied by (Integral a)`.
Lets make this as easy for the user as possible.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12544>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list