John Cowan <co...@mercury.ccil.org> writes:

> Thanks, that's helpful.  The trouble is that such a file is an internal
> (not publicly documented, unstable) format.  So if I want to ship portable
> code along with type information for Chicken, I have to:
>
> 1) insert the type declarations in the code
>
> 2) compile with the -emit-type-file option
>
> 3) strip out the declarations again
>
> 4) hope the .types file continues to work with new compiler releases

Wait, what? Why not just something like this:

  (cond-expand
    (chicken
      (include "chicken-type-decls.scm"))
    (else))


> That's really intolerable.  I suppose if I confine myself to : and
> define-type, then I could ship my code along with macros that turn them
> into (begin).

FTR, there is the type-stubs egg which defines those macros and some
more. It's purpose is to make code compatible with CHICKENS that didn't
yet have the type syntax but could be used for portability purposes,
too.

Moritz

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to