Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More precise error message when large functions and/or modules types cannot be unified #7860

vicuna opened this issue Oct 7, 2018 · 2 comments


None yet
3 participants
Copy link

commented Oct 7, 2018

Original bug ID: 7860
Reporter: @samoht
Status: new
Resolution: open
Priority: normal
Severity: minor
Version: 4.07.1
Category: typing
Monitored by: @nojb

Bug description

It would be nice if the compiler would be able to "zoom" in the diff between two complex structures (modules/functions) which cannot unify.

For instance, I've just got the following error on 4.07.1:

File "src/irmin-mirage/", line 1:
Error: The implementation src/irmin-mirage/
       does not match the interface src/irmin-mirage/.irmin_mirage.objs/irmin_mirage.cmi:
       At position module Git : sig module KV_RW(G)(C) : <here> end
       Values do not match:
         val connect :
           ?depth:int ->
           ?branch:value ->
           ?root:key ->
           ?conduit:Conduit_mirage.t ->
           ?resolver:Resolver_lwt.t ->
           ?headers:Cohttp.Header.t -> author:value -> git -> value -> t io
       is not included in
         val connect :
           ?depth:int ->
           ?branch:value ->
           ?root:key ->
           ?conduit:Conduit_mirage.t ->
           ?resolver:Resolver_lwt.t ->
           ?headers:Cohttp.Header.t -> author:value -> G.t -> value -> t io
       File "src/irmin-mirage/irmin_mirage.mli", line 106, characters 4-230:
         Expected declaration
       File "src/irmin-mirage/", line 219, characters 4-230:
         Actual declaration

The actual issue is that G.t and git cannot unify and it would be nice if the compiler could tell me that directly (and maybe point to the definition of these types).

@vicuna vicuna added the typing label Mar 14, 2019


This comment has been minimized.

Copy link

commented Apr 18, 2019

This seems to be a duplicate of #7574


This comment has been minimized.

Copy link

commented Apr 18, 2019

Indeed -- thanks, @yawaramin.

@yallop yallop closed this Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.