`b' is a rigid type variable bound by
a type expected by the context: TestG b at Clean.hs:49:23
It might be worth rephrasing this error message somehow, although I suspect it's written to fit into existing error reporting machinery that's not easy to adapt to fit the situation: the location is not referring to "TestG b", but to "a type" on line 49, which is expected/"generated" by the context TestG b established previously. You have to read pretty closely to figure that out, though.