I think some relevant info is there: https://www.gnu.org/software/guile/manual/html_node/Eval-When.html#Eval-When
max > On 16 Jun 2016, at 23:54, Karl Hegbloom <karl.hegbl...@gmail.com> wrote: > > I think the Guile manual talks about it. I'll build the PDF of it and put it > in my guile mirror's releases area after a few minutes here. There's an html > version online. > > > On Thu, Jun 16, 2016, 07:21 Massimiliano Gubinelli <m.gubine...@gmail.com > <mailto:m.gubine...@gmail.com>> wrote: > Hi, > >> On 16 Jun 2016, at 14:41, Darcy Shen <sad...@zoho.com >> <mailto:sad...@zoho.com>> wrote: >> >> >> I have migrated some existing statements that are not liked by Guile-2 >> >> item 1. conditional define >> (if (condition) (define a ...) (define a ...)) (define a (if >> (condition) body1 body2)) > > note that semantics is not preserved: you do at runtime a check which should > be performed only once at compile/definition-time. It is not clear that this > is a wise choice. I would like to understand how to do conditional > compilation in Guile-2 this is part of the matter. I remember having found > something to specify that some form has to be evaluated by the compiler at > compile time but I do not remember exactly right now. Anyway this change > seems a bit odd…. > >> item 2. curried define >> >> (define ((x a) b c) (display a) (display b) (display c)) >> (define (x a) (lambda (b c) (display a) (display b) >> (display c))) >> >> and use cond-expand for backward compatibility >> >> Still don't know what's going wrong. I will try to extract the wrong pattern. >> >> Since it works in init-texmacs.scm but does not work in a module, I guess >> that the problem is related to Guile's Module System. >> >> >> ---- On Thu, 16 Jun 2016 06:46:51 +0800 Massimiliano Gubinelli >> <m.gubine...@gmail.com <mailto:m.gubine...@gmail.com>> wrote ---- >> Hi, >> >> On 15 Jun 2016, at 17:07, Darcy Shen <sad...@zoho.com >> <mailto:sad...@zoho.com>> wrote: >> >> The problem is that after making tm-define.scm compile I can `tm-define` >> something in `init-texmacs.scm` and it compiles and works. But in the module >> `tm-preferences.scm`, it will cause a compile error where I use `tm-define`. >> >> >> do you know what is going wrong? If I remember correctly my attempts to >> Guile-2 there were statements which were mixing compile-time and run-time >> evaluations (like for example conditional definitions) and they were not >> liked by Guile-2. >> >> Max >> >> _______________________________________________ >> Texmacs-dev mailing list >> Texmacs-dev@gnu.org <mailto:Texmacs-dev@gnu.org> >> https://lists.gnu.org/mailman/listinfo/texmacs-dev >> <https://lists.gnu.org/mailman/listinfo/texmacs-dev> >> >> >> _______________________________________________ >> Texmacs-dev mailing list >> Texmacs-dev@gnu.org <mailto:Texmacs-dev@gnu.org> >> https://lists.gnu.org/mailman/listinfo/texmacs-dev >> <https://lists.gnu.org/mailman/listinfo/texmacs-dev> > _______________________________________________ > Texmacs-dev mailing list > Texmacs-dev@gnu.org <mailto:Texmacs-dev@gnu.org> > https://lists.gnu.org/mailman/listinfo/texmacs-dev > <https://lists.gnu.org/mailman/listinfo/texmacs-dev> > _______________________________________________ > Texmacs-dev mailing list > Texmacs-dev@gnu.org > https://lists.gnu.org/mailman/listinfo/texmacs-dev
_______________________________________________ Texmacs-dev mailing list Texmacs-dev@gnu.org https://lists.gnu.org/mailman/listinfo/texmacs-dev