summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Infra/Option.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/Infra/Option.hs
parentb8812b54b2dd70df1038a5cd953b4bbb8ac1e9b4 (diff)
Fix most build errors
Diffstat (limited to 'src/compiler/GF/Infra/Option.hs')
-rw-r--r--src/compiler/GF/Infra/Option.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Infra/Option.hs b/src/compiler/GF/Infra/Option.hs
index c4108cbe3..20e625114 100644
--- a/src/compiler/GF/Infra/Option.hs
+++ b/src/compiler/GF/Infra/Option.hs
@@ -547,7 +547,7 @@ lookupShow xs z = fromMaybe "lookupShow" $ lookup z [(y,x) | (x,y) <- xs]
lookupReadsPrec :: [(String,a)] -> Int -> ReadS a
lookupReadsPrec xs _ s = [(z,rest) | (x,rest) <- lex s, (y,z) <- xs, y == x]
-onOff :: Monad m => (Bool -> m a) -> Bool -> ArgDescr (m a)
+onOff :: MonadFail m => (Bool -> m a) -> Bool -> ArgDescr (m a)
onOff f def = OptArg g "[on,off]"
where g ma = maybe (return def) readOnOff ma >>= f
readOnOff x = case map toLower x of
@@ -555,7 +555,7 @@ onOff f def = OptArg g "[on,off]"
"off" -> return False
_ -> fail $ "Expected [on,off], got: " ++ show x
-readOutputFormat :: Monad m => String -> m OutputFormat
+readOutputFormat :: MonadFail m => String -> m OutputFormat
readOutputFormat s =
maybe (fail $ "Unknown output format: " ++ show s) return $ lookup s outputFormats