[GHC] #2256: Incompleteness of type inference: must quantify over implication constraints

GHC ghc-devs at haskell.org
Fri Dec 5 23:53:03 UTC 2014


#2256: Incompleteness of type inference: must quantify over implication
constraints
-------------------------------------+-------------------------------------
              Reporter:  simonpj     |            Owner:  simonpj
                  Type:  bug         |           Status:  new
              Priority:  lowest      |        Milestone:  7.10.1
             Component:  Compiler    |          Version:  6.8.2
  (Type checker)                     |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  GHC         |  Related Tickets:
  rejects valid program              |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * failure:  None/Unknown => GHC rejects valid program
 * component:  Compiler => Compiler (Type checker)


Comment:

 SPJ: this ticket is not listed on [wiki:Status/SLPJ-Tickets].

 The error message with HEAD (ghc-7.9.20141204):
 {{{
     Could not deduce (Eq b) arising from a use of ‘sig’
     from the context (Eq c)
       bound by the type signature for h :: Eq c => c -> ()
       at test.hs:5:26-40
     Possible fix:
       add (Eq b) to the context of
         the type signature for h :: Eq c => c -> ()
         or the inferred type of g :: b -> ()
     In the expression: sig x y z
     In an equation for ‘h’: h z = sig x y z
     In the expression:
       let
         h :: Eq c => c -> ()
         h z = sig x y z
       in ()
 }}}

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


More information about the ghc-tickets mailing list