diff options
author | Richard Eisenberg <rae@richarde.dev> | 2020-09-04 17:27:00 -0400 |
---|---|---|
committer | Richard Eisenberg <rae@richarde.dev> | 2020-09-04 17:27:00 -0400 |
commit | 025c8c92060d8fc6aa9723302b5e7b250735151b (patch) | |
tree | 7c182fc115fd999696279070937e387c74b283c5 /compiler/GHC/Iface | |
parent | c1e54439be3d38a1f972ac772cca7eec5e1519a9 (diff) | |
download | haskell-wip/no-iface-tuple-ty.tar.gz |
Remove IfaceTupleTy.wip/no-iface-tuple-ty
It seemed to be serving no purpose, so I removed it.
Still to do: remove tcTupleTyCon, but that will be much
easier after !3954.
Diffstat (limited to 'compiler/GHC/Iface')
-rw-r--r-- | compiler/GHC/Iface/Rename.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Iface/Syntax.hs | 1 | ||||
-rw-r--r-- | compiler/GHC/Iface/Type.hs | 19 |
3 files changed, 1 insertions, 21 deletions
diff --git a/compiler/GHC/Iface/Rename.hs b/compiler/GHC/Iface/Rename.hs index 376eee8350..75ed14598e 100644 --- a/compiler/GHC/Iface/Rename.hs +++ b/compiler/GHC/Iface/Rename.hs @@ -726,8 +726,6 @@ rnIfaceType (IfaceAppTy t1 t2) rnIfaceType (IfaceLitTy l) = return (IfaceLitTy l) rnIfaceType (IfaceFunTy af w t1 t2) = IfaceFunTy af <$> rnIfaceType w <*> rnIfaceType t1 <*> rnIfaceType t2 -rnIfaceType (IfaceTupleTy s i tks) - = IfaceTupleTy s i <$> rnIfaceAppArgs tks rnIfaceType (IfaceTyConApp tc tks) = IfaceTyConApp <$> rnIfaceTyCon tc <*> rnIfaceAppArgs tks rnIfaceType (IfaceForAllTy tv t) diff --git a/compiler/GHC/Iface/Syntax.hs b/compiler/GHC/Iface/Syntax.hs index bd576b26cf..2bdbb8ac1b 100644 --- a/compiler/GHC/Iface/Syntax.hs +++ b/compiler/GHC/Iface/Syntax.hs @@ -1638,7 +1638,6 @@ freeNamesIfType (IfaceFreeTyVar _) = emptyNameSet freeNamesIfType (IfaceTyVar _) = emptyNameSet freeNamesIfType (IfaceAppTy s t) = freeNamesIfType s &&& freeNamesIfAppArgs t freeNamesIfType (IfaceTyConApp tc ts) = freeNamesIfTc tc &&& freeNamesIfAppArgs ts -freeNamesIfType (IfaceTupleTy _ _ ts) = freeNamesIfAppArgs ts freeNamesIfType (IfaceLitTy _) = emptyNameSet freeNamesIfType (IfaceForAllTy tv t) = freeNamesIfVarBndr tv &&& freeNamesIfType t freeNamesIfType (IfaceFunTy _ w s t) = freeNamesIfType s &&& freeNamesIfType t &&& freeNamesIfType w diff --git a/compiler/GHC/Iface/Type.hs b/compiler/GHC/Iface/Type.hs index 57c31920b4..32c216b3f1 100644 --- a/compiler/GHC/Iface/Type.hs +++ b/compiler/GHC/Iface/Type.hs @@ -171,12 +171,6 @@ data IfaceType | IfaceCastTy IfaceType IfaceCoercion | IfaceCoercionTy IfaceCoercion - | IfaceTupleTy -- Saturated tuples (unsaturated ones use IfaceTyConApp) - TupleSort -- What sort of tuple? - PromotionFlag -- A bit like IfaceTyCon - IfaceAppArgs -- arity = length args - -- For promoted data cons, the kind args are omitted - type IfaceMult = IfaceType type IfacePredType = IfaceType @@ -498,7 +492,6 @@ ifTypeIsVarFree ty = go ty go (IfaceFunTy _ w arg res) = go w && go arg && go res go (IfaceForAllTy {}) = False go (IfaceTyConApp _ args) = go_args args - go (IfaceTupleTy _ _ args) = go_args args go (IfaceLitTy _) = True go (IfaceCastTy {}) = False -- Safe go (IfaceCoercionTy {}) = False -- Safe @@ -533,7 +526,6 @@ substIfaceType env ty go (IfaceFunTy af w t1 t2) = IfaceFunTy af (go w) (go t1) (go t2) go ty@(IfaceLitTy {}) = ty go (IfaceTyConApp tc tys) = IfaceTyConApp tc (substIfaceAppArgs env tys) - go (IfaceTupleTy s i tys) = IfaceTupleTy s i (substIfaceAppArgs env tys) go (IfaceForAllTy {}) = pprPanic "substIfaceType" (ppr ty) go (IfaceCastTy ty co) = IfaceCastTy (go ty) (go_co co) go (IfaceCoercionTy co) = IfaceCoercionTy (go_co co) @@ -898,7 +890,6 @@ ppr_ty ctxt_prec ty@(IfaceFunTy InvisArg _ _ _) = ppr_sigma ctxt_prec ty ppr_ty _ (IfaceFreeTyVar tyvar) = ppr tyvar -- This is the main reason for IfaceFreeTyVar! ppr_ty _ (IfaceTyVar tyvar) = ppr tyvar -- See Note [TcTyVars in IfaceType] ppr_ty ctxt_prec (IfaceTyConApp tc tys) = pprTyTcApp ctxt_prec tc tys -ppr_ty ctxt_prec (IfaceTupleTy i p tys) = pprTuple ctxt_prec i p tys ppr_ty _ (IfaceLitTy n) = pprIfaceTyLit n -- Function types ppr_ty ctxt_prec (IfaceFunTy _ w ty1 ty2) -- Should be VisArg @@ -1043,9 +1034,6 @@ defaultNonStandardVars do_runtimereps do_multiplicities ty = go False emptyFsEnv go ink subs (IfaceTyConApp tc tc_args) = IfaceTyConApp tc (go_args ink subs tc_args) - go ink subs (IfaceTupleTy sort is_prom tc_args) - = IfaceTupleTy sort is_prom (go_args ink subs tc_args) - go ink subs (IfaceFunTy af w arg res) = IfaceFunTy af (go ink subs w) (go ink subs arg) (go ink subs res) @@ -1866,10 +1854,8 @@ instance Binary IfaceType where = do { putByte bh 6; put_ bh a; put_ bh b } put_ bh (IfaceCoercionTy a) = do { putByte bh 7; put_ bh a } - put_ bh (IfaceTupleTy s i tys) - = do { putByte bh 8; put_ bh s; put_ bh i; put_ bh tys } put_ bh (IfaceLitTy n) - = do { putByte bh 9; put_ bh n } + = do { putByte bh 8; put_ bh n } get bh = do h <- getByte bh @@ -1894,8 +1880,6 @@ instance Binary IfaceType where 7 -> do { a <- get bh ; return (IfaceCoercionTy a) } - 8 -> do { s <- get bh; i <- get bh; tys <- get bh - ; return (IfaceTupleTy s i tys) } _ -> do n <- get bh return (IfaceLitTy n) @@ -2094,7 +2078,6 @@ instance NFData IfaceType where IfaceTyConApp f1 f2 -> rnf f1 `seq` rnf f2 IfaceCastTy f1 f2 -> rnf f1 `seq` rnf f2 IfaceCoercionTy f1 -> rnf f1 - IfaceTupleTy f1 f2 f3 -> f1 `seq` f2 `seq` rnf f3 instance NFData IfaceTyLit where rnf = \case |