@@ -4,7 +4,11 @@
5- RankNTypes
5- RankNTypes
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:
9+ rank2 :: (forall a. a -> a) -> Number
10+ rank2 = \f -> if f true then f 1 else f 2
9- Polymorphic Object Update
13- Polymorphic Object Update
@@ -16,22 +20,54 @@
17### Enhancements
21### Enhancements
19−- Allow method calls in blocks
23+- Naked expressions as statements
25+ Naked expressions of type `{}` can now be used as statements.
20−- Split code generation into AST -> JS AST and JS AST -> String
27+- Split code generation into `AST -> JS` and `JS -> String`
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.
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:
35+ test = \a (b, c) d -> a + b + c + d
37+- JavaScript optimizations
39+ Some basic dead-variable elimination, inlining and eta-conversion are now performed on the generated JavaScript.
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.
45+- More valid infix operators
47+ The colon and period characters are now valid in infix operator names.
26### Syntax Changes
49### Syntax Changes
28- Avoid 'do' keyword for blocks
51- Avoid 'do' keyword for blocks
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.
29−- Member extern syntax
55+- Member foreign import syntax
57+ A small syntactic addition to the FFI, to support a common use case.
30- Make FFI syntax match Haskell
59- Make FFI syntax match Haskell
61+ Use `foreign import` instead of `extern`.
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
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]`.
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.
36### Bug Fixes
72### Bug Fixes
@@ -41,3 +77,5 @@
80+ There is now a basic prelude in the `libraries/prelude` folder.