haskell-hvr / cassava

A CSV parsing and encoding library optimized for ease of use and high performance
http://hackage.haskell.org/package/cassava
BSD 3-Clause "New" or "Revised" License
222 stars 105 forks source link

Fix FromField Const instance; fixes #185 #203

Closed carymrobbins closed 2 years ago

carymrobbins commented 2 years ago

The old instance was causing a non-terminating loop.

andreasabel commented 2 years ago

Hej @carymrobbins, thanks for the PR!

carymrobbins commented 2 years ago

Done! Added a test case that fails to terminate for the previous instance but succeeds with the new instance. I tried getting something working with System.Timeout.timeout but it doesn't seem to play nice with QuickCheck.

andreasabel commented 2 years ago

Excellent, thanks for the test @carymrobbins !

CI indicates that for GHC 7 you need another import for the test. Would you be able to fix that?

carymrobbins commented 2 years ago

Just pushed a new commit which I think should fix it.

andreasabel commented 2 years ago

Thanks, @carymrobbins ! GitHub requires me to baby-sit its actions, I have to start them manually all the time. But you can get quick feedback on your fork, e.g.: https://github.com/carymrobbins/cassava/actions/runs/1439662694

andreasabel commented 2 years ago

Great job, @carymrobbins !