Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • P prime
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 128
    • Issues 128
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Haskell
  • prime
  • Wiki
  • line comment syntax

Last edited by simonmar@microsoft.com Nov 18, 2009
Page history New page

line comment syntax

Ticket: #42

The comment syntax according to the report is:

  comment  -> dashes [ any<symbol> {any} ] newline

  symbol -> ascSymbol | uniSymbol<special|_|:|"|'>
  ascSymbol -> ... does not include : ...

This unfortunately forces sequences beginning '—:' to be comments, which appears to be unintentional.

Fix:

  comment -> dashes [ any<symbol|:> {any} ] newline

During the committee discussion for Haskell 2010, a better fix was suggested by Ross Paterson, namely to move ':' into symbol instead:

    comment ->      dashes [ any<symbol> {any}] newline
    graphic ->      small | large | symbol | digit | special | " | '
    symbol  ->      ascSymbol | uniSymbol<special | _ | " | '>
    varsym  ->      ( symbol<:> {symbol})<reservedop | dashes>
    consym  ->      (: {symbol})<reservedop>
Clone repository Edit sidebar
Wiki

Title Index