3 ms·
If you are using GHC, the newest version (8.0.1) actually supports duplicate record fields with the [DuplicateRecordFields](https://downloads.haskell.org/~ghc/l
by harpocrates 10y ago
If you are using GHC, the newest version (8.0.1) actually supports duplicate record fields with the [DuplicateRecordFields](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#duplicate-record-fields https://downloads.haskell.org/~ghc/latest/docs/html/users_gu...) extension. Check it out!
- kinkdr 10y agoAhh awesome! Thanks!
- pyrale 10y agoNice ! Does it work well with lenses ?
- rfergie 10y agoSo you can do something like this: data Foo = Foo { _bar :: String } data Buzz = Buzz {_bar :: String} And derive lenses? I think it doesn't - this is more than just a duplicate record name, you also end up with a duplicate `bar` lens