From 4a23754fc6515c947e0bbac38cd0e558b701fe2f Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 23 Feb 2024 19:30:52 -0500 Subject: Add poke API --- fig-utils/src/Fig/Prelude.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fig-utils/src/Fig/Prelude.hs') diff --git a/fig-utils/src/Fig/Prelude.hs b/fig-utils/src/Fig/Prelude.hs index 80e5829..060f197 100644 --- a/fig-utils/src/Fig/Prelude.hs +++ b/fig-utils/src/Fig/Prelude.hs @@ -46,6 +46,7 @@ module Fig.Prelude , headMay, atMay , throwLeft , log + , (>>>) , Pretty(..) , Fix(..), unFix @@ -113,6 +114,9 @@ throwLeft :: (Exception e, MonadThrow m) => (b -> e) -> Either b a -> m a throwLeft f (Left x) = throwM $ f x throwLeft _ (Right x) = pure x +(>>>) :: (a -> b) -> (b -> c) -> a -> c +(>>>) = flip (.) + log :: MonadIO m => Text -> m () log msg = do t <- liftIO Time.getCurrentTime -- cgit v1.2.3