[Haskell-cafe] A restricted subset of CPP included in a revisionof Haskell 98

Lennart Augustsson lennart at augustsson.net
Thu Aug 17 20:46:04 EDT 2006


On Aug 17, 2006, at 17:11 , Brian Hulley wrote:

> On Thursday, August 17, 2006 7:54 PM, Brian Smith  wrote:
>
>> I want to have conditionals limited in their placement
>> to make things easier for refactoring tools. But, I
>> don't have any ideas about how to deal with
>> conditional exports without allowing preprocessor
>> conditionals in the export list.
>
> It seems to me that all uses of the preprocessor could be avoided  
> except for cases like:
>
>    #ifdef _SPARC
>            -- sparc code
>    #else
>        #ifdef _INTEL86
>            -- i86 code
>        #else
>            -- byte code
>        #endif
>    #endif

That's one of the worst ways to use CPP.  The code generator should  
have a parameter that determines what to generate code for.  That's  
much nicer in many ways.

	-- Lennart



More information about the Haskell-Cafe mailing list