git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Use stderr for docgen errors.
commitc3d7cb5190319e81351ee366820aa0f24646eb47 authorjoneshf <jones3.hardy@gmail.com> dateFri 25 Jul 2014, 23:45 (12 years ago) parent198cc93
1 file changed+3−2
docgen/Main.hs+3−2
docgen/Main.hs+3−2
@@ -25,6 +25,7 @@ import qualified Paths_purescript as Paths
2525import qualified System.IO.UTF8 as U
2626import System.Console.CmdTheLine
2727import System.Exit (exitSuccess, exitFailure)
28+import System.IO (stderr)
2829
2930docgen :: Bool -> [FilePath] -> IO ()
3031docgen showHierarchy input = do
@@ -37,7 +38,7 @@ parseFile input = do
3738 text <- U.readFile input
3839 case P.runIndentParser input P.parseModules text of
3940 Left err -> do
40− U.print err
41+ U.hPutStr stderr $ show err
4142 exitFailure
4243 Right ms -> do
4344 return ms
@@ -168,7 +169,7 @@ prettyPrintType' :: P.Type -> String
168169prettyPrintType' = P.prettyPrintType . P.everywhereOnTypes dePrim
169170 where
170171 dePrim ty@(P.TypeConstructor (P.Qualified _ name))
171− | ty == P.tyBoolean || ty == P.tyNumber || ty == P.tyString =
172+ | ty == P.tyBoolean || ty == P.tyNumber || ty == P.tyString =
172173 P.TypeConstructor $ P.Qualified Nothing name
173174 dePrim other = other
174175