;mark more partial functions (#1312)

This commit is contained in:
Simon Michael 2020-08-05 17:29:43 -07:00
parent 3f55c23603
commit ede4bfd5b4

View File

@ -69,16 +69,16 @@ type Replacement = String
-- | Convert our string-based Regexp to a real Regex. -- | Convert our string-based Regexp to a real Regex.
-- Or if it's not well formed, call error with a "malformed regexp" message. -- Or if it's not well formed, call error with a "malformed regexp" message.
toRegex :: Regexp -> Regex toRegex :: Regexp -> Regex
toRegex = memo (compileRegexOrError defaultCompOpt defaultExecOpt) toRegex = memo (compileRegexOrError defaultCompOpt defaultExecOpt) -- PARTIAL:
-- | Like toRegex but make a case-insensitive Regex. -- | Like toRegex but make a case-insensitive Regex.
toRegexCI :: Regexp -> 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 :: CompOption -> ExecOption -> Regexp -> Regex
compileRegexOrError compopt execopt r = compileRegexOrError compopt execopt r =
fromMaybe 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 makeRegexOptsM compopt execopt r
-- regexMatch' :: RegexContext Regexp String a => Regexp -> String -> a -- regexMatch' :: RegexContext Regexp String a => Regexp -> String -> a