diff --git a/whalesong/world.rkt b/whalesong/world.rkt index 734f317..85ccf23 100644 --- a/whalesong/world.rkt +++ b/whalesong/world.rkt @@ -1,7 +1,5 @@ #lang s-exp "lang/base.rkt" (require "world/main.rkt") -(require "world/types.rkt") -(provide (all-from-out "world/main.rkt") - (all-from-out "world/types.rkt")) +(provide (all-from-out "world/main.rkt")) diff --git a/whalesong/world/impl.rkt b/whalesong/world/impl.rkt new file mode 100644 index 0000000..dc28b67 --- /dev/null +++ b/whalesong/world/impl.rkt @@ -0,0 +1,27 @@ +#lang s-exp "../lang/js/js.rkt" + +(require "../image.rkt" + "types.rkt") + +(declare-implementation + #:racket "racket-impl.rkt" + #:javascript ( + ;; the raw implementation doesn't know anything about + ;; Whalesong. + "raw-jsworld.js" + + ;; We add Whalesong-specific things here. + "kernel.js" + "js-impl.js" + ) + #:provided-values (big-bang + on-tick + on-key + on-release + on-mouse + key=? + to-draw + stop-when)) + + + diff --git a/whalesong/world/main.rkt b/whalesong/world/main.rkt index dc28b67..f02a5aa 100644 --- a/whalesong/world/main.rkt +++ b/whalesong/world/main.rkt @@ -1,27 +1,7 @@ -#lang s-exp "../lang/js/js.rkt" +#lang s-exp "../lang/base.rkt" -(require "../image.rkt" +(require "impl.rkt" "types.rkt") -(declare-implementation - #:racket "racket-impl.rkt" - #:javascript ( - ;; the raw implementation doesn't know anything about - ;; Whalesong. - "raw-jsworld.js" - - ;; We add Whalesong-specific things here. - "kernel.js" - "js-impl.js" - ) - #:provided-values (big-bang - on-tick - on-key - on-release - on-mouse - key=? - to-draw - stop-when)) - - - +(provide (all-from-out "impl.rkt") + (all-from-out "types.rkt")) diff --git a/whalesong/world/racket-impl.rkt b/whalesong/world/racket-impl.rkt index 596b52f..dd1b00b 100644 --- a/whalesong/world/racket-impl.rkt +++ b/whalesong/world/racket-impl.rkt @@ -1,5 +1,7 @@ #lang s-exp "../lang/base.rkt" +(require "types.rkt") + (provide big-bang to-draw on-tick