aboutsummaryrefslogtreecommitdiff
path: root/sucl
diff options
context:
space:
mode:
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