From 647d18fde762b0797b5b31b69421d50ed326dcc5 Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Sun, 29 Dec 2019 23:49:53 -0400
Subject: Committing to Promise as the base monad for the compiler.

---
 new-luxc/source/program.lux | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

(limited to 'new-luxc/source')

diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux
index 51f817b6f..507073ead 100644
--- a/new-luxc/source/program.lux
+++ b/new-luxc/source/program.lux
@@ -8,7 +8,9 @@
     ["." io (#+ IO)]
     ["." try (#+ Try)]
     [parser
-     [cli (#+ program:)]]]
+     [cli (#+ program:)]]
+    [concurrency
+     [promise (#+ Promise)]]]
    [data
     [text
      ["%" format (#+ format)]]
@@ -98,13 +100,12 @@
               apply-method))))
 
 (def: #export platform
-  ## (IO (Platform IO Anchor (Bytecode Any) Definition))
-  (IO (Platform IO _.Anchor _.Inst _.Definition))
+  ## (IO (Platform Anchor (Bytecode Any) Definition))
+  (IO (Platform _.Anchor _.Inst _.Definition))
   (do io.monad
     [## host jvm/host.host
      host jvm.host]
-    (wrap {#platform.&monad io.monad
-           #platform.&file-system file.system
+    (wrap {#platform.&file-system (file.async file.system)
            #platform.host host
            ## #platform.phase jvm.generate
            #platform.phase expression.translate
@@ -144,15 +145,16 @@
                                                (#/cli.Compilation configuration) configuration
                                                (#/cli.Interpretation configuration) configuration)
         jar-path (format target (:: file.system separator) "program.jar")]
-    (/.compiler @.jvm
-                ".jvm"
-                ..expander
-                analysis.bundle
-                ..platform
-                ## generation.bundle
-                translation.bundle
-                (directive.bundle extender)
-                jvm/program.program
-                ..extender
-                service
-                [(packager.package jvm/program.class) jar-path])))
+    (exec (/.compiler @.jvm
+                      ".jvm"
+                      ..expander
+                      analysis.bundle
+                      ..platform
+                      ## generation.bundle
+                      translation.bundle
+                      (directive.bundle extender)
+                      jvm/program.program
+                      ..extender
+                      service
+                      [(packager.package jvm/program.class) jar-path])
+      (io.io []))))
-- 
cgit v1.2.3