[1 of 1] Compiling Main ( prog.hs, prog.o )
prog.hs:6:14:
Could not deduce (Monad m1) arising from a use of `return'
from the context (Monad m)
bound by the type signature for
f :: Monad m =>
(String -> Int -> String -> m ()) -> [String] -> m ()
at prog.hs:1:6-71
Possible fix:
add (Monad m1) to the context of
the type signature for f2 :: Maybe Int -> String -> m1 ()
or the type signature for
f :: Monad m =>
(String -> Int -> String -> m ()) -> [String] -> m ()
In the expression: return ()
In an equation for `f2': f2 _ _ = return ()
In an equation for `f':
f _ (x : _)
= f2 Nothing x
where
f2 :: (Maybe Int) -> String -> m ()
f2 _ _ = return ()