mauke / data-default

A class for types with a default value
45 stars 16 forks source link

Add GDefault instance for (a :+: b) #21

Open poscat0x04 opened 4 years ago

poscat0x04 commented 4 years ago

The usefulness of the Default class came from its ability to generically derive Default instances. I would argue that adding a GDefault instance for sum types (which selects the first constructor) would further boost its usefulness. Plus we lose nothing from adding this since right now we need to manually write Default instances for sum types anyways.