From 7d1040ffb9bbf08d853e224b35bef4cebfee5d9e Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 13 Mar 2013 13:43:30 +0000 Subject: [PATCH] pt -nub to remove duplicate trees from a list returned e.g. by a parser --- src/compiler/GF/Command/TreeOperations.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/GF/Command/TreeOperations.hs b/src/compiler/GF/Command/TreeOperations.hs index 330c82593..ea6180317 100644 --- a/src/compiler/GF/Command/TreeOperations.hs +++ b/src/compiler/GF/Command/TreeOperations.hs @@ -22,6 +22,8 @@ allTreeOps pgf = [ Left $ nub . concatMap (paraphrase pgf))), ("largest",("sort trees from largest to smallest, in number of nodes", Left $ largest)), + ("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",