Use 'scribble-render-as syntax property, to render correctly multi-like #λ forms.
This commit is contained in:
parent
1c7d513cf4
commit
25731ec47e
|
@ -165,7 +165,7 @@
|
|||
(lambda args
|
||||
(define-syntax % (make-rename-transformer #'%1))
|
||||
body))
|
||||
'scribble-render
|
||||
'scribble-render-as
|
||||
aful-scribble-render)
|
||||
))
|
||||
stx)))
|
||||
|
|
|
@ -1,11 +1,19 @@
|
|||
#lang racket
|
||||
(provide aful-scribble-render)
|
||||
|
||||
(define (aful-scribble-render self)
|
||||
(require scribble/manual
|
||||
phc-toolkit/stx)
|
||||
|
||||
(define (aful-scribble-render self id code typeset-code uncode d->s stx-prop)
|
||||
(syntax-case self ()
|
||||
[(_ _ _ body)
|
||||
#`(let ()
|
||||
(local-require scribble-enhanced/with-manual)
|
||||
(elem (list (seclink "_lang_aful" #:doc '(lib "aful/docs/aful.scrbl")
|
||||
(tt "#λ"))
|
||||
(racket body))))]))
|
||||
; #λ(body) reads as:
|
||||
; (lambda args
|
||||
; (define-syntax % (make-rename-transformer #'%1))
|
||||
; body)
|
||||
(with-syntax ([uncode (datum->syntax uncode (syntax-e uncode) self)])
|
||||
(syntax/top-loc self
|
||||
((uncode(seclink "_lang_aful"
|
||||
#:doc '(lib "aful/docs/aful.scrbl")
|
||||
(tt "#λ")))
|
||||
body)))]))
|
Loading…
Reference in New Issue
Block a user