[GHC] #3621: "No match in record selector Var.tcTyVarDetails" with incorrect multi-parameter newtype derivation

GHC trac at galois.com
Wed Oct 28 13:26:17 EDT 2009


#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:
 {{{
 [pwb at 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


More information about the Glasgow-haskell-bugs mailing list