X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FDebugger.hs;h=8e0b77ec8d7df376ab59ce559c148cd7f8423c0d;hb=421819753b3eb4940a26e578ef0e4c5cd31761fa;hp=602a1a578123ea54c1812537eb06451f9e8524d6;hpb=61e253e98937a2b83454f4d5ab3c94ef8c2dc81e;p=ghc-hetmet.git diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs index 602a1a5..8e0b77e 100644 --- a/compiler/ghci/Debugger.hs +++ b/compiler/ghci/Debugger.hs @@ -10,6 +10,13 @@ -- ----------------------------------------------------------------------------- +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module Debugger (pprintClosureCommand, showTerm) where import Linker @@ -21,18 +28,13 @@ import IdInfo import Name import Var hiding ( varName ) import VarSet -import VarEnv import Name import UniqSupply -import Type import TcType -import TcGadt import GHC -import GhciMonad import InteractiveEval import Outputable import Pretty ( Mode(..), showDocWith ) -import FastString import SrcLoc import Control.Exception @@ -146,10 +148,8 @@ bindSuspensions cms@(Session ref) t = do showTerm cms@(Session ref) = cPprTerm cPpr where cPpr = \p-> cPprShowable : cPprTermBase p - cPprShowable prec t@Term{ty=ty, dc=dc, val=val} = do - let hasType = isEmptyVarSet (tyVarsOfType ty) -- redundant - isEvaled = isFullyEvaluatedTerm t - if not isEvaled -- || not hasType + cPprShowable prec t@Term{ty=ty, dc=dc, val=val} = + if not (isFullyEvaluatedTerm t) then return Nothing else do hsc_env <- readIORef ref