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 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tprint/src') 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 -- cgit v1.2.3