X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcRnDriver.lhs;h=e08dd718e632b139746a8183facf417bf4e36857;hb=d1429dbd1cc8d65f0ff6451cf22f8eccc03e0acc;hp=925b838297dc970d1cb1cba8388ee88abd6265cd;hpb=02a06a56c6511b19ef411fd3884089ea996cc26b;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcRnDriver.lhs b/ghc/compiler/typecheck/TcRnDriver.lhs index 925b838..e08dd71 100644 --- a/ghc/compiler/typecheck/TcRnDriver.lhs +++ b/ghc/compiler/typecheck/TcRnDriver.lhs @@ -94,7 +94,7 @@ import TcHsType ( kcHsType ) import TcMType ( zonkTcType, zonkQuantifiedTyVar ) import TcMatches ( tcStmts, tcDoStmt ) import TcSimplify ( tcSimplifyInteractive, tcSimplifyInfer ) -import TcType ( Type, mkForAllTys, mkFunTys, mkTyConApp, tyVarsOfType, +import TcType ( Type, mkForAllTys, mkFunTys, mkTyConApp, tyVarsOfType, isTauTy, isUnLiftedType, tyClsNamesOfDFunHead, tyClsNamesOfType, isUnitTy ) import TcEnv ( tcLookupTyCon, tcLookupId, tcLookupGlobal ) import RnTypes ( rnLHsType ) @@ -968,7 +968,7 @@ mkPlan stmt@(L loc _) -- [stmt] ; runPlans [do { stuff@([v_id], _) <- tcGhciStmts [stmt, print_v] ; v_ty <- zonkTcType (idType v_id) - ; ifM (isUnitTy v_ty) failM + ; ifM (isUnitTy v_ty || not (isTauTy v_ty)) failM ; return stuff }, tcGhciStmts [stmt] ]}