Skip to content
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

[Construct] Part I #1318

Merged
merged 7 commits into from
Jun 14, 2021
Merged
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
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ git version
- fix location of module definitions done via functors (#1329, fixes #1199)
- fix -cmt-path dirs mistakenly added to build path (#1330)
- add new module holes that can replace module expressions (#1333)
- add a new command `construct` that builds a list of possible terms when
called on a typed hole (#1318)
+ editor modes
- vim: add a simple interface to the new `construct` command:
`MerlinConstruct`. When several results are suggested, `<c-i>` and `<c-u>`
to show more or less deep results. (#1318)
+ test suite
- cover the new `construct` command (#1318)

merlin 4.2
==========
Expand Down
16 changes: 16 additions & 0 deletions doc/dev/PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ Entries is the list of possible completion. Each entry is made of:
- a description, most of the time a type or a definition line, to be put next to the name in completion box
- optional information which might not fit in the completion box, like signatures for modules or documentation string.

### `construct -position <position> [ -with-values <none|local> -depth <int> ]`

-position <position> Position where construct should happen
-with-values <none|local> Use values from the environment (defaults to none)
-depth <int> Depth of the search (defaults to 1)

When the position determined by `-position` is a hole (`_`), this command
returns a list of possible terms that could replace it given its type.
When `-with-values` is set to local, values in the current environment will be
used in the constructed terms.

### `document -position <position> [ -identifier <string> ]`

-position <position> Position to complete
Expand Down Expand Up @@ -296,6 +307,11 @@ Returns all known findlib packages as a list of string.

Returns supported compiler flags.The purpose of this command is to implement interactive completion of compiler settings in an IDE.

### `holes`

This command will return the ordered list of the positions and types of all
holes in the current document.

### `jump -target <string> -position <position>`

-target <string> Entity to jump to
Expand Down
Loading