Comments (8)
There's no need for this to be the case. Should be a simple fix. All polymorphic variants hold tuples and never multiple values.
from reason.
Thanks for the fix!
I guess that the different formatting of the same code when changing between X to `X is intentional.
Just re-opening temporarily to confirm this.
from reason.
Sorry, could you explain what you mean?
from reason.
The ocaml-to-reason coversion goes:
From |
X (3, 4) -> ()to
| X (3, 4) -> ()
.
And from | X (3, 4) -> ()
to | X 3 4 -> ()
.
from reason.
Just checking that the different treatment of polymorphic variants is intended.
from reason.
Yes it is intended. This is actually what's going on in OCaml, but they made the syntax for two different concepts look the same.
from reason.
In OCaml, polymorphic variants only ever accept one argument that you are free to make a tuple.
from reason.
Thanks.
from reason.
Related Issues (20)
- Empty Functor adds unit on declaration and empty module on instantiation HOT 1
- local open + let bindings HOT 1
- Comments and opens HOT 2
- module types with one line and attribute prints in one line instead of two HOT 1
- Release process HOT 2
- Polyvariants following printing as variants
- Upgrade menhir to recent version HOT 2
- cannot build 3.9.0 with esy HOT 5
- refmt removes parents leading to invalid code HOT 2
- Application with comment, breaks into newline HOT 1
- Refmt doesn't break the line when an extra long string occurs in switch branch
- Rfmt mangles partial application of operators HOT 1
- Support for "string" [@JSX] HOT 2
- Support for `external%foo`
- Investigate potential outcometree bug
- Pattern-matching of `bool` value is formatted to ternary if we match `true` first HOT 3
- Open module from another directory HOT 1
- Merlin infers wrong types for labelled optional arguments in 5.2
- Formatting destructured record with letops results in a syntax error
- outcome printer: `test/class.t` tests show failure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reason.