ocaml/merlin

truncated error message with Emacs+Merlin on OCaml 5.04 and v5.7.1-504

Ouverte

#2 080 ouverte le 18 juin 2026

 (7 commentaires) (0 réaction) (1 personne assignée)OCaml (252 forks)github user discovery
good first issue

Métriques du dépôt

Stars
 (1 690 étoiles)
Métriques de merge PR
 (Merge moyen 20j 1h) (7 PRs mergées en 30 j)

Description

Repro case:

module type A = sig type a end
module type B = sig type b end

module A : A = struct type a end
module B : B = struct type b end

module F (_ : A) (_ : B) = struct end

module Test = F(B)(A)

Merlin shows the following error message:

2. Modules do not match: A : sig type a = A.a end is not included in B

(The exact same thing is in the *Messages* and *merlin-errors* buffer.)

This is only the last line of the full error message shown by the compiler:

Error: This application of the functor F is ill-typed.
       These arguments:
         B A
       do not match these parameters:
         (Arg : A) (Arg : B) -> ...
       1. Modules do not match:
            B : sig type b = B.b end
          is not included in
            A
          The type a is required but not provided
          File "test.ml", line 1, characters 20-26: Expected declaration
       2. Modules do not match: A : sig type a = A.a end is not included in B

Guide contributeur