module Codec.Binary.Base91.Control (Applicative' (..), Foldable' (..)) where
import Control.Applicative (Applicative, pure)
import Data.Foldable (Foldable, foldl')
import Data.Monoid (Monoid)
class (Monoid a) => Applicative' a where
type Item a :: *
pure' :: Item a -> a
instance (Applicative a, Monoid (a i)) => Applicative' (a i) where
type Item (a i) = i
pure' = pure
class Foldable' f where
type Element f :: *
fold' :: (x -> Element f -> x) -> x -> f -> x
instance (Foldable f) => Foldable' (f e) where
type Element (f e) = e
fold' = foldl'