model-0.4.4: Derive a model of a data type using Generics

Safe HaskellSafe
LanguageHaskell2010

Type.ANat

Description

Nats with * kind

Synopsis

Documentation

data ANat (n :: Nat) #

Envelope to get Nats with * kind

Instances

(KnownNat t, Typeable Nat t) => Model (ANat t) #

TypeLits are used to represent data type's parameters.

Methods

envType :: Proxy * (ANat t) -> State Env HType #

anatVal :: KnownNat n => ANat n -> Integer #

Convert a Nat to the corresponding Integer

>>> anatVal (undefined::A5)
5

type A0 = ANat 0 #

type A1 = ANat 1 #

type A2 = ANat 2 #

type A3 = ANat 3 #

type A4 = ANat 4 #

type A5 = ANat 5 #

type A6 = ANat 6 #

type A7 = ANat 7 #

type A8 = ANat 8 #

type A9 = ANat 9 #