diff options
Diffstat (limited to 'src/boot/translator.boot')
-rw-r--r-- | src/boot/translator.boot | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/boot/translator.boot b/src/boot/translator.boot index 4b803b0c..fb0d750f 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -403,6 +403,10 @@ translateToplevelExpression expr == $InteractiveMode => expr' shoeEVALANDFILEACTQ expr' +exportNames ns == + ns = nil => nil + [["EXPORT",:ns]] + translateToplevel(b,export?) == atom b => [b] -- generally happens in interactive mode. b is ["TUPLE",:xs] => coreError '"invalid AST" @@ -410,10 +414,10 @@ translateToplevel(b,export?) == %Signature(op,t) => [genDeclaration(op,t)] %Definition(op,args,body) => rest bfDef(op,args,body) - %Module(m,ds) => + %Module(m,ns,ds) => $currentModuleName := m $foreignsDefsForCLisp := nil - [["PROVIDE", symbolName m], + [["PROVIDE", symbolName m], :exportNames ns, :[first translateToplevel(d,true) for d in ds]] %Import(m) => |