From 55de6492b4f358257569c92ebb2a74db38026ed0 Mon Sep 17 00:00:00 2001 From: sigrdrifa Date: Thu, 4 Jan 2024 10:35:53 +0000 Subject: [PATCH] add verbose flag --- Makefile | 4 ++-- app/Main.hs | 2 +- audiocate.cabal | 60 ++++++++++++++++++++++++------------------------ lib/Audiocate.hs | 2 +- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index d7246e8..90b37e7 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -PHONY: test -test: +PHONY: run-tests +run-tests: @cabal test build-all: diff --git a/app/Main.hs b/app/Main.hs index edfc336..76464c8 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -43,7 +43,7 @@ main = do show (optCommand opts) ++ " (verbose: " ++ show (optVerboseFlag opts) ++ ")\n" ++ " (realtime: " ++ show (optRealTimeFlag opts) ++ ")\n" - rc <- run (optCommand opts) (optRealTimeFlag opts) + rc <- run (optCommand opts) (optRealTimeFlag opts) (optVerboseFlag opts) print rc where optsParser :: ParserInfo Opts diff --git a/audiocate.cabal b/audiocate.cabal index e52f0e9..9239734 100644 --- a/audiocate.cabal +++ b/audiocate.cabal @@ -73,36 +73,36 @@ executable audiocate hs-source-dirs: app default-language: GHC2021 --- executable audiocate-gui --- hs-source-dirs: gui --- c-sources: csrc/resources.c --- main-is: Main.hs --- ghc-options: -Wall -fno-warn-unused-do-bind -threaded -with-rtsopts=-N --- build-depends: --- base >=4.7 && <5 --- , audiocate --- , time --- , gi-glib --- , gi-gtk --- , gi-adwaita --- , gi-gobject --- , gi-gio --- , haskell-gi-base --- , directory --- , text --- , mtl --- , stm --- other-modules: --- MainWindow --- , View.EncodeView --- , View.DecodeView --- , View.LoadView --- , AppState --- default-language: GHC2021 --- default-extensions: --- OverloadedLabels --- , OverloadedStrings --- , OverloadedRecordDot +executable audiocate-gui + hs-source-dirs: gui + c-sources: csrc/resources.c + main-is: Main.hs + ghc-options: -Wall -fno-warn-unused-do-bind -threaded -with-rtsopts=-N + build-depends: + base >=4.7 && <5 + , audiocate + , time + , gi-glib + , gi-gtk + , gi-adwaita + , gi-gobject + , gi-gio + , haskell-gi-base + , directory + , text + , mtl + , stm + other-modules: + MainWindow + , View.EncodeView + , View.DecodeView + , View.LoadView + , AppState + default-language: GHC2021 + default-extensions: + OverloadedLabels + , OverloadedStrings + , OverloadedRecordDot test-suite audiocate-test default-language: GHC2021 diff --git a/lib/Audiocate.hs b/lib/Audiocate.hs index 53827d6..379babe 100644 --- a/lib/Audiocate.hs +++ b/lib/Audiocate.hs @@ -11,7 +11,7 @@ import Command.Cmd (Command(..), CommandReturnCode(..), interpretCmd) -- | Runs the provided Command run :: Command -> Bool -> Bool -> IO CommandReturnCode -run cmd isRealTime isVerbose = interpretCmd cmd isRealTime isVerbose +run = interpretCmd -- | Prints the version string version :: String