Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runInterpreter :: Interpreter state settings => BotState -> state -> IO ()
- class Interpreter state settings | state -> settings where
- interpretSafe :: state -> InterpreterRequest -> IO ByteString
- getSettings :: state -> InterpreterState settings
- callExternalInterpreter :: ExternalInterpreterSettings -> (FilePath, FilePath) -> IO ByteString
Documentation
runInterpreter :: Interpreter state settings => BotState -> state -> IO () Source #
Main worker function. Reads input from Telegram, calls CLI or API, could be anything.
Returns ByteString
, wraps it in InterpreterResponse
and sends back to Telegram.
class Interpreter state settings | state -> settings where Source #
Worker abstraction over Proof assistant as Interpreter.
Could be CLI, Haskell function, network, whatever.
It should have the state
and associated settings
with the state
.
interpretSafe :: state -> InterpreterRequest -> IO ByteString Source #
getSettings :: state -> InterpreterState settings Source #
Instances
External Interpreter
callExternalInterpreter :: ExternalInterpreterSettings -> (FilePath, FilePath) -> IO ByteString Source #
Call some external CLI application, probably Coq.