Commit 3e17a866 authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot

Remove dataConSig

As suggested in #17291
parent 9431f905
......@@ -27,7 +27,7 @@ module DataCon (
mkDataCon, buildAlgTyCon, buildSynTyCon, fIRST_TAG,
-- ** Type deconstruction
dataConRepType, dataConSig, dataConInstSig, dataConFullSig,
dataConRepType, dataConInstSig, dataConFullSig,
dataConName, dataConIdentity, dataConTag, dataConTagZ,
dataConTyCon, dataConOrigTyCon,
dataConUserType,
......@@ -1207,22 +1207,6 @@ dataConBoxer :: DataCon -> Maybe DataConBoxer
dataConBoxer (MkData { dcRep = DCR { dcr_boxer = boxer } }) = Just boxer
dataConBoxer _ = Nothing
-- | The \"signature\" of the 'DataCon' returns, in order:
--
-- 1) The result of 'dataConUnivAndExTyCoVars',
--
-- 2) All the 'ThetaType's relating to the 'DataCon' (coercion, dictionary,
-- implicit parameter - whatever), including dependent GADT equalities.
-- Dependent GADT equalities are *also* listed in return value (1), so be
-- careful!
--
-- 3) The type arguments to the constructor
--
-- 4) The /original/ result type of the 'DataCon'
dataConSig :: DataCon -> ([TyCoVar], ThetaType, [Type], Type)
dataConSig con@(MkData {dcOrigArgTys = arg_tys, dcOrigResTy = res_ty})
= (dataConUnivAndExTyCoVars con, dataConTheta con, arg_tys, res_ty)
dataConInstSig
:: DataCon
-> [Type] -- Instantiate the *universal* tyvars with these types
......
......@@ -196,7 +196,7 @@ module GHC (
-- ** Data constructors
DataCon,
dataConSig, dataConType, dataConTyCon, dataConFieldLabels,
dataConType, dataConTyCon, dataConFieldLabels,
dataConIsInfix, isVanillaDataCon, dataConUserType,
dataConSrcBangs,
StrictnessMark(..), isMarkedStrict,
......
......@@ -3467,7 +3467,7 @@ checkValidTyCon tc
-- NB: this check assumes that all the constructors of a given
-- data type use the same type variables
where
(_, _, _, res1) = dataConSig con1
res1 = dataConOrigResTy con1
fty1 = dataConFieldType con1 lbl
lbl = flLabel label
......@@ -3475,7 +3475,7 @@ checkValidTyCon tc
= do { checkFieldCompat lbl con1 con2 res1 res2 fty1 fty2
; checkFieldCompat lbl con2 con1 res2 res1 fty2 fty1 }
where
(_, _, _, res2) = dataConSig con2
res2 = dataConOrigResTy con2
fty2 = dataConFieldType con2 lbl
checkPartialRecordField :: [DataCon] -> FieldLabel -> TcM ()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment