Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
63f3bd8f
Commit
63f3bd8f
authored
Apr 08, 2013
by
ian@well-typed.com
Browse files
Generalise the type of fieldSz and use it more
parent
9e460664
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/ghci/ByteCodeItbls.lhs
View file @
63f3bd8f
...
...
@@ -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))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment