cvs commit: fptools/ghc/compiler/deSugar DsCCall.lhs
Simon Marlow
simonmar@glass.cse.ogi.edu
Tue, 16 Oct 2001 03:01:13 -0700
simonmar 2001/10/16 03:01:13 PDT
Modified files:
ghc/compiler/deSugar DsCCall.lhs
Log:
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.
Revision Changes Path
1.57 +28 -5 fptools/ghc/compiler/deSugar/DsCCall.lhs