Re: Re: [Haskell-cafe] walking a directory tree efficiently

Hi, what about avoid the use of the unfold over the tree and construct it directly (e.g. see http://hpaste.org/13919#a3)? I wonder if there is (an easy) possibility to construct the tree lazily so that output start immediately for large trees. best, Massimiliano Gubinelli -- View this message in context: http://www.nabble.com/walking-a-directory-tree-efficiently-tp21446337p214758... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

Massimiliano Gubinelli wrote:
Hi, what about avoid the use of the unfold over the tree and construct it directly (e.g. see http://hpaste.org/13919#a3)?
Nice solution!
I wonder if there is (an easy) possibility to construct the tree lazily so that output start immediately for large trees.
I think the modular approach would be that of using a fold-left enumerator that produces the list of paths and navigation operations by traversing the dir hierarchy "Depth First": data DirTraversalInfo = Path String | DirUp | DirDown I guess you know: http://okmij.org/ftp/papers/LL3-collections-talk.pdf
best, Massimiliano Gubinelli
Ciao Paolo
participants (2)
-
Massimiliano Gubinelli
-
Paolo Losi