#3155: TypeOperators/Rank2Types clash
--------------------------------------+-------------------------------------
Reporter: MartijnVanSteenbergen | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
--------------------------------------+-------------------------------------
Changes (by simonpj):
* difficulty: => Unknown
Comment:
It's not clear what is the right thing to do. In principle, if you have
type operators, but not rank-n types, then the type you wrote could mean
{{{
unR :: forall f d ix r s. (d (f ix)(r ix) -> ix) -> AnyR s r -> Any s
}}}
where I have used `f` instead of `forall`, and `d` instead of `(.)`. I
made these substitutions because with `TypeOperators` but without
`RankNTypes` that's what GHC sees.
That's a legitimate type signature, and it gives rise to the message you
saw.
I suppose we could permanently remove `(.)` from what a "type operator"
can be, since anyone using type operators will also be familiar with
rank-n types, so re-using `(.)` as an operator seems confusing. That might
help.
Does anyone have other ideas?
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3155#comment:1>
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