lilypond-devel
[Top][All Lists]
Advanced

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

Re: Add `ly:undead?' to predicate list. (issue 93660047)


From: markpolesky
Subject: Re: Add `ly:undead?' to predicate list. (issue 93660047)
Date: Sun, 01 Jun 2014 18:09:11 +0000

Reviewers: dak,

Message:
On 2014/06/01 15:10:59, dak wrote:
scm/lily.scm:728: (,ly:undead? . "undead object")
Probably more like an "undead container" as the undead thing (to
survive between
sessions) is placed inside.

Won't be helpful information to somebody reading the manual which is
the reason
I'm somewhat unenthusiastic including it.  On the other hand, there
are lots of
predicates sharing that deficiency.

I never thought that the tiny predicate docstrings in
lily.scm were so much about documentation; we have
docstrings in lily/*.cc for that (IR 4: "Scheme functions")
-- and those descriptions can be longer if needed for
clarity.

I thought that the docstrings in lily.scm are primarily
there for error reporting:
"wrong type for argument ~a.  Expecting ~a, found ~s"

They have the added benefit of a little clarification in the
Notation appendix "Predefined type predicates", but I
wouldn't want the error reporting to be too wordy.

In either case, if my pretty-print patch goes through, then
the lilypond-exported-predicates alist will also be used to
define (ly-type? x).  I don't know if an undead container
would ever be the default value of some grob property in the
future, but if it were, I wouldn't want it mistakenly
prepended with a single-quote in the IR, which is what could
happen with my other patch if we leave any predicates off of
the list.

- Mark

Description:
Add `ly:undead?' to predicate list.

Please review this at https://codereview.appspot.com/93660047/

Affected files (+1, -0 lines):
  M scm/lily.scm


Index: scm/lily.scm
diff --git a/scm/lily.scm b/scm/lily.scm
index 5d230d8f7eb9eef7439af897fe2d6418b1a81e46..44f9f62258342c89fde8066b844b1596d94b7709 100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -725,6 +725,7 @@ messages into errors.")
     (,ly:stream-event? . "stream event")
     (,ly:translator? . "translator")
     (,ly:translator-group? . "translator group")
+    (,ly:undead? . "undead container")
     (,ly:unpure-pure-container? . "unpure/pure container")
     ))






reply via email to

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