From 25828998e6d00b4f156d250f2547884c18112f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Lei=C3=9F?= <40628782+hleiss@users.noreply.github.com> Date: Tue, 9 Sep 2025 16:39:00 +0200 Subject: [PATCH] Re-enable options -nub and -funs to shell command 'put_tree' 2 tabs \t in compiler/GF/Command/TreeOperations.hs introduced in PR #174 blocked the options -nub and -funs of 'put_tree'. --- src/compiler/GF/Command/TreeOperations.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/GF/Command/TreeOperations.hs b/src/compiler/GF/Command/TreeOperations.hs index 7497eb7e8..cb1b7c37e 100644 --- a/src/compiler/GF/Command/TreeOperations.hs +++ b/src/compiler/GF/Command/TreeOperations.hs @@ -22,13 +22,13 @@ allTreeOps pgf = [ Right $ \f -> map (transfer pgf f))), -- HL 12/24, modified from gf-3.3 ("largest",("sort trees from largest to smallest, in number of nodes", Left $ largest)), - ("nub\t",("remove duplicate trees", + ("nub",("remove duplicate trees", Left $ nub)), ("smallest",("sort trees from smallest to largest, in number of nodes", Left $ smallest)), ("subtrees",("return all fully applied subtrees (stopping at abstractions), by default sorted from the largest", Left $ concatMap subtrees)), - ("funs\t",("return all fun functions appearing in the tree, with duplications", + ("funs",("return all fun functions appearing in the tree, with duplications", Left $ \es -> [mkApp f [] | e <- es, f <- exprFunctions e])) ]