@@ -1,25 +1,12 @@
1−-----------------------------------------------------------------------------
2−--
3−-- Module : psc-bundle
4−-- Copyright : (c) Phil Freeman 2015
5−-- License : MIT
6−--
7−-- Maintainer : Phil Freeman <paf31@cantab.net>
8−-- Stability : experimental
9−-- Portability :
10−--
11−-- | Bundles compiled PureScript modules for the browser.
12−--
13−-----------------------------------------------------------------------------
14−
151{-# LANGUAGE FlexibleContexts #-}
162{-# LANGUAGE ScopedTypeVariables #-}
173{-# LANGUAGE TupleSections #-}
184{-# LANGUAGE RecordWildCards #-}
195
6+-- | Bundles compiled PureScript modules for the browser.
207module Main (main) where
218
22−import Data.Maybe
9+import Data.Maybe
2310import Data.Traversable (for)
2411import Data.Version (showVersion)
2512
@@ -32,7 +19,7 @@ import Control.Monad.IO.Class
3219import System.FilePath (takeFileName, takeDirectory)
3320import System.FilePath.Glob (glob)
3421import System.Exit (exitFailure)
35−import System.IO (stderr, hPutStrLn)
22+import System.IO (stderr, stdout, hPutStrLn, hSetEncoding, utf8)
3623import System.Directory (createDirectoryIfMissing)
3724
3825import Language.PureScript.Bundle
@@ -125,6 +112,8 @@ options = Options <$> some inputFile
125112-- | Make it go.
126113main :: IO ()
127114main = do
115+ hSetEncoding stdout utf8
116+ hSetEncoding stderr utf8
128117 opts <- execParser (info (version <*> helper <*> options) infoModList)
129118 when (isJust (optionsRequirePath opts)) $ hPutStrLn stderr "The require-path option is deprecated and will be removed in PureScript 0.9."
130119 output <- runExceptT (app opts)