Module Ocaml_typing.Import_info

module CU := Compilation_unit
type t

Either an interface (.cmi) or implementation (.cmo/x) import. Should be avoided in new code, in preference to Intf.t or Impl.t.

val create : CU.Name.t -> crc_with_unit:(CU.t * string) option -> t
val create_normal : CU.t -> crc:string option -> t
val name : t -> CU.Name.t
val cu : t -> CU.t

This function will cause a fatal error if a CU.t was not provided when the supplied value of type t was created.

val crc : t -> string option
val has_name : t -> name:CU.Name.t -> bool
val dummy : t
module Intf : sig ... end

The preferred API to use for interface imports. An interface import might be a parameter, in which case it has a CRC but no CU.t (since a CU.t is for an implementation).

module Impl : sig ... end