[commit: ghc] master: Rename HEq_sc and Coercible_sc to heq_sel and coercible_sel (3382ade)
git at git.haskell.org
git at git.haskell.org
Tue Jan 2 23:56:31 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/3382ade3eb7ce09737d52e7c1f3ecc3431bf00fb/ghc
>---------------------------------------------------------------
commit 3382ade3eb7ce09737d52e7c1f3ecc3431bf00fb
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date: Tue Jan 2 16:29:00 2018 -0500
Rename HEq_sc and Coercible_sc to heq_sel and coercible_sel
These functions are record selectors.
To the unfamiliar, when inspecting core, they looked like data
constructors as they started with an upper case letter. We rename them
so that it is more clear that firstly they are functions and secondly
that they are selectors.
Reviewers: bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4280
>---------------------------------------------------------------
3382ade3eb7ce09737d52e7c1f3ecc3431bf00fb
compiler/prelude/TysWiredIn.hs | 4 ++--
testsuite/tests/indexed-types/should_compile/T7837.stderr | 4 ++--
testsuite/tests/simplCore/should_compile/Makefile | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/compiler/prelude/TysWiredIn.hs b/compiler/prelude/TysWiredIn.hs
index 32c6117..2ee7e14 100644
--- a/compiler/prelude/TysWiredIn.hs
+++ b/compiler/prelude/TysWiredIn.hs
@@ -255,13 +255,13 @@ mkWiredInIdName mod fs uniq id
heqTyConName, heqDataConName, heqSCSelIdName :: Name
heqTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "~~") heqTyConKey heqTyCon
heqDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "Eq#") heqDataConKey heqDataCon
-heqSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "HEq_sc") heqSCSelIdKey heqSCSelId
+heqSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "heq_sel") heqSCSelIdKey heqSCSelId
-- See Note [Kind-changing of (~) and Coercible] in libraries/ghc-prim/GHC/Types.hs
coercibleTyConName, coercibleDataConName, coercibleSCSelIdName :: Name
coercibleTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Coercible") coercibleTyConKey coercibleTyCon
coercibleDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "MkCoercible") coercibleDataConKey coercibleDataCon
-coercibleSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "Coercible_sc") coercibleSCSelIdKey coercibleSCSelId
+coercibleSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "coercible_sel") coercibleSCSelIdKey coercibleSCSelId
charTyConName, charDataConName, intTyConName, intDataConName :: Name
charTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Char") charTyConKey charTyCon
diff --git a/testsuite/tests/indexed-types/should_compile/T7837.stderr b/testsuite/tests/indexed-types/should_compile/T7837.stderr
index eb68261..44b894e 100644
--- a/testsuite/tests/indexed-types/should_compile/T7837.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T7837.stderr
@@ -1,5 +1,5 @@
Rule fired: Class op signum (BUILTIN)
Rule fired: Class op abs (BUILTIN)
-Rule fired: Class op HEq_sc (BUILTIN)
+Rule fired: Class op heq_sel (BUILTIN)
Rule fired: normalize/Double (T7837)
-Rule fired: Class op HEq_sc (BUILTIN)
+Rule fired: Class op heq_sel (BUILTIN)
diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile
index 5790407..33322f3 100644
--- a/testsuite/tests/simplCore/should_compile/Makefile
+++ b/testsuite/tests/simplCore/should_compile/Makefile
@@ -205,8 +205,8 @@ T12877:
T13025:
$(RM) -f T13025.o T13025.hi T13025a.o T13025a.hi
'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13025a.hs
- -'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13025.hs -ddump-simpl | grep -c HEq_sc
- # No lines should match 'HEq_sc' so wc should output zeros
+ -'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T13025.hs -ddump-simpl | grep -c heq_sel
+ # No lines should match 'heq_sel' so wc should output zeros
.PHONY: str-rules
str-rules:
More information about the ghc-commits
mailing list