[GHC] #12974: Solution to regular expression is no longer valid

GHC ghc-devs at haskell.org
Wed Dec 14 13:33:53 UTC 2016


#12974: Solution to regular expression is no longer valid
-------------------------------------+-------------------------------------
           Reporter:  pjljvdlaar     |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The following HUnit test code
 {{{#!hs
 module Main where
 import Test.HUnit
 import Text.Regex.Posix

 testRegexSimple :: Test
 testRegexSimple = TestCase $ do
     assertBool "pattern matches regex ^(a)|(p)$" ( "p" =~ "^(a)|(p)$" )

 testRegex :: Test
 testRegex = TestCase $ do
     assertBool "pattern matches regex ^(ab+c*d?)|(ef{2}g{3,6}h{3,})|(p)$"
 ( "p" =~ "^(ab+c*d?)|(ef{2}g{3,6}h{3,})|(p)$" )

 tests = TestList [
         TestLabel "Regex Simple"         testRegexSimple,
         TestLabel "Regex"                testRegex
     ]

 main :: IO Counts
 main = do runTestTT tests
 }}}
 runs perfectly using Haskell platform 2013.2.0.0 with ghc 7.6.3.

 However, on stack LTS 7.13 with ghc 8.0.1 the second test fails!
 I assume this behaviour is the result of a bug.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12974>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list