adapt to GHC-7.10's foldable/traversable changes (#239)
This commit is contained in:
parent
e60eb71467
commit
4538745005
@ -126,7 +126,7 @@ replaceBackReference _ s = error' $ "replaceBackReference called on non-numeric-
|
||||
replaceAllBy :: Regex -> (String -> String) -> String -> String
|
||||
replaceAllBy re f s = start end
|
||||
where
|
||||
(_, end, start) = foldl' go (0, s, id) $ getAllMatches $ match re s
|
||||
(_, end, start) = foldl' go (0, s, id) $ (getAllMatches $ match re s :: [(Int, Int)])
|
||||
go (ind,read,write) (off,len) =
|
||||
let (skip, start) = splitAt (off - ind) read
|
||||
(matched, remaining) = splitAt len start
|
||||
|
||||
Loading…
Reference in New Issue
Block a user