membership-0.0.1: Indices for type level lists
Safe HaskellSafe-Inferred
LanguageHaskell2010

Type.Membership.HList

Documentation

data HList (h :: k -> Type) (xs :: [k]) where Source #

Constructors

HNil :: HList h '[] 
HCons :: h x -> HList h xs -> HList h (x ': xs) infixr 5 

hindex :: HList h xs -> Membership xs x -> h x Source #

hfoldrWithIndex :: forall h r xs. (forall x. Membership xs x -> h x -> r -> r) -> r -> HList h xs -> r Source #

htraverse :: forall f g h xs. Applicative f => (forall x. g x -> f (h x)) -> HList g xs -> f (HList h xs) Source #

htraverseWithIndex :: forall f g h xs. Applicative f => (forall x. Membership xs x -> g x -> f (h x)) -> HList g xs -> f (HList h xs) Source #

hlength :: HList h xs -> Int Source #