shithub: martian9

Download patch

ref: 7b3f26f19c9862d8b79db7ab06cd9b545595b824
author: smazga <smazga@greymanlabs.com>
date: Mon Aug 3 12:14:47 EDT 2020

initial commit

--- /dev/null
+++ b/mars9.ml
@@ -1,0 +1,27 @@
+(*
+  Martian Scheme9
+  Copyright 2020, McKay Marston
+
+  This is a project for me to
+    1) Get more familiar with OCaml.
+    2) Try to provide a natively supported scheme for Plan9.
+
+  It is heavily inspired by s9fes (http://www.t3x.org/s9fes), and the 
+  make a lisp project (https://github.com/kanaka/mal)
+ *)
+let nameplate = "Martian Scheme9 v0.1"
+
+let read str = str
+let eval ast any = ast
+let print exp = exp
+let rep str = print (eval (read str) "")
+
+let rec main =
+  try
+    print_endline nameplate;
+    while true do
+      print_string "m9> ";
+      print_endline (rep (read_line ()));
+    done
+  with End_of_file -> ()
+
--- /dev/null
+++ b/mkfile
@@ -1,0 +1,13 @@
+BIN=mars9
+
+$BIN: $BIN.cmx
+	ocamlopt -o $target $prereq
+
+%.cmx : %.ml
+	ocamlopt -c $stem.ml
+
+install:V: $BIN
+	cp $prereq ~/bin/$BIN
+
+clean:V:
+	rm -f $BIN *.cmx *.cmi *.o
--- /dev/null
+++ b/reader.ml
@@ -1,0 +1,1 @@
+let read_str str = (read_form