aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Tassi2020-10-09 12:43:31 +0200
committerEnrico Tassi2020-10-09 12:43:31 +0200
commita96f0868712f725ae3ff7c8fddf54684413bb31c (patch)
treec2179c217afb1f3737c0e2aeac9564cd6e12823f
parent1363a6f3702a7b4428ff1b8c9c7ffd1446918201 (diff)
improve comment
-rw-r--r--pretyping/detyping.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/pretyping/detyping.ml b/pretyping/detyping.ml
index 889a30fd76..239a10786b 100644
--- a/pretyping/detyping.ml
+++ b/pretyping/detyping.ml
@@ -884,8 +884,11 @@ and detype_binder d flags bk avoid env sigma decl c =
let c = detype d { flags with flg_isgoal = false } avoid env sigma (Option.get body) in
(* Heuristic: we display the type if in Prop *)
let s =
+ (* It can fail if ty is an evar, or if run inside ocamldebug or the
+ OCaml toplevel since their printers don't have access to sigma/env *)
try Retyping.get_sort_family_of (snd env) sigma ty
- with Retyping.RetypeError _ -> InType (* eg: the type is an evar *) in
+ with Retyping.RetypeError _ -> InType
+ in
let t = if s != InProp && not !Flags.raw_print then None else Some (detype d { flags with flg_isgoal = false } avoid env sigma ty) in
GLetIn (na', c, t, r)