checkMissingFields could use wc_errors
In !7812 (closed) I'm changing wc_holes
to wc_errors
to account for other kinds of delayed errors that we want to emit during typechecking and report after typechecking, in order to benefit from further unifications.
We could make use of this in tcExpr RecordCon
in order to report better types in error messages. Currently (test case T18869
) we sometimes get poor error messages:
data Bar where
MkBar :: ( a ~ Int ) => { bar :: !a } -> Bar
testBar :: Bar
testBar = MkBar {}
• Constructor ‘MkBar’ does not have the required strict field(s):
bar :: a0
• In the expression: MkBar {}
In an equation for ‘testBar’: testBar = MkBar {}