From f1128c7c60809d1e96009eaed98c0756831fe29f Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sat, 24 Aug 2024 13:55:41 -0600 Subject: Add Stage3 compliation. I think this is the last phase before sending the refined AST to the backend compiler to be processed. --- src/Language/Fiddle/Compiler.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Language/Fiddle/Compiler.hs') diff --git a/src/Language/Fiddle/Compiler.hs b/src/Language/Fiddle/Compiler.hs index b523a78..768c569 100644 --- a/src/Language/Fiddle/Compiler.hs +++ b/src/Language/Fiddle/Compiler.hs @@ -9,6 +9,7 @@ import Data.Default import Language.Fiddle.Ast import Language.Fiddle.Types import Text.Parsec (SourcePos, sourceColumn, sourceLine, sourceName) +import System.IO (hPutStrLn, stderr) data Level = Error | Warning | Info @@ -96,7 +97,7 @@ diagnosticToString (DiagnosticFormat f) = f printDiagnostic :: Diagnostic -> IO () printDiagnostic d = - putStrLn (diagnosticToString coloredFormat d) + hPutStrLn stderr (diagnosticToString coloredFormat d) fromMayberOrFail :: SourceSpan -> String -> Maybe a -> Compile s a fromMayberOrFail sourceSpan err Nothing = do -- cgit