[Haskell-cafe] sequential logic

Eric Velten de Melo ericvmelo at gmail.com
Thu Dec 6 01:47:30 CET 2012


2012/12/5 Christopher Howard <christopher.howard at frigidcode.com>:
> Hi. I was wondering what the various (and especially most simple)
> approaches one could take for working with (simulating or calculating)
> sequential logic in Haskell. By sequential logic, I mean like wikipedia
> describes, where a system is made up of logic gates, whose output is
> dependent not only on the logic operation of the gate, but on the
> previous state of the gate. (Like in electronics where the system can be
> driven by a clock signal or have memory.)
>
> Does one have to get into FRP for that sort of thing? Or use some kind
> of FSM framework? Or is there some kind of fancy state monad suitable
> for that? Or...?
>
> I'm no electronic or digital engineer, but for learning purposes I've
> been trying to see if I could build an (extremely simple) virtual
> processor or calculator in Haskell, using only the Bool type and a few
> of the boolean operators (and functions composed of the aforementioned),
> reproducing things like half adders and full adders as functions in the
> program. Of course, I quickly ran into the stateful aspect of the
> problem, in subjects like clock signal and flip flops.

Not answering your question directly, but you might be interested in
checking out this programming language:
http://en.wikipedia.org/wiki/Hume_(programming_language)

>
> --
> frigidcode.com
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



More information about the Haskell-Cafe mailing list