[GHC] #7826: GHC internal error: `a' is not in scope during type checking, but it passed the renamer
GHC
cvs-ghc at haskell.org
Wed Apr 10 13:44:43 CEST 2013
#7826: GHC internal error: `a' is not in scope during type checking, but it passed
the renamer
--------------------------------------+-------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.6.2 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: GHC rejects valid program | Blockedby:
Blocking: | Related:
--------------------------------------+-------------------------------------
In the attached code the following lines give an internal GHC error. At
least this should not happen. I also think this is valid code. Removing
either type annotation makes this code compile.
{{{
bug :: WrappedR Int -> SomeFunction
bug (Wrap node) = case node of
(Memo' (emptyT :: t a b) memoize (Var m) :: R' a b Int) -> -- also
breaks
}}}
{{{
/Users/alessandro/Documents/Uni/thesis/test/bug-tvar-passed-
renamer.hs:14:104:
GHC internal error: `a' is not in scope during type checking, but it
passed the renamer
tcl_env of environment: [(am4,
Identifier[node::R' a b Int, <NotTopLevel>,
1]),
(rgs,
Identifier[bug::WrappedR Int ->
SomeFunction, <NotTopLevel>, 1])]
In the type `R' a b Int'
In a pattern type signature: R' a b Int
In the pattern:
Memo' (emptyT :: t a b)
(memoize :: MVar (t a b) -> (a -> b) -> a -> b)
(Var m :: R' a b Int) :: R' a b Int
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7826>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list