Skip to content

Turn off uncurried #778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions analysis/tests/bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"subdirs": true
}
],
"uncurried": false,
"bsc-flags": ["-w -33-44"],
"bs-dependencies": ["@rescript/react"],
"jsx": { "version": 3 }
Expand Down
17 changes: 10 additions & 7 deletions analysis/tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion analysis/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"@rescript/react": "^0.11.0-rc.3"
},
"dependencies": {
"rescript": "^11.0.0-alpha.1"
"rescript": "^11.0.0-beta.1"
}
}
6 changes: 3 additions & 3 deletions analysis/tests/src/expected/Completion.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -918,13 +918,13 @@ Path Js.n
"label": "nullable",
"kind": 22,
"tags": [],
"detail": "type nullable<+'a>",
"documentation": {"kind": "markdown", "value": "\n A value of this type can be undefined, null or 'a. This type is equivalent to Js.Null_undefined.t.\n"}
"detail": "type nullable<'a> = Value('a) | Null | Undefined",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zth we lost the + here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that's... weird. Don't think we changed the + in the implementation...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is the intended printing, inherited from OCaml, which only prints the + when the type is abstract:

# type 'a t1;;
type 'a t1
# type +'a t2;;
type +'a t2
# type +'a t2 = | A;;
type 'a t2 = A

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! That's good to know 😀

"documentation": null
}, {
"label": "null",
"kind": 22,
"tags": [],
"detail": "type null<+'a>",
"detail": "type null<'a> = Value('a) | Null",
"documentation": {"kind": "markdown", "value": "\n Nullable value of this type can be either null or 'a. This type is equivalent to Js.Null.t.\n"}
}]

Expand Down