Why do Names defined in the current module lack a module name?

Johan Tibell johan.tibell at gmail.com
Thu Mar 28 21:34:42 CET 2013


Hi,

I'm writing an app that uses the GHC API to extract names from modules.
I've written a little AST traversal that finds all Names in the
type-checked AST and writes them to a file. I noticed that every Name
defined in the current module (i.e. Names generated for top-level function
definitions) lack a module name i.e. nameModule_maybe return Nothing. Why
is this? Should I just assume that every time nameModule_maybe return
Nothing the module name is in fact the name of the current module being
compiled?

-- Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130328/0d493615/attachment.htm>


More information about the ghc-devs mailing list