You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit removes references to the solver log that prevented it from being
garbage collected. It also forces evaluation of the current level and variable
stack in 'Message.showMessages'.
go v l (TryP qpn i :Enter:Failure c fr :Leave: ms) = goPReject v l qpn [i] c fr ms
54
-
go v l (TryF qfn b :Enter:Failure c fr :Leave: ms) = (atLevel (add (F qfn) v) l $"rejecting: "++ showQFNBool qfn b ++ showFR c fr) (go v l ms)
55
-
go v l (TryS qsn b :Enter:Failure c fr :Leave: ms) = (atLevel (add (S qsn) v) l $"rejecting: "++ showQSNBool qsn b ++ showFR c fr) (go v l ms)
56
-
go v l (Next (Goal (P qpn) gr) :TryP qpn' i : ms@(Enter:Next _ : _)) = (atLevel (add (P qpn) v) l $"trying: "++ showQPNPOpt qpn' i ++ showGRs gr) (go (add (P qpn) v) l ms)
57
-
go v l (Next (Goal (P qpn) gr) :Failure c fr : ms) =
55
+
go v l (Step (TryP qpn i) (StepEnter (Step (Failure c fr) (StepLeave ms)))) =
56
+
goPReject v l qpn [i] c fr ms
57
+
go v l (Step (TryF qfn b) (StepEnter (Step (Failure c fr) (StepLeave ms)))) =
58
+
(atLevel (add (F qfn) v) l $"rejecting: "++ showQFNBool qfn b ++ showFR c fr) (go v l ms)
59
+
go v l (Step (TryS qsn b) (StepEnter (Step (Failure c fr) (StepLeave ms)))) =
60
+
(atLevel (add (S qsn) v) l $"rejecting: "++ showQSNBool qsn b ++ showFR c fr) (go v l ms)
61
+
go v l (Step (Next (Goal (P qpn) gr)) (Step (TryP qpn' i) ms@(StepEnter (Step (Next _) _)))) =
62
+
(atLevel (add (P qpn) v) l $"trying: "++ showQPNPOpt qpn' i ++ showGRs gr) (go (add (P qpn) v) l ms)
63
+
go v l (Step (Next (Goal (P qpn) gr)) (Step (Failure c fr) ms)) =
58
64
let v' = add (P qpn) v
59
65
in (atLevel v' l $ showPackageGoal qpn gr) $ (atLevel v' l $ showFailure c fr) (go v l ms)
60
-
go v l (Failure c Backjump: ms@(Leave:Failure c' Backjump: _)) | c == c' = go v l ms
66
+
go v l (Step (Failure c Backjump) ms@(StepLeave (Step (Failure c' Backjump) _)))
67
+
| c == c' = go v l ms
61
68
-- standard display
62
-
go v l (Enter:ms) = go v (l+1) ms
63
-
go v l (Leave:ms) = go (drop1 v) (l-1) ms
64
-
go v l (TryP qpn i : ms) = (atLevel (add (P qpn) v) l $"trying: "++ showQPNPOpt qpn i) (go (add (P qpn) v) l ms)
65
-
go v l (TryF qfn b : ms) = (atLevel (add (F qfn) v) l $"trying: "++ showQFNBool qfn b) (go (add (F qfn) v) l ms)
66
-
go v l (TryS qsn b : ms) = (atLevel (add (S qsn) v) l $"trying: "++ showQSNBool qsn b) (go (add (S qsn) v) l ms)
67
-
go v l (Next (Goal (P qpn) gr): ms) = (atLevel (add (P qpn) v) l $ showPackageGoal qpn gr) (go v l ms)
68
-
go v l (Next _ : ms) = go v l ms -- ignore flag goals in the log
69
-
go v l (Success: ms) = (atLevel v l $"done") (go v l ms)
70
-
go v l (Failure c fr : ms) = (atLevel v l $ showFailure c fr) (go v l ms)
69
+
go v l (StepEnterms) = l `seq` go v (l+1) ms
70
+
go v l (StepLeavems) = v `seq` l `seq` go (drop1 v) (l-1) ms
71
+
go v l (Step (TryP qpn i) ms) = (atLevel (add (P qpn) v) l $"trying: "++ showQPNPOpt qpn i) (go (add (P qpn) v) l ms)
72
+
go v l (Step (TryF qfn b) ms) = (atLevel (add (F qfn) v) l $"trying: "++ showQFNBool qfn b) (go (add (F qfn) v) l ms)
73
+
go v l (Step (TryS qsn b) ms) = (atLevel (add (S qsn) v) l $"trying: "++ showQSNBool qsn b) (go (add (S qsn) v) l ms)
74
+
go v l (Step (Next (Goal (P qpn) gr)) ms) = (atLevel (add (P qpn) v) l $ showPackageGoal qpn gr) (go v l ms)
75
+
go v l (Step (Next _) ms) = go v l ms -- ignore flag goals in the log
76
+
go v l (Step (Success) ms) = (atLevel v l $"done") (go v l ms)
77
+
go v l (Step (Failure c fr) ms) = (atLevel v l $ showFailure c fr) (go v l ms)
71
78
72
79
showPackageGoal::QPN->QGoalReasonChain->String
73
80
showPackageGoal qpn gr ="next goal: "++ showQPN qpn ++ showGRs gr
@@ -79,16 +86,25 @@ showMessages p sl = go [] 0
79
86
add v vs = simplifyVar v : vs
80
87
81
88
-- special handler for many subsequent package rejections
goPReject v l qpn is c fr (TryP qpn' i :Enter:Failure _ fr' :Leave: ms) | qpn == qpn' && fr == fr' = goPReject v l qpn (i : is) c fr ms
84
-
goPReject v l qpn is c fr ms = (atLevel (P qpn : v) l $"rejecting: "++L.intercalate ", " (map (showQPNPOpt qpn) (reverse is)) ++ showFR c fr) (go v l ms)
89
+
goPReject:: [VarQPN]
90
+
->Int
91
+
->QPN
92
+
-> [POption]
93
+
->ConflictSetQPN
94
+
->FailReason
95
+
->ProgressMessageab
96
+
->ProgressStringab
97
+
goPReject v l qpn is c fr (Step (TryP qpn' i) (StepEnter (Step (Failure _ fr') (StepLeave ms))))
98
+
| qpn == qpn' && fr == fr' = goPReject v l qpn (i : is) c fr ms
99
+
goPReject v l qpn is c fr ms =
100
+
(atLevel (P qpn : v) l $"rejecting: "++L.intercalate ", " (map (showQPNPOpt qpn) (reverse is)) ++ showFR c fr) (go v l ms)
85
101
86
102
-- write a message, but only if it's relevant; we can also enable or disable the display of the current level
0 commit comments