{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Proof.Assistant.Version where
import Data.Text (Text)
import Data.Version
import Paths_proof_assistant_bot
import qualified Data.Text as Text
rzkVersion :: String
rzkVersion :: String
rzkVersion = VERSION_rzk
proofAssistantBotVersion :: String
proofAssistantBotVersion :: String
proofAssistantBotVersion = Version -> String
showVersion Version
version
makeVersion :: Text -> Text
makeVersion :: Text -> Text
makeVersion Text
txt = [Text] -> Text
Text.unlines
[ Text -> Text -> Text -> Text
Text.replace Text
"<bot_version>" (String -> Text
Text.pack String
proofAssistantBotVersion) Text
txt
, Text
"rzk v." Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> String -> Text
Text.pack String
rzkVersion
]