Skip to content

Rename RecordPuns extension to NamedFieldPuns

The NamedFieldPuns has been around for ages. It's in the original Cabal design spec in the extension list. It was implemented in nhc98 for yonks (with the flag -puns). In older ghc it was enables with -frecord-puns.

In ghc-6.8 we split up the -fglasgow-exts flag into lots of separate named extensions. We added an extension RecordPuns for the thing that -frecord-puns had enabled previously not realising that there was already an older name for the same thing, namely NamedFieldPuns.

So I propose that ghc moves to using the standard extension NamedFieldPuns and keeps RecordPuns as a deprecated alias for NamedFieldPuns. Cabal can fix things up so that for ghc-6.8 it maps the NamedFieldPuns extension to -frecord-puns or -XRecordPuns.

The moral of the story here is that all the extensions in Language.Haskell.Extensions should be well documented in that module. For one thing that'd serve as a useful reference for users, but also for compiler hackers to pick consistent names for the same concepts between implementations.

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information