X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcTyDecls.lhs;h=83e0f7a4536d8bceb11fa15ad626dde615724577;hb=5bb39849e8e9041a28cec2e83a2dc4779b9d8d2d;hp=8cbcf52c76ac9717fd582c704ad8b30da8b1e17a;hpb=3a3a71aa1e4a09822988070228ff8a8e77e9a1ab;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcTyDecls.lhs b/ghc/compiler/typecheck/TcTyDecls.lhs index 8cbcf52..83e0f7a 100644 --- a/ghc/compiler/typecheck/TcTyDecls.lhs +++ b/ghc/compiler/typecheck/TcTyDecls.lhs @@ -17,14 +17,14 @@ IMP_Ubiq(){-uitous-} import HsSyn ( TyDecl(..), ConDecl(..), ConDetails(..), BangType(..), HsExpr(..), Match(..), GRHSsAndBinds(..), GRHS(..), OutPat(..), HsBinds(..), HsLit, Stmt, DoOrListComp, ArithSeqInfo, - SYN_IE(RecFlag), nonRecursive, + SYN_IE(RecFlag), nonRecursive, andMonoBinds, HsType, Fake, InPat, HsTyVar, Fixity, MonoBinds(..), Sig ) import HsTypes ( getTyVarName ) import RnHsSyn ( RenamedTyDecl(..), RenamedConDecl(..) ) import TcHsSyn ( mkHsTyLam, mkHsDictLam, tcIdType, - SYN_IE(TcHsBinds), TcIdOcc(..) + SYN_IE(TcHsBinds), TcIdOcc(..), SYN_IE(TcMonoBinds) ) import Inst ( newDicts, InstOrigin(..), Inst ) import TcMonoType ( tcHsTypeKind, tcHsType, tcContext ) @@ -168,13 +168,13 @@ Generating constructor/selector bindings for data declarations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \begin{code} -mkDataBinds :: [TyCon] -> TcM s ([Id], TcHsBinds s) -mkDataBinds [] = returnTc ([], EmptyBinds) +mkDataBinds :: [TyCon] -> TcM s ([Id], TcMonoBinds s) +mkDataBinds [] = returnTc ([], EmptyMonoBinds) mkDataBinds (tycon : tycons) | isSynTyCon tycon = mkDataBinds tycons | otherwise = mkDataBinds_one tycon `thenTc` \ (ids1, b1) -> mkDataBinds tycons `thenTc` \ (ids2, b2) -> - returnTc (ids1++ids2, b1 `ThenBinds` b2) + returnTc (ids1++ids2, b1 `AndMonoBinds` b2) mkDataBinds_one tycon = ASSERT( isAlgTyCon tycon ) @@ -189,9 +189,7 @@ mkDataBinds_one tycon | data_id <- data_ids, isLocallyDefined data_id ] in - returnTc (data_ids, - MonoBind (foldr AndMonoBinds EmptyMonoBinds binds) [] nonRecursive - ) + returnTc (data_ids, andMonoBinds binds) where data_cons = tyConDataCons tycon fields = [ (con, field) | con <- data_cons,