Skip to content

Get-scope/Typer: expose module path for T_variable

Probably related to #1943

As we discussed in https://tezos-dev.slack.com/archives/GKH15NM8W/p1687874871700059, if I have Ast_typed for

module M = struct
type t = K
end

let x = K

the type of x is a T_variable "t", both contents and orig_var fields don't store the information about the fact that t was defined in module M. But in case of a type error it can show a nice path, so there are utils that allow restoring those paths, and maybe we should just call them at get-scope level

image