summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInari Listenmaa <inari.listenmaa@gmail.com>2024-03-15 12:43:17 +0100
committerInari Listenmaa <inari.listenmaa@gmail.com>2024-03-15 12:43:17 +0100
commit2f31bbab23a2bea8b32fcb3d370928ddb72a9735 (patch)
treeb3b6575afbd12d1978139d8522fc078fa4e825e9 /src
parent7e707508a72ce73d6c3e4b8881df37597f5b8801 (diff)
Apply gt to all arguments when piped
Diffstat (limited to 'src')
-rw-r--r--src/compiler/GF/Command/Commands.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs
index a6c66594f..f31a23083 100644
--- a/src/compiler/GF/Command/Commands.hs
+++ b/src/compiler/GF/Command/Commands.hs
@@ -218,9 +218,9 @@ pgfCommands = Map.fromList [
exec = getEnv $ \ opts arg (Env pgf mos) -> do
let pgfr = optRestricted opts pgf
let dp = valIntOpts "depth" 4 opts
- let ts = case mexp (toExprs arg) of
- Just ex -> generateFromDepth pgfr ex (Just dp)
- Nothing -> generateAllDepth pgfr (optType pgf opts) (Just dp)
+ let ts = case toExprs arg of
+ [] -> generateAllDepth pgfr (optType pgf opts) (Just dp)
+ es -> concat [generateFromDepth pgfr e (Just dp) | e <- es]
returnFromExprs $ take (optNumInf opts) ts
}),
("i", emptyCommandInfo {