-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Support for QualifiedDo with semigroupoids classes. -- -- Provides support for QualifiedDo using the more generalized type -- classes from the semigroupoids package. @package semigroupoids-do @version 1.0 -- | Provides definitions needed to use do-notation (by way of -- QualifiedDo) using the more general type classes provided by -- semigroupoids. -- -- To use this module, enable QualifiedDo, import this module -- qualified, and then prefix do with the qualified name: -- --
--   {-# LANGUAGE QualifiedDo #-}
--   
--   module MyModule where
--   
--   import Data.Functor.Bind (Bind)
--   import qualified Semigroupoids.Do as S
--   
--   foo :: (Bind m) => m a
--   foo = S.do
--    ...
--   
-- -- This module is designed to work correctly (and similarly generally) -- with ApplicativeDo and RecursiveDo (inasfar as that -- is possible). module Semigroupoids.Do (>>=) :: forall (m :: Type -> Type) (a :: Type) (b :: Type). Bind m => m a -> (a -> m b) -> m b (>>) :: forall (m :: Type -> Type) (a :: Type) (b :: Type). Bind m => m a -> m b -> m b -- |

Important note

-- -- This ignores whatever String you give it. It is a bad -- idea to use fail as a form of labelled error; instead, it -- should only be defaulted to when a pattern match fails. fail :: forall (m :: Type -> Type) (a :: Type). Plus m => String -> m a -- | Using ApplicativeDo: 'fmap f as' can be -- understood as the do expression -- --
--   do a <- as
--      pure (f a)
--   
-- -- with an inferred Functor constraint. fmap :: Functor f => (a -> b) -> f a -> f b (<*>) :: forall (f :: Type -> Type) (a :: Type) (b :: Type). Apply f => f (a -> b) -> f a -> f b join :: forall (m :: Type -> Type) (a :: Type). Bind m => m (m a) -> m a -- | The fixed point of a monadic computation. mfix f -- executes the action f only once, with the eventual output fed -- back as the input. Hence f should not be strict, for then -- mfix f would diverge. mfix :: MonadFix m => (a -> m a) -> m a return :: forall (f :: Type -> Type) (a :: Type). Applicative f => a -> f a