Permalink
Browse files

Tweaks to benchmark and example modules

Ignore-this: c8cdd420d6d57dca016b75caae22ea16

darcs-hash:20100809165259-a5925-24c8abd2ac7bde6ed4da18abb33d38a4bae379f9
  • Loading branch information...
1 parent 724247b commit c70892db71e21806ce04e8bb847f9586c04599e8 @jberryman committed Aug 9, 2010
Showing with 6 additions and 5 deletions.
  1. +2 −2 EXAMPLES/LazyExamples.hs
  2. +3 −2 System/Directory/Tree.hs
  3. +1 −1 Test.hs
View
@@ -1,4 +1,4 @@
-module LazyExamples
+module Main
where
import System.Directory.Tree
@@ -31,6 +31,6 @@ ls d = do (_ :/ Dir _ c) <- readDirectoryWithL readFile d
-- under the supplied directory. We use a more compositional style here, where
-- (<=<) is equivalent to (.) but for monadic functions (a -> m b):
du :: FileName -> IO ()
-du = print . F.sum . free <=< readDirectoryWithL (hFileSize <=< readHs)
+du = print . F.foldl' (+) 0 . free <=< readDirectoryWithL (hFileSize <=< readHs)
where readHs = flip openFile ReadMode
View
@@ -67,8 +67,9 @@ module System.Directory.Tree (
{-
TODO:
- NOW!!!:
- - performance tests of lazy/unsafe traversal required
+ NEXT:
+ - performance improvements, we want lazy dir functions to run in constant
+ space if possible.
NEXT MAYBE:
- tree combining functions
View
@@ -1,4 +1,4 @@
-module Test
+module Main
where
-- do a quick test for Darcs:

0 comments on commit c70892d

Please sign in to comment.