@hackage bin0.1
Bin: binary natural numbers.
Categories
License
GPL-2.0-or-later
Maintainer
Oleg.Grenrus <oleg.grenrus@iki.fi>
Links
Versions
Installation
Tested Compilers
Dependencies (7)
Dependents (5)
@hackage/overloaded, @hackage/ral-lens, @hackage/ral, @hackage/boring, @hackage/ral-optics
This package provides binary natural numbers (Data.Bin);
also utilities to work on the type level with DataKinds (Data.Type.Bin).
data Bin
= BZ -- ^ zero
| BP BinP -- ^ non-zero
data BinP
= BE -- ^ one
| B0 BinP -- ^ double
| B1 BinP -- ^ double plus 1
There are ordinals in Data.Bin.Pos module, as well as
fixed width integers in Data.Wrd.
Another implementation is at https://hackage.haskell.org/package/nat, this differs in naming, and provides promoted variant.