Holmusk / elm-street

:deciduous_tree: Crossing the road between Haskell and Elm
Mozilla Public License 2.0
88 stars 6 forks source link

Record sum types are not that bad #127

Open HugoPeters1024 opened 2 years ago

HugoPeters1024 commented 2 years ago

I'm not sure if it is perhaps also difficult to implement, but I find not supporting sum record types because they are bad practice, as you put it, a bit arbitrary. I'm currently working on a project where I want to serialize somebody else's types which happen to contain a sum record, but now I'm stuck.

I would also make the argument that it's not that bad, even GHC itself has a few examples.

Let me know what you think