CHANGES.md
End_of_line.Convert.lf_to_crlf compatible with OCaml 4.08
(@anmonteiro, #2898)Ppat_constraint in parentheses (@anmonteiro,
#2874)(wrapped true) for internal libraries (@anmonteiro,
#2842)refmttype binary (@anmonteiro,
#2855)~/.config/rtop/init.re configuration file (@anmonteiro,
#2813)
-init FILE flag works as before~/.ocamlinit.ml or ~/.config/utop/init.ml config files
(@anmonteiro, #2813)module%ppx syntax (@anmonteiro,
#2771)let lazy patterns = .. in parentheses (let lazy(patterns) = ..)
(@anmonteiro, #2774)let ops (@anmonteiro,
#2777).[| (@anmonteiro,
#2781)*/ (@anmonteiro,
#2780)open%foo expressions and structure items
(@anmonteiro, #2784)type%foo extension sugar syntax (@anmonteiro,
#2790)\u{hex-escape} syntax (@anmonteiro,
#2738)@bs.* to @mel.* (@anmonteiro, #2755)external%extension (@anmonteiro, #2750, #2766, #2767)refmt manpage (@anmonteiro, #2760)switch (@anmonteiro, #2765)let%ppx in signatures (@anmonteiro, #2770)@mel.* attributes in addition to @bs.* (@anmonteiro,
#2721)result package, which isn't needed for OCaml
4.03 and above (@anmonteiro) #2703ppxlib (@anmonteiro, #2711)New Feature, Non Breaking:
Bug Fixes:
Docs:
New Feature, Non Breaking:
external ... = "" part optional (@romanschejbal)#2464
external myFn: (string) => unit; is now equivalent to external myFn: (string) => unit = "";Bug Fixes:
method and similar keywords will be transformed to method_ (@cristianoc) #2530Fixes:
Others:
Improvements:
Fixes:
Not released to @esy-ocaml/reason - would have required a major version bump. These features will be released in 3.5.0.
Improvements:
Fixes:
Fixes:
Improvements:
// line comments! (2268). Make sure that your constraints on refmt versions for native projects. Specify a version >= 3.4.0 if you use // comments in your Reason code. Specifiy ranges like 3.4.0-3.5.0.Fixes:
use directives (2146, 2147).foo(~Foo.a) becoming foo(~Fooa=Foo.a) (2136).<div> ...c</div> correctly (2137).module type of (2175).Improvements:
let not = blabla work (not is a keyword) (2197).bs.obj (2123).foo[(bar + 1)] to foo[bar + 1] (2110).fun in parentheses when necessary (2033).Big release! No breaking change. Big shout out to @anmonteiro and @iwanKaramazow!
Major:
|. now got a Reason sugar, ->, with better precedence support than the former (1999, 2078, 2092, 2082, 2087, 2055).... spread errors for everything (1973).foo##bar[baz], foo->bar^##baz and other precedences (2050, 2055, 2044, 2044).Others:
Js.t({foo: bar}) (2074).M.[] (2043).let x=-.1; and others (1945).See the blog post here.
foo |> map(_, addOne) |> filter(_, isEven) (1804).[@bs] foo(bar, baz) is now foo(. bar, baz). Same for declaration (1803, 1832).<Foo bar=<Baz />>, <div><span></span></div> (1745, 1762).let%foo a = 1 (1703)![%bs.obj {"foo": bar}]. Probably a confusion with just {"foo": bar} (1659).Some((x: string)) can now be Some(x: string) (1576).fun for functions (1588).Our biggest release! Please see our blog post on https://reasonml.github.io/blog/2017/10/27/reason3.html.
Summary: this is, practically speaking, a non-breaking change. You can mix and match two projects with different syntax versions in BuckleScript 2 (which just got release too! Go check), and they'll Just Work (tm).
To upgrade your own project, we've released a script, https://github.com/reasonml/upgradeSyntaxFrom2To3
Improvements:
==, &&, > and the rest (1380, 1386, etc.).Js.t {. foo: bar} now formats to {. "foo": bar}, just like its value counterpart ([%bs.obj {foo: 1}] to {"foo": bar}.[@foo], [@@foo] and [@@@foo] are now unified into [@foo] and placed in front instead of at the back.! is now the logical negation. It was not previously.!. Now it's a postfix ^.++ instead of the old ^.{M.x, y} is {M.x: x, y: y}.{} like in JS.==, match, method).::foo back to ~foo, just like for OCaml.refmt.js, with public API. See README.md.refmt native public API too.Breaking Changes:
--use-stdin and --is-interface-pp option from refmt; they've been deprecated for a long time nowreup, etc.reactjs_jsx_ppx.ml. You've all been on reactjs_jsx_ppx_2.ml for a long time now.external declaration's labels.Deprecated:
--add-printers option from refmt; we'll have a better strategy soon.refmt.js, with public API. See README.md. We've back-ported this into the 1.13.7 release =)