From 07f9b843a683ea1f8c91c5101a051e16b622e05c Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Sat, 29 Feb 2020 11:52:44 +0100 Subject: [PATCH] fix syntax/parse docs: add pretty-printing to evaluator --- pkgs/racket-doc/syntax/scribblings/parse/parse-common.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/racket-doc/syntax/scribblings/parse/parse-common.rkt b/pkgs/racket-doc/syntax/scribblings/parse/parse-common.rkt index ca8644a501..d285c04e97 100644 --- a/pkgs/racket-doc/syntax/scribblings/parse/parse-common.rkt +++ b/pkgs/racket-doc/syntax/scribblings/parse/parse-common.rkt @@ -47,6 +47,7 @@ (thunk))))]) (make-evaluator 'racket/base #:requires (let ([mods '(racket/promise + racket/pretty syntax/parse syntax/parse/debug syntax/parse/experimental/splicing @@ -58,7 +59,10 @@ syntax/transformer)]) `((for-syntax racket/base ,@mods) ,@mods))))))) - (when short? (the-eval '(error-print-source-location #f))) + (call-in-sandbox-context the-eval + (lambda () + (current-print (dynamic-require 'racket/pretty 'pretty-print-handler)) + (when short? (error-print-source-location #f)))) the-eval) ;; ----