X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FDsExpr.lhs;h=5fb0ec8f490b5d8b7cdccc79cd1b2ef0be6bee29;hb=273be06fa7cb1297284dbb553ecc9be7d07df6af;hp=ec291b028a810193563d5debd682f2990299b2a7;hpb=7446fa8a9c9781ee4c56ef1b55c7a5309fa0c3c5;p=ghc-hetmet.git diff --git a/compiler/deSugar/DsExpr.lhs b/compiler/deSugar/DsExpr.lhs index ec291b0..5fb0ec8 100644 --- a/compiler/deSugar/DsExpr.lhs +++ b/compiler/deSugar/DsExpr.lhs @@ -43,13 +43,13 @@ import TcHsSyn ( hsPatType, mkVanillaTuplePat ) import TcType ( tcSplitAppTy, tcSplitFunTys, tcTyConAppTyCon, tcTyConAppArgs, isUnLiftedType, Type, mkAppTy ) -import Type ( funArgTy, splitFunTys, isUnboxedTupleType, mkFunTy ) +import Type ( splitFunTys, isUnboxedTupleType, mkFunTy ) import CoreSyn import CoreUtils ( exprType, mkIfThenElse, bindNonRec ) import CostCentre ( mkUserCC ) import Id ( Id, idType, idName, idDataCon ) -import PrelInfo ( rEC_CON_ERROR_ID, iRREFUT_PAT_ERROR_ID ) +import PrelInfo ( rEC_CON_ERROR_ID ) import DataCon ( DataCon, dataConWrapId, dataConFieldLabels, dataConInstOrigArgTys ) import DataCon ( isVanillaDataCon ) import TyCon ( FieldLabel, tyConDataCons ) @@ -85,7 +85,9 @@ dsValBinds (ValBindsOut binds _) body = foldrDs ds_val_bind body binds ------------------------- dsIPBinds (IPBinds ip_binds dict_binds) body = do { prs <- dsLHsBinds dict_binds - ; let inner = foldr (\(x,r) e -> Let (NonRec x r) e) body prs + ; let inner = Let (Rec prs) body + -- The dict bindings may not be in + -- dependency order; hence Rec ; foldrDs ds_ip_bind inner ip_binds } where ds_ip_bind (L _ (IPBind n e)) body