Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Allow -- ^ comment on record constructor #144

@ghc-mirror

Description

@ghc-mirror

Original reporter: red5_2@

This enhancement would add flexibility to the commenting style for record constructors. Accept a -- ^ comment between a constructor and its fields, meaning the same as a -- | comment before the constructor. The example below is rejected as a parse error due to the comment on 'Branch'.

-- | A tree with labeled internal nodes
data Tree =
    Empty                -- ^ Leaf
  | Branch               -- ^ Internal node
    { label :: a         -- ^ Node label
    , subtrees :: [Tree] -- ^ List of subtrees
    }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions