core-program 0.6.2.1 → 0.6.2.2
raw patch · 2 files changed
+11/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- core-program.cabal +1/−1
- lib/Core/Program/Execute.hs +10/−1
core-program.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: core-program-version: 0.6.2.1+version: 0.6.2.2 synopsis: Opinionated Haskell Interoperability description: A library to help build command-line programs, both tools and longer-running daemons.
lib/Core/Program/Execute.hs view
@@ -140,6 +140,7 @@ import Control.Monad ( forM_ , forever+ , unless , void , when )@@ -172,6 +173,8 @@ ( findExecutable ) import System.Exit (ExitCode (..))+import System.Posix.Internals (hostIsThreaded)+import System.Posix.Process qualified as Posix (exitImmediately) import System.Process.Typed (nullStream, proc, readProcess, setStdin) import Prelude hiding (log) @@ -230,8 +233,14 @@ executeActual :: Context τ -> Program τ α -> IO () executeActual context0 program = do+ -- ensure threaded runtime is active+ unless hostIsThreaded $ do+ putStrLn "error: Application must be compiled with -threaded GHC option"+ Posix.exitImmediately (ExitFailure 98)+ -- command line +RTS -Nn -RTS value- when (numCapabilities == 1) (getNumProcessors >>= setNumCapabilities)+ when (numCapabilities == 1) $ do+ getNumProcessors >>= setNumCapabilities -- force UTF-8 working around bad VMs setLocaleEncoding utf8