brendanhay / amazonka

A comprehensive Amazon Web Services SDK for Haskell.
https://amazonka.brendanhay.nz
Other
599 stars 227 forks source link

do not force MonadIO on presign #885

Closed avieth closed 1 year ago

avieth commented 1 year ago

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.

I'll make the suggested changes.

endgame commented 1 year ago

I agree that it's a better factoring, and I hope we can merge it before I tag RC2.

avieth commented 1 year ago

Should be good to go now. LMK if I missed anything.