X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FuniType%2FTyCon.lhs;h=814108eef87c84282f5c4b8618f7756af9832511;hb=68a1f0233996ed79824d11d946e9801473f6946c;hp=ddf1716c312512e4e05c306732188051ff745660;hpb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;p=ghc-hetmet.git diff --git a/ghc/compiler/uniType/TyCon.lhs b/ghc/compiler/uniType/TyCon.lhs index ddf1716..814108e 100644 --- a/ghc/compiler/uniType/TyCon.lhs +++ b/ghc/compiler/uniType/TyCon.lhs @@ -384,7 +384,7 @@ maybeSingleConstructorTyCon (TupleTyCon arity) = Just (mkTupleCon arity maybeSingleConstructorTyCon (DataTyCon _ _ _ _ [c] _ _) = Just c maybeSingleConstructorTyCon (DataTyCon _ _ _ _ _ _ _) = Nothing maybeSingleConstructorTyCon (PrimTyCon _ _ _ _) = Nothing -maybeSingleConstructorTyCon (SpecTyCon tc tys) = panic "maybeSingleConstructorTyCon:SpecTyCon" +maybeSingleConstructorTyCon tycon@(SpecTyCon tc tys) = pprPanic "maybeSingleConstructorTyCon:SpecTyCon:" (ppr PprDebug tycon) -- requires DataCons of TyCon \end{code} @@ -427,12 +427,17 @@ generated locally: locally defined tycons and big tuple tycons. \begin{code} isLocalSpecTyCon :: Bool -> TyCon -> Bool +isLocalGenTyCon :: TyCon -> Bool isLocalSpecTyCon compiling_prelude tc - = isLocallyDefined tc || (fromPreludeCore tc && not compiling_prelude) - -isLocalGenTyCon (SpecTyCon tc tys) = isLocalGenTyCon tc -isLocalGenTyCon tc = isBigTupleTyCon tc || isLocallyDefined tc + = isLocallyDefined tc -- || (fromPreludeCore tc && not compiling_prelude) + -- Not for now ... need to be local + -- This will cause problem with splitting + +isLocalGenTyCon tc + = isLocallyDefined tc -- || isBigTupleTyCon tc + -- Not for now ... need to be local + -- This will cause problem with splitting isBigTupleTyCon (TupleTyCon arity) = arity > 32 -- Tuple0 to Tuple32 declared in prelude