language-haskell icon indicating copy to clipboard operation
language-haskell copied to clipboard

Bracketed type signatures over multiple lines aren't highlighted properly

Open sheaf opened this issue 5 years ago • 1 comments

Viz.: multiline_issue

GitHub highlighting also suffers from the same issue it seems:

proof ::  SomeVeryLongExpression  a b
      :~: SomeOtherLongExpression c d

quux ( proof ::  SomeVeryLongExpression  a b
             :~: SomeOtherLongExpression c d
     )
 
quux [ x :: a
              B c ]

sheaf avatar Nov 12 '20 19:11 sheaf

I think this is because I added \n as a termination character to type signatures started with ::, which is import ant in do notation and similar, for example x <- y :: Types \n other_stuff in that case other_stuff obviously shouldn't be part of a type signature. I thin this is fixable by not including \n as termination in parenthesized type annotations, however it may be difficult to do so without a lot of code duplication.

JustusAdam avatar Nov 22 '20 17:11 JustusAdam