informatikr / hedis

A Redis client library for Haskell.
http://hackage.haskell.org/package/hedis
BSD 3-Clause "New" or "Revised" License
327 stars 121 forks source link

Add Eq instance to PortID #146

Closed TravisCardwell closed 4 years ago

TravisCardwell commented 4 years ago

Originally, Hedis re-exported the PortID type from Network, and it derived Eq as well as Show. The Network module was deprecated in network 2.7.0.0 and then removed in network 3.0.0.0. Hedis was updated to just use PortNumber (from Network.Socket), removing support for Unix sockets. A PortID type was then added to Hedis in order to restore support for Unix sockets in commit 9c218f1b504206d644f9ee65b9d603a7e9418076. The new type does not derive Eq, but I think that the Eq instance was just forgotten. I use the hostname and port to identify connections during failover, so it would be convenient to have an Eq instance.

TravisCardwell commented 4 years ago

A test case for the GHC 7.10.3 CI build failed, but there is no indication of the reason of failure (or even test name). I suspect that testPipelining is what failed. The test relies on execution time, which may not be consistent in the CI environment.

k-bx commented 4 years ago

Thanks! Yeah, that's a flaky test. Released under 0.12.10