I've now managed to write a program to generate the relevant instances. So I don't get the error messages I reported. However, ghc is taking an enormous amount of time compiling. It's now at the desugaring stage ( I've run it with -v2). Dominic.