[plt-scheme] Can't see the tree for the forest

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sun Jul 8 16:16:31 EDT 2007

Hi all,

As the title suggest I have a "Can't see the tree for the forest"
type of problem.

In the attached implementation of a simple begin-like control
construct with labels and gotos the last touch (aka error handling)
is bugging me.

I'd like a goto to an unknown label to give the error: "unknown label".
To do this I have collected all known label names with

  (with-syntax ([(name1 ...)
    (map name-of-label
      (filter label?
         (syntax->list #'((label start) label-or-expr ...))))])

In the goto macro (which expands (goto name) into (name), when
the name is known label, I want to check whether the
name is known or not. For some reason that escapes me,
the test
   (srfi:member #'name (syntax->list #'(name1 ...)) module-identifier=?)
fails for both known and unknown label names.

In the attached file, the test has been replaced with #t in order
to test the rest.

What am I missing?

-- 
Jens Axel Søgaard

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: begin-with-goto.scm
URL: <http://lists.racket-lang.org/users/archive/attachments/20070708/6910275b/attachment.ksh>

Posted on the users mailing list.