diff options
Diffstat (limited to 'stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux')
-rw-r--r-- | stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux b/stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux index c7d161f14..a40b4953f 100644 --- a/stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux +++ b/stdlib/source/lux/language/compiler/translation/scheme/extension.jvm.lux @@ -1,36 +1,15 @@ (.module: [lux #* - [control - [monad (#+ do)] - ["ex" exception (#+ exception:)]] [data - [maybe] - [text - format] - [collection ["dict" dictionary (#+ Dictionary)]]]] - [///// - [reference (#+ Register Variable)] - [host ["_" scheme (#+ Computation)]] - [compiler ("operation/" Monad<Operation>) - [synthesis (#+ Synthesis)]]] - [//runtime (#+ Operation Compiler)] - [/common] - ## [/host] - ) + [collection + ["." dictionary]]]] + [// + [runtime (#+ Bundle)]] + [/ + ["." common] + ["." host]]) -(exception: #export (unknown-extension {message Text}) - message) - -(def: extensions - /common.Bundle - (|> /common.extensions - ## (dict.merge /host.extensions) - )) - -(def: #export (extension translate name args) - (-> Compiler Text (List Synthesis) - (Operation Computation)) - (<| (maybe.default (compiler.throw unknown-extension (%t name))) - (do maybe.Monad<Maybe> - [ext (dict.get name extensions)] - (wrap (ext translate args))))) +(def: #export bundle + Bundle + (|> common.bundle + (dictionary.merge host.bundle))) |