From 67c427f4907a544759b9fbe8fb4a28cb65a73e34 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Mon, 17 Feb 2020 19:36:50 -0500 Subject: [PATCH] Adapt to GHC proposal #229 See https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst --- src/Text/Regex/Base/Context.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Text/Regex/Base/Context.hs b/src/Text/Regex/Base/Context.hs index 1067f73..6faf03c 100644 --- a/src/Text/Regex/Base/Context.hs +++ b/src/Text/Regex/Base/Context.hs @@ -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