RSolve-2.0.0.0

Safe HaskellSafe
LanguageHaskell2010

RSolve.MultiState

Description

state monads extended to have branches Author: Taine Zhao(thautwarm) Date: 2018-12 License: MIT

Documentation

newtype MS s a Source #

Constructors

MS 

Fields

Instances
Monad (MS s) Source # 
Instance details

Defined in RSolve.MultiState

Methods

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

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

return :: a -> MS s a #

fail :: String -> MS s a #

Functor (MS s) Source # 
Instance details

Defined in RSolve.MultiState

Methods

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

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

MonadFail (MS s) Source # 
Instance details

Defined in RSolve.MultiState

Methods

fail :: String -> MS s a #

Applicative (MS s) Source # 
Instance details

Defined in RSolve.MultiState

Methods

pure :: a -> MS s a #

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

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

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

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

Alternative (MS s) Source # 
Instance details

Defined in RSolve.MultiState

Methods

empty :: MS s a #

(<|>) :: MS s a -> MS s a -> MS s a #

some :: MS s a -> MS s [a] #

many :: MS s a -> MS s [a] #

getMS :: MS s s Source #

putMS :: s -> MS s () Source #

getsMS :: (s -> a) -> MS s a Source #

modifyMS :: (s -> s) -> MS s () Source #