[Haskell-cafe] Being Compatible

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Fri Oct 8 05:47:42 EDT 2004


John Goerzen <jgoerzen at complete.org> writes:

> My initial thought was to use the cpp-style ifdefs I've seen elsewhere
> to mask those unsupported features on those particular systems.  But
> Hugs at least doesn't support that, and I've found it extremely
> difficult to find a list of predefined macros for the other systems
> anyway.

I thought Hugs does support preprocessing, with the -F option?

The usual cpp macros are:

    __HASKELL98__		# supports at least the '98 standard
    __GLASGOW_HASKELL__		= 504, 602, etc
    __HUGS__
    __NHC__
    __HBC__

You might also occasionally see

    __HADDOCK__		# for documentation-only preprocessing
    __HAT__		# for the Hat tracer

Regards,
    Malcolm


More information about the Haskell-Cafe mailing list