#981: implicit parameters, type synonyms, and $
-----------------------------+----------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 6.6
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Testcase: tc222 | Architecture: Unknown
Os: MacOS X |
-----------------------------+----------------------------------------------
Changes (by simonpj):
* resolution: => fixed
* testcase: => tc222
* status: new => closed
Comment:
Well this one was harder than it looks. The culprit, again, was an
impredicative use of ($), in the definition of f. However, this was
confused and concealed by a bug that meant that some parts of the type
checker weren't recognising `(?x::Int => stuff)` as a polytype, because it
doesn't have any leading foralls.
It's a bit unclear to me why 6.4.2 accepts this program; indeed it might
even be classed as a bug. I won't investigate that further.
Anyway, since the combination of higher-rank functions and ($) keeps
coming up, I have bitten the bullet, and arranged that all uses of ($) and
similar functions should now work, but allowing information flow left-to-
right among arguments. So in the call `(runST $ foo)`, we first figure
out how to instantiate `($)`'s arguments based on the first arg (`runST`),
and then use that to typecheck the second arg. A version of `($)` with
argument order reversed would not work.
Let's see if that helps.
Meanwhile, this program works fine.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/981>
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