From 1dc2409107a83f80f319b9e1b5ba45ba978d0d87 Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Mon, 12 May 2014 14:25:41 +0400 Subject: [PATCH] Don't execute all phrases twice on >=4.02 (fixes #69). --- src/lib/uTop.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/uTop.ml b/src/lib/uTop.ml index 0375c81..10378a3 100644 --- a/src/lib/uTop.ml +++ b/src/lib/uTop.ml @@ -346,9 +346,10 @@ let check_phrase phrase = with_default_loc loc (fun () -> Str.eval - (Exp.letmodule (with_loc loc "_") - (Mod.structure (item :: items)) - (Exp.construct unit None))) + (Exp.fun_ "" None (Pat.construct unit None) + (Exp.letmodule (with_loc loc "_") + (Mod.structure (item :: items)) + (Exp.construct unit None)))) in #endif let check_phrase = Ptop_def [top_def] in