@@ -136,10 +136,10 @@ data RebuildPolicy
136136--
137137make :: forall m. (Functor m, Applicative m, Monad m, MonadReader Options m, MonadError MultipleErrors m, MonadWriter MultipleErrors m)
138138 => MakeActions m
139− -> [(Either RebuildPolicy FilePath, Module)]
139+ -> [Module]
140140 -> m Environment
141141make MakeActions{..} ms = do
142− (sorted, graph) <- sortModules $ map (importPrim . snd) ms
142+ (sorted, graph) <- sortModules $ map importPrim ms
143143 mapM_ lint sorted
144144 toRebuild <- foldM (\s (Module _ moduleName' _ _) -> do
145145 inputTimestamp <- getInputTimestamp moduleName'
@@ -282,6 +282,8 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
282282 foreignFile = outputDir </> filePath </> "foreign.js"
283283 prefix = ["Generated by psc version " ++ showVersion Paths.version | usePrefix]
284284 js = unlines $ map ("// " ++) prefix ++ [pjs]
285+ verboseErrorsEnabled <- asks optionsVerboseErrors
286+ when verboseErrorsEnabled $ progress $ "Writing " ++ jsFile
285287 writeTextFile jsFile js
286288 maybe (return ()) (writeTextFile foreignFile . snd) $ mn `M.lookup` foreigns
287289 writeTextFile externsFile exts
@@ -295,16 +297,11 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
295297 traverse (const $ getModificationTime path) $ guard exists
296298
297299 readTextFile :: FilePath -> Make String
298− readTextFile path = do
299− verboseErrorsEnabled <- asks optionsVerboseErrors
300− makeIO (const (SimpleErrorWrapper $ CannotReadFile path)) $ do
301− when verboseErrorsEnabled $ putStrLn $ "Reading " ++ path
302− readFile path
300+ readTextFile path = makeIO (const (SimpleErrorWrapper $ CannotReadFile path)) $ readFile path
303301
304302 writeTextFile :: FilePath -> String -> Make ()
305303 writeTextFile path text = makeIO (const (SimpleErrorWrapper $ CannotWriteFile path)) $ do
306304 mkdirp path
307− putStrLn $ "Writing " ++ path
308305 writeFile path text
309306 where
310307 mkdirp :: FilePath -> IO ()