diff --git a/cache.rkt b/cache.rkt index a297586..7889116 100644 --- a/cache.rkt +++ b/cache.rkt @@ -1,6 +1,6 @@ #lang racket/base (require racket/rerequire) -(require "debug.rkt" sugar/coerce) +(require "debug.rkt" sugar/coercion/values) ;; The cache is a hash with paths as keys. ;; The cache values are also hashes, with key/value pairs for that path. diff --git a/predicates.rkt b/predicates.rkt index 03f2e2c..8763a0f 100644 --- a/predicates.rkt +++ b/predicates.rkt @@ -1,6 +1,6 @@ #lang racket/base (require racket/contract racket/match racket/set) -(require css-tools/html sugar txexpr) +(require chirp/html sugar txexpr) (require "world.rkt" "file-tools.rkt" "debug.rkt") (provide (all-from-out "file-tools.rkt")) diff --git a/render.rkt b/render.rkt index 35457e0..cafb332 100644 --- a/render.rkt +++ b/render.rkt @@ -5,19 +5,6 @@ (module+ test (require rackunit)) -(define-syntax (define+provide+safe stx) - (syntax-case stx () - [(_ (proc arg ... . rest-arg) contract body ...) - #'(define+provide+safe proc contract - (λ(arg ... . rest-arg) body ...))] - [(_ name contract body ...) - #'(begin - (define name body ...) - (provide name) - (module+ safe - (provide (contract-out [name contract]))))])) - - ;; for shared use by eval & system (define nowhere-port (open-output-nowhere)) @@ -197,7 +184,7 @@ (copy-file (build-path (world:current-server-extras-path) world:fallback-template) ft-path #t) ft-path))) - (render template-path #:force force-render) ; bc template might have its own preprocessor source + (render template-path #:force force-render) ; because template might have its own preprocessor source ;; 2) Render the source file with template, if needed. diff --git a/template.rkt b/template.rkt index a8b0e08..d3633ef 100644 --- a/template.rkt +++ b/template.rkt @@ -6,8 +6,8 @@ (module+ test (require rackunit racket/path)) (provide (all-defined-out)) -(require sugar/scribble sugar/coerce) -(provide (all-from-out sugar/scribble sugar/coerce)) +(require sugar/scribble sugar/coercion/values) +(provide (all-from-out sugar/scribble sugar/coercion/values)) ;; todo: docstrings for this subsection @@ -118,5 +118,8 @@ +(define/contract (->html x) + (txexpr? . -> . string?) + (txexpr->html x))