Skip to content

Commit

Permalink
send adlc errors to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
timbod7 committed Dec 23, 2024
1 parent cdbe52a commit 42b6b50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion haskell/compiler/adlc-bootstrap/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import System.Console.GetOpt
import System.Exit
import System.Environment (getArgs)
import System.FilePath(joinPath)
import System.IO(stderr)
import Data.List(intercalate,partition)

import qualified Data.Text as T
Expand Down Expand Up @@ -93,5 +94,5 @@ main = do
a <- unEIO $ eio
case a of
(Left perr) ->
T.putStrLn perr >> exitWith (ExitFailure 1)
T.hPutStrLn stderr perr >> exitWith (ExitFailure 1)
(Right _) -> exitWith ExitSuccess
3 changes: 2 additions & 1 deletion haskell/compiler/adlc/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import System.Console.GetOpt
import System.Environment (getArgs)
import System.Exit
import System.FilePath(joinPath)
import System.IO(stderr)

stdAdlFlags :: FilePath -> [String] -> AdlFlags
stdAdlFlags libDir mergeFileExtensions =
Expand Down Expand Up @@ -360,5 +361,5 @@ main = do
a <- unEIO $ eio
case a of
(Left perr) ->
T.putStrLn perr >> exitWith (ExitFailure 1)
T.hPutStrLn stderr perr >> exitWith (ExitFailure 1)
(Right _) -> exitWith ExitSuccess

0 comments on commit 42b6b50

Please sign in to comment.