diff options
| author | aarne <unknown> | 2003-10-21 15:15:47 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2003-10-21 15:15:47 +0000 |
| commit | 31e0deb017a938bc91f49d8505104d97bc8af14f (patch) | |
| tree | 17bab7f3245786136f4f76b2c8e698d3a4336ec0 /src/GF/Data | |
| parent | d0c75667910bfe5e2ee3f8434d7079f2c1bed65c (diff) | |
Rebuilding resource libraries.
Rebuilding resource libraries.
Working with resource interfaces.
Diffstat (limited to 'src/GF/Data')
| -rw-r--r-- | src/GF/Data/Operations.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/GF/Data/Operations.hs b/src/GF/Data/Operations.hs index 6dd78e1bc..d4c13f1f4 100644 --- a/src/GF/Data/Operations.hs +++ b/src/GF/Data/Operations.hs @@ -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) |
