aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjakie1999-11-11 09:50:24 +0000
committersjakie1999-11-11 09:50:24 +0000
commit615c762712d2e9ab5c1ffbfc1eeaa3a879c769b8 (patch)
tree5adbdd55325a29dccdaacf96d6b5f16c9b34add0
parentextension: not necessary to repeat definitions of dcl-module in icl-module (diff)
bug fix: uniqueness inference (coerce in unitype)
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@41 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--frontend/typesupport.icl10
-rw-r--r--frontend/unitype.icl4
2 files changed, 9 insertions, 5 deletions
diff --git a/frontend/typesupport.icl b/frontend/typesupport.icl
index 7352a4b..7e43869 100644
--- a/frontend/typesupport.icl
+++ b/frontend/typesupport.icl
@@ -617,8 +617,7 @@ where
= (False, heaps)
equivalent :: !SymbolType !TempSymbolType !{# CommonDefs} !*AttributeEnv !*TypeHeaps -> (!Bool, !*AttributeEnv, !*TypeHeaps)
-equivalent {st_args,st_result,st_context,st_attr_env} {tst_args,tst_result,tst_context,tst_attr_env,tst_lifted} defs attr_env heaps
- #! nr_of_temp_attrs = size attr_env
+equivalent st=:{st_args,st_result,st_context,st_attr_env} tst=:{tst_args,tst_result,tst_context,tst_attr_env,tst_lifted} defs attr_env heaps
# (ok, heaps) = equiv (drop tst_lifted st_args,st_result) (drop tst_lifted tst_args,tst_result) heaps
| ok
# (ok, heaps) = equivalent_list_of_contexts st_context tst_context defs heaps
@@ -775,7 +774,9 @@ where
= show_attributed_type file form at_attribute at_type
where
show_attributed_type file form TA_Multi type
- = file <:: (form, type)
+ | checkProperty form cMarkAttribute
+ = show_marked_attribute TA_Multi form file <:: (form, type)
+ = file <:: (form, type)
show_attributed_type file form attr type
| checkProperty form cAttributed
= file <<< attr <:: (setProperty form cBrackets, type)
@@ -786,7 +787,8 @@ where
show_marked_attribute attr {form_attr_position = Yes (positions, coercions)} file
| isEmpty positions
= show_attribute attr coercions (file <<< "^ ")
- = show_attribute attr coercions file
+ = show_attribute attr coercions file
+
show_attribute TA_Unique coercions file
= file <<< '*'
diff --git a/frontend/unitype.icl b/frontend/unitype.icl
index e8c51d4..f56fa7e 100644
--- a/frontend/unitype.icl
+++ b/frontend/unitype.icl
@@ -454,7 +454,9 @@ coerceAttributes (TA_TempVar av_number) TA_Multi {neg_sign} coercions=:{coer_dem
= (True, makeNonUnique av_number coercions)
coerceAttributes TA_Unique TA_Multi _ coercions
= (False, coercions)
-coerceAttributes off_attr dem_attr {pos_sign,neg_sign} coercions
+coerceAttributes TA_Multi TA_Unique _ coercions
+ = (False, coercions)
+coerceAttributes off_attr dem_attr _ coercions
= (True, coercions)
newInequality :: !Int !Int !*Coercions -> *Coercions