Skip to content

ocamlmerlin single type-enclosing stopped producing Reason syntax #2019

@anmonteiro

Description

@anmonteiro

The following cram test produces different results in OCaml versions <= 5.2 vs OCaml >= 5.3.

The merlin versions are v5.3-502 and v5.4-503.

  $ cat >dune-project <<EOF
  > (lang dune 3.20)
  > EOF
  $ cat >dune <<EOF
  > (executable (name foo))
  > EOF
  $ cat > foo.re <<EOF
  > let _x = List.map;
  > EOF

  $ dune build
  $ ocamlmerlin single type-enclosing -position 1:15 -verbosity 0 -filename foo.re < foo.re | jq '.value[0]'
  {
    "start": {
      "line": 1,
      "col": 9
    },
    "end": {
      "line": 1,
      "col": 17
    },
    "type": "('a => 'b, list('a)) => list('b)",
    "tail": "no"
  }

With OCaml 5.3+, the diff is no longer in Reason syntax:

@@ -19,7 +19,7 @@
       "line": 1,
       "col": 17
     },
-    "type": "('a => 'b, list('a)) => list('b)",
+    "type": "('a -> 'b) -> 'a list -> 'b list",
     "tail": "no"
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions