git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update release.md
7369945Phil Freeman
release.md+46−8
@@ -4,7 +4,11 @@
4
4
5- RankNTypes
5- RankNTypes
6
6
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+
8- Modules
12- Modules
9- Polymorphic Object Update
13- Polymorphic Object Update
10
14
@@ -16,22 +20,54 @@
16
20
17### Enhancements
21### Enhancements
18
22
19−- Allow method calls in blocks
23+- Naked expressions as statements
24+
25+ Naked expressions of type `{}` can now be used as statements.
26+
20−- Split code generation into AST -> JS AST and JS AST -> String
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+
21- Syntactic sugar for introducing curried functions
31- 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+
23- Generate formatted Javascript
41- 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.
25
48
26### Syntax Changes
49### Syntax Changes
27
50
28- Avoid 'do' keyword for blocks
51- Avoid 'do' keyword for blocks
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+
29−- Member extern syntax
55+- Member foreign import syntax
56+
57+ A small syntactic addition to the FFI, to support a common use case.
58+
30- Make FFI syntax match Haskell
59- Make FFI syntax match Haskell
60+
61+ Use `foreign import` instead of `extern`.
62+
31- Make record declaration syntax match Haskell
63- 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+
33- Array indexing syntax is ambiguous
68- Array indexing syntax is ambiguous
34−- Optional parentheses in function declaration
69+
70+ Array elements are now accessed using the `!!` operator: `arr !! 0` etc.
35
71
36### Bug Fixes
72### Bug Fixes
37
73
@@ -41,3 +77,5 @@
41
77
42- Prelude
78- Prelude
43
79
80+ There is now a basic prelude in the `libraries/prelude` folder.
81+