projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a bug in the closure viewer
[ghc-hetmet.git]
/
compiler
/
ghci
/
RtClosureInspect.hs
diff --git
a/compiler/ghci/RtClosureInspect.hs
b/compiler/ghci/RtClosureInspect.hs
index
170dec0
..
e0a1250
100644
(file)
--- a/
compiler/ghci/RtClosureInspect.hs
+++ b/
compiler/ghci/RtClosureInspect.hs
@@
-39,6
+39,8
@@
module RtClosureInspect(
isPointed,
isFullyEvaluatedTerm,
-- unsafeDeepSeq,
isPointed,
isFullyEvaluatedTerm,
-- unsafeDeepSeq,
+
+ sigmaType
) where
#include "HsVersions.h"
) where
#include "HsVersions.h"
@@
-472,7
+474,7
@@
cvObtainTerm1 hsc_env force mb_ty hval
| Nothing <- mb_ty = runTR hsc_env . go argTypeKind $ hval
| Just ty <- mb_ty = runTR hsc_env $ do
term <- go argTypeKind hval
| Nothing <- mb_ty = runTR hsc_env . go argTypeKind $ hval
| Just ty <- mb_ty = runTR hsc_env $ do
term <- go argTypeKind hval
- ty' <- instScheme ty
+ ty' <- instScheme (sigmaType ty)
addConstraint ty' (fromMaybe (error "by definition")
(termType term))
return term
addConstraint ty' (fromMaybe (error "by definition")
(termType term))
return term
@@
-539,6
+541,11
@@
zonkTerm = foldTerm idTermFoldM {
,fSuspension = \ct ty v b -> fmapMMaybe zonkTcType ty >>= \ty ->
return (Suspension ct ty v b)}
,fSuspension = \ct ty v b -> fmapMMaybe zonkTcType ty >>= \ty ->
return (Suspension ct ty v b)}
+
+-- Is this defined elsewhere?
+-- Find all free tyvars and insert the appropiate ForAll.
+sigmaType ty = mkForAllTys (varSetElems$ tyVarsOfType (dropForAlls ty)) ty
+
{-
Example of Type Reconstruction
--------------------------------
{-
Example of Type Reconstruction
--------------------------------