prelude-safeenum

A redefinition of the Prelude's Enum class in order to render it safe.

http://code.haskell.org/~wren/

Version on this page:0.1.1.2
LTS Haskell 22.13:0.1.1.3
Stackage Nightly 2024-03-14:0.1.1.3
Latest on Hackage:0.1.1.3

See all snapshots prelude-safeenum appears in

BSD-3-Clause licensed by wren gayle romano
Maintained by [email protected]
This version can be pinned in stack with:prelude-safeenum-0.1.1.2@sha256:4b15ef19a18c81de292677f8837a92463e9fe335d3f61db394c6cdf782a89762,2158

Module documentation for 0.1.1.2

Depends on 1 package(full list with versions):

A redefinition of the Prelude's Enum class in order to render it safe. That is, the Haskell Language Report defines pred, succ, fromEnum, and toEnum to be partial functions when the type is Bounded, but this is unacceptable. We define a new type-class hierarchy for enumeration which is safe and also generalizes to cover types which can only be enumerated in one direction.