Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Cont ans x = Cont {
- runCont ∷ (x → ans) → ans
- newtype Collect tuple = Collect {
- runCollect ∷ ∀ ans. ans → (tuple → ans → ans) → ans
- fixAction ∷ Collect tuple → ans → (tuple → ans → ans) → ans
- mapify ∷ Ord a ⇒ Collect (a, b) → Map a b
- listify ∷ Collect (a, b) → [(a, b)]
- count ∷ Collect (a, b) → Int
- one ∷ t → Collect t
- none ∷ Collect t
- front ∷ t → Collect t → Collect t
- rear ∷ Collect t → t → Collect t
- when ∷ Bool → Collect ()
- takeC ∷ Int → Collect t → [t]
- isempty ∷ Collect t → Bool
- nonempty ∷ Collect t → Bool
- hasElem ∷ Collect t → Maybe t
- newtype ColPlus tuple = ColPlus {
- runColPlus ∷ ∀ ans. ans → (tuple → ans → ans) → (ans → ans → ans) → ans
- runPlus ∷ Monoid a ⇒ ColPlus t → a → (t → a → a) → a
Documentation
newtype Collect tuple Source #
Collect | |
|
Instances
Foldable Collect Source # | |
Defined in Control.Iterate.Collect fold ∷ Monoid m ⇒ Collect m → m Source # foldMap ∷ Monoid m ⇒ (a → m) → Collect a → m Source # foldMap' ∷ Monoid m ⇒ (a → m) → Collect a → m Source # foldr ∷ (a → b → b) → b → Collect a → b Source # foldr' ∷ (a → b → b) → b → Collect a → b Source # foldl ∷ (b → a → b) → b → Collect a → b Source # foldl' ∷ (b → a → b) → b → Collect a → b Source # foldr1 ∷ (a → a → a) → Collect a → a Source # foldl1 ∷ (a → a → a) → Collect a → a Source # toList ∷ Collect a → [a] Source # null ∷ Collect a → Bool Source # length ∷ Collect a → Int Source # elem ∷ Eq a ⇒ a → Collect a → Bool Source # maximum ∷ Ord a ⇒ Collect a → a Source # minimum ∷ Ord a ⇒ Collect a → a Source # | |
Applicative Collect Source # | |
Functor Collect Source # | |
Monad Collect Source # | |
Show t ⇒ Show (Collect t) Source # | Even though a (Collect t) is a function, if we can (Show t), we can pick an action that collects all the shown t, and turn them into a big multi-line string. |
fixAction ∷ Collect tuple → ans → (tuple → ans → ans) → ans Source #
A (Collect t) is completely agnostic over how t
s are beging collected.
We can make this abstraction concrete by using fixAction.