Hi Antoine,
Thanks for your interest.

On Sun, Oct 9, 2011 at 11:57 PM, Antoine Latter <[email protected]> wrote:

>
> > interpret :: (CommandIO io, Map t) => Commands t io CommandResult
> >
>
> What is the 'Commands' type? What is the 'Map' class?
>
>
More details here :
https://github.com/abailly/crete1941/blob/master/CommandsInterpreter.hs


> This doesn't work because the API you want to provide makes it
> possible to do wrong.
>
> Your class might be able to fit into WAI if each back-end provided a
> single function:
>
> > execute :: (Command -> io CommandResult) -> io ()
>
> This should make sense for console, Handle-based and HTTP.
>
> Am I on the right track?
>

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.

Arnaud
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to