1
0
forked from GitHub/gf-core

Renamed transfer compiler and interpreter.

This commit is contained in:
bringert
2005-12-05 16:53:27 +00:00
parent 98b8d8d081
commit 48cfd7d66f
3 changed files with 6 additions and 7 deletions

25
transfer/transferc.hs Normal file
View File

@@ -0,0 +1,25 @@
module Main where
import Transfer.CompilerAPI
import Data.List (partition, isPrefixOf)
import System.Environment
import System.Exit
import System.IO
die :: String -> IO a
die s = do
hPutStrLn stderr s
exitFailure
main :: IO ()
main = do
args <- getArgs
let (flags,files) = partition ("-" `isPrefixOf`) args
path = [ p | ('-':'i':p) <- flags ]
case files of
[f] -> do
cf <- compileFile path f
putStrLn $ "Wrote " ++ cf
return ()
_ -> die "Usage: transferc [-i<path> [-i<path> ... ]] <file>"