mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 17:15:26 +03:00
14 lines
425 B
Plaintext
14 lines
425 B
Plaintext
// Loads a single dependency, if not present
|
|
// FIXME: String.map.has.linear is removing the entry
|
|
Kind.load.dependency
|
|
: ∀(name: String)
|
|
∀(book: Kind.Book)
|
|
(IO Kind.Book)
|
|
= λname λbook
|
|
let has = (String.Map.has Kind.Term name book)
|
|
let P = λx ∀(book: Kind.Book) (IO Kind.Book)
|
|
let true = λbook (IO.done Kind.Book book)
|
|
let false = λbook (Kind.load.name name book)
|
|
((~has P true false) book)
|
|
|