ocaml / ocaml/merlin

This valid snippet produce a non-sensical error message

Open
#2,000 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
1.7k
Forks
257
Avg merge
15h 14m
Merged PRs (30d)
3

Description

This following snippets produce this cryptic error message when hovering:

let a : type b. 'a as b list = []
 (* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *)
This definition has type bool which is less general than 'a. 'a

Even it's syntactically perfectly valid OCaml.

See https://github.com/ocaml/merlin/issues/1118.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the hover diagnostic for the OCaml snippet in this issue and read the related merlin issue 1118 for context. Trace the code responsible for producing the displayed error and verify that the valid snippet no longer receives a cryptic or incorrect message.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.