<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Jul 29, 2008 at 3:14 AM, Malcolm Wallace <span dir="ltr"><<a href="mailto:Malcolm.Wallace@cs.york.ac.uk">Malcolm.Wallace@cs.york.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">"Philip Weaver" <<a href="mailto:philip.weaver@gmail.com">philip.weaver@gmail.com</a>> wrote:<br>
<br>
> I'm trying to use CPP-defined strings in a Haskell module, like this:<br>
> main :: IO ()<br>
> main = putStrLn FOO<br>
> This of course will not work:<br>
> ghc -DFOO="hello world" --make Main.hs -o test<br>
<br>
</div>Have you tried using ANSI cpp's stringification operator?<br>
<br>
{-# LANGUAGE CPP #-}<br>
#define STRING(bar) #bar<br>
<div class="Ih2E3d"> main :: IO ()<br>
main = putStrLn FOO<br>
<br>
</div> ghc -DFOO="STRING(hello world)" --make Main.hs -o test<br>
</blockquote><div><br>Yes, I have. It does not seem to be supported.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Regards,<br>
Malcolm<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>