
#12544: Improved warning for redundant-constraints -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9939 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): I think this already happens. {{{ foo :: (Num a, Integral a) => a -> a foo = (1 +) }}} gives the warning {{{ testtc.hs:1:1: warning: [-Wredundant-constraints] • Redundant constraint: Num a • In the type signature for: foo :: (Num a, Integral a) => a -> a }}} Both constraints are listed in your example as neither is used in the body of the function. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12544#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler