Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 14 lines (9 sloc) 458 Bytes
#! /bin/bash
g() { local D="$1" && shift ; git grep --basic-regexp "$@" "$D" | wc -l ; }
cd "$(git rev-parse --show-toplevel)"
doc="$(g src -e '--\s\+>>>\s\+[^:]' --and --not -e '--\s\+>>>\s\+\(import\|let\)' \
--or -e '--\s\+>>>\s\+let\s\+.*\<in\>')"
opsLens="$(g src/Control/Lens '^(.\+)\s*::')"
opsAll="$(g src '^(.\+)\s*::')"
mod="$(find src -name '*.hs' | wc -l)"
echo "doctests: $doc | operators: $opsAll (Control.Lens: $opsLens) | modules: $mod"