-
Notifications
You must be signed in to change notification settings - Fork 428
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
Simplify grammar & syntax (parens) of first class modules #1949
Conversation
050e9d6
to
23ae35f
Compare
let module is long deprecated and refmting to |
23ae35f
to
f822afe
Compare
@chenglou this is ready.
|
For I'm not too sure that we're at a stage where folks all use refmt yet |
Sure, no problem, I'll restructure the grammar. Update: done ✅ |
Also update the printer: insert `module` even when a UIDENT suffices to parse a Ptyp_package. Motivation: it will be super confusing for newcomers who might confuse it with a variant
d1698da
to
7ab613e
Compare
Might cause too much confusion for newcomers and people not using refmt.
7ab613e
to
c2146a2
Compare
@@ -1061,6 +1061,47 @@ let filter_raise_spread_syntax msg nodes = | |||
raise Reason_syntax_util.(Error(dotdotdotLoc, (Syntax_error msg))) | |||
| None -> node | |||
) nodes | |||
|
|||
let err loc s = | |||
raise Reason_syntax_util.( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not have a similar utility already? Genuine question. We should have a single one that throws a single type of exception
| pattern COLON core_type { mkpat(Ppat_constraint($1, $3)) } | ||
| pattern COLON core_type | ||
{ mkpat(Ppat_constraint($1, $3)) } | ||
(* If we kill the `let module …` syntax, this can be placed inside pattern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So apparently @jaredly still uses let module
. Otherwise I think we can kill let module
?
I super like |
@jaredly Where does Edit: "not", not "it" |
aha I guess it does work :P ok, I'd be ok with it going away.
…On Sat, Jun 2, 2018 at 5:05 PM Hezekiah M. Carty ***@***.***> wrote:
@jaredly <https://github.com/jaredly> Where does module X = Y it
currently work in expressions? I thought that worked anywhere let module
worked.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1949 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAG2KkmazaDq37dI8DwSO1CgckBmdkzvks5t4xpRgaJpZM4ULHf6>
.
|
We’ll kill it later. Keeping it for another version at least for now. Thanks! |
Fixes #530
Fixes #1715
Goals
Result
Ptyp_package
let module
syntax will need to be deprecated, because of too much conflicts.Update:
let module
-syntax stays as is