Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replaced double occurances of I.joinI by ><>

  • Loading branch information...
commit d22e28227e8ef8692fe8d473635bdecd14b5ab28 1 parent c1d4180
@alang9 authored
Showing with 6 additions and 6 deletions.
  1. +1 −1  Data/ZoomCache/Gnuplot.hs
  2. +5 −5 tools/zoom-cache-gnuplot.hs
View
2  Data/ZoomCache/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.
View
10 tools/zoom-cache-gnuplot.hs
@@ -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,7 +153,7 @@ 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)
@@ -161,7 +161,7 @@ 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)
@@ -169,7 +169,7 @@ 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)
Please sign in to comment.
Something went wrong with that request. Please try again.