Skip to content

Commit

Permalink
Fix switch impl/intf (ocamllabs#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
tatchi authored Mar 11, 2021
1 parent 32bc6e2 commit 41ff847
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## Unreleased

- Fix switching between implementation/interface (#561)

## 1.8.1

- Revert automatic installation of platform tools
Expand Down
4 changes: 2 additions & 2 deletions src/switch_impl_intf.ml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
open Import

let send_switch_impl_intf_request client uri : string array Promise.t =
let data = Jsonoo.Encode.list Jsonoo.Encode.string [ uri ] in
let data = Jsonoo.Encode.string uri in
let open Promise.Syntax in
let+ response =
LanguageClient.sendRequest client ~meth:"ocamllsp/switchImplIntf" ~data ()
in
Jsonoo.Decode.(array string) response

let send_infer_intf_request client uri : string Promise.t =
let data = Jsonoo.Encode.list Jsonoo.Encode.string [ uri ] in
let data = Jsonoo.Encode.string uri in
let open Promise.Syntax in
let+ response =
LanguageClient.sendRequest client ~meth:"ocamllsp/inferIntf" ~data ()
Expand Down

0 comments on commit 41ff847

Please sign in to comment.