forked from noschinl/cyp
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMain.hs
More file actions
23 lines (21 loc) · 662 Bytes
/
Main.hs
File metadata and controls
23 lines (21 loc) · 662 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import Test.Info2.Cyp
import Control.Monad
import System.Environment (getArgs, getProgName)
import System.Exit (exitFailure, exitSuccess)
import Text.PrettyPrint (render)
main :: IO ()
main = do
args <- getArgs
when (length args /= 2) $ do
prog <- getProgName
putStrLn $ "Syntax: " ++ prog ++ " <background.cthy> <proof.cprf>"
exitFailure
let [thyFile, prfFile] = args
result <- proofFile thyFile prfFile
case result of
Left e -> do
putStrLn $ render e
exitFailure
Right () -> do
putStrLn "Congratulations! You correctly proved all goals!"
exitSuccess