aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/tool/compiler/meta/cache/module.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/tool/compiler/meta/cache/module.lux')
-rw-r--r--stdlib/source/library/lux/tool/compiler/meta/cache/module.lux30
1 files changed, 15 insertions, 15 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/meta/cache/module.lux b/stdlib/source/library/lux/tool/compiler/meta/cache/module.lux
index e61b8cad2..9a3f9c9cb 100644
--- a/stdlib/source/library/lux/tool/compiler/meta/cache/module.lux
+++ b/stdlib/source/library/lux/tool/compiler/meta/cache/module.lux
@@ -1,6 +1,6 @@
(.using
[library
- [lux {"-" Module}
+ [lux "*"
[abstract
["[0]" monad {"+" do}]]
[control
@@ -19,30 +19,30 @@
[///
["[0]" archive {"+" Output Archive}
[key {"+" Key}]
- ["[0]" descriptor {"+" Module Descriptor}]
+ ["[0]" descriptor {"+" Descriptor}]
["[0]" document {"+" Document}]]])
(type: .public Ancestry
- (Set Module))
+ (Set descriptor.Module))
(def: fresh
Ancestry
(set.empty text.hash))
(type: .public Graph
- (Dictionary Module Ancestry))
+ (Dictionary descriptor.Module Ancestry))
(def: empty
Graph
(dictionary.empty text.hash))
(def: .public modules
- (-> Graph (List Module))
+ (-> Graph (List descriptor.Module))
dictionary.keys)
(type: .public Dependency
(Record
- [#module Module
+ [#module descriptor.Module
#imports Ancestry]))
(def: .public graph
@@ -53,11 +53,11 @@
(def: (ancestry archive)
(-> Archive Graph)
- (let [memo (: (Memo Module Ancestry)
+ (let [memo (: (Memo descriptor.Module Ancestry)
(function (_ again module)
(do [! state.monad]
[.let [parents (case (archive.find module archive)
- {try.#Success [descriptor document]}
+ {try.#Success [descriptor document output registry]}
(value@ descriptor.#references descriptor)
{try.#Failure error}
@@ -74,17 +74,17 @@
(archive.archived archive))))
(def: (dependency? ancestry target source)
- (-> Graph Module Module Bit)
+ (-> Graph descriptor.Module descriptor.Module Bit)
(let [target_ancestry (|> ancestry
(dictionary.value target)
(maybe.else ..fresh))]
(set.member? target_ancestry source)))
-(type: .public Order
- (List [Module [archive.ID [Descriptor (Document .Module) Output]]]))
+(type: .public (Order a)
+ (List [descriptor.Module [archive.ID (archive.Entry a)]]))
(def: .public (load_order key archive)
- (-> (Key .Module) Archive (Try Order))
+ (All (_ a) (-> (Key a) Archive (Try (Order a))))
(let [ancestry (..ancestry archive)]
(|> ancestry
dictionary.keys
@@ -93,6 +93,6 @@
(function (_ module)
(do try.monad
[module_id (archive.id module archive)
- [descriptor document output] (archive.find module archive)
- document (document.marked? key document)]
- (in [module [module_id [descriptor document output]]])))))))
+ entry (archive.find module archive)
+ document (document.marked? key (value@ archive.#document entry))]
+ (in [module [module_id (with@ archive.#document document entry)]])))))))