diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-06-25 16:43:48 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-06-25 16:43:48 +0000 |
| commit | b96b36f43de3e2f8b58d5f539daa6f6d47f25870 (patch) | |
| tree | 0992334be13cec6538a1dea22fbbf26ad6bdf224 /src/GF/UseGrammar/Statistics.hs | |
| parent | fe367412e0aeb4ad5c02de68e6eca382e0f96984 (diff) | |
removed src for 2.9
Diffstat (limited to 'src/GF/UseGrammar/Statistics.hs')
| -rw-r--r-- | src/GF/UseGrammar/Statistics.hs | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/GF/UseGrammar/Statistics.hs b/src/GF/UseGrammar/Statistics.hs deleted file mode 100644 index 46e4fcc3b..000000000 --- a/src/GF/UseGrammar/Statistics.hs +++ /dev/null @@ -1,44 +0,0 @@ ----------------------------------------------------------------------- --- | --- Module : Statistics --- Maintainer : AR --- Stability : (stable) --- Portability : (portable) --- --- > CVS $Date: 2005/09/04 11:45:38 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.1 $ --- --- statistics on canonical grammar: amounts of generated code --- AR 4\/9\/2005. --- uses canonical grammar ------------------------------------------------------------------------------ - -module GF.UseGrammar.Statistics (prStatistics) where - -import GF.Infra.Modules -import GF.Infra.Option -import GF.Grammar.PrGrammar -import GF.Canon.GFC -import GF.Canon.MkGFC - -import GF.Data.Operations - -import Data.List (sortBy) - --- | the top level function -prStatistics :: CanonGrammar -> String -prStatistics can = unlines $ [ - show (length mods) ++ "\t\t modules", - show chars ++ "\t\t gfc size", - "", - "Top 40 definitions" - ] ++ - [show d ++ "\t\t " ++ f | (d,f) <- tops] - where - tops = take 40 $ reverse $ sortBy (\ (i,_) (j,_) -> compare i j) defs - defs = [(length (prt (info2def j)), name m j) | (m,j) <- infos] - infos = [(m,j) | (m,ModMod mo) <- mods, j <- tree2list (jments mo)] - name m (f,_) = prt m ++ "." ++ prt f - mods = modules can - chars = length $ prCanon can |
