add .cabal
configure dependencies
use strict Map

Maybe the strict Map is more suitable for summing up by category