adjusted the way the teaching languages work so that signature
violations in the REPL are tracked.
This commit is contained in:
parent
058c05258e
commit
fed1e3dc3e
|
@ -19,6 +19,7 @@
|
||||||
compiler/embed
|
compiler/embed
|
||||||
wxme/wxme
|
wxme/wxme
|
||||||
setup/dirs
|
setup/dirs
|
||||||
|
test-engine/racket-tests
|
||||||
|
|
||||||
;; this module is shared between the drscheme's namespace (so loaded here)
|
;; this module is shared between the drscheme's namespace (so loaded here)
|
||||||
;; and the user's namespace in the teaching languages
|
;; and the user's namespace in the teaching languages
|
||||||
|
@ -548,6 +549,22 @@
|
||||||
(htdp-lang-settings-teachpacks settings)
|
(htdp-lang-settings-teachpacks settings)
|
||||||
(drscheme:rep:current-rep)))
|
(drscheme:rep:current-rep)))
|
||||||
|
|
||||||
|
(define/override (front-end/interaction port settings)
|
||||||
|
(let ([t (super front-end/interaction port settings)]
|
||||||
|
[done? #f])
|
||||||
|
(λ ()
|
||||||
|
(cond
|
||||||
|
[done? eof]
|
||||||
|
[else
|
||||||
|
(let ([ans (t)])
|
||||||
|
(cond
|
||||||
|
[(eof-object? ans)
|
||||||
|
(set! done? #t)
|
||||||
|
#`(test)]
|
||||||
|
[else
|
||||||
|
ans]))]))))
|
||||||
|
|
||||||
|
|
||||||
(define keywords #f)
|
(define keywords #f)
|
||||||
(define/augment (capability-value key)
|
(define/augment (capability-value key)
|
||||||
(case key
|
(case key
|
||||||
|
|
|
@ -59,7 +59,13 @@
|
||||||
,@(map (λ (x) `(require ,x)) teachpacks)
|
,@(map (λ (x) `(require ,x)) teachpacks)
|
||||||
,@body-exps
|
,@body-exps
|
||||||
,@(if enable-testing?
|
,@(if enable-testing?
|
||||||
(if (null? body-exps) '() `((,#'test)))
|
(if (null? body-exps)
|
||||||
|
'()
|
||||||
|
;; this definition pulls the test~object binding from the user's namespace
|
||||||
|
;; over to the one that is used in the REPL when module->namepsace
|
||||||
|
;; grabs a hold of this module to make a namespace for the REPL
|
||||||
|
`(,#'(define test~object (namespace-variable-value 'test~object))
|
||||||
|
(,#'test)))
|
||||||
'()))))
|
'()))))
|
||||||
rep)))]
|
rep)))]
|
||||||
[(require)
|
[(require)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user