diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2011-12-30 16:28:16 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2011-12-30 16:28:16 +0000 |
commit | 6b4bb576df124d7b35da300910bb0f06a0991b35 (patch) | |
tree | 7e310cd2063d0b9ea204d08ab158b2d9013d9b3e /driver | |
parent | e6c0b95f406e3781fc51bd097a7d30686c0c01a2 (diff) |
PR#352: new option to make ocaml read stdin as a script
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11980 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver')
-rw-r--r-- | driver/main_args.ml | 8 | ||||
-rw-r--r-- | driver/main_args.mli | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/driver/main_args.ml b/driver/main_args.ml index 326c63e82..968fe82af 100644 --- a/driver/main_args.ml +++ b/driver/main_args.ml @@ -217,6 +217,10 @@ let mk_S f = "-S", Arg.Unit f, " Keep intermediate assembly file" ;; +let mk_stdin f = + "-stdin", Arg.Unit f, " Read script from standard input" +;; + let mk_strict_sequence f = "-strict-sequence", Arg.Unit f, " Left-hand part of a sequence must have type unit" @@ -449,6 +453,7 @@ module type Bytetop_options = sig val _nostdlib : unit -> unit val _principal : unit -> unit val _rectypes : unit -> unit + val _stdin: unit -> unit val _strict_sequence : unit -> unit val _unsafe : unit -> unit val _version : unit -> unit @@ -549,6 +554,7 @@ module type Opttop_options = sig val _principal : unit -> unit val _rectypes : unit -> unit val _S : unit -> unit + val _stdin : unit -> unit val _strict_sequence : unit -> unit val _unsafe : unit -> unit val _version : unit -> unit @@ -661,6 +667,7 @@ struct mk_nostdlib F._nostdlib; mk_principal F._principal; mk_rectypes F._rectypes; + mk_stdin F._stdin; mk_strict_sequence F._strict_sequence; mk_unsafe F._unsafe; mk_version F._version; @@ -766,6 +773,7 @@ module Make_opttop_options (F : Opttop_options) = struct mk_principal F._principal; mk_rectypes F._rectypes; mk_S F._S; + mk_stdin F._stdin; mk_strict_sequence F._strict_sequence; mk_unsafe F._unsafe; mk_version F._version; diff --git a/driver/main_args.mli b/driver/main_args.mli index ff284a985..2249ab20c 100644 --- a/driver/main_args.mli +++ b/driver/main_args.mli @@ -83,6 +83,7 @@ module type Bytetop_options = sig val _nostdlib : unit -> unit val _principal : unit -> unit val _rectypes : unit -> unit + val _stdin : unit -> unit val _strict_sequence : unit -> unit val _unsafe : unit -> unit val _version : unit -> unit @@ -183,6 +184,7 @@ module type Opttop_options = sig val _principal : unit -> unit val _rectypes : unit -> unit val _S : unit -> unit + val _stdin : unit -> unit val _strict_sequence : unit -> unit val _unsafe : unit -> unit val _version : unit -> unit |