[commit: ghc] wip/ttypeable: Fix serialization (6dcb726)

git at git.haskell.org git at git.haskell.org
Sat Oct 1 21:35:49 UTC 2016


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

On branch  : wip/ttypeable
Link       : http://ghc.haskell.org/trac/ghc/changeset/6dcb726a09bdbf8150a92cb19e912915dbd21e8a/ghc

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

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

    Fix serialization


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

6dcb726a09bdbf8150a92cb19e912915dbd21e8a
 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 4ada423..1e10b2a 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -620,7 +620,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