From 2b9ceaead3f3cd80e973cccecb9a3eebc51154f7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 17 Jul 2016 19:21:56 +0200 Subject: Fixes for GHC 8.0.1 --- tprint/src/Options.hs | 4 +++- tprint/tprint.cabal | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'tprint') diff --git a/tprint/src/Options.hs b/tprint/src/Options.hs index 1ad6c47..e146f91 100644 --- a/tprint/src/Options.hs +++ b/tprint/src/Options.hs @@ -26,6 +26,8 @@ import Instances () import Paths_tprint (version) import Data.Version (showVersion) +import Data.Bifunctor (Bifunctor(..)) + data TPrint = TPrint { baseUrl :: BaseUrl , dryRun :: Bool @@ -148,7 +150,7 @@ pOperation = hsubparser $ mconcat [ command "printers" cmdPrinters ] pTPrint :: Parser TPrint -pTPrint = TPrint <$> option (eitherReader parseBaseUrl) (metavar "URL" <> long "baseurl" <> short 'u' <> help "Server to interact with" <> value (BaseUrl Http "localhost" 3000) <> showDefaultWith showBaseUrl) +pTPrint = TPrint <$> option (eitherReader $ first show . parseBaseUrl) (metavar "URL" <> long "baseurl" <> short 'u' <> help "Server to interact with" <> value (BaseUrl Http "localhost" 3000 "") <> showDefaultWith showBaseUrl) <*> switch (long "dry-run" <> short 'n' <> help "Don't send any requests that would be expected to change the servers state") <*> pOutput <*> pOperation diff --git a/tprint/tprint.cabal b/tprint/tprint.cabal index d6fc422..5fcd00b 100644 --- a/tprint/tprint.cabal +++ b/tprint/tprint.cabal @@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: tprint -version: 1.0.0 +version: 2.0.0 synopsis: A CLI for thermoprint-client -- description: homepage: http://dirty-haskell.org/tags/thermoprint.html @@ -22,9 +22,9 @@ executable tprint , Options.Utils , Instances -- other-extensions: - build-depends: base >=4.8 && <4.9 - , thermoprint-bbcode >=1.0.0 && <2 - , thermoprint-client ==0.0.* + build-depends: base >=4.8 && <5 + , thermoprint-bbcode >=2.0.0 && <3 + , thermoprint-client ==1.0.* , optparse-applicative >=0.12.1 && <1 , containers >=0.5.6 && <1 , time >=1.5.0 && <2 -- cgit v1.2.3