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

Simon Peyton-Jones simonpj at microsoft.com
Thu Apr 4 10:44:08 CEST 2013


|  I understand that. I think it's unrelated to my problem however.
|  moduleName_maybe, the function that's supposed to give me the module
|  of a Name returns Nothing for all locally defined names. My guess is
|  that these Names aren't made fully qualified until some later stage.

I think there is a danger of speaking at cross purposes here.  

In the example I sent, you can see that the module name is printed, in the output of the renamer, typechecker, and desugarer.  (You need -dppr-debug to see this in the -ddump-tc output, for reasons I mentioned; perhaps that should be changed.)

I  would be very surprised if nameModule_maybe returned Nothing for a Name that printed with its module name.  Yet it appears that you are saying that
	a Name that prints with its module name with -ddump-ds or -ddump-tc
	replies to nameModule_maybe with Nothing
I don't understand that. 
	
I suppose that the only way to do so is for Johan to send a reproducible test case; or perhaps I have misunderstood the question.

Simon



More information about the ghc-devs mailing list