Closed agarwal closed 9 years ago
Our CLI shows it more easily:
$ cat a.ml
#use "topfind";;
#thread;;
let _ = 2;;
$ ./app.native a.ml
(* part 0 *)
# #use "topfind";;
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
# #thread;;
# let _ = 2;;
/Users/ashish/.opam/rwo/lib/ocaml/threads: added to search path
/Users/ashish/.opam/rwo/lib/ocaml/unix.cma: loaded
/Users/ashish/.opam/rwo/lib/ocaml/threads/threads.cma: loaded
FWIW test_require
shows the correct behavior.
Here's a utop session showing the behavior.
First, I first define a
show
function becauseOutcome.eval
is abstract:Now, create an oloop toplevel:
Evaluate one phrase. Seems okay.
Evaluate a second phrase. There is a problem. We're not seeing the output.
Evaluate third phrase, and now you get the output that should have been returned above.