TextMate haskell bundle improvements

| 1 Comment | No TrackBacks

For the last week or so, ozy` has been working on improving the haskell bundle in TextMate. He's done a lot of work, and it really makes a difference. The changes should be in SVN sometime soon I hope.

Changelist

  • Fixed regex for backquote-infix notation
  • Added highlighting for unit () and empty list []
  • Fixed up module, class, import, and instance declarations. In particular, some non-reserved words that are only meaningful in the above contexts are highlighted appropriately.
  • Added highlighting for all operators.
  • Changed scope selectors for some varSyms that were previously highlighted as "punctuation.separator." This scope is not highlighted by many themes.
  • Added highlighting for numeric constants. Floats and integrals have separate scope selectors.
  • Changed scope selectors for some things like pragma syntax.
  • Fixed minor errors in regexes that highlight function names.
  • Modularized a lot of patterns. (There's still a lot to be done here.)
  • Added highlighting for Prelude type names and constructors. This is scope aware, in the sense that (eg.) Maybe only gets special treatment in the context of a type signature. (This is incomplete, though.)
  • Added highlighting for commas. At the moment this is utterly useless.
  • Fixed some dumb issues where pragmas would only be scoped as such if they appeared inside a block comment.
  • Highlighted a couple of pragma directives. (Incomplete.)
  • Fixed up the type signature scope a little bit. (Not much.)

I've been using the changes while he's been working on them, and they certainly do make the code look quite a bit better. I'll be happy when haskell is a first class language in TextMate, and this is the first big step in getting it there. Hooray!

~ Axman

No TrackBacks

TrackBack URL: http://axman6.homeip.net/cgi-bin/mt/mt-tb.cgi/21

1 Comment

I've been using an older version of the bundle for a while now, and I've made some changes since. I wish I could figure out what the original version I installed was so I can diff and send you a patch.

I remember changing entity.name.function.infix.haskell to match '(`)[^`]*(`)' because it wasn't matching properly if there were multiple infix functions on one line.

I also remember added mdo to keyword.control.haskell, since I love using recursive monads.

Oh, and function signatures didn't like function names ending with a prime, so I changed meta.function.type-declaration.haskell to match "^\s*([a-z_][a-zA-Z0-9_']*|\([|!%$+\-.,=]+\))\s*(::)".

I can't remember the other changes, sadly.

Leave a comment

February 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.23-en

About this Entry

This page contains a single entry by Alex Mason published on February 4, 2009 5:11 PM.

N-bodies evolution was the previous entry in this blog.

More n-bodies speedups is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.