diff options
author | Eduardo Julian | 2021-08-20 03:12:49 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-20 03:12:49 -0400 |
commit | 374ccf07246484eb7beb2cd87f3fc88396373ee1 (patch) | |
tree | 4ed37fd579df1765dde6b57450f239844f7a07c1 /stdlib/source/library/lux/tool/compiler | |
parent | d772fe99d5d4990c6774481fb64d12280cdb6aae (diff) |
More fixes.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux index a615c00ef..39082e826 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/synthesis/loop.lux @@ -160,7 +160,7 @@ (^ (/.function/apply [abstraction arguments])) (do {! maybe.monad} - [arguments' (monad.map maybe.monad (recur false) arguments)] + [arguments' (monad.map ! (recur false) arguments)] (with_expansions [<application> (as_is (do ! [abstraction' (recur false abstraction)] (in (/.function/apply [abstraction' arguments']))))] @@ -176,6 +176,25 @@ _ <application>))) + ... TODO: Stop relying on this custom code. + (^ (#/.Extension ["lux syntax char case!" (list& input else matches)])) + (do {! maybe.monad} + [input (recur false input) + matches (monad.map ! + (function (_ match) + (case match + (^ (#/.Structure (#analysis.Tuple (list when then)))) + (do ! + [when (recur false when) + then (recur return? then)] + (in (#/.Structure (#analysis.Tuple (list when then))))) + + _ + (recur false match))) + matches) + else (recur return? else)] + (in (#/.Extension ["lux syntax char case!" (list& input else matches)]))) + (#/.Extension [name args]) (|> args (monad.map maybe.monad (recur false)) |