On Tue, Jul 29, 2008 at 3:14 AM, Malcolm Wallace <
[EMAIL PROTECTED]> wrote:
> "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
>
Yes, I have. It does not seem to be supported.
> Regards,
> Malcolm
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe