Open ocharles opened 10 years ago
Hi Ollie, I used MonadBase
in regions
because I used it in monad-control
. I used MonadBase
in monad-control
because I wanted to generalize MonadBaseControl
so that users can use it with the ST
or STM
base monads.
I don't think many (any) users are actually doing that though so it might not be that useful. However, switching monad-control
to MonadIO
at this point will break lots of code.
Although it might be possible to specialize regions
to MonadIO
. The specialization doesn't matter there because regions
operates with an IO
base monad anyway.
Although it might be possible to specialize
regions
toMonadIO
. The specialization doesn't matter there becauseregions
operates with anIO
base monad anyway.
Right, that was my main thought - we already have a well established class in a more prominant package that expresses exactly what you want. This change would only need to be done in regions
, which (I assume) has a lot less users.
Yes I think this makes sense. I don't have much time to work on this I'm afraid.
Care to give it a shot?
Bas van Dijk notifications@github.com writes:
Yes I think this makes sense. I don't have much time to work on this I'm afraid.
Care to give it a shot?
Will do!
Did anything end up happening about this?
I've fixed this in the RegionIOControl branch.
To me,
MonadBase IO
doesn't seem to add anything thatMonadIO
doesn't already do. However, the use ofMonadBase IO
means that my library now incurs a dependency ontransformers-base
, and potential my downstream users too. I may have misunderstood something, but if possible I thinkis preferable. If that doesn't work due to the type signature, then I'd just go with
(as it was before).