Anonymous Records with lenses

This page is to discuss adding support for Nikita Volkov's record design to GHC.



The most important drawbacks of this design relative to other designs are:

  • Support of only a limited subset of Haskell syntax (presumably not an issue if built in to GHC)
  • Lack of support for strict and unpacked fields (a recent version provides entirely strict records, but not per-field strictness control otherwise the number of datatypes explodes)
  • Lack of support for polymorphic (Rank-N) fields
  • Fixed limit on the number of fields (24 in the current implementation, but the implementation can easily be updated to extend this range to an arbitrary amount)

Also, it is questionable whether any record extension should bake in a particular lens type.

Last modified 4 years ago Last modified on Jul 9, 2015 4:12:46 PM