;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
-;;;; Copyright (C) 1998--2009 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Copyright (C) 1998--2010 Jan Nieuwenhuizen <janneke@gnu.org>
;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
(type-name (match-predicate obj type-p-name-alist)))
(define-public (type-name predicate)
- (assoc-get predicate type-p-name-alist "unknown"))
+ (let ((entry (assoc predicate type-p-name-alist)))
+ (if (pair? entry) (cdr entry)
+ (string-trim-right
+ (symbol->string (procedure-name predicate))
+ #\?))))