git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update release.md
commit7369945d538ca1ad5bff00e76e6d02a859ee6ae0 authorPhil Freeman <paf31@cantab.net> dateSun 22 Dec 2013, 17:54 (13 years ago) parente2c8973
1 file changed+46−8
release.md+46−8
release.md+46−8
@@ -4,7 +4,11 @@
44
55- RankNTypes
66
7− This experimental feature enables the use of the `forall` quantifier in a
7+ This experimental feature allows polymorphic types (introduced with `forall`) to appear on the left of a function arrow, or as the type of a record field, etc. For example:
8+
9+ rank2 :: (forall a. a -> a) -> Number
10+ rank2 = \f -> if f true then f 1 else f 2
11+
812- Modules
913- Polymorphic Object Update
1014
@@ -16,22 +20,54 @@
1620
1721### Enhancements
1822
19−- Allow method calls in blocks
20−- Split code generation into AST -> JS AST and JS AST -> String
23+- Naked expressions as statements
24+
25+ Naked expressions of type `{}` can now be used as statements.
26+
27+- Split code generation into `AST -> JS` and `JS -> String`
28+
29+ JavaScript generation is now split into the generation of a JavaScript AST, and the pretty-printing of that AST. This enables some optimizations, and a better JavaScript pretty-printer.
30+
2131- Syntactic sugar for introducing curried functions
22−- Perform some basic optimization on the generated Javascript.
32+
33+ Single-argument functions and multiple-argument functions can now be introduced in the same way:
34+
35+ test = \a (b, c) d -> a + b + c + d
36+
37+- JavaScript optimizations
38+
39+ Some basic dead-variable elimination, inlining and eta-conversion are now performed on the generated JavaScript.
40+
2341- Generate formatted Javascript
24−- Syntax for creating an array from a list of heads and a tail
42+
43+ The generated JavaScript is now formatted to be more readable. In particular, newlines get generated, and the correct indentation is used.
44+
45+- More valid infix operators
46+
47+ The colon and period characters are now valid in infix operator names.
2548
2649### Syntax Changes
2750
2851- Avoid 'do' keyword for blocks
29−- Member extern syntax
52+
53+ `do` will be used later for Haskell-like monad comprehensions, so its previous use in introducing blocks of statements is now invalid. The `do` keyword is still reserved.
54+
55+- Member foreign import syntax
56+
57+ A small syntactic addition to the FFI, to support a common use case.
58+
3059- Make FFI syntax match Haskell
60+
61+ Use `foreign import` instead of `extern`.
62+
3163- Make record declaration syntax match Haskell
32−- Array pattern match syntax is confusing
64+- Simplify array binders
65+
66+ There are now two types of array binders: cons binders `x : xs -> ...` and array binders `[x, y, z] -> ...` instead of the previously confusing `[x:xs]`.
67+
3368- Array indexing syntax is ambiguous
34−- Optional parentheses in function declaration
69+
70+ Array elements are now accessed using the `!!` operator: `arr !! 0` etc.
3571
3672### Bug Fixes
3773
@@ -41,3 +77,5 @@
4177
4278- Prelude
4379
80+ There is now a basic prelude in the `libraries/prelude` folder.
81+