No test/assertion for kcLHsQTyVars_Cusk solveEqualities
In kcLHsQTyVars_Cusk
, there are these lines:
do { (scoped_kvs, (tc_tvs, res_kind))
<- pushTcLevelM_ $
solveEqualities $
bindImplicitTKBndrs_Q_Skol kv_ns $
bindExplicitTKBndrs_Q_Skol ctxt_kind hs_tvs $
thing_inside
I'm using them as a model for the TLKS implementation, and right now I'm trying to understand what solveEqualities
is doing here. So here's what I did:
- I commented out the
solveEqualities $
line and ran the test suite. It did not cause any failures. - I did some git history digging and found out that this call was added in 55577a91 to fix #11648 (closed). From reading the discussion I figured that I need a
-DDEBUG
compiler to see the error, as it's an assertion failure. - I've built GHC with the
devel2
flavour (it turns on-DDEBUG
) and ran the tests mentioned in #11648 (closed), there were no errors still. (Just to make sure that I have assertions enabled, I addedMASSERT(False)
and it failed)
Now I'm puzzled. What purpose does solveEqualities
serve here? We need a test case that would fail without it!