From ede4bfd5b4edfeb2a98b82060dad4f431228b824 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 5 Aug 2020 17:29:43 -0700 Subject: [PATCH] ;mark more partial functions (#1312) --- hledger-lib/Hledger/Utils/Regex.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hledger-lib/Hledger/Utils/Regex.hs b/hledger-lib/Hledger/Utils/Regex.hs index d613f3a5d..0fd169dbd 100644 --- a/hledger-lib/Hledger/Utils/Regex.hs +++ b/hledger-lib/Hledger/Utils/Regex.hs @@ -69,16 +69,16 @@ type Replacement = String -- | Convert our string-based Regexp to a real Regex. -- Or if it's not well formed, call error with a "malformed regexp" message. toRegex :: Regexp -> Regex -toRegex = memo (compileRegexOrError defaultCompOpt defaultExecOpt) +toRegex = memo (compileRegexOrError defaultCompOpt defaultExecOpt) -- PARTIAL: -- | Like toRegex but make a case-insensitive Regex. toRegexCI :: Regexp -> Regex -toRegexCI = memo (compileRegexOrError defaultCompOpt{caseSensitive=False} defaultExecOpt) +toRegexCI = memo (compileRegexOrError defaultCompOpt{caseSensitive=False} defaultExecOpt) -- PARTIAL: compileRegexOrError :: CompOption -> ExecOption -> Regexp -> Regex compileRegexOrError compopt execopt r = fromMaybe - (errorWithoutStackTrace $ "this regular expression could not be compiled: " ++ show r) $ + (error' $ "this regular expression could not be compiled: " ++ show r) $ -- PARTIAL: makeRegexOptsM compopt execopt r -- regexMatch' :: RegexContext Regexp String a => Regexp -> String -> a