builtin.ml 688 Bytes
Newer Older
1
2
let intstr =
  Sequence.plus (Types.char (Chars.char_class
3
4
			       (Chars.mk_char '0')
			       (Chars.mk_char '9')
5
6
7
			    )
		)

8
9
let true_atom = Atoms.mk_ascii "true"
let false_atom = Atoms.mk_ascii "false"
10
11
12
13
14
let true_type = Types.atom (Atoms.atom true_atom)
let false_type = Types.atom (Atoms.atom false_atom)

let bool = Types.cup true_type false_type

15
16
17
18
19
20
let types =
  [ 
    "Empty",   Types.empty;
    "Any",     Types.any;
    "Int",     Types.Int.any;
    "Char",    Types.char Chars.any;
21
22
23
24
    "Atom",    Types.atom Atoms.any;
    "Pair",    Types.Product.any;
    "Arrow",   Types.Arrow.any;
    "Record",  Types.Record.any;
25
    "String",  Sequence.string;
26
    "Bool",    bool
27
  ];