[Haskell-cafe] Difference Lists versus Accumulators

2013-01-08 Thread Edsko de Vries
Hey all, The connection between difference lists and accumulators is probably well known, but I only recently realized it myself and a quick Google search didn't find turn up any page where this was explicitly stated, so I thought this observation might be useful to some. Every beginner Haskell

Re: [Haskell-cafe] Difference Lists versus Accumulators

2013-01-08 Thread Roman Cheplyaka
* Edsko de Vries edskodevr...@gmail.com [2013-01-08 12:22:59+] But what happens when we return a difference list instead, replacing [] with id, (++) with (.) and [x] with (x :)? ... And we have recovered the standard definition using an accumulator! I thought that was cute :) And may

Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-08 Thread Johannes Waldmann
http://article.gmane.org/gmane.comp.lang.haskell.parallel/340 (with follow-up message about rseq = rdeepseq) - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] What happened to first-class modules?

2013-01-08 Thread Ismael Figueroa Palet
I just read this page http://www.haskell.org/haskellwiki/First-class_module. It seems there was not much no ongoing work on this topic... does somebody know what happened to first-class modules? what are the actual research papers about this topic? Thanks -- Ismael

Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-08 Thread Ertugrul Söylemez
Joachim Breitner m...@joachim-breitner.de wrote: I’m wondering if the use of deepseq to avoid unwanted lazyness might be a too large hammer in some use cases. Therefore, I’m looking for real world programs with ample use of deepseq, and ideally easy ways to test performance (so preferably no

Re: [Haskell-cafe] Difference Lists versus Accumulators

2013-01-08 Thread Stephen Tetley
See the first Worker / Wrapper paper by Andy Gill and Graham Hutton. Particularly there is exactly this derivation of reverse through preliminarily using a Hughes (difference) list. On 8 January 2013 12:22, Edsko de Vries edskodevr...@gmail.com wrote: Hey all, The connection between difference

Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-08 Thread Evan Laforge
surprisingly, deepseq is not used as much as I thought. http://packdeps.haskellers.com/reverse/deepseq lists a lot of packages, but (after grepping through some of the code) most just define NFData instances and/or use it in tests, but rarely in the „real“ code. For some reason I expected it

Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-08 Thread Joachim Breitner
Hi, Am Dienstag, den 08.01.2013, 13:01 -0800 schrieb Evan Laforge: surprisingly, deepseq is not used as much as I thought. http://packdeps.haskellers.com/reverse/deepseq lists a lot of packages, but (after grepping through some of the code) most just define NFData instances and/or use it