Rebuilding resource libraries.

Rebuilding resource libraries.
Working with resource interfaces.
This commit is contained in:
aarne
2003-10-21 15:15:47 +00:00
parent d0c7566791
commit 31e0deb017
15 changed files with 2072 additions and 24 deletions

View File

@@ -168,6 +168,14 @@ updatePerhaps old p1 p2 = case (p1,p2) of
(_, May a) -> Bad "strange indirection"
_ -> unifPerhaps p1 p2
-- here the value is copied instead of referred to; used for oper types
updatePerhapsHard :: b -> Perhaps a b -> Perhaps a b -> Err (Perhaps a b)
updatePerhapsHard old p1 p2 = case (p1,p2) of
(Yes a, Nope) -> return $ yes a
(May older,Nope) -> return $ may older
(_, May a) -> Bad "strange indirection"
_ -> unifPerhaps p1 p2
-- binary search trees
data BinTree a = NT | BT a (BinTree a) (BinTree a) deriving (Show,Read)