- with
-fcore
, this depends only onunliftio-core
which is a pretty minimal dependency footprint - it’s made exactly for this usecase: library authors that want to allow safe usages of resources. There’s no “extra” API overhead.
I see, so it’s more lightweight in terms of dependencies. Of the bluefin-internal
dependencies
async
is essential for connectingStream
s toConsumer
s. I guess I could chop out the bits I need fromasync
and inline them inbluefin-internal
base
isbase
monad-control
is needed so I can provide aMonadControl
instancetransformers
is used forReaderT
transformers-base
is needed so I can provide aMonadBase
instanceunliftio-core
is needed so I can provide aMonadUnliftIO
instance
I’m not sure how useful MonadControl
or MonadBase
are; I’ve never used them. I only provide them because I was copying what effectful
provides. Since you don’t have them for scoped-codensity
then perhaps Bluefin doesn’t need them either.
I’m dubious whether depending on transformers
to Reader
is worthwhile: it’s a boot library, so always available, but it’s easy to reimplement and in the end I probably don’t need it anyway.
Bluefin is also made exactly for this use case (it just turns out the notion of “resource” is wider than one might originally think). What is the “extra” API overhead you’re thinking of?
Well… it’s an effect system. Sure it abstractly fits the notion just like you explained…
I guess part of my point is just that my library is meant to be used for this purpose and this purpose only.
Also to be very clear, this is not a criticism against bluefin
So by “extra” API do you mean the resources it provides by default, like State
and Exception
?
That’s one way of looking at it!
That’s fine, I’m just wondering why being single-purpose is a benefit.
That’s OK, I didn’t take it as one. I’m just trying to understand what are the desirable goals you’re promoting. If there’s something that Bluefin’s missing that would help people then I’d like to add it. (On the other hand, if the problem is the opposite – that it’s too big – then there’s not much I can do about that.)