packages feed

fay 0.14.3.0 → 0.14.4.0

raw patch · 9 files changed

+29/−14 lines, 9 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

examples/data.hs view
@@ -14,4 +14,4 @@ data Foo = Foo { x :: Double, y :: String, z :: Foo } | Bar   deriving (Show) -main = print (show (Foo 123 "abc" Bar))+main = putStrLn (show (Foo 123 "abc" Bar))
fay.cabal view
@@ -1,5 +1,5 @@ name:                fay-version:             0.14.3.0+version:             0.14.4.0 synopsis:            A compiler for Fay, a Haskell subset that compiles to JavaScript. description:         Fay is a proper subset of Haskell which is type-checked                      with GHC, and compiled to JavaScript. It is lazy, pure, has a Fay monad,@@ -20,11 +20,14 @@                      See <http://fay-lang.org/#examples>.                      .                      /Release Notes/+                     0.14.4.0:                      .-                     * Fix serialization of Defined/Nullable.+                     * Fix record updates on IE <= 8.                      .-                     * Fix Closure compression for Defined/Nullable.-                     *+                     * Import tweaks, will make compilation a lot faster (4x reported) when there are a lot of imports.+                     .+                     * Parse hs sources with base fixities.+                     .                      See full history at: <https://github.com/faylang/fay/commits> homepage:            http://fay-lang.org/ bug-reports:         https://github.com/faylang/fay/issues
js/runtime.js view
@@ -1,3 +1,12 @@+// Workaround for missing functionality in IE 8 and earlier.+if( Object.create === undefined ) {+	Object.create = function( o ) {+	    function F(){}+	    F.prototype = o;+	    return new F();+	};+}+ /*******************************************************************************  * Thunks.  */
src/Fay/Compiler.hs view
@@ -216,9 +216,9 @@     Nothing -> do       dirs <- configDirectoryIncludePaths <$> config id       (filepath,contents) <- findImport dirs name-      res <- importIt filepath contents                          -- TODO stateImported is already added in initialPass so it is not needed here                          -- but one Api test fails if it's removed.       modify $ \s -> s { stateImported     = (name,filepath) : imported                        }+      res <- importIt filepath contents       return res
src/Fay/Compiler/Exp.hs view
@@ -291,7 +291,6 @@         -- I couldn't find a code that generates (FieldUpdate (FieldPun ..))         updateStmt _ u = error ("updateStmt: " ++ show u) --- | Update a record (using clever Object.create(), dunno if this is cross-browser). updateRec :: Exp -> [FieldUpdate] -> Compile JsExp updateRec rec fieldUpdates = do     record <- force <$> compileExp rec
src/Fay/Compiler/Misc.hs view
@@ -7,7 +7,7 @@  module Fay.Compiler.Misc where -import qualified Fay.Compiler.ModuleScope     as ModuleScope+import qualified Fay.Compiler.ModuleScope        as ModuleScope import           Fay.Types  import           Control.Applicative@@ -19,11 +19,12 @@ import qualified Data.Set                        as S import           Data.String import           Data.Version                    (parseVersion)-import           Language.Haskell.Exts.Syntax+import           Language.Haskell.Exts.Extension+import           Language.Haskell.Exts.Fixity import           Language.Haskell.Exts.Parser import           Language.Haskell.Exts.Pretty-import           Language.Haskell.Exts.Extension-import           Prelude                      hiding (exp, mod)+import           Language.Haskell.Exts.Syntax+import           Prelude                         hiding (exp, mod) import           System.Directory import           System.FilePath import           System.IO@@ -334,4 +335,5 @@                  ,TypeOperators                  ,RecordWildCards                  ,NamedFieldPuns]+  , fixities = Just (preludeFixities ++ baseFixities)   }
src/Fay/Compiler/Optimizer.hs view
@@ -59,6 +59,7 @@       JsSetPropExtern a b exp -> JsSetPropExtern a b (inline exp)       JsContinue              -> JsContinue       JsBlock stmts           -> JsBlock (map go stmts)+      JsExpStmt exp           -> JsExpStmt (inline exp)    inline expr =     case expr of
src/Fay/Compiler/Pattern.hs view
@@ -108,8 +108,8 @@   case cons of     -- Special-casing on the booleans.     Special UnitCon -> return (JsExpStmt forcedExp : body)-    "True" -> boolIf True-    "False" -> boolIf False+    UnQual "True"   -> boolIf True+    UnQual "False"  -> boolIf False     -- Everything else, generic:     _ -> do       rf <- fmap (lookup cons) (gets stateRecords)
src/Test/Util.hs view
@@ -6,7 +6,8 @@  import           Control.Applicative import           System.Directory-import           System.Process.Extra (readAllFromProcess)+import           System.Process.Extra        (readAllFromProcess)+import           Prelude              hiding (pred)  -- Path to the fay executable, looks in cabal-dev, dist, PATH in that order. fayPath :: IO (Maybe FilePath)