Commit a1705731 authored by John van Groningen's avatar John van Groningen
Browse files

remove some unused functions

parent 5d134622
......@@ -239,41 +239,3 @@ addTypeFunctionsA mod first_td_fun_index ct_type_def type_defs var_heap symbol_t
}
= makeTypeFun type_fun_ident td_pos symbol_type var_heap symbol_table
// copied and adopted from overloading
toTypeCodeConstructor type=:{glob_object=type_index, glob_module=module_index} common_defs
| module_index == cPredefinedModuleIndex
= GTT_PredefTypeConstructor type
// otherwise
# type = common_defs.[module_index].com_type_defs.[type_index]
# td_fun_index = type.td_fun_index
// sanity check ...
| td_fun_index == NoIndex
= fatal "toTypeCodeConstructor" ("no function (" +++ type.td_ident.id_name +++ ")")
// ... sanity check
# type_fun
= { symb_ident = {type.td_ident & id_info = nilPtr} // this is wrong but let's give it a try
, symb_kind = SK_Function {glob_module = module_index, glob_object = td_fun_index}
}
= GTT_Constructor type_fun
fatal :: {#Char} {#Char} -> .a
fatal function_name message
= abort ("typereflection, " +++ function_name +++ ": " +++ message)
expandTypeSynonym :: {#CommonDefs} TypeSymbIdent [AType] *TypeHeaps
-> (Bool, Type, *TypeHeaps)
expandTypeSynonym defs cons_id type_args type_heaps
# {type_ident,type_index={glob_object,glob_module}}
= cons_id
# {td_ident,td_rhs,td_args,td_attribute}
= defs.[glob_module].com_type_defs.[glob_object]
= case td_rhs of
SynType {at_type}
# (expanded_type, type_heaps)
= substituteType td_attribute TA_Multi td_args type_args
at_type type_heaps
-> (True, expanded_type, type_heaps)
_
-> (False, undef, type_heaps)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment