From 3492357256d9abf042f9e70df9cb6825708cf583 Mon Sep 17 00:00:00 2001 From: sjakie Date: Mon, 27 Aug 2001 15:23:16 +0000 Subject: Universally quantified types added Bug fix in reference marking git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@675 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/unitype.dcl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'frontend/unitype.dcl') diff --git a/frontend/unitype.dcl b/frontend/unitype.dcl index a5716d4..5b7e0ff 100644 --- a/frontend/unitype.dcl +++ b/frontend/unitype.dcl @@ -22,12 +22,13 @@ FirstAttrVar :== 3 instance toInt TypeAttribute -:: CoercionTree = CT_Node !Int !CoercionTree !CoercionTree | CT_Empty | CT_Unique | CT_NonUnique /* | CT_Existential !Int */ +:: CoercionTree = CT_Node !Int !CoercionTree !CoercionTree | CT_Empty | CT_Unique | CT_NonUnique | CT_Existential :: Coercions = { coer_demanded :: !.{! .CoercionTree}, coer_offered :: !.{! .CoercionTree }} isNonUnique :: !CoercionTree -> Bool isUnique :: !CoercionTree -> Bool +isExistential :: !CoercionTree -> Bool isNonUniqueAttribute :: !Int !Coercions -> Bool isUniqueAttribute :: !Int !Coercions -> Bool @@ -44,7 +45,7 @@ determineAttributeCoercions :: !AType !AType !Bool !u:{! Type} !*Coercions !{# C :: AttributePartition :== {# Int} -partitionateAttributes :: !{! CoercionTree} !{! *CoercionTree} -> (!AttributePartition, !{! CoercionTree}) +partitionateAttributes :: !{! CoercionTree} !{! *CoercionTree} -> (!AttributePartition, !*{! CoercionTree}) newInequality :: !Int !Int !*Coercions -> *Coercions @@ -62,7 +63,7 @@ liftSubstitution :: !*{! Type} !{# CommonDefs }!{# BOOLVECT } !Int !*TypeHeaps ! } class expandType a :: !{# CommonDefs } !{# BOOLVECT } !a !*(!u:{! Type}, !*ExpansionState) -> (!Bool, !a, !*(!u:{! Type}, !*ExpansionState)) -//class expandType a :: !{# CommonDefs } !{# BOOLVECT } !a !*(!u:{! Type}, !*ExpansionState) -> (!a, !*(!u:{! Type}, !*ExpansionState)) - instance expandType AType + +checkExistentionalAttributeVars :: [TempAttrId] !AttributePartition !*{! CoercionTree} -> (!Bool,!*{! CoercionTree}) -- cgit v1.2.3