Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let log f s =
- Lwt_unix.openfile f [Lwt_unix.O_APPEND; Lwt_unix.O_CREAT] 0o640 >>= fun o ->
- Lwt_unix.write o s 0 (String.length s)
- let () = Lwt_main.run (log "/var/log/cwb.log" "some message\n");;
- Error: This expression has type int but an expression was expected of type unit
- let t = Lwt_main.run (log "/var/log/cwb.log" "some message\n");;
- Exception: Unix.Unix_error (Unix.EBADF, "write", "").
Add Comment
Please, Sign In to add comment