default  Access: viewconf PLT Bugs
Main PageQuick QueryStandard QueryAdvanced QueryHelp
Edit

View Problem Report: 10811

send email to interested parties or send email followup to audit-trail
Reporter's email: eck.doerry@nau.edu
Number: 10811
Category: all
Synopsis: define-syntax appears to be broken
Class: sw-bug
Responsible: nobody
Notify-List:
Severity: serious
Priority: medium
State: open
Confidential: no
Arrival-Date: Fri Mar 05 02:32:02 -0500 2010
Closed-Date:
Last-Modified: Fri Mar 05 07:56:02 -0500 2010
Originator: Eck Doerry
Organization: plt
Submitter-Id: unknown
Release: 4.2.4
Environment: macosx "Darwin noname 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov  3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 i386" (i386-macosx/3m) (get-display-depth) = 32
Human Language: english
(current-memory-use) 180513224

Collections:
(("/Users/edo/Library/PLT Scheme/4.2.4/collects" non-existent-path) ("/Applications/PLT Scheme v4.2.4/collects" "2htdp" "afm" "algol60" "at-exp" "browser" "combinator-parser" "compiler" "config" "defaults" "deinprogramm" "drscheme" "dynext" "embedded-gui" "eopl" "errortrace" "ffi" "file" "framework" "frtime" "games" "graphics" "gui-debugger" "help" "hierlist" "htdp" "html" "icons" "info-domain" "lang" "launcher" "lazy" "macro-debugger" "make" "mred" "mrlib" "mysterx" "mzcom" "mzlib" "mzscheme" "net" "openssl" "parser-tools" "planet" "plot" "preprocessor" "profile" "r5rs" "r6rs" "readline" "redex" "rnrs" "s-exp" "scheme" "scribble" "scribblings" "scriblib" "setup" "sgl" "slatex" "slideshow" "srfi" "stepper" "string-constants" "swindle" "syntax" "syntax-color" "teachpack" "test-box-recovery" "test-engine" "tex2page" "texpict" "trace" "typed" "typed-scheme" "unstable" "version" "web-server" "wxme" "xml"))
Computer Language: (("Teaching Languages" "Essentials of Programming Languages (3rd ed.)") #(#t write mixed-fraction-e #f #t debug))
Description: The define-syntax macro facility in EoPL Scheme appears to
be broken.  I don't pretend to understand how all the expansion
"phases" work; the fact is that your own example from the manual
produces an error.  Note that it works fine (with appropriately
adjusted syntax) in RSR5 language mode).
Again, below I show your own example from the reference doc
PLT Scheme v4.2.4/doc/eopl/index.html
failing.  Of course, none of my own macros work either.
File Attachments:
How-To-Repeat: Welcome to DrScheme, version 4.2.4 [3m].
Language: Essentials of Programming Languages (3rd ed.); memory limit: 128 megabytes.
> (define-syntax foo
      (syntax-rules ()
        ((_ a ...)
         (printf "~a\n" (list a ...)))))
require: namespace mismatch; reference (phase 1) to a module "/Applications/PLT Scheme v4.2.4/collects/errortrace/errortrace-key.ss" that is not available (phase level 0) in: errortrace-key
>
Fix:
Release-Note:
Unformatted:

send email to interested parties or send email followup to audit-trail

Audit Trail:

From: Ryan Culpepper <ryanc@ccs.neu.edu>
To: eck.doerry@nau.edu, bugs@plt-scheme.org
Cc: nobody@plt-scheme.org, bug-notification@plt-scheme.org
Subject: Re: [plt-bug] all/10811: define-syntax appears to be broken
Date: Fri, 05 Mar 2010 03:13:14 -0500

 There seems to be a bug in the interaction between DrScheme's debugging 
 mode ("errortrace") and the EOPL language level. There are two workarounds:
 
 1) Disable debugging in DrScheme. To do this, open the "Language" menu 
 and select "Choose Language". Click the "Show Details" button, select 
 the "No debugging or profiling" option, and then click "OK".
 
 2) Specify the EOPL language in your program's source rather than 
 selecting it as the DrScheme language level.
 
 To do this, open the "Choose Language" dialog (see above) and select the 
 "Use the language declared in the source" option. Then add the line 
 "#lang eopl" as the first line of your program. For example:
 
    #lang eopl
    (define-syntax foo
      (syntax-rules ()
        ((_ a ...)
         (eopl:printf "~a\n" (list a ...)))))
    (foo 1 2 3)
 
 Note that in the "eopl" language, printf is renamed eopl:printf.
 
 Ryan
 
 
 
 eck.doerry@nau.edu wrote:
 > A new problem report is waiting at
 >   http://bugs.plt-scheme.org/query/?cmd=view&pr=10811
 > 
 > Reported by Eck Doerry for release: 4.2.4
 > 
 > *** Description:
 > The define-syntax macro facility in EoPL Scheme appears to 
 > be broken.  I don't pretend to understand how all the expansion
 > "phases" work; the fact is that your own example from the manual
 > produces an error.  Note that it works fine (with appropriately
 > adjusted syntax) in RSR5 language mode).
 > Again, below I show your own example from the reference doc
 > PLT Scheme v4.2.4/doc/eopl/index.html
 > failing.  Of course, none of my own macros work either.
 > 
 > *** How to repeat:
 > Welcome to DrScheme, version 4.2.4 [3m].
 > Language: Essentials of Programming Languages (3rd ed.); memory limit: 128 megabytes.
 >> (define-syntax foo
 >       (syntax-rules ()
 >         ((_ a ...)
 >          (printf "~a\n" (list a ...)))))
 > require: namespace mismatch; reference (phase 1) to a module "/Applications/PLT Scheme v4.2.4/collects/errortrace/errortrace-key.ss" that is not available (phase level 0) in: errortrace-key
 > 
 > *** Environment:
 > macosx "Darwin noname 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov  3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 i386" (i386-macosx/3m) (get-display-depth) = 32
 > Human Language: english
 > (current-memory-use) 180513224
 > 
 > Collections:
 > (("/Users/edo/Library/PLT Scheme/4.2.4/collects" non-existent-path) ("/Applications/PLT Scheme v4.2.4/collects" "2htdp" "afm" "algol60" "at-exp" "browser" "combinator-parser" "compiler" "config" "defaults" "deinprogramm" "drscheme" "dynext" "embedded-gui" "eopl" "errortrace" "ffi" "file" "framework" "frtime" "games" "graphics" "gui-debugger" "help" "hierlist" "htdp" "html" "icons" "info-domain" "lang" "launcher" "lazy" "macro-debugger" "make" "mred" "mrlib" "mysterx" "mzcom" "mzlib" "mzscheme" "net" "openssl" "parser-tools" "planet" "plot" "preprocessor" "profile" "r5rs" "r6rs" "readline" "redex" "rnrs" "s-exp" "scheme" "scribble" "scribblings" "scriblib" "setup" "sgl" "slatex" "slideshow" "srfi" "stepper" "string-constants" "swindle" "syntax" "syntax-color" "teachpack" "test-box-recovery" "test-engine" "tex2page" "texpict" "trace" "typed" "typed-scheme" "unstable" "version" "web-server" "wxme" "xml"))
 > Computer Language: (("Teaching Languages" "Essentials of Programming Languages (3rd ed.)") #(#t write mixed-fraction-e #f #t debug))
 > 
 
From: Robby Findler <robby@eecs.northwestern.edu>
To: eck.doerry@nau.edu, bugs@plt-scheme.org
Cc: nobody@plt-scheme.org, bug-notification@plt-scheme.org
Subject: Re: [plt-bug] all/10811: define-syntax appears to be broken
Date: Fri, 5 Mar 2010 06:47:01 -0600

 A workaround until the bug is fixed: disable debugging. In the
 language dialog, click "show details" and then click the "no debugging
 or profiling" radio box.
 
 Robby
 
 On Fri, Mar 5, 2010 at 1:32 AM,  <eck.doerry@nau.edu> wrote:
 > A new problem report is waiting at
 > =C2=A0http://bugs.plt-scheme.org/query/?cmd=3Dview&pr=3D10811
 >
 > Reported by Eck Doerry for release: 4.2.4
 >
 > *** Description:
 > The define-syntax macro facility in EoPL Scheme appears to
 > be broken. =C2=A0I don't pretend to understand how all the expansion
 > "phases" work; the fact is that your own example from the manual
 > produces an error. =C2=A0Note that it works fine (with appropriately
 > adjusted syntax) in RSR5 language mode).
 > Again, below I show your own example from the reference doc
 > PLT Scheme v4.2.4/doc/eopl/index.html
 > failing. =C2=A0Of course, none of my own macros work either.
 >
 > *** How to repeat:
 > Welcome to DrScheme, version 4.2.4 [3m].
 > Language: Essentials of Programming Languages (3rd ed.); memory limit: 12=
 8 megabytes.
 >> (define-syntax foo
 > =C2=A0 =C2=A0 =C2=A0(syntax-rules ()
 > =C2=A0 =C2=A0 =C2=A0 =C2=A0((_ a ...)
 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 (printf "~a\n" (list a ...)))))
 > require: namespace mismatch; reference (phase 1) to a module "/Applicatio=
 ns/PLT Scheme v4.2.4/collects/errortrace/errortrace-key.ss" that is not ava=
 ilable (phase level 0) in: errortrace-key
 >>
 >
 > *** Environment:
 > macosx "Darwin noname 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov =C2=A0=
 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 i386" (i386-mac=
 osx/3m) (get-display-depth) =3D 32
 > Human Language: english
 > (current-memory-use) 180513224
 >
 > Collections:
 > (("/Users/edo/Library/PLT Scheme/4.2.4/collects" non-existent-path) ("/Ap=
 plications/PLT Scheme v4.2.4/collects" "2htdp" "afm" "algol60" "at-exp" "br=
 owser" "combinator-parser" "compiler" "config" "defaults" "deinprogramm" "d=
 rscheme" "dynext" "embedded-gui" "eopl" "errortrace" "ffi" "file" "framewor=
 k" "frtime" "games" "graphics" "gui-debugger" "help" "hierlist" "htdp" "htm=
 l" "icons" "info-domain" "lang" "launcher" "lazy" "macro-debugger" "make" "=
 mred" "mrlib" "mysterx" "mzcom" "mzlib" "mzscheme" "net" "openssl" "parser-=
 tools" "planet" "plot" "preprocessor" "profile" "r5rs" "r6rs" "readline" "r=
 edex" "rnrs" "s-exp" "scheme" "scribble" "scribblings" "scriblib" "setup" "=
 sgl" "slatex" "slideshow" "srfi" "stepper" "string-constants" "swindle" "sy=
 ntax" "syntax-color" "teachpack" "test-box-recovery" "test-engine" "tex2pag=
 e" "texpict" "trace" "typed" "typed-scheme" "unstable" "version" "web-serve=
 r" "wxme" "xml"))
 > Computer Language: (("Teaching Languages" "Essentials of Programming Lang=
 uages (3rd ed.)") #(#t write mixed-fraction-e #f #t debug))
 >
 >
From: Matthew Flatt <mflatt@cs.utah.edu>
To: Robby Findler <robby@eecs.northwestern.edu>
Cc: Ryan Culpepper <ryanc@ccs.neu.edu>, bugs@plt-scheme.org,
        nobody@plt-scheme.org, bug-notification@plt-scheme.org
Subject: Re: [plt-bug] all/10811: define-syntax appears to be broken
Date: Fri, 5 Mar 2010 05:55:52 -0700

 At Fri, 5 Mar 2010 06:52:47 -0600, Robby Findler wrote:
 > Anyone in favor of keeping the eopl language level in drscheme?
 
 Yes.
 
From: Robby Findler <robby@eecs.northwestern.edu>
To: Ryan Culpepper <ryanc@ccs.neu.edu>
Cc: bugs@plt-scheme.org, nobody@plt-scheme.org,
        bug-notification@plt-scheme.org
Subject: Re: [plt-bug] all/10811: define-syntax appears to be broken
Date: Fri, 5 Mar 2010 06:52:47 -0600

 Thanks, Ryan. Sorry I missed your message.
 
 Anyone in favor of keeping the eopl language level in drscheme?
 
 Robby
 
 On Fri, Mar 5, 2010 at 2:13 AM, Ryan Culpepper <ryanc@ccs.neu.edu> wrote:
 > There seems to be a bug in the interaction between DrScheme's debugging m=
 ode
 > ("errortrace") and the EOPL language level. There are two workarounds:
 >
 > 1) Disable debugging in DrScheme. To do this, open the "Language" menu an=
 d
 > select "Choose Language". Click the "Show Details" button, select the "No
 > debugging or profiling" option, and then click "OK".
 >
 > 2) Specify the EOPL language in your program's source rather than selecti=
 ng
 > it as the DrScheme language level.
 >
 > To do this, open the "Choose Language" dialog (see above) and select the
 > "Use the language declared in the source" option. Then add the line "#lan=
 g
 > eopl" as the first line of your program. For example:
 >
 > =C2=A0#lang eopl
 > =C2=A0(define-syntax foo
 > =C2=A0 =C2=A0(syntax-rules ()
 > =C2=A0 =C2=A0 =C2=A0((_ a ...)
 > =C2=A0 =C2=A0 =C2=A0 (eopl:printf "~a\n" (list a ...)))))
 > =C2=A0(foo 1 2 3)
 >
 > Note that in the "eopl" language, printf is renamed eopl:printf.
 >
 > Ryan
 >
 >
 >
 > eck.doerry@nau.edu wrote:
 >>
 >> A new problem report is waiting at
 >> =C2=A0http://bugs.plt-scheme.org/query/?cmd=3Dview&pr=3D10811
 >>
 >> Reported by Eck Doerry for release: 4.2.4
 >>
 >> *** Description:
 >> The define-syntax macro facility in EoPL Scheme appears to be broken. =
 =C2=A0I
 >> don't pretend to understand how all the expansion
 >> "phases" work; the fact is that your own example from the manual
 >> produces an error. =C2=A0Note that it works fine (with appropriately
 >> adjusted syntax) in RSR5 language mode).
 >> Again, below I show your own example from the reference doc
 >> PLT Scheme v4.2.4/doc/eopl/index.html
 >> failing. =C2=A0Of course, none of my own macros work either.
 >>
 >> *** How to repeat:
 >> Welcome to DrScheme, version 4.2.4 [3m].
 >> Language: Essentials of Programming Languages (3rd ed.); memory limit: 1=
 28
 >> megabytes.
 >>>
 >>> (define-syntax foo
 >>
 >> =C2=A0 =C2=A0 =C2=A0(syntax-rules ()
 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0((_ a ...)
 >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 (printf "~a\n" (list a ...)))))
 >> require: namespace mismatch; reference (phase 1) to a module
 >> "/Applications/PLT Scheme v4.2.4/collects/errortrace/errortrace-key.ss" =
 that
 >> is not available (phase level 0) in: errortrace-key
 >>
 >> *** Environment:
 >> macosx "Darwin noname 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov =C2=
 =A03
 >> 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 i386"
 >> (i386-macosx/3m) (get-display-depth) =3D 32
 >> Human Language: english
 >> (current-memory-use) 180513224
 >>
 >> Collections:
 >> (("/Users/edo/Library/PLT Scheme/4.2.4/collects" non-existent-path)
 >> ("/Applications/PLT Scheme v4.2.4/collects" "2htdp" "afm" "algol60" "at-=
 exp"
 >> "browser" "combinator-parser" "compiler" "config" "defaults" "deinprogra=
 mm"
 >> "drscheme" "dynext" "embedded-gui" "eopl" "errortrace" "ffi" "file"
 >> "framework" "frtime" "games" "graphics" "gui-debugger" "help" "hierlist"
 >> "htdp" "html" "icons" "info-domain" "lang" "launcher" "lazy"
 >> "macro-debugger" "make" "mred" "mrlib" "mysterx" "mzcom" "mzlib" "mzsche=
 me"
 >> "net" "openssl" "parser-tools" "planet" "plot" "preprocessor" "profile"
 >> "r5rs" "r6rs" "readline" "redex" "rnrs" "s-exp" "scheme" "scribble"
 >> "scribblings" "scriblib" "setup" "sgl" "slatex" "slideshow" "srfi" "step=
 per"
 >> "string-constants" "swindle" "syntax" "syntax-color" "teachpack"
 >> "test-box-recovery" "test-engine" "tex2page" "texpict" "trace" "typed"
 >> "typed-scheme" "unstable" "version" "web-server" "wxme" "xml"))
 >> Computer Language: (("Teaching Languages" "Essentials of Programming
 >> Languages (3rd ed.)") #(#t write mixed-fraction-e #f #t debug))
 >>
 >
 >