[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: music-function type-check options
From: |
Neil Puttock |
Subject: |
Re: music-function type-check options |
Date: |
Sun, 16 Aug 2009 22:36:39 +0100 |
2009/8/16 Mark Polesky <address@hidden>:
> I didn't really ask anything in the previous post. What I
> meant to ask was: Are there any predicates here that I
> *shouldn't* add to the alist? Any objections to including
> all the "C++ predicates"? If no one objects, I'll make a
> patch that includes everything.
Might I suggest an alternative approach, which will work with any predicate?
Since the real issue is the vagueness of `unknown', why not tweak
`type-name' so it will instead return the name of the predicate if
there's no match in type-p-name-alist? This also has the added
benefit of producing useful information with user-defined predicates.
(define-public (type-name predicate)
(let ((entry (assoc predicate type-p-name-alist)))
(if (pair? entry) (cdr entry)
(symbol->string (procedure-name predicate)))))
Regards,
Neil