tfp

Type-level integers, booleans, lists using type families

http://www.haskell.org/haskellwiki/Type_arithmetic

Version on this page:1.0.1.1
LTS Haskell 22.39:1.0.2
Stackage Nightly 2024-10-31:1.0.2
Latest on Hackage:1.0.2

See all snapshots tfp appears in

BSD-3-Clause licensed by Peter Gavin, Henning Thielemann
Maintained by [email protected]
This version can be pinned in stack with:tfp-1.0.1.1@sha256:a150df5ba7c1a389befc48121238f9ed738c0e9123178ea38cf2e3c38a871e0a,2042
Depends on 2 packages(full list with versions):
Used by 1 package in lts-16.11(full list with versions):

TFP is an abbreviation for Type Family Programming. It provides implementations of type-level integers and booleans, and (eventually) simple type-level data structures. It uses type families as functions to produce new types, which provides an intuitive way to parameterize data types and functions on numerical values at compile time.

Changes

1.0:

  • Change representation of decimals to an inherently normalized form that is symmetric with respect to positive and negative numbers.

  • singularize module names

  • separate Decimal and general representation

  • use Proxys instead of plain types for data functions This is also consistent with new Nat kind, where types of kind Nat have no data values.

  • Ord: make infix operators classes and prefix functions type functions It seems to be more natural to me to write x :<: y and GTT x y ~ True

  • Num, Bool, Ord: remove T suffixes from functions Use qualification instead.