diff options
author | Eduardo Julian | 2019-02-24 12:26:17 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-02-24 12:26:17 -0400 |
commit | a72e34d30eaf3557f9b76ced9605a95759ce8eca (patch) | |
tree | 5fd88f66ac3b2b0abb5561521f806afb93c5134e /new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux | |
parent | 950ac7c3311ad8ff4499164a30610fca2e57d5c9 (diff) |
Got new-luxc to compile/build again.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux index 78ef508e8..72c316d83 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux @@ -1,14 +1,15 @@ (.module: [lux (#- if let case) + ["." function] [control [monad (#+ do)] ["ex" exception (#+ exception:)]] [data [text format]] - [platform + [tool [compiler - ["." phase ("operation/." Monad<Operation>) + ["." phase ("operation/." monad) ["." synthesis (#+ Path Synthesis)]]]]] [luxc [lang @@ -22,7 +23,7 @@ (def: (pop-altI stack-depth) (-> Nat Inst) (.case stack-depth - 0 id + 0 function.identity 1 _.POP 2 _.POP2 _ ## (n/> 2) @@ -99,7 +100,7 @@ (_.IFEQ @else))) (#synthesis.Then bodyS) - (do phase.Monad<Operation> + (do phase.monad [bodyI (phase bodyS)] (wrap (|>> (pop-altI stack-depth) bodyI @@ -127,7 +128,7 @@ (_.GOTO @else) (_.label @success) pushI)))) - ([synthesis.side/left _.NULL .id] + ([synthesis.side/left _.NULL function.identity] [synthesis.side/right (_.string "") .inc]) (^template [<pattern> <method> <prepare>] @@ -151,11 +152,11 @@ (list)) #0) pushI)))) - ([synthesis.member/left "pm_left" id] + ([synthesis.member/left "pm_left" function.identity] [synthesis.member/right "pm_right" inc]) (#synthesis.Alt leftP rightP) - (do phase.Monad<Operation> + (do phase.monad [@alt-else _.make-label leftI (path' phase (inc stack-depth) @alt-else @end leftP) rightI (path' phase stack-depth @else @end rightP)] @@ -166,7 +167,7 @@ rightI))) (#synthesis.Seq leftP rightP) - (do phase.Monad<Operation> + (do phase.monad [leftI (path' phase stack-depth @else @end leftP) rightI (path' phase stack-depth @else @end rightP)] (wrap (|>> leftI @@ -175,7 +176,7 @@ (def: (path phase path @end) (-> Phase Path Label (Operation Inst)) - (do phase.Monad<Operation> + (do phase.monad [@else _.make-label pathI (..path' phase 1 @else @end path)] (wrap (|>> pathI @@ -190,7 +191,7 @@ (def: #export (if phase testS thenS elseS) (-> Phase Synthesis Synthesis Synthesis (Operation Inst)) - (do phase.Monad<Operation> + (do phase.monad [testI (phase testS) thenI (phase thenS) elseI (phase elseS)] @@ -207,7 +208,7 @@ (def: #export (let phase inputS register exprS) (-> Phase Synthesis Nat Synthesis (Operation Inst)) - (do phase.Monad<Operation> + (do phase.monad [inputI (phase inputS) exprI (phase exprS)] (wrap (|>> inputI @@ -216,7 +217,7 @@ (def: #export (case phase valueS path) (-> Phase Synthesis Path (Operation Inst)) - (do phase.Monad<Operation> + (do phase.monad [@end _.make-label valueI (phase valueS) pathI (..path phase path @end)] |