X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcExpr.lhs;h=6b2bec7a860b4a93e7221ef31c65926b9b2ed006;hb=a77abe6a30ea2763cfa1c0ca83cdce9b7200ced2;hp=809e08f9ff0fa8fafcdcf19af89658994f00c7ea;hpb=7b0181919416d8f04324575b7e17031ca692f5b0;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcExpr.lhs b/ghc/compiler/typecheck/TcExpr.lhs index 809e08f..6b2bec7 100644 --- a/ghc/compiler/typecheck/TcExpr.lhs +++ b/ghc/compiler/typecheck/TcExpr.lhs @@ -41,7 +41,7 @@ import TcType ( TcType(..), TcMaybe(..), newTyVarTy, zonkTcTyVars, zonkTcType ) import TcKind ( TcKind ) -import Class ( Class(..), getClassSig ) +import Class ( Class(..), classSig ) import FieldLabel ( fieldLabelName ) import Id ( Id(..), GenId, idType, dataConFieldLabels, dataConSig ) import Kind ( Kind, mkBoxedTypeKind, mkTypeKind, mkArrowKind ) @@ -166,6 +166,10 @@ tcExpr (HsLit lit@(HsString str)) %************************************************************************ \begin{code} +tcExpr (HsPar expr) = tcExpr expr + +tcExpr (NegApp expr n) = tcExpr (HsApp (HsVar n) expr) + tcExpr (HsLam match) = tcMatch match `thenTc` \ (match',lie,ty) -> returnTc (HsLam match', lie, ty) @@ -390,7 +394,7 @@ tcExpr (RecordUpd record_expr rbinds) -- Check that the field names are plausible zonkTcType record_ty `thenNF_Tc` \ record_ty' -> let - (tycon, inst_tys, data_cons) = getAppDataTyCon record_ty' + (tycon, inst_tys, data_cons) = _trace "getAppDataTyCon.TcExpr" $ getAppDataTyCon record_ty' -- The record binds are non-empty (syntax); so at least one field -- label will have been unified with record_ty by tcRecordBinds; -- field labels must be of data type; hencd the getAppDataTyCon must succeed.