<div dir="ltr"><div>Thanks!<br>So, at the moment it's not possible?<br></div><div>So is it possible instead to do:<br><span style="font-family:monospace,monospace"><br>$(genPackage "MyPackage")<br></span></div><div><span style="font-family:monospace,monospace">import MyPackage</span><br></div><div><br></div><div>The template Haskell expression would just create the Haskell package in a corresponding file, so we can import it.<br></div><div>Nothing would be spliced in.<br></div><div><br></div><div><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 11, 2015 at 11:45 AM, Adam Bergmark <span dir="ltr"><<a href="mailto:adam@bergmark.nl" target="_blank">adam@bergmark.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><a href="https://ghc.haskell.org/trac/ghc/ticket/1475" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/1475</a><br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">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></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5"><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><font color="#888888"><br></font></span></div><span><font color="#888888">Corentin<br></font></span></div>
<br></div></div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">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>
</blockquote></div><br></div></div>