Skip to content

Commit ce823e6

Browse files
committed
Add linear option in lscrun
1 parent 1fd8bd2 commit ce823e6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bin/lscrun.ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ open Lsc.Lsc_parser
55
open Lsc.Lsc_lexer
66
open Out_channel
77

8-
let usage_msg =
9-
"exec [-allow-unfinished-computation] [-show-steps] [-show-trace] <filename>"
8+
let usage_msg = "exec [-linear] [-show-trace] <filename>"
109

1110
let unfincomp = ref false
1211

1312
let showtrace = ref false
1413

14+
let linear = ref false
15+
1516
let input_file = ref ""
1617

1718
let anon_fun filename = input_file := filename
@@ -25,14 +26,15 @@ let speclist =
2526
; ( "-show-trace"
2627
, Stdlib.Arg.Set showtrace
2728
, "Interactively show steps of selection and unification." )
29+
; ("-linear", Stdlib.Arg.Set linear, "Actions which are used are consummed.")
2830
]
2931

3032
let () =
3133
Stdlib.Arg.parse speclist anon_fun usage_msg;
3234
let lexbuf = Lexing.from_channel (Stdlib.open_in !input_file) in
3335
let mcs = constellation_file read lexbuf in
3436
let result =
35-
match exec ~showtrace:!showtrace mcs with
37+
match exec ~linear:!linear ~showtrace:!showtrace mcs with
3638
| Ok result -> result
3739
| Error e ->
3840
pp_err_effect e |> Out_channel.output_string Out_channel.stderr;

0 commit comments

Comments
 (0)