From 7db4b641ce6abe90dd404459cd5eccb6e67f618c Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 20 May 2009 21:03:56 +0000 Subject: refactor the PGF.Expr type and the evaluation of abstract expressions --- src/GF/Command/TreeOperations.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/GF/Command/TreeOperations.hs') diff --git a/src/GF/Command/TreeOperations.hs b/src/GF/Command/TreeOperations.hs index a2670dc4f..ff87de563 100644 --- a/src/GF/Command/TreeOperations.hs +++ b/src/GF/Command/TreeOperations.hs @@ -4,10 +4,8 @@ module GF.Command.TreeOperations ( ) where import GF.Compile.TypeCheck -import PGF (compute,paraphrase,typecheck) +import PGF --- for conversions -import PGF.Data --import GF.Compile.GrammarToGFCC (mkType,mkExp) import qualified GF.Grammar.Grammar as G import qualified GF.Grammar.Macros as M @@ -22,7 +20,7 @@ treeOp pgf f = fmap snd $ lookup f $ allTreeOps pgf allTreeOps :: PGF -> [(String,(String,TreeOp))] allTreeOps pgf = [ ("compute",("compute by using semantic definitions (def)", - map (compute pgf))), + map (expr2tree pgf . tree2expr))), ("paraphrase",("paraphrase by using semantic definitions (def)", nub . concatMap (paraphrase pgf))), ("smallest",("sort trees from smallest to largest, in number of nodes", -- cgit v1.2.3