Skip to content
Browse files

Fix build issues w.r.t. enumerator 0.4.5

  • Loading branch information...
1 parent 8365c6b commit 1d6627a4c5dc4581713869e57c290456a005a17e @gregorycollins gregorycollins committed
Showing with 7 additions and 16 deletions.
  1. +1 −1 snap-core.cabal
  2. +6 −15 src/Snap/Iteratee.hs
View
2 snap-core.cabal
@@ -149,7 +149,7 @@ Library
deepseq >= 1.1 && <1.2,
directory,
dlist >= 0.5 && < 0.6,
- enumerator > 0.4.2 && < 0.5,
+ enumerator >= 0.4.5 && < 0.5,
filepath,
MonadCatchIO-transformers >= 0.2.1 && < 0.3,
mtl == 2.0.*,
View
21 src/Snap/Iteratee.hs
@@ -93,18 +93,8 @@ module Snap.Iteratee
------------------------------------------------------------------------------
-{-
-
-import Control.Exception (SomeException)
-import "MonadCatchIO-transformers" Control.Monad.CatchIO
-import qualified Data.DList as D
-import Data.IORef
-import Prelude hiding (catch,drop)
-
--}
-
import Control.DeepSeq
-import Control.Exception (SomeException, assert)
+import Control.Exception (assert)
import Control.Monad
import "MonadCatchIO-transformers" Control.Monad.CatchIO
import Control.Monad.Trans (MonadIO, lift, liftIO)
@@ -112,9 +102,10 @@ import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as S
import qualified Data.ByteString.Unsafe as S
import qualified Data.ByteString.Lazy.Char8 as L
-import Data.Enumerator hiding (drop)
-import Data.Enumerator.IO (enumHandle)
-import Data.List (foldl')
+import Data.Enumerator hiding (consume, drop, head)
+import Data.Enumerator.List hiding (take, drop)
+import Data.Enumerator.Binary (enumHandle)
+import qualified Data.List as List
import Data.Monoid (mappend)
import Data.Typeable
import Foreign hiding (peek)
@@ -149,7 +140,7 @@ instance (Functor m, MonadCatchIO m) =>
------------------------------------------------------------------------------
-- | Get the length of a bytestring Stream
streamLength :: Stream ByteString -> Int
-streamLength (Chunks xs) = foldl' (\c s -> c + S.length s) 0 xs
+streamLength (Chunks xs) = List.foldl' (\c s -> c + S.length s) 0 xs
streamLength EOF = 0

0 comments on commit 1d6627a

Please sign in to comment.
Something went wrong with that request. Please try again.