Started on a stub GFC.Main

This commit is contained in:
bringert
2007-09-28 13:27:12 +00:00
parent e2ff5b023f
commit 02db3b9701
2 changed files with 36 additions and 1 deletions

28
src/GF/Devel/GFC/Main.hs Normal file
View File

@@ -0,0 +1,28 @@
module GF.Devel.GFC.Main where
import GF.Devel.GFC.Options
import System.Environment
import System.Exit
import System.IO
version = "X.X"
main :: IO ()
main =
do args <- getArgs
case parseOptions args of
Ok (opts, files) ->
case optMode opts of
Version -> putStrLn $ "GF, version " ++ version
Help -> putStr helpMessage
Compiler -> gfcMain opts files
Errors errs ->
do mapM_ (hPutStrLn stderr) errs
exitFailure
gfcMain :: Options -> [FilePath] -> IO ()
gfcMain opts files = return ()

View File

@@ -1,4 +1,11 @@
module GF.Devel.Options where
module GF.Devel.GFC.Options
(
Err(..), -- FIXME: take from somewhere else
Options(..),
Mode(..), Phase(..), OutputFormat(..), Optimization(..),
parseOptions, helpMessage
) where
import Control.Monad
import Data.Maybe