chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] functor support


From: megane
Subject: Re: [Chicken-hackers] functor support
Date: Sun, 09 Sep 2018 08:59:59 +0300
User-agent: mu4e 1.0; emacs 25.1.1

Hi Jörg,

Jörg F. Wittenberger <address@hidden> writes:

> Hi Chickeneers,
>
> attached is a test trying to package the functor example from the
> documentation as an egg.  This is no good except to showcase some issues.
>
> 1. "include" should be expanded.  (I reported this before, now here is
> the simple example.)

I'm pretty sure this is not the way functors work. The functor body is
not walked at definition time at all. You can check this by putting
(begin-for-syntax (display "here")) in the functor definition, or just
put some invalid code like () or module definition (should cause inner
module warning.) Functors are more like templates.

If you want to have the functor definition in a different file you can
expand the functor with a macro and splice in the other file's contents
there.

>
> 2. Line numbers for errors refer to an unexpected location: all blame
> is assigned to the instatiation line.  (This is rather annoying for me.)
>

This would indeed be helpful. I have no idea how much work it would be
to implement this.

Regards,




reply via email to

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