4ff1ea291c
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) |
||
---|---|---|
.. | ||
blog | ||
days-of-week-habits | ||
goals | ||
habitgarden | ||
habits | ||
learn | ||
sandbox | ||
default.nix | ||
index.html | ||
README.md |
wpcarro.dev
https://wpcarro.dev is my personal website. I expose a few subdomains, one of which you are probably visiting right now, git.wpcarro.dev. Here are some of the others:
blog.wpcarro.dev
: My personal bloglearn.wpcarro.dev
: Teaching others to codesandbox.wpcarro.dev
: Where I deploy some pet projects and code sketches
Visit https://wpcarro.dev for a sitemap.