summaryrefslogtreecommitdiff
path: root/assignment-13/uFPL.icl
diff options
context:
space:
mode:
authorCamil Staps2018-01-06 10:41:42 +0100
committerCamil Staps2018-01-06 15:03:15 +0100
commitd447a03d760faa9ce6ad00acb9284362f1f38613 (patch)
tree9d2a84bab51e9db69b251b6ee06ccae693a1300a /assignment-13/uFPL.icl
parentStart iTasks Simulator (diff)
Continue simulator
Diffstat (limited to 'assignment-13/uFPL.icl')
-rw-r--r--assignment-13/uFPL.icl4
1 files changed, 2 insertions, 2 deletions
diff --git a/assignment-13/uFPL.icl b/assignment-13/uFPL.icl
index 3104595..23bf85c 100644
--- a/assignment-13/uFPL.icl
+++ b/assignment-13/uFPL.icl
@@ -42,7 +42,7 @@ removeDupShares (Shares s ss) = if exists id (Shares s) (removeDupShares ss)
where
exists = any (\s` -> s.sname == s`) (sharesMap (\s -> s.sname) ss)
-sharesMap :: (A.t rw: (UShared t rw) -> a) Shares -> [a]
+sharesMap :: (A.t rw: (UShared t rw) -> a | Expr t) Shares -> [a]
sharesMap _ NoShares = []
sharesMap f (Shares s ss) = [f s:sharesMap f ss]
@@ -51,7 +51,7 @@ where
allShares` [] = NoShares
allShares` [x:xs] = append (allShares` x) (allShares` xs)
-instance allShares (Expr t rw)
+instance allShares (Expr t rw) | Expr t
where
allShares` (ELit _) = NoShares
allShares` (EShared s) = Shares s NoShares