diff --git a/hcat.cabal b/hcat.cabal index f84a895..0923336 100644 --- a/hcat.cabal +++ b/hcat.cabal @@ -27,10 +27,9 @@ library BlockArguments OverloadedStrings ImportQualifiedPost - ghc-options: -Wall -fdefer-typed-holes + ghc-options: -Wall -Wunused-packages -fdefer-typed-holes build-depends: base >=4.13 && <5 - , process , text default-language: GHC2021 @@ -44,7 +43,7 @@ executable hcat BlockArguments OverloadedStrings ImportQualifiedPost - ghc-options: -Wall -fdefer-typed-holes + ghc-options: -Wall -Wunused-packages -fdefer-typed-holes build-depends: base >=4.13 && <5 , hcat @@ -62,7 +61,7 @@ test-suite spec BlockArguments OverloadedStrings ImportQualifiedPost - ghc-options: -Wall -fdefer-typed-holes + ghc-options: -Wall -Wunused-packages -fdefer-typed-holes cpp-options: -DTEST build-tool-depends: hspec-discover:hspec-discover diff --git a/package.yaml b/package.yaml index b2d6beb..40a373f 100644 --- a/package.yaml +++ b/package.yaml @@ -13,10 +13,12 @@ dependencies: - base >= 4.13 && < 5 # - bytestring # - time +# - process # - directory ghc-options: - -Wall + - -Wunused-packages - -fdefer-typed-holes default-extensions: @@ -28,7 +30,6 @@ library: source-dirs: src dependencies: - text - - process verbatim: default-language: GHC2021 diff --git a/src/HCat/Internal.hs b/src/HCat/Internal.hs index 467a446..d28a0ff 100644 --- a/src/HCat/Internal.hs +++ b/src/HCat/Internal.hs @@ -4,8 +4,6 @@ module HCat.Internal where import Data.Text (Text) import Data.Text qualified as T -import System.Process qualified as P - -- | @parseArgs@ takes a list of strings and returns a single FilePath if there was exactly one element. -- -- >>> parseArgs ["foo"] @@ -69,8 +67,3 @@ paginate (ScreenDimensions rows cols) = type Pages = [Page] type Page = Text - -getScreenDimensions :: IO ScreenDimensions -getScreenDimensions = ScreenDimensions <$> tput "lines" <*> tput "cols" - where - tput cmd = read <$> P.readProcess "tput" [cmd] ""