path: root/starling
diff options
authorDavid Thompson <>2020-10-06 08:01:58 -0400
committerDavid Thompson <>2020-10-06 08:01:58 -0400
commitadaf2c55d61d78398e3be355a9390551db47516f (patch)
tree1e04d8644033d976211bfb0a35bac2776d30d6c9 /starling
parent43adba9ea35bd416f2e5b704c320c25a8b660dc4 (diff)
Rename repl module to repl-server.
Diffstat (limited to 'starling')
-rw-r--r--starling/repl-server.scm (renamed from starling/repl.scm)16
2 files changed, 15 insertions, 14 deletions
diff --git a/starling/kernel.scm b/starling/kernel.scm
index 15e05e3..0608241 100644
--- a/starling/kernel.scm
+++ b/starling/kernel.scm
@@ -46,7 +46,8 @@
#:use-module (starling config)
#:use-module (starling node)
#:use-module (starling node-2d)
- #:use-module (starling repl)
+ ;;#:use-module (starling repl)
+ #:use-module (starling repl-server)
#:use-module (starling minibuffer)
#:use-module (starling scene)
#:use-module (starling system)
@@ -166,7 +167,7 @@
;; FPS counter
(make <fps-display> #:name 'fps)
;; REPL server
- (make <repl> #:name 'repl))
+ (make <repl-server> #:name 'repl-server))
(run-script kernel
(sleep 60)
@@ -303,7 +304,7 @@
(if developer-mode?
(let ((title (sdl2:window-title (window kernel))))
(sdl2:set-window-title! (window kernel) (string-append "[ERROR] " title))
- (on-error (& kernel repl) stack key args)
+ (on-error (& kernel repl-server) stack key args)
(sdl2:set-window-title! (window kernel) title))
(apply throw key args)))
@@ -384,17 +385,17 @@ kernel. A convenient procedure for developers."
(add-minibuffer-command "show-fps" show-fps)
(add-minibuffer-command "hide-fps" hide-fps)
-(define-meta-command ((debug-game lisparuga) repl)
+(define-meta-command ((debug-game starling) repl)
Enter a debugger for the current game loop error."
(debugger (& (current-kernel) repl)))
-(define-meta-command ((resume-game lisparuga) repl)
+(define-meta-command ((resume-game starling) repl)
Resume the game loop without entering a debugger."
(set! (repl-debugging? (& (current-kernel) repl)) #f))
-(define-meta-command ((reboot lisparuga) repl)
+(define-meta-command ((reboot starling) repl)
Reboot the current scene."
diff --git a/starling/repl.scm b/starling/repl-server.scm
index cfaf5b0..b546a0f 100644
--- a/starling/repl.scm
+++ b/starling/repl-server.scm
@@ -16,33 +16,33 @@
;;; Commentary:
-;; REPL for live hacking and debugging.
+;; REPL server for live hacking and debugging from Emacs or whatever.
;;; Code:
-(define-module (starling repl)
+(define-module (starling repl-server)
#:use-module (oop goops)
#:use-module (ice-9 match)
#:use-module (starling node)
#:use-module (system repl coop-server)
#:use-module (system repl debug)
#:use-module (system repl repl)
- #:export (<repl>
+ #:export (<repl-server>
-(define-class <repl> (<node>)
+(define-class <repl-server> (<node>)
(repl-server #:accessor repl-server)
(repl-debug #:accessor repl-debug #:init-form #f)
(repl-debugging? #:accessor repl-debugging? #:init-form #f))
-(define-method (on-boot (repl <repl>))
+(define-method (on-boot (repl <repl-server>))
(set! (repl-server repl) (spawn-coop-repl-server)))
-(define-method (on-error (repl <repl>) stack key args)
+(define-method (on-error (repl <repl-server>) stack key args)
;; Display backtrace.
(let ((port (current-error-port)))
(display "an error has occurred!\n\n" port)
@@ -85,10 +85,10 @@
(set! (repl-debug repl) #f)
(display " done!\n")))
-(define-method (update (repl <repl>) dt)
+(define-method (update (repl <repl-server>) dt)
(poll-coop-repl-server (repl-server repl)))
-(define-method (debugger (repl <repl>))
+(define-method (debugger (repl <repl-server>))
(if (repl-debug repl)
(format #t "~a~%" (debug-error-message (repl-debug repl)))