import Control.Monad.Writer fun :: Int -> Writer [String] Intfun a = writer (a + 1, ["Increment"]) getValue :: Writer [String] Int -> IntgetValue = fst $ runWriter main :: IO ()main = print $ runWriter $ return 1 >>= fun >>= fun
Standard input is empty
prog.hs:1:7: Could not find module `Control.Monad.Writer': Use -v to see a list of the files searched for.
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!