aboutsummaryrefslogtreecommitdiff
path: root/sucl
diff options
context:
space:
mode:
authorzweije2001-08-14 12:06:36 +0000
committerzweije2001-08-14 12:06:36 +0000
commit969a03ba89be04d26c9f3fddc44e4fe8aea5bb28 (patch)
treec06a8236ae38b509f369a4396e8b0e1189b6014c /sucl
parentThis commit was generated by cvs2svn to compensate for changes in r626, (diff)
This commit was generated by cvs2svn to compensate for changes in r628,
which included commits to RCS files with non-trunk default branches. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@629 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'sucl')
-rw-r--r--sucl/basic.dcl2
-rw-r--r--sucl/basic.icl5
2 files changed, 7 insertions, 0 deletions
diff --git a/sucl/basic.dcl b/sucl/basic.dcl
index be3260a..c0d1de8 100644
--- a/sucl/basic.dcl
+++ b/sucl/basic.dcl
@@ -30,6 +30,8 @@ Implementation
//:: Optional t = Absent | Present t
//Now using Optional from cocl's general module
+instance == (Optional a) | == a
+
// Adjust a function for a single argument
adjust :: !arg res (arg->res) !arg -> res | == arg
diff --git a/sucl/basic.icl b/sucl/basic.icl
index a508599..425f29f 100644
--- a/sucl/basic.icl
+++ b/sucl/basic.icl
@@ -27,6 +27,11 @@ Implementation
// Now using Optional type from cocl's general module
from general import Optional,No,Yes
+instance == (Optional a) | == a
+ where (==) No No = True
+ (==) (Yes x1) (Yes x2) = x1==x2
+ (==) _ _ = False
+
// Adjust a function for a single argument