<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Jul 29, 2008 at 3:14 AM, Malcolm Wallace <span dir="ltr">&lt;<a href="mailto:Malcolm.Wallace@cs.york.ac.uk">Malcolm.Wallace@cs.york.ac.uk</a>&gt;</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">&quot;Philip Weaver&quot; &lt;<a href="mailto:philip.weaver@gmail.com">philip.weaver@gmail.com</a>&gt; wrote:<br>
<br>
&gt; I&#39;m trying to use CPP-defined strings in a Haskell module, like this:<br>
&gt; &nbsp; &nbsp;main :: IO ()<br>
&gt; &nbsp; &nbsp;main = putStrLn FOO<br>
&gt; This of course will not work:<br>
&gt; &nbsp; &nbsp;ghc -DFOO=&quot;hello world&quot; --make Main.hs -o test<br>
<br>
</div>Have you tried using ANSI cpp&#39;s stringification operator?<br>
<br>
 &nbsp; &nbsp;{-# LANGUAGE CPP #-}<br>
 &nbsp; &nbsp;#define STRING(bar) #bar<br>
<div class="Ih2E3d"> &nbsp; &nbsp;main :: IO ()<br>
 &nbsp; &nbsp;main = putStrLn FOO<br>
<br>
</div> &nbsp;ghc -DFOO=&quot;STRING(hello world)&quot; --make Main.hs -o test<br>
</blockquote><div><br>Yes, I have.&nbsp; 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>
 &nbsp; &nbsp;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>