mateamt/src/Types/Reader.hs

29 lines
621 B
Haskell
Raw Normal View History

2019-05-06 21:41:05 +00:00
module Types.Reader where
2019-12-19 01:40:54 +00:00
import qualified Data.Text as T
2019-05-06 21:41:05 +00:00
import Servant (Handler)
import Control.Concurrent.STM (TQueue)
2019-05-06 21:41:05 +00:00
import Control.Monad.Reader (ReaderT)
import Database.PostgreSQL.Simple (Connection)
import Network.Mail.Mime (Mail)
2019-05-06 21:41:05 +00:00
-- internal imports
import Types.Auth (TicketStore)
data ReadState = ReadState
2021-07-12 11:29:40 +00:00
{ rsConnection :: Connection
, rsTicketStore :: TicketStore
, rsCurrencySymbol :: T.Text
, rsCurrencyFraction :: Word
, rsSoftwareVersion :: T.Text
, rsSendmailPath :: FilePath
, rsMailQueue :: TQueue Mail
2019-05-06 21:41:05 +00:00
}
type MateHandler = ReaderT ReadState Handler