3 ms·
How did you get the letters 1 and 2 in "c1 `mappend` c2" to be a different color from the letter c?
by conistonwater 12y ago
How did you get the letters 1 and 2 in "c1 `mappend` c2" to be a different color from the letter c?
- tikhonj 12y agoThey're actually Unicode subscripts: ₁ and ₂. The syntax highlighter highlights them a bit differently, probably because the regexp used character classes which don't quite map to what Haskell (or at least GHC) does. I think of it as a bug that's really a feature: it makes the subscripts stand out. I'm tempted to add a special case to other language modes to highlight ₁ (and the ASCII version _1) differently, just because it turned out to be so useful.