Verified Commit 9a46ca53 authored by Camil Staps's avatar Camil Staps 🚀

Use new CleanRegex library

parent 0eb10551
Pipeline #40189 failed with stages
in 3 minutes and 56 seconds
......@@ -11,7 +11,7 @@ import Data.Maybe
import Text
import Regex
exact s = regex ("^" +++ s +++ "$")
exact s = fromOk (compileRegex (concat ["^",s,"$"]))
import Cloogle.API
import Cloogle.DB
......@@ -615,7 +615,7 @@ bs_pattern_predicate =
bs_qualified_identifier =
{ syntax_title = "qualified identifier"
, syntax_patterns = map regex ["^'.+'", "^qualified$"]
, syntax_patterns = map (fromOk o compileRegex) ["^'.+'", "^qualified$"]
, syntax_code = ["'...'. ..."]
, syntax_description = "The identifiers of {{`qualified`}} imports must be prepended with `'...'.`, where `...` is the name of the qualified import."
, syntax_doc_locations = []
......
Subproject commit 91bd10e0b29bd6a473fadbcb8fbaf78bd6350c0d
Subproject commit 34730858efaf02c4edadcb2df76c64adde7b3218
......@@ -24,8 +24,7 @@ import qualified Text
from Text import class Text, instance Text String
import Text.GenJSON
import Regex.Match
import Regex.Parse
import Regex
import Cloogle.DB
from Cloogle.DB.Factory import :: TemporaryDB, newTemporaryDB, finaliseDB,
......@@ -39,7 +38,7 @@ import Builtin.Syntax
:: Options =
{ root :: !String
, libs_file :: !String
, module_filter :: !Maybe Regex
, module_filter :: !Maybe CompiledRegex
, include_builtins :: !Bool
}
......@@ -68,7 +67,7 @@ optionDescription = WithHelp True $ Options
"Use FILE for a list of libraries to index (default: libs.json)"
, Option
"--module-filter"
(\filter opts -> case compile filter of
(\filter opts -> case compileRegex filter of
Error e -> Error ["Regex parsing failed: " +++ e]
Ok rgx -> Ok {opts & module_filter=Just rgx})
"REGEX"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment