57 and remove_sorts l = map rm_sorts l; |
57 and remove_sorts l = map rm_sorts l; |
58 val indirect_ok = ["*","Cfun.->","Ssum.++","Sprod.**","Up.u"] |
58 val indirect_ok = ["*","Cfun.->","Ssum.++","Sprod.**","Up.u"] |
59 fun analyse indirect (TFree(v,s)) = |
59 fun analyse indirect (TFree(v,s)) = |
60 (case AList.lookup (op =) tvars v of |
60 (case AList.lookup (op =) tvars v of |
61 NONE => error ("Free type variable " ^ quote v ^ " on rhs.") |
61 NONE => error ("Free type variable " ^ quote v ^ " on rhs.") |
62 | SOME sort => if gen_eq_set (op =) (s, defaultS) orelse |
62 | SOME sort => if eq_set (op =) (s, defaultS) orelse |
63 gen_eq_set (op =) (s, sort) |
63 eq_set (op =) (s, sort) |
64 then TFree(v,sort) |
64 then TFree(v,sort) |
65 else error ("Inconsistent sort constraint" ^ |
65 else error ("Inconsistent sort constraint" ^ |
66 " for type variable " ^ quote v)) |
66 " for type variable " ^ quote v)) |
67 | analyse indirect (t as Type(s,typl)) = |
67 | analyse indirect (t as Type(s,typl)) = |
68 (case AList.lookup (op =) dtnvs s of |
68 (case AList.lookup (op =) dtnvs s of |