Regular expressions don't return multiple results.
Regular expressions can not return multiple results anymore. This worked with 6.10.x (I think it was 6.10).
Test case:
ghci
:m Text.Regex.Posix
"acba" =~ "a" :: (Int,Int) -- returns (0,1)
"acba" =~ "a" :: [(Int,Int)] -- or [String] or whatever
results in:
No instance for (RegexContext Regex [Char] [(Int, Int)])
arising from a use of `=~' at <interactive>:1:0-12
Possible fix:
add an instance declaration for
(RegexContext Regex [Char] [(Int, Int)])
In the expression: "acba" =~ "a" :: [(Int, Int)]
In the definition of `it': it = "acba" =~ "a" :: [(Int, Int)]
Trac metadata
Trac field | Value |
---|---|
Version | 6.12.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries (other) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | choener@tbi.univie.ac.at |
Operating system | |
Architecture |