ebook-manager/backend/src/Types.hs

25 lines
617 B
Haskell
Raw Normal View History

2018-08-02 22:32:23 +03:00
{-# Language NoImplicitPrelude #-}
2018-08-02 23:59:08 +03:00
{-# Language DeriveGeneric #-}
2018-08-03 23:36:38 +03:00
{-# Language TypeSynonymInstances #-}
{-# Language FlexibleInstances #-}
2018-08-04 23:43:26 +03:00
module Types
( App(..)
, AppM
-- Figure out how to re-export instances
) where
2018-08-02 22:32:23 +03:00
import ClassyPrelude
import Control.Monad.Logger
2018-08-02 23:07:05 +03:00
import Configuration
2018-08-02 23:59:08 +03:00
import Data.Pool (Pool)
import Database.Selda.Backend (SeldaConnection)
2018-08-04 23:43:26 +03:00
import Servant.Auth.Server as SAS ()
import Crypto.JOSE.JWK (JWK)
2018-08-02 22:32:23 +03:00
2018-08-02 23:59:08 +03:00
data App = App { config :: Config
2018-08-04 23:43:26 +03:00
, database :: Pool SeldaConnection
, jwk :: JWK }
2018-08-02 23:59:08 +03:00
deriving (Generic)
2018-08-02 22:32:23 +03:00
type AppM = LoggingT (ReaderT App IO)