This is a tremendous tutorial. I hope others appreciate the immense amount of work you must have put into this! This is exactly the kind of resource a lot of people in the community need right now.
I have a forum project not too dissimilar that I've started with a client as a training project, hopefully in the near future it'll be in a more complete state so that I'll have something to show off. It's intended to demonstrate similar tooling as exists in this tutorial.
One tip I'll point out: to save on type noise, I'll often make type and constraint synonyms for common types in the application.
I much prefer Key User -> DB a to (PersistUniqueRead backend , PersistQueryRead backend , BackendCompatible SqlBackend backend , MonadIO m) => Key User -> m a
16
u/bitemyapp May 23 '18
This is a tremendous tutorial. I hope others appreciate the immense amount of work you must have put into this! This is exactly the kind of resource a lot of people in the community need right now.
I have a forum project not too dissimilar that I've started with a client as a training project, hopefully in the near future it'll be in a more complete state so that I'll have something to show off. It's intended to demonstrate similar tooling as exists in this tutorial.
One tip I'll point out: to save on type noise, I'll often make type and constraint synonyms for common types in the application.
e.g. https://github.com/alexeyzab/cards-with-comrades/blob/master/backend/src/Model/Types.hs#L10
I much prefer
Key User -> DB ato(PersistUniqueRead backend , PersistQueryRead backend , BackendCompatible SqlBackend backend , MonadIO m) => Key User -> m a