Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,392
    • Issues 4,392
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 374
    • Merge Requests 374
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17425

Closed
Open
Opened Nov 01, 2019 by Artyom Kazak@neongreen

Support prefix Haddock comments on unnamed constructor fields

Proposal

GHC supports postfix Haddock comments on unnamed constructor fields:

data Foo
  = Foo
      Int  -- ^ Field 1
      Bool -- ^ Field 2

For consistency, we should also support prefix Haddock comments:

data Foo
  = Foo
      -- | Field 1
      Int
      -- | Field 2
      Bool

Currently GHC fails on the example above:

/tmp/z.hs:4:7: error: parse error on input ‘Int’
  |
4 |       Int
  |       ^^^

NB: support for prefix Haddocks has been added in e20046a0.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#17425