
Simon, I've created a small standalone test case here: https://gist.github.com/tibbe/5321268 Usage: Download the Main.hs and Test.hs files into the same directory: https://gist.github.com/tibbe/5321268/raw/68537a79865209d7218429b916a7ab1cce... https://gist.github.com/tibbe/5321268/raw/f9cce61b35b3349eeeac622a4c27c1dd5e... Compile and run: ghc Main.hs ./Main Expected output: Loading Test.hs ... ["Test.mysum","Data.List.foldl'","GHC.Num.+"] Actual output: Loading Test.hs ... [".mysum","Data.List.foldl'","GHC.Num.+"] Note how the locally defined and exported function mysum lacks a module name. The code that creates a string from the Name is on line 59 in Main.hs: nameToString name = (maybe "" (moduleNameString . moduleName) . nameModule_maybe $ name) ++ "." ++ getOccString name The module name is missing in the output because nameModule_maybe returns Nothing for the mysum Name. -- Johan