Thanks a bunch for these tips.  I haven't used the flags feature of cabal before, and i don't seem to be able to get it right. 

This is also my first time, so I'm not sure exactly what I'm doing right. ;)

I have:

Flag test
  Description: Enable testing
  Default:     False

And I get "Warning: unamb.cabal: Unknown section type: flag ignoring...".  If I indent, I instead get "These flags are used without having been defined: test".  Any idea what I'm doing wrong here?
 
No, but you can take a look at my .cabal file to see if you can figure out what's different. The code's not yet released, but I'm fairly confident the .cabal file does everything we need.

https://svn.cs.uu.nl:12443/viewvc/dgp-haskell/EMGM/emgm.cabal?view=markup

Sean