Skip to content
  • Simon Marlow's avatar
    [project @ 2001-10-16 10:01:13 by simonmar] · 43d343ab
    Simon Marlow authored
    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.
    43d343ab