From 95c890dbcd07b7355399e122191a362714cd52b9 Mon Sep 17 00:00:00 2001 From: defanor Date: Mon, 4 Dec 2017 06:57:25 +0300 Subject: Make record selectors for mandatory arguments optional --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 6992749..27c0bd1 100644 --- a/README.md +++ b/README.md @@ -32,14 +32,22 @@ Input { something = Nothing , fooBar2 = Bar} ``` -Its serialized version should look like this: +With the default modifiers, its serialized version should look like +this: ```haskell -["--foobar","foo","--arg1","1","--arg2","a string","--foobar2","bar"] +["--foobar","foo","1","a string","bar"] ``` What would look like this in a shell: +```sh +--foobar foo 1 'a string' bar +``` + +A more verbose version can be produced with `alwaysAddSelName = True`, +while parsing would accept either version: + ```sh --foobar foo --arg1 1 --arg2 'a string' --foobar2 bar ``` -- cgit v1.2.3