Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Links to wiki pages.

  • Loading branch information...
commit 36c3f9e219c694ae833b6150ba8d21c43359e642 1 parent 3de9e70
@pcapriotti authored
Showing with 5 additions and 31 deletions.
  1. +5 −31 README.md
View
36 README.md
@@ -309,39 +309,13 @@ using the composition function `mappend` (or simply `(<>)`).
See the haddock documentation for `Options.Applicative.Builder` for a full list
of builders and modifiers.
-## Arrow interface
+## Advanced features
-It is also possible to use the [Arrow syntax][arrows] to combine basic parsers.
+* [Bash completion][bash]
+* [Arrow interface][arrows]
-This can be particularly useful when the structure holding parse results is
-deeply nested, or when the order of fields differs from the order in which the
-parsers should be applied.
-
-Using functions from the `Options.Applicative.Arrows` module, one can write,
-for example:
-
-```haskell
-data Options = Options
- { optArgs :: [String]
- , optVerbose :: Bool }
-
-opts :: Parser Options
-opts = runA $ proc () -> do
- verbosity <- asA (option (short 'v' <> value 0)) -< ()
- let verbose = verbosity > 0
- args <- asA (many (argument str idm)) -< ()
- returnA -< Options args verbose
-```
-
-where parsers are converted to arrows using `asA`, and the resulting composed
-arrow is converted back to a `Parser` with `runA`.
-
-See `tests/Examples/Cabal.hs` for a slightly more elaborate example using the
-arrow syntax for defining parsers.
-
-Note that the `Arrow` interface is provided only for convenience. The API based
-on `Applicative` is just as expressive, although it might be cumbersome to use
-in certain cases.
+ [bash]: https://github.com/pcapriotti/optparse-applicative/wiki/Bash-Completion
+ [arrows]: https://github.com/pcapriotti/optparse-applicative/wiki/Arrows
## How it works
Please sign in to comment.
Something went wrong with that request. Please try again.