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">&lt;<a href="mailto:byorgey@seas.upenn.edu">byorgey@seas.upenn.edu</a>&gt;</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>
&gt; I searched &quot;schedul&quot; on hayoo!, but had no clue. It seems that I can use<br>
&gt; scheduleEventAt from Control.Monad.Event.Classes. But what is type &quot;e&quot;? It<br>
&gt; seems like an event. How do I define an event?<br>
<br>
I don&#39;t think that&#39;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&#39;s underlying calls.<br>
<br>
&gt; I have not learned Monad yet. Can some one give me a simple example? Suppose<br>
&gt; I want to run an external program &quot;pg&quot; which in Haskell&#39;s language has the<br>
&gt; type of String -&gt; IO ().<br>
<br>
Can you be more specific?  A &quot;simple example of monads&quot; 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>