lilypond-devel
[Top][All Lists]
Advanced

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

Re: [frogs] T1224: Avoid using deprecated %module-public-interface in gu


From: Han-Wen Nienhuys
Subject: Re: [frogs] T1224: Avoid using deprecated %module-public-interface in guile initialisation. (issue1160044)
Date: Sun, 29 Aug 2010 23:31:34 -0300

On Sat, Aug 28, 2010 at 4:16 PM, Ian Hulin <address@hidden> wrote:
> (define (make-music-type-predicate . music-types)
>  (define ((make-music-type-predicate-aux mtypes) expr)
>    (if (null? mtypes)
>        #f
>        (or (eqv? (car mtypes) (ly:music-property expr 'name))
>            ((make-music-type-predicate-aux (cdr mtypes)) expr))))
>  (make-music-type-predicate-aux music-types))
>
> I'm a bit puzzled by this code.  Even if we move the nested definition
> out from within make-music-predicate, how does it work?  Variable
> make-music-type-predicate is not declared anywhere else, and yet here we
> appear to ask guile to resolve and call it before it is declared and
> bound to anything?

are you sure? I only see calls to the -aux helper.

> Trying this in guile V1.8.7 repl with a dummy for ly:music-property and
> it will work as written, but in V1.9.11 it always fails with
> ERROR: in procedure macro-expand:
> ERROR: source expression failed to match any pattern in (define
> ((make-music-type-predicate-aux mtypes) expr)  (if (null? mtypes) #f (or
> (eqv? (car mtypes) (ly:music-property expr 'name))
> ((make-music-type-predicate-aux (cdr mtypes)) expr))))
>
> V1.9.11 throws the error whether or not the repl is called with
> - --no-auto-compile.  It also doesn't help to try and un-nest the inner
> (define and declare it at top-level.

Where is the latest version of this patch?  I downloaded a version
from rietveld which required the following patch to get to
display-lily.scm

commit 57992da984aaf16d6161dc44e5d9f7cb290ac813
Author: Han-Wen Nienhuys <address@hidden>
Date:   Sun Aug 29 23:30:55 2010 -0300

    Remove stray dots.

diff --git a/scm/lily.scm b/scm/lily.scm
index 0aa2ad4..f898962 100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -213,9 +213,9 @@ messages into errors.")
   format)

 (define (simple-format-handler dest . rest)
-    (if (string? dest)
-        (apply fancy-format (cons #f (cons dest . rest)))
-        (apply fancy-format (cons dest . rest))))
+  (if (string? dest)
+      (apply fancy-format (cons #f (cons dest rest)))
+      (apply fancy-format (cons dest rest))))

> Patrick and Neil, do I have to fix all the compatibility problems in all
> the scm files loaded by lily.scm in order to push what we have so far?

As long as the compile for 1.8 keeps working, I don't think it's a
problem incrementally tackling 1.9  compatibility problems.


-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen



reply via email to

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