<div dir="ltr"><a href="https://ghc.haskell.org/trac/ghc/ticket/1475">https://ghc.haskell.org/trac/ghc/ticket/1475</a><br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 11, 2015 at 11:12 AM, Corentin Dupont <span dir="ltr"><<a href="mailto:corentin.dupont@gmail.com" target="_blank">corentin.dupont@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi guys,<br></div>I wanted to know if it's possible to use TH on an "import" statement.<br></div>What I want to do is to generate the names of the packages I need to import.<br></div>For example:<br><br></div><span style="font-family:monospace,monospace">import $(genImport "MyPackage")<br><br>genImport :: String -> Q TH.Exp<br>genImport s = ...<br><br></span><br></div>Is that possible?<br></div>Thanks!<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Corentin<br></font></span></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>