bin

Bin: binary natural numbers.

https://github.com/phadej/vec

Version on this page:0.1@rev:2
LTS Haskell 18.5:0.1.1
Stackage Nightly 2021-08-01:0.1.1
Latest on Hackage:0.1.1

See all snapshots bin appears in

GPL-2.0-or-later licensed by Oleg Grenrus
Maintained by Oleg.Grenrus
This version can be pinned in stack with:bin-0.1@sha256:d0ab4d2b00abe1d6312186a100c658248ec67c1bb2573057aa797b6d4c89bffe,2058

Module documentation for 0.1

Used by 2 packages in lts-16.11(full list with versions):

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.

Changes

Version history for bin

0.1

  • First version. Released on an unsuspecting world.