countable

Countable, Searchable, Finite, Empty classes

https://github.com/AshleyYakeley/countable

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

See all snapshots countable appears in

BSD-3-Clause licensed and maintained by Ashley Yakeley
This version can be pinned in stack with:countable-1.0@sha256:965ba98037e9db0798cbc4270683c2cfde93ddc27c49b4634a3b24ba730dd4d5,2175

Module documentation for 1.0

Depends on 1 package(full list with versions):
  • class Countable, for countable types

  • class AtLeastOneCountable, for countable types that have at least one value

  • class InfiniteCountable, for infinite countable types

  • class Searchable, for types that can be searched over. This turns out to include some infinite types, see http://math.andrej.com/2007/09/28/seemingly-impossible-functional-programs/.

  • class Finite, for finite types

  • class Empty, for empty types

  • data Nothing, an empty type

Some orphan instances:

  • (Searchable a,Eq b) => Eq (a -> b)

  • (Finite t) => Foldable ((->) t)

  • (Finite a) => Traversable ((->) a)

  • (Show a,Finite a,Show b) => Show (a -> b)