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

Closed
vicuna opened this issue Oct 7, 2018 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna 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/irmin_mirage.ml", line 1:
Error: The implementation src/irmin-mirage/irmin_mirage.ml
       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/irmin_mirage.ml", 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
@yawaramin
Copy link
Contributor

This seems to be a duplicate of #7574

@yallop
Copy link
Member

yallop commented Apr 18, 2019

Indeed -- thanks, @yawaramin.

@yallop yallop closed this as completed Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants