cvs commit: fptools/ghc/compiler/deSugar DsCCall.lhs

Julian Seward sewardj@glass.cse.ogi.edu
Thu, 18 Oct 2001 03:06:11 -0700


sewardj     2001/10/18 03:06:11 PDT

  Modified files:        (Branch: ghc-5-02-branch)
    ghc/compiler/deSugar DsCCall.lhs 
  Log:
  merge rev 1.57:
  
    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.55.2.2  +28 -5     fptools/ghc/compiler/deSugar/DsCCall.lhs