2 ms·
Actually, a lot has been done and a lot is coming in the near future. GHC 8.0 brought us `DuplicateRecordFields`, so that we can finally use the same field name
by harpocrates 10y ago
Actually, a lot has been done and a lot is coming in the near future. GHC 8.0 brought us `DuplicateRecordFields`, so that we can finally use the same field name for two records.
There is active work done by Adam Gundry to extend this even further [1]. The key part of this is that there will be a new type class so that I can express as a constraint that a type must have a field with a certain name and with a certain type.
Further in the future, but still actively discussed is using overloaded labels as lenses [2]. Past that, I can't imagine anything else I would want records to do.
[1] https://github.com/adamgundry/ghc-proposals/blob/overloaded-record-fields/proposals/0000-overloaded-record-fields.rst https://github.com/adamgundry/ghc-proposals/blob/overloaded-...
[2] http://stackoverflow.com/questions/38136144/replace-record-projection-function-with-lenses http://stackoverflow.com/questions/38136144/replace-record-p...