diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/names.ml | 9 | ||||
| -rw-r--r-- | kernel/names.mli | 11 | ||||
| -rw-r--r-- | kernel/type_errors.ml | 2 | ||||
| -rw-r--r-- | kernel/type_errors.mli | 2 |
4 files changed, 22 insertions, 2 deletions
diff --git a/kernel/names.ml b/kernel/names.ml index 8205c564e4..76f17525de 100644 --- a/kernel/names.ml +++ b/kernel/names.ml @@ -126,6 +126,15 @@ let kind_of_string = function | "obj" -> OBJ | _ -> invalid_arg "kind_of_string" +(*s Section paths *) + +type qualid = string list * string + +let make_qualid p s = (p,s) +let repr_qualid q = q + +let string_of_qualid (l,s) = String.concat "." (l@[s]) +let print_qualid (l,s) = prlist_with_sep (fun () -> pr_str ".") pr_str (l@[s]) (*s Section paths *) diff --git a/kernel/names.mli b/kernel/names.mli index 3230090116..3a380a42d9 100644 --- a/kernel/names.mli +++ b/kernel/names.mli @@ -49,6 +49,17 @@ type dir_path = string list (* Printing of directory paths as ["#module#submodule"] *) val string_of_dirpath : dir_path -> string + +(*s Section paths *) + +type qualid + +val make_qualid : string list -> string -> qualid +val repr_qualid : qualid -> string list * string + +val string_of_qualid : qualid -> string +val print_qualid : qualid -> std_ppcmds + (*s Section paths *) type section_path diff --git a/kernel/type_errors.ml b/kernel/type_errors.ml index a79dbcf3c9..39223c726c 100644 --- a/kernel/type_errors.ml +++ b/kernel/type_errors.ml @@ -60,7 +60,7 @@ type type_error = | WrongPredicateArity of constr * int * int | NeedsInversion of constr * constr (* Relocation error *) - | GlobalNotFound of section_path + | QualidNotFound of qualid exception TypeError of path_kind * env * type_error diff --git a/kernel/type_errors.mli b/kernel/type_errors.mli index 9a2504ff80..68628c63c2 100644 --- a/kernel/type_errors.mli +++ b/kernel/type_errors.mli @@ -64,7 +64,7 @@ type type_error = | WrongPredicateArity of constr * int * int | NeedsInversion of constr * constr (* Relocation error *) - | GlobalNotFound of section_path + | QualidNotFound of qualid exception TypeError of path_kind * env * type_error |
