
Hi, I have appreciated some of the comments here about what exactly is standardized. My next question is how to work at the greatest number of places. I am working on a library of Haskell-related utilities. There is some code in there that works with binary I/O, and some code that works with rawSystem(), etc. Some of these are not supported on Hugs, nhc98, or ghc5 to varying degrees. 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. What is the suggested way to work around these problems?

John Goerzen
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

At 10:47 08/10/04 +0100, Malcolm Wallace wrote:
John Goerzen
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?
Yes, but it requires an external preprocessor program to be available. (Enter cpphs.) #g --
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 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
------------ Graham Klyne For email: http://www.ninebynine.org/#Contact
participants (3)
-
Graham Klyne
-
John Goerzen
-
Malcolm Wallace