HList-0.2.3: Heterogeneous lists

Data.HList.HTypeIndexed

Description

The HList library

(C) 2004, Oleg Kiselyov, Ralf Laemmel, Keean Schupke

Type-indexed operations on typeful heterogeneous lists.

Synopsis

Documentation

class HDeleteMany e l l' | e l -> l' whereSource

Methods

hDeleteMany :: Proxy e -> l -> l'Source

Instances

HDeleteMany e HNil HNil 
(HList l, TypeEq e e' b, HDeleteManyCase b e e' l l') => HDeleteMany e (HCons e' l) l' 

class HDeleteManyCase b e e' l l' | b e e' l -> l' whereSource

Methods

hDeleteManyCase :: b -> Proxy e -> e' -> l -> l'Source

Instances

HDeleteMany e l l' => HDeleteManyCase HTrue e e l l' 
HDeleteMany e l l' => HDeleteManyCase HFalse e e' l (HCons e' l') 

class HNat n => HType2HNat e l n | e l -> nSource

Map a type to a natural

Instances

(TypeEq e' e b, HType2HNatCase b e l n) => HType2HNat e (HCons e' l) n 

class (HBool b, HNat n) => HType2HNatCase b e l n | b e l -> nSource

Helper class

Instances

hType2HNat :: HType2HNat e l n => Proxy e -> l -> nSource

class HTypes2HNats ps l ns | ps l -> ns whereSource

Map types to naturals

Methods

hTypes2HNats :: ps -> l -> nsSource

Instances

HTypes2HNats HNil l HNil 
(HType2HNat e l n, HTypes2HNats ps l ns) => HTypes2HNats (HCons (Proxy e) ps) l (HCons n ns) 

hDeleteAtProxy :: (HDeleteAtHNat n l l', HType2HNat e l n) => Proxy e -> l -> l'Source

Define type-indexed delete in terms of the natural-based primitive

hUpdateAtType :: (HUpdateAtHNat n e l l', HType2HNat e l n) => e -> l -> l'Source

Define type-indexed update in terms of the natural-based update

hProjectByProxies :: (HProjectByHNats ns l l', HTypes2HNats ps l ns) => ps -> l -> l'Source

Projection based on proxies

hSplitByProxies :: (HMap (HAddTag HTrue) l l', HSplitByHNats' ns l' l'1 l'', HTypes2HNats ps l ns) => ps -> l -> (l'1, l'')Source

Splitting based on proxies