Skip to content

Commit b921f14

Browse files
transitives in backpropagation
1 parent bf50f6d commit b921f14

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Constrained/Generation.hs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -939,12 +939,14 @@ backPropagation relevant (SolverPlan initplan) = SolverPlan (go [] (reverse init
939939
termVarEqCases :: HasSpec b => Specification a -> Var b -> Term b -> [SolverStage]
940940
termVarEqCases (MemberSpec vs) x' t
941941
| Set.singleton (Name x) == freeVarSet t =
942-
[SolverStage x' [] (MemberSpec (NE.nub (fmap (\v -> errorGE $ runTerm (Env.singleton x v) t) vs))) relevant]
942+
[SolverStage x' [] (MemberSpec (NE.nub (fmap (\v -> errorGE $ runTerm (Env.singleton x v) t) vs)))
943+
(Set.insert (Name x') relevant)]
943944
termVarEqCases specx x' t
944945
| Just Refl <- eqVar x x'
945946
, [Name y] <- Set.toList $ freeVarSet t
946947
, Result ctx <- toCtx y t =
947-
[SolverStage y [] (propagateSpec specx ctx) relevant]
948+
[SolverStage y [] (propagateSpec specx ctx)
949+
(Set.insert (Name x') relevant)]
948950
termVarEqCases _ _ _ = []
949951

950952
-- | Function symbols for `(==.)`
@@ -1342,10 +1344,7 @@ newtype SolverPlan = SolverPlan { solverPlan :: [SolverStage] }
13421344

13431345
instance Pretty SolverPlan where
13441346
pretty SolverPlan {..} =
1345-
"\nSolverPlan"
1346-
/> vsep'
1347-
[ "\nLinearization:" /> prettyLinear solverPlan
1348-
]
1347+
"SolverPlan" /> prettyLinear solverPlan
13491348

13501349
isTrueSpec :: Specification a -> Bool
13511350
isTrueSpec TrueSpec = True

0 commit comments

Comments
 (0)