Various software and a question

Koen Claessen
Fri, 2 Feb 2001 10:15:17 +0100 (MET)

Ian Lynagh wondered:

 | is there a nicer way to do something like
 |     #ifdef __GLASGOW_HASKELL__
 |     #include "GHCCode.hs"
 |     #else
 |     > import HugsCode
 |     #endif

I usually make two directories:


That contain files with the same names but different
compiler-dependent implementations. Then it is just a
question of setting the PATHs right.

I hate using C preprocessor stuff for this. I think the
directory solution is nice because it forces you to
concentrate all the compiler-dependent stuff into a few
modules, which are distinct from the rest of the


Koen Claessen
phone:+46-31-772 5424
Chalmers University of Technology, Gothenburg, Sweden