proof-assistant-bot-0.2.0: Telegram bot for proof assistants
Safe HaskellNone
LanguageHaskell2010

Agda.Interaction.State

Synopsis

Documentation

data AgdaState Source #

Agda has its own env (TCEnv) and state (TCState). We are using them in combination with communication channel between Agda and bot.

Constructors

AgdaState 

readTCState :: AgdaState -> IO TCState Source #

Helper to get access to TCState.

writeTCState :: TCState -> AgdaState -> IO () Source #

Helper to store new TCState.

readTCEnv :: AgdaState -> IO TCEnv Source #

Helper to get access to TCEnv.

writeTCEnv :: TCEnv -> AgdaState -> IO () Source #

Helper to store new TCEnv.

runAgda :: AgdaState -> TCM ByteString -> IO ByteString Source #

Run chosen typechecking action in the typechecking monad (TCM).

catchAgdaError :: MonadTCM m => TCErr -> m ByteString Source #

Catch error from Agda and make it looks pretty.

setEnv :: AgdaState -> (TCEnv -> TCEnv) -> IO () Source #

Helper to modify TCEnv.