Project

General

Profile

Bug #169

Updated by Igor Pashev over 6 years ago

*Linux:*
<pre>
# ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> import Text.Regex.Posix
Prelude Text.Regex.Posix> let line = "[ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)"
Prelude Text.Regex.Posix> line =~ "xK_(\\w+)" :: (String, String, String, [String])
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
Loading package regex-base-0.93.2 ... linking ... done.
Loading package regex-posix-0.95.2 ... linking ... done.
("[ ((modMask .|. shiftMask, ","xK_Return","), spawn $ XMonad.terminal conf)",["Return"])
Prelude Text.Regex.Posix>
</pre>

*Dyson:*
<pre>
# ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> import Text.Regex.Posix
Prelude Text.Regex.Posix> let line = "[ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)"
Prelude Text.Regex.Posix> line =~ "xK_(\\w+)" :: (String, String, String, [String])
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
Loading package regex-base-0.93.2 ... linking ... done.
Loading package regex-posix-0.95.2 ... linking ... done.
("[ ((modMask .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)","","",[])
Prelude Text.Regex.Posix>
</pre>

This causes Xmonad FTBFS.

*Workaround:*
<pre>
Prelude Text.Regex.Posix> line =~ "xK_([[:alnum:]]+)" :: (String, String, String, [String])
("[ ((modMask .|. shiftMask, ","xK_Return","), spawn $ XMonad.terminal conf)",["Return"])
</pre>

It does not depend on whether libc regex or bundled regex is used. Maybe because these sources have common ancestor :-)

Back