on master help sign in
print file path when compiling and enable multithreaded execution
37417e1Evan Czaplicki
compiler/Compiler.hs+6−2
@@ -10,6 +10,7 @@ import System.Console.CmdArgs hiding (program)
10import System.Directory
10import System.Directory
11import System.Exit
11import System.Exit
12import System.FilePath
12import System.FilePath
13+import GHC.Conc
13
14
14import qualified Text.Blaze.Html.Renderer.Pretty as Pretty
15import qualified Text.Blaze.Html.Renderer.Pretty as Pretty
15import qualified Text.Blaze.Html.Renderer.String as Normal
16import qualified Text.Blaze.Html.Renderer.String as Normal
@@ -67,7 +68,8 @@ flags = Flags
67 &= summary ("The Elm Compiler " ++ showVersion version ++ ", (c) Evan Czaplicki")
68 &= summary ("The Elm Compiler " ++ showVersion version ++ ", (c) Evan Czaplicki")
68
69
69main :: IO ()
70main :: IO ()
71+main = do setNumCapabilities =<< getNumProcessors
70−main = compileArgs =<< cmdArgs flags
72+ compileArgs =<< cmdArgs flags
71
73
72compileArgs :: Flags -> IO ()
74compileArgs :: Flags -> IO ()
73compileArgs flags =
75compileArgs flags =
@@ -113,7 +115,9 @@ buildFile flags moduleNum numModules interfaces filePath =
113
115
114 compile :: IO ModuleInterface
116 compile :: IO ModuleInterface
115 compile = do
117 compile = do
116− putStrLn (number ++ " Compiling " ++ name)
118+ putStrLn $ concat [ number, " Compiling ", name
119+ , replicate (max 1 (20 - length name)) ' '
120+ , "( " ++ filePath ++ " )" ]
117 source <- readFile filePath
121 source <- readFile filePath
118 createDirectoryIfMissing True (output_directory flags)
122 createDirectoryIfMissing True (output_directory flags)
119 metaModule <-
123 metaModule <-