packages feed

purescript 0.5.2.5 → 0.5.2.6

raw patch · 4 files changed

+24/−9 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

prelude/prelude.purs view
@@ -7,7 +7,7 @@   , ($), (#)   , (:), cons   , Show, show-  , Functor, (<$>)+  , Functor, (<$>), void   , Apply, (<*>)   , Applicative, pure, liftA1   , Alternative, empty, (<|>)@@ -116,6 +116,9 @@   class Functor f where     (<$>) :: forall a b. (a -> b) -> f a -> f b +  void :: forall f a. (Functor f) => f a -> f Unit+  void fa = const unit <$> fa+   infixl 4 <*>    class (Functor f) <= Apply f where@@ -267,10 +270,21 @@     (==) = refEq     (/=) = refIneq +  foreign import eqArrayImpl+    "function eqArrayImpl(f) {\+    \  return function(xs) {\+    \    return function(ys) {\+    \      if (xs.length !== ys.length) return false;\+    \      for (var i = 0; i < xs.length; i++) {\+    \        if (!f(xs[i])(ys[i])) return false;\+    \      }\+    \      return true;\+    \    };\+    \  };\+    \}" :: forall a. (a -> a -> Boolean) -> [a] -> [a] -> Boolean+   instance eqArray :: (Eq a) => Eq [a] where-    (==) [] [] = true-    (==) (x:xs) (y:ys) = x == y && xs == ys-    (==) _ _ = false+    (==) xs ys = eqArrayImpl (==) xs ys     (/=) xs ys = not (xs == ys)    data Ordering = LT | GT | EQ
psc/Main.hs view
@@ -25,6 +25,7 @@ import System.Directory (createDirectoryIfMissing) import System.FilePath (takeDirectory) import System.Exit (exitSuccess, exitFailure)+import System.IO (stderr)  import Text.Parsec (ParseError) @@ -51,12 +52,12 @@   modules <- readInput input   case modules of     Left err -> do-      U.print err+      U.hPutStr stderr $ show err       exitFailure     Right ms -> do       case P.compile opts (map snd ms) of         Left err -> do-          U.putStrLn err+          U.hPutStrLn stderr err           exitFailure         Right (js, exts, _) -> do           case output of
purescript.cabal view
@@ -1,5 +1,5 @@ name: purescript-version: 0.5.2.5+version: 0.5.2.6 cabal-version: >=1.8 build-type: Custom license: MIT
src/Language/PureScript/TypeChecker/Types.hs view
@@ -600,8 +600,8 @@ infer' (ArrayLiteral vals) = do   ts <- mapM infer vals   els <- fresh-  forM_ ts $ \(TypedValue _ _ t) -> els =?= TypeApp tyArray t-  return $ TypedValue True (ArrayLiteral ts) els+  forM_ ts $ \(TypedValue _ _ t) -> els =?= t+  return $ TypedValue True (ArrayLiteral ts) (TypeApp tyArray els) infer' (ObjectLiteral ps) = do   ensureNoDuplicateProperties ps   ts <- mapM (infer . snd) ps