I'm adding a foreign import in a GHC module from the RTS. I'm using a CPP
directive to avoid the import in the stage1 compiler, since the RTS
function I need doesn't necessarily exist in that version of the RTS.

> #if STAGE < 2
>   … -- make do without the import
> #else
>   … -- do the import and use it
> #endif

Do you have any criticism of this overall design?

EG Is there a preference to use Config.cStage instead of CPP and the STAGE
symbol?

Thanks.

P.S. — for some context, this is for Solution 1 at
http://ghc.haskell.org/trac/ghc/wiki/Plugins/ReinitializeGlobals
_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to