singletons-base: A promoted and singled version of the base library

[ bsd3, dependent-types, library ] [ Propose Tags ]

singletons-base uses singletons-th to define promoted and singled functions from the base library, including the Prelude. This library was originally presented in Dependently Typed Programming with Singletons, published at the Haskell Symposium, 2012. (https://richarde.dev/papers/2012/singletons/paper.pdf) See also the paper published at Haskell Symposium, 2014, which describes how promotion works in greater detail: https://richarde.dev/papers/2014/promotion/promotion.pdf.

WARNING: singletons-base defines orphan instances for Sing, SingKind, etc. for common types such as Bool, [], Maybe, etc. If you define instances of these types in your code, you will likely not be able to use that code with singletons-base.

singletons-base uses code that relies on bleeding-edge GHC language extensions. As such, singletons-base only supports the latest major version of GHC (currently GHC 9.2). For more information, consult the singletons README.

You may also be interested in the following related libraries:

  • The singletons library is a small, foundational library that defines basic singleton-related types and definitions.

  • The singletons-th library defines Template Haskell functionality that allows promotion of term-level functions to type-level equivalents and singling functions to dependently typed equivalents.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 3.0, 3.1
Change log CHANGES.md
Dependencies base (>=4.16 && <4.17), pretty, singletons (==3.0.1), singletons-th (>=3.1 && <3.2), template-haskell (>=2.18 && <2.19), text (>=1.2), th-desugar (>=1.13 && <1.14) [details]
License BSD-3-Clause
Author Richard Eisenberg <rae@cs.brynmawr.edu>, Jan Stolarek <jan.stolarek@p.lodz.pl>
Maintainer Ryan Scott <ryan.gl.scott@gmail.com>
Revised Revision 1 made by ryanglscott at 2022-03-29T21:34:26Z
Category Dependent Types
Home page http://www.github.com/goldfirere/singletons
Bug tracker https://github.com/goldfirere/singletons/issues
Source repo this: git clone https://github.com/goldfirere/singletons.git(tag v3.1)(singletons-base)
head: git clone https://github.com/goldfirere/singletons.git -b master(singletons-base)
Uploaded by ryanglscott at 2021-10-31T01:46:38Z
Distributions LTSHaskell:3.0, NixOS:3.0, Stackage:3.1
Downloads 837 total (59 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 singletons-base-3.1

[back to package description]

singletons-base

Hackage

singletons-base uses singletons-th to define promoted and singled functions from the @base@ library, including the Prelude. This library was originally presented in Dependently Typed Programming with Singletons, published at the Haskell Symposium, 2012. See also the paper published at Haskell Symposium, 2014, which describes how promotion works in greater detail.

WARNING: singletons-base defines orphan instances for Sing, SingKind, etc. for common types such as Bool, [], Maybe, etc. If you define instances of these types in your code, you will likely not be able to use that code with singletons-base.

singletons-base uses code that relies on bleeding-edge GHC language extensions. As such, singletons-base only supports the latest major version of GHC (currently GHC 9.2). For more information, consult the singletons README.

You may also be interested in the following related libraries:

  • The singletons library is a small, foundational library that defines basic singleton-related types and definitions.
  • The singletons-th library defines Template Haskell functionality that allows promotion of term-level functions to type-level equivalents and singling functions to dependently typed equivalents.