Archive for March, 2009

Cabal.vim 0.1

Monday, March 23rd, 2009

Since the last post, quite a lot of things have been added. Of course, most of them are so minor (fixing typos? Oh my!) that I didn’t bother posting about them. But there have been enough now that I might as well bullet point them up, for people who don’t feel like doing darcs changes. :)

(more…)

Varlists, again

Saturday, March 21st, 2009

It seems a bit ad-hoc, but for variable arglists I might just have them consume all the arglists that are the right shape. And if there’s a vararg inside it, then that will be all of them, of course.

Also, this is different from single varargs, but a varlist has to have at least one list.

(more…)

cabal-vim

Friday, March 13th, 2009

I apparently cannot get enough of Vimscript, so after someone on the Haskell-café list asked about it, I wrote a syntax mode for Cabal files. Hooray. (Hopefully no-one’s already written one…)

Not much to it at the moment, though there is an attempt at automatic indenting, since that was the bit I was missing the most.

It’s here if anyone wants it, or as it’s darcsed up:

darcs get http://patch-tag.com/publicrepos/cabal-vim

Declarations vs. assignments

Tuesday, March 10th, 2009

Oh dear, another keyword. I’m not doing very well at this “as little syntax as possible” thing. But I don’t really know what else to do about this: I don’t think SSA would be a very good fit.

My new nemesis: var. Other candidates like def or val haven’t been ruled out yet, though, except that they have the wrong connotations to me — defs are re-evaluated every time they are used, and vals are sort of semi-constant1.So that’s why I’m thinking var.

(more…)


  1. Specifically, final in Scala. 

Reserved words so far

Tuesday, March 10th, 2009

The shorter this post is, the happier I’ll be. It’s meant to be more of a reference as I inevitably have to add new things. Assuming I remember to update it of course.

(more…)

Variable argument lists?

Tuesday, March 10th, 2009

Re: multi-way if, how about something like

if := fun (cond, lazy then) `(conds, lazy thens) {
    case cond {
        false, 0, nil := case conds.len {
            0 := nil
            _ := if `(conds, thens)
        }
        _ := then
    }
}
else := true

if { x = 2,
    println("x is 2")
} { x < 2,
    println("x is less than 2")
} { else,
    println("x is more than 2")
}

(more…)

A language

Tuesday, March 10th, 2009

As if the pile-up of university assignments doesn’t give me enough to do, I’ve been thinking about writing a tiny programming language, where as few things are taken as primitive as possible, so the user can define almost any syntax they want. So far, though, what I’ve thought of amounts to little more than Lisp with the brackets in different places. Oh, and infix operators.

Note that none of this is implemented yet, I’m just throwing out any ideas I have. Even if they’re terrible.

(more…)

Slight updates to haskell.vim

Sunday, March 8th, 2009

Since the Vim syntax file for Haskell was last updated, there have been a bunch of syntax extensions in GHC1, like rank-n types, arrow syntax, and allsorts. I decided to add a few of these.

You can get it here. You might want to back up your old one; I’m pretty sure I haven’t broken anything, but my testing wasn’t exactly thorough (mostly consisting of checking the new syntax worked, rather than whether the old syntax was broken).

Update! if anyone’s seen this yet, then please download it again. The first time, (#) would make the # part of an unboxed tuple bracket. That’s fixed now. (See: lack of testing.)

(more…)


  1. If you don’t use GHC perhaps these updates won’t be very useful… 

At least it was a slightly better reason than not being bothered

Tuesday, March 3rd, 2009

Well no endofunctor.net after all, probably. NearlyFreeSpeech.net charge a cent per day for a MySQL database, which of course is nothing in the grand scheme of things, but since the rest of the stuff1 would probably cost less than that per month, it kind of put me off a bit.

I might start posting here again, but I don’t think I need to say how that will work out.

Update! I’m writing an HTTP session library in Haskell, for future use somewhere. I wonder where..?


  1. Other than the domain name, obviously.