swarm-game / swarm

Resource gathering + programming game
Other
837 stars 52 forks source link

Why is Value defined as a GADT? #331

Closed nanonaren closed 2 years ago

nanonaren commented 2 years ago

Apologies if this is the wrong place to ask this question. Is there a reason Value is defined as GADT? Given that Value has no parameters, does defining it as a GADT still offer some advantage over defining it as an ADT?

byorgey commented 2 years ago

This is a perfectly fine place to ask the question! No, there is no technical advantage to defining Value as a GADT. I just like GADT syntax better than "normal" ADT syntax, that's all. If anyone is curious I'd be happy to explain why.