Clean hlint and cabal warnings
This commit is contained in:
1 parent
449f404464
commit
7bd0a652cb
16 files changed
+25
-27
No files matched your search
@@ -1,4 +1,3 @@
|
||||
{-# LANGUAGE Arrows #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module HomeAssistant.Controller.Ruuvi
|
||||
( Ruuvi(..)
|
||||
|
||||
@@ -36,10 +36,9 @@ import Data.UUID (toText)
|
||||
import AFRP (Request(..), Event(..))
|
||||
import Control.Monad.IO.Class (liftIO, MonadIO)
|
||||
import HomeAssistant.Runtime.RateLimit (RateLimited, RateLimiter, runRateLimited)
|
||||
import Control.Monad.Catch (MonadCatch)
|
||||
import GHC.Stack (HasCallStack)
|
||||
import UnliftIO (MonadUnliftIO, race, withRunInIO)
|
||||
import Control.Monad.Catch (onException)
|
||||
import Control.Monad.Catch (MonadCatch, onException)
|
||||
|
||||
-- | Connect, authenticate, subscribe, then receive and broadcast forever.
|
||||
-- Restarting this action reconnects. All setup sends happen before the
|
||||
|
||||
@@ -44,7 +44,7 @@ loadFlags rootPath allNames = do
|
||||
let path = rootPath </> "handlers.json"
|
||||
fileMap <- readFlagsFile path
|
||||
let defaults = M.fromList [(n, True) | n <- allNames]
|
||||
initial = M.unionWith (\fileVal -> const fileVal) fileMap defaults
|
||||
initial = M.unionWith const fileMap defaults
|
||||
tv <- liftIO $ newTVarIO initial
|
||||
lock <- liftIO $ newMVar ()
|
||||
pure Flags
|
||||
|
||||
@@ -190,10 +190,10 @@ cfName = \case
|
||||
|
||||
defArgs :: FilePath -> Series -> [String]
|
||||
defArgs rrdPath series =
|
||||
[ "DEF:" ++ rawF ++ "=" ++ rrdPath ++ ":"
|
||||
( "DEF:" ++ rawF ++ "=" ++ rrdPath ++ ":"
|
||||
++ srcDs source ++ ":" ++ cfName (srcCF source)
|
||||
]
|
||||
++ transformArgs
|
||||
)
|
||||
: transformArgs
|
||||
where
|
||||
source = serSource series
|
||||
alias = serAlias series
|
||||
|
||||
Reference in new issue
Block a user