purescript 0.5.2 → 0.5.2.1
raw patch · 2 files changed
+3/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
purescript.cabal view
@@ -1,5 +1,5 @@ name: purescript-version: 0.5.2+version: 0.5.2.1 cabal-version: >=1.8 build-type: Custom license: MIT
src/Language/PureScript/CodeGen/JS.hs view
@@ -273,12 +273,11 @@ bindersToJs :: (Functor m, Applicative m, Monad m) => Options -> ModuleName -> Environment -> [CaseAlternative] -> [JS] -> SupplyT m JS bindersToJs opts m e binders vals = do valNames <- replicateM (length vals) freshName- let assignments = zipWith JSVariableIntroduction valNames (map Just vals) jss <- forM binders $ \(CaseAlternative bs grd result) -> do ret <- valueToJs opts m (bindNames m (concatMap binderNames bs) e) result go valNames [JSReturn ret] bs grd- return $ JSApp (JSFunction Nothing [] (JSBlock (assignments ++ concat jss ++ [JSThrow (JSStringLiteral "Failed pattern match")])))- []+ return $ JSApp (JSFunction Nothing valNames (JSBlock (concat jss ++ [JSThrow (JSStringLiteral "Failed pattern match")])))+ vals where go :: (Functor m, Applicative m, Monad m) => [String] -> [JS] -> [Binder] -> Maybe Guard -> SupplyT m [JS] go _ done [] Nothing = return done