#3621: "No match in record selector Var.tcTyVarDetails" with incorrect multi-
parameter newtype derivation
-----------------------------+----------------------------------------------
Reporter:  pwb               |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.10.4            |       Severity:  minor           
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 {{{
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 import Control.Monad.State
 newtype WrappedState s a = WS { runWS :: State s a }
     deriving (Monad, MonadState state)
 }}}
 Note that the 'deriving' for {{{MonadState}}} has the wrong variable name.
 It should be rejected with something like "not in scope: type variable
 'state'" but instead this happens:
 {{{
 [...@rhuidean tmp]$ ghc bug.hs
 ghc: panic! (the 'impossible' happened)
   (GHC version 6.10.4 for x86_64-unknown-linux):
         No match in record selector Var.tcTyVarDetails
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3621>
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