weave-0.1.0.0: src/Weave/Sig.hsig
{-# LANGUAGE KindSignatures #-}
-- | The Backpack signature for the shared interface of
-- "Weave.Strict", "Weave.Lazy", and "Weave.Endless".
signature Weave.Sig where
import Data.Kind (Type)
-- | The type of weaves (multi-level computations).
--
-- The 'Applicative' operation @('liftA2')@ combines weaves level-wise.
data Weave :: (Type -> Type) -> Type -> Type
instance Functor f => Functor (Weave f)
instance Applicative m => Applicative (Weave m)
-- | A weft is one level of 'Weave'. It is a computation which returns the remaining levels.
weft :: m (Weave m a) -> Weave m a
-- | Run all the wefts in a 'Weave' sequentially.
mesh :: Monad m => Weave m a -> m a