happy: intToInt16# vs narrow16Int#
Mon, 27 Aug 2001 11:27:45 +0100
> Hello all,
> I'm not sure why, but it seems that I'm the only person encountering
> the following problem building GHC from the CVS sources: The parsers
> generated by Happy use narrow16Int#, which only exists in very recent
> builds of GHC, not GHC 5.00.2, which thus chokes building the stage 1
> compiler. Is this now a known issue, or am I missing something
> obvious with my Happy setup?
We're still using Happy from before your changes to make it not
dependent on the word size, and that version still works with both 5.02
and 5.00.2 because it doesn't use either intToInt16# or narrowInt16#.=20
Unfortunately we can't just use conditional compilation in the template
to pick the right one, because we can't force the generated parser to
require -cpp to compile. Or perhaps we should? Happy can put the flag
automatically in the OPTIONS pragma at the top of the file. Then we
have to figure out how to quote these cpp directives in GenericTemplate
so they don't get processed by the first pass of cpp.
And for GHC >=3D 5.00, we really should be using indexInt16OffAddr#.