forked from purescript/purescript-enums
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate Enum/Finite classes, fix bugs in the Maybe instance, and add…
… Unit instance * First pass mostly blindly converting things, type checks * add Unit * update docs * fix maybeEnum pred * duh... I just wrote id * fix maybeEnum succ * these laws also need to move to Finite * update docs * Finite -> BoundedEnum * move to/fromEnum to BoundedEnum and make it build, added a couple of TODOs for funny things * add defaultCardinality * add Ord constraing on Enum * add upFrom, downFrom * use the Ord instance to implement enumFromTo (and make it more general while we're at it), we probably shouldn't be exposing the int functions from Data.Enum? * enumEither does need both to be BoundedEnum, remove the comment questioning it * we do need BoundedEnum for the to/fromEnum stuff on Tuple, but we can relax the Enum definition a bit * w/ to/fromEnum in BoundeEnum we do indeed need it here * fix copy/paste error in enumTuple * w/ to/fromEnum in BoundeEnum we do indeed need it here
- Loading branch information
Showing
2 changed files
with
141 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters