on master help sign in
Avoid using the IsString Builder instance

This doesn't exist in bytestring-builder <0.4.0.0. It's easy enough to avoid relying on this, to keep the lower bound where it currently is. Fixes #443 Fixes #444

commitc20a4a25c69dab80507effe64f775667682b4f47 authorAndrew Pritchard <awpr@google.com> dateThu 8 Oct 2015, 08:10 (11 years ago) parentbec1f2e
1 file changed+2−1
wai/Network/Wai/HTTP2.hs+2−1
wai/Network/Wai/HTTP2.hs+2−1
@@ -54,6 +54,7 @@ module Network.Wai.HTTP2
5454 ) where
5555
5656import Blaze.ByteString.Builder (Builder)
57+import Blaze.ByteString.Builder.ByteString (fromByteString)
5758import Control.Exception (Exception, throwIO)
5859import Control.Monad.Trans.Cont (ContT(..))
5960import Data.ByteString (ByteString)
@@ -186,7 +187,7 @@ respondFileExists s h path size reqHdrs =
186187-- | Respond with a minimal 404 page with the given headers.
187188respondNotFound :: H.ResponseHeaders -> Responder
188189respondNotFound h = Responder $ \k -> k H.notFound404 h' $
189− streamBuilder "File not found."
190+ streamBuilder $ fromByteString "File not found."
190191 where
191192 contentType = (H.hContentType, "text/plain; charset=utf-8")
192193 h' = contentType:filter ((/=H.hContentType) . fst) h