migrate to type families following changes in prolog and term packages
Upgrade to ghc 7.8