[GHC] #6074: Instance inference failure with GADTs

GHC cvs-ghc at haskell.org
Fri May 4 15:20:39 CEST 2012


#6074: Instance inference failure with GADTs
---------------------------------+------------------------------------------
    Reporter:  goldfire          |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.5             
    Keywords:  GADTs             |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by goldfire):

  * type:  bug => feature request


Comment:

 Yes, I was worried about all of these problems when I made the post. It
 seems possible to circumvent the problem michalt brings up with some
 strictness guarantee to eliminate the possibility of {{{undefined}}} and
 friends. And, in truth, my situation is the one dreixel points out, where
 I'm using a closed data kind.

 But, of course, simonpj's point is well taken and was my chief worry. I
 guess my best hope would be that there could be some construct that
 produces the pattern-match automatically when given the term to match over
 and the branch expression. In fact, I played around writing some such
 construct in Template Haskell, but TH doesn't have access to inferred
 types of expressions, so it's quite clunky to use.

 I doubt there's much interest in this particular feature, so I'll just
 change the ticket to be a feature request and go back to the drawing board
 on my own design. Thanks for the feedback.

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



More information about the Glasgow-haskell-bugs mailing list