
Hi Richard,
I'm not sure if I'm missing something, but my adolescent naivety in
frontend matters would try to reach for
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0155-ty...
and write
MkRec { field = \@a -> ... }
and I hope that will do the right thing. Indeed, I interpret your
proposed `field @a = ...` as much the same.
Sebastian
------ Originalnachricht ------
Von: "Richard Eisenberg"
Hi all,
On a project I'm working on, I wish to declare something like
data Rec = MkRec { field :: forall a. SomeConstraint a => ... }
where the ... contains no mention of `a`.
Even with https://github.com/ghc-proposals/ghc-proposals/pull/448, I think there is no way to avoid the ambiguity when setting `field`. Is that correct? If so, what shall we do about it? The natural answer is somehow to write ... MkRec { field @a = ... } ... but that would break significant new syntactic ground. (Maybe it's good new syntactic ground, but it would still be very new.)
Thanks, Richard