#lang scheme/base ;; This is considered the base language for sweb. All modules depend ;; on it. If something is general enough, it's probably easier to add ;; it here. (define-syntax-rule (require/provide item ...) (begin (require item ...) (provide (all-from-out item ...)))) ;; Node dereference performs automatic (recursive) forcing of dynamic ;; data, which abstracts over: ;; ;; * promises (eval once and memoize) ;; * cache (eval if memo clobbered) ;; * thunks (eval every time) ;; The kind of evaluation strategy needs to be defined at the data's ;; definition point. We use shorthands for one-shot and re-evaluation. (define-syntax-rule (% expr) (delay-dynamic expr)) (define-syntax-rule (%% expr) (thunk-dynamic expr)) (define (! expr) (force-dynamic expr)) ;; Using (provide (all-defined-out)) (require/provide "list-utils.ss" ;; Public zwizwa/lib objects (planet zwizwa/lib/mfile) ;; Private objects. This should be replaced by the new zwizwa/lib/rv ;; objects. (planet zwizwa/lib/x/toc) (planet zwizwa/lib/x/file) (planet zwizwa/lib/x/dynamic) (planet zwizwa/lib/x/misc)) (define (string-append* strs) (apply string-append strs))