X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=Mate.hs;h=5ea2f7d200ae08d847a3677f54f3603fe3caf88f;hb=0ddbcb63c3be33c9825569711099851be38f2a7f;hp=ee03d8d78ad1b3dfb19f766ae813d062f000c305;hpb=e77e74e6bbc04c523f1468d21b14167b7eb910f7;p=mate.git diff --git a/Mate.hs b/Mate.hs index ee03d8d..5ea2f7d 100644 --- a/Mate.hs +++ b/Mate.hs @@ -20,7 +20,7 @@ import Mate.BasicBlocks import Mate.MethodPool import Mate.Types import Mate.ClassPool -import Mate.NativeMaschine +import Mate.NativeMachine main :: IO () main = do @@ -36,13 +36,13 @@ parseArgs ("-jar":jarpath:_) stdcp = do case res of Nothing -> error "JAR: no MainClass entry found. Try to pass the jar file via -cp instead." Just mc -> do - let bclspath = B.pack $ map (fromIntegral . ord) mc + let bclspath = B.pack . map (fromIntegral . ord) $ mc cls <- getClassFile bclspath executeMain bclspath cls + parseArgs ("-cp":cps) cpset = parseArgs ("-classpath":cps) cpset parseArgs ("-classpath":cps:xs) False = do - let paths = splitOn ":" cps - mapM_ addStuff paths + mapM_ addStuff $ splitOn ":" cps parseArgs xs True where addStuff :: String -> IO () @@ -54,7 +54,7 @@ parseArgs (('-':_):_) _ = error "Usage: mate [-cp|-classpath ] [