File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -129,13 +129,17 @@ let () =
129129 Learnocaml_toplevel. load_cmi_from_string top
130130 Learnocaml_exercise. (decipher File. prepare_cmi exo) >> = fun _ ->
131131 Learnocaml_toplevel. load_js ~print_outcome: false top
132- ~message: [% i" loading the prelude..." ]
133132 exercise_js
134133 >> = fun r ->
135134 if not r then Lwt. fail_with [% i" error in prelude" ] else
136- Learnocaml_toplevel. load top " open! Prelude ;;" >> = fun r ->
135+ Learnocaml_toplevel. load top " include Prelude ;;"
136+ ~message: [% i" loading the prelude..." ] >> = fun r ->
137137 if not r then Lwt. fail_with [% i" error in prelude" ] else
138- Learnocaml_toplevel. load top " open! Prepare ;;" >> = fun r ->
138+ Learnocaml_toplevel. load ~print_outcome: false top " module Prelude = struct end;;" >> = fun r ->
139+ if not r then Lwt. fail_with [% i" error in prelude" ] else
140+ Learnocaml_toplevel. load ~print_outcome: false top " include Prepare ;;" >> = fun r ->
141+ if not r then Lwt. fail_with [% i" error in prelude" ] else
142+ Learnocaml_toplevel. load ~print_outcome: false top " module Prepare = struct end;;" >> = fun r ->
139143 if not r then Lwt. fail_with [% i" error in prelude" ] else
140144 (* TODO: maybe remove Prelude, Prepare modules from the env ? *)
141145 Learnocaml_toplevel. set_checking_environment top >> = fun () ->
Original file line number Diff line number Diff line change @@ -115,10 +115,16 @@ let get_grade
115115 };
116116
117117 handle_error (internal_error [% i" while preparing the tests" ]) @@
118- Toploop_ext. use_string ~print_outcome: false ~ppf_answer {| open ! Prelude | };
118+ Toploop_ext. use_string ~print_outcome ~ppf_answer
119+ {| include Prelude | };
119120 handle_error (internal_error [% i" while preparing the tests" ]) @@
120- Toploop_ext. use_string ~print_outcome: false ~ppf_answer {| open ! Prepare | };
121-
121+ Toploop_ext. use_string ~print_outcome: false ~ppf_answer
122+ {| module Prelude = struct end | };
123+ handle_error (internal_error [% i" while preparing the tests" ]) @@
124+ Toploop_ext. use_string ~print_outcome: false ~ppf_answer
125+ {| include Prepare | };
126+ Toploop_ext. use_string ~print_outcome: false ~ppf_answer
127+ {| module Prepare = struct end | };
122128
123129 set_progress [% i" Loading your code." ] ;
124130 handle_error user_code_error @@
You can’t perform that action at this time.
0 commit comments