---------------------------------
Gate in a few more instance decls
---------------------------------
When we have
instance T a where...
we need to suck in the instance decl rather more aggressively than we
were. (A case I hadn't thought of because it only happens with
undecideable instances.)
-- Reverses the gated decls, but that doesn't matter
choose2 (gis, decls) (gates, decl)
- | any (`elem` tycons) gates = (gis, decl:decls)
- | otherwise = ((gates,decl) : gis, decls)
+ | null gates -- Happens when we have 'instance T a where ...'
+ || any (`elem` tycons) gates = (gis, decl:decls)
+ | otherwise = ((gates,decl) : gis, decls)
\end{code}
%************************************************************************