[commit: ghc] ghc-7.10: Rename ty{Con, peRep}Hash to ty{Con, peRep}Fingerprint (cc39344)

git at git.haskell.org git at git.haskell.org
Fri Mar 13 22:18:17 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/cc393440b5d890b0944200d5762c49cc70c4ce4b/ghc

>---------------------------------------------------------------

commit cc393440b5d890b0944200d5762c49cc70c4ce4b
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Wed Mar 11 16:36:09 2015 +0100

    Rename ty{Con,peRep}Hash to ty{Con,peRep}Fingerprint
    
    This is a follow-up change to 56e0ac98c3a439b8757a2e886db259270bdc85f0
    
    See also discussion at
    https://groups.google.com/d/msg/haskell-core-libraries/e9N3U6nJeQE/V-TvG3G-3x4J
    
    (cherry picked from commit 842028b4a624e639dc9ee9a4f92fc208c8206e3f)


>---------------------------------------------------------------

cc393440b5d890b0944200d5762c49cc70c4ce4b
 libraries/base/Data/Typeable.hs          |  4 ++--
 libraries/base/Data/Typeable/Internal.hs | 10 +++++-----
 libraries/base/changelog.md              |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libraries/base/Data/Typeable.hs b/libraries/base/Data/Typeable.hs
index 7e501a5..c30a43d 100644
--- a/libraries/base/Data/Typeable.hs
+++ b/libraries/base/Data/Typeable.hs
@@ -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,
diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs
index 4cdc57d..60402f3 100644
--- a/libraries/base/Data/Typeable/Internal.hs
+++ b/libraries/base/Data/Typeable/Internal.hs
@@ -45,7 +45,7 @@ module Data.Typeable.Internal (
     splitPolyTyConApp,
     funResultTy,
     typeRepArgs,
-    typeRepHash,
+    typeRepFingerprint,
     rnfTypeRep,
     showsTypeRep,
     tyConString,
@@ -84,7 +84,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
@@ -197,8 +197,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
 
 -------------------------------------------------------------
 --
@@ -338,7 +338,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
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md
index e99c1b1..e2318a8 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -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)
 



More information about the ghc-commits mailing list