diff --git a/tools/repl.js b/tools/repl.js
index <HASH>..<HASH> 100644
--- a/tools/repl.js
+++ b/tools/repl.js
@@ -17,6 +17,7 @@ var RapydScript = (typeof create_rapydscript_compiler === 'function') ? create_r
 function create_ctx(baselib, show_js, console) {
     var ctx = vm.createContext({'console':console, 'show_js': !!show_js, 'RapydScript':RapydScript, 'require':require});
 	vm.runInContext(baselib, ctx, {'filename':'baselib-plain-pretty.js'});
+    vm.runInContext('var __name__ = "__repl__";', ctx);
 	RapydScript.AST_Node.warn_function = function() {};
     return ctx;
 }
Fix default __repr__ not working in REPL