Skip to content

Commit

Permalink
bufferIteratee: fix boneheaded unnecessary type conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorycollins committed May 30, 2010
1 parent 2e31154 commit 28689f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Snap/Iteratee.hs
Expand Up @@ -145,7 +145,7 @@ bufferIteratee = return . go (D.empty,0)
where where
big = toWrap $ L.fromChunks [S.concat $ D.toList dl] big = toWrap $ L.fromChunks [S.concat $ D.toList dl]


f (!dl,!n) iter (Chunk ws) = f (!dl,!n) iter (Chunk (WrapBS s)) =
if n' > blocksize if n' > blocksize
then do then do
iterv <- runIter iter (Chunk big) iterv <- runIter iter (Chunk big)
Expand All @@ -155,7 +155,6 @@ bufferIteratee = return . go (D.empty,0)
Cont i Nothing -> return $ Cont (go (D.empty,0) i) Nothing Cont i Nothing -> return $ Cont (go (D.empty,0) i) Nothing
else return $ Cont (go (dl',n') iter) Nothing else return $ Cont (go (dl',n') iter) Nothing
where where
s = S.concat $ L.toChunks $ fromWrap ws
m = S.length s m = S.length s
n' = n+m n' = n+m
dl' = D.snoc dl s dl' = D.snoc dl s
Expand Down

0 comments on commit 28689f3

Please sign in to comment.