Add a case to checkValidTyCon
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 13 May 2015 11:44:12 +0000 (12:44 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 13 May 2015 11:44:12 +0000 (12:44 +0100)
commitca173aa30467a0b1023682d573fcd94244d85c50
treeea8a10a64c922223dfb28209663f5e71ff3e8555
parent51cbad15f86fca1d1b0e777199eb1079a1b64d74
Add a case to checkValidTyCon

Apparently when Haddock'ing, we check GHC.Prim.
So checkValidTyCon must not crash when dealing with
PrimTyCons; and it was doing so in dataConStupidTheta.

The fix is easy, but I'm puzzled about why Haddock needs to
typecheck GHC.Prim.
compiler/typecheck/TcTyClsDecls.hs