[cvs-nhc98] patch applied (hat): (1) An earlier change introduced a wrapper function allowing

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Oct 10 07:00:09 EDT 2006


Wed Nov 22 08:49:00 PST 2000  malcolm
  * (1) An earlier change introduced a wrapper function allowing
      'foreign import's always to have a pure (non-I/O) type.
      We now do the same thing for 'foreign export's, creating a wrapper
      that uses 'unsafePerformIO'.  (FFITrans.hs)
  (2) So the generation of the C-code for foreign imports and exports can
      be simplified substantially now.  (Foreign.hs)
  (3) We also take this opportunity to reverse the earlier decision to
      handle tupled result types in the compiler.  Simply treat them
      like any other non-primitive type - i.e. pass it as a single heap
      value.  (Tools like GreenCard can do some extra work here if needed.)
  (4) Improve the printing of type names in reports about foreign calls.

    M ./src/compiler98/FFITrans.hs -5 +35
    M ./src/compiler98/Foreign.hs -81 +125
    M ./src/compiler98/TokenId.hs +3
    M ./src/compiler98/TokenInt.hs -1 +2


More information about the Cvs-nhc98 mailing list