X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FRtClosureInspect.hs;h=a62e8ed59c6d7278a5b9a02306ef763f72b5cc7d;hb=082089d195345e5c367df82b599e2c0848fb9d0b;hp=1b8616aaabcd2e9a74f8f05374344d7dcb47e45a;hpb=131320a1b79d965540449927b640ab037fb7a13a;p=ghc-hetmet.git diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs index 1b8616a..a62e8ed 100644 --- a/compiler/ghci/RtClosureInspect.hs +++ b/compiler/ghci/RtClosureInspect.hs @@ -386,7 +386,7 @@ ppr_termM1 NewtypeWrap{} = panic "ppr_termM1 - NewtypeWrap" pprNewtypeWrap y p NewtypeWrap{ty=ty, wrapped_term=t} | Just (tc,_) <- splitNewTyConApp_maybe ty , ASSERT(isNewTyCon tc) True - , Just new_dc <- maybeTyConSingleCon tc = do + , Just new_dc <- tyConSingleDataCon_maybe tc = do real_term <- y max_prec t return$ cparen (p >= app_prec) (ppr new_dc <+> real_term) pprNewtypeWrap _ _ _ = panic "pprNewtypeWrap" @@ -445,7 +445,7 @@ cPprTermBase y = isTupleTy ty = fromMaybe False $ do (tc,_) <- splitTyConApp_maybe ty - return (tc `elem` (fst.unzip.elems) boxedTupleArr) + return (isBoxedTupleTyCon tc) isTyCon a_tc ty = fromMaybe False $ do (tc,_) <- splitTyConApp_maybe ty @@ -682,7 +682,7 @@ cvObtainTerm hsc_env bound force mb_ty hval = runTR hsc_env $ do | Just (tc, args) <- splitNewTyConApp_maybe ty , isNewTyCon tc , wrapped_type <- newTyConInstRhs tc args - , Just dc <- maybeTyConSingleCon tc + , Just dc <- tyConSingleDataCon_maybe tc , t' <- expandNewtypes t{ ty = wrapped_type , subTerms = map expandNewtypes tt } = NewtypeWrap ty (Right dc) t'