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

Proof.Assistant.RefreshFile

Synopsis

Documentation

refreshTmpFile :: ExternalInterpreterSettings -> InterpreterRequest -> Maybe FilePath -> IO (FilePath, FilePath) Source #

Most interpreters work with files. Therefore, we need to store user input as a file. Remember that input could come from different chats, so we need to store input separately. Unless directory specified, temporary directory will be used to store the files.

getTempFilePath :: ExternalInterpreterSettings -> InterpreterRequest -> FilePath -> FilePath Source #

Make absolute filepath based on settings, request and directory.

chatIdToString :: ChatId -> String Source #

Helper to convert Telegram ChatId to String (for filepath).

validate :: FilePath -> ByteString -> ByteString Source #

Helper to cut filepath from the output.