#1459 Improvements to Haskell Lexer

  • Added support for MagicHash extension (lexer.haskell.allow.hash)
  • $ and # are now colored as operators.
  • .0 and -0 are now properly colored as operator and a number, not as just number.
  • Operators starting with double dash (e.g ---->) are properly colored as operators, not comments.
  • Added pragma highlighting.
  • Added basic C-preprocessor highlighting.
  • Qualified names (e.g. ABC.xyz) are now properly highlighted as identifiers, not types.
  • Qualified operators (e.g. ABC.<$>) are now properly highlighted as operators.
  • Operator . is now properly highlighted as an operator, not part of the identifier, when applied to a qualified and an unqualified value (e.g. Abc.xyz.yzx <- last one is an operator)
  • Operators starting with ':' are now properly highlighted as type constructors, not operators.
  • "family" after "data" is highlighted, as per TypeFamilies.
1 Attachments


<< < 1 2 3 4 .. 8 > >> (Page 2 of 8)
  • Neil Hodgson

    Neil Hodgson - 2013-04-13

    There's a dead assignment to importCurrent inside the folding loop.

  • kudah

    kudah - 2013-04-17

    Oops, I thought you meant the other dead assignment.

  • Neil Hodgson

    Neil Hodgson - 2013-04-17

    The folder only recognizes "import" at line start although the doc doesn't say that. Its fine if you only want to recognize at line start although an arbitrary example program I downloaded had indented imports.

  • kudah

    kudah - 2013-04-18

    an arbitrary example program I downloaded had indented imports.

    Never seen an import being indented in real code. Imports obey module's layout rule, so the only way to indent an import further without also indenting everything in the module is to use explicit layout(e.g. put a semicolon at the end of previous declaration). You can't indent first import without affecting module's layout.

    • Neil Hodgson

      Neil Hodgson - 2013-04-18

      This is the example I used: http://www.angelfire.com/tx4/cus/shapes/haskell98.html

      There's a warning from Clang:
      ../lexers/LexHaskell.cxx:175:17: warning: Value stored to 'ch' during its initialization is never read
      int ch = styler.SafeGetCharAt(currentPos);
      ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      • kudah

        kudah - 2013-04-18
        Last edit: kudah 2013-04-18
<< < 1 2 3 4 .. 8 > >> (Page 2 of 8)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks