#2206: GADT pattern match with non-rigid return type
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:  simonpj         
        Type:  bug               |       Status:  closed          
    Priority:  normal            |    Milestone:  6.10 branch     
   Component:  Compiler          |      Version:  6.8.2           
    Severity:  normal            |   Resolution:  fixed           
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:  gadt-escape1      |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Changes (by simonpj):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 Indeed GHC 6.10 now (correctly) reports
 {{{
 $ ghc -c T2206.hs

 T2206.hs:12:51:
     GADT pattern match with non-rigid result type `t'
       Solution: add a type signature
     In a case alternative: Hidden (ExpInt _) a -> a
     In the expression:
         case (hval :: Hidden) of { Hidden (ExpInt _) a -> a }
     In the definition of `weird':
         weird = case (hval :: Hidden) of { Hidden (ExpInt _) a -> a }
 }}}
 which seems like a decent error message.  So I'll close  this one.

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2206#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to