diff --git a/README.md b/README.md index 1986451..c824e3a 100644 --- a/README.md +++ b/README.md @@ -259,7 +259,9 @@ totalFileSize path = do liftIO $ putStrLn $ "Found " <> path' getFileSize path' >>= \case - Right size -> pure $ Sum size + Right size -> do + liftIO $ putStrLn $ " ... " <> show size <> " bytes" + pure $ Sum size Left NotAFile -> do totalFileSize path' @@ -299,11 +301,15 @@ runDummyFS root = interpret \case ``` >>> main Found ./README.md + ... 4000 bytes Found ./src Found ./src/Bar.hs + ... 1000 bytes Found ./src/Foo.hs + ... 2000 bytes Found ./test Found ./test/Baz.hs + ... 3000 bytes Sum {getSum = 10000} ``` diff --git a/heftia-effects/Example/NonDet/Main.hs b/heftia-effects/Example/NonDet/Main.hs index 101c4b8..12b31da 100644 --- a/heftia-effects/Example/NonDet/Main.hs +++ b/heftia-effects/Example/NonDet/Main.hs @@ -61,7 +61,9 @@ totalFileSize path = do liftIO $ putStrLn $ "Found " <> path' getFileSize path' >>= \case - Right size -> pure $ Sum size + Right size -> do + liftIO $ putStrLn $ " ... " <> show size <> " bytes" + pure $ Sum size Left NotAFile -> do totalFileSize path' @@ -77,11 +79,15 @@ main = runEff {- >>> main Found ./README.md + ... 4000 bytes Found ./src Found ./src/Bar.hs + ... 1000 bytes Found ./src/Foo.hs + ... 2000 bytes Found ./test Found ./test/Baz.hs + ... 3000 bytes Sum {getSum = 10000} -}