on master help sign in
No fallback if the decision tree tests are complete
831e1adEvan Czaplicki
src/Optimize/DecisionTree.hs+8−10
@@ -252,18 +252,16 @@ gatherEdges variantDict branches path =
252 relevantTests =
252 relevantTests =
253 testsAtPath path branches
253 testsAtPath path branches
254
254
255− allRawEdges =
255+ allEdges =
256 map (edgesFor path branches) relevantTests
256 map (edgesFor path branches) relevantTests
257+
258+ fallbacks =
259+ if isComplete variantDict relevantTests then
260+ []
261+ else
262+ filter (isIrrelevantTo path) branches
257 in
263 in
258− if isComplete variantDict relevantTests then
264+ ( allEdges, fallbacks )
259− ( init allRawEdges
260− , snd (last allRawEdges)
261− )
262−
263− else
264− ( allRawEdges
265− , filter (isIrrelevantTo path) branches
266− )
267
265
268
266
269-- FIND RELEVANT TESTS
267-- FIND RELEVANT TESTS