git.iko.soy/typeable/control-has
on master help sign in
Add hotels cron service and payments settlement. (#4993)

* Add execEnvT to control-has. * Hotels cron. * Stack.yaml. * Fix broken things. * More hotels-cron things. * Fix SQL. * Hotels cron shell script. * Ceterum autem censeo Haslexinem esse delendam. * Rework SQL to get payment ids for settlement. * Log error on settlement. Add missing enum values to SQL types. * Mark old credit card payments as automatically charged. * Actually subtract instead of adding. * Fix sqitch.plan * Replace hardcoded values with macros in SQL. * Use Hours instead of Word.

commit17f3a530139d25028b62576fa4faeac731dbb9da authorNick <nick@typeable.io> dateMon 14 Sep 2020, 12:13 (6 years ago) parente0f70a4
1 file changed+8
src/Control/EnvT.hs+8
src/Control/EnvT.hs+8
@@ -4,6 +4,7 @@
44module Control.EnvT
55 ( EnvT(..)
66 , runEnvT
7+ , execEnvT
78 , module X
89 ) where
910
@@ -52,8 +53,15 @@ deriving newtype instance
5253 (MonadBaseControl b m, Monad m)
5354 => MonadBaseControl b (EnvT r m)
5455
56+-- | Run 'EnvT' transformer.
5557runEnvT :: forall r m a. EnvT r m a -> r -> m a
5658runEnvT m r = flip runReaderT r . unEnvT $ m
59+{-# INLINE runEnvT #-}
60+
61+-- | Same as 'runEnvT' but with arguments flipped.
62+execEnvT :: forall r m a. r -> EnvT r m a -> m a
63+execEnvT = flip runEnvT
64+{-# INLINE execEnvT #-}
5765
5866#ifndef ghcjs_HOST_OS
5967-- FIXME: These lens should probably be moved into a separate package