[project @ 2001-10-16 10:01:13 by simonmar]
authorsimonmar <unknown>
Tue, 16 Oct 2001 10:01:13 +0000 (10:01 +0000)
committersimonmar <unknown>
Tue, 16 Oct 2001 10:01:13 +0000 (10:01 +0000)
commit43d343abeb4cb764d2550832c2a4fafa4919041d
treea0d848b84f66b79a70e14772b027fa69497e7725
parent5e65c9fef4d73b3109ea9b1063f0e14850ae9af1
[project @ 2001-10-16 10:01:13 by simonmar]
Explicitly sign- or zero-extend the result of a ccall up to the word
size if necessary.  Recent discussion on
glasgow-haskell-users@haskell.org suggests that this is the
responsibility of the caller rather than the callee.

We do it by wrapping the result in narrow{8,16,32}{Int,Word}# as
appropriate, at desugaring time, because this way we only have to do
it once instead of once per backend.  Furthermore the narrowing is
exposed to the simplifier which is generally a good thing.
ghc/compiler/deSugar/DsCCall.lhs