mad/byg/src/Main.hs

25 lines
578 B
Haskell
Raw Normal View History

2024-09-11 22:32:14 +02:00
module Main where
import Types (Dependency)
import qualified DependencyRunner as DR
import qualified Types.Dependency as D
import SiteGenerator (generateSite)
import DependencyGenerator (evalDepGenM)
import System.Environment (getArgs)
import qualified Data.Text.IO as T
dependencies :: [Dependency]
dependencies = evalDepGenM generateSite
2024-09-11 22:32:14 +02:00
main :: IO ()
main = do
args <- getArgs
case args of
["run"] ->
DR.runDepRunMIO $ DR.runDeps dependencies
["tree"] ->
T.putStr $ D.formatDependencyTrees dependencies
_ ->
error "unexpected arguments"