"Philip Weaver" <[EMAIL PROTECTED]> wrote:
> I'm trying to use CPP-defined strings in a Haskell module, like this:
> main :: IO ()
> main = putStrLn FOO
> This of course will not work:
> ghc -DFOO="hello world" --make Main.hs -o test
Have you tried using ANSI cpp's stringification operator?
{-# LANGUAGE CPP #-}
#define STRING(bar) #bar
main :: IO ()
main = putStrLn FOO
ghc -DFOO="STRING(hello world)" --make Main.hs -o test
Regards,
Malcolm
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe