snaplet-fay 0.3.3.4 → 0.3.3.5
raw patch · 4 files changed
+11/−9 lines, 4 filesdep ~aesondep ~basedep ~bytestring
Dependency ranges changed: aeson, base, bytestring, fay
Files
- CHANGELOG.md +4/−0
- snaplet-fay.cabal +2/−2
- src/Snap/Snaplet/Fay.hs +2/−2
- src/Snap/Snaplet/Fay/Internal.hs +3/−5
CHANGELOG.md view
@@ -1,5 +1,9 @@ ## Changelog +#### 0.3.3.5 (2014-04-29)++* Update to `fay 0.20`+ #### 0.3.3.4 (2014-01-19) * Allow aeson 0.7.*
snaplet-fay.cabal view
@@ -1,5 +1,5 @@ name: snaplet-fay-version: 0.3.3.4+version: 0.3.3.5 synopsis: Fay integration for Snap with request- and pre-compilation. description: Fay integration for Snap with request based compilation during development and precompilation in production. For more information, please see <https://github.com/bergmark/snaplet-fay>.@@ -56,7 +56,7 @@ , configurator == 0.2.* , data-default == 0.5.* , directory >= 1.1 && < 1.3- , fay >= 0.18.0.2 && < 0.20+ , fay == 0.20.* , filepath == 1.3.* , mtl == 2.1.* , snap >= 0.11.1 && < 0.14
src/Snap/Snaplet/Fay.hs view
@@ -112,7 +112,7 @@ -- | JSON response. -- | If you only want to send JSON and handle input manually, use toFayax. -- | If you want to receive JSON and handle the response manually, use fromFayax-fayax :: (Data f1, Read f1, Show f2) => (f1 -> Handler h1 h2 f2) -> Handler h1 h2 ()+fayax :: (Data f1, Read f1, Data f2) => (f1 -> Handler h1 h2 f2) -> Handler h1 h2 () fayax g = do res <- decode case res of@@ -120,7 +120,7 @@ Right res -> toFayax . g $ res -- | fayax only sending JSON.-toFayax :: Show f2 => Handler h1 h2 f2 -> Handler h1 h2 ()+toFayax :: Data f2 => Handler h1 h2 f2 -> Handler h1 h2 () toFayax g = do modifyResponse . setContentType $ "text/json;charset=utf-8" writeLBS . A.encode . showToFay =<< g
src/Snap/Snaplet/Fay/Internal.hs view
@@ -5,15 +5,13 @@ import Control.Applicative import Control.Monad-import qualified Data.Aeson as A+import qualified Data.Aeson as A import qualified Data.ByteString.Lazy.Char8 as C import Data.Default-import qualified Fay as F-import qualified Fay.Compiler.Config as F+import qualified Fay as F import System.Directory import System.FilePath - -- | Configuration data Fay = Fay { snapletFilePath :: FilePath@@ -60,7 +58,7 @@ , F.configFilePath = Just f' } case res of- Right (out, _sourceMap) -> do+ Right out -> do verbosePut config $ "Compiled " ++ hsRelativePath f writeFile (jsPath config f) out return $ Success out