diff options
Diffstat (limited to 'compiler/ghci/ByteCodeItbls.lhs')
-rw-r--r-- | compiler/ghci/ByteCodeItbls.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/ghci/ByteCodeItbls.lhs b/compiler/ghci/ByteCodeItbls.lhs index f1524730b6..c79e08dbb8 100644 --- a/compiler/ghci/ByteCodeItbls.lhs +++ b/compiler/ghci/ByteCodeItbls.lhs @@ -285,8 +285,8 @@ data StgConInfoTable = StgConInfoTable { sizeOfConItbl :: StgConInfoTable -> Int sizeOfConItbl conInfoTable - = sum [ sizeOf (conDesc conInfoTable) - , sizeOf (infoTable conInfoTable) ] + = sum [ fieldSz conDesc conInfoTable + , fieldSz infoTable conInfoTable ] pokeConItbl :: DynFlags -> Ptr StgConInfoTable -> Ptr StgConInfoTable -> StgConInfoTable -> IO () @@ -374,7 +374,7 @@ instance Storable StgInfoTable where #endif } -fieldSz :: (Storable a, Storable b) => (a -> b) -> a -> Int +fieldSz :: Storable b => (a -> b) -> a -> Int fieldSz sel x = sizeOf (sel x) newtype State s m a = State (s -> m (s, a)) |