[Haskell-cafe] TH to generate imports?

Corentin Dupont corentin.dupont at gmail.com
Thu Jun 11 09:12:28 UTC 2015

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150611/de9e80da/attachment.html>

More information about the Haskell-Cafe mailing list