diff options
Diffstat (limited to 'src/compiler/GF.hs')
| -rw-r--r-- | src/compiler/GF.hs | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/src/compiler/GF.hs b/src/compiler/GF.hs index cb63cadbe..bdb3e9b48 100644 --- a/src/compiler/GF.hs +++ b/src/compiler/GF.hs @@ -1,37 +1,36 @@ -module Main where +module GF( + -- * Command line interface + module GF.Main, + module GF.Compiler, + module GF.Interactive, + -- * Compiling GF grammars + module GF.Compile, + module GF.CompileInParallel, + module GF.CompileOne, + + -- * Abstract syntax, parsing and pretty printing + module GF.Compile.GetGrammar, + module GF.Grammar, + + -- * Supporting infrastructure and system utilities + module GF.Data.Operations, + module GF.Infra.UseIO, + module GF.Infra.Option, + module GF.System.Console + ) where +import GF.Main import GF.Compiler import GF.Interactive -import GF.Data.ErrM -import GF.Infra.Option -import GF.Infra.UseIO -import GF.Infra.BuildInfo (buildInfo) -import Paths_gf -import Data.Version -import System.Directory -import System.Environment (getArgs) -import System.Exit -import GF.System.Console (setConsoleEncoding) +import GF.Compile +import GF.CompileInParallel +import GF.CompileOne -main :: IO () -main = do - setConsoleEncoding - args <- getArgs - case parseOptions args of - Ok (opts,files) -> do curr_dir <- getCurrentDirectory - lib_dir <- getLibraryDirectory opts - mainOpts (fixRelativeLibPaths curr_dir lib_dir opts) files - Bad err -> do ePutStrLn err - ePutStrLn "You may want to try --help." - exitFailure +import GF.Compile.GetGrammar +import GF.Grammar -mainOpts :: Options -> [FilePath] -> IO () -mainOpts opts files = - case flag optMode opts of - ModeVersion -> putStrLn $ "Grammatical Framework (GF) version " ++ showVersion version ++ "\n" ++ buildInfo - ModeHelp -> putStrLn helpMessage - ModeInteractive -> mainGFI opts files - ModeRun -> mainRunGFI opts files - ModeServer port -> mainServerGFI opts port files - ModeCompiler -> mainGFC opts files +import GF.Data.Operations +import GF.Infra.Option +import GF.Infra.UseIO +import GF.System.Console |
