Okay, I just understood that &#39;Prompt&#39; was just a sort of view for &#39;Program&#39;.<div class="gmail_quote"><div class="im"><br><br>&gt;I&#39;d like to make it very accessible, so please don&#39;t hesitate to report<br>

&gt;any difficulties with finding and understanding documentation and examples!<br><br></div>Then I think the name &#39;Prompt&#39; may be misleading for those who doesn&#39;t know the MonadPrompt package. Maybe something like &#39;ProgramView&#39; ?<div class="im">
<br>
<br>&gt;&gt; What have we achieved? Both players still can only access functions from<br>
&gt;&gt; whatever monad m turns out to be. But now each strategy can pile its own<br>
&gt;&gt; custom monad stack on the  Player m  monad! And of course, the use of<br>
&gt;&gt; the m Monad is completely optional.<br>
&gt;<br>
&gt;Of course, the custom monad stack has to provide a projection back to<br>
&gt;the  Player m a  type<br>
&gt;<br>&gt;   runMyStackT :: MyStackT (Player m) a -&gt; Player m a<br>
<br></div>According to what Bertram said, &quot;each strategy can pile its own custom monad stack ON the (Player m) monad&quot;.<br>Here, you are stacking the (Player m) monad ON the custom monad stack.<br>What is then the use of the &#39;m&#39;, in (Player <b>m</b>)? Is it not supposed to be a custom monad? (MonadIO for human, Identity for AI, etc.)<br>

<br>But then, I don&#39;t see how the game function could work:<div class="im"><br>&gt; game :: Monad m =&gt; Player m () -&gt; Player m () -&gt; m ()<br></div>As it is written, it requires both players to run in the SAME monad.<br>
And if have a network player ( e.g.<b> Player (StateT Handle IO)</b> ) and an AI storing former opponent&#39;s moves ( e.g. <b>(Monad m) =&gt; Player (StateT [Move] m)</b> ), then they can&#39;t be in the same monad...<br>

<b><br></b><div class="gmail_quote"><div class="im">2010/4/14 Heinrich Apfelmus <span dir="ltr">&lt;<a href="mailto:apfelmus@quantentunnel.de" target="_blank">apfelmus@quantentunnel.de</a>&gt;</span><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>Limestraël wrote:<div><div></div><div class="h5"><br>
&gt; I have some difficulties to see the use of PromptT, because in the tutorial,<br>
&gt; this type is never mentioned, and its operations (Return and :&gt;&gt;=) are<br>
&gt; instead constructors of ProgramT...<br>
&gt;<br>
&gt; Would you have some concrete examples? Because there I&#39;m a bit lost (since<br>
&gt; the tutorial doesn&#39;t match the operational package as it is, because of the<br>
&gt; type PromptT)...<br>
<br>
</div></div></div><div><div></div><div class="h5">The project page<br>
<br>
    <a href="http://projects.haskell.org/operational/" target="_blank">http://projects.haskell.org/operational/</a><br>
<br>
links to documentation that describes the differences to &quot;The<br>
Operational Monad Tutorial&quot;, in particular the new  Prompt  and  PromptT<br>
 types. It also links to several examples. Two small examples are also<br>
included in the Haddock documentation.<br>
<br>
<br>
I&#39;d like to make it very accessible, so please don&#39;t hesitate to report<br>
any difficulties with finding and understanding documentation and examples!<br>
<div><div></div><div><br>
<br>
Regards,<br>
Heinrich Apfelmus<br>
<br>
--<br>
<a href="http://apfelmus.nfshost.com" target="_blank">http://apfelmus.nfshost.com</a><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></div></div></blockquote></div><br>
</div><br>