snap-core 0.2.7.1 → 0.2.8
raw patch · 2 files changed
+17/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- snap-core.cabal +1/−1
- src/Snap/Internal/Types.hs +16/−0
snap-core.cabal view
@@ -1,5 +1,5 @@ name: snap-core-version: 0.2.7.1+version: 0.2.8 synopsis: Snap: A Haskell Web Framework (Core) description:
src/Snap/Internal/Types.hs view
@@ -387,6 +387,10 @@ ------------------------------------------------------------------------------ -- | Adds the given strict 'ByteString' to the body of the 'Response' stored in -- the 'Snap' monad state.+--+-- Warning: This function is intentionally non-strict. If any pure+-- exceptions are raised by the expression creating the 'ByteString',+-- the exception won't actually be raised within the Snap handler. writeBS :: ByteString -> Snap () writeBS s = addToOutput $ enumBS s @@ -394,6 +398,10 @@ ------------------------------------------------------------------------------ -- | Adds the given lazy 'L.ByteString' to the body of the 'Response' stored in -- the 'Snap' monad state.+--+-- Warning: This function is intentionally non-strict. If any pure+-- exceptions are raised by the expression creating the 'ByteString',+-- the exception won't actually be raised within the Snap handler. writeLBS :: L.ByteString -> Snap () writeLBS s = addToOutput $ enumLBS s @@ -401,6 +409,10 @@ ------------------------------------------------------------------------------ -- | Adds the given strict 'T.Text' to the body of the 'Response' stored in the -- 'Snap' monad state.+--+-- Warning: This function is intentionally non-strict. If any pure+-- exceptions are raised by the expression creating the 'ByteString',+-- the exception won't actually be raised within the Snap handler. writeText :: T.Text -> Snap () writeText s = writeBS $ T.encodeUtf8 s @@ -408,6 +420,10 @@ ------------------------------------------------------------------------------ -- | Adds the given lazy 'LT.Text' to the body of the 'Response' stored in the -- 'Snap' monad state.+--+-- Warning: This function is intentionally non-strict. If any pure+-- exceptions are raised by the expression creating the 'ByteString',+-- the exception won't actually be raised within the Snap handler. writeLazyText :: LT.Text -> Snap () writeLazyText s = writeLBS $ LT.encodeUtf8 s