[Haskell-cafe] Filesystem questions

Bryan O'Sullivan bos at serpentine.com
Sat Oct 13 21:44:06 EDT 2007


Yitzchak Gale wrote:

> Python also has os.walk, a very convenient functional (sort of)
> tool for recursing through directories. (It sounds trivial, but
> it is not, there are enough annoying details that this function
> saves huge amounts of time.) Very embarrassing that Haskell
> is missing this.

See System.FilePath.Find in 
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/FileManip-0.2

> How about a built-in function that represents a directory tree
> as a lazy Data.Tree?

Not a very good idea.  Representing a directory structure as a tree 
makes people think they can manipulate it as if it were a tree, which 
leads to all kinds of nasty bugs when the real world bleeds through the 
holes in the abstraction.

	<b


More information about the Haskell-Cafe mailing list