snix/website/sandbox/learnpianochords/src/server
William Carroll 4ff1ea291c Drop support for ServantT transformer type for server
After burning a few hours wrestling with the type system, I decided to revert to
the simpler `Server API` type instead of the `ServantT` transformer type.

The problem is that I couldn't write a MonadError instance for `RIO Context`,
which is my `AppM` (i.e. application monad). Using `throwIO` in the server
handlers results in 500 errors, which is not what I wanted. I'm still pretty
fuzzy about what's happening; I now know that exception handling in Haskell is
pretty gnaryly. I may revisit this at a later time when my knowledge is more
extensive. For now: time to fry bigger fish.

An easier abstract is for me to pass `T.Context` into `server` as an argument,
which after all is what a Reader does.

TL;DR:
- Read server, client ports from .envrc
- Define a top-level Failure type (empty for now)
- Define a top-level Success type
- Define App as RIO Context (Either Failure Success)
2020-08-10 15:02:05 +01:00
..
.ghci Add common language extensions to .ghci 2020-08-09 10:18:46 +01:00
API.hs Remove redundant deps from API.hs 2020-08-08 11:10:28 +01:00
App.hs Drop support for ServantT transformer type for server 2020-08-10 15:02:05 +01:00
default.nix Initialize a default.nix for nix-build 2020-08-09 10:19:36 +01:00
Fixtures.hs Replace Prelude with RIO 2020-08-09 22:17:19 +01:00
GoogleSignIn.hs Replace Prelude with RIO 2020-08-09 22:17:19 +01:00
index.html Support echo server to test POST /verify 2020-08-06 22:23:06 +01:00
init.sql Sketch database schema 2020-08-09 10:22:12 +01:00
Main.hs Drop support for ServantT transformer type for server 2020-08-10 15:02:05 +01:00
shell.nix Move Haskell-related shell.nix code into its own shell.nix 2020-08-09 22:11:39 +01:00
Spec.hs Replace Prelude with RIO 2020-08-09 22:17:19 +01:00
TestUtils.hs Replace Prelude with RIO 2020-08-09 22:17:19 +01:00
Types.hs Drop support for ServantT transformer type for server 2020-08-10 15:02:05 +01:00
Utils.hs Define Utils module 2020-08-08 11:06:53 +01:00