From 5a7e6864701df450c6f36fe8a99376fc819a3398 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 14 Jul 2007 22:39:40 +0000 Subject: [PATCH] Fix for print022 (round up when dividing type size by word size) From Pepe Iborra (mnislaih) --- compiler/ghci/RtClosureInspect.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs index 3ffc8c2..1e69a89 100644 --- a/compiler/ghci/RtClosureInspect.hs +++ b/compiler/ghci/RtClosureInspect.hs @@ -235,7 +235,7 @@ extractUnboxed tt clos = go tt (nonPtrs clos) | otherwise = pprPanic "Expected a TcTyCon" (ppr t) go [] _ = [] go (t:tt) xx - | (x, rest) <- splitAt (sizeofType t `div` wORD_SIZE) xx + | (x, rest) <- splitAt ((sizeofType t + wORD_SIZE - 1) `div` wORD_SIZE) xx = x : go tt rest sizeofTyCon = sizeofPrimRep . tyConPrimRep -- 1.7.10.4