@tobz619 great! Perhaps you want to learn how to use a database in haskell, in addition to building a game. In that case go for it. sqlite is a very common choice for small rdbms.
If you’re interested in a simpler, pure haskell solution, which also makes sharing your game easier, if that’s a goal: the simplest “database” for a haskell program is to show
values (which all must derive or implement the Show
class) and save that as a text file. And at program startup read
them back from there (they also must derive or implement the Read
class).
You might also be interested in my experiments here when I had the same need; this is a more robust (overengineered) form of the above, where scores and other state are reconstructed from a log of game events.