From 67f8c4685920582ad82000e7840a1ffe91682f35 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Fri, 16 Feb 2007 20:10:52 +0000 Subject: [PATCH] Fixed a bug with the :print command spotted by Bernie Pope. Test ghci.debugger/scripts/print018 covers this --- compiler/ghci/Debugger.hs | 2 +- compiler/ghci/RtClosureInspect.hs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs index b5c30d6..19a9e99 100644 --- a/compiler/ghci/Debugger.hs +++ b/compiler/ghci/Debugger.hs @@ -265,7 +265,7 @@ instantiateTyVarsToUnknown cms ty -- | The inverse function. Strip the GHC.Base.Unknowns in the type of the id, they correspond to tyvars. The caller must provide an infinite list of fresh names stripUnknowns :: [Name] -> Id -> Id -stripUnknowns names id = setIdType id . sigmaType . fst . go names . idType +stripUnknowns names id = setIdType id . fst . go names . idType $ id where go tyvarsNames@(v:vv) ty diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs index f653de6..7a6dee5 100644 --- a/compiler/ghci/RtClosureInspect.hs +++ b/compiler/ghci/RtClosureInspect.hs @@ -39,8 +39,6 @@ module RtClosureInspect( isPointed, isFullyEvaluatedTerm, -- unsafeDeepSeq, - - sigmaType ) where #include "HsVersions.h" @@ -571,7 +569,7 @@ zonkTerm = foldTerm idTermFoldM { -- Is this defined elsewhere? --- Find all free tyvars and insert the appropiate ForAll. +-- Generalize the type: find all free tyvars and wrap in the appropiate ForAll. sigmaType ty = mkForAllTys (varSetElems$ tyVarsOfType (dropForAlls ty)) ty {- -- 1.7.10.4