[Haskell-beginners] Finite State Machine ..
wagner.andrew at gmail.com
Sat Feb 28 22:17:36 EST 2009
This does sound interesting. Can you provide (at least some of) the code?
On Sat, Feb 28, 2009 at 9:36 PM, Tom Poliquin <poliquin at softcomp.com> wrote:
> I'm working on a project (in Haskell) and was
> given some old Java code to indicate the required
> functionality for a particular function. It's a page of
> nested (4 deep) if statements. (That's probably
> why they gave me the code, no one could
> describe it).
> I would normally convert this to an FSM,
> ..... but this is Haskell!
> 1) Is there a nice (canonical) way of eliminating
> nested evil in Haskell? I thought that perhaps making
> a tuple of all the if's conditions and patterm matching
> on them might make a bit more comprehensible.
> Likely there's a better way.
> 2) If an FSM is appropriate is there a 'standard'
> Haskell FSM implementation?
> I looked around and could find very little. One
> paper talked about Arrows but that seems like a bit
> of overkill ..
> It actually seems like a fun problem .. if I
> had the time ..
> Any thoughts greatly appreciated!
> Beginners mailing list
> Beginners at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners