packages feed

preamble 0.0.29 → 0.0.30

raw patch · 2 files changed

+6/−4 lines, 2 files

Files

preamble.cabal view
@@ -1,5 +1,5 @@ name:                  preamble-version:               0.0.29+version:               0.0.30 synopsis:              Yet another prelude. description:           A prelude built on basic-prelude. homepage:              https://github.com/swift-nav/preamble
src/Preamble/Ctx.hs view
@@ -15,6 +15,7 @@ import Preamble.Prelude import Preamble.Trace import Preamble.Types+import System.Environment  -- | Run monad transformer, picking up logger from context. --@@ -38,11 +39,12 @@  -- | Run stats context. ---runStatsCtx :: MonadCtx c m => String -> TransT StatsCtx m a -> m a-runStatsCtx host action = do+runStatsCtx :: MonadCtx c m => TransT StatsCtx m a -> m a+runStatsCtx action = do   c <- view ctx   s <- liftIO $ socket AF_INET Datagram defaultProtocol-  a <- liftIO $ inet_addr host+  h <- liftIO $ fromMaybe "127.0.0.1" <$> lookupEnv "STATS_HOST"+  a <- liftIO $ inet_addr h   let sa = SockAddrInet 8125 a   runTransT (StatsCtx c s sa) action