Commit 0e1e9abb authored by Dan Holtby's avatar Dan Holtby
Browse files

fix intermediate student bug

parent affae0e2
......@@ -7,5 +7,5 @@
(define scribblings '(("scribblings/htdp-trace.scrbl")))
(define pkg-desc "Wrapper for racket/trace that allows it to be used in Beginning Student (HtDP)")
(define version "1.1")
(define version "1.2")
(define pkg-authors '(djholtby))
......@@ -16,10 +16,11 @@
; generate a fake name for the real function. temporaries are always distinct
[f1 (datum->syntax stx (string->uninterned-symbol (symbol->string (syntax->datum #'f))))])
(syntax/loc stx
(begin
(define (f1 arg ...) body)
(trace f1)
(student-define (f arg ...) (f1 arg ...)))))]
(student-define (f arg ...)
(begin
(define (f1 arg ...) body)
(trace f1)
(f1 arg ...)))))]
[(_ name value) ; if they try to use it to define a constant
(raise-syntax-error 'define/trace "define/trace can only be used to define functions" stx)]
[(_ arg ...) ; other cases it just maps to a define so that that syntax can raise its own errors
......
#lang info
(define collection "uwaterloo-racket-tools")
(define deps '("base" ("htdp-trace" #:version "1.1") "graphic-block"))
(define deps '("base" ("htdp-trace" #:version "1.2") "graphic-block"))
(define pkg-desc
"Metapackage for tools and libraries used by the University of Waterloo's first year courses")
(define version "1.1")
(define version "1.2")
(define pkg-authors '(djholtby))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment