Skip to content

Commit

Permalink
Adapting to new List type (part 21).
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoejp committed May 17, 2024
1 parent b5f799e commit 7497da7
Show file tree
Hide file tree
Showing 21 changed files with 284 additions and 277 deletions.
1 change: 1 addition & 0 deletions documentation/bookmark/documentation/diagram.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Reference

0. [Codemap: The code visualization you wished for](https://codemap.app/)
0. [Awesome Diagramming](https://github.com/shubhamgrg04/awesome-diagramming)

6 changes: 3 additions & 3 deletions stdlib/source/library/lux/compiler.lux
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
(Record
[#module descriptor.Module
#file file.Path
#hash Nat
#hash Natural
#code Code]))

(every .public (Compilation state document)
(Record
[#dependencies (Stack descriptor.Module)
[#dependencies (List descriptor.Module)
#process (-> state Archive
(Try [state (Either (Compilation state document)
(archive.Entry document))]))]))
Expand All @@ -55,7 +55,7 @@
(Try (Compilation state document)))]))

(every .public (Instancer state document)
(-> (Key document) (Stack Parameter)
(-> (Key document) (List Parameter)
(Compiler state document)))

(exception.the .public (cannot_compile [module])
Expand Down
17 changes: 8 additions & 9 deletions stdlib/source/library/lux/compiler/default/init.lux
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
["[0]" text (.use "[1]#[0]" hash)]
[collection
["[0]" list (.use "[1]#[0]" functor)]
["[0]" stack (.use "[1]#[0]" functor)]
["[0]" dictionary]
["[0]" set]
["[0]" sequence (.use "[1]#[0]" functor)]]]
Expand Down Expand Up @@ -187,7 +186,7 @@

(the (begin dependencies hash input all_extensions)
(for_any (_ anchor expression declaration)
(-> (Stack descriptor.Module) Natural ///.Input
(-> (List descriptor.Module) Natural ///.Input
(Extensions anchor expression declaration)
(///declaration.Operation anchor expression declaration
[Source (Payload declaration)])))
Expand All @@ -199,7 +198,7 @@
_ (with_defaults module all_extensions)]
(///declaration.of_analysis
(do [! phase.monad]
[_ (stack.each' ! moduleA.import dependencies)
[_ (list.each' ! moduleA.import dependencies)
.let [source (analysis.source (its ///.#module input) (its ///.#code input))]
_ (analysis.set_source_code source)]
(in [source [///translation.empty_buffer
Expand Down Expand Up @@ -282,10 +281,10 @@

(the (default_dependencies prelude input)
(-> descriptor.Module ///.Input
(Stack descriptor.Module))
(List descriptor.Module))
(if (text.= prelude (its ///.#module input))
(stack descriptor.runtime)
(stack descriptor.runtime prelude)))
(list descriptor.runtime)
(list descriptor.runtime prelude)))

(the module_aliases
(-> @type.Module
Expand Down Expand Up @@ -349,7 +348,7 @@
.let [descriptor [descriptor.#hash hash
descriptor.#name module
descriptor.#file (its ///.#file input)
descriptor.#references (set.of_list text.hash (list.of_stack dependencies))
descriptor.#references (set.of_list text.hash dependencies)
descriptor.#state {.#Compiled}]]]
(in [state
{.#Right [[moduleM.#id (try.else moduleM.runtime (archive.id module archive))
Expand All @@ -365,7 +364,7 @@
(in [state
{.#Left [///.#dependencies (|> requirements
(its ///declaration.#imports)
(stack#each product.left))
(list#each product.left))
///.#process (function (_ state archive)
(again (<| (phase.value' state)
(do [! phase.monad]
Expand All @@ -378,7 +377,7 @@
(///translation.set_registry temporary_registry))
_ (|> requirements
(its ///declaration.#referrals)
(stack.each' ! (execute! archive)))
(list.each' ! (execute! archive)))
temporary_payload (..get_current_payload extender)]
(..iteration wrapper archive extender expander module source temporary_payload (..module_aliases analysis_module))))))]}]))
)))))]))))
Expand Down

0 comments on commit 7497da7

Please sign in to comment.