Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterate over all persistent modules in Env.iter_env #1962

Merged
merged 1 commit into from
Nov 15, 2023
Merged
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
13 changes: 6 additions & 7 deletions ocaml/typing/env.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1603,13 +1603,12 @@ let iter_env wrap proj1 proj2 f env () =
| Mod_unbound _ -> ()
| Mod_local data ->
iter_components (Pident id) path data.mda_components
| Mod_persistent ->
let modname = modname_of_ident id in
match Persistent_env.find_in_cache !persistent_env modname with
| None -> ()
| Some data ->
iter_components (Pident id) path data.mda_components)
env.modules
| Mod_persistent -> ())
env.modules;
Persistent_env.fold !persistent_env (fun name data () ->
let id = Ident.create_persistent (Compilation_unit.Name.to_string name) in
let path = Pident id in
iter_components path path data.mda_components) ()

let run_iter_cont l =
iter_env_cont := [];
Expand Down
Loading