aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-03 15:06:11 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-05-03 16:05:08 +0200
commitb6e796a8ef956fa25bfeba84545f25b2cfb3aaf9 (patch)
treeda87235dd73f6425ea980100894ccc910a0ec877 /interp
parent00a13c3c014e2729d17ad8e8191f20586ae3b52b (diff)
Fix bug #3825: Universe annotations on notations should pass through or be rejected.
Diffstat (limited to 'interp')
-rw-r--r--interp/constrintern.ml10
1 files changed, 9 insertions, 1 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml
index a7b1bb412..ead68bd92 100644
--- a/interp/constrintern.ml
+++ b/interp/constrintern.ml
@@ -767,7 +767,15 @@ let intern_qualid loc qid intern env lvar us args =
let subst = (terms, Id.Map.empty, Id.Map.empty) in
let infos = (Id.Map.empty, env) in
let projapp = match c with NRef _ -> true | _ -> false in
- subst_aconstr_in_glob_constr loc intern lvar subst infos c, projapp, args2
+ let c = subst_aconstr_in_glob_constr loc intern lvar subst infos c in
+ let c = match us, c with
+ | None, _ -> c
+ | Some _, GRef (loc, ref, None) -> GRef (loc, ref, us)
+ | Some _, _ ->
+ user_err_loc (loc, "", str "Notation " ++ pr_qualid qid ++
+ str " cannot have a universe instance")
+ in
+ c, projapp, args2
(* Rule out section vars since these should have been found by intern_var *)
let intern_non_secvar_qualid loc qid intern env lvar us args =