Hi Philip,
However, it turns out that this never leads to an evaluation of extTyNamesLoc. I've come as far as to see that, since "Located a" is a synonym for "GenLocated SrcSpan a", the type we're looking for really has a binary constructor, thus we should use ext2Q.This made things work: We first modify the function we apply to Located things:extTyNamesLoc :: (Data loc, Data a) => SrcSpan -> GenLocated loc a -> OccurrenceTableextTyNamesLoc l (L l' x) = case cast l' ofJust l'' -> extTyNames l'' xNothing -> extTyNames l x
extTyNames l x = (extTyNamesDef l x `mkQ` extTyNamesTy l `ext2Q` extTyNamesLoc l) x