FreeBSD/amd64 registerised running

Simon Marlow simonmarhaskell at
Wed Apr 11 03:58:36 EDT 2007

Chris Kuklewicz wrote:
> 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?

Yes, as I mentioned, ticket 1160 
( is for replacing regex-posix 
with regex-tdfa, and that would fix this issue.

However, Igloo just removed the regex packages from GHC's core package set, so 
we don't have the problem any more.

> 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.

It sounds like a good idea to switch regex-compat to depend on regex-tdfa anyway.


More information about the Glasgow-haskell-users mailing list