
20 Sep
2006
20 Sep
'06
3:38 a.m.
Vivian McPhail wrote:
class Forkable a where fork :: String -> a -> a -> a .... What I would like to be able to do is differentiate between Forkable (m a -> b) and Forkable (<function type> -> b).
Have you tried this combination of instances? instance Forkable (IO a) where ... -- and similarly for all the concrete -- monad types you will use fork with instance (Forkable a, Forkable b) => Forkable (a -> b) where ... Alternatively, since the fork function seems to be all about propagating a value (the String), would Control.Monad.Reader serve your purpose? Regards, Tom