Main.hs revision 10da16d474b5f41f84922cc19e5f4d6d14fc2076
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach-------------------------------------------------------------------------------
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach-- Copyright 2007, Lutz Schroeder and Georgel Calin
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach-------------------------------------------------------------------------------
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbachmodule Main where
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbachimport GMPParser
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbachimport ModalLogic
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbachimport ModalK()
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbachimport ModalKD()
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbachimport GradedML()
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbachimport CoalitionL()
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbachimport GenericML()
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach--import qualified Data.Set as Set
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach-------------------------------------------------------------------------------
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach-- Funtion to run parser & print
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach-------------------------------------------------------------------------------
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus RoggenbachrunLex :: (Ord a, Show a, ModalLogic a b) => Parser (Formula a) -> String -> IO ()
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus RoggenbachrunLex p input = run (do
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbachrun :: (Ord a, Show a, ModalLogic a b) => Parser (Formula a) -> String -> IO ()
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach = case (parse p "" input) of
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach Left err -> do putStr "parse error at "
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach Right x -> do {-print "PV list:"
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach let ls = guessPV x ---------------------------
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach let h = if ((not.null) ls) then head(ls)------
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach print h ------------ FOR TESTING -------------}
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach let lro = map roFromPV ls --------------------
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach print "Rho val from the above PV:"
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach print lro ------------------------------------}
a79fe3aad8743ea57e473ea5f66a723244cb9c0eMarkus Roggenbach print "the Formula:"