Closed tfausak closed 3 years ago
Oops, I meant to link the report: https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-170002.3
An ordinary comment begins with a sequence of two or more consecutive dashes (e.g.
--
) and extends to the following newline. The sequence of dashes must not form part of a legal lexeme. For example, “-->
” or “|--
” do not begin a comment, because both of these are legal lexemes; however “--foo
” does start a comment.
Line comments in Haskell are complicated. They're made up of at least two hyphens in a row. Sounds easy enough. But they can't form a valid lexeme. In other words,
---
is a comment, but<---
and--->
aren't. Purple Yolk doesn't currently handle this correctly:I'm curious to see how GitHub's syntax highlighter handles this: