initial
This commit is contained in:
19
src/App.hs
Normal file
19
src/App.hs
Normal file
@@ -0,0 +1,19 @@
|
||||
module Main where
|
||||
|
||||
import Data.List (intercalate)
|
||||
import System.Environment (getArgs)
|
||||
import System.IO (hPutStrLn, stderr)
|
||||
|
||||
import Infer.Treat (run)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
args <- getArgs
|
||||
if length args < 2
|
||||
then errln "Expected at least two arguments."
|
||||
else
|
||||
case run (head args) (tail args) of
|
||||
Left e -> errln e
|
||||
Right v ->
|
||||
putStrLn $ "Inferred the following statements: " ++ (intercalate ", " v)
|
||||
where errln = hPutStrLn stderr
|
Reference in New Issue
Block a user