[plt-scheme] Tip: installing PLAI Scheme in DrScheme 4.2

From: Eli Barzilay (eli at barzilay.org)
Date: Sat Aug 15 23:12:24 EDT 2009

On Aug 16, Xingzhi Pan wrote:
> A quick question to Shriram: I installed PLT 4.2.1 a few days ago and ran
> (require (planet plai/plai:1:3)).
> Then upon this code in the PLAI book, PLT fired an error saying "expand:
> unbound identifier in module in: num"
> (define (parse sexp)
>   (cond
>     [(number? sexp) (num sexp)]
>     [(list? sexp)
>      (case (first sexp)
>        [(+) (add (parse (second sexp))
>                  (parse (third sexp)))]
>        [(-) (sub (parse (second sexp))
>                  (parse (third sexp)))])]))
> Is the reader supposed to write num (and add/sub) to make everything
> work then?

Yes -- you need to write the AE type definition, which defines `num'
and the other constructors.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.