Skip to content

Commit a43b772

Browse files
committed
Merge pull request purescript#453 from darthdeus/errors-to-stderr
Print `psc` errors to STDERR
2 parents 549a652 + 3999964 commit a43b772

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

psc/Main.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import System.Console.CmdTheLine
2525
import System.Directory (createDirectoryIfMissing)
2626
import System.FilePath (takeDirectory)
2727
import System.Exit (exitSuccess, exitFailure)
28+
import System.IO (stderr)
2829

2930
import Text.Parsec (ParseError)
3031

@@ -51,12 +52,12 @@ compile opts input output externs = do
5152
modules <- readInput input
5253
case modules of
5354
Left err -> do
54-
U.print err
55+
U.hPutStr stderr $ show err
5556
exitFailure
5657
Right ms -> do
5758
case P.compile opts (map snd ms) of
5859
Left err -> do
59-
U.putStrLn err
60+
U.hPutStrLn stderr err
6061
exitFailure
6162
Right (js, exts, _) -> do
6263
case output of

0 commit comments

Comments
 (0)