typelevel-1.2.3: 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 #

Methods

typeVal :: Proxy t -> val Source #

Instances
val ~ Bool => Known False val Source # 
Instance details

Defined in Type.Promotion

Methods

typeVal :: Proxy False -> val Source #

val ~ Bool => Known True val Source # 
Instance details

Defined in Type.Promotion

Methods

typeVal :: Proxy True -> val Source #

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

Defined in Type.Promotion

Methods

typeVal :: Proxy t -> i Source #

val ~ Maybe a2 => Known (Nothing :: Maybe a1) val Source # 
Instance details

Defined in Type.Promotion

Methods

typeVal :: Proxy Nothing -> val Source #

Known ([] :: [k]) [a] Source # 
Instance details

Defined in Type.Promotion

Methods

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

(val ~ Maybe a2, Known t a2) => Known (Just t :: Maybe a1) val Source # 
Instance details

Defined in Type.Promotion

Methods

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

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

Defined in Type.Promotion

Methods

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

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

Defined in Type.Promotion

Methods

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

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

Defined in Type.Promotion

Methods

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

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

Methods

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

Instances
KnownNats ([] :: [Nat]) Source # 
Instance details

Defined in Type.Promotion

Methods

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

(KnownNat n, KnownNats ns) => KnownNats (n ': ns) Source # 
Instance details

Defined in Type.Promotion

Methods

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