aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjakie2001-10-11 07:37:34 +0000
committersjakie2001-10-11 07:37:34 +0000
commitae676d7b70962679309457df3b4c001b0f2eb7f0 (patch)
tree9f513c16618df0cbf749efdbaf0952512db370b9
parentThis commit was generated by cvs2svn to compensate for changes in r839, (diff)
Bug fix: type attributes of constructor variables are treated (more) uniformly
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@842 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--frontend/checktypes.icl6
1 files changed, 6 insertions, 0 deletions
diff --git a/frontend/checktypes.icl b/frontend/checktypes.icl
index f3802de..b738b5c 100644
--- a/frontend/checktypes.icl
+++ b/frontend/checktypes.icl
@@ -561,11 +561,17 @@ checkOpenAType mod_index scope dem_attr type=:{at_type = TArrow1 arg_type, at_at
(new_attr, oti, cs) = newAttribute dem_attr "TArrow1" at_attribute oti cs
= ({ type & at_type = TArrow1 arg_type, at_attribute = new_attr }, (ots, oti, cs))
//..AA
+/*
checkOpenAType mod_index scope dem_attr type=:{at_type = CV tv :@: types, at_attribute} (ots, oti, cs)
# (cons_var, _, (oti, cs)) = checkTypeVar scope DAK_None tv TA_Multi (oti, cs)
(types, (ots, oti, cs)) = mapSt (checkOpenAType mod_index scope DAK_None) types (ots, oti, cs)
(new_attr, oti, cs) = newAttribute dem_attr ":@:" at_attribute oti cs
= ({ type & at_type = CV cons_var :@: types, at_attribute = new_attr }, (ots, oti, cs))
+*/
+checkOpenAType mod_index scope dem_attr type=:{at_type = CV tv :@: types, at_attribute} (ots, oti, cs)
+ # (cons_var, var_attr, (oti, cs)) = checkTypeVar scope dem_attr tv at_attribute (oti, cs)
+ (types, (ots, oti, cs)) = mapSt (checkOpenAType mod_index scope DAK_None) types (ots, oti, cs)
+ = ({ type & at_type = CV cons_var :@: types, at_attribute = var_attr }, (ots, oti, cs))
checkOpenAType mod_index scope dem_attr atype=:{at_type = TFA vars type, at_attribute} (ots, oti, cs)
# (vars, (oti, cs)) = mapSt add_universal_var vars (oti, cs)
(checked_type, (ots, oti, cs)) = checkOpenAType mod_index cRankTwoScope dem_attr { atype & at_type = type } (ots, oti, cs)