
I think the problem is that GHCi doesn't respect #ifdef conditional compilation.
I wasn't aware of any bugs in that area, can anyone provide some sample code? (and I'm surprised, because GHCi just runs cpp in the same way as GHC).
Ah, I think it is probably just a failure to use the -cpp option on the ghci commandline. The error message isn't terribly helpful in this regard, since it complains about being unable to find a module that wasn't wanted anyway. It might be more useful to complain that a cpp # directive was found?
Aha! GHCi (and ghc --make) has a pre-pass that looks through the file for import declarations so it can build the dependency tree, and it does this without using a proper Haskell parser. I'll bet it's ignoring the CPP directives. Probably it should flag an error, I'll look into it. Cheers, Simon