happstack-heist 0.5.1 → 6.0.0
raw patch · 2 files changed
+9/−7 lines, 2 filesdep +blaze-builderdep ~happstack-serverdep ~heistPVP ok
version bump matches the API change (PVP)
Dependencies added: blaze-builder
Dependency ranges changed: happstack-server, heist
API changes (from Hackage documentation)
Files
- Happstack/Server/Heist.hs +5/−4
- happstack-heist.cabal +4/−3
Happstack/Server/Heist.hs view
@@ -9,6 +9,7 @@ , render ) where +import Blaze.ByteString.Builder (toLazyByteString) import Control.Monad (MonadPlus(mzero), msum) import Control.Monad.Trans (MonadIO) import Data.ByteString.Char8 (ByteString)@@ -44,10 +45,10 @@ -- | render the specified template render:: (MonadPlus m, MonadIO m) => TemplateDirectory m -- ^ 'TemplateDirectory' handle- -> ByteString -- ^ template name+ -> ByteString -- ^ template name -> m Response render td template = do ts <- getDirectoryTS td- bytes <- renderTemplate ts template- flip (maybe mzero) bytes $ \x -> do- return (toResponseBS (B.pack "text/html; charset=utf-8") (L.fromChunks [x]))+ t <- renderTemplate ts template+ flip (maybe mzero) t $ \(builder, mimeType) -> do+ return (toResponseBS mimeType (toLazyByteString builder))
happstack-heist.cabal view
@@ -1,5 +1,5 @@ Name: happstack-heist-Version: 0.5.1+Version: 6.0.0 Synopsis: Support for using Heist templates in Happstack Description: Happstack is a web application framework. Heist is an XML templating solution. This package makes it easy to use Heist templates with Happstack. Homepage: http://www.happstack.com/@@ -20,9 +20,10 @@ Library Exposed-modules: Happstack.Server.Heist Build-depends: base >= 3.0 && < 5.0,+ blaze-builder >= 0.2 && <0.3, bytestring == 0.9.*, filepath,- happstack-server >= 0.5.0.3 && < 7,- heist == 0.2.*,+ happstack-server >= 6.0 && < 6.1,+ heist >= 0.5 && < 0.6, hexpat == 0.19.*, mtl == 2.*