ANN: C-Haskell 0.8.1

2001-02-11 Thread Manuel M. T. Chakravarty

I am pleased to announce the availability of version 0.8.1
of the interface generator C-Haskell.  It works with the
current stable release series 4.08.x of GHC as well as the
current development series 4.11.  For both versions of GHC,
it supports the *same* FFI library that GHC natively only
supports in the development version 4.11 and which
constitutes the result of the work of the FFI Task Force
over the last couple of months.  The interface specification
of the library is online available at

  http://www.cse.unsw.edu.au/~chak/haskell/c2hs/docu/c2hs-4.html

For more information on C-Haskell and for downloading, see

  http://www.cse.unsw.edu.au/~chak/haskell/c2hs/

The main feature in this release is the new FFI library.  It
should allow users of the GHC stable series to use the new
FFI library interface, which we hope to keep stable from now
on.  An update of the C-Haskell tool proper is being worked
at.

Happy Hacking,
Manuel

___
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi



Typing f.e.d.

2001-02-11 Thread Sven Panne

I have a small change request regarding foreign export dynamic.
Currently the FFI doc says:

   topdecl 
   : ...
   ..
   | 'foreign' 'export' [callconv] 'dynamic' varid :: prim_type - IO Addr

GHC additionally allows:

   prim_type - IO Ptr

As usual the FFI "looks through" newtypes.  But now that we have
FunPtr, the following typing makes much more sense:

   'foreign' 'export' [callconv] 'dynamic' varid :: prim_type - IO (FunPtr prim_type)

where both prim_types have to be the *same*. We should probably allow
the old Addr-typing as well for some time to facilitate the transition,
but not the Ptr-typing (bleeding edge people will know what to do :-).
The corresponding changes to GHC look easy, so I'd like to commit this
if there are no objections.

Furthermore, the FFI docs still talk about Addr only, not Ptr/FunPtr.
Now that Addr is deprecated, this should be changed, too.

Cheers,
   Sven

___
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi



Re: Typing f.e.d.

2001-02-11 Thread Manuel M. T. Chakravarty

Sven Panne [EMAIL PROTECTED] wrote,

 I have a small change request regarding foreign export dynamic.
 Currently the FFI doc says:
 
topdecl 
: ...
..
| 'foreign' 'export' [callconv] 'dynamic' varid :: prim_type - IO Addr
 
 GHC additionally allows:
 
prim_type - IO Ptr
 
 As usual the FFI "looks through" newtypes.  But now that we have
 FunPtr, the following typing makes much more sense:
 
'foreign' 'export' [callconv] 'dynamic' varid :: prim_type - IO (FunPtr 
prim_type)
 
 where both prim_types have to be the *same*. We should probably allow
 the old Addr-typing as well for some time to facilitate the transition,
 but not the Ptr-typing (bleeding edge people will know what to do :-).
 The corresponding changes to GHC look easy, so I'd like to commit this
 if there are no objections.
 
 Furthermore, the FFI docs still talk about Addr only, not Ptr/FunPtr.
 Now that Addr is deprecated, this should be changed, too.

Yes, Addr is dead.  So, allowing Addr in f.e.d., or anywhere
else for that matter, can only be for reasons of temporary
backward compatibility.

Cheers,
Manuel

___
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi