hara.lang.library

*strict*

dynamic

+ops+

add-book!

added in 4.0

(add-book! lib book)

adds a book to the library

add-entry!

added in 4.0

(add-entry! {:keys [dispatch], :as lib} entry)

adds the entry with the bulk dispatcher

add-entry-single!

added in 4.0

(add-entry-single! lib entry & [opts])

adds an entry synchronously

add-module!

added in 4.0

(add-module! lib module)

adds a module to the library

(lib/add-module! +library+ (module/book-module ’{:lang :lua.redis :id L.redis.hello :link {r L.redis u L.core}})) => coll?

(lib/delete-module! +library+ :lua.redis ’L.redis.hello ) => coll?

delete-book!

added in 4.0

(delete-book! lib lang)

deletes a book

delete-entry!

added in 4.0

(delete-entry! lib {:keys [lang module section id], :as m})

deletes an entry from the library

delete-module!

added in 4.0

(delete-module! lib lang module-id)

deletes a module from the library

delete-modules!

added in 4.0

(delete-modules! lib lang module-ids)

deletes a bunch of modules from the library

entry-abstract?

added in 4.1

(entry-abstract? {:keys [form-input]})

checks if an entry was declared with defabstract

entry-arity

added in 4.1

(entry-arity {:keys [form-input]})

returns the arity of an entry from its input form when available

get-book

added in 4.0

(get-book lib lang)

gets a book from library

get-book-raw

added in 4.0

(get-book-raw lib lang)

gets the raw book, without merge

(b/list-entries (lib/get-book-raw +library+ :lua.redis)) => empty?

(b/list-entries (lib/get-book +library+ :lua.redis)) => coll?

(b/list-entries (lib/get-book +library+ :lua.nginx)) => coll?

get-entry

added in 4.0

(get-entry lib {:keys [lang id module section], :as entry})

gets an entry from library

get-module

added in 4.0

(get-module lib lang module-id)

gets a module from library

get-snapshot

added in 4.0

(get-snapshot lib)

gets the current snapshot for the library

install-book!

added in 4.0

(install-book! lib book)

installs a book to library

install-module!

added in 4.0

(install-module! lib lang module-id options)

installs a module to library

install-module-specialized!

added in 4.1

(install-module-specialized! lib lang source-id module-id options)

installs a specialized module clone into the library

library

added in 4.0

(library {:keys [id parent snapshot], :as m})

creates and start a new library

library-string

added in 4.0

(library-string {:keys [id parent instance]})

returns the library string

library:create

added in 4.0

(library:create {:keys [id parent snapshot], :as m})

creates a new library

library?

added in 4.0

(library? obj)

checks if object is a library

list-entries

added in 4.0

(list-entries lib lang)(list-entries lib lang module-id)(list-entries lib lang module-id section)

lists entries

list-modules

added in 4.0

(list-modules lib lang)

lists all modules

purge-book!

added in 4.0

(purge-book! lib lang)

clears all modules from book

reset-all!

added in 4.0

(reset-all! lib)(reset-all! lib new-snapshot)

resets the library

snapshot-find-module

added in 4.1

(snapshot-find-module snapshot module-id)

finds a module anywhere in the merged library snapshot

validate-module-implements

added in 4.1

(validate-module-implements snapshot lang module-id)

checks that a module satisfies all declared abstract contracts

wait-apply

added in 4.0

(wait-apply lib f & args)

get the library state when task queue is empty

wait-mutate!

added in 4.0

(wait-mutate! lib f & args)

mutates library once task queue is empty

wait-snapshot

added in 4.0

(wait-snapshot lib)

gets the current waiting snapshot

(lib/wait-snapshot +library+) => snap/snapshot?

(meta (lib/wait-snapshot +library+)) => {:parent nil}