Anonymous
11/9/2025, 2:07:53 AM
No.107148564
>>107148460
>It should be possible to pattern match and construct a tuple with variable type fields.
This is called row polymorphism. There are libraries for this: vinyl, HList, large-anon.
The current record implementation is not quite like that because it's a simple bolted on implementation.
>why not have row polymorphism then
https://github.com/ghc-proposals/ghc-proposals/pull/180
It's yet another stalled GHC proposal because it makes signatures look like ass and it also runs like ass because they aren't data constructors with data like normal records so the proposal stalled.
>It should be possible to pattern match and construct a tuple with variable type fields.
This is called row polymorphism. There are libraries for this: vinyl, HList, large-anon.
The current record implementation is not quite like that because it's a simple bolted on implementation.
>why not have row polymorphism then
https://github.com/ghc-proposals/ghc-proposals/pull/180
It's yet another stalled GHC proposal because it makes signatures look like ass and it also runs like ass because they aren't data constructors with data like normal records so the proposal stalled.