packages feed

DAV 1.0.1 → 1.0.2

raw patch · 2 files changed

+7/−5 lines, 2 filesdep ~optparse-applicative

Dependency ranges changed: optparse-applicative

Files

DAV.cabal view
@@ -1,5 +1,5 @@ name:                DAV-version:             1.0.1+version:             1.0.2 synopsis:            RFC 4918 WebDAV support description:    This is a library for the Web Distributed Authoring and Versioning@@ -61,7 +61,7 @@                      , lens >= 3.0                      , mtl >= 2.1                      , network >= 2.3-                     , optparse-applicative >= 0.5.0+                     , optparse-applicative >= 0.10.0                      , transformers >= 0.3                      , transformers-base                      , utf8-string@@ -76,4 +76,4 @@ source-repository this   type:     git   location: git://anonscm.debian.org/users/clint/DAV.git-  tag:      DAV/1.0.1+  tag:      DAV/1.0.2
hdav.hs view
@@ -34,7 +34,7 @@  import Network.Protocol.HTTP.DAV (DAVT, evalDAVT, setCreds, setDepth, setUserAgent, getPropsM, getContentM, putContentM, putPropsM, delContentM, moveContentM, mkCol, Depth(..), caldavReportM, withLockIfPossible, withLockIfPossibleForDelete) -import Options.Applicative.Builder (argument, command, help, idm, info, long, metavar, option, prefs, progDesc, showHelpOnError, str, strOption, subparser)+import Options.Applicative.Builder (argument, command, help, idm, info, long, metavar, option, prefs, progDesc, showHelpOnError, str, strOption, subparser, auto) import Options.Applicative.Extra (customExecParser) import Options.Applicative.Types (Parser) @@ -174,13 +174,15 @@ cmd = subparser   ( command "copy" (info ( Copy <$> twoUUP ) ( progDesc "Copy props and data from one location to another" ))  <> command "delete" (info ( Delete <$> oneUUP ) ( progDesc "Delete props and data" ))- <> command "getprops" (info ( GetProps <$> oneUUP <*> (optional $ option ( long "depth" <> metavar "DEPTH" <> help "depth" )))  ( progDesc "Fetch props and output them to stdout" ))+ <> command "getprops" (info ( GetProps <$> oneUUP <*> (optional depth))  ( progDesc "Fetch props and output them to stdout" ))  <> command "makecollection" (info ( MakeCollection <$> oneUUP ) ( progDesc "Make a new collection" ))  <> command "move" (info ( Move <$> twoUoneUP ) ( progDesc "Move props and data from one location to another in the same DAV space" ))  <> command "put" (info ( Put <$> argument str ( metavar "FILE" ) <*> oneUUP )  ( progDesc "Put file to URL" ))   <> command "caldav-report" (info ( CaldavReport <$> oneUUP )  ( progDesc "Get CalDAV report" ))   )+ where+   depth = option auto ( long "depth" <> metavar "DEPTH" <> help "depth" ) :: Parser Depth  runDAV :: MonadIO m => String -> DAVT m a -> m a runDAV u f = evalDAVT u (setUserAgent (BC8.pack $ "hDAV/" ++ showVersion version) >> f) >>= \x -> case x of