-
Simon Peyton Jones authored
Fixing #246 (pattern-match order in record patterns) made GHC go into a black hole, by changing the order of patterm matching in TyCon.isProductTyCon! It turned out that GHC had been avoiding the black hole only by the narrowest of margins up to now! The black hole concerned the computation of which type constructors are recursive, in TcTyDecls.calcRecFlags. We now refrain from using isProductTyCon there, since it triggers the black hole (very indirectly). See the "YUK YUK" comment in the body of calcRecFlags. As it turns out, the fact that TyCon.isProductTyCon matched on the algTcRec field was quite redundant, so I removed that too. However, without the fix to calcRecFlags, this wouldn't fix the black hole because of the use of isRecursiveTyCon in BuildTyCl.mkNewTyConRhs. Anyway, it's fine now.
59fa6266