Verified Commit 840fe0d1 authored by Camil Staps's avatar Camil Staps 🚀

Fix for latest Platform; add nr./unique types to builddb stats

parent 4d7fa14d
......@@ -2,7 +2,9 @@ implementation module Cache
import StdFile
import StdFunc
import StdList
import StdOrdList
import StdString
import StdTuple
import Control.Applicative
......@@ -11,6 +13,7 @@ import Crypto.Hash.MD5
import Data.Error
from Data.Func import $, on
import Data.Functor
import Data.Maybe
import Data.Tuple
import System.Directory
import System.File
......
Subproject commit 21cd481ed97688de862c2ef0f6b9341451c8be5c
Subproject commit 9b1123c1aa1c7a1643c71890cfc92eaebe374140
......@@ -7,6 +7,7 @@ from StdFunc import id, o, seq
import StdMisc
import StdOrdList
import StdOverloaded
import StdString
import StdTuple
from TCPIP import :: IPAddress, :: Port, instance toString IPAddress
......@@ -19,6 +20,7 @@ from Data.Foldable import class Foldable, instance Foldable Maybe
from Data.Func import $, hyperstrict
import Data.Functor
import Data.List
import Data.Maybe
import Data.Tuple
import System._Posix
import System.CommandLine
......
......@@ -3,12 +3,11 @@ FROM camilstaps/clean:nightly
COPY . /usr/src/cloogle
WORKDIR /usr/src/cloogle
RUN install_clean.sh bundle-complete 2017-10-27 \
RUN install_clean.sh bundle-complete 2017-10-31 \
&& PACKAGES="make subversion ca-certificates gcc git curl patch" \
&& apt-get update -qq\
&& apt-get install -qq $PACKAGES --no-install-recommends \
&& make distclean \
&& make CloogleServer builddb\
&& make distclean CloogleServer builddb\
&& rm -r /opt/clean/lib/*\
&& svn checkout https://svn.cs.ru.nl/repos/SoccerFun/src /opt/clean/lib/SoccerFun \
&& mv /opt/clean/lib/SoccerFun/*/*.[id]cl /opt/clean/lib/SoccerFun \
......
......@@ -136,28 +136,30 @@ where
printStats :: !CloogleDB !*File -> *File
printStats db f = f
<<< "+-------------------+-------+\n"
<<< "| Modules | " <<< modules <<< " |\n"
<<< "| Functions | " <<< funs <<< " |\n"
<<< "| Unique types | " <<< unqfuns <<< " |\n"
<<< "| Type tree depth | " <<< treedep <<< " |\n"
<<< "| Type definitions | " <<< types <<< " |\n"
<<< "| Classes | " <<< classes <<< " |\n"
<<< "| Instances | " <<< insts <<< " |\n"
<<< "| Derivations | " <<< derives <<< " |\n"
<<< "| Syntax constructs | " <<< syntaxs <<< " |\n"
<<< "| Modules | " <<< modules <<< " |\n"
<<< "| Functions | " <<< funs <<< " |\n"
<<< "| With types | " <<< treesize <<< " |\n"
<<< "| Unique types | " <<< unqtypes <<< " |\n"
<<< "| Type tree depth | " <<< treedep <<< " |\n"
<<< "| Type definitions | " <<< types <<< " |\n"
<<< "| Classes | " <<< classes <<< " |\n"
<<< "| Instances | " <<< insts <<< " |\n"
<<< "| Derivations | " <<< derives <<< " |\n"
<<< "| Syntax constructs | " <<< syntaxs <<< " |\n"
<<< "+-------------------+-------+\n"
where
[modules,funs,unqfuns,treedep,types,classes,insts,derives,syntaxs:_]
[modules,funs,unqtypes,treesize,treedep,types,classes,insts,derives,syntaxs:_]
= map (pad 5)
[ moduleCount db
, functionCount db
, num
, depth
, treenodes
, treesize
, treedepth
, typeCount db
, classCount db
, instanceCount db
, deriveCount db
, syntaxCount db
]
(num,depth) = typeTreeStats db
where (treenodes,treesize,treedepth) = typeTreeStats db
pad n i = {' ' \\ _ <- [0..n-size (toString i)-1]} +++ toString i
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment