universe-base-1.0.2.1: A class for finite and recursively enumerable types and some helper functions for enumerating them

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Universe.Class

Synopsis

Documentation

Bottoms are ignored for this entire module: only fully-defined inhabitants are considered inhabitants.

class Universe a where Source

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.

Minimal complete definition

Nothing

Methods

universe :: [a] Source

class Universe a => Finite a where Source

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.

Minimal complete definition

Nothing

Methods

universeF :: [a] Source