haskellfoundation / HaskellSchool

Apache License 2.0
51 stars 11 forks source link

Enum and Bounded #48

Closed chris-martin closed 2 years ago

chris-martin commented 2 years ago

This lesson covers the Enum and Bounded classes.

There are not a whole lot of exercises on this one, because there's a pretty limited scope of what you can do with these classes.

I included deriving-via and the generic-data package, in a "don't worry about how this works, but here's how you do it" presentation -- perhaps a bold choice, but it nicely fills in the gaps in GHC's stock deriving capability with little fuss, and I'm personally of the opinion that it's time to start talking about via as a normal thing to use.

Kleidukos commented 2 years ago

I agree with the normalisation of Deriving Via