File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ module Constrained.Conformance (
1414 conformsToSpec ,
1515 conformsToSpecE ,
1616 satisfies ,
17+ checkPredE ,
1718 checkPredsE ,
1819) where
1920
Original file line number Diff line number Diff line change @@ -167,9 +167,9 @@ shrinkFromPreds :: HasSpec a => Pred -> Var a -> a -> [a]
167167shrinkFromPreds p
168168 | Result plan <- prepareLinearization p = \ x a -> listFromGE $ do
169169 -- NOTE: we do this to e.g. guard against bad construction functions in Exists
170- xaGood <- checkPred (Env. singleton x a) p
171- unless xaGood $
172- fatalError " Trying to shrink a bad value, don't do that!"
170+ case checkPredE (Env. singleton x a) ( NE. fromList [] ) p of
171+ Nothing -> pure ()
172+ Just err -> explainNE err $ fatalError " Trying to shrink a bad value, don't do that!"
173173 -- Get an `env` for the original value
174174 initialEnv <- envFromPred (Env. singleton x a) p
175175 return
You can’t perform that action at this time.
0 commit comments