Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Heterogeneous lists
Intended for qualified import
Synopsis
- type family All c as ∷ Constraint where ...
- data HList ∷ [Type] → Type where
- collapse ∷ ∀ c as b proxy. All c as ⇒ proxy c → (∀ a. c a ⇒ a → b) → HList as → [b]
- foldMap ∷ ∀ c as b proxy. (All c as, Monoid b) ⇒ proxy c → (∀ a. c a ⇒ a → b) → HList as → b
- foldl ∷ ∀ c as b proxy. All c as ⇒ proxy c → (∀ a. c a ⇒ b → a → b) → b → HList as → b
- foldlM ∷ ∀ c as m b proxy. (All c as, Monad m) ⇒ proxy c → (∀ a. c a ⇒ b → a → m b) → b → HList as → m b
- foldr ∷ ∀ c as b proxy. All c as ⇒ proxy c → (∀ a. c a ⇒ a → b → b) → b → HList as → b
- repeatedly ∷ ∀ c as b proxy. All c as ⇒ proxy c → (∀ a. c a ⇒ a → b → b) → HList as → b → b
- repeatedlyM ∷ ∀ c as b proxy m. (Monad m, All c as) ⇒ proxy c → (∀ a. c a ⇒ a → b → m b) → HList as → b → m b
- class IsList (xs ∷ [Type]) where
- data SList ∷ [Type] → Type
- type family Fn as b where ...
- afterFn ∷ SList as → (b → c) → Fn as b → Fn as c
- applyFn ∷ Fn as b → HList as → b
Basic definitions
type family All c as ∷ Constraint where ... Source #
Folding
foldMap ∷ ∀ c as b proxy. (All c as, Monoid b) ⇒ proxy c → (∀ a. c a ⇒ a → b) → HList as → b Source #
foldlM ∷ ∀ c as m b proxy. (All c as, Monad m) ⇒ proxy c → (∀ a. c a ⇒ b → a → m b) → b → HList as → m b Source #
repeatedly ∷ ∀ c as b proxy. All c as ⇒ proxy c → (∀ a. c a ⇒ a → b → b) → HList as → b → b Source #
Apply function repeatedly for all elements of the list
repeatedly p = flip . foldl p . flip
repeatedlyM ∷ ∀ c as b proxy m. (Monad m, All c as) ⇒ proxy c → (∀ a. c a ⇒ a → b → m b) → HList as → b → m b Source #