Skip to content

Instantly share code, notes, and snippets.

@dsheets
Created June 19, 2014 10:41
Show Gist options
  • Save dsheets/27fcbd21a3bf5fcba8af to your computer and use it in GitHub Desktop.
Save dsheets/27fcbd21a3bf5fcba8af to your computer and use it in GitHub Desktop.
#!/usr/local/bin/ocaml
let toplevel = Sys.getenv "OCAML_TOPLEVEL_PATH"
;;
print_endline toplevel
;;
let topfind = open_in (Filename.concat toplevel "topfind")
;;
print_endline (input_line topfind)
;;
close_in topfind
;;
#use "topfind"
#require "unix"
---------------------------------------------------------------------
# ./ocaml_script.sh
/root/.opam/system/lib/toplevel
(* $Id: topfind_rd1.p 178 2012-07-09 09:20:31Z gerd $ -*- tuareg -*- *)
Cannot find file topfind.
Unknown directive `require'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment