diff options
| -rw-r--r-- | pretyping/detyping.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pretyping/detyping.ml b/pretyping/detyping.ml index 7fcb0795bd..889a30fd76 100644 --- a/pretyping/detyping.ml +++ b/pretyping/detyping.ml @@ -883,7 +883,9 @@ and detype_binder d flags bk avoid env sigma decl c = | BLetIn -> 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 = try Retyping.get_sort_family_of (snd env) sigma ty with _ when !Flags.in_debugger || !Flags.in_toplevel -> InType (* Can fail because of sigma missing in debugger *) in + let s = + try Retyping.get_sort_family_of (snd env) sigma ty + with Retyping.RetypeError _ -> InType (* eg: the type is an evar *) 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) |
