disambiguation: split the disambiguate comment in spec. and impl.
parent
44149ba7ca
commit
a6df85f49f
|
@ -711,14 +711,16 @@ end) = struct
|
|||
warn lid.loc
|
||||
(Warnings.Disambiguated_name (get_name lbl))
|
||||
|
||||
(** [disambiguate] selects a concrete description for [lid] using some
|
||||
contextual information: an optional [expected_type], and a list of candidates [lbls].
|
||||
If [expected_type] is [None], it just returns the head of [lbls].
|
||||
Otherwise, it extracts the description directly from the corresponding type definition,
|
||||
except for extension types, where it has to choose it inside [lbls].
|
||||
|
||||
Here [scope] contains the labels equal to [lid] in the current environment,
|
||||
and [lbls] is a (potentially strict) subset of [scope], see [disambiguate_label_by_ids] *)
|
||||
(** [disambiguate] selects a concrete description for [lid] using
|
||||
some contextual information: an optional [expected_type], and
|
||||
a list of candidates [lbls]. If [expected_type] is [None], it
|
||||
just returns the head of [lbls]. Otherwise, it extracts the
|
||||
description directly from the corresponding type definition,
|
||||
except for extension types, where it has to choose it inside
|
||||
[lbls]. *)
|
||||
(* Here [scope] contains the labels equal to [lid] in the current
|
||||
environment, and [lbls] is a (potentially strict) subset of
|
||||
[scope], see [disambiguate_label_by_ids] *)
|
||||
let disambiguate ?(warn=Location.prerr_warning) ?scope
|
||||
usage lid env expected_type lbls =
|
||||
let scope = match scope with None -> lbls | Some l -> l in
|
||||
|
|
Loading…
Reference in New Issue