It looks like hugs has a problem with empty topdecls (allowable via topdecl -> decl -> gendecl) - with both of these modules: type T = String; data D = D module Foo where { type T = String;; data D = D } I get ERROR "q.lhs":3 - Syntax error in definition (unexpected `;', possibly due to bad layout) Thanks Ian