joint-0.1.3: Trying to compose non-composable

Safe HaskellSafe
LanguageHaskell2010

Control.Joint.Base.State

Contents

Documentation

newtype State s a Source #

Constructors

State (((->) s :. (,) s) := a) 
Instances
Monad (State s) Source # 
Instance details

Defined in Control.Joint.Base.State

Methods

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

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

return :: a -> State s a #

fail :: String -> State s a #

Functor (State s) Source # 
Instance details

Defined in Control.Joint.Base.State

Methods

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

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

Applicative (State s) Source # 
Instance details

Defined in Control.Joint.Base.State

Methods

pure :: a -> State s a #

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

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

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

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

Composition (State s) Source # 
Instance details

Defined in Control.Joint.Base.State

Associated Types

type Primary (State s) a :: Type Source #

Methods

run :: State s a -> Primary (State s) a Source #

Transformer (State s) Source # 
Instance details

Defined in Control.Joint.Base.State

Associated Types

type Schema (State s) u = (r :: Type -> Type) Source #

Methods

embed :: Functor u => u ~> Schema (State s) u Source #

build :: Applicative u => State s ~> Schema (State s) u Source #

unite :: Primary (Schema (State s) u) a -> Schema (State s) u a Source #

type Primary (State s) a Source # 
Instance details

Defined in Control.Joint.Base.State

type Primary (State s) a = (((->) s :: Type -> Type) :. (,) s) := a
type Schema (State s) u Source # 
Instance details

Defined in Control.Joint.Base.State

type Schema (State s) u = TUT ((->) s :: Type -> Type) u ((,) s)

statefully :: s -> State s a -> (s, a) Source #

get :: State s s Source #

modify :: (s -> s) -> State s () Source #

put :: s -> State s () Source #

Orphan instances

Monad u => Monad (TUT ((->) s :: Type -> Type) u ((,) s)) Source # 
Instance details

Methods

(>>=) :: TUT ((->) s) u ((,) s) a -> (a -> TUT ((->) s) u ((,) s) b) -> TUT ((->) s) u ((,) s) b #

(>>) :: TUT ((->) s) u ((,) s) a -> TUT ((->) s) u ((,) s) b -> TUT ((->) s) u ((,) s) b #

return :: a -> TUT ((->) s) u ((,) s) a #

fail :: String -> TUT ((->) s) u ((,) s) a #

Functor u => Functor (TUT ((->) s :: Type -> Type) u ((,) s)) Source # 
Instance details

Methods

fmap :: (a -> b) -> TUT ((->) s) u ((,) s) a -> TUT ((->) s) u ((,) s) b #

(<$) :: a -> TUT ((->) s) u ((,) s) b -> TUT ((->) s) u ((,) s) a #

Monad u => Applicative (TUT ((->) s :: Type -> Type) u ((,) s)) Source # 
Instance details

Methods

pure :: a -> TUT ((->) s) u ((,) s) a #

(<*>) :: TUT ((->) s) u ((,) s) (a -> b) -> TUT ((->) s) u ((,) s) a -> TUT ((->) s) u ((,) s) b #

liftA2 :: (a -> b -> c) -> TUT ((->) s) u ((,) s) a -> TUT ((->) s) u ((,) s) b -> TUT ((->) s) u ((,) s) c #

(*>) :: TUT ((->) s) u ((,) s) a -> TUT ((->) s) u ((,) s) b -> TUT ((->) s) u ((,) s) b #

(<*) :: TUT ((->) s) u ((,) s) a -> TUT ((->) s) u ((,) s) b -> TUT ((->) s) u ((,) s) a #