[GHC] #11099: Incorrect warning about redundant constraints

GHC ghc-devs at haskell.org
Tue Nov 17 01:41:28 UTC 2015


#11099: Incorrect warning about redundant constraints
-------------------------------------+-------------------------------------
           Reporter:  diatchki       |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.11
  (Type checker)                     |
           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:
-------------------------------------+-------------------------------------
 The following program results in an incorrect warning about a redundant
 constraint:

 {{{
 {-# LANGUAGE TypeFamilies #-}

 type family SomeFun a

 f :: (SomeFun i ~ [a], Read a) => proxy i -> a
 f _ = read "HELLO"
 }}}

 This is the warning:
 {{{
 Redundant constraint: SomeFun i ~ [a]
     In the type signature for:
          f :: (SomeFun i ~ [a], Read a) => proxy i -> a
 }}}

 I tried it on GHC version 7.11.20151029

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11099>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list