An error message like
markup-def.ly:11:20: error: music function cannot return
(#<procedure line-markup (layout props args)> (Test))
is not really user-readable. At the price of some possible ambiguity,
using a LilyPond syntax form like
markup-def.ly:11:20: error: music function cannot return \markup \line { Test}
is quite preferable.
(if good
(ly:parser-error parser
(format #f (_ "~a function cannot return ~a")
- (type-name pred) m)
+ (type-name pred)
+ (value->lily-string m parser))
loc))
(and (pair? (car sig)) (cdar sig))))))