aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend/trans.dcl3
-rw-r--r--frontend/trans.icl10
-rw-r--r--frontend/type_io.icl5
3 files changed, 14 insertions, 4 deletions
diff --git a/frontend/trans.dcl b/frontend/trans.dcl
index 796892a..9ad3dc0 100644
--- a/frontend/trans.dcl
+++ b/frontend/trans.dcl
@@ -12,4 +12,7 @@ transformGroups :: !CleanupInfo !Int !Int !Int !Int !*{!Group} !*{#FunDef} !*{!.
convertSymbolType :: !Bool !{# CommonDefs} !SymbolType !Int !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
-> (!SymbolType, !*ImportedTypes, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
+convertSymbolTypeWithoutCollectingImportedConstructors :: !Bool !{# CommonDefs} !SymbolType !Int !*ImportedTypes !*TypeHeaps !*VarHeap
+ -> (!SymbolType, !*ImportedTypes, !*TypeHeaps, !*VarHeap)
+
addTypesOfDictionaries :: !{#CommonDefs} ![TypeContext] ![AType] -> [AType]
diff --git a/frontend/trans.icl b/frontend/trans.icl
index 3122bc1..3a0550e 100644
--- a/frontend/trans.icl
+++ b/frontend/trans.icl
@@ -3485,6 +3485,7 @@ where
RemoveAnnotationsMask:==1
ExpandAbstractSynTypesMask:==2
+DontCollectImportedConstructors:==4
convertSymbolType :: !Bool !{# CommonDefs} !SymbolType !Int !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
-> (!SymbolType, !*ImportedTypes, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
@@ -3493,6 +3494,13 @@ convertSymbolType rem_annots common_defs st main_dcl_module_n imported_types col
= convertSymbolType_ (if rem_annots (RemoveAnnotationsMask bitor ExpandAbstractSynTypesMask) ExpandAbstractSynTypesMask) common_defs st main_dcl_module_n imported_types collected_imports type_heaps var_heap
= (st, ets_type_defs, ets_collected_conses, ets_type_heaps, ets_var_heap)
+convertSymbolTypeWithoutCollectingImportedConstructors :: !Bool !{# CommonDefs} !SymbolType !Int !*ImportedTypes !*TypeHeaps !*VarHeap
+ -> (!SymbolType, !*ImportedTypes, !*TypeHeaps, !*VarHeap)
+convertSymbolTypeWithoutCollectingImportedConstructors rem_annots common_defs st main_dcl_module_n imported_types type_heaps var_heap
+ # (st, ets_contains_unexpanded_abs_syn_type,ets_type_defs, ets_collected_conses, ets_type_heaps, ets_var_heap)
+ = convertSymbolType_ (if rem_annots (RemoveAnnotationsMask bitor ExpandAbstractSynTypesMask bitor DontCollectImportedConstructors) (ExpandAbstractSynTypesMask bitor DontCollectImportedConstructors)) common_defs st main_dcl_module_n imported_types [] type_heaps var_heap
+ = (st, ets_type_defs, ets_type_heaps, ets_var_heap)
+
convertSymbolType_ :: !Int !{# CommonDefs} !SymbolType !Int !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
-> (!SymbolType, !Bool,!*ImportedTypes, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
convertSymbolType_ rem_annots common_defs st main_dcl_module_n imported_types collected_imports type_heaps var_heap
@@ -3674,7 +3682,7 @@ expand_syn_types_in_TA rem_annots common_defs ta_type attribute ets=:{ets_type_d
TA type_symb _ -> TA type_symb types
TAS type_symb _ strictness -> TAS type_symb types strictness
) ta_type
- | glob_module == ets.ets_main_dcl_module_n
+ | glob_module == ets.ets_main_dcl_module_n || (rem_annots bitand DontCollectImportedConstructors)<>0
-> (changed,ta_type, ets)
-> (changed,ta_type, collect_imported_constructors common_defs glob_module td_rhs ets)
where
diff --git a/frontend/type_io.icl b/frontend/type_io.icl
index fa4ab7f..e6b6994 100644
--- a/frontend/type_io.icl
+++ b/frontend/type_io.icl
@@ -225,7 +225,6 @@ where
write_type_info symbol_type tcl_file wtis
#! ({st_vars,st_args,st_args_strictness,st_arity,st_result},wtis)
= expand_symbol_type symbol_type wtis
-
# (tcl_file,wtis)
= write_type_info st_vars tcl_file wtis
# (tcl_file,wtis)
@@ -239,8 +238,8 @@ where
= (tcl_file,wtis)
where
expand_symbol_type symbol_type wtis=:{wtis_common_defs,wtis_type_defs,wtis_main_dcl_module_n,wtis_collected_conses,wtis_type_heaps,wtis_var_heap}
- # (expanded_symbol_type,wtis_type_defs,wtis_collected_conses,wtis_type_heaps,wtis_var_heap)
- = convertSymbolType False wtis_common_defs symbol_type wtis_main_dcl_module_n wtis_type_defs [] /* ? */ wtis_type_heaps wtis_var_heap;
+ # (expanded_symbol_type,wtis_type_defs,wtis_type_heaps,wtis_var_heap)
+ = convertSymbolTypeWithoutCollectingImportedConstructors False wtis_common_defs symbol_type wtis_main_dcl_module_n wtis_type_defs wtis_type_heaps wtis_var_heap;
# wtis
= { wtis &
wtis_type_defs = wtis_type_defs