Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/lib/uTop_complete.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@ let add id set = if is_valid_identifier id then String_set.add id set else set
let lookup_env f x env =
try
Some (f x env)
with Not_found | Env.Error _ ->
None
with
| Not_found ->
None
#if OCAML_VERSION >= (5, 6, 0)
| Env.Error.In_context _ ->
#else
| Env.Error _ ->
#endif
None

(* +-----------------------------------------------------------------+
| Parsing |
Expand Down
Loading