logo       

[GHC] #734: Spurious type variable scope error report: msg#00132

lang.haskell.glasgow.bugs

Subject: [GHC] #734: Spurious type variable scope error report

#734: Spurious type variable scope error report
----------------------------------------+-----------------------------------
Reporter: red5_2@xxxxxxxxxxx | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 6.4.1
Severity: normal | Keywords:
Os: Linux | Difficulty: Unknown
Architecture: x86_64 (amd64) |
----------------------------------------+-----------------------------------
A spurious error message about a variable being out of scope can be
triggered by a kind error. The kind error and scope error need not occur
in the same function.

This code reproduces the error:

{{{
data Val v sm = Val
foo :: forall v sm. Val v sm
foo = undefined
where foo1 :: Val v sm
foo1 = bar
-- Correct type signature: bar :: forall v sm. Val v sm
bar :: forall v. Val v
bar = undefined foo
}}}

The reported error looks like this:

{{{
GHC internal error: `v' is not in scope
In the type signature: foo1 :: Val v sm
In the definition of `foo':
foo = undefined
where
foo1 :: Val v sm
foo1 = bar
}}}

A kind error is also reported for the type signature of `bar`.

--
Ticket URL: <http://cvs.haskell.org/trac/ghc/ticket/734>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise