How does topological sorting of kind variables really work?
Simon Peyton Jones
simonpj at microsoft.com
Wed Apr 13 09:17:03 UTC 2016
| > It's a bit of a shame that type inference doesn't give you a reliable
| > order, but I suppose if you rely on -XTypeApplications working a
| > certain way, you're taking a risk by NOT using a forall.
|
| Inference is meant to give you a reliable ordering. If it's not, that's a
| bug!
I thought that inferred foralls are Invisible binders (see Note [TyBinders and VisibilityFlags]); and you can't use visible type application for Invisible binders.
I thought that was because it's hard to specify the order of inferred type variable, just as Ryan says.
So /is/ inference meant to give a reliable ordering? If so why?
Also I don't understand why Ryan needs a reliable ordering.
So you can see I'm a bit confused here
Simon
More information about the ghc-devs
mailing list