Module INS

This module provides an implementation of the state monad

Author: fre, bjp

Version: August 2013

Summary of exported operations:

bindS :: (a -> (b,a)) -> (b -> a -> (c,a)) -> a -> (c,a)   
bindS_ :: (a -> (b,a)) -> (a -> (c,a)) -> a -> (c,a)   
returnS :: a -> b -> (a,b)   
getS :: a -> (a,a)   
putS :: a -> a -> ((),a)   
modifyS :: (a -> a) -> a -> ((),a)   
sequenceS :: [a -> (b,a)] -> a -> ([b],a)   
sequenceS_ :: [a -> (b,a)] -> a -> ((),a)   
mapS :: (a -> b -> (c,b)) -> [a] -> b -> ([c],b)   
mapS_ :: (a -> b -> (c,b)) -> [a] -> b -> ((),b)   
runState :: (a -> (b,a)) -> a -> (b,a)   
evalState :: (a -> (b,a)) -> a -> b   
execState :: (a -> (b,a)) -> a -> a   
liftS :: (a -> b) -> (c -> (a,c)) -> c -> (b,c)   
liftS2 :: (a -> b -> c) -> (d -> (a,d)) -> (d -> (b,d)) -> d -> (c,d)   
updateID :: Maybe ((Int,Int),(Int,Int)) -> (((Int,Int),(Int,Int)),String,String) -> Bool -> (Int,[(Int,((Int,Int),(Int,Int)),BoxLabel)]) -> ((),(Int,[(Int,((Int,Int),(Int,Int)),BoxLabel)]))   
updateID_ :: Bool -> (Int,[(Int,BoxLabel)]) -> (Int,(Int,[(Int,BoxLabel)]))   

Exported datatypes:


INS

Type synonym: INS a = State MetaInfo a


Exported operations:

bindS :: (a -> (b,a)) -> (b -> a -> (c,a)) -> a -> (c,a)   

Further infos:
  • defined as left-associative infix operator with precedence 1

bindS_ :: (a -> (b,a)) -> (a -> (c,a)) -> a -> (c,a)   

Further infos:
  • defined as left-associative infix operator with precedence 1

returnS :: a -> b -> (a,b)   

Further infos:
  • solution complete, i.e., able to compute all solutions

getS :: a -> (a,a)   

Further infos:
  • solution complete, i.e., able to compute all solutions

putS :: a -> a -> ((),a)   

Further infos:
  • solution complete, i.e., able to compute all solutions

modifyS :: (a -> a) -> a -> ((),a)   

sequenceS :: [a -> (b,a)] -> a -> ([b],a)   

sequenceS_ :: [a -> (b,a)] -> a -> ((),a)   

mapS :: (a -> b -> (c,b)) -> [a] -> b -> ([c],b)   

mapS_ :: (a -> b -> (c,b)) -> [a] -> b -> ((),b)   

runState :: (a -> (b,a)) -> a -> (b,a)   

evalState :: (a -> (b,a)) -> a -> b   

execState :: (a -> (b,a)) -> a -> a   

liftS :: (a -> b) -> (c -> (a,c)) -> c -> (b,c)   

liftS2 :: (a -> b -> c) -> (d -> (a,d)) -> (d -> (b,d)) -> d -> (c,d)   

updateID :: Maybe ((Int,Int),(Int,Int)) -> (((Int,Int),(Int,Int)),String,String) -> Bool -> (Int,[(Int,((Int,Int),(Int,Int)),BoxLabel)]) -> ((),(Int,[(Int,((Int,Int),(Int,Int)),BoxLabel)]))   

updateID_ :: Bool -> (Int,[(Int,BoxLabel)]) -> (Int,(Int,[(Int,BoxLabel)]))