Commit 83ac4624 authored by David Feuer's avatar David Feuer Committed by David Feuer

Don't derive showList

There's no obvious reason to derive the definition of `showList`,
manually inlining the default definition. Let's just use
the default definition in the usual manner.

Garbage collect a few unused `RdrNames` from `PrelNames`:
`showList`, `showList__`, and `/=`.

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: RyanGlScott, rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3403
parent 616a3b49
...@@ -622,11 +622,10 @@ forall_tv_RDR, dot_tv_RDR :: RdrName ...@@ -622,11 +622,10 @@ forall_tv_RDR, dot_tv_RDR :: RdrName
forall_tv_RDR = mkUnqual tvName (fsLit "forall") forall_tv_RDR = mkUnqual tvName (fsLit "forall")
dot_tv_RDR = mkUnqual tvName (fsLit ".") dot_tv_RDR = mkUnqual tvName (fsLit ".")
eq_RDR, ge_RDR, ne_RDR, le_RDR, lt_RDR, gt_RDR, compare_RDR, eq_RDR, ge_RDR, le_RDR, lt_RDR, gt_RDR, compare_RDR,
ltTag_RDR, eqTag_RDR, gtTag_RDR :: RdrName ltTag_RDR, eqTag_RDR, gtTag_RDR :: RdrName
eq_RDR = nameRdrName eqName eq_RDR = nameRdrName eqName
ge_RDR = nameRdrName geName ge_RDR = nameRdrName geName
ne_RDR = varQual_RDR gHC_CLASSES (fsLit "/=")
le_RDR = varQual_RDR gHC_CLASSES (fsLit "<=") le_RDR = varQual_RDR gHC_CLASSES (fsLit "<=")
lt_RDR = varQual_RDR gHC_CLASSES (fsLit "<") lt_RDR = varQual_RDR gHC_CLASSES (fsLit "<")
gt_RDR = varQual_RDR gHC_CLASSES (fsLit ">") gt_RDR = varQual_RDR gHC_CLASSES (fsLit ">")
...@@ -755,10 +754,8 @@ reset_RDR = varQual_RDR rEAD_PREC (fsLit "reset") ...@@ -755,10 +754,8 @@ reset_RDR = varQual_RDR rEAD_PREC (fsLit "reset")
prec_RDR = varQual_RDR rEAD_PREC (fsLit "prec") prec_RDR = varQual_RDR rEAD_PREC (fsLit "prec")
pfail_RDR = varQual_RDR rEAD_PREC (fsLit "pfail") pfail_RDR = varQual_RDR rEAD_PREC (fsLit "pfail")
showList_RDR, showList___RDR, showsPrec_RDR, shows_RDR, showString_RDR, showsPrec_RDR, shows_RDR, showString_RDR,
showSpace_RDR, showCommaSpace_RDR, showParen_RDR :: RdrName showSpace_RDR, showCommaSpace_RDR, showParen_RDR :: RdrName
showList_RDR = varQual_RDR gHC_SHOW (fsLit "showList")
showList___RDR = varQual_RDR gHC_SHOW (fsLit "showList__")
showsPrec_RDR = varQual_RDR gHC_SHOW (fsLit "showsPrec") showsPrec_RDR = varQual_RDR gHC_SHOW (fsLit "showsPrec")
shows_RDR = varQual_RDR gHC_SHOW (fsLit "shows") shows_RDR = varQual_RDR gHC_SHOW (fsLit "shows")
showString_RDR = varQual_RDR gHC_SHOW (fsLit "showString") showString_RDR = varQual_RDR gHC_SHOW (fsLit "showString")
......
...@@ -1112,12 +1112,8 @@ Example ...@@ -1112,12 +1112,8 @@ Example
gen_Show_binds :: (Name -> Fixity) -> SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff) gen_Show_binds :: (Name -> Fixity) -> SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)
gen_Show_binds get_fixity loc tycon gen_Show_binds get_fixity loc tycon
= (listToBag [shows_prec, show_list], emptyBag) = (unitBag shows_prec, emptyBag)
where where
-----------------------------------------------------------------------
show_list = mkHsVarBind loc showList_RDR
(nlHsApp (nlHsVar showList___RDR) (nlHsPar (nlHsApp (nlHsVar showsPrec_RDR) (nlHsIntLit 0))))
-----------------------------------------------------------------------
data_cons = tyConDataCons tycon data_cons = tyConDataCons tycon
shows_prec = mkFunBindSE 1 loc showsPrec_RDR (map pats_etc data_cons) shows_prec = mkFunBindSE 1 loc showsPrec_RDR (map pats_etc data_cons)
comma_space = nlHsVar showCommaSpace_RDR comma_space = nlHsVar showCommaSpace_RDR
......
...@@ -9,7 +9,6 @@ Derived class instances: ...@@ -9,7 +9,6 @@ Derived class instances:
instance GHC.Show.Show (DrvEmptyData.Void a) where instance GHC.Show.Show (DrvEmptyData.Void a) where
GHC.Show.showsPrec _ = GHC.Err.error "Void showsPrec" GHC.Show.showsPrec _ = GHC.Err.error "Void showsPrec"
GHC.Show.showList = GHC.Show.showList__ (GHC.Show.showsPrec 0)
instance GHC.Classes.Ord (DrvEmptyData.Void a) where instance GHC.Classes.Ord (DrvEmptyData.Void a) where
GHC.Classes.compare _ _ = GHC.Err.error "Void compare" GHC.Classes.compare _ _ = GHC.Err.error "Void compare"
......
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