On Tue, Jul 11, 2017 at 05:45:54AM +0300, fr33domlover wrote: > On Mon, 10 Jul 2017 18:44:44 -0700 > Bryan Richter <br...@snowdrift.coop> wrote: > > > > On Tue, Jul 11, 2017 at 03:57:31AM +0300, fr33domlover wrote: > > > From: fr33domlover <fr33domlo...@riseup.net> > > > > > > -- | A method that runs 'StripeI' instructions in IO. A default that uses > > > -- 'stripe' is provided by 'runStripe'. > > > type StripeRunner = forall io. > > > @@ -441,20 +450,19 @@ data StripeI a where > > > ChargeCustomerI :: CustomerId -> Cents -> StripeI Charge > > > BalanceTransactionI :: TransactionId -> StripeI BalanceTransaction > > > > > > --- | A default stripe runner > > > -runStripe > > > +runStripeWith > > > :: MonadIO io > > > - => StripeConfig -> StripeI a -> io (Either StripeError a) > > > -runStripe c = \case > > > + => StripeClient -> StripeConfig -> StripeI a -> io (Either > > > StripeError > > > a) +runStripeWith strp c = \case > > > > We definitely don't want this. At best, we may want a better name than > > 'runStripe'. It is intended to be a default StripeI runner that > > actually uses the real 'stripe'. > > > > StripeI is already the abstraction -- abstracting over its runner > > shouldn't be necessary. (See more comments below, at the definition of > > 'snowstripe'.) > > There is a reason I added 'runStripeWith': It allows to create a runner not > based on 'stripe'. Now, you may ask, but isn't that what 'dummyStripe' is for? > The answer is yes, but you chose to have 'appStripe' in 'App', and respecting > that decision, I had to have a variant of 'runStripe' that wouldn't hard-code > 'stripe' in it,
This means you need a new StripeI runner: neither dummyStripe nor runStripe. But, what do you need it for, precisely? The rest of the concern about runStripe/appStripe/snowstripe seems to be predicated on this question... perhaps that's why I don't understand what's going on. :P
signature.asc
Description: Digital signature
_______________________________________________ Dev mailing list Dev@lists.snowdrift.coop https://lists.snowdrift.coop/mailman/listinfo/dev