on master help sign in
print file path when compiling and enable multithreaded execution
commit37417e154cc69083fe6abb8c735e00ad63f83136 authorEvan Czaplicki <info@elm-lang.org> dateFri 2 Aug 2013, 22:20 (13 years ago) parent936ffde
1 file changed+6−2
compiler/Compiler.hs+6−2
compiler/Compiler.hs+6−2
@@ -10,6 +10,7 @@ import System.Console.CmdArgs hiding (program)
1010import System.Directory
1111import System.Exit
1212import System.FilePath
13+import GHC.Conc
1314
1415import qualified Text.Blaze.Html.Renderer.Pretty as Pretty
1516import qualified Text.Blaze.Html.Renderer.String as Normal
@@ -67,7 +68,8 @@ flags = Flags
6768 &= summary ("The Elm Compiler " ++ showVersion version ++ ", (c) Evan Czaplicki")
6869
6970main :: IO ()
70−main = compileArgs =<< cmdArgs flags
71+main = do setNumCapabilities =<< getNumProcessors
72+ compileArgs =<< cmdArgs flags
7173
7274compileArgs :: Flags -> IO ()
7375compileArgs flags =
@@ -113,7 +115,9 @@ buildFile flags moduleNum numModules interfaces filePath =
113115
114116 compile :: IO ModuleInterface
115117 compile = do
116− putStrLn (number ++ " Compiling " ++ name)
118+ putStrLn $ concat [ number, " Compiling ", name
119+ , replicate (max 1 (20 - length name)) ' '
120+ , "( " ++ filePath ++ " )" ]
117121 source <- readFile filePath
118122 createDirectoryIfMissing True (output_directory flags)
119123 metaModule <-