Allow optparse-applicative 0.10
commitb4ede1bfb2996695393abb861cddca4068f72145
authorMichael Snoyman <michael@snoyman.com>
dateWed 3 Sep 2014, 08:07 (12 years ago)
parent53930ae
wai-app-static/WaiAppStatic/CmdLine.hs+7−1
@@ -38,6 +38,12 @@ data Args = Args
3838 , host :: String
3939 }
4040
41+#if MIN_VERSION_optparse_applicative(0, 10, 0)
42+option' = option auto
43+#else
44+option' = option
45+#endif
46+
4147args :: Parser Args
4248args = Args
4349 <$> strOption
@@ -52,7 +58,7 @@ args = Args
5258 <> metavar "INDEX"
5359 <> help "index files to serve when a directory is required"
5460 )))
55− <*> option
61+ <*> option'
5662 ( long "port"
5763 <> short 'p'
5864 <> metavar "PORT"
wai-app-static/wai-app-static.cabal+1−1
@@ -50,7 +50,7 @@ library
5050 , zlib >= 0.5
5151 , filepath
5252 , wai-extra >= 3.0 && < 3.1
53− , optparse-applicative >= 0.7 && <= 0.9.1.1
53+ , optparse-applicative >= 0.7
5454 , warp >= 3.0 && < 3.1
5555 -- Used exclusively for hashFile function
5656 , cryptohash-conduit