aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/typereify.icl38
1 files changed, 0 insertions, 38 deletions
diff --git a/frontend/typereify.icl b/frontend/typereify.icl
index 3f3491a..66aca0f 100644
--- a/frontend/typereify.icl
+++ b/frontend/typereify.icl
@@ -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)