ambiguous record field (but not *that* kind of ambiguous record field)
Richard Eisenberg
lists at richarde.dev
Mon May 16 19:09:33 UTC 2022
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20220516/de4808aa/attachment.html>
More information about the ghc-devs
mailing list