
29 Jul
2008
29 Jul
'08
1:02 p.m.
On Tue, Jul 29, 2008 at 3:14 AM, Malcolm Wallace < Malcolm.Wallace@cs.york.ac.uk> wrote:
"Philip Weaver"
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
Yes, I have. It does not seem to be supported.
Regards, Malcolm _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe