TypeFamilies, FlexibleInstances and MultiParamTypeClasses.