Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- callAgda :: AgdaState -> InterpreterRequest -> IO ByteString
- withChat :: ChatId -> AgdaState -> IO a -> IO a
- interpretAgda :: AgdaState -> ByteString -> IO ByteString
- parseRequest :: ByteString -> Either ByteString (Either () AgdaCommand, ByteString)
Documentation
callAgda :: AgdaState -> InterpreterRequest -> IO ByteString Source #
Call Agda with its state. It will parse and execute command from the InterpreterRequest
.
withChat :: ChatId -> AgdaState -> IO a -> IO a Source #
Since every chat associated with its own Agda state, we need to modify TCEnv
by setting envCurrentPath
with an absolute path to the corresponding file.
interpretAgda :: AgdaState -> ByteString -> IO ByteString Source #
Parse user input as command and execute in Agda.
parseRequest :: ByteString -> Either ByteString (Either () AgdaCommand, ByteString) Source #
Parse command. It could be unknown command or AgdaCommand
sub-command with its arguments
or even expression to evaluate.