[GHC] #1901: 6.8.1 incorrectly infers contexts from pattern matches.

GHC trac at galois.com
Fri Nov 16 10:02:28 EST 2007


#1901: 6.8.1 incorrectly infers contexts from pattern matches.
----------------------+-----------------------------------------------------
 Reporter:  guest     |          Owner:          
     Type:  merge     |         Status:  reopened
 Priority:  normal    |      Milestone:          
Component:  Compiler  |        Version:  6.8.1   
 Severity:  normal    |     Resolution:          
 Keywords:            |     Difficulty:  Unknown 
 Testcase:            |   Architecture:  Unknown 
       Os:  Unknown   |  
----------------------+-----------------------------------------------------
Changes (by simonpj):

  * status:  closed => reopened
  * type:  bug => merge
  * resolution:  invalid =>

Comment:

 Aha, that's an excellent point. When compiling this declaration
 {{{
 data Foo a = (Num a) =>  MkFoo a
 }}}
 the HEAD now says
 {{{
 Foo.hs:4:13:
     Data constructor `MkFoo' has existential type variables, or a context,
 or both
       (Use -XExistentialQuantification or -XGADTs to allow this)
     In the data type declaration for `Foo'
 }}}
 Ian, if you feel like adding a test case it might (just) be worth it.

 The patch (which I'm validating now) is this:
 {{{
 Fri Nov 16 14:56:09 GMT 2007  simonpj at microsoft.com
   * FIX Trac #1901: check no existential context in H98 mode
 }}}

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


More information about the Glasgow-haskell-bugs mailing list