[commit: ghc] wip/ttypeable: Fix serialization (49145b7)

git at git.haskell.org git at git.haskell.org
Fri Jul 29 16:29:04 UTC 2016


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

On branch  : wip/ttypeable
Link       : http://ghc.haskell.org/trac/ghc/changeset/49145b7403af9fd6bcfd86d3661688bab1c07100/ghc

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

commit 49145b7403af9fd6bcfd86d3661688bab1c07100
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Jul 17 21:09:57 2016 +0200

    Fix serialization


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

49145b7403af9fd6bcfd86d3661688bab1c07100
 compiler/utils/Binary.hs         | 2 +-
 libraries/ghci/GHCi/TH/Binary.hs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index 2282230..466e0eb 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -609,7 +609,7 @@ getTypeRepX bh = do
         2 -> return $ TypeRepX (typeRep :: TypeRep (->))
         3 -> do con <- get bh :: IO TyCon
                 TypeRepX rep_k <- getTypeRepX bh
-                case rep_k `eqTypeRep` (typeRep :: TypeRep Type) of
+                case typeRepKind rep_k `eqTypeRep` (typeRep :: TypeRep Type) of
                     Just HRefl -> pure $ TypeRepX $ mkTrCon con rep_k
                     Nothing    -> failure "Kind mismatch in constructor application"
                                           [ "    Type constructor: " ++ show con
diff --git a/libraries/ghci/GHCi/TH/Binary.hs b/libraries/ghci/GHCi/TH/Binary.hs
index e8a7a77..5e052f7 100644
--- a/libraries/ghci/GHCi/TH/Binary.hs
+++ b/libraries/ghci/GHCi/TH/Binary.hs
@@ -112,7 +112,7 @@ getTypeRepX = do
         2 -> return $ TypeRepX (typeRep :: TypeRep (->))
         3 -> do con <- get :: Get TyCon
                 TypeRepX rep_k <- getTypeRepX
-                case rep_k `eqTypeRep` (typeRep :: TypeRep Type) of
+                case typeRepKind rep_k `eqTypeRep` (typeRep :: TypeRep Type) of
                     Just HRefl -> pure $ TypeRepX $ mkTrCon con rep_k
                     Nothing    -> failure "Kind mismatch"
                                           [ "Type constructor: " ++ show con



More information about the ghc-commits mailing list