Skip to content
  • Simon Peyton Jones's avatar
    Use captureTopConstraints in TcRnDriver calls · 5be7ad78
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    Trac #16376 showed the danger of failing to report an error
    that exists only in the unsolved constraints, if an exception
    is raised (via failM).
    
    Well, the commit 5c1f268e (Fail fast in solveLocalEqualities)
    did just that -- i.e. it found errors in the constraints, and
    called failM to avoid a misleading cascade.
    
    So we need to be sure to call captureTopConstraints to report
    those insolubles.  This was wrong in TcRnDriver.tcRnExpr and
    in TcRnDriver.tcRnType.
    
    As a result the error messages from test T13466 improved slightly,
    a happy outcome.
    5be7ad78