Permalink
Browse files

Remove superfluous (and likely incorrect) clause in takeExactly. Closes

  • Loading branch information...
1 parent a792abe commit 6e76622c65b3c11a91139ebaf6c2763ae91ac9db @gregorycollins gregorycollins committed Apr 30, 2011
Showing with 0 additions and 7 deletions.
  1. +0 −7 src/Snap/Iteratee.hs
View
@@ -470,13 +470,6 @@ take' !n st@(Continue k) = do
takeExactly :: (Monad m)
=> Int64
-> Enumeratee ByteString ByteString m a
-takeExactly 0 s = do
- s' <- lift $ runIteratee $ enumEOF s
- case s' of
- (Continue _) -> error "divergent iteratee"
- (Error e) -> throwError e
- (Yield v _) -> yield (Yield v EOF) EOF
-
takeExactly !n y@(Yield _ _ ) = drop' n >> return y
takeExactly _ (Error e ) = throwError e
takeExactly !n st@(Continue !k) = do

0 comments on commit 6e76622

Please sign in to comment.