hannah/src/Main.hs

16 lines
383 B
Haskell

module Main where
import Network.WebSockets (ClientApp, runClient)
import Control.Monad.Reader (runReaderT)
import Control.Monad.State (runStateT)
import Config (host, port, path)
import Automaton (initialState, start)
bot :: ClientApp ()
bot connection = fst <$> runStateT (runReaderT Automaton.start connection) initialState
main :: IO ()
main =
runClient host port path bot