Closed hvr closed 4 years ago
regex-pcre-builtin-0.94.4.8.8.35
:
[1 of 6] Compiling Text.Regex.PCRE.Wrap ( dist/build/Text/Regex/PCRE/Wrap.hs, dist/build/Text/Regex/PCRE/Wrap.o )
Text/Regex/PCRE/Wrap.hsc:158:33: error:
• Could not deduce (Control.Monad.Fail.MonadFail m)
arising from a use of ‘makeRegexM’
from the context: (RegexMaker Regex CompOption ExecOption source,
RegexContext Regex source1 target, Monad m)
bound by the type signature for:
(=~~) :: forall source source1 target (m :: * -> *).
(RegexMaker Regex CompOption ExecOption source,
RegexContext Regex source1 target, Monad m) =>
source1 -> source -> m target
at Text/Regex/PCRE/Wrap.hsc:(137,1)-(138,38)
Possible fix:
add (Control.Monad.Fail.MonadFail m) to the context of
the type signature for:
(=~~) :: forall source source1 target (m :: * -> *).
(RegexMaker Regex CompOption ExecOption source,
RegexContext Regex source1 target, Monad m) =>
source1 -> source -> m target
• In a stmt of a 'do' block: (q :: Regex) <- makeRegexM r
In the expression:
do (q :: Regex) <- makeRegexM r
matchM q x
In an equation for ‘=~~’:
(=~~) x r
= do (q :: Regex) <- makeRegexM r
matchM q x
|
158 | (=~~) x r = do (q :: Regex) <- makeRegexM r
| ^^^^^^^^^^^^
See also audreyt/regex-pcre-builtin#7.
Also biting regex-tdfa-text
.
I made revisions for regex-tdfa-text
. However, it looks like that users should migrate out of it.
Extract Text
instance.regex-pcre-builtin reviewed
@phadej re those -text
packages; I'm planning to add Text
support to regex-pcre
and regex-posix
(see e.g. https://github.com/haskell-hvr/regex-pcre/commits/wip/text -- which I deferred to the next minor rls of regex-pcre
due to some subtle bugs I couldn't get out in time)
I'm closing this. It has been quiet related to this general issue, so if there are some issues, they can be handled as regular ones.