-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Permutations of effectful computations
--
-- Permutations of effectful computations
@package PermuteEffects
@version 0.2
module Control.Permute
-- | A chain of effectful f-computations with composite result
-- a. Individual computations (lifted into Effects
-- using *. below) have their own result types, which fit together
-- in standard Applicative fashion. Although these result types
-- are lost in the composite type, the computations can still be moved
-- around within the list (see swap and firsts in the
-- source code for examples). This allows their permutations to be
-- computed.
data Effects f a
-- | Build a tree (using <|> for branching) of all
-- permutations of the computations. The tree shape allows permutations
-- to share common prefixes. This allows clever computations to quickly
-- prune away uninteresting branches of permutations.
perms :: Alternative f => Effects f a -> f a
-- | Allow a computation to be occur so many times in each permutation.
(*.) :: Replicate a b -> f a -> Effects f b
instance Applicative (Effects f)
instance Functor (Effects f)