aboutsummaryrefslogtreecommitdiff
path: root/frontend/typeproperties.icl
diff options
context:
space:
mode:
authormartinw2000-04-26 09:10:34 +0000
committermartinw2000-04-26 09:10:34 +0000
commit1e8f9d92be20258186661009221e60034fc53f06 (patch)
tree7b82bbcc810aa9fdfa04b0912914a8139d8683bc /frontend/typeproperties.icl
parentsmall bugfix (diff)
changes to make compiler compatible with itself
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@126 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/typeproperties.icl')
-rw-r--r--frontend/typeproperties.icl19
1 files changed, 19 insertions, 0 deletions
diff --git a/frontend/typeproperties.icl b/frontend/typeproperties.icl
index 267dfd8..d646e06 100644
--- a/frontend/typeproperties.icl
+++ b/frontend/typeproperties.icl
@@ -136,4 +136,23 @@ addPropClassification :: ![PropClassification] !PropClassification !TypeClassifi
addPropClassification hio_props prop_class tc=:{tc_props}
= { tc & tc_props = treeInsert hio_props { ts_cons_var_props = hio_props, ts_type_prop = prop_class } tc_props }
+instance * Sign
+where
+ (*) sign1 sign2
+ | sign1.pos_sign
+ | sign1.neg_sign
+ = sign1
+ = sign2
+ | sign1.neg_sign
+ = { pos_sign = sign2.neg_sign, neg_sign = sign2.pos_sign }
+ = sign1
+
+/*
+ = { pos_sign = sign1.pos_sign * sign2.pos_sign || sign1.neg_sign * sign2.neg_sign,
+ neg_sign = sign1.pos_sign * sign2.neg_sign || sign1.neg_sign * sign2.pos_sign }
+
+instance * Bool
+where
+ (*) b1 b2 = b1 && b2 || not b1 && not b2
+*/