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 ->
> 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
> 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
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
> 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
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
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
> 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
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
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
10 matches
Mail list logo