[Construct] Part 0 - add AST holes, fix typing of holes and add a new holes command#1242
Merged
voodoos merged 5 commits intoocaml:masterfrom Mar 19, 2021
Merged
Conversation
dd9fa08 to
7103a38
Compare
Collaborator
Author
|
I fixed the parsing conflict. |
8f5c32d to
01694f2
Compare
Collaborator
Author
|
Maybe this PR should not change the holes syntax (ie keep |
01694f2 to
56968b1
Compare
trefis
reviewed
Mar 9, 2021
Contributor
trefis
left a comment
There was a problem hiding this comment.
This mostly looks good, modulo the comment I left in the parser which worries me a little.
0cf0e9e to
e1c4fae
Compare
trefis
reviewed
Mar 11, 2021
c57639d to
586c04a
Compare
586c04a to
4ff88c4
Compare
- Update pprintast to print "_" for holes - Update parser_raw.ml
4ff88c4 to
dab6e19
Compare
voodoos
added a commit
to voodoos/merlin
that referenced
this pull request
Apr 6, 2021
Merge pull request ocaml#1242 from voodoos/construct-part-0-holes [Construct] Part 0 : add AST holes, fix typing of holes and add a new `holes` command
voodoos
added a commit
to voodoos/merlin
that referenced
this pull request
Apr 7, 2021
Merge pull request ocaml#1242 from voodoos/construct-part-0-holes [Construct] Part 0 : add AST holes, fix typing of holes and add a new `holes` command
voodoos
added a commit
to voodoos/opam-repository
that referenced
this pull request
Apr 13, 2021
CHANGES:
Tue Apr 12 11:44:22 AM CET 2021
+ merlin binary
- external configuration reading:
+ use relative paths to communicate with Dune when possible. This solves
issues related to symlinks on Unix and improve Windows support (ocaml/merlin#1271,
fixes ocaml/merlin#1288)
+ make the `workdir` configuration value when using the
`dune ocaml-merlin` configuration provider the same as when using
`dot-merlin-reader` so that ppxes behaves in the same way as before
(ocaml/merlin#1284, fixes ocaml/dune#4479, discussion in ocaml/merlin#1292)
- destruct:
+ improve prefixing of generated constructors in Destruct by filtering
opened modules (ocaml/merlin#1277)
+ make the destruct command more resilient to ill-typed expressions and
when called without nodes (ocaml/merlin#1304, fixes ocaml/merlin#1300)
- reintroduce some record recovery and improve completion (ocaml/merlin#1276)
- introduce a new AST node for holes (`_`), allow correct typing of these
holes and add a new `holes` command that returns the locations of all
holes in the current file along with their types (ocaml/merlin#1242, ocaml/merlin#1289)
- Mppx: don't restore cookies after invocation. Ppx are invoked only once
so there is no need to manage cookies. This small change should increase
performance and should not change any other behavior (ocaml/merlin#1309)
- Windows: system command variant: do not open a window console when
launching a ppx (ocaml/merlin#1270, fixes ocaml/merlin#714)
- fix same file documentation bug (ocaml/merlin#1265 by @ulugbekna, fixes ocaml/merlin#1261)
+ editor modes
- vim: Add `MerlinNextHole` and `MerlinPreviousHole` commands to navigate
between holes. Jump to the first hole after destruct (ocaml/merlin#1287, ocaml/merlin#1303)
- emacs: Add `merlin-next-hole` and `merlin-previous-hole` commands to
navigate holes. Jump to the first hole after calling destruct. (ocaml/merlin#1291)
- emacs: modernization of the elisp code and conformance with coding
guidelines (ocaml/merlin#1247, ocaml/merlin#1310 by Steve Purcell )
- vim & emacs : new client-side "merlin use package" commands, restoring
previous behavior (ocaml/merlin#1272, fixes ocaml/merlin#1191)
+ test suite
- cover constructor disambiguation and record fields (ocaml/merlin#1276)
- cover the new `holes` command and AST node (ocaml/merlin#1242, ocaml/merlin#1289)
- cover the document fix (ocaml/merlin#1265, ocaml/merlin#1315)
voodoos
added a commit
to voodoos/opam-repository
that referenced
this pull request
Apr 13, 2021
CHANGES:
Tue Apr 12 11:44:22 AM CET 2021
+ merlin binary
- external configuration reading:
+ use relative paths to communicate with Dune when possible. This solves
issues related to symlinks on Unix and improve Windows support (ocaml/merlin#1271,
fixes ocaml/merlin#1288)
+ make the `workdir` configuration value when using the
`dune ocaml-merlin` configuration provider the same as when using
`dot-merlin-reader` so that ppxes behaves in the same way as before
(ocaml/merlin#1284, fixes ocaml/dune#4479, discussion in ocaml/merlin#1292)
- destruct:
+ improve prefixing of generated constructors in Destruct by filtering
opened modules (ocaml/merlin#1277)
+ make the destruct command more resilient to ill-typed expressions and
when called without nodes (ocaml/merlin#1304, fixes ocaml/merlin#1300)
- reintroduce some record recovery and improve completion (ocaml/merlin#1276)
- introduce a new AST node for holes (`_`), allow correct typing of these
holes and add a new `holes` command that returns the locations of all
holes in the current file along with their types (ocaml/merlin#1242, ocaml/merlin#1289)
- Mppx: don't restore cookies after invocation. Ppx are invoked only once
so there is no need to manage cookies. This small change should increase
performance and should not change any other behavior (ocaml/merlin#1309)
- Windows: system command variant: do not open a window console when
launching a ppx (ocaml/merlin#1270, fixes ocaml/merlin#714)
- fix same file documentation bug (ocaml/merlin#1265 by @ulugbekna, fixes ocaml/merlin#1261)
+ editor modes
- vim: Add `MerlinNextHole` and `MerlinPreviousHole` commands to navigate
between holes. Jump to the first hole after destruct (ocaml/merlin#1287, ocaml/merlin#1303)
- emacs: Add `merlin-next-hole` and `merlin-previous-hole` commands to
navigate holes. Jump to the first hole after calling destruct. (ocaml/merlin#1291)
- emacs: modernization of the elisp code and conformance with coding
guidelines (ocaml/merlin#1247, ocaml/merlin#1310 by Steve Purcell )
- vim & emacs : new client-side "merlin use package" commands, restoring
previous behavior (ocaml/merlin#1272, fixes ocaml/merlin#1191)
+ test suite
- cover constructor disambiguation and record fields (ocaml/merlin#1276)
- cover the new `holes` command and AST node (ocaml/merlin#1242, ocaml/merlin#1289)
- cover the document fix (ocaml/merlin#1265, ocaml/merlin#1315)
voodoos
added a commit
to voodoos/opam-repository
that referenced
this pull request
Apr 13, 2021
CHANGES:
Tue Apr 12 11:44:22 AM CET 2021
+ merlin binary
- external configuration reading:
+ use relative paths to communicate with Dune when possible. This solves
issues related to symlinks on Unix and improve Windows support (ocaml/merlin#1271,
fixes ocaml/merlin#1288)
+ make the `workdir` configuration value when using the
`dune ocaml-merlin` configuration provider the same as when using
`dot-merlin-reader` so that ppxes behaves in the same way as before
(ocaml/merlin#1284, fixes ocaml/dune#4479, discussion in ocaml/merlin#1292)
- destruct:
+ improve prefixing of generated constructors in Destruct by filtering
opened modules (ocaml/merlin#1277)
+ make the destruct command more resilient to ill-typed expressions and
when called without nodes (ocaml/merlin#1304, fixes ocaml/merlin#1300)
- reintroduce some record recovery and improve completion (ocaml/merlin#1276)
- introduce a new AST node for holes (`_`), allow correct typing of these
holes and add a new `holes` command that returns the locations of all
holes in the current file along with their types (ocaml/merlin#1242, ocaml/merlin#1289)
- Mppx: don't restore cookies after invocation. Ppx are invoked only once
so there is no need to manage cookies. This small change should increase
performance and should not change any other behavior (ocaml/merlin#1309)
- Windows: system command variant: do not open a window console when
launching a ppx (ocaml/merlin#1270, fixes ocaml/merlin#714)
- fix same file documentation bug (ocaml/merlin#1265 by @ulugbekna, fixes ocaml/merlin#1261)
+ editor modes
- vim: Add `MerlinNextHole` and `MerlinPreviousHole` commands to navigate
between holes. Jump to the first hole after destruct (ocaml/merlin#1287, ocaml/merlin#1303)
- emacs: Add `merlin-next-hole` and `merlin-previous-hole` commands to
navigate holes. Jump to the first hole after calling destruct. (ocaml/merlin#1291)
- emacs: modernization of the elisp code and conformance with coding
guidelines (ocaml/merlin#1247, ocaml/merlin#1310 by Steve Purcell )
- vim & emacs : new client-side "merlin use package" commands, restoring
previous behavior (ocaml/merlin#1272, fixes ocaml/merlin#1191)
+ test suite
- cover constructor disambiguation and record fields (ocaml/merlin#1276)
- cover the new `holes` command and AST node (ocaml/merlin#1242, ocaml/merlin#1289)
- cover the document fix (ocaml/merlin#1265, ocaml/merlin#1315)
voodoos
added a commit
to voodoos/opam-repository
that referenced
this pull request
Apr 13, 2021
CHANGES:
Tue Apr 12 11:44:22 AM CET 2021
+ merlin binary
- external configuration reading:
+ use relative paths to communicate with Dune when possible. This solves
issues related to symlinks on Unix and improve Windows support (ocaml/merlin#1271,
fixes ocaml/merlin#1288)
+ make the `workdir` configuration value when using the
`dune ocaml-merlin` configuration provider the same as when using
`dot-merlin-reader` so that ppxes behaves in the same way as before
(ocaml/merlin#1284, fixes ocaml/dune#4479, discussion in ocaml/merlin#1292)
- destruct:
+ improve prefixing of generated constructors in Destruct by filtering
opened modules (ocaml/merlin#1277)
+ make the destruct command more resilient to ill-typed expressions and
when called without nodes (ocaml/merlin#1304, fixes ocaml/merlin#1300)
- reintroduce some record recovery and improve completion (ocaml/merlin#1276)
- introduce a new AST node for holes (`_`), allow correct typing of these
holes and add a new `holes` command that returns the locations of all
holes in the current file along with their types (ocaml/merlin#1242, ocaml/merlin#1289)
- Mppx: don't restore cookies after invocation. Ppx are invoked only once
so there is no need to manage cookies. This small change should increase
performance and should not change any other behavior (ocaml/merlin#1309)
- Windows: system command variant: do not open a window console when
launching a ppx (ocaml/merlin#1270, fixes ocaml/merlin#714)
- fix same file documentation bug (ocaml/merlin#1265 by @ulugbekna, fixes ocaml/merlin#1261)
+ editor modes
- vim: Add `MerlinNextHole` and `MerlinPreviousHole` commands to navigate
between holes. Jump to the first hole after destruct (ocaml/merlin#1287, ocaml/merlin#1303)
- emacs: Add `merlin-next-hole` and `merlin-previous-hole` commands to
navigate holes. Jump to the first hole after calling destruct. (ocaml/merlin#1291)
- emacs: modernization of the elisp code and conformance with coding
guidelines (ocaml/merlin#1247, ocaml/merlin#1310 by Steve Purcell )
- vim & emacs : new client-side "merlin use package" commands, restoring
previous behavior (ocaml/merlin#1272, fixes ocaml/merlin#1191)
+ test suite
- cover constructor disambiguation and record fields (ocaml/merlin#1276)
- cover the new `holes` command and AST node (ocaml/merlin#1242, ocaml/merlin#1289)
- cover the document fix (ocaml/merlin#1265, ocaml/merlin#1315)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a preliminary for the future
constructcommand._in their namesPexp_holewhose (non-definitive) concrete syntax is_.'awhich is not very useful)holesthat returns the list of the locations of all the holes of a fileThere is an issue that neeeds to be fixed. These changes created some conflicts in the parser:FIXED