From 101ed72e9f97a8f68b5f678854c992dff18d8f9f Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 8 Sep 2019 14:00:56 +0200 Subject: Init: basic command line abstraction for fish’s complete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/profpatsch/dhallsh/Argument/toArgList.dhall | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pkgs/profpatsch/dhallsh/Argument/toArgList.dhall (limited to 'pkgs/profpatsch/dhallsh/Argument/toArgList.dhall') diff --git a/pkgs/profpatsch/dhallsh/Argument/toArgList.dhall b/pkgs/profpatsch/dhallsh/Argument/toArgList.dhall new file mode 100644 index 00000000..93785c72 --- /dev/null +++ b/pkgs/profpatsch/dhallsh/Argument/toArgList.dhall @@ -0,0 +1,18 @@ +let OptionPrinter = ../OptionPrinter/type.dhall + +let Option = ../Option/type.dhall + +let Argument = ../Argument/type.dhall + +in λ(optionPrinter : OptionPrinter) + → λ(a : Argument) + → merge + { Plain = + λ(t : Text) → [ t ] + , Flag = + λ(o : Option) → [ optionPrinter o ] + , Option = + λ(o : { opt : Option, arg : Text }) → [ optionPrinter o.opt, o.arg ] + } + a + : List Text -- cgit 1.4.1