The HList library
(C) 2004-2006, Oleg Kiselyov, Ralf Laemmel, Keean Schupke
Extensible records: labels are phantom, so at run-time, the record is just a heterogenous list of field values.
This sort of record is generalizable to tables
(which are, at
run-time, a list or a map containing the heterogenous lists
of field values).
The are different models of labels that go with this module; see the files Label?.hs.
Documentation
RecordP vs |
mkRecordP :: (HSameLength ls vs, HLabelSet ls) => ls -> vs -> RecordP ls vsSource
class HSameLength l1 l2 Source
HSameLength HNil HNil | |
HSameLength l1 l2 => HSameLength (HCons e1 l1) (HCons e2 l2) |
class HRLabelSet r => RecordR2P r ls vs | r -> ls vs, ls vs -> r whereSource
record_r2p :: Record r -> RecordP ls vsSource
record_p2r :: RecordP ls vs -> Record rSource
labels_of_recordp :: RecordP ls vs -> lsSource
class HasFieldP' b l r v | b l r -> v whereSource
hLookupByLabelP' :: b -> l -> r -> vSource
hDeleteAtLabelP :: HProjectByLabelP l ls vs lso v vso => l -> RecordP ls vs -> RecordP lso vsoSource
hUpdateAtLabelP :: (HUpdateAtHNat n e1 t1 l', HFind e t n) => e -> e1 -> RecordP t t1 -> RecordP ls l'Source
class HProjectByLabelP l ls vs lso v vso | l ls vs -> lso v vso whereSource
h2ProjectByLabelP :: l -> RecordP ls vs -> (v, RecordP lso vso)Source
(HEq l l' b, HProjectByLabelP' b l (HCons l' ls) vs lso v vso) => HProjectByLabelP l (HCons l' ls) vs lso v vso |
class HProjectByLabelP' b l ls vs lso v vso | b l ls vs -> lso v vso whereSource
h2ProjectByLabelP' :: b -> l -> RecordP ls vs -> (v, RecordP lso vso)Source
HProjectByLabelP' HTrue l (HCons l ls) (HCons v vs) ls v vs | |
HProjectByLabelP l ls vs lso' v vso' => HProjectByLabelP' HFalse l (HCons l' ls) (HCons v' vs) (HCons l' lso') v (HCons v' vso') |