From a59fc865aee240afe21b82ffef2681bb9a6ea693 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 29 Jul 2018 02:30:13 -0400 Subject: Adapted new-luxc to some of the latest changes to Lux. --- new-luxc/source/luxc/repl.lux | 73 ++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 32 deletions(-) (limited to 'new-luxc/source/luxc/repl.lux') diff --git a/new-luxc/source/luxc/repl.lux b/new-luxc/source/luxc/repl.lux index df046700c..e8da16ae1 100644 --- a/new-luxc/source/luxc/repl.lux +++ b/new-luxc/source/luxc/repl.lux @@ -1,33 +1,42 @@ (.module: - lux - (lux (control [monad #+ do] - ["ex" exception #+ exception:]) - (data [maybe] - ["e" error #+ Error] - [text "text/" Equivalence] - text/format - (coll (dictionary ["dict" unordered]))) - [macro] - (lang [syntax #+ Aliases] - (type [check]) - [".L" init] - [".L" module] - [".L" scope] - [".L" extension] - (extension [".E" analysis])) - (concurrency [promise] - [task #+ Task]) - [io] - (world [file #+ File] - [console #+ Console])) - (luxc [lang] - (lang [".L" host] - [".L" translation] - [".L" eval] - (translation (jvm [".T" runtime])) - (extension [".E" synthesis] - [".E" translation] - [".E" statement])))) + [lux #* + [control + [monad (#+ do)] + ["ex" exception (#+ exception:)]] + [data + ["." maybe] + ["e" error (#+ Error)] + [text ("text/" Equivalence) + format] + [collection + ["." dictionary]]] + ["." macro] + [type + ["." check]] + [language + [syntax (#+ Aliases)] + [".L" init] + [".L" module] + [".L" scope] + [".L" extension + [".E" analysis]]] + [concurrency + ["." promise] + [task (#+ Task)]] + ["." io] + [world + [file (#+ File)] + [console (#+ Console)]]] + [// + ["." lang + [".L" host] + [".L" translation + [jvm + [".T" runtime]]] + [extension + [".E" synthesis] + [".E" translation] + [".E" statement]]]]) (do-template [] [(exception: #export ( {message Text}) @@ -39,7 +48,7 @@ (def: repl-module "") -(def: no-aliases Aliases (dict.new text.Hash)) +(def: no-aliases Aliases (dictionary.new text.Hash)) (def: (initialize source-dirs target-dir console) (-> (List File) File Console (Task Lux)) @@ -48,7 +57,7 @@ (do io.Monad [host hostL.init-host] (case (macro.run' (initL.compiler host) - (moduleL.with-module +0 repl-module + (moduleL.with-module 0 repl-module runtimeT.translate)) (#e.Success [compiler _]) (|> compiler @@ -99,7 +108,7 @@ compiler) (#e.Error error))))) -(def: fresh-source Source [[repl-module +1 +0] +0 ""]) +(def: fresh-source Source [[repl-module 1 0] 0 ""]) (def: #export (run source-dirs target-dir) (-> (List File) File (Task Any)) -- cgit v1.2.3