[Haskell-cafe] Question: Lazy Incremental Evaluation and Haskell?

Heinrich Apfelmus apfelmus at quantentunnel.de
Fri Oct 7 12:17:45 CEST 2011


David Barbour wrote:
> Benjamin Redelings wrote:
>> My question is, roughly, is there already an existing framework for
>> incremental evaluation in Haskell?
>
> Functional Reactive Programming can model this sort of 'change over
> time' incremental computation, but I doubt you'd get a performance
> benefit from it unless your operations are considerably more
> expensive than '+' on numbers. Look into the 'Reactive' library, and
> Conal Elliott's paper on it (Push-Pull FRP).

I'm currently developing a library for functional reactive 
programming[1] and I've thought a bit about incremental evaluation and 
FRP. Here my conclusions:

FRP is somewhat orthogonal to incremental computation because FRP is 
focusing on expressiveness while incremental computation focuses on 
performance. You can formulate some incremental algorithms in terms of 
FRP, but you need special support from the implementation to make it 
efficient. I do know that reactive-banana can handle some cases, but I 
have my doubts whether Conal's Reactive library can (afaik, nobody has 
tried to reason about its resource usage explicitly). Even then, events 
and behaviors are "one abstraction level too low". In my opinion, you 
are better off with a library/approach geared directly towards 
incremental computations.


   [1]: http://haskell.org/haskellwiki/Reactive-banana

Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com




More information about the Haskell-Cafe mailing list