diff options
Diffstat (limited to 'new-luxc/source/luxc/repl.lux')
-rw-r--r-- | new-luxc/source/luxc/repl.lux | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/new-luxc/source/luxc/repl.lux b/new-luxc/source/luxc/repl.lux index 987cc2472..a6579e939 100644 --- a/new-luxc/source/luxc/repl.lux +++ b/new-luxc/source/luxc/repl.lux @@ -22,23 +22,23 @@ [poly #+ Poly]) (lang [syntax #+ Aliases] [type] - (type [check])) + (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" module] - [".L" scope] - [".L" host] + (lang [".L" host] [".L" translation] [".L" eval] - [".L" init] (translation (jvm [".T" runtime])) - [".L" extension] - (extension [".E" analysis] - [".E" synthesis] + (extension [".E" synthesis] [".E" translation] [".E" statement])))) @@ -67,11 +67,11 @@ (|> compiler (set@ [#.info #.mode] #.REPL) (set@ #.extensions - (:! Nothing - {#extensionL.analysis analysisE.defaults - #extensionL.synthesis synthesisE.defaults - #extensionL.translation translationE.defaults - #extensionL.statement statementE.defaults})) + (:coerce Nothing + {#extensionL.analysis analysisE.defaults + #extensionL.synthesis synthesisE.defaults + #extensionL.translation translationE.defaults + #extensionL.statement statementE.defaults})) (translationL.translate-module source-dirs target-dir translationL.prelude)) (#e.Error error) @@ -108,7 +108,7 @@ (~~ (do-template [<type> <formatter>] [(do p.Monad<Parser> [_ (poly.like <type>)] - (wrap (|>> (:! <type>) <formatter>)))] + (wrap (|>> (:coerce <type>) <formatter>)))] [Bool %b] [Nat %n] @@ -123,7 +123,7 @@ (~~ (do-template [<type> <formatter>] [(do p.Monad<Parser> [_ (poly.like <type>)] - (wrap (|>> (:! <type>) <formatter>)))] + (wrap (|>> (:coerce <type>) <formatter>)))] [Type %type] [Code %code] @@ -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 Any)) (%list elemR)))) + (wrap (|>> (:coerce (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 Any)) + (wrap (|>> (:coerce (Maybe Any)) (case> #.None "#.None" @@ -166,7 +166,7 @@ (format (%code (code.tag tag)) " " (repr recordV)) (#.Cons [tag repr] tail) - (let [[leftV rightV] (:! [Any Any] recordV)] + (let [[leftV rightV] (:coerce [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 Any] variantV)] + (let [[_tag _last? _value] (:coerce [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 Any] variantV)] + (let [[_tag _last? _value] (:coerce [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] (:! [Any Any] tupleV)] + (let [[leftV rightV] (:coerce [Any Any] tupleV)] (format (headR leftV) " " (recur tailR rightV)))))] (format "[" tuple-body "]")))))) |