Declare dependencies of datatypes before the datatype itself
Make template haskell work again with recent changes