, HFoldrable(..)
, HConcatable(..)
, HMappable(..)
+
+ , HLength
)
where
import Data.Typeable
+import Types.Data.Num hiding ((:*:))
-- HList
) => HMappable f (HCons x xs) where
type HMap f (HCons x xs) = HCons (Apply f x) (HMap f xs)
hMap f (HCons x xs) = hCons (apply f x) (hMap f xs)
+
+-- HLength
+type family HLength l
+type instance HLength HNil = D0
+type instance HLength (HCons e l) = Succ (HLength l)