@@ -1,3 +1,4 @@
1+{-# LANGUAGE Rank2Types #-}
12-- | A collection of utility functions for dealing with 'Enumerator's.
23module Network.Wai.Enumerator
34 ( -- * Utilities
@@ -40,7 +41,7 @@ toLBS e = L.fromChunks `fmap` helper where
4041 xs <- helper
4142 return $ x' : xs
4243
43−fromLBS :: L.ByteString -> Enumerator a
44+fromLBS :: L.ByteString -> (forall a. Enumerator a)
4445fromLBS lbs iter a0 = helper a0 $ L.toChunks lbs where
4546 helper a [] = return $ Right a
4647 helper a (x:xs) = do
@@ -49,7 +50,7 @@ fromLBS lbs iter a0 = helper a0 $ L.toChunks lbs where
4950 Left a' -> return $ Left a'
5051 Right a' -> helper a' xs
5152
52−fromLBS' :: IO L.ByteString -> Enumerator a
53+fromLBS' :: IO L.ByteString -> (forall a. Enumerator a)
5354fromLBS' lbs' iter a0 = lbs' >>= \lbs -> fromLBS lbs iter a0
5455
5556-- | A source is a more standard way of accessing data from an 'Enumerator'.