aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2017-09-04 00:02:06 +0200
committerPierre-Marie Pédrot2017-09-04 00:03:16 +0200
commit34912844e18ef84d88af87e1dca05ab0426871c9 (patch)
treef11a8777e6749dfa6a5d682f51c95315c14fa02b /src
parent65daf8fca747d385b2985e4e5e91894738f6fcf1 (diff)
Proper anomalies for missing registered primitives.
Diffstat (limited to 'src')
-rw-r--r--src/tac2intern.ml12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tac2intern.ml b/src/tac2intern.ml
index c1fd281808..1dba57c4c1 100644
--- a/src/tac2intern.ml
+++ b/src/tac2intern.ml
@@ -651,10 +651,18 @@ let rec intern_rec env (loc, e) = match e with
let sch = Id.Map.find id env.env_var in
(GTacVar id, fresh_mix_type_scheme env sch)
| ArgArg (TacConstant kn) ->
- let { Tac2env.gdata_type = sch }, _ = Tac2env.interp_global kn in
+ let { Tac2env.gdata_type = sch }, _ =
+ try Tac2env.interp_global kn
+ with Not_found ->
+ CErrors.anomaly (str "Missing hardwired primitive " ++ KerName.print kn)
+ in
(GTacRef kn, fresh_type_scheme env sch)
| ArgArg (TacAlias kn) ->
- let e = Tac2env.interp_alias kn in
+ let e =
+ try Tac2env.interp_alias kn
+ with Not_found ->
+ CErrors.anomaly (str "Missing hardwired alias " ++ KerName.print kn)
+ in
intern_rec env e
end
| CTacCst qid ->