Hi Brent,
Thanks for your reply.
I asked for an example, because I thought I needed to use Control.Monad.Event and I did not go to Monads in my learning yet (you only have so much time left having a full time job and a little boy:)). Since Control.Monad.Event is not what I want, do not bother with the example.
Hong
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
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners