85 |
| copy (SHAPE _) = SHAPE(newShapeVar()) |
| copy (SHAPE _) = SHAPE(newShapeVar()) |
86 |
| copy (DIM _) = DIM(newDimVar()) |
| copy (DIM _) = DIM(newDimVar()) |
87 |
|
|
88 |
|
fun toType (TYPE(TV{bind, ...})) = (case !bind |
89 |
|
of SOME ty => ty |
90 |
|
| NONE => raise Fail "unbound type meta variable" |
91 |
|
(* end case *)) |
92 |
|
| toType mv = raise Fail(concat["toType(", metaToString mv, ")"]) |
93 |
|
|
94 |
|
fun toDiff (DIFF(DfV{bind, ...})) = (case !bind |
95 |
|
of SOME ty => ty |
96 |
|
| NONE => raise Fail "unbound diff meta variable" |
97 |
|
(* end case *)) |
98 |
|
| toDiff mv = raise Fail(concat["toDiff(", metaToString mv, ")"]) |
99 |
|
|
100 |
|
fun toShape (SHAPE(SV{bind, ...})) = (case !bind |
101 |
|
of SOME ty => ty |
102 |
|
| NONE => raise Fail "unbound shape meta variable" |
103 |
|
(* end case *)) |
104 |
|
| toShape mv = raise Fail(concat["toShape(", metaToString mv, ")"]) |
105 |
|
|
106 |
|
fun toDim (DIM(DV{bind, ...})) = (case !bind |
107 |
|
of SOME ty => ty |
108 |
|
| NONE => raise Fail "unbound dimension meta variable" |
109 |
|
(* end case *)) |
110 |
|
| toDim mv = raise Fail(concat["toDim(", metaToString mv, ")"]) |
111 |
|
|
112 |
|
|
113 |
structure Map = RedBlackMapFn ( |
structure Map = RedBlackMapFn ( |
114 |
struct |
struct |
115 |
type ord_key = Types.meta_var |
type ord_key = Types.meta_var |