From 1de2f778183a8890c0aa8e1f0486002f504649b5 Mon Sep 17 00:00:00 2001 From: defanor Date: Sun, 17 Dec 2017 00:44:06 +0300 Subject: Add DSV support --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index cb38e87..26e77d4 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,9 @@ while keeping them language-agnostic and more user- and shell scripting-friendly than JSON and similar formats. Given a type, it derives instances to print and parse it as -command-line arguments, as well as to compose usage instructions. The -resulting deserialization wouldn't be as nice as that of +command-line arguments or DSVs, as well as to compose usage +instructions. The resulting deserialization wouldn't be as nice as +that of e.g. [optparse-generic](https://hackage.haskell.org/package/optparse-generic), but the aim here is to handle more or less arbitrary types. @@ -66,27 +67,27 @@ the (alwaysUseSelName, omitNamedOptions) combinations: ``` (True,True) -["--foo","[]","--bar","a string"] +--foo : 1 : 2 : 3 [] --bar "a string" --foo ([] | : INT ([] | :...)) [--bar STRING] (True,True) -["--foo","[]"] +--foo : 1 : 2 : 3 [] --foo ([] | : INT ([] | :...)) [--bar STRING] (True,False) -["--foo","[]","--bar","just","a string"] +--foo : 1 : 2 : 3 [] --bar just "a string" --foo ([] | : INT ([] | :...)) --bar (nothing | just STRING) (True,False) -["--foo","[]","--bar","nothing"] +--foo : 1 : 2 : 3 [] --bar nothing --foo ([] | : INT ([] | :...)) --bar (nothing | just STRING) (False,True) -["[]","--bar","a string"] +: 1 : 2 : 3 [] --bar "a string" ([] | : INT ([] | :...)) [--bar STRING] (False,True) -["[]"] +: 1 : 2 : 3 [] ([] | : INT ([] | :...)) [--bar STRING] (False,False) -["[]","just","a string"] +: 1 : 2 : 3 [] just "a string" ([] | : INT ([] | :...)) (nothing | just STRING) (False,False) -["[]","nothing"] +: 1 : 2 : 3 [] nothing ([] | : INT ([] | :...)) (nothing | just STRING) ``` -- cgit v1.2.3