-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathxs.ml
33 lines (29 loc) · 901 Bytes
/
xs.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(* xs.ml *)
(*
* This file is public domain as declared by Sturm Mabie
*)
open Core
let filename_param =
let open Command.Param in
anon ("filename" %: string)
let command =
Random.self_init ();
Command.basic
~summary:"Public domain xs interpreter"
~readme:(fun () ->
{|This is the main binary for the xs language. For more information information
check out the project's github page at http://github.com/smabie/xs|}
)
Command.Let_syntax.(
let%map_open fname = anon (maybe ("filename" %: string)) in
fun () ->
match fname with
| Some f -> Xslib.Top.load f
| None ->
print_endline
{|Public domain interpreter for the xs language. Created by Sturm Mabie
([email protected]). For more information check out the project's github at
http://github.com/smabie/xs|};
Xslib.Top.repl ())
let () =
Command.run ~version:"0.1" ~build_info:"" command