An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

type-level

This library permits performing computations on the type-level. Type-level functions are implemented using functional dependencies of multi parameter type classes. To date, Booleans and Numerals (Naturals and Positives) are supported. With regard to Numerals, there is support for common arithmetic operations (addition, substraction, multiplication, division, exponientation, logarithm, maximum, comparison, GCD) over natural numbers (using a decimal representation to make compile-time errors friendlier). Although making use of type-level computations might seem devious and obfuscated at first sight, it is indeed useful in practice to implement lightweight dependent types such us number-parameterized types (e.g. an array type parameterized by the array's size or a modular group type Zn parameterized by the modulus). Here is a tutorial on type-level numerals and how to use them to implement numerically-parameterized vectors: https://forsyde.ict.kth.se/trac/wiki/ForSyDe/Haskell/ForSyDeTutorial#FSVec

Ecosystem
hackage.haskell.org
Latest Release
0.3.0
over 9 years ago
Versions
7
Downloads
7,741 total
Dependent Packages
2
Dependent Repos
6
Links
Registry hackage.haskell.org
Homepage Homepage
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:hackage/type-level
spec
License BSD-3-Clause
First Release about 18 years ago
Last Synced 18 days ago
Rankings on hackage.haskell.org
Dependent packages Top 7.2%