Next: , Up: Feature Tracking


33.9.1 Feature Manipulation

To check whether a particular feature is available, use the provided? procedure:

— Scheme Procedure: provided? feature
— Scheme Procedure: feature? feature

Return #t iff FEATURE is available to this Guile interpreter. In SLIB, provided? also checks to see if the module is available. We should do that too, but don't.

To advertise a feature from your own Scheme code, you can use the provide procedure:

— Scheme Procedure: provide sym

Add sym to the list of available features in this Guile process.

For C code, the equivalent function takes its feature name as a char * argument for convenience:

— C Function: void scm_add_feature (const char *str)

Add a symbol with name str to the list of available features in this Guile process.