[Haskell-cafe] getting exported original names using the GHC API

Pasqualino "Titto" Assini tittoassini at gmail.com
Thu Jul 4 19:11:38 CEST 2013

Say that I have a module like:

module Test(L.find) where

import Data.List as L

Using the GHC API, I extract the module exports (using GHC.modInfoExports)
and I get a list of names.

Now, I want to get the name of the export with the namespace stated in the
source ("L.find")  but I seem to be able to get it only as "Data.List.find".

I have tried different variations of functions on Name or OccName but
nothing seems to work.

Obviously, I could just parse the module and get the info that way, but I
wondered if it could be done via the API.



Dr. Pasqualino "Titto" Assini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130704/4aee53c1/attachment.htm>

More information about the Haskell-Cafe mailing list