Skip to content

Commit

Permalink
Generalise the type of fieldSz and use it more
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Lynagh committed Apr 9, 2013
1 parent 9e46066 commit 63f3bd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/ghci/ByteCodeItbls.lhs
Expand Up @@ -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 ()
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 63f3bd8

Please sign in to comment.