Re: [ghc-proposals] Allow reserved identifiers as fields ...

Ivan Perez <[email protected]>
Newsgroups gmane.comp.lang.haskell.cafe
Message-ID <CACZKWE+jay=LWm5sc3NaK96GpTgCFYZ4iA4KfU4BEP2AnpH50w@mail.gmail.com>
>
> On Thu, Dec 26, 2024 at 9:24 AM Jons Mostovojs <[email protected]> wrote:
>>
>>> Dear Ivan,
>>>
>>> I normally don't post, but I got quite scared after reading your
>>> commentary of the proposal.
>>>
>>> However, upon closer inspection, it became evident that it doesn't allow
>>> overriding keywords as your post suggested.
>>>
>>>
>>> (While the changes to *fbind* allow more record constructions
>>> to parse, a construction such as ``C { type = e }}`` or ``C { foo.bar =
>>> e }``
>>> will continue to be rejected during name resolution.)
>>>
>>>
It's literally from the motivating example (bold mine):

@parsonsmatt commented on Jul 22
>
> "This should enable the use of HasField "type" s a instances to be used
> with OverloadedRecordDot -* foo.type.*"


https://github.com/ghc-proposals/ghc-proposals/pull/668#issue-2423570608

https://gitlab.haskell.org/ghc/ghc/-/issues/24174

Both of those seem to indicate that a construction like *foo.type* would be
allowed with that extension on. Not *foo."type"*, but *foo.type*.

Also, I think we should strongly reconsider the choices being made in
language design if anyone is seriously considering that, to avoid having to
write foo.type_ the way to go is to design an extension that would have
people write foo."type"

Ivan

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.