If you use the ParsedSource representation, http://www.haskell.org/ghc/docs/latest/html/libraries/ghc-7.6.3/HsSyn.html#t:HsModule, the LIE entry still has a RdrName which is represented as
(IEVar (Qual {ModuleName: L} {OccName: find})))]) On Thu, Jul 4, 2013 at 7:11 PM, Pasqualino "Titto" Assini < tittoass...@gmail.com> wrote: > 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. > > Thanks, > > titto > > -- > Dr. Pasqualino "Titto" Assini > http://quid2.org/ > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe