equal
deleted
inserted
replaced
230 | mk_fun_dtyp (T :: Ts) U = DtType ("fun", [T, mk_fun_dtyp Ts U]); |
230 | mk_fun_dtyp (T :: Ts) U = DtType ("fun", [T, mk_fun_dtyp Ts U]); |
231 |
231 |
232 fun name_of_typ (Type (s, Ts)) = |
232 fun name_of_typ (Type (s, Ts)) = |
233 let val s' = Long_Name.base_name s |
233 let val s' = Long_Name.base_name s |
234 in space_implode "_" (filter_out (equal "") (map name_of_typ Ts) @ |
234 in space_implode "_" (filter_out (equal "") (map name_of_typ Ts) @ |
235 [if Syntax.is_identifier s' then s' else "x"]) |
235 [if Lexicon.is_identifier s' then s' else "x"]) |
236 end |
236 end |
237 | name_of_typ _ = ""; |
237 | name_of_typ _ = ""; |
238 |
238 |
239 fun dtyp_of_typ _ (TFree (n, _)) = DtTFree n |
239 fun dtyp_of_typ _ (TFree (n, _)) = DtTFree n |
240 | dtyp_of_typ _ (TVar _) = error "Illegal schematic type variable(s)" |
240 | dtyp_of_typ _ (TVar _) = error "Illegal schematic type variable(s)" |