[Hugs-users] NamedFieldPuns in HugsMode

Anthony Clayden anthony.d.clayden at gmail.com
Tue May 17 09:10:51 UTC 2022


There's an (AFAICT) undocumented feature in Hugs, which behaves the same as
GHC -XNamedFieldPuns

>    data Thing a = MkThing {field :: a}
>    foo MkThing{ field } = field
>    --           ^^^^ shorthand for { field = field }


AntC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/hugs-users/attachments/20220517/bf7bc84c/attachment.html>


More information about the Hugs-Users mailing list