purescript-deprecated/purescript-strongcheck

Successor Gens appear to spin forever.

Closed this issue · 2 comments

Where initialGenState = GenState { size: 1, seed: 454645874.0 }

(fst $ runTrampoline $ runGen 1 initialGenState (chooseInt 1.0 10.0)) :: Array Int

works fine with a result of [5]

however

(fst $ runTrampoline $ runGen 1 initialGenState $ snd $ runTrampoline $ runGen 1 initialGenState $chooseInt 1.0 10.0) :: Array Int

spins seemingly forever.

Is this improper use or are successor Gens broken?

(fst $ runTrampoline $ runGen 1 initialGenState $ snd $ runTrampoline $ runGen 1 initialGenState $ (infinite $ chooseInt 1.0 10.0)) :: Array Int

seems to work

Strange. I will add this to my TODO list. It's time for me to do the '1.0' version of this library, which will require some major revisions and cleanup.