In source strcut*-doc does not convert to defstruct* properly when #:constructor-name is used
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 250
- Forks
- 102
- Avg merge
- 11d 11h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in scribble/srcdoc.rkt around line 564 and inspect how struct*-doc converts its arguments to defstruct*. Run the reproduction from the issue, focusing on the #:constructor-name and make-point ordering. Done means the provided example converts successfully without the defstruct* expected-expression error.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100