The Overloaded Record Fields family of extensions for GHC allow multiple record datatypes to share the same field names, and make it possible for type information to disambiguate selectors. In the design as implemented, there is no single
OverloadedRecordFields extension, but there are extensions for
For more information, see:
GHC proposals (most up to date):
- Adding setField to HasField (2018, not yet implemented)
Adding HasField class, changes to OverloadedLabels (2016, implemented in GHC 8.2 without
IsLabel x (r -> a)instance)
Original design (2013)
Content previously on this page has been moved to the SORF page.
See the OverloadedRecordFields label.
Phab:D761, Phab:D1391, Phab:D1486, Phab:D1586, Phab:D1600:
- Phab:D1687, Phab:D2708: magic classes
- Prototype implementation of the magic typeclasses
The extension was implemented in 2013 as a Google Summer of Code project, by Adam Gundry under the mentorship of Simon Peyton Jones.