Commit 6648ed22 authored by Vincent Zweije's avatar Vincent Zweije
Browse files

Moved ==(Optional a) to basic module

parent 5e9eb699
...@@ -30,6 +30,8 @@ Implementation ...@@ -30,6 +30,8 @@ Implementation
//:: Optional t = Absent | Present t //:: Optional t = Absent | Present t
//Now using Optional from cocl's general module //Now using Optional from cocl's general module
instance == (Optional a) | == a
// Adjust a function for a single argument // Adjust a function for a single argument
adjust :: !arg res (arg->res) !arg -> res | == arg adjust :: !arg res (arg->res) !arg -> res | == arg
......
...@@ -27,6 +27,11 @@ Implementation ...@@ -27,6 +27,11 @@ Implementation
// Now using Optional type from cocl's general module // Now using Optional type from cocl's general module
from general import Optional,No,Yes 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 // Adjust a function for a single argument
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment