diff options
author | martinw | 2000-02-21 10:53:18 +0000 |
---|---|---|
committer | martinw | 2000-02-21 10:53:18 +0000 |
commit | bbac534f39d2a14a3b32345f590d4a8252d27eae (patch) | |
tree | 77974aa417feacf55ad44e19ff05b80999e05ce6 /frontend/StdCompare.icl | |
parent | Commiting changes in syntax tree to enable backend adaption. New added constr... (diff) |
- implemented comparison between redundant definitions in icl and dcl modules
(new module: comparedefimp)
- implemented array patterns. Further work: arrays are in lazy context (should be strict),
currently only one dimensional arrays
- optimised memory usage for explicit imports
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@94 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/StdCompare.icl')
-rw-r--r-- | frontend/StdCompare.icl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/frontend/StdCompare.icl b/frontend/StdCompare.icl index a8c3f92..c9159c3 100644 --- a/frontend/StdCompare.icl +++ b/frontend/StdCompare.icl @@ -70,8 +70,6 @@ where = tc1 == tc2 && types1 == types2 equal_constructor_args (TB tb1) (TB tb2) = tb1 == tb2 - equal_constructor_args (TA tc1 types1) (TA tc2 types2) - = tc1 == tc2 && types1 == types2 equal_constructor_args (type1 :@: types1) (type2 :@: types2) = type1 == type2 && types1 == types2 equal_constructor_args (TQV varid1) (TQV varid2) @@ -79,6 +77,15 @@ where equal_constructor_args type1 type2 = True +instance == Priority +where + (==) NoPrio NoPrio = True + (==) (Prio assoc1 prio1) (Prio assoc2 prio2) = assoc1==assoc2 && prio1==prio2 + +instance == Assoc +where + (==) a1 a2 = equal_constructor a1 a2 + :: CompareValue :== Int Smaller :== -1 Greater :== 1 |