aboutsummaryrefslogtreecommitdiff
path: root/tprint/src
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-07-17 19:21:56 +0200
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-07-17 19:21:56 +0200
commit2b9ceaead3f3cd80e973cccecb9a3eebc51154f7 (patch)
treedf2378943480647606b6a06f62c0f4b8b2ab406d /tprint/src
parentac4cf4a0a494eafe55364f816569c517684fdf32 (diff)
downloadthermoprint-2b9ceaead3f3cd80e973cccecb9a3eebc51154f7.tar
thermoprint-2b9ceaead3f3cd80e973cccecb9a3eebc51154f7.tar.gz
thermoprint-2b9ceaead3f3cd80e973cccecb9a3eebc51154f7.tar.bz2
thermoprint-2b9ceaead3f3cd80e973cccecb9a3eebc51154f7.tar.xz
thermoprint-2b9ceaead3f3cd80e973cccecb9a3eebc51154f7.zip
Fixes for GHC 8.0.1
Diffstat (limited to 'tprint/src')
-rw-r--r--tprint/src/Options.hs4
1 files changed, 3 insertions, 1 deletions
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 ()
26import Paths_tprint (version) 26import Paths_tprint (version)
27import Data.Version (showVersion) 27import Data.Version (showVersion)
28 28
29import Data.Bifunctor (Bifunctor(..))
30
29data TPrint = TPrint 31data TPrint = TPrint
30 { baseUrl :: BaseUrl 32 { baseUrl :: BaseUrl
31 , dryRun :: Bool 33 , dryRun :: Bool
@@ -148,7 +150,7 @@ pOperation = hsubparser $ mconcat [ command "printers" cmdPrinters
148 ] 150 ]
149 151
150pTPrint :: Parser TPrint 152pTPrint :: Parser TPrint
151pTPrint = TPrint <$> option (eitherReader parseBaseUrl) (metavar "URL" <> long "baseurl" <> short 'u' <> help "Server to interact with" <> value (BaseUrl Http "localhost" 3000) <> showDefaultWith showBaseUrl) 153pTPrint = TPrint <$> option (eitherReader $ first show . parseBaseUrl) (metavar "URL" <> long "baseurl" <> short 'u' <> help "Server to interact with" <> value (BaseUrl Http "localhost" 3000 "") <> showDefaultWith showBaseUrl)
152 <*> switch (long "dry-run" <> short 'n' <> help "Don't send any requests that would be expected to change the servers state") 154 <*> switch (long "dry-run" <> short 'n' <> help "Don't send any requests that would be expected to change the servers state")
153 <*> pOutput 155 <*> pOutput
154 <*> pOperation 156 <*> pOperation