https://ghc.haskell.org/trac/ghc/ticket/1475


On Thu, Jun 11, 2015 at 11:12 AM, Corentin Dupont <corentin.dupont@gmail.com> wrote:
Hi guys,
I wanted to know if it's possible to use TH on an "import" statement.
What I want to do is to generate the names of the packages I need to import.
For example:

import $(genImport "MyPackage")

genImport :: String -> Q TH.Exp
genImport s = ...


Is that possible?
Thanks!
Corentin

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe