The HList library
(C) 2004, Oleg Kiselyov, Ralf Laemmel, Keean Schupke
Type-indexed operations on typeful heterogeneous lists.
- class HDeleteMany e l l' | e l -> l' where
- hDeleteMany :: Proxy e -> l -> l'
- class HDeleteManyCase b e e' l l' | b e e' l -> l' where
- hDeleteManyCase :: b -> Proxy e -> e' -> l -> l'
- class HNat n => HType2HNat e l n | e l -> n
- class (HBool b, HNat n) => HType2HNatCase b e l n | b e l -> n
- hType2HNat :: HType2HNat e l n => Proxy e -> l -> n
- class HTypes2HNats ps l ns | ps l -> ns where
- hTypes2HNats :: ps -> l -> ns
- hDeleteAtProxy :: (HDeleteAtHNat n l l', HType2HNat e l n) => Proxy e -> l -> l'
- hUpdateAtType :: (HUpdateAtHNat n e l l', HType2HNat e l n) => e -> l -> l'
- hProjectByProxies :: (HProjectByHNats ns l l', HTypes2HNats ps l ns) => ps -> l -> l'
- hSplitByProxies :: (HMap (HAddTag HTrue) l l', HSplitByHNats' ns l' l'1 l'', HTypes2HNats ps l ns) => ps -> l -> (l'1, l'')
Documentation
class HDeleteMany e l l' | e l -> l' whereSource
hDeleteMany :: Proxy e -> l -> l'Source
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
hDeleteManyCase :: b -> Proxy e -> e' -> l -> l'Source
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
(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
HOccursNot e l => HType2HNatCase HTrue e l HZero | |
HType2HNat e l n => HType2HNatCase HFalse e l (HSucc n) |
hType2HNat :: HType2HNat e l n => Proxy e -> l -> nSource
class HTypes2HNats ps l ns | ps l -> ns whereSource
Map types to naturals
hTypes2HNats :: ps -> l -> nsSource
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