[commit: ghc] master: Rename dataConRepNameUnique to dataConTyRepNameUnique (fa34ced)
git at git.haskell.org
git at git.haskell.org
Fri Jun 8 00:09:43 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/fa34ced5204b13ba809a3441a89b9cf98de2d54e/ghc
>---------------------------------------------------------------
commit fa34ced5204b13ba809a3441a89b9cf98de2d54e
Author: Matthew Pickering <matthew.pickering at tweag.io>
Date: Thu Jun 7 13:31:38 2018 -0400
Rename dataConRepNameUnique to dataConTyRepNameUnique
The `DataCon` rep also applies to the worker. For example, see
`MkId.mkDataConRep`. `dataConTyRepNameUnique` is for the type
representation, so we rename it to make this distinction clear.
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4797
>---------------------------------------------------------------
fa34ced5204b13ba809a3441a89b9cf98de2d54e
compiler/basicTypes/Unique.hs | 6 +++---
compiler/types/TyCon.hs | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/compiler/basicTypes/Unique.hs b/compiler/basicTypes/Unique.hs
index f0c9814..4a709d2 100644
--- a/compiler/basicTypes/Unique.hs
+++ b/compiler/basicTypes/Unique.hs
@@ -64,7 +64,7 @@ module Unique (
-- *** From TyCon name uniques
tyConRepNameUnique,
-- *** From DataCon name uniques
- dataConWorkerUnique, dataConRepNameUnique
+ dataConWorkerUnique, dataConTyRepNameUnique
) where
#include "HsVersions.h"
@@ -400,9 +400,9 @@ tyConRepNameUnique u = incrUnique u
mkPreludeDataConUnique i = mkUnique '6' (3*i) -- Must be alphabetic
--------------------------------------------------
-dataConRepNameUnique, dataConWorkerUnique :: Unique -> Unique
+dataConTyRepNameUnique, dataConWorkerUnique :: Unique -> Unique
dataConWorkerUnique u = incrUnique u
-dataConRepNameUnique u = stepUnique u 2
+dataConTyRepNameUnique u = stepUnique u 2
--------------------------------------------------
mkPrimOpIdUnique op = mkUnique '9' op
diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs
index 5717aef..230cec7 100644
--- a/compiler/types/TyCon.hs
+++ b/compiler/types/TyCon.hs
@@ -152,7 +152,7 @@ import FastStringEnv
import FieldLabel
import Constants
import Util
-import Unique( tyConRepNameUnique, dataConRepNameUnique )
+import Unique( tyConRepNameUnique, dataConTyRepNameUnique )
import UniqSet
import Module
import {-# SOURCE #-} DataCon
@@ -1209,7 +1209,7 @@ mkPrelTyConRepName tc_name -- Prelude tc_name is always External,
name_mod = nameModule tc_name
name_uniq = nameUnique tc_name
rep_uniq | isTcOcc name_occ = tyConRepNameUnique name_uniq
- | otherwise = dataConRepNameUnique name_uniq
+ | otherwise = dataConTyRepNameUnique name_uniq
(rep_mod, rep_occ) = tyConRepModOcc name_mod name_occ
-- | The name (and defining module) for the Typeable representation (TyCon) of a
More information about the ghc-commits
mailing list