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

fix(engine/backend): expose raw view on concrete_ident #855

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions engine/lib/concrete_ident/concrete_ident.mli
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Loading