equal
deleted
inserted
replaced
403 |
403 |
404 (* We are crossing our fingers that it doesn't clash with anything else. *) |
404 (* We are crossing our fingers that it doesn't clash with anything else. *) |
405 val mangled_type_sep = "\000" |
405 val mangled_type_sep = "\000" |
406 |
406 |
407 fun mangled_combtyp f (CombTFree name) = f name |
407 fun mangled_combtyp f (CombTFree name) = f name |
|
408 | mangled_combtyp f (CombTVar name) = |
|
409 f name (* FIXME: shouldn't happen *) |
|
410 (* raise Fail "impossible schematic type variable" *) |
408 | mangled_combtyp f (CombType (name, tys)) = |
411 | mangled_combtyp f (CombType (name, tys)) = |
409 "(" ^ commas (map (mangled_combtyp f) tys) ^ ")" ^ f name |
412 "(" ^ commas (map (mangled_combtyp f) tys) ^ ")" ^ f name |
410 | mangled_combtyp _ _ = raise Fail "impossible schematic type variable" |
|
411 |
413 |
412 fun mangled_type_suffix f g tys = |
414 fun mangled_type_suffix f g tys = |
413 fold_rev (curry (op ^) o g o prefix mangled_type_sep o mangled_combtyp f) |
415 fold_rev (curry (op ^) o g o prefix mangled_type_sep o mangled_combtyp f) |
414 tys "" |
416 tys "" |
415 |
417 |