Skip to content

In source strcut*-doc does not convert to defstruct* properly when #:constructor-name is used #500

Description

@quxo

struct*-doc in scribble/srcdoc converts to defstruct*. There is a problem in how the arguments are converted when #:constructor-n
name is provided.

If you run the following code

#lang racket/base

(require  scribble/srcdoc)

(struct point (x y) #:constructor-name make-point)

(provide
 (struct*-doc
  point
  ([x integer?] [y integer?])
  #:constructor-name make-point
  ("Creates a point structure")
  ))

You get the error

/scribble-lib/scribble/srcdoc.rkt:564:10: defstruct*: expected expression
at: #:constructor-name
in: (defstruct* point ((x integer?) (y integer?)) make-point #:constructor-name "Creates a lala structure")

You can see the order of #:constructor-name and make-point is inverted when it tries to convert

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions