Does this help
http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/NameType

Something that starts top-level may not finish up as top-level.  Nested 
bindings are never qualified.

After TidyPgm, externally-visible names (to the linker) are qualified, ones 
local to the .o file are not.

Does it matter?

Simon

From: [email protected] [mailto:[email protected]] On 
Behalf Of Johan Tibell
Sent: 28 March 2013 20:35
To: [email protected]
Subject: Why do Names defined in the current module lack a module name?

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

_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to