aboutsummaryrefslogtreecommitdiff
path: root/tprint
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
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')
-rw-r--r--tprint/src/Options.hs4
-rw-r--r--tprint/tprint.cabal8
2 files changed, 7 insertions, 5 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
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 @@
2-- documentation, see http://haskell.org/cabal/users-guide/ 2-- documentation, see http://haskell.org/cabal/users-guide/
3 3
4name: tprint 4name: tprint
5version: 1.0.0 5version: 2.0.0
6synopsis: A CLI for thermoprint-client 6synopsis: A CLI for thermoprint-client
7-- description: 7-- description:
8homepage: http://dirty-haskell.org/tags/thermoprint.html 8homepage: http://dirty-haskell.org/tags/thermoprint.html
@@ -22,9 +22,9 @@ executable tprint
22 , Options.Utils 22 , Options.Utils
23 , Instances 23 , Instances
24 -- other-extensions: 24 -- other-extensions:
25 build-depends: base >=4.8 && <4.9 25 build-depends: base >=4.8 && <5
26 , thermoprint-bbcode >=1.0.0 && <2 26 , thermoprint-bbcode >=2.0.0 && <3
27 , thermoprint-client ==0.0.* 27 , thermoprint-client ==1.0.*
28 , optparse-applicative >=0.12.1 && <1 28 , optparse-applicative >=0.12.1 && <1
29 , containers >=0.5.6 && <1 29 , containers >=0.5.6 && <1
30 , time >=1.5.0 && <2 30 , time >=1.5.0 && <2