Permalink
Browse files

Replaced double occurances of I.joinI by ><>

  • Loading branch information...
1 parent c1d4180 commit d22e28227e8ef8692fe8d473635bdecd14b5ab28 @alang9 committed Nov 23, 2011
Showing with 6 additions and 6 deletions.
  1. +1 −1 Data/ZoomCache/Gnuplot.hs
  2. +5 −5 tools/zoom-cache-gnuplot.hs
@@ -207,7 +207,7 @@ bollingerPlot dsums = mavg `mappend` upperBB `mappend` lowerBB
getStreams :: FilePath -> Z.TrackNo -> IO [Z.Stream]
getStreams fp tn =
flip I.fileDriverRandom fp $
- (I.joinI $ (enumCacheFile standardIdentifiers :: I.Enumeratee ByteString [Stream] IO [Stream]) I.stream2stream)
+ (I.joinI $ (enumCacheFile standardIdentifiers) I.stream2stream)
-- As things stand, we are doing too much processing after running the
-- iteratee. Most of it can be moved before.
@@ -16,7 +16,7 @@ import System.Environment (getArgs)
import System.Exit (exitWith)
import System.FilePath.Posix
import qualified Data.Iteratee as I
-import Data.Iteratee (Iteratee(..), stream2stream, fileDriverRandom)
+import Data.Iteratee (Iteratee(..), stream2stream, fileDriverRandom, (><>))
import Data.Iteratee.ZoomCache (Stream)
import Data.ZoomCache.Numeric
@@ -144,7 +144,7 @@ candleProcess (fp, tn, lvl) = fileDriverRandom iter fp
where
iter :: Iteratee ByteString IO (Plot.T TimeStamp Double)
iter = I.joinI . (enumCacheFile standardIdentifiers) $ do
- dsums <- I.joinI . filterTracks [tn] . I.joinI . enumSummaryDouble lvl $ stream2stream
+ dsums <- I.joinI $ (filterTracks [tn] ><> enumSummaryDouble lvl) stream2stream
let cData = candlePlotData dsums
return $ candlePlot cData
@@ -153,23 +153,23 @@ avgProcess (fp, tn, lvl) = fileDriverRandom iter fp
where
iter :: Iteratee ByteString IO (Plot.T TimeStamp Double)
iter = I.joinI . (enumCacheFile standardIdentifiers) $ do
- dsums <- I.joinI . filterTracks [tn] . I.joinI . enumSummaryDouble lvl $ stream2stream
+ dsums <- I.joinI $ (filterTracks [tn] ><> enumSummaryDouble lvl) stream2stream
return $ avgPlot dsums
mavgProcess :: (FilePath, TrackNo, Int) -> IO (Plot.T TimeStamp Double)
mavgProcess (fp, tn, lvl) = fileDriverRandom iter fp
where
iter :: Iteratee ByteString IO (Plot.T TimeStamp Double)
iter = I.joinI . (enumCacheFile standardIdentifiers) $ do
- dsums <- I.joinI . filterTracks [tn] . I.joinI . enumSummaryDouble lvl $ stream2stream
+ dsums <- I.joinI $ (filterTracks [tn] ><> enumSummaryDouble lvl) stream2stream
return $ mavgPlot dsums
bollingerProcess :: (FilePath, TrackNo, Int) -> IO (Plot.T TimeStamp Double)
bollingerProcess (fp, tn, lvl) = fileDriverRandom iter fp
where
iter :: Iteratee ByteString IO (Plot.T TimeStamp Double)
iter = I.joinI . (enumCacheFile standardIdentifiers) $ do
- dsums <- I.joinI . filterTracks [tn] . I.joinI . enumSummaryDouble lvl $ stream2stream
+ dsums <- I.joinI $ (filterTracks [tn] ><> enumSummaryDouble lvl) stream2stream
return $ bollingerPlot dsums
lineProcess :: (FilePath, TrackNo) -> IO (Plot.T TimeStamp Double)

0 comments on commit d22e282

Please sign in to comment.