Document `ext:*module-provider-functions*`
ECL allows extending the mechanism for fetching modules requested with the function `REQUIRE` by pushing an appropriate hook to the variable `ext:*module-provider-functions*`. The function accepts a single element - a string designator.
For example, if one wanted to load a file, that is downloaded from the internet:
```
(pushnew #'(lambda (module)
(when (prefix-p "http" module)
(load-from-the-internet module)
T))
ext:*module-provider-functions*)
```
The function returns NIL when it doesn't know how to load the module (and then require proceeds to another function, and if none is found then it signals an error), or a generalized boolean true if it succeeds to loads the module.
The underlying require mechanism takes care of registering successful loads, so calling require twice on the same module won't cause for the function to be invoked twice. Note, that module names are strings and are case-sensitive.
This allows i.e for specifying the function that searches for the module in the set of predefined locations -- in fact that's what ECL does for its own bundled modules:
```
(pushnew #'(lambda (module)
(let* ((module (string module)))
(or
(let ((path (make-pathname :name module :defaults "SYS:")))
(load path :if-does-not-exist nil))
(let ((path (make-pathname :name (string-downcase module)
:defaults "SYS:")))
(load path :if-does-not-exist nil)))))
*module-provider-functions*)
```
and to redefine default stram functions when gray protocol is required:
```
(pushnew #'(lambda (module)
(when (string-equal module '#:gray-streams)
(redefine-cl-functions)
t))
sys:*module-provider-functions*)
```
This ticket is to sort out remarks above and put it in the manual, as they are part of the api (exported from the EXT package).
issue