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}
\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