HList-0.2.1: Heterogeneous lists

Data.HList.Variant

Documentation

newtype Variant mr Source

Constructors

Variant mr 

Instances

class HMaybied r r' | r -> r' whereSource

Methods

hMaybied :: r -> r'Source

Instances

HMaybied HNil HNil 
HMaybied r r' => HMaybied (HCons (LVPair l (Proxy v)) r) (HCons (LVPair l (Maybe v)) r') 

mkVariant :: (RecordLabels v ls, HFind x ls n, HMaybied v v', HUpdateAtHNat n (LVPair x (Maybe y)) v' v') => x -> y -> Record v -> Variant v'Source

unVariant :: (RecordLabels v ls, HFind x ls n, HLookupByHNat n v (LVPair x (Maybe y))) => x -> Variant v -> Maybe ySource