diff options
author | Alain Frisch <alain@frisch.fr> | 2011-12-21 08:58:56 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2011-12-21 08:58:56 +0000 |
commit | d79455bc76b260455bd6a443a6d8149df6602241 (patch) | |
tree | c7d56544e11a13d6ba4dcc6c85987fdc21d6c95c /Changes | |
parent | 8c16e88983a7788bc78a2bcf702b2b615852289a (diff) | |
download | ocaml-d79455bc76b260455bd6a443a6d8149df6602241.tar.gz |
New syntax for 'custom let bindings': let.simple_expr pat = expr in expr
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11906 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'Changes')
-rw-r--r-- | Changes | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -12,14 +12,8 @@ Language features: Using the -principal option guarantees forward compatibility. - New (module M) and (module M : S) syntax in patterns, for immediate unpacking of a first-class module. -- Let-like operators can now be defined. Syntax for definining - such an operator: let (let!) x f = ...; for using it: let! p = e1 in e2, - sugar for (let!) e1 (fun p -> e2); or with an explicit module qualifier - M.let! p = e1 in e2. Multiple-bindings are allowed (let! p1 = e1 and p2 = e2 - in in e3 is equivalent to let! (p1, p2) = (e1, e2) in e3. The lexical - definition for a let-like operator is the string "let", immediatly followed - by an non-empty sequence of operator characters. - +- New syntax "let.e0 p = e1 in e2" where e0 is a simple expression, + expanded to "e0 e1 (fun p -> e2). Compilers: - Revised simplification of let-alias (PR#5205, PR#5288) |