aboutsummaryrefslogtreecommitdiff
path: root/pretyping/pretyping.mli
diff options
context:
space:
mode:
authorHugo Herbelin2020-02-09 06:48:07 +0100
committerHugo Herbelin2020-02-11 16:18:59 +0100
commit18e0103e33b276a88000dde8fccc772af2ca67ea (patch)
tree00a7188ec3805645d185780aef9a9726b647be24 /pretyping/pretyping.mli
parentcd5bb3c76e430392e4363dc7b4b5bbe0cafa466f (diff)
Reinforcing the role of type "typing_constraint".
WithoutTypeConstraint says it can be a term. In particular, if it has manual implicit arguments, these will be allowed only in leading lambdas. I.e. it can start with "fun {x}" but not with "forall {x}". New constructor UnknownIfTermOrType allows to be both a term or a type. In particular, if it allowed start both with "fun {x}" and "forall {x}".
Diffstat (limited to 'pretyping/pretyping.mli')
-rw-r--r--pretyping/pretyping.mli6
1 files changed, 5 insertions, 1 deletions
diff --git a/pretyping/pretyping.mli b/pretyping/pretyping.mli
index 18e416596e..ee57f690a1 100644
--- a/pretyping/pretyping.mli
+++ b/pretyping/pretyping.mli
@@ -38,7 +38,11 @@ val interp_known_glob_level : ?loc:Loc.t -> Evd.evar_map ->
val search_guard :
?loc:Loc.t -> env -> int list list -> Constr.rec_declaration -> int array
-type typing_constraint = OfType of types | IsType | WithoutTypeConstraint
+type typing_constraint =
+ | UnknownIfTermOrType (** E.g., unknown if manual implicit arguments allowed *)
+ | IsType (** Necessarily a type *)
+ | OfType of types (** A term of the expected type *)
+ | WithoutTypeConstraint (** A term of unknown expected type *)
type inference_hook = env -> evar_map -> Evar.t -> evar_map * constr