[racket] struct constructor pitfalls
On Wed, May 29, 2013 at 03:12:45PM -0400, Anthony Carrico wrote:
> It seems like the purpose of #:constructor-name is to get the default
> contsructor out of the way, so you can customize it:
>
> #lang racket
>
> (struct hello (a b c)
> #:constructor-name hello-rep
> )
>
> (define (hello) (hello-rep 1 2 3))
>
> But this gives the error:
> duplicate definition for identifier in: hello
Are you aware of #:omit-define-syntaxes ?
(struct hello (a b c)
#:constructor-name hello-rep
#:omit-define-syntaxes)
David