module Formula where

data Formula a = Atom a | Con (Formula a) (Formula a) | Dis (Formula a) (Formula a) | Neg (Formula a) | Top | Bot

-- Please read the corresponding exercise sheet carefully.
-- You may slightly adjust given signatures if needed, please provide why you did so.

-- 13 . 1 - Write a simplification function.
simp :: Formula a -> Formula a
simp f = undefined

-- 13 . 2 - Write a substitution function.
substitute :: Formula a -> a -> Bool -> Formula a
substitute f a val = undefined

-- 13 . 3 - Write a Formula 'parser'.
parseF :: IO (Formula a)
parseF = undefined

-- 13 . 4 - Write the loop according to the specification.
-- loop :: TODO
loop = undefined

-- You should leave these functions untouched.
readStringFormula :: IO (Formula String)
readStringFormula = do
  putStrLn "Give a formula with String atoms:"
  parseF

main :: IO ()
main = do
  f <- readStringFormula
  loop f (f, [])