-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimpletype.mli
More file actions
31 lines (24 loc) · 760 Bytes
/
Copy pathsimpletype.mli
File metadata and controls
31 lines (24 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(* simpletype.mli *)
open Syntax
type mult = (* Multiplicity, described in Chapter 5 Linear Type*)
Unused
| Once
| Many
type imult = mult (* Input multiplicity*)
type omult = mult (* Output multiplicity *)
type stype = (* Simple type *)
TVar of int (* type variable *)
| UnitT
| BoolT
| IntT
| ChanT of stype
(* | ChanT of stype * imult * omult (* channel type *) *)
| PairT of stype * stype
| FuncT of stype * stype (* function type: from -> to *)
type tenv = (var * stype) list
type constraints = (stype * stype) list
exception Unification of string
(* val new_tvar: unit -> stype
val type_inf: 'a procexp -> tenv -> stype procexp * constraints *)
val elaborate: unit procexp -> stype procexp * tenv
val string_of_type: stype -> string