From 4338a1fae426925bd2d2a288230a3bfc943df0c6 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Fri, 11 Sep 2026 12:16:27 +0200 Subject: clean up imports --- Main.hs | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 13 deletions(-) (limited to 'Main.hs') diff --git a/Main.hs b/Main.hs index 4f0d399..b9afcc4 100644 --- a/Main.hs +++ b/Main.hs @@ -6,21 +6,58 @@ module Main where import Data.Version (showVersion) import Paths_git_auto_acp (version) +import Control.Applicative ((<|>), some) import Control.Concurrent -import Control.Monad -import Data.Foldable -import Data.Maybe -import qualified Data.Set as S + ( forkIO + , newChan + , newEmptyMVar + , putMVar + , readChan + , takeMVar + , threadDelay + , writeChan + ) +import Control.Monad (unless, void) +import Data.Foldable (asum, for_) +import Data.Maybe (fromMaybe) +import qualified Data.Set as S (Set, empty, insert, null) import Options.Applicative + ( Parser + , auto + , customExecParser + , flag' + , footer + , fullDesc + , header + , help + , helper + , info + , long + , metavar + , option + , prefs + , short + , showDefault + , showHelpOnEmpty + , simpleVersioner + , strOption + , value + ) import System.Clock -import System.Environment -import System.Exit -import System.FSNotify -import System.FSNotify.Devel -import System.FilePath -import System.IO -import System.Posix.Signals -import System.Process + ( Clock(Monotonic) + , TimeSpec + , diffTimeSpec + , getTime + , toNanoSecs + ) +import System.Environment (lookupEnv) +import System.Exit (ExitCode(ExitSuccess)) +import System.FSNotify (watchTree, withManager) +import System.FSNotify.Devel (allEvents) +import System.FilePath (splitDirectories) +import System.IO (hPutStrLn, stderr) +import System.Posix.Signals (Handler(Catch), installHandler, sigINT) +import System.Process (rawSystem) data Watch = Watch { watchPath :: FilePath @@ -125,7 +162,7 @@ main = do o <- customExecParser (prefs $ showHelpOnEmpty) $ info - (opts <**> helper <**> simpleVersioner (showVersion version)) + (simpleVersioner (showVersion version) <*> helper <*> opts) (fullDesc <> header "git-auto-acp -- automatically add-commit-push files" <> (footer -- cgit v1.2.3