X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcExpr.lhs;h=51d6f4b6032601e357acd038cc46768baef87252;hb=6a104dcf597f27887f0f1ac82dba7051ed2fe0c3;hp=540292cbb4fe8aa8b66682a84051691c82af5d42;hpb=9bcd95bad83ee937c178970e8b729732e680fe1e;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcExpr.lhs b/compiler/typecheck/TcExpr.lhs index 540292c..51d6f4b 100644 --- a/compiler/typecheck/TcExpr.lhs +++ b/compiler/typecheck/TcExpr.lhs @@ -1189,9 +1189,11 @@ tcRecordBinds data_con arg_tys (HsRecFields rbinds dd) do { rhs' <- tcPolyExprNC rhs field_ty ; let field_id = mkUserLocal (nameOccName field_lbl) (nameUnique field_lbl) - field_ty loc - -- The field_id has the *unique* of the selector Id - -- but is a LocalId with the appropriate type of the RHS + field_ty loc + -- Yuk: the field_id has the *unique* of the selector Id + -- (so we can find it easily) + -- but is a LocalId with the appropriate type of the RHS + -- (so the desugarer knows the type of local binder to make) ; return (Just (fld { hsRecFieldId = L loc field_id, hsRecFieldArg = rhs' })) } | otherwise = do { addErrTc (badFieldCon data_con field_lbl)