Hi Brent,<br><br>Thanks for your reply.<br><br>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.<br>
<br>Hong<br><br><div class="gmail_quote">On Tue, Mar 30, 2010 at 5:38 PM, Brent Yorgey <span dir="ltr"><<a href="mailto:byorgey@seas.upenn.edu">byorgey@seas.upenn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Fri, Mar 26, 2010 at 11:29:42PM -0500, Hong Yang wrote:<br>
> I searched "schedul" on hayoo!, but had no clue. It seems that I can use<br>
> scheduleEventAt from Control.Monad.Event.Classes. But what is type "e"? It<br>
> seems like an event. How do I define an event?<br>
<br>
I don't think that's what you want; Control.Monad.Event appears to be<br>
for doing event-driven simulations, not for scheduling actual tasks on<br>
your OS. I am not sure how to do this but presumably there would have<br>
to be a library with bindings to the OS's underlying calls.<br>
<br>
> I have not learned Monad yet. Can some one give me a simple example? Suppose<br>
> I want to run an external program "pg" which in Haskell's language has the<br>
> type of String -> IO ().<br>
<br>
Can you be more specific? A "simple example of monads" is rather<br>
vague; monads are used for quite a lot of things. Have you read any<br>
particular books or tutorials?<br>
<font color="#888888"><br>
-Brent<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br>