typer.mli 618 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
open Parsetree
open Scoper

type tterm =
| Tvar of id * sty
| Tconst of id * sty * tterm
| Tpar of tterm
| Tapp of tterm * tterm * sty * sty
| Tabst of id * sty * tterm * sty
| Tobj of (label * tmeth) list * sty
| Tsel of tterm * label * sty
| Tupd of tterm * label * tmeth * sty
| Tcast of tterm * sty * sty
and tmeth = Tmeth of id * sty * tterm * sty

type tline =
| Ttypedef of cid * sty
| Tvardef of id * sty * tterm
| Tcheck of tterm * sty
Raphaël Cauderlier's avatar
Raphaël Cauderlier committed
20
| Tconv of tterm * tterm * sty
21
| Tnorm of tterm
Raphaël Cauderlier's avatar
Raphaël Cauderlier committed
22
| Tprint of string
23
24
25
26
27

type typed_tree = tline list

val infer : tterm -> sty
val type_check : Scoper.scoped_tree -> typed_tree