diff options
author | alimarin | 2002-04-11 10:01:50 +0000 |
---|---|---|
committer | alimarin | 2002-04-11 10:01:50 +0000 |
commit | 8a32b21c043f21cf197cdde3a02ead110302b008 (patch) | |
tree | 3711960083237a1e23b69a705e26d0a1f725d308 /frontend/StdCompare.icl | |
parent | - removed strictness annotations (diff) |
support for generic type context like in
foo :: a a -> Bool | eq{|*|} a
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1073 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/StdCompare.icl')
-rw-r--r-- | frontend/StdCompare.icl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/frontend/StdCompare.icl b/frontend/StdCompare.icl index 91593b7..64ba219 100644 --- a/frontend/StdCompare.icl +++ b/frontend/StdCompare.icl @@ -48,6 +48,14 @@ instance == TypeContext where (==) tc1 tc2 = tc1.tc_class == tc2.tc_class && tc1.tc_types == tc2.tc_types +instance == TCClass +where + (==) (TCClass x) (TCClass y) = x == y + (==) (TCGeneric {gtc_class}) (TCClass y) = gtc_class == y + (==) (TCClass x) (TCGeneric {gtc_class}) = x == gtc_class + (==) (TCGeneric {gtc_generic=g1,gtc_kind=k1}) (TCGeneric {gtc_generic=g2,gtc_kind=k2}) + = g1 == g2 && k1 == k2 + instance == BasicType where (==) bt1 bt2 = equal_constructor bt1 bt2 |