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 ->

RE: Typing f.e.d.

2001-02-12 Thread Simon Marlow
> 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

RE: Typing f.e.d.

2001-02-12 Thread Alastair Reid
> 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. Please note that this temporary backward compatability happens to be an important part of most ffi code currently in existence (at least, all the c

Re: Typing f.e.d.

2001-02-12 Thread Sven Panne
Alastair Reid wrote: > [...] ps I have a feeling of feeping creaturism as I watch this list - > a nice simple design seems to be getting more complex. Could you elaborate on this? The basic FFI *is* still nice and simple IMHO. Mentioning plain Addr in it was a design mistake because: * Pointe

RE: Typing f.e.d.

2001-02-12 Thread Alastair Reid
> Alastair Reid wrote: > > [...] ps I have a feeling of feeping creaturism as I watch this list - > > a nice simple design seems to be getting more complex. > > Could you elaborate on this? The basic FFI *is* still nice and simple > IMHO. I'm thinking of: 1) Trying to support a complex language

Re: Typing f.e.d.

2001-02-12 Thread Marcin 'Qrczak' Kowalczyk
Mon, 12 Feb 2001 15:49:45 -0700, Alastair Reid <[EMAIL PROTECTED]> pisze: > 1) Trying to support a complex language like Java in the same design > (or in any design, really) Java support has no impact on C support: you can ignore it if you like. The design as is is quite language-independent (an

Re: Typing f.e.d.

2001-02-12 Thread Fergus Henderson
On 13-Feb-2001, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote: > Mon, 12 Feb 2001 15:49:45 -0700, Alastair Reid <[EMAIL PROTECTED]> pisze: > > >* Pointers to code and data need not have the same size. > > > > I understand this argument though I'm not sure which architectures > > this ap

RE: Typing f.e.d.

2001-02-13 Thread Simon Marlow
> What libraries is the evolving design being tried out on (I > know about your > OpenGL library). In GHC we have implementations of Directory, Time and CPUTime using the new FFI and hsc2hs. The new implementations should work on Hugs with only minor tweaks, given suitable implementations of th

RE: Typing f.e.d.

2001-02-13 Thread Simon Peyton-Jones
This looks plausible to me too --- but I agree with Alastair that we should not remove support for Addr, including in f.e.d. Backward compatibility is a pain, but lack of is a fast way to lose customers. Simon | -Original Message- | From: Sven Panne [mailto:[EMAIL PROTECTED]] | Sent: 11

RE: Typing f.e.d.

2001-02-22 Thread Simon Peyton-Jones
What became of this suggestion of Sven's? Did we adopt it? (While deprecating but not dropping Addr.) Simon | -Original Message- | From: Sven Panne [mailto:[EMAIL PROTECTED]] | Sent: 11 February 2001 16:01 | To: The Happy Bit Fiddlers | Subject: Typing f.e.d. | | | I have a small chan