diff options
Diffstat (limited to 'pkgs/profpatsch/dhallsh/Command')
-rw-r--r-- | pkgs/profpatsch/dhallsh/Command/toList.dhall | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/profpatsch/dhallsh/Command/toList.dhall b/pkgs/profpatsch/dhallsh/Command/toList.dhall new file mode 100644 index 00000000..23605a3f --- /dev/null +++ b/pkgs/profpatsch/dhallsh/Command/toList.dhall @@ -0,0 +1,12 @@ +let Prelude = ../imports/Prelude.dhall + +let Command = ./type.dhall + +let toList + : ∀(a : Type) → (a → List Text) → Command a → List Text + = λ(a : Type) + → λ(f : a → List Text) + → λ(c : Command a) + → [ c.cmd ] # Prelude.List.concatMap a Text f c.args + +in toList |