Commit fa34ced5 authored by Matthew Pickering's avatar Matthew Pickering Committed by Ben Gamari

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
parent 838cb53a
......@@ -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
......
......@@ -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
......
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