git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge branch 'master' of github.com:purescript/purescript into hierarchy
commitd407c026acb7e51850d1d99a7cff45024206d9b9 authorjoneshf <jones3.hardy@gmail.com> dateMon 14 Apr 2014, 10:27 (13 years ago) parentabca9965b97210
4 files changed+10−9
RELEASE-0.5.md+6−6 purescript.cabal+1−1 src/Language/PureScript/TypeChecker/Types.hs+3−1 tests/Main.hs−1
RELEASE-0.5.md+6−6
@@ -28,6 +28,7 @@
2828- `where` clauses are now supported in value declarations, with the same rules as `let` bindings (garyb)
2929- Empty data declarations and empty type classes are now supported (paf31)
3030- A new command line option `--codegen` controls which modules will have Javascript and externs generated (paf31)
31+- `psc-make` now generates CommonJS-compatible modules, which can be used with `require()` in `node`. `psc` still generates modules for use in the browser. (paf31, garyb)
3132
3233### Enhancements
3334
@@ -82,14 +83,13 @@
8283- A module containing a single orphan type declaration and no other declarations now fails to compile (garyb)
8384- An error involving ordering of type class instances was fixed (garyb, paf31)
8485- Externs files no longer include fixity declarations for members that were removed as dead code (garyb)
86+- A bug which prevented `sequence $ [Just 1]` from typechecking was fixed (paf31)
8587
8688### Libraries
8789
88−- Purescript libraries are now [distributed via Bower](http://bower.io/search/?q=purescript)
89−- The [purescript-datetime](https://github.com/purescript/purescript-datetime) library provides basic date/time functions
90−- The [purescript-reactive](https://github.com/purescript/purescript-reactive) and [purescript-reactive-jquery]() libraries provide reactive variables, and bindings to jQuery properties.
91−- The [purescript-generics](https://github.com/purescript/purescript-generics) library provides generic programming capabilities.
90+- Purescript libraries are now [distributed via Bower](http://bower.io/search/?q=purescript). There are currently around 40 libraries available.
9291
93−### Documentation
92+### Plugins
9493
95−-
94+- The `grunt-purescript` plugin has been updated to provide support for new command line options.
95+- There is a new `gulp-purescript` plugin available for compiling with Gulp.
purescript.cabal+1−1
@@ -1,5 +1,5 @@
11name: purescript
2−version: 0.4.17.1
2+version: 0.4.18
33cabal-version: >=1.8
44build-type: Custom
55license: MIT
src/Language/PureScript/TypeChecker/Types.hs+3−1
@@ -677,6 +677,8 @@ inferLetBinding :: [Declaration] -> [Declaration] -> Value -> (Value -> UnifyT T
677677inferLetBinding seen [] ret j = (,) seen <$> j ret
678678inferLetBinding seen (ValueDeclaration ident nameKind [] Nothing tv@(TypedValue checkType val ty) : rest) ret j = do
679679 Just moduleName <- checkCurrentModule <$> get
680+ kind <- liftCheck $ kindOf moduleName ty
681+ guardWith (strMsg $ "Expected type of kind *, was " ++ prettyPrintKind kind) $ kind == Star
680682 let dict = if isFunction val then M.singleton (moduleName, ident) (ty, nameKind) else M.empty
681683 TypedValue _ val' ty' <- if checkType then bindNames dict (check val ty) else return tv
682684 bindNames (M.singleton (moduleName, ident) (ty', nameKind)) $ inferLetBinding (seen ++ [ValueDeclaration ident nameKind [] Nothing (TypedValue checkType val' ty')]) rest ret j
@@ -694,7 +696,7 @@ inferLetBinding seen (BindingGroupDeclaration ds : rest) ret j = do
694696 (ident, (val', _)) <- typeForBindingGroupElement moduleName e dict untypedDict
695697 return $ (ident, LocalVariable, val')
696698 bindNames dict $ inferLetBinding (seen ++ [BindingGroupDeclaration ds']) rest ret j
697−inferLetBinding seen (PositionedDeclaration pos d : ds) ret j = do
699+inferLetBinding seen (PositionedDeclaration pos d : ds) ret j = rethrowWithPosition pos $ do
698700 ((d' : ds'), val') <- inferLetBinding seen (d : ds) ret j
699701 return (PositionedDeclaration pos d' : ds', val')
700702inferLetBinding _ _ _ _ = error "Invalid argument to inferLetBinding"
tests/Main.hs−1
@@ -60,7 +60,6 @@ assertCompiles preludeJs preludeExterns inputFile = do
6060 let options = P.defaultOptions { P.optionsMain = Just "Main", P.optionsModules = ["Main"], P.optionsCodeGenModules = ["Main"], P.optionsBrowserNamespace = Just "Tests" }
6161 assert preludeExterns options inputFile $ either (return . Just) $ \(js, _, _) -> do
6262 process <- findNodeProcess
63− putStrLn $ preludeJs ++ js
6463 result <- traverse (\node -> readProcessWithExitCode node [] (preludeJs ++ js)) process
6564 case result of
6665 Just (ExitSuccess, out, _) -> putStrLn out >> return Nothing