diff options
Diffstat (limited to 'new-luxc/source/luxc/repl.lux')
-rw-r--r-- | new-luxc/source/luxc/repl.lux | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/new-luxc/source/luxc/repl.lux b/new-luxc/source/luxc/repl.lux index 0ce7fb898..b1efa5c20 100644 --- a/new-luxc/source/luxc/repl.lux +++ b/new-luxc/source/luxc/repl.lux @@ -67,7 +67,7 @@ (|> compiler (set@ [#.info #.mode] #.REPL) (set@ #.extensions - (:! Bottom + (:! Nothing {#extensionL.analysis analysisE.defaults #extensionL.synthesis synthesisE.defaults #extensionL.translation translationE.defaults @@ -91,10 +91,10 @@ (-> Text Source Source) [where offset (format input "\n" line)]) -(type: Representation (-> Top Text)) +(type: Representation (-> Any Text)) (def: (represent-together representations values) - (-> (List Representation) (List Top) (List Text)) + (-> (List Representation) (List Any) (List Text)) (|> (list.zip2 representations values) (list/map (function (_ [representation value]) (representation value))))) @@ -102,12 +102,12 @@ (Poly Representation) (`` ($_ p.either (do p.Monad<Parser> - [_ (poly.this Top)] + [_ (poly.this Any)] (wrap (const "[]"))) (~~ (do-template [<type> <formatter>] [(do p.Monad<Parser> - [_ (poly.this <type>)] + [_ (poly.like <type>)] (wrap (|>> (:! <type>) <formatter>)))] [Bool %b] @@ -122,7 +122,7 @@ (`` ($_ p.either (~~ (do-template [<type> <formatter>] [(do p.Monad<Parser> - [_ (poly.this <type>)] + [_ (poly.like <type>)] (wrap (|>> (:! <type>) <formatter>)))] [Type %type] @@ -137,12 +137,12 @@ (do p.Monad<Parser> [[_ elemT] (poly.apply (p.seq (poly.this List) poly.any)) elemR (poly.local (list elemT) representation)] - (wrap (|>> (:! (List Top)) (%list elemR)))) + (wrap (|>> (:! (List Any)) (%list elemR)))) (do p.Monad<Parser> [[_ elemT] (poly.apply (p.seq (poly.this Maybe) poly.any)) elemR (poly.local (list elemT) representation)] - (wrap (|>> (:! (Maybe Top)) + (wrap (|>> (:! (Maybe Any)) (case> #.None "#.None" @@ -166,7 +166,7 @@ (format (%code (code.tag tag)) " " (repr recordV)) (#.Cons [tag repr] tail) - (let [[leftV rightV] (:! [Top Top] recordV)] + (let [[leftV rightV] (:! [Any Any] recordV)] (format (%code (code.tag tag)) " " (repr leftV) " " (recur tail rightV)))))] (format "{" record-body "}")))))) @@ -188,13 +188,13 @@ "" (#.Cons [tag-name tag-idx repr] #.Nil) - (let [[_tag _last? _value] (:! [Nat Text Top] variantV)] + (let [[_tag _last? _value] (:! [Nat Text Any] variantV)] (if (n/= tag-idx _tag) (format "(" (%code (code.tag tag-name)) " " (repr _value) ")") (undefined))) (#.Cons [tag-name tag-idx repr] tail) - (let [[_tag _last? _value] (:! [Nat Text Top] variantV)] + (let [[_tag _last? _value] (:! [Nat Text Any] variantV)] (if (n/= tag-idx _tag) (format "(" (%code (code.tag tag-name)) " " (repr _value) ")") (recur tail variantV))))))))) @@ -232,7 +232,7 @@ (lastR tupleV) (#.Cons headR tailR) - (let [[leftV rightV] (:! [Top Top] tupleV)] + (let [[leftV rightV] (:! [Any Any] tupleV)] (format (headR leftV) " " (recur tailR rightV)))))] (format "[" tuple-body "]")))))) @@ -263,7 +263,7 @@ )))) (def: (represent compiler type value) - (-> Lux Type Top Text) + (-> Lux Type Any Text) (case (poly.run type (representation compiler)) (#e.Success representation) (representation value) @@ -272,14 +272,14 @@ ". . . cannot represent value . . .")) (def: (repl-translate source-dirs target-dir code) - (-> (List File) File Code (Meta [Type Top])) + (-> (List File) File Code (Meta [Type Any])) (function (_ compiler) (case ((translationL.translate (translationL.translate-module source-dirs target-dir) no-aliases code) compiler) (#e.Success [compiler' aliases']) - (#e.Success [compiler' [Bottom []]]) + (#e.Success [compiler' [Nothing []]]) (#e.Error error) (if (ex.match? translationL.Unrecognized-Statement error) @@ -295,7 +295,7 @@ (def: fresh-source Source [[repl-module +1 +0] +0 ""]) (def: #export (run source-dirs target-dir) - (-> (List File) File (Task Top)) + (-> (List File) File (Task Any)) (do task.Monad<Task> [console (promise.future console.open) compiler (initialize source-dirs target-dir console)] |