Olle Fredriksson
Olle Fredriksson
A workaround is to pass `-XNoRoleAnnotations`.
I'm guessing this is the same as https://github.com/stil4m/elm-syntax/issues/29.
Do you mean type applications on the type level as in `List Int` (and not https://ghc.haskell.org/trac/ghc/wiki/TypeApplication)? As far as I know the common approach is to fall back to unification...
It would be interesting cook up some scheme to get more programs to typecheck, e.g. to treat arguments to instances of the `Functor` and `Contravariant` classes covariantly and contravariantly, but...
Yeah, that might work. :) If you haven't already it might be useful to look into how GHC does the `Coercible` class with "roles" and role inference for type parameters....
For higher-kinded types, e.g. `f a` where `f` is unknown, I think the best you can do is to treat it invariantly (since `f` might be instantiated to both co-...
I mean unification. Tangent: I quite like the approach of elaborating to a core language, e.g. System F_omega (like GHC does), during type-checking, because that'll guide the implementation towards something...
I think the reason for this is that when Earley builds its result lists, it will add later results to the start of the list. Intuitively, we start with ```...
Hmm, okay, it's been a while so I may be getting the details wrong.
Cool! I wonder if you could implement the same on a grammar from this library. :)