Changes between Version 5 and Version 6 of ObjectiveC/ForeignDeclarations


Ignore:
Timestamp:
Apr 21, 2012 10:06:14 PM (3 years ago)
Author:
amarqueslee
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ObjectiveC/ForeignDeclarations

    v5 v6  
    3030 * Export a set of Haskell functions (pertaining to a certain datatype) as a class: 
    3131{{{ 
    32 foreign export class objc tycon <list of initializer> <list of method> 
     32foreign export class objc tycon "<superclass>" <list of initializer> <list of method> 
    3333}}} 
    3434 The Haskell-defined `tycon` would be type-constrained to have certain properties (yet to be specified). `initializer`s are used to provide constructors of the form 
     
    3838 and `method`s look like 
    3939{{{ 
    40 tycon -> ... -> IO (tycon, b) 
     40 ObjCPtr super -> tycon -> ... -> IO (tycon, b) 
    4141}}} 
    42  To begin with, exported classes could just be subclasses of `NSObject`, with no way to call `super` methods. 
     42 This approach would pull in `superclass` as a side-effect, and client code could work with it, for now pretending it's some unrelated class. This should give method implementations an Objective-C feel. 
    4343 * Export of a method implementation: 
    4444{{{