type-level-0.2.4: Type-level programming library

Portabilitynon-portable (non-standard instances)
Stabilityexperimental
Maintaineralfonso.acosta@gmail.com
Safe HaskellNone

Data.TypeLevel.Num.Sets

Description

Type-level numerical sets. Currently there is only support for Naturals and Positives.

Synopsis

Documentation

class PosI n => Pos n

Positives (Naturals without zero)

Instances

PosI n => Pos n 

class NatI n => Nat n

Naturals (Positives and zero)

Instances

NatI n => Nat n 

toNum :: (NatI n, Num a) => n -> a

Reflecting function

toInt :: Nat n => n -> Int

Less generic reflecting function (Int)

reifyIntegral :: Integral i => i -> (forall n. Nat n => n -> r) -> r

Reification function. In CPS style (best possible solution)