[Haskell-cafe] instance Enum Double considered not entirely great?

Yitzchak Gale gale at sefer.org
Mon Sep 26 17:52:23 CEST 2011

Chris Smith wrote:
> class Ord a => Range a where...

Before adding a completely new Range class, I would suggest
considering Paul Johnson's Ranged-sets package:


Ranges have many more natural operations, and interactions
with other classes, than you mention.

The Ranged-sets package is well thought out and general.
It distinguishes carefully between discrete and non-discrete
types, and provides appropriate instances for the
standard types.


More information about the Haskell-Cafe mailing list