Compare commits
No commits in common. "48f054df3763968220f7679d0b069a4a0eee46bc" and "b783faef1a3fc76682b586352043a148f8f6091f" have entirely different histories.
48f054df37
...
b783faef1a
3 changed files with 5 additions and 12 deletions
|
|
@ -27,10 +27,9 @@ library
|
||||||
BlockArguments
|
BlockArguments
|
||||||
OverloadedStrings
|
OverloadedStrings
|
||||||
ImportQualifiedPost
|
ImportQualifiedPost
|
||||||
ghc-options: -Wall -fdefer-typed-holes
|
ghc-options: -Wall -Wunused-packages -fdefer-typed-holes
|
||||||
build-depends:
|
build-depends:
|
||||||
base >=4.13 && <5
|
base >=4.13 && <5
|
||||||
, process
|
|
||||||
, text
|
, text
|
||||||
default-language: GHC2021
|
default-language: GHC2021
|
||||||
|
|
||||||
|
|
@ -44,7 +43,7 @@ executable hcat
|
||||||
BlockArguments
|
BlockArguments
|
||||||
OverloadedStrings
|
OverloadedStrings
|
||||||
ImportQualifiedPost
|
ImportQualifiedPost
|
||||||
ghc-options: -Wall -fdefer-typed-holes
|
ghc-options: -Wall -Wunused-packages -fdefer-typed-holes
|
||||||
build-depends:
|
build-depends:
|
||||||
base >=4.13 && <5
|
base >=4.13 && <5
|
||||||
, hcat
|
, hcat
|
||||||
|
|
@ -62,7 +61,7 @@ test-suite spec
|
||||||
BlockArguments
|
BlockArguments
|
||||||
OverloadedStrings
|
OverloadedStrings
|
||||||
ImportQualifiedPost
|
ImportQualifiedPost
|
||||||
ghc-options: -Wall -fdefer-typed-holes
|
ghc-options: -Wall -Wunused-packages -fdefer-typed-holes
|
||||||
cpp-options: -DTEST
|
cpp-options: -DTEST
|
||||||
build-tool-depends:
|
build-tool-depends:
|
||||||
hspec-discover:hspec-discover
|
hspec-discover:hspec-discover
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,12 @@ dependencies:
|
||||||
- base >= 4.13 && < 5
|
- base >= 4.13 && < 5
|
||||||
# - bytestring
|
# - bytestring
|
||||||
# - time
|
# - time
|
||||||
|
# - process
|
||||||
# - directory
|
# - directory
|
||||||
|
|
||||||
ghc-options:
|
ghc-options:
|
||||||
- -Wall
|
- -Wall
|
||||||
|
- -Wunused-packages
|
||||||
- -fdefer-typed-holes
|
- -fdefer-typed-holes
|
||||||
|
|
||||||
default-extensions:
|
default-extensions:
|
||||||
|
|
@ -28,7 +30,6 @@ library:
|
||||||
source-dirs: src
|
source-dirs: src
|
||||||
dependencies:
|
dependencies:
|
||||||
- text
|
- text
|
||||||
- process
|
|
||||||
verbatim:
|
verbatim:
|
||||||
default-language: GHC2021
|
default-language: GHC2021
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ module HCat.Internal where
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Data.Text qualified as T
|
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@ takes a list of strings and returns a single FilePath if there was exactly one element.
|
||||||
--
|
--
|
||||||
-- >>> parseArgs ["foo"]
|
-- >>> parseArgs ["foo"]
|
||||||
|
|
@ -69,8 +67,3 @@ paginate (ScreenDimensions rows cols) =
|
||||||
|
|
||||||
type Pages = [Page]
|
type Pages = [Page]
|
||||||
type Page = Text
|
type Page = Text
|
||||||
|
|
||||||
getScreenDimensions :: IO ScreenDimensions
|
|
||||||
getScreenDimensions = ScreenDimensions <$> tput "lines" <*> tput "cols"
|
|
||||||
where
|
|
||||||
tput cmd = read <$> P.readProcess "tput" [cmd] ""
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue