packages feed

potoki 0.10.1 → 0.10.2

raw patch · 2 files changed

+15/−1 lines, 2 files

Files

library/Potoki/Transform.hs view
@@ -28,6 +28,8 @@   -- * File IO   deleteFile,   appendBytesToFile,+  -- * Debugging+  traceWithCounter, ) where @@ -242,3 +244,15 @@                       return nil                 in join (fetchListIO nilIO justIO)             in fetchElementIO++{-|+Useful for debugging+-}+traceWithCounter :: (Int -> String) -> Transform a a+traceWithCounter show =+  ioTransform $ do+    counter <- newIORef 0+    return $ mapInIO $ \ x -> do+      n <- atomicModifyIORef' counter (\ n -> (succ n, n))+      putStrLn (show n)+      return x
potoki.cabal view
@@ -1,7 +1,7 @@ name:   potoki version:-  0.10.1+  0.10.2 synopsis:   Simple streaming in IO description: