Prior to v6.3, I was able to create a BSL evaluator with the following set up:
@(define-syntax-rule
(*sl-eval module-lang reader def ...)
;; ===>>>
(let ()
(define me (make-base-eval))
(me '(require (only-in racket empty? first rest cons? sqr true false)))
(me '(require lang/posn))
(me '(require racket/pretty))
(me '(current-print pretty-print-handler))
(me '(pretty-print-columns 65))
(me 'def)
...
(call-in-sandbox-context me (lambda () (error-print-source-location #f)))
(call-in-sandbox-context me (lambda ()
((dynamic-require 'htdp/bsl/runtime
'configure)
(dynamic-require reader
'options))))
(call-in-sandbox-context me (lambda () (namespace-require module-lang)))
(interaction-eval #:eval me (require 2htdp/image))
(interaction-eval #:eval me (require 2htdp/batch-io))
;; --- splice in the defs
me))
@(define-syntax-rule
(bsl-eval def ...)
(*sl-eval 'lang/htdp-beginner 'htdp/bsl/lang/reader def ...))
I would expect the following to show the results in the way they appear in BSL:
@interaction[#:eval (bsl-eval)
(cons 'a (cons 'b '()))
(make-posn 1 2)
]
Instead of getting this (which is what I want):
> (cons 'a (cons 'b '()))
(cons 'a (cons 'b '()))
> (make-posn 1 2)
(make-posn 1 2)
I'm now get this:
> (cons 'a (cons 'b '()))
'(a b)
> (make-posn 1 2)
(posn 1 2)
Is there something about the set up that I need to change so that the output
syntax is consistent with BSL?
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.