diff options
Diffstat (limited to 'stdlib/source/lux/compiler/default/phase/synthesis/expression.lux')
-rw-r--r-- | stdlib/source/lux/compiler/default/phase/synthesis/expression.lux | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/stdlib/source/lux/compiler/default/phase/synthesis/expression.lux b/stdlib/source/lux/compiler/default/phase/synthesis/expression.lux index 6cdd9b6fc..0d15ae463 100644 --- a/stdlib/source/lux/compiler/default/phase/synthesis/expression.lux +++ b/stdlib/source/lux/compiler/default/phase/synthesis/expression.lux @@ -1,9 +1,11 @@ (.module: [lux (#- primitive) [control - ["." monad (#+ do)]] + ["." monad (#+ do)] + pipe] [data ["." maybe] + ["." error] [collection ["." list ("list/." Functor<List>)] ["." dictionary (#+ Dictionary)]]]] @@ -70,5 +72,15 @@ (function.abstraction phase environmentA bodyA) (#analysis.Extension name args) - (extension.apply phase [name args]) + (function (_ state) + (|> (extension.apply "Synthesis" phase [name args]) + (///.run' state) + (case> (#error.Success output) + (#error.Success output) + + (#error.Error error) + (<| (///.run' state) + (do ///.Monad<Operation> + [argsS+ (monad.map @ phase args)] + (wrap (#//.Extension [name argsS+]))))))) )) |