IxpertaSolutions / freer-effects

An implementation of "Freer Monads, More Extensible Effects".
BSD 3-Clause "New" or "Revised" License
65 stars 12 forks source link

Fixes endless loop when using `forever`. #26

Closed schell closed 7 years ago

schell commented 7 years ago

It's worth noting I've run into <> with a number of setups, not just forever, but at the time I had suspected it was my own code, and not freer. Today I narrowed it down to freer (and freer-effects) Applicative instance. This fixes that issue and it doesn't look like the benchmarks were affected. Attached is a txt file with before and after benchmarks pasted side by side.

bench-compare.txt

trskop commented 7 years ago

Thanks!

liskin commented 7 years ago

Anyway, don't worry, I fixed these issues in https://github.com/IxpertaSolutions/freer-effects/commit/e5f8304db9c2c47ba96fbe7725559c5ecae80d11, just learn from them and next time please don't mix whitespace and functional changes and avoid dead code in tests. Thanks. :-)