[GHC] #2141: Internal error on invalid record update

GHC trac at galois.com
Fri Mar 7 10:51:39 EST 2008


#2141: Internal error on invalid record update
------------------------+---------------------------------------------------
    Reporter:  rl       |       Owner:          
        Type:  bug      |      Status:  new     
    Priority:  normal   |   Component:  Compiler
     Version:  6.8.2    |    Severity:  normal  
    Keywords:           |    Testcase:          
Architecture:  Unknown  |          Os:  Unknown 
------------------------+---------------------------------------------------
 A silly function:

 {{{
 foo :: () -> ()
 foo x = x { foo = 1 }
 }}}

 6.8.2 says:

 {{{
 GHC internal error: `foo' is not in scope
 In the expression: x {foo = 1}
 In the definition of `foo': foo x = x {foo = 1}
 }}}

 HEAD's message is a bit more illuminating:

 {{{
 GHC internal error: `foo' is not in scope during type checking, but it
 passed the renamer
 tcg_type_env of environment: []
 In the expression: x {foo = 1}
 In the definition of `foo': foo x = x {foo = 1}
 }}}

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


More information about the Glasgow-haskell-bugs mailing list