From a83b6bea626c0f42879af662b90c587d56eb5df0 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 26 Sep 2011 13:56:39 +0000 Subject: don't count app nodes in term size --- src/compiler/GF/Grammar/Analyse.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/GF') diff --git a/src/compiler/GF/Grammar/Analyse.hs b/src/compiler/GF/Grammar/Analyse.hs index b7809309b..981037827 100644 --- a/src/compiler/GF/Grammar/Analyse.hs +++ b/src/compiler/GF/Grammar/Analyse.hs @@ -80,7 +80,7 @@ sizeConstant sgr t = err (const 0) id $ do -- ground terms count as 1, i.e. as "one work" each sizeTerm :: Term -> Int sizeTerm t = case t of - App c a -> 1 + sizeTerm c + sizeTerm a + App c a -> sizeTerm c + sizeTerm a -- app nodes don't count Abs _ _ b -> 2 + sizeTerm b Prod _ _ a b -> 2 + sizeTerm a + sizeTerm b S c a -> 1 + sizeTerm c + sizeTerm a -- cgit v1.2.3