aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-02-25 21:04:03 +0100
committerTom Smeding <tom@tomsmeding.com>2024-02-25 21:04:03 +0100
commitc13617684eb10fc622cc502249591002e2f7d74c (patch)
tree1d7171e32f4503817e013133ac56f6d2ea4095ac /src/Main.hs
parentf72bf16e2edc8d654e661cd59f820409219e5f27 (diff)
Separate out library
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/Main.hs b/src/Main.hs
deleted file mode 100644
index 750f749..0000000
--- a/src/Main.hs
+++ /dev/null
@@ -1,28 +0,0 @@
-{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE TupleSections #-}
-module Main where
-
-import Data.List (intersperse)
-import System.Environment (getArgs)
-import System.Exit (die, exitFailure)
-
-import Parser
-
-
-main :: IO ()
-main = do
- (source, fname) <- getArgs >>= \case
- [] -> (,"<stdin>") <$> getContents
- [fname] -> (,fname) <$> readFile fname
- _ -> die "Usage: hs-visinter [filename.hs]"
-
- prog <- case parse fname source of
- This errs -> do
- sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs)
- exitFailure
- These errs res -> do
- sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs)
- return res
- That res -> return res
-
- print prog