Closed amesgen closed 3 years ago
I think that the following should not happen:
Λ "a" ^? [_regex|(?<a>a)|(?<b>b)|] . _capture @"a" Just "a" Λ "a" ^? [_regex|(?<a>a)|(?<b>b)|] . _capture @"b" Just*** Exception: src/hs/Text/Regex/Pcre2/Internal.hs:1275:9-70: Non-exhaustive patterns in (ls, c : rs) Λ "b" ^? [_regex|(?<a>a)|(?<b>b)|] . _capture @"a" Just "" Λ "b" ^? [_regex|(?<a>a)|(?<b>b)|] . _capture @"b" Just*** Exception: src/hs/Text/Regex/Pcre2/Internal.hs:1275:9-70: Non-exhaustive patterns in (ls, c : rs)
With indices, everything works fine:
Λ "a" ^? [_regex|(?<a>a)|(?<b>b)|] . _capture @1 Just "a" Λ "a" ^? [_regex|(?<a>a)|(?<b>b)|] . _capture @2 Just "" Λ "b" ^? [_regex|(?<a>a)|(?<b>b)|] . _capture @1 Just "" Λ "b" ^? [_regex|(?<a>a)|(?<b>b)|] . _capture @2 Just "b"
Oof, thanks.
I think that the following should not happen:
With indices, everything works fine: