Formatting.hs revision fdf9cef4c2e81f477f3023fb8e45f6faebfa5a65
module PGIP.Output.Formatting
( showComorph
, getWebProverName
, removeFunnyChars
) where
import Logic.Logic
import Logic.Comorphism
import Proofs.AbstractState
import Data.Char
showComorph :: AnyComorphism -> String
showComorph (Comorphism cid) = removeFunnyChars . drop 1 . dropWhile (/= ':')
. map (\ c -> if c == ';' then ':' else c)
$ language_name cid
removeFunnyChars :: String -> String
removeFunnyChars = filter (\ c -> isAlphaNum c || elem c "_.:-")
getWebProverName :: G_prover -> String
getWebProverName = removeFunnyChars . getProverName