summaryrefslogtreecommitdiff
path: root/compiler/ghci
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-04-08 16:12:08 +0100
committerIan Lynagh <ian@well-typed.com>2013-04-09 11:53:35 +0100
commit63f3bd8fe38cb377e31993ecee7362717b6894de (patch)
tree5e8e1e1f4bd79e5af69620f6bbe7683aea36fa23 /compiler/ghci
parent9e460664f3179c53f2f439238929b501691ddf24 (diff)
downloadhaskell-63f3bd8fe38cb377e31993ecee7362717b6894de.tar.gz
Generalise the type of fieldSz and use it more
Diffstat (limited to 'compiler/ghci')
-rw-r--r--compiler/ghci/ByteCodeItbls.lhs6
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))