diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-08-24 13:55:41 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-08-24 13:55:41 -0600 |
commit | f1128c7c60809d1e96009eaed98c0756831fe29f (patch) | |
tree | 3cc1957c7436e9efb1d26548b285fa3449574c3a /src/Language/Fiddle/Compiler.hs | |
parent | 21f879cf2ac5f51f827fe76c55915e56edc113b8 (diff) | |
download | fiddle-f1128c7c60809d1e96009eaed98c0756831fe29f.tar.gz fiddle-f1128c7c60809d1e96009eaed98c0756831fe29f.tar.bz2 fiddle-f1128c7c60809d1e96009eaed98c0756831fe29f.zip |
Add Stage3 compliation.
I think this is the last phase before sending the refined AST to the
backend compiler to be processed.
Diffstat (limited to 'src/Language/Fiddle/Compiler.hs')
-rw-r--r-- | src/Language/Fiddle/Compiler.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |