type-level-0.2.3: Type-level programming library

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

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 Source

Positives (Naturals without zero)

Instances

PosI n => Pos n 

class NatI n => Nat n Source

Naturals (Positives and zero)

Instances

NatI n => Nat n 

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

Reflecting function

toInt :: Nat n => n -> IntSource

Less generic reflecting function (Int)

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

Reification function. In CPS style (best possible solution)