On Sat, 8 Nov 2014, Richard Eisenberg wrote:
On Nov 8, 2014, at 11:23 AM, "Dr. ERDI Gergo" <ge...@erdi.hu> wrote:
So we would need to add a way of parsing (T1, T2, ..., Tn; U1, U2, ...,
Um) into a type, which would then require rejecting everywhere else
where we really do mean a type... Sounds painful. Also painful:
rewriting the whole context parsing code :/
I actually think this wouldn't be all that hard. The same
parse-as-wrong-AST-node-and-then-fix-it-up-later trick happens in plenty
of places, patterns (parsed as expressions) being one of the biggest.
Harder than my proposal, probably, but I don't think it's terrible.
Right, but the issue in this case is if we add this artifical constructor
to HsType just so we can fix it up into a pair of contexts, this
constructor would permeate everything else that has to do with HsTypes; if
nothing else, it'd need a `panic "foo: HsContextPair"` branch for all
type-related renamer/typechecker functions.
Unless I'm missing some shortcut. I hope I do!
Bye,
Gergo
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs