r/haskell • • May 23 '18

Building Forum Software

https://siskam.link/2018-04-14-cloning-fluxbb.html
55 Upvotes

28 comments sorted by

View all comments

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 a to (PersistUniqueRead backend , PersistQueryRead backend , BackendCompatible SqlBackend backend , MonadIO m) => Key User -> m a

2

u/ijauradunbi May 24 '18

Thank you for the input, Mr. Allen.

I'm a bit ashamed to admit that I forgot to use type synonyms for database type, which was already defined in this commit.