Seems to work
[rops.git] / types.mli
blob9ffa75457eb8dfe899a9b86f54fbedd4ad9b8873
1 (*
2 A scheme object is anything that can be considered a value in Scheme. Notice that:
4 - Any symbolic expression can be an object (through the use of quote).
5 - Some objects have a literal representation in the program (can be read), but others don't: Closures and Continuations are created through evaluation of some other expressions.
6 *)
8 type symbol = string ;;
10 type scheme_object =
11 Int of int
12 | String of string
13 | Symbol of symbol
14 | Null
15 | True
16 | False
17 | Quotation of scheme_object
18 | ProperList of scheme_object list
19 | ImproperList of (scheme_object list) * scheme_object
20 | Closure of scheme_object * scheme_environment * (symbol list)
21 | Builtin of ((scheme_object list) -> (scheme_object option))
22 | Continuation of scheme_environment * (scheme_object list) * (scheme_object list list)
23 | RestoreEnv of scheme_environment
24 | Rewind
25 | Cond of (scheme_object * scheme_object)
26 | Set of string
27 | Bind of string
28 and
29 environment_frame = (string, scheme_object) Hashtbl.t
30 and
31 scheme_environment = environment_frame list
34 exception Scheme_cast_error;;
35 exception Scheme_eval_error of string;;
36 exception Scheme_user_error of scheme_object list;;