summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index fef9a9c..9f35e16 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -22,6 +22,7 @@ import GHC.Generics (Generic)
import Data.Functor ((<$>))
import System.Environment (getArgs)
import System.Exit (exitFailure)
+import System.IO (hPutStrLn, stderr)
import Fragment (parseFragments)
import Tangle (tangle)
@@ -48,7 +49,7 @@ main = do
input <- case file of Nothing -> getContents
Just path -> readFile path
case doOperation op (pathString, input) of
- Left err -> putStrLn err >> exitFailure
+ Left err -> hPutStrLn stderr err >> exitFailure
Right result -> putStr result
doOperation :: Operation -> (FilePath, String) -> Either String String