
On Fri, Mar 26, 2010 at 11:29:42PM -0500, Hong Yang wrote:
I searched "schedul" on hayoo!, but had no clue. It seems that I can use scheduleEventAt from Control.Monad.Event.Classes. But what is type "e"? It seems like an event. How do I define an event?
I don't think that's what you want; Control.Monad.Event appears to be for doing event-driven simulations, not for scheduling actual tasks on your OS. I am not sure how to do this but presumably there would have to be a library with bindings to the OS's underlying calls.
I have not learned Monad yet. Can some one give me a simple example? Suppose I want to run an external program "pg" which in Haskell's language has the type of String -> IO ().
Can you be more specific? A "simple example of monads" is rather vague; monads are used for quite a lot of things. Have you read any particular books or tutorials? -Brent