[Haskell-cafe] To [] Or Not To []

Olaf Klinke olf at aatal-apotheke.de
Fri Mar 10 23:28:49 UTC 2017


Johannes, 

Thanks for writing this. 

Actually, your negative abstract turns out to be for a quite positive article. List are like iterators, that's the essence, and as long as you are iterating, it's fine to use []. The prominence of singly linked lists in Haskell has tought me to write my data processing programs in a streaming style. To think about what data must be held in memory (use Maps or whatever for this) and read the other data in as a list. 

I'd be interested whether there is a way to check which of my lists in the source code the compiler managed to "deforest" away. Which intermediate files should I look at? What are the tools to inspect?

Olaf


More information about the Haskell-Cafe mailing list