[Glasgow-haskell-bugs] NCG name mangling

Simon Marlow fldrsimonmar at microsoft.com
Thu Oct 5 05:59:52 EDT 2000


> first time poster, long time listener :-) Possibly a known 
> one, but the
> NCG in 4.08.1 doesn't emit suitably decorated names when calling
> out to 'foreign import'ed functions that use the stdcall 
> calling convention,
> e.g.,
> 
> sof$ cat foo.hs
> module Foo { foreign import stdcall decorateMe :: IO () }
> sof$ ghc-4.08.1 -S -c foo.hs -fglasgow-exts
> sof$ grep 'call _decorate' foo.s
> 	call _decorateMe
> sof$ 
> 
> that should be 'call _decorateMe at 0'
> 
> The function to use to decorate stdcall names is 
> CallConv.decorateExtName.

As far as I can tell, CallConv.decorateExtName has never been called
(checked all the way back to 4.02).  Did this used to work at some point?

Cheers,
	Simon




More information about the Glasgow-haskell-bugs mailing list