diff options
author | Eduardo Julian | 2021-09-10 01:21:23 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-10 01:21:23 -0400 |
commit | cd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 (patch) | |
tree | af6366578f98f1a8e551f4da9f3ad230fd63a4dd /stdlib/source/program/compositor | |
parent | ef77466323f85a3d1b65b46a3deb93652ef22085 (diff) |
Migrated variants to the new syntax.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/compositor.lux | 18 | ||||
-rw-r--r-- | stdlib/source/program/compositor/cli.lux | 12 | ||||
-rw-r--r-- | stdlib/source/program/compositor/export.lux | 4 | ||||
-rw-r--r-- | stdlib/source/program/compositor/import.lux | 4 |
4 files changed, 19 insertions, 19 deletions
diff --git a/stdlib/source/program/compositor.lux b/stdlib/source/program/compositor.lux index b36d73070..f18f45e54 100644 --- a/stdlib/source/program/compositor.lux +++ b/stdlib/source/program/compositor.lux @@ -63,13 +63,13 @@ (do async.monad [?output action] (case ?output - (#try.Failure error) + {#try.Failure error} (exec (debug.log! (format text.new_line failure_description text.new_line error text.new_line)) (io.run! (\ world/program.default exit +1))) - (#try.Success output) + {#try.Success output} (in output)))) (def: (timed process) @@ -87,11 +87,11 @@ (def: (package! fs host_dependencies [packager package] static archive context) (-> (file.System Async) (Dictionary file.Path Binary) [Packager file.Path] Static Archive Context (Async (Try Any))) (case (packager host_dependencies archive context) - (#try.Success content) + {#try.Success content} (\ fs write content package) - (#try.Failure error) - (\ async.monad in (#try.Failure error)))) + {#try.Failure error} + (\ async.monad in {#try.Failure error}))) (def: (load_host_dependencies fs host_dependencies) (-> (file.System Async) (List file.Path) (Async (Try (Dictionary file.Path Binary)))) @@ -104,7 +104,7 @@ #.End (in output) - (#.Item head tail) + {#.Item head tail} (do ! [content (\ fs read head)] (recur tail @@ -131,7 +131,7 @@ (do [! async.monad] [platform (async.future platform)] (case service - (#/cli.Compilation compilation) + {#/cli.Compilation compilation} (<| (or_crash! "Compilation failed:") ..timed (do (try.with async.monad) @@ -165,14 +165,14 @@ program_context)] (in (debug.log! "Compilation complete!")))) - (#/cli.Export export) + {#/cli.Export export} (<| (or_crash! "Export failed:") (do (try.with async.monad) [_ (/export.export (value@ #platform.&file_system platform) export)] (in (debug.log! "Export complete!")))) - (#/cli.Interpretation interpretation) + {#/cli.Interpretation interpretation} ... TODO: Fix the interpreter... (undefined) ... (<| (or_crash! "Interpretation failed:") diff --git a/stdlib/source/program/compositor/cli.lux b/stdlib/source/program/compositor/cli.lux index 487c3976f..e678f2c6e 100644 --- a/stdlib/source/program/compositor/cli.lux +++ b/stdlib/source/program/compositor/cli.lux @@ -33,9 +33,9 @@ (type: .public Service (Variant - (#Compilation Compilation) - (#Interpretation Compilation) - (#Export Export))) + {#Compilation Compilation} + {#Interpretation Compilation} + {#Export Export})) (template [<name> <long> <type>] [(def: <name> @@ -74,7 +74,7 @@ (def: .public target (-> Service Target) - (|>> (case> (^or (#Compilation [sources host_dependencies libraries target module]) - (#Interpretation [sources host_dependencies libraries target module]) - (#Export [sources target])) + (|>> (case> (^or {#Compilation [sources host_dependencies libraries target module]} + {#Interpretation [sources host_dependencies libraries target module]} + {#Export [sources target]}) target))) diff --git a/stdlib/source/program/compositor/export.lux b/stdlib/source/program/compositor/export.lux index 2fe3171e0..3588e1dde 100644 --- a/stdlib/source/program/compositor/export.lux +++ b/stdlib/source/program/compositor/export.lux @@ -51,14 +51,14 @@ (text.replaced (\ fs separator) .module_separator) tar.path) source_code (tar.content source_code)] - (in (#tar.Normal [path + (in {#tar.Normal [path (instant.of_millis +0) ($_ tar.and tar.read_by_owner tar.write_by_owner tar.read_by_group tar.write_by_group tar.read_by_other) ..no_ownership - source_code]))))) + source_code]})))) (\ try.monad each row.of_list) (\ async.monad in)))) diff --git a/stdlib/source/program/compositor/import.lux b/stdlib/source/program/compositor/import.lux index 6b092e546..278e992fb 100644 --- a/stdlib/source/program/compositor/import.lux +++ b/stdlib/source/program/compositor/import.lux @@ -54,10 +54,10 @@ (\ ! each (|>> row.list (monad.mix ! (function (_ entry import) (case entry - (#tar.Normal [path instant mode ownership content]) + {#tar.Normal [path instant mode ownership content]} (let [path (tar.from_path path)] (case (dictionary.has' path (tar.data content) import) - (#try.Failure error) + {#try.Failure error} (exception.except ..duplicate [library path]) import' |