GenericPersistence is a Haskell persistence library for relational databases. The approach relies on GHC.Generics. A real-world demo can be found here:
Why do you think that https://github.com/kolmodin/binary is a good alternative to generic-persistence