Skip to content
Snippets Groups Projects
Commit b637a24d authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Fix Trac #7453 on the 7.6 branch

This patch fixes a quite egregious bug. runTcS was intialising
the 'untouchables' to NoUntouchables, which is quite wrong for
the invocation in TcSimplify.simplifyInfer.  Result: missed
skolem-escape check and seg-fault city.

All this is done differently, and better, in HEAD, so this
patch is needed only on the branch.
parent 418a8c92
No related branches found
No related tags found
No related merge requests found
......@@ -935,6 +935,15 @@ runTcSWithEvBinds ev_binds_var tcs
; inert_var <- TcM.newTcRef is
; wl_var <- TcM.newTcRef wl
-- The "low end" of the untouchable range should come from the
-- ambient tcl_untch; the high end is the highest allocated to
-- date. 'untouch' used (in 7.6.1, entirely wrongly) to be
-- set to NoUntouchables, causing #7453.
-- All this is done much better in 7.8.
; tc_lenv <- TcM.getLclEnv
; tcm_high <- TcM.readTcRef (tcl_meta tc_lenv)
; let untouch = TouchableRange tcm_low tcm_high
tcm_low = tcl_untch tc_lenv
; let env = TcSEnv { tcs_ev_binds = ev_binds_var
, tcs_ty_binds = ty_binds_var
, tcs_untch = (untouch, emptyVarSet) -- No Tcs untouchables yet
......@@ -960,7 +969,6 @@ runTcSWithEvBinds ev_binds_var tcs
; return res }
where
do_unification (tv,ty) = TcM.writeMetaTyVar tv ty
untouch = NoUntouchables
is = emptyInert
wl = emptyWorkList
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment