An Enum class that fixes some deficiences with Prelude's Enum

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

MIT licensed by Clinton Mead
Maintained by

The default Enum class has a couple of issues that limit it's flexibility namely:

1) The "Enum" type must be always "Int", even when this loses information, such as in the case of "Integer" (due to overflow) and "Rational" (in the case of fractions).

2) "enumFromTo" etc like functions can only produce lists, instead of directly producing other list like data types. Aside from effeciency, using a list as an intermediary can lose information also.

The Enum class this package defines should be largely a drop in replacement for Prelude's Enum, with some minor exceptions detailed in the documentation.

Depends on:
Used by 1 package:
comments powered byDisqus