-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Template Haskell library for writing monadic expressions more easily -- -- See README at the bottom. -- -- Getting started: See Each. @package each @version 0.1.0.0 -- | Names that are used to bind things in each blocks are defined -- here. module Each.Invoke -- | Do not use this outside of an each block. Only its name is used, and -- its value itself does not make sense. bind :: () -- | Do not use this outside of an each block. Only its name is used, and -- its value itself does not make sense. (~!) :: () -- | An internal module where most of the real transformation goes on. module Each.Transform transform :: Exp -> Env -> Q Result data Env Env :: Maybe TypeQ -> Env [envType] :: Env -> Maybe TypeQ data Result -- | This subexpression does not invoke bind, i.e. is pure Pure :: ExpQ -> Result -- | This subexpression contains invocations of bind Bind :: ExpQ -> Result -- | The basic structure of an each block is this: -- --
-- $(each [| ... |]) ---- -- Inside of this block, three (interchangable) ways are used to mark -- impure subexpressions: -- --
bind expr
bind $ expr
(~! expr)
-- $(each [| bind getLine ++ bind getLine ]) ---- -- means -- --
-- (++) `fmap` getLine <*> getLine ---- --
-- $(each [| ... |]) --each :: ExpQ -> ExpQ -- | Invoke an each block while specifying the context type, so that -- type annotations may be processed appropriately. -- --
-- $(eachWith [t| IO |] [| "Hello, " ++ (bind getLine :: String) |]) ---- -- means -- --
-- ("Hello, " ++) `fmap` (getLine :: IO String)
--
--
-- using the IO type which is supplied to eachWith.
eachWith :: TypeQ -> ExpQ -> ExpQ
-- | Do not use this outside of an each block. Only its name is used, and
-- its value itself does not make sense.
bind :: ()
-- | Do not use this outside of an each block. Only its name is used, and
-- its value itself does not make sense.
(~!) :: ()