MyNixOS website logo
Description

A promoted and singled version of the base library.

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.6). For more information, consult the singletonsREADME.

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.

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.6). For more information, consult the singletonsREADME.

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.
Metadata

Version

3.2

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows