diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-09T22·15+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-09T22·15+0100 |
commit | f61ed25755da89f6068efb75642e2ac22d268278 (patch) | |
tree | 6a3c329bff079ba5415fb0aaa2488c50e1b263df /website/sandbox/learnpianochords/src/server/Types.hs | |
parent | bbcd0bf27d2663a9673983ccf6e2cf7034ddf240 (diff) |
Prefer ServantT for server to consume App context
Long story -> short: I'd like to access my App monad from within my Servant handlers. While this code type-checks, I'm not sure it's working as intended. Needing to change throwError to throwIO fails the "smell test". I expect to refactor this code, but I'm calling it a night for now.
Diffstat (limited to 'website/sandbox/learnpianochords/src/server/Types.hs')
-rw-r--r-- | website/sandbox/learnpianochords/src/server/Types.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/website/sandbox/learnpianochords/src/server/Types.hs b/website/sandbox/learnpianochords/src/server/Types.hs index 3a9decf39c19..a9e6661f6153 100644 --- a/website/sandbox/learnpianochords/src/server/Types.hs +++ b/website/sandbox/learnpianochords/src/server/Types.hs @@ -23,6 +23,9 @@ data Context = Context , contextClientPort :: !Int } +-- | Type synonym for my application monad. +type App = RIO Context + data VerifyGoogleSignInRequest = VerifyGoogleSignInRequest { idToken :: !Text } deriving (Eq, Show) |