mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
fix PGF.Generate.restart. The restart should be done only if there are some solutions found
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user