fix PGF.Generate.restart. The restart should be done only if there are some solutions found

This commit is contained in:
krasimir
2010-10-13 12:38:51 +00:00
parent cecf94d729
commit 09ce38742c

View File

@@ -148,5 +148,5 @@ restart :: RandomGen g => g -> (g -> [a]) -> [a]
restart g f =
let (g1,g2) = split g
in case f g1 of
[] -> restart g2 f
[] -> []
(x:xs) -> x : restart g2 f