Merge pull request #118 from dubek/ocaml-fix-hash-equality
[jackhill/mal.git] / ocaml / step1_read_print.ml
1 let read str = Reader.read_str str
2 let eval ast any = ast
3 let print exp = Printer.pr_str exp true
4 let rep str = print (eval (read str) "")
5
6 let rec main =
7 try
8 while true do
9 print_string "user> ";
10 let line = read_line () in
11 try
12 print_endline (rep line);
13 with End_of_file -> ()
14 done
15 with End_of_file -> ()