Safe Haskell | None |
---|
The HList library
(C) 2004, Oleg Kiselyov, Ralf Laemmel, Keean Schupke
Array-like access to HLists.
- class HLookupByHNat n l where
- type HLookupByHNatR n l :: *
- hLookupByHNat :: Proxy n -> HList l -> HLookupByHNatR n l
- class HDeleteAtHNat n l where
- type HDeleteAtHNatR n l :: [*]
- hDeleteAtHNat :: Proxy n -> HList l -> HList (HDeleteAtHNatR n l)
- class HUpdateAtHNat n e l where
- type HUpdateAtHNatR n e l :: [*]
- hUpdateAtHNat :: Proxy n -> e -> HList l -> HList (HUpdateAtHNatR n e l)
- hProjectByHNats' :: (HMapAux (FHLookupByHNat l) as' bs', SameLength' * * as' bs', SameLength' * * bs' as') => HList as' -> HList l -> HList bs'
- newtype FHLookupByHNat l = FHLookupByHNat (HList l)
- hProjectByHNats :: (Apply (FHUProj True ns) (t, Proxy HNat HZero), HUnfold' (FHUProj True ns) (ApplyR (FHUProj True ns) (t, Proxy HNat HZero))) => Proxy [HNat] ns -> t -> HList (HUnfold (FHUProj True ns) (t, Proxy HNat HZero))
- data FHUProj sel ns = FHUProj
- type family KMember n ns :: Bool
- type HProjectByHNatsR ns l = HUnfold (FHUProj True ns) (HList l, Proxy HZero)
- type HProjectByHNatsCtx ns l = (Apply (FHUProj True ns) (HList l, Proxy HZero), HUnfold' (FHUProj True ns) (ApplyR (FHUProj True ns) (HList l, Proxy HZero)))
- hProjectAwayByHNats :: (Apply (FHUProj False ns) (t, Proxy HNat HZero), HUnfold' (FHUProj False ns) (ApplyR (FHUProj False ns) (t, Proxy HNat HZero))) => Proxy [HNat] ns -> t -> HList (HUnfold (FHUProj False ns) (t, Proxy HNat HZero))
- type HProjectAwayByHNatsR ns l = HUnfold (FHUProj False ns) (HList l, Proxy HZero)
- type HProjectAwayByHNatsCtx ns l = (Apply (FHUProj False ns) (HList l, Proxy HZero), HUnfold' (FHUProj False ns) (ApplyR (FHUProj False ns) (HList l, Proxy HZero)))
- hSplitByHNats :: (Apply (FHUProj True ns) (t, Proxy HNat HZero), Apply (FHUProj False ns) (t, Proxy HNat HZero), HUnfold' (FHUProj True ns) (ApplyR (FHUProj True ns) (t, Proxy HNat HZero)), HUnfold' (FHUProj False ns) (ApplyR (FHUProj False ns) (t, Proxy HNat HZero))) => Proxy [HNat] ns -> t -> (HList (HUnfold (FHUProj True ns) (t, Proxy HNat HZero)), HList (HUnfold (FHUProj False ns) (t, Proxy HNat HZero)))
Lookup
class HLookupByHNat n l whereSource
type HLookupByHNatR n l :: *Source
hLookupByHNat :: Proxy n -> HList l -> HLookupByHNatR n lSource
HLookupByHNat HZero (: * e l) | |
HLookupByHNat n l => HLookupByHNat (HSucc n) (: * e l) |
Delete
class HDeleteAtHNat n l whereSource
type HDeleteAtHNatR n l :: [*]Source
hDeleteAtHNat :: Proxy n -> HList l -> HList (HDeleteAtHNatR n l)Source
HDeleteAtHNat HZero (: * e l) | |
HDeleteAtHNat n l => HDeleteAtHNat (HSucc n) (: * e l) |
Update
class HUpdateAtHNat n e l whereSource
type HUpdateAtHNatR n e l :: [*]Source
hUpdateAtHNat :: Proxy n -> e -> HList l -> HList (HUpdateAtHNatR n e l)Source
HUpdateAtHNat HZero e1 (: * e l) | |
HUpdateAtHNat n e1 l => HUpdateAtHNat (HSucc n) e1 (: * e l) |
Projection
hProjectByHNats' :: (HMapAux (FHLookupByHNat l) as' bs', SameLength' * * as' bs', SameLength' * * bs' as') => HList as' -> HList l -> HList bs'Source
newtype FHLookupByHNat l Source
FHLookupByHNat (HList l) |
HLookupByHNat n l => Apply (FHLookupByHNat l) (Proxy HNat n) |
hProjectByHNats :: (Apply (FHUProj True ns) (t, Proxy HNat HZero), HUnfold' (FHUProj True ns) (ApplyR (FHUProj True ns) (t, Proxy HNat HZero))) => Proxy [HNat] ns -> t -> HList (HUnfold (FHUProj True ns) (t, Proxy HNat HZero))Source
Apply (FHUProj sel ns) (HList l, Proxy HNat (HSucc n)) => Apply (Proxy Bool False, FHUProj sel ns) (HList (: * e l), Proxy HNat n) | |
Apply (Proxy Bool True, FHUProj sel ns) (HList (: * e l), Proxy HNat n) | |
(~ * ch (Proxy Bool (HBoolEQ sel (KMember n ns))), Apply (ch, FHUProj sel ns) (HList (: * e l), Proxy HNat n)) => Apply (FHUProj sel ns) (HList (: * e l), Proxy HNat n) | |
Apply (FHUProj sel ns) (HList ([] *), n) |
type HProjectByHNatsCtx ns l = (Apply (FHUProj True ns) (HList l, Proxy HZero), HUnfold' (FHUProj True ns) (ApplyR (FHUProj True ns) (HList l, Proxy HZero)))Source
Complement of Projection
hProjectAwayByHNats :: (Apply (FHUProj False ns) (t, Proxy HNat HZero), HUnfold' (FHUProj False ns) (ApplyR (FHUProj False ns) (t, Proxy HNat HZero))) => Proxy [HNat] ns -> t -> HList (HUnfold (FHUProj False ns) (t, Proxy HNat HZero))Source
type HProjectAwayByHNatsCtx ns l = (Apply (FHUProj False ns) (HList l, Proxy HZero), HUnfold' (FHUProj False ns) (ApplyR (FHUProj False ns) (HList l, Proxy HZero)))Source
Splitting
hSplitByHNats :: (Apply (FHUProj True ns) (t, Proxy HNat HZero), Apply (FHUProj False ns) (t, Proxy HNat HZero), HUnfold' (FHUProj True ns) (ApplyR (FHUProj True ns) (t, Proxy HNat HZero)), HUnfold' (FHUProj False ns) (ApplyR (FHUProj False ns) (t, Proxy HNat HZero))) => Proxy [HNat] ns -> t -> (HList (HUnfold (FHUProj True ns) (t, Proxy HNat HZero)), HList (HUnfold (FHUProj False ns) (t, Proxy HNat HZero)))Source
Splitting an array according to indices