#3906: Regular expressions don't return multiple results.
-------------------------------+--------------------------------------------
    Reporter:  choenerzs       |       Owner:                         
        Type:  bug             |      Status:  new                    
    Priority:  normal          |   Component:  libraries (other)      
     Version:  6.12.1          |    Keywords:  regex, multiple results
          Os:  Linux           |    Testcase:                         
Architecture:  x86_64 (amd64)  |     Failure:  None/Unknown           
-------------------------------+--------------------------------------------
 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)]
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3906>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to