aboutsummaryrefslogtreecommitdiff
path: root/frontend/hashtable.icl
diff options
context:
space:
mode:
authorjohnvg2011-04-21 15:11:27 +0000
committerjohnvg2011-04-21 15:11:27 +0000
commitf7606c4eb8c45033db41b2ec1fc3e446b375fa87 (patch)
tree44cbef3708b26726f93f20a966c853a9ff896d5b /frontend/hashtable.icl
parentuse unique array select and update instead of replace (diff)
use strictness annotations in instance member types,
add instance member types in definition modules git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1932 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/hashtable.icl')
-rw-r--r--frontend/hashtable.icl27
1 files changed, 15 insertions, 12 deletions
diff --git a/frontend/hashtable.icl b/frontend/hashtable.icl
index 934bbfc..78c2767 100644
--- a/frontend/hashtable.icl
+++ b/frontend/hashtable.icl
@@ -20,6 +20,7 @@ import predef, syntax, StdCompare, compare_constructor
| IC_Field !Ident
| IC_Selector
| IC_Instance ![Type]
+ | IC_InstanceMember ![Type]
| IC_Generic
| IC_GenericCase !Type
| IC_Unknown
@@ -39,18 +40,8 @@ instance =< IdentClass
where
(=<) (IC_Instance types1) (IC_Instance types2)
= compare_types types1 types2
- where
- compare_types [t1 : t1s] [t2 : t2s]
- # cmp = t1 =< t2
- | cmp == Equal
- = t1s =< t2s
- = cmp
- compare_types [] []
- = Equal
- compare_types [] _
- = Smaller
- compare_types _ []
- = Greater
+ (=<) (IC_InstanceMember types1) (IC_InstanceMember types2)
+ = compare_types types1 types2
(=<) (IC_GenericCase type1) (IC_GenericCase type2)
= type1 =< type2
(=<) (IC_Field typ_id1) (IC_Field typ_id2)
@@ -62,6 +53,18 @@ where
= Smaller
= Greater
+compare_types [t1 : t1s] [t2 : t2s]
+ # cmp = t1 =< t2
+ | cmp == Equal
+ = t1s =< t2s
+ = cmp
+compare_types [] []
+ = Equal
+compare_types [] _
+ = Smaller
+compare_types _ []
+ = Greater
+
instance =< (!a,!b) | =< a & =< b
where
(=<) (x1,y1) (x2,y2)