As it turns out, yes I do. You had me doubting whether I had tried this, but doing such a thing gives me:
refact.hs:124:72:
Could not deduce (d1 ~ SrcSpan)
from the context (Data a)
bound by the type signature for
extTyNames :: Data a => SrcSpan -> RefCtx -> a -> OccTab
at refact.hs:124:1-91
or from (Data d1, Data d2)
bound by a type expected by the context:
(Data d1, Data d2) => GenLocated d1 d2 -> OccTab
at refact.hs:124:21-88
`d1' is a rigid type variable bound by
a type expected by the context:
(Data d1, Data d2) => GenLocated d1 d2 -> OccTab
at refact.hs:124:21
Expected type: GenLocated d1 d2 -> OccTab
Actual type: Located d2 -> OccTab
In the return type of a call of `extTyNamesLoc'
In the second argument of `ext2Q', namely `extTyNamesLoc l r'