aboutsummaryrefslogtreecommitdiffhomepage
path: root/printing
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-11 21:51:23 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-13 15:14:45 +0200
commit9938aed874d3e15e5d21689ea841bdc3e6ebb40e (patch)
treef3c08864d8e26e29350d541904412cc07da79abf /printing
parent001c95411b6674423886a085d8f624ea031a9ebc (diff)
Safer API for Global.body_of_constant and variants.
We aditionally return the abstract universe context inside the option. This is relatively painless as most uses were using the option as a boolean.
Diffstat (limited to 'printing')
-rw-r--r--printing/prettyp.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/printing/prettyp.ml b/printing/prettyp.ml
index ff12737f6..d1e51c9f3 100644
--- a/printing/prettyp.ml
+++ b/printing/prettyp.ml
@@ -557,9 +557,10 @@ let print_constant with_values sep sp =
print_basename sp ++ print_instance sigma cb ++ str " : " ++ cut () ++ pr_ltype typ ++
str" ]" ++
Printer.pr_universe_ctx sigma univs
- | _ ->
+ | Some (c, ctx) ->
+ let c = Vars.subst_instance_constr (Univ.AUContext.instance ctx) c in
print_basename sp ++ print_instance sigma cb ++ str sep ++ cut () ++
- (if with_values then print_typed_body env sigma (val_0,typ) else pr_ltype typ)++
+ (if with_values then print_typed_body env sigma (Some c,typ) else pr_ltype typ)++
Printer.pr_universe_ctx sigma univs)
let gallina_print_constant_with_infos sp =