Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,865
    • Issues 4,865
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #17425
Closed
Open
Created 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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking