From dad7bd77663776d7cba91df32fec0e90e55a163a Mon Sep 17 00:00:00 2001 From: Paul Mure Date: Fri, 16 Aug 2024 21:33:23 -0700 Subject: [PATCH] fix(engine/backend): expose raw view on concrete_ident --- engine/lib/concrete_ident/concrete_ident.mli | 38 +++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/engine/lib/concrete_ident/concrete_ident.mli b/engine/lib/concrete_ident/concrete_ident.mli index 8a5e413eb..ef593889c 100644 --- a/engine/lib/concrete_ident/concrete_ident.mli +++ b/engine/lib/concrete_ident/concrete_ident.mli @@ -1,10 +1,28 @@ -type t [@@deriving show, yojson, compare, sexp, eq, hash] +module Imported : sig + type def_id = { krate : string; path : path } + and path = disambiguated_def_path_item list -type name = Concrete_ident_generated.t -[@@deriving show, yojson, compare, sexp, eq, hash] + and disambiguated_def_path_item = { + data : def_path_item; + disambiguator : int; + } -module ImplInfoStore : sig - val init : (Types.def_id * Types.impl_infos) list -> unit + and def_path_item = + | CrateRoot + | Impl + | ForeignMod + | Use + | GlobalAsm + | Closure + | Ctor + | AnonConst + | AnonAdt + | OpaqueTy + | TypeNs of string + | ValueNs of string + | MacroNs of string + | LifetimeNs of string + [@@deriving show, yojson, compare, sexp, eq, hash] end module Kind : sig @@ -21,6 +39,16 @@ module Kind : sig [@@deriving show, yojson, compare, sexp, eq, hash] end +type t = { def_id : Imported.def_id; kind : Kind.t } +[@@deriving show, yojson, compare, sexp, eq, hash] + +type name = Concrete_ident_generated.t +[@@deriving show, yojson, compare, sexp, eq, hash] + +module ImplInfoStore : sig + val init : (Types.def_id * Types.impl_infos) list -> unit +end + val of_def_id : Kind.t -> Types.def_id -> t val of_name : Kind.t -> name -> t val eq_name : name -> t -> bool