diff options
-rw-r--r-- | src/Xmobar/Plugins/Monitors/Common/Types.hs | 11 | ||||
-rw-r--r-- | xmobar.cabal | 11 |
2 files changed, 5 insertions, 17 deletions
diff --git a/src/Xmobar/Plugins/Monitors/Common/Types.hs b/src/Xmobar/Plugins/Monitors/Common/Types.hs index ea61a58..8662ba3 100644 --- a/src/Xmobar/Plugins/Monitors/Common/Types.hs +++ b/src/Xmobar/Plugins/Monitors/Common/Types.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE CPP #-} - ------------------------------------------------------------------------------ -- | -- Module: Xmobar.Plugins.Monitors.Types @@ -29,10 +27,7 @@ module Xmobar.Plugins.Monitors.Common.Types ( Monitor import Data.IORef (IORef, modifyIORef, newIORef, readIORef) import Control.Monad.Reader (ReaderT, ask, liftIO) -#if defined(WEATHER) || defined(UVMETER) import Network.HTTP.Conduit (Manager, newManager, tlsManagerSettings) -#endif - type Monitor a = ReaderT MConfig IO a @@ -61,9 +56,7 @@ data MConfig = , naString :: IORef String , maxTotalWidth :: IORef Int , maxTotalWidthEllipsis :: IORef String -#if defined(WEATHER) || defined(UVMETER) , manager :: IORef Manager -#endif } -- | from 'http:\/\/www.haskell.org\/hawiki\/MonadState' @@ -111,12 +104,8 @@ mkMConfig tmpl exprts = na <- newIORef "N/A" mt <- newIORef 0 mtel <- newIORef "" -#if defined(WEATHER) || defined(UVMETER) man <- newIORef =<< newManager tlsManagerSettings return $ MC nc l lc h hc t e p d mn mx mel pc pr bb bf bw up na mt mtel man -#else - return $ MC nc l lc h hc t e p d mn mx mel pc pr bb bf bw up na mt mtel -#endif data Opts = HighColor String | NormalColor String diff --git a/xmobar.cabal b/xmobar.cabal index 02d096a..176a18d 100644 --- a/xmobar.cabal +++ b/xmobar.cabal @@ -176,7 +176,8 @@ library parsec-numbers >= 0.1.0, stm >= 2.3 && < 2.6, extensible-exceptions == 0.1.*, - async + async, + http-conduit if impl(ghc < 8.0.2) -- Disable building with GHC before 8.0.2. @@ -250,11 +251,11 @@ library if flag(with_weather) || flag(all_extensions) exposed-modules: Xmobar.Plugins.Monitors.Weather cpp-options: -DWEATHER - build-depends: http-conduit, http-types + build-depends: http-types if flag(with_uvmeter) exposed-modules: Xmobar.Plugins.Monitors.UVMeter - build-depends: http-conduit, http-types + build-depends: http-types cpp-options: -DUVMETER if os(freebsd) @@ -310,6 +311,7 @@ test-suite XmobarTest async, temporary, hspec == 2.*, + http-conduit, xmobar other-modules: Xmobar.Plugins.Monitors.CommonSpec @@ -331,6 +333,3 @@ test-suite XmobarTest Xmobar.Plugins.Monitors.AlsaSpec cpp-options: -DALSA - - if flag(with_weather) || flag(all_extensions) || flag(with_uvmeter) - build-depends: http-conduit |