summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Data/Operations.hs
diff options
context:
space:
mode:
authorAndreas Källberg <anka.213@gmail.com>2020-08-05 17:29:10 +0200
committerAndreas Källberg <anka.213@gmail.com>2020-08-05 18:48:24 +0200
commit0581d6827ea2e4aac371eb05f3bf5508f3f40edc (patch)
tree9ba4cada2dabf76be7d41b72fe727d57032a74d9 /src/compiler/GF/Data/Operations.hs
parentb8812b54b2dd70df1038a5cd953b4bbb8ac1e9b4 (diff)
Fix most build errors
Diffstat (limited to 'src/compiler/GF/Data/Operations.hs')
-rw-r--r--src/compiler/GF/Data/Operations.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Data/Operations.hs b/src/compiler/GF/Data/Operations.hs
index 4daa9c5d8..a9fedcaff 100644
--- a/src/compiler/GF/Data/Operations.hs
+++ b/src/compiler/GF/Data/Operations.hs
@@ -88,10 +88,10 @@ checkUnique ss = ["overloaded" +++ show s | s <- nub overloads] where
overloaded s = length (filter (==s) ss) > 1
-- | this is what happens when matching two values in the same module
-unifyMaybe :: (Eq a, Monad m) => Maybe a -> Maybe a -> m (Maybe a)
+unifyMaybe :: (Eq a, MonadFail m) => Maybe a -> Maybe a -> m (Maybe a)
unifyMaybe = unifyMaybeBy id
-unifyMaybeBy :: (Eq b, Monad m) => (a->b) -> Maybe a -> Maybe a -> m (Maybe a)
+unifyMaybeBy :: (Eq b, MonadFail m) => (a->b) -> Maybe a -> Maybe a -> m (Maybe a)
unifyMaybeBy f (Just p1) (Just p2)
| f p1==f p2 = return (Just p1)
| otherwise = fail ""