Hi Antoine,<br>Thanks for your interest.<br><br><div class="gmail_quote">On Sun, Oct 9, 2011 at 11:57 PM, Antoine Latter <span dir="ltr">&lt;<a href="mailto:aslatter@gmail.com">aslatter@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
&gt; interpret :: (CommandIO io, Map t) =&gt; Commands t io CommandResult<br>
&gt;<br>
<br>
</div>What is the &#39;Commands&#39; type? What is the &#39;Map&#39; class?<br>
<div class="im"><br></div></blockquote><div><br>More details here : <a href="https://github.com/abailly/crete1941/blob/master/CommandsInterpreter.hs">https://github.com/abailly/crete1941/blob/master/CommandsInterpreter.hs</a><br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
This doesn&#39;t work because the API you want to provide makes it<br>
possible to do wrong.<br>
<br>
Your class might be able to fit into WAI if each back-end provided a<br>
single function:<br>
<br>
&gt; execute :: (Command -&gt; io CommandResult) -&gt; io ()<br>
<br>
This should make sense for console, Handle-based and HTTP.<br>
<br>
Am I on the right track?<br></blockquote><div><br>Yes, sure. I actually think I over-engineered the whole thing and inverting the dependency might simplify a lot of things. The signature you provide is exactly what I was thinking about after posting my mail : simply a game-features focused request/response conversation wrapped by whatever I/O is needed.<br>
<br></div></div>Arnaud<br>