Rest-ish Services in Haskell Part 3
tl;dr - In this post I work my way through sprinkling in some DataKinds (shoutout to dcasto’s excellent primer), abstracting the TaskStore into an EntityStore, and adding servant to actually expose this EntityStore via an well-typed TodoAPI over HTTP. We actually get to a running server in this post, finally! Multi-part blog post alert This is a multi part blog post with the following sections:
REST-ish Services in Haskell: Part 2
tl;dr - Work our way through some more type tomfoolery, domain modeling (w/ a light discussion of Domain Driven Design). Next a Component which can operate on the Task domain model, the TaskStore is introduced. Then the types “hit the road” and we build a partial implementation of a SQLiteTaskStore (with assistance from sqlite-simple). The code is available in the haskell-restish-todo repo, @ tag part-2.
REST-ish Services in Haskell: Part 1
tl;dr - A general tour through a bunch of patterns/strategies I use when developing robust-ish REST-ish web services with Haskell. This post boils down to using some approaches to getting creature comforts set up for your binary. If you want to go straight to the code, check out the gitlab repo @ tag part-1 UPDATE (11/28/2018) One of the great thing about blog posts is getting feedback and thanks to Magnus over @ therning.
Minimal effort build improvements and a GHC 8.2.2 upgrade
tl;dr - On a Haskell project I’m working on I started with >~20 minute cold-cache builds in the worst case in my Gitlab-powered CI environment then found some small ways to improve. Very recently I decided I wasn’t satisfied with ~10 / 15 minute builds and did the laziest, least-effort steps I could find to get to <10 minute cold-cache builds (~5min best case). Check out the [TLDR][tldr] section to see the Dockerfiles and steps I took summarized.