This is everything you need for it to work ... and some things you don't need.
Conflicts with that patch that tried to use unsafeCoerce.
I changed the Info item of type FfiExport to be of type
(FfiExport,([ExtType],ExtType)). This can probably be cleaned up
somehow. I also don't think that the 'x' and 'X' tags in Grin names
should be needed, but I'm not sure how to get rid of them.
FromGrin2.convertFunc uses the type info to generate a function of the
appropriate type by making new variables for the arguments and
assigning the values of those to the old variables. (Which for some
reason magically get declared now.) For the return type, it just hopes
for the best right now...
Mon Jul 2 20:47:22 EDT 2007 Samuel Bronson
* Add foreign import "dynamic" support
Fri Jul 6 12:11:13 EDT 2007 Samuel Bronson
* Remove E/FromHs.hs~ from repo
Fri Jul 6 18:56:11 EDT 2007 Samuel Bronson
* Get pure foreign exports through E... Grin forgets them though
Sat Jul 7 14:19:32 EDT 2007 Samuel Bronson
* Get foreign exports through Grin, yay!
Sat Jul 7 14:19:50 EDT 2007 Samuel Bronson
* Make "make ghci" an alias for "make i"
Sat Jul 7 16:11:43 EDT 2007 Samuel Bronson
* Add unsafePerformIO to wired-in functions
Sat Jul 7 16:43:26 EDT 2007 Samuel Bronson
* Implement foreign exports returning IO () (clumsily)
Sat Jul 7 16:47:23 EDT 2007 Samuel Bronson
* tag things to make Grin happyier about my 'c' functions. I don't really understand this, which is why I made a seperate patch...
Sun Jul 8 00:24:26 EDT 2007 Samuel Bronson
* FFI test case: exercises import, export, and import dynamic
Mon Jul 9 19:38:11 EDT 2007 Samuel Bronson
* Yay! "foreign export", really working!