juvix icon indicating copy to clipboard operation
juvix copied to clipboard

Show the qualified names for any type/term in an error message

Open jonaprieto opened this issue 2 years ago • 1 comments

The context:

module D;
  import Other;
  import U;
  u : Other.Unit;
  u ≔ U.t;
end;
module Other;
  inductive Unit {
  t : Unit;
  };
end;
module U;
  inductive Unit {
    t : Unit;
  };
  
end;

At the moment I'm getting that U.t is of type Unit when it should be of type U.Unit.

$ juvix typecheck tests/negative/issue1344/D.juvix --no-colors
The expression U.t has type:
  Unit
but is expected to have type:
  Other.Unit

jonaprieto avatar Jul 21 '22 14:07 jonaprieto

This would require to have scoping knowledge throughout the pipeline. Since there is no clear way to implement that and I this is not high priority I'll freeze it.

janmasrovira avatar Jul 23 '22 11:07 janmasrovira