yesod-fay 0.9.0 → 0.10.0
raw patch · 3 files changed
+16/−8 lines, 3 filesdep ~faynew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: fay
API changes (from Hackage documentation)
+ Yesod.Fay: data family Route a :: Type
- Fay.Yesod: ajaxCommandWithErrorHandling :: Automatic command -> (Automatic a -> Fay ()) -> (Fay ()) -> Fay ()
+ Fay.Yesod: ajaxCommandWithErrorHandling :: Automatic command -> (Automatic a -> Fay ()) -> Fay () -> Fay ()
- Fay.Yesod: callWithErrorHandling :: (Returns a -> command) -> (a -> Fay ()) -> (Fay ()) -> Fay ()
+ Fay.Yesod: callWithErrorHandling :: (Returns a -> command) -> (a -> Fay ()) -> Fay () -> Fay ()
- Yesod.Fay: YesodFaySettings :: String -> Maybe (FilePath, Exp) -> String -> IO String -> Maybe (FilePath, Exp) -> Bool -> [String] -> Bool -> YesodFaySettings
+ Yesod.Fay: YesodFaySettings :: String -> Maybe (FilePath, Exp) -> (String -> IO String) -> Maybe (FilePath, Exp) -> Bool -> [String] -> Bool -> YesodFaySettings
- Yesod.Fay: fayEncode :: (YesodFay master, (Data a)) => master -> a -> Maybe Value
+ Yesod.Fay: fayEncode :: (YesodFay master, Data a) => master -> a -> Maybe Value
- Yesod.Fay: urlJqueryJs :: YesodJquery a => a -> Either Route a Text
+ Yesod.Fay: urlJqueryJs :: YesodJquery a => a -> Either (Route a) Text
- Yesod.Fay: urlJqueryUiCss :: YesodJquery a => a -> Either Route a Text
+ Yesod.Fay: urlJqueryUiCss :: YesodJquery a => a -> Either (Route a) Text
- Yesod.Fay: urlJqueryUiDateTimePicker :: YesodJquery a => a -> Either Route a Text
+ Yesod.Fay: urlJqueryUiDateTimePicker :: YesodJquery a => a -> Either (Route a) Text
- Yesod.Fay: urlJqueryUiJs :: YesodJquery a => a -> Either Route a Text
+ Yesod.Fay: urlJqueryUiJs :: YesodJquery a => a -> Either (Route a) Text
Files
- ChangeLog.md +4/−0
- Yesod/Fay.hs +10/−6
- yesod-fay.cabal +2/−2
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for yesod-fay +## 0.10.0++* Support for compilation with stack [#22](https://github.com/fpco/yesod-fay/issues/22)+ ## 0.9.0 * Support for Yesod 1.6 [#20](https://github.com/fpco/yesod-fay/issues/20)
Yesod/Fay.hs view
@@ -94,7 +94,7 @@ import Data.Default (def) #endif import Data.Digest.Pure.MD5 (md5)-import Data.List (isPrefixOf)+import Data.List (isPrefixOf, isInfixOf) import Data.Maybe (isNothing) import Data.Monoid ((<>), mempty) import Data.Text (pack, unpack)@@ -140,7 +140,7 @@ import Control.Exception (IOException,catch) import Prelude hiding (catch) import System.Directory-import System.Environment (getEnvironment)+import System.Environment (lookupEnv) import Text.Julius (Javascript (Javascript), julius) import Yesod.Core import Yesod.Fay.Data@@ -229,7 +229,7 @@ -- | Read runtime from default Fay config. getRuntime :: IO L.ByteString-getRuntime = readConfigRuntime defaultConfig >>= return . LC.pack+getRuntime = readConfigRuntime config >>= return . LC.pack updateRuntime :: FilePath -> IO () updateRuntime fp = getRuntime >>= \js ->@@ -318,9 +318,13 @@ case result of Right cache -> return (Right cache) Left refreshTo -> do- packageConf <- fmap (lookup "HASKELL_PACKAGE_SANDBOX") getEnvironment- result <- compile conf {configPackageConf = packageConf}- fp+ sandboxPackageConf <- lookupEnv "HASKELL_PACKAGE_SANDBOX"+ let packageConf = case sandboxPackageConf of+ Nothing -> Nothing+ Just sandbox -> if isInfixOf ".stack" sandbox+ then Nothing+ else sandboxPackageConf+ result <- compile (conf {configPackageConf = packageConf}) fp case result of Left e -> return (Left e) Right (sourceAndFiles -> (source',files)) -> do
yesod-fay.cabal view
@@ -1,5 +1,5 @@ name: yesod-fay-version: 0.9.0+version: 0.10.0 synopsis: Utilities for using the Fay Haskell-to-JS compiler with Yesod. description: For initial discussion, see <http://www.yesodweb.com/blog/2012/10/yesod-fay-js>. This is a work-in-progress. homepage: https://github.com/fpco/yesod-fay@@ -17,7 +17,7 @@ Fay.Yesod other-modules: Yesod.Fay.Data build-depends: base >= 4 && < 5- , fay >= 0.21.2.1+ , fay >= 0.24 , fay-dom >= 0.5 , transformers >= 0.2 , aeson >= 0.6