Since withAuth still has to have a MonadIO constraint, I'm curious what this is buying you. I see it's coming from a workplace fork, which means it's proven necessary for something, so I'm happy to merge it with a couple of tweaks.
In our application we always make an AuthEnv available by other means, never using the Ref constructor of Auth. So this patch just buys us more flexibility/predictability: it's better to not have IO in the type since we never do any. The old definitions which may use IO can all be defined in terms of these pure alternatives, so it seems like a better factoring.
In our application we always make an
AuthEnv
available by other means, never using theRef
constructor ofAuth
. So this patch just buys us more flexibility/predictability: it's better to not haveIO
in the type since we never do any. The old definitions which may useIO
can all be defined in terms of these pure alternatives, so it seems like a better factoring.I'll make the suggested changes.