This commit is contained in:
18
app/Main.hs
18
app/Main.hs
@@ -1,17 +1,25 @@
|
||||
{-# LANGUAGE PatternSynonyms #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
{-# LANGUAGE BlockArguments #-}
|
||||
{-# LANGUAGE OverloadedLists #-}
|
||||
module Main
|
||||
(main)
|
||||
where
|
||||
|
||||
import qualified Gyehoek.ANF.Syntax as ANF
|
||||
import Gyehoek.QBE (render)
|
||||
import Gyehoek.Options
|
||||
import qualified Data.Text.IO as TIO
|
||||
import Prelude hiding ((.),id)
|
||||
import Control.Category
|
||||
import Options.Applicative
|
||||
|
||||
|
||||
main :: IO ()
|
||||
main = TIO.putStrLn . render $ ANF.expr
|
||||
main = driver =<< execParser opts
|
||||
where
|
||||
opts = info (helper <*> parser)
|
||||
( fullDesc
|
||||
)
|
||||
|
||||
|
||||
|
||||
driver :: Options -> IO ()
|
||||
driver opts = do
|
||||
print opts
|
||||
|
||||
Reference in New Issue
Block a user