
Simon Marlow wrote:
Aha. Text/Regex/Posix.hs is generated from Text/Regex/Posix.hsc by hsc2hs, but this is done on the *host* rather than the *target* when bootstrapping, and thus generates the wrong results. If you'd run hsc2hs on the target, then Text/Regex/Posix.hs would have been correct, but you can't do this because hsc2hs is a Haskell program. You could take the .c file generated by hsc2hs on the host and compile/run it on the target, but that's a hassle, so instead our policy is that we don't rely on any hsc2hs-generated code for bootstrapping.
Unfortunately I broke the rules by accident when I introduced the dependency on regex. I can't think of an easy way to enforce the rule, at least at the moment, since there are other hsc2hs-processed modules that we happen to not depend on in GHC (System.Time and System.CPUTime).
Could the solution be to depend on a pure Haskell regex implementation instead of on a regex-posix / Posix.hsc and the system regex library? The regex-tdfa backend could be modified to work with the regex-base in GHC 6.6 and then regex-compat could quickly be switched to use this instead of regex-posix. -- Chris Kuklewicz