aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux63
1 files changed, 31 insertions, 32 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux
index aa04dc975..142e4a165 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/case.jvm.lux
@@ -11,19 +11,18 @@
["." list ("#/." functor fold)]]]
[host
["_" scheme (#+ Expression Computation Var)]]]
- [//
- ["." runtime (#+ Operation Phase)]
- ["//." primitive]
- ["." reference]
- [//
- ["common-." reference]
- ["//." // ("#/." monad)
- [//
+ ["." // #_
+ ["#." runtime (#+ Operation Phase)]
+ ["#." primitive]
+ ["#/" // #_
+ ["#." reference]
+ ["#/" // ("#/." monad)
+ ["#/" // #_
[reference (#+ Register)]
- ["." synthesis (#+ Synthesis Path)]]]]])
+ ["#." synthesis (#+ Synthesis Path)]]]]])
(def: #export register
- (common-reference.local _.var))
+ (///reference.local _.var))
(def: #export (let generate [valueS register bodyS])
(-> Phase [Synthesis Register Synthesis]
@@ -41,8 +40,8 @@
[valueO (generate valueS)]
(wrap (list/fold (function (_ [idx tail?] source)
(.let [method (.if tail?
- runtime.product//right
- runtime.product//left)]
+ //runtime.product//right
+ //runtime.product//left)]
(method source (_.int (.int idx)))))
valueO
pathP))))
@@ -105,13 +104,13 @@
(def: (pattern-matching' generate pathP)
(-> Phase Path (Operation Expression))
(.case pathP
- (^ (synthesis.path/then bodyS))
+ (^ (/////synthesis.path/then bodyS))
(generate bodyS)
- #synthesis.Pop
+ #/////synthesis.Pop
(/////wrap pop-cursor!)
- (#synthesis.Bind register)
+ (#/////synthesis.Bind register)
(/////wrap (_.define (..register register) [(list) #.None]
cursor-top))
@@ -119,25 +118,25 @@
(^ (<tag> value))
(/////wrap (_.when (|> value <format> (<=> cursor-top) _.not/1)
fail-pm!)))
- ([synthesis.path/bit //primitive.bit _.eqv?/2]
- [synthesis.path/i64 (<| //primitive.i64 .int) _.=/2]
- [synthesis.path/f64 //primitive.f64 _.=/2]
- [synthesis.path/text //primitive.text _.eqv?/2])
+ ([/////synthesis.path/bit //primitive.bit _.eqv?/2]
+ [/////synthesis.path/i64 (<| //primitive.i64 .int) _.=/2]
+ [/////synthesis.path/f64 //primitive.f64 _.=/2]
+ [/////synthesis.path/text //primitive.text _.eqv?/2])
(^template [<pm> <flag> <prep>]
(^ (<pm> idx))
- (/////wrap (_.let (list [@temp (|> idx <prep> .int _.int (runtime.sum//get cursor-top <flag>))])
+ (/////wrap (_.let (list [@temp (|> idx <prep> .int _.int (//runtime.sum//get cursor-top <flag>))])
(_.if (_.null?/1 @temp)
fail-pm!
(push-cursor! @temp)))))
- ([synthesis.side/left _.nil (<|)]
- [synthesis.side/right (_.string "") inc])
+ ([/////synthesis.side/left _.nil (<|)]
+ [/////synthesis.side/right (_.string "") inc])
(^template [<pm> <getter> <prep>]
(^ (<pm> idx))
(/////wrap (|> idx <prep> .int _.int (<getter> cursor-top) push-cursor!)))
- ([synthesis.member/left runtime.product//left (<|)]
- [synthesis.member/right runtime.product//right inc])
+ ([/////synthesis.member/left //runtime.product//left (<|)]
+ [/////synthesis.member/right //runtime.product//right inc])
(^template [<tag> <computation>]
(^ (<tag> leftP rightP))
@@ -145,14 +144,14 @@
[leftO (pattern-matching' generate leftP)
rightO (pattern-matching' generate rightP)]
(wrap <computation>)))
- ([synthesis.path/seq (_.begin (list leftO
- rightO))]
- [synthesis.path/alt (_.with-exception-handler
- (pm-catch (_.begin (list restore-cursor!
- rightO)))
- (_.lambda [(list) #.None]
- (_.begin (list save-cursor!
- leftO))))])
+ ([/////synthesis.path/seq (_.begin (list leftO
+ rightO))]
+ [/////synthesis.path/alt (_.with-exception-handler
+ (pm-catch (_.begin (list restore-cursor!
+ rightO)))
+ (_.lambda [(list) #.None]
+ (_.begin (list save-cursor!
+ leftO))))])
_
(////.throw unrecognized-path [])))