diff --git a/haskell/Pre.hs b/haskell/Pre.hs index e9969b1..bbbf6c5 100644 --- a/haskell/Pre.hs +++ b/haskell/Pre.hs @@ -146,12 +146,10 @@ data HListF (f :: Type -> Type) (as :: List Type) :: Type where f a -> HListF f as -> HListF f (a ': as) - foldHListF :: (forall x xs. f x -> r xs -> r (x ': xs)) -> r '[] -> HListF f as -> r as foldHListF f e = \case HNilF -> e HConsF x xs -> f x $ foldHListF f e xs - mapHListF :: (forall a. f a -> g a) -> HListF f as -> HListF g as mapHListF t = foldHListF (\x r -> HConsF (t x) $ r) HNilF