reason
reason copied to clipboard
Simpler syntax for local opens in expression blocks
I'd like syntax support for: MyModule.{ let v = ...; v }, which is currently a syntax error. It works if you wrap the {} in parentheses, which it then prints as { open MyModule; let v = ...; v }. I think that supporting "open module in block" syntax will be especially useful with the new let operators:
let x = Decode.{
let+ name = field("name", string)
and+ age = field("age", int)
and+ email = field("emailAddress", email);
make(~name, ~age, ~email);
};