
26 Feb
2009
26 Feb
'09
7:06 p.m.
Hello, I would like to create few functions which use parametrized monads (defined as in http://computationalthoughts.blogspot.com/2009/02/comment-on-parameterized-m... ) and export their functionality outside a module and use them in a do statement. For example three exported funtions : func1 num = do x <- get put (show (x + num)) func2 num = do x <- get put (((read x)::Int) + num) execWith0 actions = runState actions 0 And in an another module, which has Prelude imported : k = execWith0 ( do func1 10 func2 5) Unfortunately this doesn't compile as in the second module >> is different than in PMonad. Is there any way which I could make it work? Michal