Skip to content
  • Simon Peyton Jones's avatar
    [project @ 2001-05-22 13:43:14 by simonpj] · f16228e4
    Simon Peyton Jones authored
    -------------------------------------------
    	Towards generalising 'foreign' declarations
    	-------------------------------------------
    
    This is a first step towards generalising 'foreign' declarations to
    handle langauges other than C.  Quite a lot of files are touched,
    but nothing has really changed.  Everything should work exactly as
    before.
    
    	But please be on your guard for ccall-related bugs.
    
    Main things
    
    Basic data types: ForeignCall.lhs
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    * Remove absCSyn/CallConv.lhs
    
    * Add prelude/ForeignCall.lhs.  This defines the ForeignCall
      type and its variants
    
    * Define ForeignCall.Safety to say whether a call is unsafe
      or not (was just a boolean).  Lots of consequential chuffing.
    
    * Remove all CCall stuff from PrimOp, and put it in ForeignCall
    
    
    Take CCallOp out of the PrimOp type (where it was always a glitch)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    * Add IdInfo.FCallId variant to the type IdInfo.GlobalIdDetails,
    	along with predicates Id.isFCallId, Id.isFCallId_maybe
    
    * Add StgSyn.StgOp, to sum PrimOp with FCallOp, because it
      *is* useful to sum them together in Stg and AbsC land.  If
      nothing else, it minimises changes.
    
    
    Also generally rename "CCall" stuff to "FCall" where it's generic
    to all foreign calls.
    f16228e4