notepad-plus-plus icon indicating copy to clipboard operation
notepad-plus-plus copied to clipboard

fix: haskell to match style guide

Open jack-mil opened this issue 8 months ago • 1 comments

The style CAPITOL seems to apply to all identifiers starting with a capitol letter. Does this have semantic meaning in Haskell? What is a reasonable color for it? red? text?

There are some styles that I cannot identify. Namely DATA, IMPORT, and INSTANCE. I tried several Haskell syntax examples and could not get these styles to trigger. If someone more familiar with Haskell can show an example of what it might be, please do. Maybe one day someone will come across it and report.

image

jack-mil avatar Apr 29 '25 01:04 jack-mil

  1. Capital letters versus lowercase letters at the start of an identifier in Haskell separate the variable and constructor namespaces (see varId and conId in the Haskell 2010 Report, section 10.2 on lexical syntax).
  2. I'll have to read the actual definition of the syntax for Notepad++, but I'd assume that DATA, IMPORT, and INSTANCE not triggering is a bug, since those are major families of declaration statement (see topdecl in the Haskell 2010 Report, section 10.5 on context-free syntax).

typedrat avatar Apr 29 '25 18:04 typedrat