Re: [racket-users] #%plain-app prints as #%app, hindering debugging

2016-09-28 Thread Alexis King
The #%plain-app identifier is just a renamed version of #%app from '#%kernel, so it’s actually named #%app when initially defined. The racket/base version of #%app exists to handle keyword arguments, so racket/base exports the underlying version of #%app as #%plain-app. Of course, fully expanded

[racket-users] #%plain-app prints as #%app, hindering debugging

2016-09-28 Thread 'William J. Bowman' via Racket Users
Consider the following program: #lang racket (require (for-syntax syntax/parse)) (define (Type x) x) (begin-for-syntax (define x (local-expand #`(Type 1) 'expression null)) (displayln x) (displayln (syntax-parse x #:literals (Type #%app #%plain-app)

[racket-users] syntax-parse #:with and error messages

2016-09-28 Thread 'William J. Bowman' via Racket Users
I recently ran into a problem that took me hours to diagnose. It turns out that a `#:with` clause in a syntax-parse was not matching, but I would never have guessed that from the error message I got. Here is a simplified example: (define-syntax-rule (my-fancy-macro syn ...) (begin syn ...))

Re: [racket-users] syntax-properties, local-expand, and a struct

2016-09-28 Thread Alexis King
> Unfortunately, there are probably many such buggy macros, since I don't think > most people have a clear idea when to copy properties when using > datum->syntax. This is key, and unfortunately I’m becoming more and more convinced that there’s no one good answer in the presence of the

Re: [racket-users] syntax-properties, local-expand, and a struct

2016-09-28 Thread Ryan Culpepper
On 9/28/16 12:04 PM, William J. Bowman wrote: On Fri, Sep 23, 2016 at 02:58:23PM -0400, Ryan Culpepper wrote: It appears that the constructor macro (implemented by self-ctor-transformer in racket/private/define-struct.rkt) transfers the syntax properties from the macro use to its expansion (see

Re: [racket-users] TR issue with the type of expt

2016-09-28 Thread Hendrik Boom
On Tue, Sep 27, 2016 at 02:36:43PM +0100, Matthew Eric Bassett wrote: > I do not believe this is an oversight. The function expt has type > signature (-> Number Number Number). Mathematically, yes, a^b is a real > when a and b are reals. not if a is negative and b is one-half. Or are complex

Re: [racket-users] syntax-properties, local-expand, and a struct

2016-09-28 Thread 'William J. Bowman' via Racket Users
On Fri, Sep 23, 2016 at 02:58:23PM -0400, Ryan Culpepper wrote: > It appears that the constructor macro (implemented by self-ctor-transformer > in racket/private/define-struct.rkt) transfers the syntax properties from > the macro use to its expansion (see the datum->syntax in the first >

Re: [racket-users] On my calendar: "TR gains support for generics"

2016-09-28 Thread Vincent St-Amour
Maybe that was to remind you to start working on it? ;) More seriously, I don't remember where that could have been from, and I don't think there's anyone actively working on it at this point. Vincent On Tue, 27 Sep 2016 23:10:51 -0500, Racket Users wrote: > > Anyone have any idea why on