File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change 1- module Data.String.Regex.Unsafe
2- ( unsafeRegex
3- ) where
4-
5- import Control.Category (identity )
6- import Data.Either (either )
7- import Data.String.Regex (Regex , regex )
8- import Data.String.Regex.Flags (RegexFlags )
9-
10- import Partial.Unsafe (unsafeCrashWith )
11-
12- -- | Constructs a `Regex` from a pattern string and flags. Fails with
13- -- | an exception if the pattern contains a syntax error.
14- unsafeRegex :: String -> RegexFlags -> Regex
15- unsafeRegex s f = either unsafeCrashWith identity (regex s f)
1+ module Data.String.Regex.Unsafe
2+ ( unsafeRegex
3+ ) where
4+
5+ import Control.Category (identity )
6+ import Data.Either (either )
7+ import Data.String.Regex (Regex , regex )
8+ import Data.String.Regex.Flags (RegexFlags )
9+ import Partial.Unsafe (unsafeCrashWith )
10+
11+ -- | Constructs a `Regex` from a pattern string and flags. Fails with
12+ -- | an exception if the pattern contains a syntax error.
13+ unsafeRegex :: String -> RegexFlags -> Regex
14+ unsafeRegex s f = either unsafeCrashWith identity (regex s f)
You can’t perform that action at this time.
0 commit comments