typelevel-1.2.2: Useful type level operations (type families and related operators).

Safe HaskellNone
LanguageHaskell2010

Type.Promotion

Description

Deprecated: Use Type.Known instead

Documentation

class Known (t :: k) (val :: *) where Source #

Minimal complete definition

typeVal

Methods

typeVal :: Proxy t -> val Source #

Instances

(~) * val Bool => Known Bool False val Source # 

Methods

typeVal :: Proxy False val -> val Source #

(~) * val Bool => Known Bool True val Source # 

Methods

typeVal :: Proxy True val -> val Source #

(Num i, KnownNat t) => Known Nat t i Source # 

Methods

typeVal :: Proxy t i -> val Source #

(~) * val (Maybe a2) => Known (Maybe a1) (Nothing a1) val Source # 

Methods

typeVal :: Proxy (Nothing a1) val -> val Source #

Known [k] ([] k) [a] Source # 

Methods

typeVal :: Proxy [k] [a] -> val Source #

((~) * val (Maybe a2), Known a1 t a2) => Known (Maybe a1) (Just a1 t) val Source # 

Methods

typeVal :: Proxy (Just a1 t) val -> val Source #

(Known a1 t a2, Known [a1] ts [a2]) => Known [a1] ((:) a1 t ts) [a2] Source # 

Methods

typeVal :: Proxy ((a1 ': t) ts) [a2] -> val Source #

((~) * val (Either l r), Known b t r) => Known (Either a b) (Right a b t) val Source # 

Methods

typeVal :: Proxy (Right a b t) val -> val Source #

((~) * val (Either l r), Known a t l) => Known (Either a b) (Left a b t) val Source # 

Methods

typeVal :: Proxy (Left a b t) val -> val Source #

class KnownNats (nats :: [Nat]) where Source #

Minimal complete definition

natVals

Methods

natVals :: Proxy nats -> [Integer] Source #

Instances

KnownNats ([] Nat) Source # 

Methods

natVals :: Proxy [Nat] [Nat] -> [Integer] Source #

(KnownNat n, KnownNats ns) => KnownNats ((:) Nat n ns) Source # 

Methods

natVals :: Proxy [Nat] ((Nat ': n) ns) -> [Integer] Source #