#1072: Core Lint Errors: in result of Desugar
----------------------+-----------------------------------------------------
Reporter: guest | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.7
Severity: minor | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: x86
Os: Windows |
----------------------+-----------------------------------------------------
Changes (by simonpj):
* severity: normal => minor
* version: 6.6 => 6.7
* owner: => simonpj
Comment:
Excellent example. This is the same problem as the failure in
maessen_hashtab. It's also closely related to #930
Here's what is happening (mainly notes to me). The newtype for
WrapIOMonad is getting "trimmed" by `TidyPgm`; but occurrences of
WrapIOMonad in the types of Ids are *not* trimmed. Then when we compare
types, the comparing function (Type.coreEqType) looks through the newtype
on one side but not the other.
I've made a temporary solution for GHC 6.6, by making coreEqType first
expand synonyms and notes, then look for equal `TyCons`, then expand
newtypes. But it's a hack, and can be fooled (by nested newtypes, for
example). The hack is enough to make this program work, however.
The HEAD has a different solution: do not make newtypes transparent at
all. I think that works ok, but I'm still uneasy about the fact that a
given `TyCon` can appear in two different forms in the same compilation.
So I'm going to leave this open, but at low priority.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1072>
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