count-0.0.1: Bijective mappings between values and possibly infinite prefixes of [0..]

Safe HaskellSafe-Inferred

Data.Count

Synopsis

Documentation

class Countable a whereSource

Class and instances for producing Counters by type.

toPos :: Countable a => a -> IntegerSource

Overloaded cToPos.

fromPos :: Countable a => Integer -> aSource

Overloaded cFromPos.

count :: Countable a => a -> Maybe IntegerSource

Overloaded cCount. Doesn't attempt to reduce the dummy value given.

allValues :: Countable a => [a]Source

Overloaded allValuesFor.