blob: a7a358e827acdf84b138f3442ca6179ee94fe323 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{-# LANGUAGE FlexibleContexts #-}
-- | mostly the monad the service runs in
module Server.Util (Service, ServiceM, runService) where
import Control.Monad.Logger (LoggingT, runStderrLoggingT)
import Data.ByteString (ByteString)
import Servant (Handler, ServerError, ServerT, err302,
errHeaders, throwError)
type ServiceM = LoggingT Handler
type Service api = ServerT api ServiceM
runService :: ServiceM a -> Handler a
runService = runStderrLoggingT
|