From a34a7e9b7a7d0cae050280b2feee5a3b5030ffc4 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 18 May 2024 14:04:35 -0400 Subject: [PATCH] Add block pushing and wireworld simulation. --- Makefile | 1 + assets/images/cirkoban.png | Bin 1650 -> 1378 bytes game.scm | 158 ++++++++++++++++++++++-- modules/game/actors.scm | 211 +++++++++++++++++++++++++++++++++ modules/goblins/core-types.scm | 5 +- modules/goblins/core.scm | 23 ++-- modules/goblins/ghash.scm | 2 +- modules/guile/list.scm | 7 +- modules/ice-9/control.scm | 1 - modules/ice-9/vlist.scm | 4 +- modules/srfi/srfi-11.scm | 3 + modules/srfi/srfi-9.scm | 3 + 12 files changed, 379 insertions(+), 39 deletions(-) create mode 100644 modules/game/actors.scm create mode 100644 modules/srfi/srfi-11.scm create mode 100644 modules/srfi/srfi-9.scm diff --git a/Makefile b/Makefile index f0d24dd..8a546b9 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ modules = \ modules/dom/image.scm \ modules/dom/media.scm \ modules/dom/window.scm \ + modules/game/actors.scm \ modules/math.scm \ modules/math/rect.scm \ modules/math/vector.scm diff --git a/assets/images/cirkoban.png b/assets/images/cirkoban.png index d918d4da5dc421355887c6874c9bc14e0c62eb7c..940528205c3d47c144aace56f4933abdb74cb3a8 100644 GIT binary patch delta 1122 zcmV-o1fBcx4B`rqyMF|cNkl2{ks6oz58@BsWEu`S#%-T!T#Eint6WHo2i zS@?aDVm1jRe3g*EZ4^Buewn7?WZg@ehV|q9Uxy|oQkFwxe$!ZHdHyzfzoeNf<$Ar{ za$i5~xBfj`eua`TL2-2{zLHsfnwW@x)dcgd?)Ipvs%@Wj0)I~@^6_ym?jL<(E>Hgv zMXnjXE%X6Sul@+8ZI8#Kdg@s`lQy_MF;{5&yJ>Ngs4U8Lfcdg^yO>kroL@FU--C-n z7Uf%E3tL8EV6sRwcl%VQ_FN=Mk(`GEwo!bHlINVv6NoJey@nOmCs=j~YVGn{2Y8!p z$Ztb{k|g>$9)B`UlH;>Z=btOBYjBnRv3D(t(o7q48nf)eX?mR!%&#{$3L70j&fBTy^2=>>{W|Gz6%TO>M5K>sQH7TU^!ZaNz?i{(p3vtS@Y_bq$nd>Av3_kBv&q zaLh(0hS96c3#BM4f4y^anJ&P{Md~t?jQ}^MF)l%!2bxcQ%AV;hN2`gsxIVfqhtl0y zSdqi&QGmnde(Gb4sa|##sHg8A49L)ejt6t-SHc#U_W{Z<7R%$KzL28}>}XEohG{KI zbFa@YPk()_!|(OxE`~V|6TXsVi^o@4SU>ys`?ZEiu`#iJxTXJ$?|yu?e$a7#@FU#c z!2j{9{!;yYg^3S`!?cKX);ROM0Hqgho)1n2Z1!7#vi^V@BJeiZQm2BUD;0)2p8 zg0oJ%=+dhI$ItyvV>G^DBo0R5tu9$0AacAv0yaJc&IG{9~M>Dpm13Y&6$4IC01_g~iAEpYXNa72v$wyYODvHLmjByWGp~ z?EhMcZ5uB7^358fBJQ?rmS0saYyG+oB;@xH)0m$LFKl1cSR%il oS>_{O*4V`3ERz8SSr=Z|f3-Vbb?oybUjP6A07*qoM6N<$f@hIDu>b%7 delta 1400 zcmV-;1&8|L3i1q)yMG0tNklvEeg5QbqSYy$kiC!hh${oiJHg}|JWHk~?n z$os@~SgXyzHv)m824#`w`YPn5f`M`GNn%vmeM^$B*1_JDd2Zxos!BKd0HyQ^rdf6x zoG(eLrMX^jx6Id{w{LlD-=cK+Y2Pz0LH*2VT^Sdk8Ra917=PowOG25i-S@h#+jg~m z+oSsi+5^q|ds&q4Mj|Y<-vQT*PmE zdwU9xr`WY`eSdsUmv>`_T*C^z8s_e_mHedE{FVXUMjvFiK0p)4@*3L1I6ijmTOZ%k zm3ifEU~2i3OLq*4%051j+nDJooFvyrg4y+!NV}B*#JqI@cI{!)Mv|bmZ+(1E*9Ta1 z0Ty!M8|3eD8#4_sP5t=ly5selrW)YAZQD23>ALp1X@A=|bnROo-_w;ly_B+{tJxwRmQ|VXhEsp6W#C|@|+EBjq-G9BpkLM4+OcVY;JNtS}RmroNZrSi~ zI6U4$eRh8My8w+h|G1yD-5EEt5)bo%VHh4BZ{e?en&4mjz&^Q2f?c3{4A8{Gd|(`R z2WlU0w)}?x7aKv}{dO7PFdwMhFtFnj*v?O3A7JBr_!E~KefQgAfI)1Elba8W-F)Eq z1b;T+Y7cChdn9Rpkf2#^nmzZx$9!Py<^$ciYx}qPHBcY@Y^_hi_vnKJ=K+qp-yQ>W z^MNvo)Y=0Vqwu^3x&XTbMh6^G^;&@a z)o-T(>JU=PqnxqPd=$3T@*3DDHvIc(z1{;CZ98&2*nVR<3SXuHy4jnHPU&1nKYzhZ z@pPMJ#(gsU#eD`inGc+g!sp8}z|X7(I4<{Y{w%DWt9r~IR)6#Fe^z2Me!bt|PxaRO z`*PA`vi{Gc$!Wa)Z(9F^wJ=|0vhm^$UH|73%hu{2@JpnxGN;oxLF4Q3I>1T2_5Qvb zx-;LBU*8BT%^nVkM z*8dq-Ki2;(>aF+p<@oh}gFn?exact (floor (/ game-width tile-width)))) +(define level-height (inexact->exact (floor (/ game-height tile-height)))) + +(define *canvas-scale* 0.0) +(define *canvas-width* 0) +(define *canvas-height* 0) (define image:tiles (make-image "assets/images/cirkoban.png")) +;; Game state +(define *actormap* (make-whactormap)) +(define (call-with-goblins thunk) + (actormap-churn-run! *actormap* thunk)) +(define-syntax-rule (with-goblins body ...) + (call-with-goblins (lambda () body ...))) + +(define *level* #f) +;; Latest representation of all actors in level +(define *grid* #f) + +(define *snapshots* '()) +(define (clear-snapshots!) + (set! *snapshots* '())) +(define (save-snapshot!) + (set! *snapshots* (cons (copy-whactormap *actormap*) *snapshots*))) + +(define (update-grid!) + (set! *grid* ($ *level* 'describe))) + +(define (reset-game!) + (set! *actormap* (make-whactormap)) + (clear-snapshots!) + (with-goblins + (set! *level* (spawn ^level level-width level-height)) + (update-grid!))) + +;; Update loop +(define (move-player dir) + (with-goblins + ($ *level* 'move-player dir) + (update-grid!)) + ;; (save-snapshot!) + ) + (define dt (/ 1000.0 60.0)) ; aim for updating at 60Hz (define (update) - #t + ;; TODO: what kind of work do we need to do each frame? (timeout update-callback dt)) (define update-callback (procedure->external update)) -;; Rendering +;; Render loop (define number->string* (let ((cache (make-eq-hashtable))) ; assuming fixnums only (lambda (x) @@ -54,27 +97,98 @@ (hashtable-set! cache x str) str))))) -(define (draw prev-time) - (set-fill-color! context "#140c1c") - (fill-rect context 0.0 0.0 game-width game-height) - (set-fill-color! context "#ffffff") - (set-font! context "bold 24px monospace") - (set-text-align! context "left") - (fill-text context "HELLO" 16.0 36.0) +(define (draw-player x y) (draw-image context image:tiles 0.0 0.0 tile-width tile-height - 100.0 100.0 tile-width tile-height) + (* x tile-width) (* y tile-height) tile-width tile-height)) + +(define (draw-wall type x y) + (match type + ('brick + (draw-image context image:tiles + 32.0 16.0 tile-width tile-height + (* x tile-width) (* y tile-height) tile-width tile-height)) + (_ + (draw-image context image:tiles + 48.0 0.0 tile-width tile-height + (* x tile-width) (* y tile-height) tile-width tile-height))) + (match type + ('electron-head + (draw-image context image:tiles + 64.0 0.0 tile-width tile-height + (* x tile-width) (* y tile-height) tile-width tile-height)) + ('electron-tail + (draw-image context image:tiles + 80.0 0.0 tile-width tile-height + (* x tile-width) (* y tile-height) tile-width tile-height)) + (_ #f))) + +(define (draw-block type x y) + (draw-image context image:tiles + 32.0 0.0 tile-width tile-height + (* x tile-width) (* y tile-height) tile-width tile-height) + (match type + ('electron-head + (draw-image context image:tiles + 64.0 0.0 tile-width tile-height + (* x tile-width) (* y tile-height) tile-width tile-height)) + ('electron-tail + (draw-image context image:tiles + 80.0 0.0 tile-width tile-height + (* x tile-width) (* y tile-height) tile-width tile-height)) + (_ #f))) + +(define (draw-clock-emitter x y) + (draw-image context image:tiles + 48.0 0.0 tile-width tile-height + (* x tile-width) (* y tile-height) tile-width tile-height)) + +(define (draw-tile x y obj) + (match obj + (#f #f) + (('player) (draw-player x y)) + (('wall type) (draw-wall type x y)) + (('block type) (draw-block type x y)) + (('clock-emitter) (draw-clock-emitter x y)))) + +(define (draw-level) + (let ((grid *grid*)) + (let y-loop ((y 0)) + (when (< y level-height) + (let x-loop ((x 0)) + (when (< x level-width) + (draw-tile x y (vector-ref grid (+ (* y level-width) x))) + (x-loop (1+ x)))) + (y-loop (1+ y)))))) + +(define (draw prev-time) + (clear-rect context 0.0 0.0 *canvas-width* *canvas-height*) + (set-fill-color! context "#cbdbfc") + (fill-rect context 0.0 0.0 *canvas-width* *canvas-height*) + (set-transform! context 1.0 0.0 0.0 1.0 0.0 0.0) + (set-scale! context *canvas-scale* *canvas-scale*) + (draw-level) (request-animation-frame draw-callback)) (define draw-callback (procedure->external draw)) ;; Input (define key:left "ArrowLeft") (define key:right "ArrowRight") +(define key:down "ArrowDown") +(define key:up "ArrowUp") (define key:confirm "Enter") (define (on-key-down event) (let ((key (keyboard-event-code event))) - (pk 'key-down key))) + (cond + ((string=? key key:left) + (move-player 'left)) + ((string=? key key:right) + (move-player 'right)) + ((string=? key key:up) + (move-player 'up)) + ((string=? key key:down) + (move-player 'down))))) (define (on-key-up event) (let ((key (keyboard-event-code event))) @@ -83,11 +197,33 @@ ;; Canvas and event loop setup (define canvas (get-element-by-id "canvas")) (define context (get-context canvas "2d")) + +(define (resize-canvas) + (let* ((win (current-window)) + (w (window-inner-width win)) + (h (window-inner-height win)) + (gw (inexact->exact game-width)) + (gh (inexact->exact game-height)) + (scale (max (min (quotient w gw) (quotient h gh)) 1)) + (cw (* gw scale)) + (ch (* gh scale))) + (set-element-width! canvas cw) + (set-element-height! canvas ch) + (set-image-smoothing-enabled! context 0) + (set! *canvas-scale* (exact->inexact scale)) + (set! *canvas-width* (* game-width *canvas-scale*)) + (set! *canvas-height* (* game-height *canvas-scale*)) + (pk 'resize-canvas *canvas-scale* *canvas-width* *canvas-height*))) + (set-element-width! canvas (inexact->exact game-width)) (set-element-height! canvas (inexact->exact game-height)) +(add-event-listener! (current-window) "resize" + (procedure->external (lambda (_) (resize-canvas)))) (add-event-listener! (current-document) "keydown" (procedure->external on-key-down)) (add-event-listener! (current-document) "keyup" (procedure->external on-key-up)) +(resize-canvas) (request-animation-frame draw-callback) (timeout update-callback dt) +(reset-game!) diff --git a/modules/game/actors.scm b/modules/game/actors.scm new file mode 100644 index 0000000..8035b93 --- /dev/null +++ b/modules/game/actors.scm @@ -0,0 +1,211 @@ +(define-module (game actors) + #:use-module (dom canvas) + #:use-module (goblins core) + #:use-module (ice-9 match) + #:export (^cell + ^level)) + +;; ^wall +;; ^wire +;; ^electron-head +;; ^electron-tail + +(define* (^cell bcom #:optional val) + (case-lambda + (() val) + ((new-val) + (bcom (^cell bcom new-val))))) + +(define (^wall bcom type) + (match-lambda* + (('tick) #f) + (('wire-state) + (match type + ((or 'copper 'electron-head 'electron-tail) + type) + (_ #f))) + (('set-wire-state type) + (bcom (^wall bcom type))) + (('describe) `(wall ,type)) + (('collide) 'stop))) + +(define (^block bcom type) + (match-lambda* + (('tick) #f) + (('wire-state) + (match type + ((or 'copper 'electron-head 'electron-tail) + type) + (_ #f))) + (('set-wire-state type) + (bcom (^block bcom type))) + (('describe) `(block ,type)) + (('collide) 'displace))) + +(define (^clock-emitter bcom interval) + (define timer (spawn ^cell 0)) + (match-lambda* + (('tick) ($ timer (+ ($ timer) 1))) + (('wire-state) + (let ((t ($ timer))) + (cond + ((= (modulo t interval) 0) + 'electron-head) + ((= (modulo t interval) 1) + 'electron-tail) + (else + 'copper)))) + (('set-wire-state type) #f) + (('describe) '(clock-emitter)) + (('collide) 'stop))) + +(define (^player bcom) + (match-lambda* + (('tick) #f) + (('wire-state) #f) + (('describe) '(player)))) + +(define (^level bcom width height) + (define player (spawn ^player)) + (define player-coords (spawn ^cell)) + (define (make-grid) + (make-vector (* width height))) + (define grid (make-grid)) + (define (grid-ref grid x y) + (vector-ref grid (+ (* y width) x))) + (define (grid-ref/wrap grid x y) + (grid-ref grid (modulo x width) (modulo y height))) + (define (grid-set! grid x y val) + (vector-set! grid (+ (* y width) x) val)) + (define (for-each-coord proc) + (let y-loop ((y 0)) + (when (< y height) + (let x-loop ((x 0)) + (when (< x width) + (proc x y) + (x-loop (1+ x)))) + (y-loop (1+ y))))) + (define (wrap-x x) + (modulo x width)) + (define (wrap-y y) + (modulo y height)) + ;; Assumes that dx/dy are in the range [0,1]. + (define (move-player dx dy) + (match ($ player-coords) + (#(old-x old-y) + (let* ((x (wrap-x (+ old-x dx))) + (y (wrap-y (+ old-y dy))) + (old-cell (grid-ref grid old-x old-y)) + (cell (grid-ref grid x y))) + (match ($ cell) + (#f + ($ old-cell #f) + ($ cell player) + ($ player-coords (vector x y))) + (occupant + (match ($ occupant 'collide) + ('stop #f) + ('displace + (let ((next-cell (grid-ref grid (wrap-x (+ x dx)) (wrap-y (+ y dy))))) + (match ($ next-cell) + (#f + ($ next-cell ($ cell)) + ($ cell player) + ($ old-cell #f) + ($ player-coords (vector x y))) + (_ #f))))))))))) + (define (warp-player x y) + ($ (grid-ref grid x y) player) + (match ($ player-coords) + (#f + ($ player-coords (vector x y))) + (#(old-x old-y) + ($ player-coords (vector x y)) + ($ (grid-ref grid old-x old-y) #f)))) + (define (tick) + (define (neighbors x y) + (define (check x y) + (match ($ (grid-ref/wrap grid x y)) + (#f 0) + (refr + (match ($ refr 'wire-state) + ('electron-head 1) + (_ 0))))) + (+ (check (- x 1) (- y 1)) + (check x (- y 1)) + (check (+ x 1) (- y 1)) + (check (+ x 1) y) + (check (+ x 1) (+ y 1)) + (check x (+ y 1)) + (check (- x 1) (+ y 1)) + (check (- x 1) y))) + (for-each (match-lambda + ((refr . wire-state) + ($ refr 'set-wire-state wire-state))) + (let y-loop ((y 0) (updates '())) + (if (< y height) + (y-loop (1+ y) + (let x-loop ((x 0) (updates updates)) + (if (< x width) + (match ($ (grid-ref grid x y)) + (#f (x-loop (1+ x) updates)) + (refr + ($ refr 'tick) + (match ($ refr 'wire-state) + (#f (x-loop (1+ x) updates)) + ('copper + (if (<= 1 (neighbors x y) 2) + (x-loop (1+ x) (cons `(,refr . electron-head) updates)) + (x-loop (1+ x) updates))) + ('electron-head + (x-loop (1+ x) (cons `(,refr . electron-tail) updates))) + ('electron-tail + (x-loop (1+ x) (cons `(,refr . copper) updates)))))) + updates))) + updates)))) + + ;; Initialize grid cells + (for-each-coord + (lambda (x y) + (grid-set! grid x y (spawn ^cell)))) + + ;; TODO: actually write levels + (warp-player 10 8) + ($ (grid-ref grid 4 4) (spawn ^wall 'brick)) + + ($ (grid-ref grid 4 3) (spawn ^clock-emitter 3)) + ($ (grid-ref grid 5 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 6 4) (spawn ^block 'copper)) + ($ (grid-ref grid 7 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 8 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 9 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 10 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 11 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 12 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 13 2) (spawn ^wall 'copper)) + ($ (grid-ref grid 13 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 13 4) (spawn ^wall 'copper)) + ($ (grid-ref grid 14 2) (spawn ^wall 'copper)) + ($ (grid-ref grid 14 4) (spawn ^wall 'copper)) + ($ (grid-ref grid 15 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 16 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 17 3) (spawn ^wall 'copper)) + ($ (grid-ref grid 18 3) (spawn ^wall 'copper)) + + (match-lambda* + (('describe) + (let ((grid* (make-grid))) + (for-each-coord + (lambda (x y) + (grid-set! grid* x y + (match ($ (grid-ref grid x y)) + (#f #f) + (refr ($ refr 'describe)))))) + grid*)) + (('move-player dir) + (match dir + ('up (move-player 0 -1)) + ('down (move-player 0 1)) + ('left (move-player -1 0)) + ('right (move-player 1 0))) + (tick)))) diff --git a/modules/goblins/core-types.scm b/modules/goblins/core-types.scm index a0fbf5b..fde9e2a 100644 --- a/modules/goblins/core-types.scm +++ b/modules/goblins/core-types.scm @@ -23,6 +23,7 @@ (define-module (goblins core-types) #:use-module (hoot hashtables) #:use-module (ice-9 match) + #:use-module (srfi srfi-9) #:export ( _make-actormap actormap? @@ -89,10 +90,6 @@ live-refr? promise-refr?)) -;; hoot hacks - -(define *unspecified* (if #f #f)) - ;; Actormaps, etc ;; ============== (define-record-type diff --git a/modules/goblins/core.scm b/modules/goblins/core.scm index f13a82b..6d80350 100644 --- a/modules/goblins/core.scm +++ b/modules/goblins/core.scm @@ -102,24 +102,22 @@ near-resolved-promise-value ;; test-core.scm needs these; they are not otherwise exported - *unspecified* transactormap-set! transactormap-ref mactor:local-link?) - #:pure - #:use-module ((hoot errors) #:select (raise-exception)) + #:use-module (hoot bytevectors) #:use-module ((hoot error-handling) #:select (format-exception)) - #:use-module (hoot exceptions) + #:use-module ((hoot exceptions) #:select (make-exception-with-irritants)) #:use-module (hoot hashtables) - #:use-module (hoot match) - #:use-module ((hoot syntax) #:select (define*)) - #:use-module (ice-9 control) - #:use-module (ice-9 vlist) + #:use-module ((hoot ports) #:select (flush-output-port)) + #:use-module ((ice-9 control) #:select (call/ec)) + #:use-module (ice-9 match) #:use-module (ice-9 q) + #:use-module (ice-9 vlist) #:use-module (goblins core-types) #:use-module (goblins ghash) - #:use-module (scheme base) - #:use-module (scheme write)) + #:use-module (srfi srfi-9) + #:use-module (srfi srfi-11)) ;;; Utilities (which should be moved to their own modules) @@ -128,8 +126,6 @@ ;;; hoot hacks -(define *unspecified* (if #f #f)) - ;;; Here's basically your pre-goblins area. ;; mimic Racket's seteq @@ -2110,7 +2106,8 @@ Type: Actormap (-> Any) (Optioan (#:reckless? Boolean)) -> Any" (display msg (current-error-port)) (newline (current-error-port)) (display ";; exception: " (current-error-port)) (format-exception err (current-error-port)) - (newline (current-error-port)) (flush-output-port (current-error-port))) + (newline (current-error-port)) + (flush-output-port (current-error-port))) (define (make-no-op msg) (lambda _ *unspecified*)) diff --git a/modules/goblins/ghash.scm b/modules/goblins/ghash.scm index 0758f45..2845f81 100644 --- a/modules/goblins/ghash.scm +++ b/modules/goblins/ghash.scm @@ -28,7 +28,7 @@ #:use-module (hoot hashtables) #:use-module ((hoot lists) #:select (fold)) #:use-module (ice-9 match) - #:use-module (scheme write) + #:use-module (srfi srfi-9) #:export (make-ghash ghash? diff --git a/modules/guile/list.scm b/modules/guile/list.scm index 916fb3c..210f4f8 100644 --- a/modules/guile/list.scm +++ b/modules/guile/list.scm @@ -22,7 +22,7 @@ ;;; Code: (define-module (guile list) - #:export (delete delq delq! last-pair)) + #:export (delete delq delq!)) (define (fold proc acc lst) (if (null? lst) @@ -34,11 +34,6 @@ (define (fold-right proc acc lst) (fold proc acc (reverse lst))) -(define (last-pair lst) - (if (null? (cdr lst)) - lst - (last-pair (cdr lst)))) - (define (delete item lst . eq-pair) (define eq (if (pair? eq-pair) (car eq-pair) equal?)) (fold-right (lambda (i acc) diff --git a/modules/ice-9/control.scm b/modules/ice-9/control.scm index 38717dd..f15f3d4 100644 --- a/modules/ice-9/control.scm +++ b/modules/ice-9/control.scm @@ -23,7 +23,6 @@ ;;; Code: (define-module (ice-9 control) - #:use-module (hoot control) #:export (make-prompt-tag default-prompt-tag call-with-prompt diff --git a/modules/ice-9/vlist.scm b/modules/ice-9/vlist.scm index cdcb8cf..74b9481 100644 --- a/modules/ice-9/vlist.scm +++ b/modules/ice-9/vlist.scm @@ -44,9 +44,9 @@ ;;; Code: (define-module (ice-9 vlist) - #:use-module (hoot fluids) #:use-module (hoot hashtables) #:use-module ((hoot lists) #:select (fold)) + #:use-module (srfi srfi-9) #:export (vlist? vlist-cons vlist-head vlist-tail vlist-null? vlist-null list->vlist vlist-ref vlist-drop vlist-take vlist-length vlist-fold vlist-fold-right vlist-map @@ -65,8 +65,6 @@ ;;; Hoot Hacks™ (not really ™) ;; XXX hashes using equal? and eqv? have not been defined; use only eq? -(define equal? eq?) -(define eqv? eq?) (define hash hashq) (define hashv hashq) (define (fold-right proc init lst) diff --git a/modules/srfi/srfi-11.scm b/modules/srfi/srfi-11.scm new file mode 100644 index 0000000..764fdcb --- /dev/null +++ b/modules/srfi/srfi-11.scm @@ -0,0 +1,3 @@ +(define-module (srfi srfi-11) + #:use-module ((hoot syntax) #:select (let-values let*-values)) + #:re-export (let-values let*-values)) diff --git a/modules/srfi/srfi-9.scm b/modules/srfi/srfi-9.scm new file mode 100644 index 0000000..ef5dcbb --- /dev/null +++ b/modules/srfi/srfi-9.scm @@ -0,0 +1,3 @@ +(define-module (srfi srfi-9) + #:use-module ((scheme base) #:select (define-record-type)) + #:re-export (define-record-type))