snumber: Integer singletons with flexible representation

[ apache, constraints, library ] [ Propose Tags ]

This provides singletons-style witnesses for type-level integers, and some limited arithmetic operations on them. Instead of working with (invisible, implicitly-passed) KnownNat instances, you can work with (visible, explicitly-mentioned) SNumber values, and can freely convert between the two forms.

This primarily exists in support of dependent-literals-plugin.


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS], 0.2.0, 0.3.0
Change log
Dependencies base (>=4.12 && <4.17), numeric-kinds (>=0.1 && <0.3), type-compare (>=0.1.1 && <0.2) [details]
License Apache-2.0
Copyright 2020-2021 Google LLC
Author Andrew Pritchard <>
Maintainer Andrew Pritchard <>
Category Constraints
Home page
Bug tracker
Source repo head: git clone
Uploaded by AndrewPritchard at 2021-11-05T08:38:04Z
Distributions NixOS:0.3.0
Downloads 215 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-11-05 [all 1 reports]