[Haskell] Ambiguous type variable when using Data.Generic