ReadArgs 1.0 → 1.1
raw patch · 2 files changed
+8/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ ReadArgs: instance [overlap ok] Argument a => ArgumentTuple a
Files
- ReadArgs.cabal +1/−1
- ReadArgs.hs +7/−0
ReadArgs.cabal view
@@ -1,5 +1,5 @@ Name: ReadArgs-Version: 1.0+Version: 1.1 Synopsis: Simple command line argument parsing Description:
ReadArgs.hs view
@@ -126,6 +126,13 @@ return $ a :& y usageFor ~(a :& y) = " " ++ argName a ++ usageFor y +-- Use :& to derive an instance for single arguments+instance (Argument a) => ArgumentTuple a where+ parseArgsFrom ss = do+ a :& () <- parseArgsFrom ss+ return a+ usageFor a = usageFor (a :& ())+ -- Use :& to derive instances for all the normal tuple types instance (Argument b, Argument a) => ArgumentTuple (b,a) where parseArgsFrom ss = do