Skip to content

Commit

Permalink
Stop discharging redundant constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
konn committed Mar 1, 2021
1 parent 5c05cb6 commit 09789b2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions ghc-typelits-presburger/src/GHC/TypeLits/Presburger/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,9 @@ decidePresburger _ genTrans _ gs [] [] = do
let givens = catMaybes ngs
prems0 = map snd givens
prems = foldr assert' noProps prems0
(solved, _) = foldr go ([], noProps) givens
if isNothing (checkSat prems)
then return $ TcPluginContradiction gs
else do
tcPluginTrace "Redundant solveds" $ ppr solved
return $ TcPluginOk (map withEv solved) []
where
go (ct, p) (ss, prem)
| Proved <- testIf prem p = (ct : ss, prem)
| otherwise = (ss, assert' p prem)
else return $ TcPluginOk [] []
decidePresburger mode genTrans _ gs _ds ws = do
trans <- genTrans
give trans $ do
Expand Down

0 comments on commit 09789b2

Please sign in to comment.