TypeNat-0.1.0.0: Some Nat-indexed types for GHC

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.TypeNat.Nat

Synopsis

Documentation

data Nat Source

Constructors

Z 
S Nat 

class IsNat n where Source

Proof that a given type is a Nat. With this fact, you can do type-directed computation.

Methods

natRecursion :: (forall m. b -> a m -> a (S m)) -> (b -> a Z) -> (b -> b) -> b -> a n Source

Instances

IsNat Z 
IsNat n => IsNat (S n) 

type One = S Z Source

type Two = S One Source

type Three = S Two Source

type Five = S Four Source

type Six = S Five Source

type Seven = S Six Source

type Ten = S Nine Source