projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd14f46
)
Fix assertions in RtClosureInspect
author
Ian Lynagh
<igloo@earth.li>
Fri, 7 Sep 2007 23:33:30 +0000
(23:33 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 7 Sep 2007 23:33:30 +0000
(23:33 +0000)
compiler/ghci/RtClosureInspect.hs
patch
|
blob
|
history
diff --git
a/compiler/ghci/RtClosureInspect.hs
b/compiler/ghci/RtClosureInspect.hs
index
4025aa2
..
a05830e
100644
(file)
--- a/
compiler/ghci/RtClosureInspect.hs
+++ b/
compiler/ghci/RtClosureInspect.hs
@@
-179,7
+179,7
@@
getClosureData a =
ptrsList = Array 0 (elems - 1) elems ptrs
nptrs_data = [W# (indexWordArray# nptrs i)
| I# i <- [0.. fromIntegral (BCI.nptrs itbl)] ]
ptrsList = Array 0 (elems - 1) elems ptrs
nptrs_data = [W# (indexWordArray# nptrs i)
| I# i <- [0.. fromIntegral (BCI.nptrs itbl)] ]
- ASSERT(fromIntegral elems >= 0) return ()
+ ASSERT(elems >= 0) return ()
ptrsList `seq`
return (Closure tipe (Ptr iptr) itbl ptrsList nptrs_data)
ptrsList `seq`
return (Closure tipe (Ptr iptr) itbl ptrsList nptrs_data)
@@
-766,7
+766,7
@@
unlessM condM acc = condM >>= \c -> unless c acc
-- Strict application of f at index i
appArr :: Ix i => (e -> a) -> Array i e -> Int -> a
-- Strict application of f at index i
appArr :: Ix i => (e -> a) -> Array i e -> Int -> a
-appArr f (Array _ _ _ ptrs#) (I# i#)
+appArr f a@(Array _ _ _ ptrs#) i@(I# i#)
= ASSERT (i < length(elems a))
case indexArray# ptrs# i# of
(# e #) -> f e
= ASSERT (i < length(elems a))
case indexArray# ptrs# i# of
(# e #) -> f e