[commit: ghc] master: Remove dead code (9c661e0)
Simon Peyton Jones
simonpj at microsoft.com
Wed Jan 30 15:34:43 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/9c661e0709e63d97a5ca6bcadc23f362abda88dc
>---------------------------------------------------------------
commit 9c661e0709e63d97a5ca6bcadc23f362abda88dc
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Jan 25 14:21:46 2013 +0000
Remove dead code
>---------------------------------------------------------------
compiler/basicTypes/DataCon.lhs | 50 ---------------------------------------
1 files changed, 0 insertions(+), 50 deletions(-)
diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs
index 07fd8ca..2b96d3f 100644
--- a/compiler/basicTypes/DataCon.lhs
+++ b/compiler/basicTypes/DataCon.lhs
@@ -1019,56 +1019,6 @@ buildAlgTyCon tc_name ktvs cType stupid_theta rhs
%************************************************************************
-%* *
-\subsection{Splitting products}
-%* *
-%************************************************************************
-
-\begin{code}
--- | Extract the type constructor, type argument, data constructor and it's
--- /representation/ argument types from a type if it is a product type.
>---------------------------------------------------------------
--- Precisely, we return @Just@ for any type that is all of:
>---------------------------------------------------------------
--- * Concrete (i.e. constructors visible)
>---------------------------------------------------------------
--- * Single-constructor
>---------------------------------------------------------------
--- * Not existentially quantified
>---------------------------------------------------------------
--- Whether the type is a @data@ type or a @newtype@
-splitProductType_maybe
- :: Type -- ^ A product type, perhaps
- -> Maybe (TyCon, -- The type constructor
- [Type], -- Type args of the tycon
- DataCon, -- The data constructor
- [Type]) -- Its /representation/ arg types
-
- -- Rejecing existentials is conservative. Maybe some things
- -- could be made to work with them, but I'm not going to sweat
- -- it through till someone finds it's important.
-
-splitProductType_maybe ty
- = case splitTyConApp_maybe ty of
- Just (tycon,ty_args)
- | isProductTyCon tycon -- Includes check for non-existential,
- -- and for constructors visible
- -> Just (tycon, ty_args, data_con, dataConInstArgTys data_con ty_args)
- where
- data_con = ASSERT( not (null (tyConDataCons tycon)) )
- head (tyConDataCons tycon)
- _other -> Nothing
-
--- | As 'splitProductType_maybe', but panics if the 'Type' is not a product type
-splitProductType :: String -> Type -> (TyCon, [Type], DataCon, [Type])
-splitProductType str ty
- = case splitProductType_maybe ty of
- Just stuff -> stuff
- Nothing -> pprPanic (str ++ ": not a product") (pprType ty)
-\end{code}
-
-
-%************************************************************************
%* *
Promoting of data types to the kind level
%* *
More information about the ghc-commits
mailing list