aboutsummaryrefslogtreecommitdiff
path: root/doc/plugin_tutorial/tuto1/src
diff options
context:
space:
mode:
authorGaëtan Gilbert2019-07-11 12:18:18 +0200
committerGaëtan Gilbert2019-07-11 12:18:18 +0200
commitb424691372a61de64b8b9a8c94ef0c9cb61c7274 (patch)
tree60c2cc24ad7550f07cb06aedfb2a3c5402f016ce /doc/plugin_tutorial/tuto1/src
parent195772efccbac6663501bd5fff63c318d22ee191 (diff)
parentc51fb2fae0e196012de47203b8a71c61720d6c5c (diff)
Merge PR #10498: [api] Deprecate GlobRef constructors.
Reviewed-by: SkySkimmer Ack-by: ppedrot
Diffstat (limited to 'doc/plugin_tutorial/tuto1/src')
-rw-r--r--doc/plugin_tutorial/tuto1/src/simple_print.ml9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/plugin_tutorial/tuto1/src/simple_print.ml b/doc/plugin_tutorial/tuto1/src/simple_print.ml
index ba989b1bac..88afec14d5 100644
--- a/doc/plugin_tutorial/tuto1/src/simple_print.ml
+++ b/doc/plugin_tutorial/tuto1/src/simple_print.ml
@@ -2,14 +2,15 @@
type constr is given in the coq-dpdgraph plugin. *)
let simple_body_access gref =
+ let open Names.GlobRef in
match gref with
- | Globnames.VarRef _ ->
+ | VarRef _ ->
failwith "variables are not covered in this example"
- | Globnames.IndRef _ ->
+ | IndRef _ ->
failwith "inductive types are not covered in this example"
- | Globnames.ConstructRef _ ->
+ | ConstructRef _ ->
failwith "constructors are not covered in this example"
- | Globnames.ConstRef cst ->
+ | ConstRef cst ->
let cb = Environ.lookup_constant cst (Global.env()) in
match Global.body_of_constant_body Library.indirect_accessor cb with
| Some(e, _, _) -> EConstr.of_constr e