Closed agarwal closed 9 years ago
The output should be
# #use "topfind";;
# #thread;;
# #require "core";;
# #require "async";;
# open Core.Std;;
# open Async.Std;;
# Reader.file_contents;;
- : string -> string Async_unix.Import.Deferred.t = <fun>
# let contents = Reader.file_contents "tests/test.txt";;
val contents : string Async_unix.Import.Deferred.t = <abstr>
# Deferred.peek contents;;
- : string option = None
# contents;;
- : string = "This is only a test."
# Deferred.peek contents;;
- : string option = Some "This is only a test."
(you need an ANSI capable terminal, I highlighted the phrases in green.)
If you mean that you do not see the output of the phrases, that is intentional. The option ~silent_directives:()
at the toploop creation does that.
I meant the output I'm providing is the complete output I get. I'm not even getting the # open Async.Std;;
line printed. I tried on a Mac and Ubuntu. I see the colors fine.
Ah, OK, I got the same with OCaml 4.02.1 — but not with 4.01.0 (my current default). I'll try to find some time to look into this more.
I see. Okay thanks.
IIRC, the statement hiding the error was left there from a previous implementation, before eval_or_error
existed.
I don't get the output of the file: