1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
name: type-level
version: 0.2.4
cabal-version: >= 1.2
build-type: Simple
license: BSD3
license-file: LICENSE
copyright:
Copyright (c) 2008 Alfonso Acosta, Oleg Kiselyov, Wolfgang Jeltsch
and KTH's SAM group
author: Alfonso Acosta
maintainer: alfonso.acosta@gmail.com
homepage: http://code.haskell.org/type-level
stability: alpha
package-url: http://code.haskell.org/type-level
synopsis: Type-level programming library
description:
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: <http://www.ict.kth.se/forsyde/files/tutorial/tutorial.html#FSVec>
category: Data
tested-with: GHC==6.10.4
extra-source-files: LICENSE,
README
-- depends on ghc due to the use of infix type constructors and template haskell
Library
build-depends: base >=4 && <6, template-haskell > 2.0, syb
hs-source-dirs: src
exposed-modules: Data.TypeLevel,
Data.TypeLevel.Bool,
Data.TypeLevel.Num,
Data.TypeLevel.Num.Reps,
Data.TypeLevel.Num.Aliases,
Data.TypeLevel.Num.Sets,
Data.TypeLevel.Num.Ops,
Data.TypeLevel.Num.Aliases.TH
ghc-options: -Wall
if os(win32)
-- The symbols for the zillion type level numbers overflows the Windows DLL symbol space.
cpp-options: -DSLIM
|