racket/collects/games/show-scribbling.ss
Matthew Flatt 18f4087673 Scribbled games docs
svn: r9246
2008-04-11 00:16:05 +00:00

24 lines
662 B
Scheme

#lang scheme/base
(require setup/xref
scribble/xref
scribble/basic
scheme/promise
net/url
net/sendurl)
(provide show-scribbling)
(define (show-scribbling mod-path tag)
(let ([xref (delay (load-collections-xref))])
(lambda ()
(let-values ([(path anchor)
(xref-tag->path+anchor
(force xref)
(list 'part (list (module-path-prefix->string mod-path) tag)))])
(if path
(let ([u (path->url path)])
(send-url (url->string u)))
(error 'show-scribbling "cannot find docs for: ~e ~e" mod-path tag))))))