
16 May
2022
16 May
'22
3:09 p.m.
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 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