File D5212.patch of Package ghc
Index: ghc-8.6.1/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc
===================================================================
--- ghc-8.6.1.orig/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc
+++ ghc-8.6.1/libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc
@@ -58,7 +58,7 @@ pokeItbl a0 itbl = do
#endif
(#poke StgInfoTable, layout.payload.ptrs) a0 (ptrs itbl)
(#poke StgInfoTable, layout.payload.nptrs) a0 (nptrs itbl)
- (#poke StgInfoTable, type) a0 (fromEnum (tipe itbl))
+ (#poke StgInfoTable, type) a0 (toHalfWord (fromEnum (tipe itbl)))
#if __GLASGOW_HASKELL__ > 804
(#poke StgInfoTable, srt) a0 (srtlen itbl)
#else
@@ -71,6 +71,9 @@ pokeItbl a0 itbl = do
Just (Left xs) -> pokeArray code_offset xs
Just (Right xs) -> pokeArray code_offset xs
#endif
+ where
+ toHalfWord :: Int -> HalfWord
+ toHalfWord i = fromIntegral i
-- | Size in bytes of a standard InfoTable
itblSize :: Int