[Haskell] Common library for generic programming