import TcMatches ( tcMatchesCase, tcMatchExpected )
import TcGRHSs ( tcStmt )
import TcMonoType ( tcHsType )
-import TcPat ( tcPat )
+import TcPat ( tcPat, badFieldsCon )
import TcSimplify ( tcSimplifyAndCheck )
import TcType ( TcType, TcTauType, TcMaybe(..),
tcInstType, tcInstSigTcType, tcInstTyVars,
let
bad_fields = badFields rbinds con_id
in
- checkTc (null bad_fields) (badFieldsCon con_id bad_fields) `thenTc_`
+ checkTc (null bad_fields) (badFieldsCon con_name bad_fields) `thenTc_`
-- Typecheck the record bindings
-- (Do this after checkRecordFields in case there's a field that
recordUpdCtxt = ptext SLIT("In a record update construct")
-badFieldsCon con fields
- = hsep [ptext SLIT("Constructor"), ppr con,
- ptext SLIT("does not have field(s):"), pprQuotedList fields]
-
notSelector field
= hsep [quotes (ppr field), ptext SLIT("is not a record selector")]
\end{code}