ghc-typenats-bits: Bitwise operations on type-level natural numbers

[ data, library, mit, types ] [ Propose Tags ] [ Report a vulnerability ]

Provides extra bitwise operations on type-level GHC.TypeNats.Naturals, comparable to the functions in Data.Bits.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0
Change log CHANGELOG.md
Dependencies base (>=4.20 && <5) [details]
Tested with ghc ==9.14, ghc ==9.12, ghc ==9.10
License MIT
Author Ben Orchard
Maintainer Ben Orchard <thefirstmuffinman@gmail.com>
Uploaded by raehik at 2026-09-14T20:34:28Z
Category Types, Data
Home page https://github.com/raehik/ghc-typenats-bits#readme
Bug tracker https://github.com/raehik/ghc-typenats-bits/issues
Source repo head: git clone https://github.com/raehik/ghc-typenats-bits
Distributions
Downloads 3 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for ghc-typenats-bits-0.1.0

[back to package description]

ghc-typenats-bits

Do you feel sad at the lack of bitwise functions for Haskell type-level natural numbers? Me too. It's OK. Please enjoy this library. Includes such classics as:

  • left shift
  • logical right shift
  • XOR

Why?

I need these definitions in multiple libraries (e.g. type-level-prng, a WIP generics lib), and they appear to have gone undefined on Hackage.

License

Provided under the MIT license. See LICENSE for license text.