Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Text/Regex/Base/Context.hs
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ instance (RegexLike a b) => RegexContext a b Int where
-- ** Instances based on matchOnce,matchOnceText

instance (RegexLike a b) => RegexContext a b (MatchOffset,MatchLength) where
match r s = maybe (-1,0) (!0) (matchOnce r s)
matchM r s = maybe regexFailed (return.(!0)) (matchOnce r s)
match r s = maybe (-1,0) (! 0) (matchOnce r s)
matchM r s = maybe regexFailed (return.(! 0)) (matchOnce r s)

instance (RegexLike a b) => RegexContext a b (MatchResult b) where
match r s = maybe (MR {mrBefore = s,mrMatch = empty,mrAfter = empty
Expand Down