equal
deleted
inserted
replaced
11 val dest: T -> {declarations: typ NameSpace.table, constraints: typ NameSpace.table} |
11 val dest: T -> {declarations: typ NameSpace.table, constraints: typ NameSpace.table} |
12 val space: T -> NameSpace.T |
12 val space: T -> NameSpace.T |
13 val declaration: T -> string -> typ (*exception TYPE*) |
13 val declaration: T -> string -> typ (*exception TYPE*) |
14 val constraint: T -> string -> typ (*exception TYPE*) |
14 val constraint: T -> string -> typ (*exception TYPE*) |
15 val monomorphic: T -> string -> bool |
15 val monomorphic: T -> string -> bool |
16 val typargs: T -> string -> typ -> typ list |
16 val typargs: T -> string * typ -> typ list |
17 val declare: NameSpace.naming -> bstring * typ -> T -> T |
17 val declare: NameSpace.naming -> bstring * typ -> T -> T |
18 val constrain: string * typ -> T -> T |
18 val constrain: string * typ -> T -> T |
19 val hide: bool -> string -> T -> T |
19 val hide: bool -> string -> T -> T |
20 val empty: T |
20 val empty: T |
21 val merge: T * T -> T |
21 val merge: T * T -> T |
64 |
64 |
65 fun sub (Type (_, Ts)) (i :: is) = sub (nth Ts i) is |
65 fun sub (Type (_, Ts)) (i :: is) = sub (nth Ts i) is |
66 | sub T [] = T |
66 | sub T [] = T |
67 | sub T _ = raise Subscript; |
67 | sub T _ = raise Subscript; |
68 |
68 |
69 fun typargs consts c T = map (sub T) (#2 (the_const consts c)); |
69 fun typargs consts (c, T) = map (sub T) (#2 (the_const consts c)); |
70 |
70 |
71 |
71 |
72 |
72 |
73 (** build consts **) |
73 (** build consts **) |
74 |
74 |