universe-1.0: Classes for types where we know all the values

Safe HaskellNone
LanguageHaskell2010

Data.Universe

Synopsis

Documentation

A convenience module that imports the submodules Instances.Base, Instances.Extended, and Instances.Trans to provide instances of Universe and Finite for a wide variety of types.

class Universe a where #

Creating an instance of this class is a declaration that your type is recursively enumerable (and that universe is that enumeration). In particular, you promise that any finite inhabitant has a finite index in universe, and that no inhabitant appears at two different finite indices.

Methods

universe :: [a] #

class Universe a => Finite a where #

Creating an instance of this class is a declaration that your universe eventually ends. Minimal definition: no methods defined. By default, universeF = universe, but for some types (like Either) the universeF method may have a more intuitive ordering.

Methods

universeF :: [a] #