chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH][5] Some FFI improvements


From: lemonboy
Subject: Re: [Chicken-hackers] [PATCH][5] Some FFI improvements
Date: Wed, 31 May 2017 23:12:58 +0200

Hello folks,
I've just discovered some nasty regressions caused by the second patch
so please hold on before applying it;
I'm also withdrawing the third patch as I've managed to get the
scrutinizer to infer the correct types for the ffi
stubs with just a minimal amount of changes, I need to test this a bit
more as it's still a bit rough around the edges.
Thanks for your patience and sorry for the noise,
Lemonboy

On 28 May 2017 at 23:29, lemonboy <address@hidden> wrote:
> Hello hackers,
> I'll be brief:
> - The first patch fixes a problem where we'd fail to consider the
> internal defines as toplevel ones,
>  leading to a compiler error.
> - The second patch complements the first by rejecting more `define-`
> forms in non-toplevel contexts.
> - The third one is slightly beefier as it prevents us to apply the
> wrong specialization in some cases
>  like in the following snippet.
>
> ```
> (import foreign)
> (define-foreign-type ty int (lambda (x) 42) (lambda (x) 0.5))
> (let ((t0 ((foreign-lambda* ty ((ty x)) "return 0;") 'sym)))
>   (print (min t0 1))) ;; We expect this to be 0.5 and not 1
> ```
>
> Cheers,
> Lemonboy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]