Skip to content

Support -- ^ comment style #1297

@parsonsmatt

Description

@parsonsmatt

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.

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