aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorjohnvg2013-12-12 14:09:59 +0000
committerjohnvg2013-12-12 14:09:59 +0000
commit74fe272bf880139218fdb13c679c08e3689f392a (patch)
tree4c389c5df2743678428dc5c002031fc16f92b909 /frontend
parentgenerate .impmod before importing labels and descriptors, (diff)
add type attributes for universally quantified variables generated in the generics1 module
to the list of all type attributes (not adding these type attributes caused a type error), this also happens for function types that are specified by the programmer, the universally quantified type variables are however not added to the list of all type variables git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2334 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend')
-rw-r--r--frontend/generics1.icl8
1 files changed, 3 insertions, 5 deletions
diff --git a/frontend/generics1.icl b/frontend/generics1.icl
index e885016..6046b6b 100644
--- a/frontend/generics1.icl
+++ b/frontend/generics1.icl
@@ -4478,7 +4478,7 @@ adjust_forall curry_st=:{st_result} forall_atvs
#! st_result = {st_result & at_type = TFA forall_atvs st_result.at_type}
= { curry_st
& st_result = st_result
- , st_attr_vars
+ , st_attr_vars
= curry_st.st_attr_vars -- [av \\ {atv_attribute=TA_Var av} <- forall_atvs]
, st_vars
= curry_st.st_vars -- [atv_variable \\ {atv_variable} <- forall_atvs]
@@ -4947,11 +4947,9 @@ where
collect_type_var (CV tv :@: _) st = add_type_var tv st
collect_type_var (TFA forall_atvs type) (tvs, avs, th_vars)
#! forall_tvs = [atv_variable\\{atv_variable}<-forall_atvs]
- #! forall_avs = [av \\ {atv_attribute=TA_Var av}<-forall_atvs]
- = (tvs -- forall_tvs, avs -- forall_avs, th_vars)
- //---> ("collectTypeVarsAndAttrVars TFA", tvs, forall_tvs, tvs -- forall_tvs)
+ = (tvs -- forall_tvs, avs, th_vars)
collect_type_var t st = st
-
+
add_type_var tv (tvs, avs, th=:{th_vars})
# (was_used, th_vars) = markTypeVarUsed tv th_vars
# th = {th & th_vars = th_vars}