wall clean and compat

This commit is contained in:
Gershom 2017-11-06 11:55:27 -05:00
parent 90292e1f62
commit db13077ccb
2 changed files with 2 additions and 3 deletions

View File

@ -18,7 +18,6 @@ import Prelude ()
import Prelude.Compat import Prelude.Compat
import Control.Concurrent (newMVar, modifyMVar) import Control.Concurrent (newMVar, modifyMVar)
import Control.Monad (when)
import Data.Foldable (toList) import Data.Foldable (toList)
import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy as BL
import Data.List (foldl') import Data.List (foldl')
@ -266,7 +265,7 @@ instance OVERLAPPABLE_
, requestMethod = reflectMethod (Proxy :: Proxy method) , requestMethod = reflectMethod (Proxy :: Proxy method)
} }
return . buildFromStream $ ResultStream $ \k -> return . buildFromStream $ ResultStream $ \k ->
runStreamingResponse sresp $ \(status,_headers,_httpversion,reader) -> do runStreamingResponse sresp $ \(_status,_headers,_httpversion,reader) -> do
let unrender = unrenderFrames (Proxy :: Proxy framing) (Proxy :: Proxy a) let unrender = unrenderFrames (Proxy :: Proxy framing) (Proxy :: Proxy a)
loop bs = do loop bs = do
res <- BL.fromStrict <$> reader res <- BL.fromStrict <$> reader

View File

@ -19,7 +19,7 @@ import Data.Proxy (Proxy)
import Data.Typeable (Typeable) import Data.Typeable (Typeable)
import GHC.Generics (Generic) import GHC.Generics (Generic)
import Text.Read (readMaybe) import Text.Read (readMaybe)
import Data.Bifunctor (first) import Control.Arrow (first)
import Network.HTTP.Types.Method (StdMethod (..)) import Network.HTTP.Types.Method (StdMethod (..))
-- | A Stream endpoint for a given method emits a stream of encoded values at a given Content-Type, delimited by a framing strategy. Steam endpoints always return response code 200 on success. Type synonyms are provided for standard methods. -- | A Stream endpoint for a given method emits a stream of encoded values at a given Content-Type, delimited by a framing strategy. Steam endpoints always return response code 200 on success. Type synonyms are provided for standard methods.