#3409: type variable out of scope in worker/wrapper transformation
-----------------------------------------------+----------------------------
Reporter: judahj | Owner: chak
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.3
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Testcase: typecheck/should_compile/T3409 | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
-----------------------------------------------+----------------------------
Changes (by simonpj):
* testcase: => typecheck/should_compile/T3409
* status: new => closed
* resolution: => fixed
Comment:
In fact it's as I said. Fixed by
{{{
Thu Aug 13 09:11:54 PDT 2009 [email protected]
* Fix Trac #3409: type synonyms that discard their arguments
Type synonyms that don't mention one of their type parameters on the
RHS are a pain in the neck. This patch fixes a long-standing bug (that
simply has not appeared before) in that exprType could return a type
mentioning an existentially-quantified variable (in one of those ignored
argument positions).
See CoreUtils Note [Existential variables and silly type synonyms]
The fix is not entirely beautiful, but it works, and is very localised.
M ./compiler/coreSyn/CoreUtils.lhs -1 +32
M ./compiler/types/Type.lhs -1 +24
}}}
I checked that the original test, and the examples you gave subsequentlyl,
all work fine with the patch applied.
Thanks for identifying this bug.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3409#comment:6>
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