On 21-mei-2007, at 13:56, Michael T. Richter wrote:

Hell, even comparing the out-of-the-box syntax highlighting support in Gedit vs. (G)Vim is instructive. Code like "makeRandomValueST :: StdGen -> (MyType, StdGen)" (which, incidentally, was far easier to copy from in Gedit than GVim to paste into this message) only differentiates "::" and "->" from the text and delimiters in GVim while in Gedit (keeping in mind that Gedit isn't a very good editor!) differentiates those plus "makeRandomValueST" vs. "StdGen" and "MyType". And the parentheses.

This is an interesting take on things. What to highlight and why is
decidedly non-trivial. Personally, I strongly *dislike* highlighting
of user-defined identifiers. And honestly, in Haskell, most identifiers
are user-defined. Furthermore, the haskell vim highlighter actually
allows you to highlight delimiters, True and False, the names of a
number of types, and the names of debugging functions. It requires
settings to turn that on though, as the highlighter should be as minimally visually intrusive in its default setting as possible. Or at least, that's what I think, and I was the last person to get his grubby paws on vim's highlighter for Haskell. It does highlight literate Haskell code quite nicely however, both in bird track style and in TeX style. It does expect literate Haskell
to be in .lhs files though...

Note that it is somewhat tricky to distinguish between the occurences
of the a's before and after the semicolon in the following:
        map :: ( a -> b ) -> [a] -> [b]; map f (a:as) = f a : (map f as)

I'd like to see what GEdit does to that. :)

Doei, Arthur van Leeuwen.

--

/\ / | [EMAIL PROTECTED] | Work like you don't need the money /__\ / | A friend is someone with whom | Love like you have never been hurt / \/__ | you can dare to be yourself | Dance like there's nobody watching



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to