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

git at git.haskell.org git at git.haskell.org
Sun Jan 29 20:20:17 UTC 2017


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

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

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

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

    Fix serialization


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

ee5a0852c5509dc86519055d0c889873664a521a
 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 89b1f55..8ac57bf 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -612,7 +612,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 6c52ad4..267cc03 100644
--- a/libraries/ghci/GHCi/TH/Binary.hs
+++ b/libraries/ghci/GHCi/TH/Binary.hs
@@ -114,7 +114,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