jprupp / rocksdb-haskell

RocksDB Haskell Bindings
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

[breaking] Proposal to move library to IO monad #6

Open epoberezkin opened 3 days ago

epoberezkin commented 3 days ago

UnliftIO increases costs and there is no need to have it in this library - it is better to keep library code in IO monad and have applications that use UnliftIO wrap it.

It would be a breaking change, but it would make it usable for a wider range of applications that don't necessarily use UnliftIO.

As a side note, we do use UnliftIO at the moment, but we believe it was a mistake to use it, and it is much better to use a fixed monadic stack than have MTL code that sometimes have problems with specialisation and can have leaks, and can by mistake create much taller monad stacks than you think you are using. It's a personal choice how to write applications, but it's better to keep libraries simple.

epoberezkin commented 3 days ago

Or, at least move it to MonadIO