Probably need to update the examples in the docs here https://www.yesodweb.com/book/persistent to not use mkSave. Changing mkSave in the examples to mkEntityDefList fixed an obscure error that took a bit of searching to identify, because Hackage shows mkSave as still being valid for Database.Persist.TH package.
Also, had to add the following language extensions to my code that were not in the example:
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DataKinds #-}
The good news is after fixing these the example code runs fine for me.
Probably need to update the examples in the docs here https://www.yesodweb.com/book/persistent to not use mkSave. Changing mkSave in the examples to mkEntityDefList fixed an obscure error that took a bit of searching to identify, because Hackage shows mkSave as still being valid for Database.Persist.TH package.
I was able to identify the issue thanks to the last comment in this closed issue: https://github.com/yesodweb/yesodweb.com-content/issues/214
Also, had to add the following language extensions to my code that were not in the example:
{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE DataKinds #-}
The good news is after fixing these the example code runs fine for me.