[Github-comments] [geany/geany] Fix Haskell single line comments by adding space (#1026)

Colomban Wendling notifications at xxxxx
Thu May 5 10:05:10 UTC 2016


@elextr no, but if you read the syntax in [2.2](https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-160002.2), you see that a comment is defined as

> lexeme | definition
> ------ | ----------
> *comment* 	|	*dashes* [ *any*⟨*symbol*⟩ {*any*} ] *newline*
> *dashes* 	| 	`--` {`-`}
> *symbol* 	| 	*ascSymbol* \| *uniSymbol*⟨*special* \| `_` \| `"` \| `'`⟩
> *ascSymbol* 	| 	`!` \| `#` \| `$` \| `%` \| `&` \| `⋆` \| `+` \| `.` \| `/` \| `<` \| `=` \| `>` \| `?` \| `@`	\| `\` \| `^` \| `|` \| `-` \| `~` \| `:`
> … |

So a comment is *a sequence starting with 2 or more dashes (`-`) not followed by any of `!`, `#`, `$`, `%`, `&`, `⋆`, `+`, `.`, `/`, `<`, `=`, `>`, `?`, `@`, `\`, `^`, `|`, `-`, `~` or `:`*.

Hence, not only simply inserting `--` might or might not make it a comment, but also our default toggle comment suffix (`~ `, leading to `--~ `) will not make it a comment at all.


So, in the end I think the solution proposed here by @AleXoundOS makes sense.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1026#issuecomment-217117057
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160505/ec09067f/attachment.html>


More information about the Github-comments mailing list