On 13/12/13 23:28, Roman Cheplyaka wrote:
> String is defined in GHC.Base,
but GHC.Base is an internal (not exposed)
> module of the base package; that's why there's no
documentation for it.
Right.
> Instead of asking where the
thing is defined, you should be asking where
> it's exported from. In this case, String is re-exported from
Prelude.
To do this will I have to dig into the GHC API?
Perhaps I could extract the imports from a file, then use
parseImportDecl to parse them, and then do interactive imports,
using
IIDecl (ImportDecl RdrName)
Bring the exports of a particular module (filtered by an import
decl) into scope
until the name appears in scope, checking with getNamesInScope?
I haven't used the GHC API before so I may be barking up the wrong
tree.
Thanks,
--
Carlo Hamalainen
http://carlo-hamalainen.net