From 1a5e8410be1826fe96cdabed21ac0654abb8cbf1 Mon Sep 17 00:00:00 2001 From: Lucas Pluvinage Date: Thu, 27 Jun 2019 16:30:03 +0200 Subject: [PATCH] Let the virtual library do the selection for implementations Signed-off-by: Lucas Pluvinage --- src/utop.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utop.ml b/src/utop.ml index 3d469090c7f3..172443592da4 100644 --- a/src/utop.ml +++ b/src/utop.ml @@ -57,7 +57,12 @@ let setup sctx ~dir = let expander = Super_context.expander sctx ~dir in let scope = Super_context.find_scope_by_dir sctx dir in let db = Scope.libs scope in - let libs = libs_under_dir sctx ~db ~dir:(Path.build dir) in + let libs = libs_under_dir sctx ~db ~dir:(Path.build dir) + |> List.filter ~f:(fun (lib : Lib.t) -> + lib + |> Lib.info + |> Lib_info.implements + |> Option.is_none) in let source = source ~dir in let obj_dir = Toplevel.Source.obj_dir source in let loc = Toplevel.Source.loc source in