I am having issues figuring out if this is possible. Any pointers would be awesome
I’m not sure on the exact syntax but something like
m = 3
d = putStr "d"
f = d ; m
Such that it would call function d, and return the value in m without being Maybe m?
EDIT:
What I am looking for is more like this?
eval s = s
m = 3
f = (eval s) ; m
If you call a function wrapped in a monad (IO in this case), then you must also be in the IO monad. Thus are the rules of monads – never to be broken.