yesodweb / yesodweb/persistent
Support `-- ^` comment style
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
Currently, you must use the -- | comment style for documenting fields and entities. This is not idiomatic Haskell, and folks often want to use -- ^ for documenting fields.
Related to #1296
Right now, you need to document like this:
-- | A table
SomeTable
-- | Some Field
someField Text
Ideally, we would be able to document like this:
-- | A table
SomeTable
someField Text
-- ^ Some Field
Supporting same-line comments seems useful too.
SomeTable
someField Text -- ^ This is a doc comment.
It seems less obvious that documenting entities like this makes sense. I've never see this on a Haskell datatype and I'm not sure it's even valid syntax.
SomeTable
someField Text -- ^ Doc Comment
-- ^ I am a doc comment for SomeTable?? Weird.
Contributor guide
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 with the examples in the issue and read related issue #1296 to understand the existing documentation-comment behavior. Trace where field and entity comments are handled, then verify that preceding, trailing, and same-line -- ^ comments work as intended and that entity-comment behavior is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100