Skip to content

Support type checks for options #108

@uliska

Description

@uliska

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions