Re: [Haskell-cafe] State Machine and the Abstractions

2011-05-30 Thread Heinrich Apfelmus
Yves Parès wrote: For the purposes of a simple strategy game, I'd like to build an EDSL that expresses missions. A mission could be represented as a state machine. With basic bricks such as actions (MoveTo, ShootAt...) or tests (EnemiesAround, LowHealth...), I could (ideally dynamically) build s

Re: [Haskell-cafe] State Machine and the Abstractions

2011-05-29 Thread Stephen Tetley
Try these two first: Domain Specific Languages for Cellular Interactions http://www.cs.missouri.edu/~harrison/papers/embc04.pdf The Essence of Multitasking http://www.cs.missouri.edu/~harrison/papers/amast06.pdf There are more resumptions (and "reactions") in "Achieving Information Flow Securit

Re: [Haskell-cafe] State Machine and the Abstractions

2011-05-29 Thread Ryan Ingram
I suggest you take a look at MonadPrompt and/or Operational (two competing packages, one of which I wrote). And yes, you probably need some operation Concurrent :: [Mission ()] -> Mission () or Interrupt :: Mission () -> Mission Bool -> Mission () -> Mission () which runs its first argument unti

Re: [Haskell-cafe] State Machine and the Abstractions

2011-05-29 Thread Yves Parès
ecialized types, and see where that takes you. If it > happens to lead to an implementation of Arrow, yay. If it doesn't, then you > at least still have something that functions. > >> Message: 13 >> Date: Fri, 27 May 2011 21:06:10 +0200 >> From: Yves Par?s >> Su

Re: [Haskell-cafe] State Machine and the Abstractions

2011-05-27 Thread Chuzzle Guevero
esn't, then you at least still have something that functions. Message: 13 Date: Fri, 27 May 2011 21:06:10 +0200 From: Yves Par?s Subject: [Haskell-cafe] State Machine and the Abstractions To: Haskell-Cafe Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hello, For the

Re: [Haskell-cafe] State Machine and the Abstractions

2011-05-27 Thread Stephen Tetley
On 27 May 2011 20:06, Yves Parès wrote: > So I thought about Arrows, as they can express sequential and parallel > actions, but I don't know if it would be a right way to model the > interruptions/recoveries. > What do you think about it? Do you know of similar situations and of the way > they've

Re: [Haskell-cafe] State Machine and the Abstractions

2011-05-27 Thread Antoine Latter
On Fri, May 27, 2011 at 2:06 PM, Yves Parès wrote: > Hello, > > For the purposes of a simple strategy game, I'd like to build an EDSL that > expresses missions. A mission could be represented as a state machine. > With basic bricks such as actions (MoveTo, ShootAt...) or tests > (EnemiesAround, Lo

[Haskell-cafe] State Machine and the Abstractions

2011-05-27 Thread Yves Parès
Hello, For the purposes of a simple strategy game, I'd like to build an EDSL that expresses missions. A mission could be represented as a state machine. With basic bricks such as actions (MoveTo, ShootAt...) or tests (EnemiesAround, LowHealth...), I could (ideally dynamically) build some strategic