#include "program-option.hh"
#include "profile.hh"
#include "simple-closure.hh"
+#include "unpure-pure-container.hh"
#include "warn.hh"
#include "protected-scm.hh"
{
if (!ly_is_procedure (v)
&& !is_simple_closure (v)
+ && !is_unpure_pure_container (v)
&& v != ly_symbol2scm ("calculation-in-progress"))
type_check_assignment (sym, v, ly_symbol2scm ("backend-type?"));
if (do_internal_type_checking_global && scm_is_pair (handle))
{
SCM val = scm_cdr (handle);
- if (!ly_is_procedure (val) && !is_simple_closure (val))
+ if (!ly_is_procedure (val) && !is_simple_closure (val) && !is_unpure_pure_container (val))
type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"));
check_interfaces_for_property (this, sym);
#ifndef NDEBUG
if (val == ly_symbol2scm ("calculation-in-progress"))
{
- programming_error (_f ("cyclic dependency: calculation-in-progress encountered for #'%s (%s)",
- ly_symbol2string (sym).c_str (),
- name ().c_str ()));
+ programming_error (to_string ("cyclic dependency: calculation-in-progress encountered for #'%s (%s)",
+ ly_symbol2string (sym).c_str (),
+ name ().c_str ()));
if (debug_property_callbacks)
{
message ("backtrace: ");
}
#endif
+ if (is_unpure_pure_container (val))
+ val = unpure_pure_container_unpure_part (val);
if (ly_is_procedure (val)
|| is_simple_closure (val))
{
Grob::internal_get_pure_property (SCM sym, int start, int end) const
{
SCM val = internal_get_property_data (sym);
- if (ly_is_procedure (val))
+ if (ly_is_procedure (val) || is_unpure_pure_container (val))
return call_pure_function (val, scm_list_1 (self_scm ()), start, end);
if (is_simple_closure (val))
return evaluate_with_simple_closure (self_scm (),
{
SCM val = scm_cdr (s);
if (ly_is_procedure (val)
- || is_simple_closure (val))
+ || is_simple_closure (val)
+ || is_unpure_pure_container (val))
{
Grob *me = ((Grob *)this);
val = me->try_callback_on_alist (&me->object_alist_, sym, val);