hetpa.hs revision 89d5b892ca2fd8eb8f72dba097759a6d54f0a78c
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblettimport Parse_AS_Structured
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblettimport LogicGraph
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblettimport Print_AS_Structured -- for test purposes
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblettimport Print_HetCASL
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblettparsefile fname = do
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblett input <- readFile fname
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblett case runParser (library logicGraph) defaultLogic fname input of
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblett Left err -> error (show err)
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblett Right x -> putStrLn (take 50 (show (printText0_eGA x)) ++ "\n...")
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblett files <- getArgs
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblett sequence (map parsefile files)