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.
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 toscheme?
, 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.