The attached patch adds a :type attribute to foreign libraries(:system or :wrapper), per-library search paths(needed for cffi-grovel wrappers) and a function list-foreign-libraries. It also adds the readers foreign-library-type, foreign-library-search-path and foreign-library-loaded-p. Any objections against merging this ?