openlilylib / snippets

A place to store useful pieces of LilyPond code - custom functions, engravers, hacks, templates, examples etc.
Other
120 stars 38 forks source link

Support type checks for options #108

Closed uliska closed 8 years ago

uliska commented 9 years ago

Currently the options that are stored in the a-tree leaves can be of any Scheme type. However, it would be very good if \registerOption could get an optional argument to pass a predicate to the option. This would default to scheme?, so by default any value can be passed to \setOption. But if the module considers the type of an option relevant it can add a predicate that \setOption checks the value against.

I think this would require storing pairs (predicate . default-value) instead of simple values, but I have to think about the implications for children of that node.

uliska commented 9 years ago

68 is related to this issue, although I can't see exactly why ATM

uliska commented 8 years ago

This is obsolete as everything is in the new oll-core infrastructure