aboutsummaryrefslogtreecommitdiff
path: root/frontend/overloading.dcl
diff options
context:
space:
mode:
authormartijnv2002-04-03 14:28:41 +0000
committermartijnv2002-04-03 14:28:41 +0000
commit6480d19351f96f18d9691e2b210b87648e2f438b (patch)
tree3165887a8ac14e5e795b9ab1035fdcc81238c757 /frontend/overloading.dcl
parentfixes in generics to compile with Clean 2.0 (diff)
- collection of used type constructors in unify/coerce. There are two sources:
dynamic pattern matches and types passed to type dependent functions. - added !Bool-field to GTT_Constructor - changed overloading, type and convertDynamics to propagate the type information git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1070 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/overloading.dcl')
-rw-r--r--frontend/overloading.dcl22
1 files changed, 12 insertions, 10 deletions
diff --git a/frontend/overloading.dcl b/frontend/overloading.dcl
index 4070b9b..2d29e6c 100644
--- a/frontend/overloading.dcl
+++ b/frontend/overloading.dcl
@@ -18,12 +18,13 @@ import syntax, check, typesupport
}
:: SpecialInstances =
- { si_next_array_member_index :: !Index
- , si_array_instances :: ![ArrayInstance]
- , si_list_instances :: ![ArrayInstance]
- , si_tail_strict_list_instances :: ![ArrayInstance]
- , si_next_TC_member_index :: !Index
- , si_TC_instances :: ![GlobalTCInstance]
+ { si_next_array_member_index :: !Index
+ , si_array_instances :: ![ArrayInstance]
+ , si_list_instances :: ![ArrayInstance]
+ , si_tail_strict_list_instances :: ![ArrayInstance]
+ , si_next_TC_member_index :: !Index
+ , si_TC_instances :: ![GlobalTCInstance]
+ , si_type_constructors_in_patterns :: ![!Index]
}
:: OverloadingState =
@@ -43,10 +44,11 @@ tryToSolveOverloading :: ![(Optional [TypeContext], [ExprInfoPtr], IdentPos, Ind
-> (![TypeContext], !*Coercions, ![LocalTypePatternVariable], DictionaryTypes, !*OverloadingState)
:: TypeCodeInfo =
- { tci_next_index :: !Index
- , tci_instances :: ![GlobalTCInstance]
- , tci_type_var_heap :: !.TypeVarHeap
- , tci_dcl_modules :: !{# DclModule}
+ { tci_next_index :: !Index
+ , tci_instances :: ![GlobalTCInstance]
+ , tci_type_var_heap :: !.TypeVarHeap
+ , tci_dcl_modules :: !{# DclModule}
+ , tci_type_constructors_in_patterns :: ![!Index]
}
removeOverloadedFunctions :: ![Index] ![LocalTypePatternVariable] !Int !*{#FunDef} !*{! FunctionType} !*ExpressionHeap