Skip to content

Commit

Permalink
Move Typed_holes to Merlin (#1451)
Browse files Browse the repository at this point in the history
* Move typed_hole to merlin-lib

* Make CI point at merlin PR
  • Loading branch information
liam923 authored Jan 31, 2025
1 parent aae6986 commit 0271918
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

# Remove this pin once a compatible version of Merlin has been released
- name: Pin dev Merlin
run: opam --cli=2.1 pin --with-version=5.4-503 https://github.com/ocaml/merlin.git#main
run: opam --cli=2.1 pin --with-version=5.4-503 https://github.com/liam923/merlin.git#rename-holes

- name: Build and install dependencies
run: opam install .
Expand Down
4 changes: 2 additions & 2 deletions ocaml-lsp-server/src/code_actions/action_construct.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let code_action pipeline doc (params : CodeActionParams.t) =
let src = Document.source doc in
Compl.prefix_of_position ~short_path:false src pos
in
if not (Typed_hole.can_be_hole prefix)
if not (Merlin_analysis.Typed_hole.can_be_hole prefix)
then None
else (
let structures =
Expand All @@ -25,7 +25,7 @@ let code_action pipeline doc (params : CodeActionParams.t) =
let pos = Mpipeline.get_lexing_pos pipeline pos in
Mbrowse.enclosing pos [ Mbrowse.of_typedtree typedtree ]
in
if not (Typed_hole.is_a_hole structures)
if not (Merlin_analysis.Typed_hole.is_a_hole structures)
then None
else (
(* ocaml-lsp can provide [Construct] values as completion entries, so
Expand Down
2 changes: 1 addition & 1 deletion ocaml-lsp-server/src/compl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ let complete
let* item = completion_item_capability in
item.deprecatedSupport)
in
if not (Typed_hole.can_be_hole prefix)
if not (Merlin_analysis.Typed_hole.can_be_hole prefix)
then Complete_by_prefix.complete merlin prefix pos ~resolve ~deprecated
else (
let reindex_sortText completion_items =
Expand Down
19 changes: 0 additions & 19 deletions ocaml-lsp-server/src/typed_hole.ml

This file was deleted.

17 changes: 0 additions & 17 deletions ocaml-lsp-server/src/typed_hole.mli

This file was deleted.

0 comments on commit 0271918

Please sign in to comment.