[Haskell-cafe] Comment Syntax

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Fri Jun 3 22:10:08 CEST 2011

On 4 June 2011 02:02, Albert Y. C. Lai <trebla at vex.net> wrote:
> I propose that only {- -} is comment; that is, -- is an operator token and
> not a marker of comments.
> Two birds in one stone:
> 1. Removes the cause of the mistake of writing a haddock comment as --|
> That is, if no one writes any comment with -- then no one writes any haddock
> comment with --| --^ etc.
> 2. Opens up the option of using -- for prefix unary negation, so that - is
> unambiguously infix subtraction and therefore (- x) is consistently right
> sectioning of infix subtraction.

I think it's probably too late to make such a sweeping change;
besides, having some kind of inline comment indicator (which goes to
the end of line) is useful.

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list