On Fri, May 22, 2020 at 05:35:04PM -0400, Sam Tobin-Hochstadt wrote:
> The problem is almost certainly that `Any` is not allowed in
> `Ffi-type`. What's the definition of `Ffi-type`,
Casting rettype to Any did not help; adding Any in as one of the options
in ffi-type did let it go through.
It's completely obscure to me why inserting Any as an additional
alternative in Ffi-type works.
But I don't *want* Any to be a valid alternative for Ffi-type anywhere
else in the program. It will let too much through. I'm adding types to
existing untyped code in an attempt to get some understanding of its
data structures, and using Any here would not teach me anything.
I suppose I could cast rettype to a union Ffi-type and Any in situ.
Ugly.
and why does `params`
> have a type that involves `Any`?
Because it has a lot af possiilities and I haven't yet gotten to
figuring out what's really needed.
I think there's a need to embed untyped expressions in a typed program,
just as there's a mechanism to do the reverse.
-- hendrik
>
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BZah-zmPNKX%3DyttQoQFs7pY9PHc8hYGzkTeKm35YU3MLg%40mail.gmail.com.