Commit 842028b4 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Rename ty{Con,peRep}Hash to ty{Con,peRep}Fingerprint

This is a follow-up change to 56e0ac98

See also discussion at
https://groups.google.com/d/msg/haskell-core-libraries/e9N3U6nJeQE/V-TvG3G-3x4J

Reviewed By: simonpj

Differential Revision: https://phabricator.haskell.org/D726
parent 5f356f3e
......@@ -61,12 +61,12 @@ module Data.Typeable
-- * Type representations
TypeRep, -- abstract, instance of: Eq, Show, Typeable
typeRepHash,
typeRepFingerprint,
rnfTypeRep,
showsTypeRep,
TyCon, -- abstract, instance of: Eq, Show, Typeable
tyConHash,
tyConFingerprint,
tyConString,
tyConPackage,
tyConModule,
......
......@@ -44,7 +44,7 @@ module Data.Typeable.Internal (
splitPolyTyConApp,
funResultTy,
typeRepArgs,
typeRepHash,
typeRepFingerprint,
rnfTypeRep,
showsTypeRep,
tyConString,
......@@ -83,7 +83,7 @@ instance Ord TypeRep where
-- | An abstract representation of a type constructor. 'TyCon' objects can
-- be built using 'mkTyCon'.
data TyCon = TyCon {
tyConHash :: {-# UNPACK #-} !Fingerprint, -- ^ @since 4.8.0.0
tyConFingerprint :: {-# UNPACK #-} !Fingerprint, -- ^ @since 4.8.0.0
tyConPackage :: String, -- ^ @since 4.5.0.0
tyConModule :: String, -- ^ @since 4.5.0.0
tyConName :: String -- ^ @since 4.5.0.0
......@@ -196,8 +196,8 @@ tyConString = tyConName
-- | Observe the 'Fingerprint' of a type representation
--
-- @since 4.8.0.0
typeRepHash :: TypeRep -> Fingerprint
typeRepHash (TypeRep fpr _ _ _) = fpr
typeRepFingerprint :: TypeRep -> Fingerprint
typeRepFingerprint (TypeRep fpr _ _ _) = fpr
-------------------------------------------------------------
--
......@@ -337,7 +337,7 @@ typeLitTypeRep nm = rep
where
rep = mkTyConApp tc []
tc = TyCon
{ tyConHash = fingerprintString (mk pack modu nm)
{ tyConFingerprint = fingerprintString (mk pack modu nm)
, tyConPackage = pack
, tyConModule = modu
, tyConName = nm
......
......@@ -142,8 +142,8 @@
* Restore invariant in `Data (Ratio a)` instance (#10011)
* Add/expose `rnfTypeRep`, `rnfTyCon`, `TypeRepHash`, and
`TyConHash` helpers to `Data.Typeable`.
* Add/expose `rnfTypeRep`, `rnfTyCon`, `typeRepFingerprint`, and
`tyConFingerprint` helpers to `Data.Typeable`.
* Define proper `MINIMAL` pragma for `class Ix`. (#10142)
......
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