hydra-0.1.0: Type-aware transformations for data and functional programs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hydra.Monads

Documentation

module Hydra.Core

flowSucceeds :: s -> Flow s a -> Bool Source #

flowWarning :: String -> Flow s a -> Flow s a Source #

fromFlow :: s -> Flow s a -> a Source #

fromFlowIo :: s -> Flow s a -> IO a Source #

putState :: s -> Flow s () Source #

unexpected :: (MonadFail m, Show a1) => String -> a1 -> m a2 Source #

withState :: s1 -> Flow s1 a -> Flow s2 a Source #

withTrace :: String -> Flow s a -> Flow s a Source #

withWarning :: String -> a -> Flow s a Source #

Orphan instances

MonadFail (Flow s) Source # 
Instance details

Methods

fail :: String -> Flow s a #

Applicative (Flow s) Source # 
Instance details

Methods

pure :: a -> Flow s a #

(<*>) :: Flow s (a -> b) -> Flow s a -> Flow s b #

liftA2 :: (a -> b -> c) -> Flow s a -> Flow s b -> Flow s c #

(*>) :: Flow s a -> Flow s b -> Flow s b #

(<*) :: Flow s a -> Flow s b -> Flow s a #

Functor (Flow s) Source # 
Instance details

Methods

fmap :: (a -> b) -> Flow s a -> Flow s b #

(<$) :: a -> Flow s b -> Flow s a #

Monad (Flow s) Source # 
Instance details

Methods

(>>=) :: Flow s a -> (a -> Flow s b) -> Flow s b #

(>>) :: Flow s a -> Flow s b -> Flow s b #

return :: a -> Flow s a #