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
8d5364c1
Commit
8d5364c1
authored
Dec 11, 2006
by
mnislaih
Browse files
Fix an issue with lazyness in the closure viewer
parent
121da25a
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/ghci/Linker.lhs
View file @
8d5364c1
...
...
@@ -202,7 +202,9 @@ recoverDCInRTS a = do
getHValue :: Name -> IO (Maybe HValue)
getHValue name = do
pls <- readIORef v_PersistentLinkerState
return$ fmap snd (lookupNameEnv (closure_env pls) name)
case lookupNameEnv (closure_env pls) name of
Just (_,x) -> return$ Just x
_ -> return Nothing
withExtendedLinkEnv :: [(Name,HValue)] -> IO a -> IO a
withExtendedLinkEnv new_env action
...
...
compiler/main/GHC.hs
View file @
8d5364c1
...
...
@@ -2286,7 +2286,10 @@ mkSite (pkgName, modName, sitenum) =
(
mkModule
(
stringToPackageId
pkgName
)
(
mkModuleName
modName
),
sitenum
)
obtainTerm
::
Session
->
Bool
->
Id
->
IO
(
Maybe
Term
)
obtainTerm
sess
force
id
=
withSession
sess
$
\
hsc_env
->
getHValue
(
varName
id
)
>>=
traverse
(
cvObtainTerm
hsc_env
force
Nothing
)
obtainTerm
sess
force
id
=
withSession
sess
$
\
hsc_env
->
do
mb_v
<-
getHValue
(
varName
id
)
case
mb_v
of
Just
v
->
fmap
Just
$
cvObtainTerm
hsc_env
force
(
Just
$
idType
id
)
v
Nothing
->
return
Nothing
#
endif
/*
GHCI
*/
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