diff --git a/ghc-heap-view.cabal b/ghc-heap-view.cabal
--- a/ghc-heap-view.cabal
+++ b/ghc-heap-view.cabal
@@ -1,5 +1,5 @@
 Name:                ghc-heap-view
-Version:             0.3
+Version:             0.3.0.1
 Synopsis:            Extract the heap representation of Haskell values and thunks
 Description:
   This library provides functions to introspect the Haskell heap, for example
diff --git a/src/GHC/HeapView.hs b/src/GHC/HeapView.hs
--- a/src/GHC/HeapView.hs
+++ b/src/GHC/HeapView.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
 {-|
 Module      :  GHC.HeapView
 Copyright   :  (c) 2012 Joachim Breitner
@@ -37,13 +38,19 @@
 import Data.Char
 import Data.List        ( intersperse )
 
+#include "ghcautoconf.h"
+
 -- | An arbitrarily Haskell value in a safe Box. The point is that even
 -- unevaluated thunks can safely be moved around inside the Box, and when
 -- required, e.g. in 'getBoxedClosureData', the function knows how far it has
 -- to evalue the argument.
 data Box = Box Any
 
+#if SIZEOF_VOID_P == 8
 type HalfWord = Word32
+#else
+type HalfWord = Word16
+#endif
 
 instance Show Box where
 -- From libraries/base/GHC/Ptr.lhs
