Re: [Haskell-cafe] How to #include into .lhs files?

4 Feb
2011
4 Feb
'11
3:20 a.m.
On 4 February 2011 05:03, Michael Snoyman
My guess (a complete guess) is that the deliterate step is creating a temporary .hs file elsewhere on your filesystem, which is why the CPP step can't find B.hs without a fully-qualified path.
That is what is happening (you can confirm with "ghc -v"). Interestingly, you can work around by compiling with -I. on the command line: {{{ mbolingbroke@equinox ~/Junk/lhscpp $ cat Test.lhs Included.h
{-# LANGUAGE CPP #-} module Main (main) where
#include "MachDeps.h" #include "Included.h"
main :: IO () main = print MY_CONSTANT #define MY_CONSTANT 2 mbolingbroke@equinox ~/Junk/lhscpp $ ./Test 2 }}}
Perhaps worth filing a bug report? Cheers Max
5219
Age (days ago)
5219
Last active (days ago)
0 comments
1 participants
participants (1)
-
Max Bolingbroke